query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
d341d7ecce7829f35ad03f5c3aacb7c7
Dynamically check if a value is set on the user.
[ { "docid": "f86be6345b53904b792c0b418e30c8cc", "score": "0.0", "text": "public function __isset( $key )\n\t{\n\t\treturn isset( $this->properties[$key] );\n\t}", "title": "" } ]
[ { "docid": "8896e1fcab7a5258b7b18bd23a9c1450", "score": "0.7160184", "text": "public function hasValue();", "title": "" }, { "docid": "0dca324654ae1be6ae07702661e68dee", "score": "0.6659544", "text": "public function hasValue(): bool{\n\t\t\t# Check if the token was set\n\t\t\treturn is_null($this->value) === false;\n\t\t}", "title": "" }, { "docid": "b335e2eb1650eb22a500ef64432114b8", "score": "0.6658031", "text": "function check_value($value){\n\tif (isset($value)) {\n\t\techo \"\\$value is SET\" . PHP_EOL;\n\t} elseif (empty($value)) {\n\t\techo \"\\$value is EMPTY\" . PHP_EOL;\n\t}\n}", "title": "" }, { "docid": "a16539297315725c500880e8ca1b385b", "score": "0.662847", "text": "public function hasValue($value);", "title": "" }, { "docid": "00b79e734db2b5a81fcee091d10195bd", "score": "0.6550468", "text": "public function hasValue()\n {\n return isset($this->value);\n }", "title": "" }, { "docid": "397ee3291ab664e1857827769f1b78a0", "score": "0.65198046", "text": "public function hasValue(): bool\n {\n return false;\n }", "title": "" }, { "docid": "01d20c15a1af55e51ae5f0bd745e8d7b", "score": "0.65026754", "text": "public function hasValue(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "01d20c15a1af55e51ae5f0bd745e8d7b", "score": "0.65026754", "text": "public function hasValue(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "01d20c15a1af55e51ae5f0bd745e8d7b", "score": "0.65026754", "text": "public function hasValue(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "01d20c15a1af55e51ae5f0bd745e8d7b", "score": "0.65026754", "text": "public function hasValue(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "01d20c15a1af55e51ae5f0bd745e8d7b", "score": "0.65026754", "text": "public function hasValue(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "2f226a90ee6d5d1e44c22218b18d8499", "score": "0.6443456", "text": "public function hasValue() : bool\n {\n return isset($this->value);\n }", "title": "" }, { "docid": "27f4fd8d3c08c80c335e5b4d84b9d16f", "score": "0.6398599", "text": "public function valide_profile() {\n\n \t$current_user = auth()->user();\n\n $user_status= array(\n \t'height_status' => isset($current_user->height),\n \t'birthdate_status' => isset($current_user->birth_date),\n \t'sex_status' => isset($current_user->sex),\n );\n\n foreach ($user_status as $status) {\n \tif($status == false) {\n \t\treturn false;\n \t}\n }\n return true;\n }", "title": "" }, { "docid": "e093e8d481692ab279d1800d48dd268f", "score": "0.6313065", "text": "public function getValue(): bool\n {\n // If is true and the user does not have the rights, return true.\n if ($this->currentValue && ! $this->hasRights()) {\n return $this->currentValue;\n }\n\n // If doesn't exist param. Return the current value.\n if (! $this->optionalParams->existParam()) {\n return $this->currentValue;\n }\n\n return (bool) $this->optionalParams->getValue();\n }", "title": "" }, { "docid": "c0eabec00b4449e6da1f4aac3dd66816", "score": "0.62100416", "text": "protected function _canAssign()\n {\n if($this->_entity->getId()->getValue() && $this->getOnce() && $this->_value !== null) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e230c5fc9a442df80a28e7f5b41cd8b0", "score": "0.6207306", "text": "public function hasValue(): bool\n\t{\n\t\treturn $this->isValue;\n\t}", "title": "" }, { "docid": "86b73c3dac8278896c517e3f5edd867b", "score": "0.6184112", "text": "public function hasPersonaSetByUser()\n {\n return $this->persona_set_by_user !== null;\n }", "title": "" }, { "docid": "010856f0446f32d485ea51a33ac259c7", "score": "0.61684376", "text": "public function test_has_value($value) {\n\t\t$return = false;\n\t\tif( isset( $value ) && ! empty( $value ) ) {\n\t\t\t$return = true;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "b1cfbe55fc90748ae25912dc8270c50d", "score": "0.61666626", "text": "public static function is_set ()\n {\n $var = self::$variables;\n foreach ( func_get_args () as $arg )\n {\n if ( !isset ( $var [ $arg ] ) ) return false;\n $var = $var [ $arg ];\n }\n return true;\n }", "title": "" }, { "docid": "b73d355fe7ef7a1ac6086400516b00cf", "score": "0.6165096", "text": "public function passes($attribute, $value)\n {\n // return User::query()->where('id', $value)->exists(); // If only check if user exists and not the logged user\n return $value !== null && auth()->user()->id == $value;\n }", "title": "" }, { "docid": "fea45140d30c2a72e57e44170ee92f6e", "score": "0.61647314", "text": "public function has_value(): bool {\n\t\treturn ! is_null( $this->value );\n\t}", "title": "" }, { "docid": "df4ea1005ce226a37e7ed1b5c9efb945", "score": "0.6160497", "text": "function hasValue($key) {\r\n\t\t\treturn isSet($_SESSION[$this->prefix.$key]);\r\n\t\t}", "title": "" }, { "docid": "f01df96a07f2a2d3cc8b32940e90fa16", "score": "0.6154281", "text": "public function hasAllowedValues() : bool;", "title": "" }, { "docid": "665d78aacac7e3455829d8200ce5e9f2", "score": "0.6153538", "text": "function isUser(){\n\t\treturn isset($_SESSION['person']);\n\t}", "title": "" }, { "docid": "d94103ca029dafd712030503ef06ab18", "score": "0.61451435", "text": "function is_user_read($value, $key = 'id') {\r\n return _is_request('user/read', [$key => $value]);\r\n }", "title": "" }, { "docid": "fc1f20c914d36a810a916d7c3155586a", "score": "0.6134013", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->usr_per_id !== 0) {\n return false;\n }\n\n if ($this->usr_password !== '') {\n return false;\n }\n\n if ($this->usr_needpasswordchange !== true) {\n return false;\n }\n\n if ($this->usr_lastlogin && $this->usr_lastlogin->format('Y-m-d H:i:s.u') !== '2016-01-01 00:00:00.000000') {\n return false;\n }\n\n if ($this->usr_logincount !== 0) {\n return false;\n }\n\n if ($this->usr_failedlogins !== 0) {\n return false;\n }\n\n if ($this->usr_addrecords !== false) {\n return false;\n }\n\n if ($this->usr_editrecords !== false) {\n return false;\n }\n\n if ($this->usr_deleterecords !== false) {\n return false;\n }\n\n if ($this->usr_menuoptions !== false) {\n return false;\n }\n\n if ($this->usr_managegroups !== false) {\n return false;\n }\n\n if ($this->usr_finance !== false) {\n return false;\n }\n\n if ($this->usr_notes !== false) {\n return false;\n }\n\n if ($this->usr_admin !== false) {\n return false;\n }\n\n if ($this->usr_searchlimit !== 10) {\n return false;\n }\n\n if ($this->usr_style !== 'Style.css') {\n return false;\n }\n\n if ($this->usr_showpledges !== false) {\n return false;\n }\n\n if ($this->usr_showpayments !== false) {\n return false;\n }\n\n if ($this->usr_showsince && $this->usr_showsince->format('Y-m-d') !== '2016-01-01') {\n return false;\n }\n\n if ($this->usr_defaultfy !== 10) {\n return false;\n }\n\n if ($this->usr_currentdeposit !== 0) {\n return false;\n }\n\n if ($this->usr_editself !== false) {\n return false;\n }\n\n if ($this->usr_canvasser !== false) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "cd3fd27627efafd0688af2df9fc7fc02", "score": "0.61011046", "text": "private function _userHasSettings() {\n\t\t$query = Configurations::getConfigurationsByUserId($this->user->id);\n\t\tif( ! empty($query) ) {\n\t\t\tforeach($query as $row) {\n\t\t\t\tif( $row['type_id'] == Core_Pay::BASE_TYPE_ID ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2947e85a1f16e90b7310054f1ddb8d9c", "score": "0.6070341", "text": "public static function check()\n\t{\n\t\treturn ! is_null(static::user());\n\t}", "title": "" }, { "docid": "55b45d0e2437dc7076d940f038ab8d29", "score": "0.6036222", "text": "public static function user(): bool\n {\n return self::is('user');\n }", "title": "" }, { "docid": "e127bb9b1ad8528eb8cd4fc4f896924d", "score": "0.60239726", "text": "public\n function has_user($key)\n {\n return $this->find_user($key, 'id') ? true : false;\n }", "title": "" }, { "docid": "2a38c97a8d70ac334c6ac1f2d06c2eb2", "score": "0.6019111", "text": "abstract protected function hasValue($key);", "title": "" }, { "docid": "79b463c3f167604baa4f3dc0464fd3e9", "score": "0.59898907", "text": "public function exists(){\r\n\t\treturn $this->userExists;\r\n\t}", "title": "" }, { "docid": "6b6b259caea327276f35005771c53d39", "score": "0.59867525", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->preg_r_usuario !== 1) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "82941c894f0c46b6881aa50e8c03e3bc", "score": "0.5983251", "text": "public function check($value);", "title": "" }, { "docid": "25b95dbc7936d307100bdd0b4ac52ae6", "score": "0.5980169", "text": "public function test_user_id_equals_specific_user_true() {\n\t\t$field = FrmField::getOne( 'user-id-field' );\n\t\t$entry = FrmEntry::getOne( 'jamie_entry_key', true );\n\n\t\t$field_value = $compare_to = $entry->metas[ $field->id ];\n\t\t$compare_type = 'equals';\n\n\t\t$opening_tag = '[if ' . $field->id . ' ' . $compare_type . '=\"' . $compare_to . '\"]';\n\t\t$content = 'Before ' . $opening_tag . 'Show me[/if ' . $field->id . '] After';\n\n\t\t$atts = $this->package_atts_for_jamie_entry( $compare_type, $compare_to, $opening_tag );\n\t\t$tag = $field->id;\n\t\t$args = array( 'field' => $field );\n\n\t\tFrmProContent::check_conditional_shortcode( $content, $field_value, $atts, $tag, 'if', $args );\n\n\t\t$this->assert_conditional_is_true( $content );\n\t}", "title": "" }, { "docid": "804c522c825f165aaad4eedb0eeada9b", "score": "0.59753895", "text": "public function hasDefaultValue();", "title": "" }, { "docid": "8dcf25577a903284cfb4104e2e7a676d", "score": "0.59737766", "text": "function __setLoggedUserValues(){\n $user = null;\n if( $user = $this->Auth->user() ){\n $this->set('User', $user[$this->Auth->userModel]);\n $this->loggedUser = $user[$this->Auth->userModel];\n $this->loggedUser['limitedApi'] = false;\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9820830204f12a5cfc92ca64fec2e6ae", "score": "0.59509504", "text": "function is_user_update($value, $key = 'id') {\r\n return _is_request('user/update', [$key => $value]);\r\n }", "title": "" }, { "docid": "2badcc32f3c2162effd749eb9a170be3", "score": "0.5932816", "text": "function __isset($name) {\n $value = $this->system->ask($this->subject,$name);\n return !empty($value);\n }", "title": "" }, { "docid": "654e17ff0ad8fb4194589a19548710c6", "score": "0.59282416", "text": "public static function checkUser()\n {\n return Session::has(\"user\");\n }", "title": "" }, { "docid": "cabd3a9f1c11ce026c514ed1f0eb28d1", "score": "0.59239686", "text": "public function check()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "cabd3a9f1c11ce026c514ed1f0eb28d1", "score": "0.59239686", "text": "public function check()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "cabd3a9f1c11ce026c514ed1f0eb28d1", "score": "0.59239686", "text": "public function check()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "cabd3a9f1c11ce026c514ed1f0eb28d1", "score": "0.59239686", "text": "public function check()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "cabd3a9f1c11ce026c514ed1f0eb28d1", "score": "0.59239686", "text": "public function check()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "50644fee9ec31c7c81093e822b633a20", "score": "0.5920661", "text": "public function check()\n {\n return ! is_null($this->getUser());\n }", "title": "" }, { "docid": "803911f2b28dea096c145b4b012dd2a5", "score": "0.5915211", "text": "public function hasValue($value) {\n\t\treturn $this->getOptionByProperty('value', $value);\n\t}", "title": "" }, { "docid": "e62fb6ca564a0620c1dc1640d6fd3444", "score": "0.59114176", "text": "public function hasValue($key);", "title": "" }, { "docid": "fe7e1f11b0a02797d8c292f37797eb5c", "score": "0.59039676", "text": "public function checkUserExisted(){\n return $this->getAuth() != NULL;\n }", "title": "" }, { "docid": "f16cf7875cc6825b5937ea93f5ebec13", "score": "0.5902723", "text": "public static function userExists($value)\n {\n\n //search by ID\n if (is_numeric($value)) {\n $user = DB::getInstance()->query(\"SELECT 'id' FROM `members` WHERE `id` = :id\", array(\n\n \":id\" => $value\n\n ));\n }\n //search by email\n else {\n $user = DB::getInstance()->query(\"SELECT 'email' FROM `members` WHERE `email` = :email\", array(\n\n \":email\" => $value\n\n ));\n }\n\n if ($user->result()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "1fc96ac3da2de1f177148b459dc9296d", "score": "0.5898406", "text": "public function foreignKeyUser()\n {\n return empty(PersonalInformation::where('user_id', Auth::user()->id)->value('user_id')) ? true : false;\n }", "title": "" }, { "docid": "18b43da3dcd499f246fdf080cddeed5e", "score": "0.58911127", "text": "abstract public function check($value);", "title": "" }, { "docid": "93c12b5cd2045f2e577964d4ec2b8087", "score": "0.58882344", "text": "public function isSet(): bool\n {\n return null !== $this->id || null !== $this->username || null !== $this->email;\n }", "title": "" }, { "docid": "aa294d1d830bb54a836895332d2398b4", "score": "0.58628553", "text": "function can_be_manually_set() {\r\n return true;\r\n }", "title": "" }, { "docid": "be09d71d2e35aa6ed7e9e33033053d60", "score": "0.5860885", "text": "public function hasValue($params = array()) {\n\t\t\n\t\t$value = $this->get('value', $this->config->find('specific._default'));\n\t\treturn !empty($value);\n\t}", "title": "" }, { "docid": "faed2522e0082cdbbff97922bad0f625", "score": "0.5854553", "text": "function is_set($variable, $value = '') {\r\n return isset($variable)?$variable:$value;\r\n}", "title": "" }, { "docid": "735f342b97464c68686b21765ca6631d", "score": "0.5848275", "text": "function rules_condition_user_is_cas() {\n return !empty($_SESSION['phpCAS']['user']);\n}", "title": "" }, { "docid": "cf1e20ddf7f19da4bf58cc4697f4ab6a", "score": "0.584725", "text": "public function has($value);", "title": "" }, { "docid": "28f4070af33e7022f5611587070870b4", "score": "0.58331686", "text": "public static function hasUser()\r\n\t{\r\n\t\treturn (bool)self::callContext(\"hasUser\");\t\t\r\n\t}", "title": "" }, { "docid": "81a08e1822f026f9633a8e54c68ffa6b", "score": "0.58228654", "text": "function _checkUser() {\n\t\t$user_data = $this->Session->read('WUBSSEWR');\n\t\tif(isset($user_data['User']['id']) != '') {\n\t\t\t$this->set('usersession', $user_data);\n\t\t}\n\t}", "title": "" }, { "docid": "a27273c7994a194d19fcd216f3af865f", "score": "0.5815916", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->marc_r_usuario !== 1) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "9935d16c06b3bb664e3ec1b1d7456ec7", "score": "0.58148605", "text": "public function need_value_detect() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "50e43b64ad52c9094fb5d280a3d64dd2", "score": "0.5809459", "text": "public function check()\n {\n return ! is_null($this->user());\n }", "title": "" }, { "docid": "50e43b64ad52c9094fb5d280a3d64dd2", "score": "0.5809459", "text": "public function check()\n {\n return ! is_null($this->user());\n }", "title": "" }, { "docid": "50e43b64ad52c9094fb5d280a3d64dd2", "score": "0.5809459", "text": "public function check()\n {\n return ! is_null($this->user());\n }", "title": "" }, { "docid": "7565a1237e6aed9a2424b2bd3d102e5c", "score": "0.5808209", "text": "function set_plugin_uservalue() {\r\r\n\t}", "title": "" }, { "docid": "5dec46eced5db6982be9316a8b247006", "score": "0.5805173", "text": "public function passes($attribute, $value)\n {\n return User::where('id', $this->id)->count() != 0;\n }", "title": "" }, { "docid": "b96c8a1e47ee4f86f7b5224e4f779ca8", "score": "0.5791968", "text": "public function argumentValueIsSet(string $name) : bool;", "title": "" }, { "docid": "1f248e34d8019be5476e00c036804234", "score": "0.57885075", "text": "public function are_set(...$fields){\n$len=count($fields);\nfor($i=0;$i<$len;$i++){\nif(!(isset($_POST[$fields[$i]]) && !empty($_POST[$fields[$i]]))){\nreturn 0;\n}\n}\nreturn 1;\n}", "title": "" }, { "docid": "a26f88e4acbbcf4567dd49f643b8f697", "score": "0.57828933", "text": "function registered() {\n return ( $this->username != \"\" );\n }", "title": "" }, { "docid": "c7a4935cc105d85bf09858a6dbd56920", "score": "0.5768595", "text": "public function canSubmitValue()\n {\n return $this->hasData() && !$this->isReadonly() && !$this->isDisabled();\n }", "title": "" }, { "docid": "331cbd782f261029eddf0b88f3e95b43", "score": "0.57650375", "text": "public function manageSetting(User $user)\n {\n $collection = collect(new User);\n foreach ($user->roles as $role) {\n $collection = $role->permissions;\n } \n $chk = false;\n foreach ($collection as $coll) {\n if ($coll->id === 1 || $coll->id === 11)\n $chk = true;\n }\n return $chk;\n }", "title": "" }, { "docid": "5a2159208e7d0c1bb796edc128d7c8ec", "score": "0.57587475", "text": "public function passes($attribute, $value)\n {\n if(!isset($value)){\n return false;\n }\n $globalUser= new GlobalUser();\n $result=DB::table('merchants_data')->where('merchant_id','=',$value)->first();\n if(isset($result)){\n $globalUser->query=$result;\n $globalUser->user_id=\"$value\";\n $globalUser->user_type=\"merchant\";\n \n $this->request->global_user= $globalUser;\n \n return true;\n }\n $result=DB::table('client_data')->where('client_id','=',$value)->first();\n if(isset($result)){\n $globalUser->query=$result;\n $globalUser->user_id=\"$value\";\n $globalUser->user_type=\"client\";\n $this->request->global_user= $globalUser;\n \n \n return true;\n }\n\n return false;\n \n }", "title": "" }, { "docid": "6249a9a5c4f9dd97f737266ce04eb9b6", "score": "0.5758249", "text": "public function userProfileCheck( $meta_key, $field_value ) {\n\n // echo $meta_key;\n // echo ' = '. $field_value;die;\n\n $meta = $this->user->getUserMeta( Auth::user()->id, $meta_key );\n\n if(empty($meta)) {\n if(!empty($field_value)){\n $this->addUserMeta( $meta_key, $field_value );\n }\n } else {\n if(!empty($field_value)){\n $this->updateUserMeta( $meta_key, $field_value );\n } else {\n $this->deleteUserMeta( $meta_key );\n }\n }\n }", "title": "" }, { "docid": "5efabc85ce1a321cfa457240fb957e19", "score": "0.5757625", "text": "function was_set()\n {\n if ($this->status[0] == SET) { return YES; }\n else { return NO; }\n }", "title": "" }, { "docid": "ecace1a36d035eccd834fde8d2712ab6", "score": "0.57565117", "text": "private function _checkUserSet(){\n if(empty($this->user)){\n \\Log::error(\"User not set in _checkUserSet@EloquentCartAdapter\");\n throw new InvalidUserException(\"User not set\", 400);\n }\n \n return true;\n }", "title": "" }, { "docid": "34aac8d50bcd044238ddfa5d9d0754f3", "score": "0.575145", "text": "public function check()\n\t{\n\t\tif(isset($_SESSION['user']))\n\t\t\treturn true;\n\t\t\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "15b157706bb24f2cd7a7cf7b23ff4147", "score": "0.57476467", "text": "function is_set($variable, $value = '') {\n return isset($variable)?$variable:$value;\n}", "title": "" }, { "docid": "04605a516bc33b8090327ef3afafdf82", "score": "0.57248443", "text": "public function validate_user_data()\n {\n return true;\n }", "title": "" }, { "docid": "da983b590746ece25682c09db425ed0d", "score": "0.57158095", "text": "public function IsValueSet() { \n\t\treturn !empty($_FILES[$this->GetName()]['name']);\n\t}", "title": "" }, { "docid": "43323f2370b600333117ecea72d1f7d4", "score": "0.5715436", "text": "public function check(): bool\n {\n return !empty($this->session->get('user'));\n }", "title": "" }, { "docid": "273fadf192b5b52bebb78ee5308dabfa", "score": "0.5714975", "text": "public function is_user_enabled();", "title": "" }, { "docid": "c06e332e478ab6dd01448417eb383eeb", "score": "0.57136285", "text": "function userCheck($user){\n \n $this->dtAcc = new DataAccess();\n \n $this->chkUsr = $this->dtAcc->usrChk($user);\n \n if(!is_null($this->chkUsr)){\n return true; \n }else{\n return false;\n }\n }", "title": "" }, { "docid": "f1e79f41430ff967bf9054a2c52675fc", "score": "0.57130927", "text": "function valueExists($key);", "title": "" }, { "docid": "3c17c6ce6449980f5219ccb7dda7af0b", "score": "0.5705503", "text": "function is_humans(){\n \n if( 1 == get_query_var('humans'))\n return true;\n \n return false;\n}", "title": "" }, { "docid": "91ff9af7b63e1f1ac7a94f0931188669", "score": "0.57004195", "text": "function dni_exist($value)\n\t{\n\t\t$this->load->model('usermeta');\n\t\t$where = array('meta_key' => 'dni', 'meta_value' => $value);\n\t\t\t\t\n\t\t$consulta = $this->usermeta->seleccionar($where);\n\t\t\n\t\tif ($consulta->num_rows() > 0)\t\t\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "bd7c0fcd7b4c3126894ab77ce192cbb9", "score": "0.5698464", "text": "public function hasFlagValue($value);", "title": "" }, { "docid": "c40f95b0b2dcae8d3675e05852fb5e21", "score": "0.568715", "text": "public static function hasUser()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "e89dd991210fedfcd6f5ea0621203a76", "score": "0.56864333", "text": "function is_user_configured($user = null) {\n global $USER;\n\n if (is_null($user)) {\n $user = $USER;\n }\n return (bool)get_user_preferences('message_processor_vk_vkid', null, $user->id);\n }", "title": "" }, { "docid": "2c1a61b452b7969181c432b7706bb1e8", "score": "0.56854224", "text": "public function has($value) : bool;", "title": "" }, { "docid": "94f5fa6ecff1ad9228f645252407a660", "score": "0.56827146", "text": "protected static function uid_is_entered($request = null)\n {\n if ($request == null)\n $request = $_GET;\n self::check_account_parameter_entered('uid', 'no any account exist by this uid ! ', $request);\n }", "title": "" }, { "docid": "355eca3708508130414c6a754935e909", "score": "0.5679587", "text": "public function has($key, $userId = 0): bool\n {\n $setting = $this->get($key, $userId);\n return !empty($setting);\n }", "title": "" }, { "docid": "5f815aef7b6cb065dcb6b6c775c15f42", "score": "0.5676064", "text": "public function setUserConf($field, $value){\n\t\tif(!isset($this->userConf[$field])) return false;\n\t\t$this->userConf[$field] = $value;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "841b335b7a232363a71e224854c7372b", "score": "0.567374", "text": "public function hasUser()\n {\n return ! is_null($this->user);\n }", "title": "" }, { "docid": "adf7fbacfbeaaee47578459103e6fe90", "score": "0.5672346", "text": "public function check_field() { return true; }", "title": "" }, { "docid": "adf7fbacfbeaaee47578459103e6fe90", "score": "0.5672346", "text": "public function check_field() { return true; }", "title": "" }, { "docid": "d07be10cb280fece15d81321f0995b2f", "score": "0.5671479", "text": "public function currentUserHas($attribute)\n {\n return auth()->guest() && $this->getCurrentUserInstance()->{$attribute};\n }", "title": "" }, { "docid": "59b7690eb168e559358d7268232a8630", "score": "0.56600267", "text": "private static function checkValues($input) {\n if (empty($input)) {\n return FALSE;\n }\n \n $result = TRUE;\n foreach ($input as $key => $value) {\n if ($key === \"activated\") {\n $result = $result && $value !== null;\n } else {\n $result = $result && $value !== false;\n }\n }\n \n if (!$result):\n echo \"<p>NAPAKAAAAA - preveri v funkciji checkValues()...</p>\";\n endif;\n \n return $result;\n }", "title": "" }, { "docid": "d3f8ddd23e93f5ed9a7d299add006cab", "score": "0.5653398", "text": "public function test_user_id_equals_current_true() {\n\t\t$field = FrmField::getOne( 'user-id-field' );\n\t\t$entry = FrmEntry::getOne( 'jamie_entry_key', true );\n\t\t$user_id = $entry->metas[ $field->id ];\n\n\t\twp_set_current_user( $user_id );\n\n\t\t$field_value = $user_id;\n\t\t$compare_type = 'equals';\n\t\t$compare_to = 'current';\n\n\t\t$opening_tag = '[if ' . $field->id . ' ' . $compare_type . '=\"' . $compare_to . '\"]';\n\t\t$content = 'Before ' . $opening_tag . 'Show me[/if ' . $field->id . '] After';\n\n\t\t$atts = $this->package_atts_for_jamie_entry( $compare_type, $compare_to, $opening_tag );\n\t\t$tag = $field->id;\n\t\t$args = array( 'field' => $field );\n\n\t\tFrmProContent::check_conditional_shortcode( $content, $field_value, $atts, $tag, 'if', $args );\n\n\t\t$this->assert_conditional_is_true( $content );\n\t}", "title": "" }, { "docid": "5d137612d440cd073783bb869e75c43a", "score": "0.565336", "text": "public function check()\n {\n return null !== $this->user();\n }", "title": "" }, { "docid": "2d34bce8bb233949bbe4e2ba0a43a225", "score": "0.5650037", "text": "function check_value( $value, $default='' ) {\n\t\treturn !isset( $value ) ? $default : $value;\n\t}", "title": "" } ]
fa69a3f494d065b84fe89172e38f498f
Retourne le nombre de pages crawled.
[ { "docid": "404722936e07150dc2f4ed279c396b2b", "score": "0.0", "text": "public function get_nb_crawled()\n\t{\n\t\treturn $this->_nb_crawled;\n\t}", "title": "" } ]
[ { "docid": "e355287dab2b4544d5fc61fb68a0d32d", "score": "0.78443444", "text": "public function getNoOfPages(): int;", "title": "" }, { "docid": "2dae335beecfc8a9367c9ea70e690a8c", "score": "0.7781183", "text": "public function getPageCount(): int;", "title": "" }, { "docid": "1fe0400f126a74bbeffa0fc4b7c697aa", "score": "0.7768676", "text": "function get_count_pages()\r\n {\r\n $page_count = 0;\r\n\r\n $all = $this->elements;\r\n foreach($all as $item)\r\n {\r\n if($item[\"type\"] == QUESTIONARY_NEW_PAGE) $page_count++;\r\n }\r\n return $page_count+1;\r\n }", "title": "" }, { "docid": "d081d44fca4fe1c6ab384fc9957241d6", "score": "0.7649296", "text": "public function getPagesCount()\n {\n $pager = $this->test->byXPath(\"{$this->gridPath}//div[contains(@class,'pagination')]//label[@class='dib'][2]\")\n ->text();\n preg_match('/of\\s+(\\d+)/i', $pager, $result);\n return intval($result[1]);\n }", "title": "" }, { "docid": "494cc3bb2ea3c6fe8e5dd45353e9137d", "score": "0.7562946", "text": "public function pagecount()\n {\n // Pretty easy: Return number of pages in this wiki\n return Page::all()->count();\n }", "title": "" }, { "docid": "38d8fc628e3eeacfbf2f6431cec0bba8", "score": "0.74808717", "text": "private function getPageNumber() {\n\t\t$this->total_pages = ceil($this->total_titles / $this->links_per_site_limit);\n\t}", "title": "" }, { "docid": "4a7d49ba0ce50d2350a8ed2544db44e5", "score": "0.7380324", "text": "protected function getPages()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$total = $this->services->getCrawler()->filter('span.product_total')->text();\r\n\t\t\t$this->pages = (($total - ($total % 200)) / 200) + 1;\r\n\t\t}\r\n\t\tcatch (\\InvalidArgumentException $e) \r\n\t\t{\r\n\t\t\t// if the page node doesn't exist then there's only one page\r\n\t\t\t$this->pages = 1;\r\n\t\t}\r\n\r\n\t\treturn $this->pages;\r\n\t}", "title": "" }, { "docid": "a3362c6fce5176675560e17669f96fb3", "score": "0.73344666", "text": "public function count()\n {\n return $this->getTotalPages();\n }", "title": "" }, { "docid": "c8c6af0a3db7584dc29547ad994695dd", "score": "0.7330573", "text": "private function getNumberOfPages() {\n\t\t$total = $this->postsDAL->getNumberOfRows();\n\t\t$pageNumber = ceil($total/self::$POSTSPERPAGE);\n\t\treturn $pageNumber;\n\t}", "title": "" }, { "docid": "58dc56f11feb68616159a3fb4ad1e4cd", "score": "0.73286384", "text": "public function getNoOfPages() {\n if (isset($_SESSION['noOfPages']))\n $noOfPages = $_SESSION['noOfPages'];\n else\n $noOfPages = 1;\n return $noOfPages;\n }", "title": "" }, { "docid": "2544a98f74e32ea398697a982e6e6e21", "score": "0.731985", "text": "public function getNumberPages()\r\n {\r\n $request = $this->db->prepare('SELECT COUNT(*) AS chaptersNumber FROM chapters');\r\n $request->execute();\r\n return $request->fetchColumn()/5;\r\n }", "title": "" }, { "docid": "f157ba1e342c8b9b4d1c1dac745521af", "score": "0.7307596", "text": "private function getTotalPageCnt()\n\t{\n\t\t// Retrieve total amount of PHP starred repositories\n\t\t$totalRepos = $this->getTotalRepoCnt();\n\n\t\t// Calculate and return total pages of PHP starred repositories\n\t\treturn ceil($totalRepos/$this->reposPerPage);\n\t}", "title": "" }, { "docid": "9074fb17567d81526e21502063aedf71", "score": "0.7303836", "text": "public function getNumberOfPages()\n {\n return (int)$this->getLib()->pcos_get_number($this->handle, 'length:pages');\n }", "title": "" }, { "docid": "cb2ca4e8c4fd96bd88c50f6d8a075b77", "score": "0.730053", "text": "public function getNumPages() {\n\t\treturn $this->wire('templates')->getNumPages($this); \t\n\t}", "title": "" }, { "docid": "770e1468649ad95c1f49002405531a04", "score": "0.7298401", "text": "public function getNumPage()\n {\n return $this->numPage;\n }", "title": "" }, { "docid": "21e06261c79b9126527750b98d18ed73", "score": "0.7279791", "text": "function page_num() {\n\t\tif( isset($_GET[$this->page_param]) ) {\n\t\t\t\n\t\t\t$page_num = $_GET[$this->page_param];\n\t\t\t\n\t\t\tif( $page_num < 1 )\n\t\t\t\t$page_num = 1;\n\t\t}else\n\t\t\t$page_num = 1;\n\t\t\t\n\t\treturn $page_num;\n\t}", "title": "" }, { "docid": "01f8a8a8831ccf66dfc3e113678943bf", "score": "0.7266234", "text": "public function count()\n {\n return $this->totalPages;\n }", "title": "" }, { "docid": "37c97cc5b06df6d3914a92422a22579c", "score": "0.72258943", "text": "public function count()\n {\n if (empty($this->_count)) {\n $response = $this->getClient()->request('GET', $this->pathFor());\n $this->_loadPageMetadata($response);\n }\n return $this->_count;\n }", "title": "" }, { "docid": "e3f26b42e1b749a27c28465fd8625f14", "score": "0.71920514", "text": "function getNumPages(){\n\t\treturn $this->numPages;\n\t}", "title": "" }, { "docid": "a9e59270425d2b866efdc3d3296f7768", "score": "0.7190839", "text": "public function getPageNumber(): int;", "title": "" }, { "docid": "998162eb5f42762ddd73efcecb7b2fc3", "score": "0.71425843", "text": "function getNumberOfPage(){\n $int_nbr_page = $this->int_nbr_row / $this->int_num_result;\n return $int_nbr_page;\n }", "title": "" }, { "docid": "7f16fc90846617518b5353db84a78dcf", "score": "0.7127292", "text": "public function count_pages()\n\t{\n\t\treturn $this->db->count_all('pages');\n\t}", "title": "" }, { "docid": "ee8cdef7fe099e0e6d1865bdb32a55ae", "score": "0.71266294", "text": "function readTotalPages($url){\r\n\r\n $html = file_get_html($url);\r\n foreach ($html->find('div.toolbar') as $toolbar) {\r\n $toolbarData = $toolbar->find('p', 0); //->innertext;\r\n list($prefix, $sufix) = explode('of ', $toolbarData);\r\n $totalProducts = preg_replace('/\\D/', '', $sufix);\r\n break;\r\n }\r\n \r\n $totalPages = ceil(($totalProducts) / per_page_limit) + 1;\r\n //echo $totalPages;exit;\r\n return $totalPages;\r\n \r\n }", "title": "" }, { "docid": "c896695d748548b48e672fe28e6996f8", "score": "0.7114178", "text": "function readTotalPages($url)\r\n{\r\n\r\n $html = file_get_html($url);\r\n foreach ($html->find('div.toolbar') as $toolbar) {\r\n $toolbarData = $toolbar->find('p', 0); //->innertext;\r\n list($prefix, $sufix) = explode('of ', $toolbarData);\r\n $totalProducts = preg_replace('/\\D/', '', $sufix);\r\n break;\r\n }\r\n\r\n $totalPages = ceil(($totalProducts) / per_page_limit) + 1;\r\n //echo $totalPages;exit;\r\n return $totalPages;\r\n}", "title": "" }, { "docid": "a9b3cf37b0f7ee5e799a9bee7ce16cdd", "score": "0.7097602", "text": "public function getPageNumber(): int\n {\n return $this->number ?: 1;\n }", "title": "" }, { "docid": "47636a3e70893b6c137e9b078c4b4378", "score": "0.70486665", "text": "public function getNumberPage(){\n\t\treturn ceil((int)count($this->data) / (int)$this->getPerpage());\n\t}", "title": "" }, { "docid": "5f57c805ffbd2a78308ebffa7a61580d", "score": "0.7045649", "text": "private static function getTotalOfPages()\n {\n return self::$total_of_pages;\n }", "title": "" }, { "docid": "5134e1887b9b00286bf84f4fc2a629b9", "score": "0.7045486", "text": "public function numPages()\n {\n return $this->_totalPages;\n }", "title": "" }, { "docid": "e02b86e555ebdd496f7962a41151300e", "score": "0.70419174", "text": "private function _getNumPages()\n {\n $numItems = count($this->_pictures);\n $numPages = floor($numItems / MAX_ITEMS_PER_PAGE);\n\n if (MAX_ITEMS_PER_PAGE * $numPages < $numItems) {\n $numPages++;\n }\n\n return $numPages;\n }", "title": "" }, { "docid": "a0313b74a8b42cae9a59c92a2e3a9b7c", "score": "0.7030342", "text": "function getPagesCounter() {\r\n\t\t$txt = '';\r\n\t\t$from_result = $this->limitstart+1;\r\n\t\tif ($this->limitstart + $this->limit < $this->total) {\r\n\t\t\t$to_result = $this->limitstart + $this->limit;\r\n\t\t} else {\r\n\t\t\t$to_result = $this->total;\r\n\t\t}\r\n\t\tif ($this->total > 0) {\r\n\t\t\t$txt .= '<span class=\"hwdpsNav\">';\r\n\t\t\t$txt .= _HWDPS_PHOTOS.\" \".$from_result.\" - \".$to_result.\" \"._HWDPS_OUTOF.\" \".$this->total;\r\n\t\t\t$txt .= '</span> ';\r\n\t\t}\r\n\t\treturn $to_result ? $txt : '';\r\n\t}", "title": "" }, { "docid": "2cd64104910402bfda25ad783dc9bef4", "score": "0.7019237", "text": "public function pages()\n {\n if (! is_null($this->pages)) {\n return $this->pages;\n }\n if (! $this->size()) {\n return $this->pages = 1;\n }\n return $this->pages = (int) ceil($this->count() / $this->size());\n }", "title": "" }, { "docid": "d67ee38585702e2ae038b7eb2136ac3a", "score": "0.7018759", "text": "function pageCount( )\r\n {\r\n return $this->PageCount;\r\n }", "title": "" }, { "docid": "a84f1a432c9754bdfd578716097819d5", "score": "0.7000752", "text": "public function paginationCount()\r\n\t{\r\n\t\treturn $this->paginationnbpage;\r\n\t}", "title": "" }, { "docid": "95b4187e5133959d69a07e2c6fbd3962", "score": "0.69988596", "text": "public function numPages()\n {\n if ($this->numPage) {\n $this->numPage;\n };\n\n $entries = $this->entries();\n $count = count($entries);\n\n if ($this->numPerPage()) {\n $this->numPage = ceil($count / $this->numPerPage());\n } else {\n $this->numPage = 1;\n }\n\n return $this->numPage;\n }", "title": "" }, { "docid": "9cddad2c2db82254b21e93577ff47f62", "score": "0.696174", "text": "public function getPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "9cddad2c2db82254b21e93577ff47f62", "score": "0.696174", "text": "public function getPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "4c5d92b6d9deeefb7f7b68e57b877eeb", "score": "0.6957948", "text": "public function countPages()\n {\n return ceil($this->count() / $this->getPageSize());\n }", "title": "" }, { "docid": "eb25e5cdf5c2d865070449d194bbfbe7", "score": "0.69471174", "text": "function getPage()\r\n\t{\r\n\t\treturn $this->_pageCounter;\r\n\t}", "title": "" }, { "docid": "95af963fc5a0fc5457a7dd9290efee7d", "score": "0.6941911", "text": "static private function countPage() {\n\n $page = Tht::module('Request')->u_get_url()->u_get_path();\n\n $page = preg_replace('#/+#', '__', $page);\n $page = preg_replace('/[^a-zA-Z0-9_\\-]+/', '_', $page);\n $page = trim($page, '_') ?: 'home';\n\n self::appendFile('page', $page, '+');\n }", "title": "" }, { "docid": "5b229ccbbcd6b31da28a9b4949cf34a5", "score": "0.6906004", "text": "public function get_pages() {\n return AccountUtil::session(function ($id) {\n return Status::$success .\n (intval(intval(Db::table(DbTable::$train)->count())/TrainUtil::$length) + 1);\n }, true);\n }", "title": "" }, { "docid": "0de6bce386edd9f5b653a3b4b3442893", "score": "0.68938464", "text": "private function getPageNumber()\n {\n return (int) $this->getCurrentParam(self::FILTER_PARAM_PAGE, 1);\n }", "title": "" }, { "docid": "31cbf96230a958d74ea1b8b9cd5891c8", "score": "0.68763", "text": "public function getPageNumber(): int\n {\n return $this->pageNumber;\n }", "title": "" }, { "docid": "a95b225c8f5cd6c97db9f686fec20040", "score": "0.68429327", "text": "public function getTotalPages();", "title": "" }, { "docid": "395f58e9fe3ed7c1f581c77c94debf66", "score": "0.68045", "text": "public function getUrlsCrawledCount()\n {\n return $this->urls_crawled_count;\n }", "title": "" }, { "docid": "30f5051f231fb616d419f0c6a3feff3d", "score": "0.68027633", "text": "private function getPageNr() {\n\t\tif (isset($_GET[self::$PAGENR])) {\n\t\t\treturn $_GET[self::$PAGENR];\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "2ba4538ae3e2ca6894186736fa2e4e0b", "score": "0.68019944", "text": "public function nbPageComment()\n {\n $bdd = $this->dbConnect();\n $reqPage = $bdd->query('SELECT COUNT(*) AS total FROM post WHERE idPost');\n $result = $reqPage->fetch();\n $total = $result['total'];\n $nbPage = ceil($total / $this->perPage);\n\n return $nbPage;\n }", "title": "" }, { "docid": "cc8d1db1e568481edf1712f49f651bd5", "score": "0.6799061", "text": "public function get_page_count()\n\t{\n\t\treturn $this->_page_count;\n\t}", "title": "" }, { "docid": "38e86c1242acf6ff0b86d78361cf53b2", "score": "0.6788306", "text": "public function getPageCount(): int\n {\n return $this->pageCount = (int)ceil($this->totalItems / $this->itemsPerPage);\n }", "title": "" }, { "docid": "ce25cce1e173582c375d21d506de20dd", "score": "0.6781045", "text": "public function get_page_count(){\n\t\t\tglobal $connect;\n\t\t\tglobal $database_name;\n\n\t\t\tmysql_select_db($database_name,$connect);\n\n\t\t\t$sql = \"SELECT * FROM pages WHERE uID = '$this->user_id'\";\t\n\t\t\t$result = mysql_query($sql,$connect) or die(mysql_error());\n\n\t\t\t$this->number_of_pages = mysql_num_rows($result) or die(mysql_error());\t\t\n\t\t}", "title": "" }, { "docid": "572a0e4cfd6015e589e657c991273c29", "score": "0.6772301", "text": "public function getNumPages()\n {\n if ($this->_numPages == NULL)\n {\n $this->setNumPages();\n }\n\n return $this->_numPages;\n }", "title": "" }, { "docid": "ef1a011dcf30530802cdd88665a8f63c", "score": "0.6763732", "text": "public function getActualPage(): int;", "title": "" }, { "docid": "1ae4939e337a933a55a69ff6c81f625a", "score": "0.6758523", "text": "public function getPagesCount()\n {\n return $this->getQuery()->max_num_pages;\n }", "title": "" }, { "docid": "31966ed27e6925d1ffdd0d08285486d5", "score": "0.6742544", "text": "function get_total_pages ()\r\n {\r\n return $this->total_pages;\r\n }", "title": "" }, { "docid": "6c66aac8fc62b12ea27e2dc17ecb9196", "score": "0.67395514", "text": "public function getCurrentPageNumber(): int;", "title": "" }, { "docid": "95153e2a983c02d2f1460577a8ef6107", "score": "0.6737412", "text": "function pageNumber() {\n\t\tif ( $this->option != 'com_content' ) return null;\n\t\tif ( $this->view == 'article' ) {\n\t\t\treturn JRequest::getInt( 'limitstart', 0 );\n\t\t}\n\t\t$limitstart = JRequest::getInt( 'limitstart', 0 );\n\t\t$limit = JRequest::getInt( 'limit', 0 ); // provided by Joomla, not in the URL itself. # items per page.\n\t\tif ( $limit == 0 ) return 0; // we're not on a paginated page?\n\t\treturn (int)( $limit / $limitstart );\n\t}", "title": "" }, { "docid": "1066780f59bd07c90f52945ad9b9610f", "score": "0.6735658", "text": "private function _calculate_pages_count()\n\t{\n\t\treturn (int)ceil($this->model->get_count() / \\core\\App::$config['tasks_count_per_page']);\n\t}", "title": "" }, { "docid": "b97bd4bfa0e18e6d00200d642e3b048b", "score": "0.6721306", "text": "public function wordcount()\n {\n // Calculates a wordcount for the whole wiki\n // Could do it nicer, but seriously, nobody\n // needs such exact amounts\n $count = 0;\n\n $pages = Page::all();\n\n foreach($pages as $page)\n {\n $cntwords = explode(' ', $page->content);\n $count += count($cntwords);\n }\n\n return $count;\n }", "title": "" }, { "docid": "88201ffc177045a6781b341d99db52b1", "score": "0.6716205", "text": "public function totalpages() {\n\t\treturn $this->totalpages;\n\t}", "title": "" }, { "docid": "9c1e760c8efe6520dac85498c1c5384e", "score": "0.67118376", "text": "function pages() {\r\n return $GLOBALS['have_items']['pages'];\r\n }", "title": "" }, { "docid": "a1baf80fc7f849320b5e25a6661cb82e", "score": "0.67009866", "text": "public function getNbpage()\n {\n return $this->nbpage;\n }", "title": "" }, { "docid": "a4cdc2eec2d1e6cc83750bf4e8cc0642", "score": "0.6695704", "text": "public function getPagesNumber()\n\t{\n\t\treturn $this->pagesNumber;\n\t}", "title": "" }, { "docid": "e1ea925de6542ec642f744bbafd118d8", "score": "0.6685962", "text": "function count_pages($pdf_path) {\n\t$cmd=PLUGIN_PATH.'/ebookconvert/libs/pdfinfo '.$pdf_path;\n\texec($cmd, $cmd_ret, $retCode);\n\tforeach($cmd_ret as $_k => $_v){\n\t if(strpos ($_v,\"Pages:\") !== false){\n\t $Pages = ltrim(str_replace (\"Pages:\", \"\",$_v));\n\t }\n\t}\n\treturn $Pages;\n\t/*\n $count=0;\n if(preg_match_all(\"\\/Type\\s\\/Pages[\\r\\n\\s\\w\\d\\/\\[\\]]+\\/Count\\s+(\\d+)\", $contents, $capture)){\n foreach($capture as $c) {\n if(intval($c[0]) > $count)\n $count = intval($c[0]);\n }\n return $count; \n }\n return 0;\n */\n}", "title": "" }, { "docid": "8d4eea658f11a2648eaebe3919f0eadc", "score": "0.66824126", "text": "public function countPages(): int\n {\n return ceil($this->count() / $this->getItemsPerPage());\n }", "title": "" }, { "docid": "5c0251d7bbb9f3222b62a60094ca8f34", "score": "0.6672508", "text": "private function getPage()\r\n\t\t\t {\r\n\t\t\t $var = filter_input( INPUT_GET, $this->get, FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t $var = $var > $this->getTotalPages() ? $this->getTotalPages() : $var;\r\n\t\t\t return $this->currentPage = ( !isset( $var ) || $var == null ) ? 1 : $var;\r\n\t\t\t }", "title": "" }, { "docid": "22c671c3617c7e2daccb5fa5e48ab1af", "score": "0.66703147", "text": "public function page()\n {\n if (! is_null($this->page)) {\n return $this->page;\n }\n if (! $this->size()) {\n return 1;\n }\n return $this->page = (int) floor($this->skip() / $this->size()) + 1;\n }", "title": "" }, { "docid": "9d905c95c72e19b87e3b4233e19273ba", "score": "0.66484964", "text": "public function countPages()\n {\n return ceil(count($this)/$this->_recordsPerPage);\n }", "title": "" }, { "docid": "8b5fe795e44ab0e921044d7b09e22751", "score": "0.6647382", "text": "public function getPagesNb()\n {\n return $this->pages_nb;\n }", "title": "" }, { "docid": "789597ec8c778d85e81914caf59446e5", "score": "0.66391635", "text": "public function getPageNumber()\n\t{\n\t\treturn $this->page_number;\n\t}", "title": "" }, { "docid": "7e272f262fcb92f0d844d2074a977a2c", "score": "0.6618973", "text": "private function calculatePagesNumber()\n {\n $qb = clone $this->queryBuilder;\n \n $sql = $qb->getSQL();\n $sqlParts = array_keys($qb->getQueryParts());\n $qb->resetQueryParts($sqlParts);\n $qb->select('COUNT(*) as nb')->from('('.$sql.')', 'T');\n\n $datas = $qb->execute()->fetch(\\PDO::FETCH_ASSOC);\n $this->lines_nb = $datas['nb'];\n\n $this->pages_nb = ceil($this->lines_nb/$this->results_per_page);\n }", "title": "" }, { "docid": "f31297bd7f84103506fa70072303c368", "score": "0.66032195", "text": "function getPageNumber( $segments ) {\n\tglobal $mtconf;\n\t\n\t$pagepattern = '/' . $mtconf->get('sef_category_page') . \"[0-9]+/\";\n\t$pagenumber = 0;\n\tif ( preg_match($pagepattern,end($segments)) ) {\n\t\t// Get the page number\n\t\t$pagenumber = substr( end($segments), strlen($mtconf->get('sef_category_page')));\n\t}\n\treturn $pagenumber;\n}", "title": "" }, { "docid": "983057985c0bf8597e1a0e03af605da4", "score": "0.6589427", "text": "public function nbr_pages($pdf){\n if (false != ($fichier = file_get_contents($pdf))){\n $pages = preg_match_all( \"/\\/Page\\W/\", $fichier, $matches );\n return $pages;\n }\n}", "title": "" }, { "docid": "57fd7d92c868463a09a017a8bdcc11a6", "score": "0.65877897", "text": "public function getPageCount($url)\n {\n $page = json_decode(file_get_contents($url));\n \t$page = $page->count;\n \t$page = $page/250;\n \t$page = ceil($page);\n \t$page = number_format ($page);\n \treturn $page;\n }", "title": "" }, { "docid": "2f2b378696a3918f2561a060b9d9064a", "score": "0.6578122", "text": "public function pageCount()\n {\n return ceil($this->total()/$this->perPage());\n }", "title": "" }, { "docid": "0a91323b2082fd17c6aff627fdbc72f1", "score": "0.65705496", "text": "private function getPageNumber() {\n return $this->_getParam(\"pagenumber\", 1);\n }", "title": "" }, { "docid": "105654103bdc178be8e2be524796b9a2", "score": "0.6568798", "text": "public function total_pages(){\n return ceil($this->total_count / $this->per_page);\n }", "title": "" }, { "docid": "639530bf78fb642ce0ce25a2be1a2fce", "score": "0.6566374", "text": "private function get_links_count()\n {\n $count = 0;\n foreach ($this->links as $key => $value) {\n $count++;\n }\n return $count;\n }", "title": "" }, { "docid": "8874d351292e61e1625196a941bc7b68", "score": "0.6550895", "text": "final public function currentCount()\n {\n return count($this->links);\n }", "title": "" }, { "docid": "c01a6f8bf5e335866d7d0074640b1ff8", "score": "0.6542977", "text": "public function nbPagemail()\n {\n $bdd = $this->dbConnect();\n $reqPage = $bdd->query('SELECT COUNT(*) AS total FROM contact WHERE idContact');\n $result = $reqPage->fetch();\n $total = $result['total'];\n $nbPage = ceil($total / $this->perPage);\n\n return $nbPage;\n }", "title": "" }, { "docid": "bc3de89433c7b74e9f4234e9f5f0d37f", "score": "0.6536321", "text": "public function getTotalPages()\n {\n return $this->rows_total > 0 ? ceil($this->rows_total / $this->rows) : 1;\n }", "title": "" }, { "docid": "8e200bc622217d4f0eb53c3ccad5d490", "score": "0.65310055", "text": "private function getTotalPages() {\r\n\t\t$totalPages = ceil($this->totalItems / $this->itemsPerPage);\r\n\t\treturn $totalPages; \r\n }", "title": "" }, { "docid": "9ca34d8bf74363fa5384eaed22ba950a", "score": "0.6530149", "text": "public function getPageNumber()\r\n {\r\n return $this->pageNumber;\r\n }", "title": "" }, { "docid": "b8a82130c2c43e45a1f32a4043355dff", "score": "0.65268683", "text": "public function getNumPaginations() {\n\t\treturn $this->numPaginations;\n\t}", "title": "" }, { "docid": "0c5f358960cd932e8942c4405654efeb", "score": "0.65173614", "text": "public function count()\n {\n if (!$this->_pageCount) {\n $this->_pageCount = $this->_calculatePageCount();\n }\n\n return $this->_pageCount;\n }", "title": "" }, { "docid": "1d7c6be91b29b1ba8ec20282e987f210", "score": "0.65097076", "text": "public function getDistinctPageCount()\n {\n $db = Util::getDB();\n\n $sql = \"SELECT count(*) as total\n FROM (\n SELECT id\n FROM scanned_page\n WHERE scanned_page.scans_id = \" . (int)$this->id . \"\n GROUP BY uri_hash\n ) sq \";\n\n if (!$result = $db->query($sql)) {\n return false;\n }\n\n if (!$data = $result->fetch_assoc()) {\n return false;\n }\n\n return (int)$data['total'];\n }", "title": "" }, { "docid": "ac624226936897f8984cabe975f9a40d", "score": "0.65030444", "text": "public function getPageNumber(){\n return $this->pageNumber;\n }", "title": "" }, { "docid": "3675ea5cc62bd28c1c0b316218d650db", "score": "0.6471611", "text": "function bbp_forum_pagination_count() {\n\techo bbp_get_forum_pagination_count();\n}", "title": "" }, { "docid": "08ba8ce9982ecc8d32d60cf3bcfd6699", "score": "0.6468496", "text": "public function getImagePageCount()\n {\n return 1;\n }", "title": "" }, { "docid": "f228df100220eda3e517970f321b16da", "score": "0.6467978", "text": "function getPageCounter() {\r\n\t\t$txt = '';\r\n\t\t$from_result = $this->limitstart+1;\r\n\t\tif ($this->limitstart + $this->limit < $this->total) {\r\n\t\t\t$to_result = $this->limitstart + $this->limit;\r\n\t\t} else {\r\n\t\t\t$to_result = $this->total;\r\n\t\t}\r\n\t\tif ($from_result == $to_result) {\r\n\t\t\tif ($this->total > 0) {\r\n\t\t\t\t$txt .= '<span class=\"hwdpsNav\">';\r\n\t\t\t\t$txt .= _HWDPS_PHOTO.\" \".$from_result.\" \"._HWDPS_OUTOF.\" \".$this->total;\r\n\t\t\t\t$txt .= '</span> ';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($this->total > 0) {\r\n\t\t\t\t$txt .= '<span class=\"hwdpsNav\">';\r\n\t\t\t\t$txt .= _HWDPS_PHOTOS.\" \".$from_result.\" - \".$to_result.\" \"._HWDPS_OUTOF.\" \".$this->total;\r\n\t\t\t\t$txt .= '</span> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $to_result ? $txt : '';\r\n\t}", "title": "" }, { "docid": "01ba73189bba39e1d2317c3358b572ce", "score": "0.6449833", "text": "public function usedPages()\n {\n return $this->pages->reduce(function($memo, $page) {\n $start = $page->start_number;\n $end = $page->end_number ? $page->end_number : $page->start_number;\n return $memo + ($end - $start + 1);\n }, 0);\n }", "title": "" }, { "docid": "ee6d6af26c8b481f2c5bceb3ab738f40", "score": "0.64438665", "text": "public function getLastPage(): int\n {\n return $this->count == 0 ? 1 : (int) ceil($this->count / $this->maxPerPage);\n }", "title": "" }, { "docid": "3cc57cc905cee37cbad3c9a6c67fbf18", "score": "0.6442466", "text": "protected function p_getPages()\n {\n return ceil($this->getCount() / $this->options['per_page']);\n }", "title": "" }, { "docid": "fcc7a4941964c5bb24b64dfc4217d410", "score": "0.64267576", "text": "public function getNumRowsPage()\n {\n return $this->numRowsPage;\n }", "title": "" }, { "docid": "e1271c9094b92d052b0c02f8517aa47d", "score": "0.64109236", "text": "public static function getPage() : Int\n {\n /* Check page number */\n if (isset($_GET['page'])) {\n $page = $_GET['page'];\n } else {\n $page = 1;\n }\n\n /* Check integer for page number */\n if (!is_numeric($page)) $page = 1;\n return $page;\n }", "title": "" }, { "docid": "b07f3587a96c884a15333a55d47cb599", "score": "0.6404485", "text": "public function getNumFound() {}", "title": "" }, { "docid": "b3266296da004859d7b25bda3127c3ae", "score": "0.6396463", "text": "public function getNumberOfPages()\n {\n if (array_key_exists(\"numberOfPages\", $this->_propDict)) {\n return $this->_propDict[\"numberOfPages\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b78524b75cfeaf7c718f9af2f6ba79c9", "score": "0.63960797", "text": "function getTotalPages()\r\n\t{\r\n\t\tif($this->extra_page_num)\r\n\t\t{\r\n\t\t\t$this->total_pages = $this->base_page_num + 1;\r\n\t\t} else {\r\n\t\t\t$this->total_pages = $this->base_page_num;\r\n\t\t}\r\n\t\treturn $this->total_pages;\r\n\t}", "title": "" }, { "docid": "ccf85406bc86390bc4066287ec6f1536", "score": "0.63934517", "text": "public function getPagesCount()\n {\n return ceil( $this->rowsCount / $this->pageSize );\n }", "title": "" }, { "docid": "1a248cacd775cf166c82cc20f56b7d73", "score": "0.6388714", "text": "public function getPageCount()\n\t{\n\t\tif($this->allRecords)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t$maxPages = (int)floor($this->recordCount/$this->pageSize);\n\t\tif($this->recordCount > 0 && $maxPages == 0)\n\t\t{\n\t\t\t$maxPages = 1;\n\t\t}\n\t\treturn $maxPages;\n\t}", "title": "" }, { "docid": "e5e37f32fcc067dda7bb30b85fa78f6e", "score": "0.63863826", "text": "public function getNumFound () {\n \treturn $this->numFound;\n }", "title": "" }, { "docid": "796df607356082defe8084c77ebca119", "score": "0.63617057", "text": "public function getPagesCount()\n {\n $pages = ceil($this->_getProductsCount()/$this->_productsPerPage());\n return $pages;\n }", "title": "" }, { "docid": "66b4fe2a6e33e44856ed5f971524b452", "score": "0.63534075", "text": "public function getCurrentPageNumber()\n {\n return intval($this->test->byXPath(\"{$this->gridPath}//div[contains(@class,'pagination')]/ul//input\")->value());\n }", "title": "" } ]
7985af242097f70e8c2998b570389b9b
Update given employee term.
[ { "docid": "ce7a10b5ae97fd24c530059add1c174b", "score": "0.6131764", "text": "public function update(EmployeeTerm $employee_term, $params)\n {\n $is_leaving = gbv($params, 'is_leaving');\n\n if ($is_leaving) {\n $date_of_leaving = gv($params, 'date_of_leaving');\n $leaving_remarks = gv($params, 'leaving_remarks');\n\n if ($date_of_leaving <= $employee_term->date_of_joining) {\n throw ValidationException::withMessages(['date_of_leaving' => trans('employee.date_of_leaving_lesser_than_date_of_joining')]);\n }\n\n $last_designation = $employee_term->EmployeeDesignations->sortByDesc('date_effective')->first();\n\n if ($last_designation && $date_of_leaving <= $last_designation->date_effective) {\n throw ValidationException::withMessages(['date_of_leaving' => trans('employee.date_of_leaving_lesser_than_last_designation_date', ['date' => showDate($last_designation->date_effective)]) ]);\n }\n\n $employee_term->date_of_leaving = $date_of_leaving;\n $employee_term->leaving_remarks = $leaving_remarks;\n $employee_term->save();\n\n $last_employee_designation = $employee_term->EmployeeDesignations->last();\n\n if ($last_employee_designation) {\n $last_employee_designation->date_end = $date_of_leaving;\n $last_employee_designation->save();\n }\n } else {\n $employee_term->date_of_leaving = null;\n $employee_term->leaving_remarks = null;\n $employee_term->save();\n\n $last_employee_designation = $employee_term->EmployeeDesignations->last();\n\n if ($last_employee_designation) {\n $last_employee_designation->date_end = null;\n $last_employee_designation->save();\n }\n }\n \n $this->processUpload($employee_term, $params, 'update');\n\n return $employee_term;\n }", "title": "" } ]
[ { "docid": "ba26da82686cd11a5d5a7334e27f07db", "score": "0.66439515", "text": "abstract public function update( int $term_id );", "title": "" }, { "docid": "6d34b9f8839a9ec63fe3e2e87760af01", "score": "0.6624575", "text": "public function update($emp);", "title": "" }, { "docid": "af63a09ae23a009277b4bf0f5e5d4a19", "score": "0.6287217", "text": "public function term_update($args = []) {\n \n }", "title": "" }, { "docid": "8a9323763fadc3af7dce68f1a91f7420", "score": "0.6132331", "text": "public function testUpdateAnEmployee()\n {\n $employee = factory(Employee::class)->create();\n\n // We create one new employee on memory\n $employeeModified = factory(Employee::class)->make()->toArray();\n $employeeModified[ 'password' ] = 'teste123';\n $employeeModified[ 'password_confirmation' ] = 'teste123';\n\n // When we edit this employee\n $uri = $this->endpoint.$employee->id;\n $response = $this->json('PUT', $uri, $employeeModified);\n\n // And find the employee edited in the database\n $findedEmployee = Employee::find($employee->id)->toArray();\n\n // It should return this valid json employee, with the full_name changed\n $response\n ->assertStatus(200)\n ->assertJsonFragment($findedEmployee);\n }", "title": "" }, { "docid": "ab629bb68c8c03c4e3045900adc2dcd4", "score": "0.6084547", "text": "public function update(Request $request, Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "ab629bb68c8c03c4e3045900adc2dcd4", "score": "0.6084547", "text": "public function update(Request $request, Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "ab629bb68c8c03c4e3045900adc2dcd4", "score": "0.6084547", "text": "public function update(Request $request, Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "ab629bb68c8c03c4e3045900adc2dcd4", "score": "0.6084547", "text": "public function update(Request $request, Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "ab629bb68c8c03c4e3045900adc2dcd4", "score": "0.6084547", "text": "public function update(Request $request, Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "4ea162bfe132e96aaf2cd09863b9ce5b", "score": "0.60760933", "text": "public function updateTerm($term,$description=\"\") {\n $term = ($term instanceof Term) ? $term : Term::findOrFail($term);\n\n if(!$term)\n return;\n\n if( !$this->related() )\n return;\n\n $this->related()->where('term_id',$term->id)->update(['description' => $description]);\n }", "title": "" }, { "docid": "b8ce054f45b0c7a64ffcecb34647fef7", "score": "0.60555786", "text": "public function update(UpdateEmployee $request, Employees $employee)\n {\n\n $employee->update($request->all());\n }", "title": "" }, { "docid": "30b12c16f6251486d22dcbb9dc663190", "score": "0.6021983", "text": "public function update(Request $request, employe_acc $employe_acc)\n {\n //\n }", "title": "" }, { "docid": "508a22610c06d2ac47c211ec4f5cfc04", "score": "0.59224117", "text": "public function update_term($term_id, $tt_id, $taxonomy)\n {\n }", "title": "" }, { "docid": "daccd3e60853ceaea9f34ffbea2ddd23", "score": "0.59105945", "text": "public function edit(employee $employee)\n {\n //\n }", "title": "" }, { "docid": "e59dcb3f6d1b27921f233ba7b22e7e1a", "score": "0.5900501", "text": "function updateEmploymentInfo($employmentInfoObj);", "title": "" }, { "docid": "959e342e4b5ce2e28e97edda7e82d3ed", "score": "0.58846104", "text": "public function update(\\Cloudframe\\Leavemanagement\\Domain\\Model\\Employee $employee) {\n\t\t$this->employeeRepository->update($employee);\n\t}", "title": "" }, { "docid": "176a5203b092ee2291ca5798b152f373", "score": "0.586235", "text": "public function updated(EmployeePaidSalary $employeePaidSalary)\n {\n //\n }", "title": "" }, { "docid": "61ebc0af19d36072501787dcc3407776", "score": "0.5834008", "text": "public function update(Request $request, $employee)\n {\n //\n\n $this->validateEmployeeInput($request);\n\n\n \n\n $employeeOdj = Employee::find($employee);\n\n $employeeOdj->name=$request->name;\n $employeeOdj->email=$request->email;\n $employeeOdj->phone=$request->phone;\n $employeeOdj->role=$this->employeeRoles[$request->role];\n\n if($request->password)\n {\n $this->validate($request,['password'=>'required|min:6',]);\n $employeeOdj->password=bcrypt($request->password);\n }\n\n $employeeOdj->update();\n\n\n return redirect()->back();\n\n\n }", "title": "" }, { "docid": "0f962bf11e0369d5af4269d01a33a4b2", "score": "0.58151186", "text": "public function update(Request $request, User $employee)\n {\n //\n }", "title": "" }, { "docid": "b30a0b0c87022a81f40bb78759a0ff0b", "score": "0.57892454", "text": "public function update(Request $request, Employee $employee)\n {\n //\n $employee->update($request->all());\n return redirect()->route('employees.index')->with('status', 'Data pegawai berhasil di edit!');\n }", "title": "" }, { "docid": "cdd01dcc43f19a631abf9df4da3117a2", "score": "0.57872146", "text": "public function update(Request $request, Employee $employee)\n {\n $request->validate([\n 'nama' => 'required',\n 'nip' => 'required|size:9',\n 'email' => 'required',\n 'jabatan' => 'required'\n ]);\n\n Employee::where('id', $employee->id)\n ->update([\n 'nama' => $request->nama,\n 'nip' => $request->nip,\n 'email' => $request->email,\n 'jabatan' => $request->jabatan,\n\n ]);\n return redirect('/employees')->with('status', 'employee data updated successfully');\n }", "title": "" }, { "docid": "fd931c0b152000fecbd06dcafc3e51ed", "score": "0.5776938", "text": "public function update(Request $request, Employee $employee)\n {\n $this->authorize('update', $employee);\n $request->validate([\n 'first_name' => 'required|string',\n 'last_name' => 'required|string',\n ]);\n $employeeToUpdate = new Employee();\n $employeeToUpdate->updateEmployee($request, $employee);\n return redirect('/companies'.'/'.$employee->company_id);\n }", "title": "" }, { "docid": "842e20c97a99af2058d4aa92eedfb7e2", "score": "0.57413775", "text": "public function update(Request $request, Employee $employee)\n {\n $request->validate([\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => 'required|email',\n 'phone' => 'required|min:11|numeric',\n ]);\n \n $employee->update($request->only('first_name','last_name','email','phone','company_id'));\n return redirect()->back()->with('success',\"Employee's details has been updated\");\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.57310116", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.57310116", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.57310116", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.57310116", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "9541792b22424b2d3119d3db9c0b16c7", "score": "0.57242584", "text": "public function update(Request $request, Employee $employee)\n {\n $attr = $request->all();\n\n $employee->update($attr);\n\n return redirect()\n ->route('employee.index');\n }", "title": "" }, { "docid": "08b080c6ab57f3116e67b7a4f78e235f", "score": "0.5722871", "text": "public function update(Employee $employee)\n {\n $employee->update([\n 'name' => request('employeeNameInput'),\n 'surname' => request('employeeSurnameInput'),\n 'phone' => request('phone'),\n 'email' => request('email'),\n 'department_id' => request('department'),\n 'status' => request('status'),\n ]);\n return redirect('/employees');\n }", "title": "" }, { "docid": "b17fc12fbb1e27920cbe514eff00b3f0", "score": "0.57033986", "text": "public function update(Request $request, $employee)\n {\n $this->validate($request, [\n 'name'=> 'string|required|max:50',\n 'radioGender' => 'required',\n 'password' => 'string|required|min:8|max:8'\n ]);\n $data = DB::table('employees')->where(\"idPegawai\", $employee);\n try {\n $data->update([\n 'name' => $request->name,\n 'isAdmin' => \"0\",\n 'password' => $request->password,\n 'gender' => $request->radioGender,\n ]);\n return redirect()->intended('/employee');\n }catch (\\Exception $e){\n Session::flash('error', $e);\n return redirect()->intended('/employee');\n }\n\n }", "title": "" }, { "docid": "2402408c9a01d20368e92c83f1500d7b", "score": "0.5702924", "text": "public function updateEmployee(Request $request){\n \n DB::table('employees')->where('id','=',$request->emp_id) \n ->update(['fname'=>$request->fname,\n 'lname'=>$request->lname,\n 'age'=>$request->age,\n 'email'=>$request->email,\n 'contact'=>$request->contact]);\n return redirect()->back()->with('success', 'Employee Details Updated!');\n \n }", "title": "" }, { "docid": "aa96b75fb75d5d701d6414edc4c46214", "score": "0.5672756", "text": "public function setTerm($newTerm)\n\t{\n\t\t$this->term = $newTerm;\n\t}", "title": "" }, { "docid": "d5a21778a8c662cdd6a5603be7dfb623", "score": "0.5654013", "text": "public function update(Request $request, $id)\n {\n \n $emp= Employee::find($id);\n $emp->branch = $request->input('branch') ;\n $emp->firstName = $request->input('firstName') ;\n $emp->secondName = $request->input('secondName') ;\n $emp->age = $request->input('age') ;\n $emp->speciality = $request->input('speciality') ;\n $emp->save() ;\n \n return redirect('/ems') ;\n }", "title": "" }, { "docid": "932a69e0f853c25977baed1b2225e300", "score": "0.562886", "text": "public function update(EmployeeRequest $request, $id)\n {\n // update\n /*Resource::find($id) THIS FAILS ON SAVING CHECKBOX STATE\n ->fill($request->all())\n ->save();*/\n $employees = Employee::find($id);\n $employees->number = $request->number;\n $employees->first_name = ucfirst($request->first_name);\n $employees->last_name = ucfirst($request->last_name);\n $employees->full_name = $employees->first_name . ' ' . $employees->last_name;\n $employees->short_name = $employees->first_name . ' ' . substr($employees->last_name,0,1 ) . '.';\n $employees->title = $request->title;\n $employees->billing_rate = $request->billing_rate;\n $employees->schedule = $request->schedule;\n $employees->active = $request->active;\n $employees->driver = $request->driver;\n $employees->save();\n if (config('workorder_settings.emptolup')==1){\n $ret=1;\n $this->forceLUTupdate($ret);\n }\n\n // redirect\n return redirect()->route('employees.index')->with('alertSuccess', trans('Workorders::texts.edit_employee_success'));\n }", "title": "" }, { "docid": "8654ddbb85b21e776ccb17c684037357", "score": "0.5615522", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'sy' => 'required',\n 'semester' => 'required'\n ]);\n\n $acad_term_id = substr($request->input('sy'), 2, 2) . substr($request->input('sy'), 7, 7) . $request->input('semester');\n\n // Update Acad Term\n $acadTerm = AcadTerm::find($id);\n $acadTerm->acad_term_id = $acad_term_id;\n $acadTerm->sy = $request->input('sy');\n $acadTerm->semester = $request->input('semester');\n\n if($request->input('prelims_start_date') != null) {\n $prelims_start_date = date(\"Y-m-d\", strtotime($request->input('prelims_start_date')));\n $prelims_end_date = date(\"Y-m-d\", strtotime($request->input('prelims_end_date')));\n\n if($acadTerm->prelims_id == null) {\n $event = new Event;\n } else {\n $event = Event::find($acadTerm->prelims_id);\n }\n\n $event->title = 'Prelims Examination';\n $event->start_date = $prelims_start_date;\n $event->end_date = $prelims_end_date;\n $event->save();\n\n $acadTerm->prelims_id = $event->event_id;\n }\n else if ($acadTerm->prelims_id != null) {\n $event = Event::find($acadTerm->prelims_id);\n $event->delete();\n\n $acadTerm->prelims_id = null;\n }\n\n if($request->input('midterms_start_date') != null) {\n $midterms_start_date = date(\"Y-m-d\", strtotime($request->input('midterms_start_date')));\n $midterms_end_date = date(\"Y-m-d\", strtotime($request->input('midterms_end_date')));\n\n if($acadTerm->midterms_id == null) {\n $event = new Event;\n } else {\n $event = Event::find($acadTerm->midterms_id);\n }\n\n $event->title = 'Midterms Examination';\n $event->start_date = $midterms_start_date;\n $event->end_date = $midterms_end_date;\n $event->save();\n\n $acadTerm->midterms_id = $event->event_id;\n }\n else if ($acadTerm->midterms_id != null) {\n $event = Event::find($acadTerm->midterms_id);\n $event->delete();\n\n $acadTerm->midterms_id = null;\n }\n\n if($request->input('finals_start_date') != null) {\n $finals_start_date = date(\"Y-m-d\", strtotime($request->input('finals_start_date')));\n $finals_end_date = date(\"Y-m-d\", strtotime($request->input('finals_end_date')));\n\n if($acadTerm->finals_id == null) {\n $event = new Event;\n } else {\n $event = Event::find($acadTerm->finals_id);\n }\n\n $event->title = 'Finals Examination';\n $event->start_date = $finals_start_date;\n $event->end_date = $finals_end_date;\n $event->save();\n\n $$acadTerm->finals_id = $event->event_id;\n }\n else if ($acadTerm->finals_id != null) {\n $event = Event::find($acadTerm->finals_id);\n $event->delete();\n\n $acadTerm->finals_id = null;\n }\n\n $acadTerm->save();\n\n return redirect('/acad_terms')->with('success', $acadTerm->getAcadTerm() . ' Academic Term Updated');\n }", "title": "" }, { "docid": "a8914d9925dbc3e28400bb39f62bc80a", "score": "0.56151056", "text": "public function update(Request $request, Employee $employee)\n {\n $employee->update($request->all());\n return redirect()->route('employees.index');\n }", "title": "" }, { "docid": "f6d85718a45d758524c0da5c77215d38", "score": "0.56149745", "text": "public function update(Request $request, employee $employee)\n {\n $request->validate([\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'company' => 'required',\n 'email' => 'required',\n 'phone' => 'required'\n ]);\n \n $employee->update($request->all());\n \n return redirect()->route('employee.index')->with('success','Employee details updated successfully');\n }", "title": "" }, { "docid": "4b7598ad74dff3aa59e72ae09f09bad9", "score": "0.56016564", "text": "public function update(Request $request, Employees $employees)\n {\n //\n }", "title": "" }, { "docid": "071538bf69d766d21dcc0b8a321d286b", "score": "0.5596574", "text": "public function wp_editTerm(/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */\n$args) {}", "title": "" }, { "docid": "6470f7c9968e6e1a903e8130160496ab", "score": "0.55897826", "text": "public function update_item(/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */\n$request) {}", "title": "" }, { "docid": "6432e887801a1490f798f53d2bf30318", "score": "0.55765635", "text": "public function update(Request $request, Employee $employee)//Request $request, Employee $employee\n {\n $validatedData = [\n 'inputName' => 'required|regex:/^[a-zA-Z ]+$/u|max:255',\n 'empType' => 'required',\n 'inputAddress' => 'required|regex:/^[a-zA-Z0-9 ,\\/]+$/'\n ];\n \n $customMessages = [\n 'inputName.regex' => 'Name cannot contain numbers and special characters',\n 'inputAddress.regex' => 'Address cannot contain special characters like . / @'\n ];\n \n $this->validate($request, $validatedData, $customMessages);\n \n $employee->name = $request->get('inputName');\n $employee->email = $request->get('email');\n $employee->contactNo = $request->get('contact');\n $employee->address = $request->get('inputAddress');\n $employee->employeeType = $request->get('empType');\n $employee->save();\n\n DB::table('users')\n ->where('email', $employee->email)\n ->update(['email' => $request->get('email'), 'usertype' => $request->get('empType'), 'name' => $request->get('inputName')]);\n\n $message = 'Successfully updated employee named '.$employee->name.' with id '.$employee->id;\n return redirect()->intended(route('director.employees'))->with('message', $message);\n // return view('admin.employees.edit');\n }", "title": "" }, { "docid": "2c78ca4cac85b00d56d2a799405bdb2e", "score": "0.5565053", "text": "public function edit(employe_acc $employe_acc)\n {\n //\n }", "title": "" }, { "docid": "0bbf74c33e5bfcc657a898589afc7001", "score": "0.5562405", "text": "public function update(UpdateEmployeeRequest $request, Employee $employee)\n\t{\n\t\t$employee->update($request->all());\n\t\treturn redirect()->route('admin.employee.index')->withSuccess($employee->first_name . ' has been updated!');\n\t}", "title": "" }, { "docid": "2f064f5fbb1701b107a5b0b6db4b19da", "score": "0.5550897", "text": "public function update(Request $request, Employee $employee)\n {\n //\n $employee -> update($request->all());\n return response(['empoyee'=> new EmployeeResource($employee),\n 'message'=>'success'],200);\n\n }", "title": "" }, { "docid": "7156b19939e409a777336434bb571441", "score": "0.55367273", "text": "public function update(Request $request, EmployeeWorkStation $employeeWorkStation)\n {\n //\n }", "title": "" }, { "docid": "731de705e5a341c535dd8d4418004444", "score": "0.5527891", "text": "public function update(Request $request, Employee $employee)\n {\n\n $employee->update($request->all());\n \n return redirect()->route('employees.show', $employee)\n ->with('success','Employee Data updated successfully');\n }", "title": "" }, { "docid": "efd9b632dcbf62eb11b0a3759e5aa89e", "score": "0.5519921", "text": "public function update($EMPR_ID)\n\t{\n\t\tparent::updateModel($EMPR_ID);\n\t}", "title": "" }, { "docid": "e28e622af2b112b1eec6ca5167bc48a4", "score": "0.551626", "text": "public function update(Request $request, EmpleadoDatoLab $empleadoDatoLab)\n {\n //\n }", "title": "" }, { "docid": "bdc7547b61f9c29ee16b718b844c54e0", "score": "0.55158985", "text": "public function update() {\n\t\t//Show error view if 'employee_id' param has not beet sent\n\t\t$employee_id = $this->input->post('employee_id');\n\t\tif(is_null($employee_id)) {\n\t\t\tshow_error(\"The 'employee_id' param is required\", 400);\n\t\t}\n\t\t//Validate existent employee\n\t\t$employee = $this->employee->get($employee_id);\n\t\tif(is_null($employee)) {\n\t\t\tshow_error('Employee not found', 400);\n\t\t}\n\t\t//Update employee\n\t\t$result = $this->employee->update($employee_id);\n\t\t//Show error view if update fails\n\t\tif(!$result) {\n\t\t\tshow_error('Error ocurred when updating employee', 400);\n\t\t}\n\t\t//If all ok, redirect to index() to show employees view\n\t\t$this->output->set_header('Location: http://codeigniter.local/employees/');\n\t}", "title": "" }, { "docid": "5550af1778d601a1bd10fe8376fa71af", "score": "0.5514961", "text": "function on_edit_term( $term_id ) {\n if( isset( $_POST['wd_other_id'] ) && ( '' != $_POST['wd_other_id'] ) ) {\n $wd_other_id = esc_url( $_POST['wd_other_id'] );\n update_term_meta( $term_id, 'wd_other_id', $wd_other_id);\n }\n if( isset( $_POST['wd_id'] ) && ( '' != $_POST['wd_id'] ) ) {\n $wd_id = ucfirst( esc_attr($_POST['wd_id']) );\n update_term_meta( $term_id, 'wd_id', $wd_id);\n } else {\n $this->delete_term_wikidata( $term_id );\n }\n if( isset( $_POST['schema_type'] ) && ( '' != $_POST['schema_type'] ) ) {\n $schema_type = ucfirst( esc_attr($_POST['schema_type']) );\n update_term_meta( $term_id, 'schema_type', $schema_type);\n }\n }", "title": "" }, { "docid": "3a8a920727c524154f84205f862bfe92", "score": "0.5466551", "text": "public function put(){\r\n\t\tcheckRoom($this->roomNumber);\r\n\t\tcheckName($this->fname);\r\n\t\tcheckName($this->lname);\r\n\t\tcheckEmail($this->email);\r\n\t\t$this->conn->setData(\"UPDATE Employees SET fName=:fname, lName=:lname, email=:email, isActive=:active, isFaculty=:faculty, phone=:phone, about=:about, education=:edu, highlights=:highlights, departmentId=:deptId, roomNumber=:roomNum, title=:title, secondaryDepartmentId=:secDeptId, imageName=:imageName WHERE facultyId = :id\",array(\r\n\t\t\":fname\"=>$this->fname,\r\n\t\t\":lname\"=>$this->lname,\r\n\t\t\":email\"=>$this->email,\r\n\t\t\":deptId\"=>$this->departmentId,\r\n\t\t\":active\"=>$this->isActive,\r\n\t\t\":faculty\"=>$this->isFaculty,\r\n\t\t\":phone\"=>$this->phone,\r\n\t\t\":about\"=>$this->about,\r\n\t\t\":edu\"=>$this->education,\r\n\t\t\":highlights\"=>$this->highlights,\r\n\t\t\":id\"=> $this->departmentId,\r\n\t\t\":roomNum\"=>$this->roomNumber,\r\n\t\t\":title\"=>$this->title,\r\n\t\t\":secDeptId\"=>$this->secDeptId,\r\n\t\t\":imageName\"=>$this->imageName,\r\n\t\t\":id\"=>$this->getEmployeeId()\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "12b75e1a63306bc83e4173e97d1081bc", "score": "0.54419833", "text": "public function setTerm($term) {\n\t\t$this->term = $term;\n\t}", "title": "" }, { "docid": "c6cb776d2a3371614a3018c2504248ab", "score": "0.54360646", "text": "public function updateEmployee(\\Cloudframe\\Leavemanagement\\Domain\\Model\\Employee $employee, $token) {\n\t\tif ($token == $employee->getToken()) {\n\t\t\t$employee->getPrimaryElectronicAddress()->setApproved(TRUE);\n\t\t\t$this->employeeRepository->update($employee);\n\t\t\t$this->persistenceManager->persistAll();\n\t\t} else {\n\t\t\tthrow new \\Cloudframe\\Leavemanagement\\Domain\\Service\\Exception\\EmployeeNotApprovedException();\n\t\t}\n\t}", "title": "" }, { "docid": "235de3e10417c62903d3204c113415fb", "score": "0.5434902", "text": "public function update(TermRequest $request, Term $term)\n {\n $request->validated();\n\n $term->update($request->except('_token'));\n\n if($request->action == 'submit')\n {\n return redirect()->route('terms.index')->withSuccess('Updated Successfully!');\n }elseif($request->action == 'continue')\n {\n return redirect()->route('terms.edit', $term->id)->withSuccess('Updated Successfully!');\n }\n\n }", "title": "" }, { "docid": "1d66ce98fd53184dcb9185dd0c3174ab", "score": "0.5432812", "text": "public function update(Request $request, Employee $employee)\n {\n $request->validate([\n 'name' => 'required|max:50',\n 'lastname' => 'required|max:50',\n 'birthday' => 'required|date_format:\"Y-m-d\"',\n 'email' => 'required|email',\n 'ci' => 'required|alpha_num',\n 'phone' => 'nullable',\n 'cellphone' => 'nullable',\n 'address' => 'nullable'\n ]);\n $employee->update($request->all());\n return $employee;\n }", "title": "" }, { "docid": "921825bf630db6106075aaa7a7d3ddba", "score": "0.54274", "text": "public function update(Request $request, Empleado $empleado)\n {\n //\n }", "title": "" }, { "docid": "5f693431167b684e9422c64120dfdd28", "score": "0.5405493", "text": "public function update(Request $request, Iterm $iterm)\n {\n\n\n\n $update =$iterm -> update($request->all());\n\n\n\n\n if($update)\n return response()->json(['msg'=>'物品更改成功','date'=>$update]);\n }", "title": "" }, { "docid": "58188781e678a94cf5297675d630e22b", "score": "0.5396973", "text": "public function update(Request $request, $id)\n {\n $emp = Employees::find($id);\n\n $emp->em_id = $request->em_id;\n \n $emp->em_account = $request->em_account;\n $emp->em_password = $request->em_password;\n $emp->d_name = $request->d_name ;\n $emp->em_name = $request->em_name;\n $emp->em_email = $request->em_email;\n $emp->em_tel = $request->em_tel;\n $emp->em_address = $request->em_address;\n $emp->save();\n return redirect(\"/home/secret/employees/show\");\n }", "title": "" }, { "docid": "441cadd6bfa2e28ccb947db34acefe00", "score": "0.5368165", "text": "public function update(Request $request, EmployeeRegistration $employeeRegistration)\n {\n //\n }", "title": "" }, { "docid": "475ebc2777aa55dfbb24db177c94255d", "score": "0.53657836", "text": "public function update_info(){\n $employee = Employee::find(Auth::user()->profile_id);\n\n $employee->update([\n 'e_father' => request('e_father'),\n 'e_mother' => request('e_mother'),\n 'e_sex' => request('e_sex'),\n 'e_nationality' => request('e_nationality'),\n 'e_religion' => request('e_religion'),\n 'e_birthdate' => request('e_birthdate'),\n 'e_birthplace' => request('e_birthplace'),\n 'record_number' => request('record_number'),\n 'record_place' => request('record_place'),\n 'id_car_number' => request('id_car_number'),\n 'e_id_governorate' => request('e_id_governorate'),\n 'e_id_district' => request('e_id_district'),\n 'e_id_rea' => request('e_id_rea'),\n 'marital_status' => request('marital_status'),\n 'job_desc' => request('job_desc'),\n 'job_type' => request('job_type'),\n 'work_time' => request('work_time'),\n 'salary_type' => request('salary_type'),\n 'start_working_date' => request('start_working_date'),\n 'left_working_date' => request('left_working_date'),\n 'back_working_date' => request('back_working_date'),\n 'e_mof_number' => request('e_mof_number'),\n 'e_mof_date' => request('e_mof_date'),\n 'ssn_isregistered' => request('ssn_isregistered'),\n 'e_ssn_number' => request('e_ssn_number'),\n 'e_ssn_date' => request('e_ssn_date'),\n 'spouse_works' => request('spouse_works'),\n 'family_compensation' => request('family_compensation'),\n 'children_compensation_count' => request('children_compensation_count'),\n 'income_tax_concession' => request('income_tax_concession'),\n 'itc_children_count' => request('itc_children_count'),\n 'salary_basis' => request('salary_basis'),\n 'daily_transportation' => request('daily_transportation'),\n 'working_days' => request('working_days'),\n 'representation_allowance' => request('representation_allowance'),\n 'housing_allowance' => request('housing_allowance'),\n 'food_voucher' => request('food_voucher'),\n 'cash_food_allowance' => request('cash_food_allowance'),\n 'other_benefits' => request('other_benefits'),\n 'other_company' => request('other_company'),\n 'other_company_name' => request('other_company_name'),\n 'other_company_mofnumber' => request('other_company_mofnumber'),\n 'other_company_ssnnumber' => request('other_company_ssnnumber')\n \n ]); \n\n $employee->user->update([\n 'firstname' => request('e_firstname'),\n 'lastname' => request('e_lastname')\n ]);\n\n // if(request('marital_status')=='متزوّج'){\n // // $employee->\n // }\n\n\n return redirect('/employee');\n\n\n\n }", "title": "" }, { "docid": "772bf0771c6f7193ace3904d8262a401", "score": "0.5348629", "text": "public function update(Request $request, elector $elector)\n {\n //\n }", "title": "" }, { "docid": "1f14e72a41d6c131bce9587e9b259370", "score": "0.5336637", "text": "public function update(EmployeeRequest $request, Employee $employee)\n {\n $employee->name = $request->name;\n $employee->phone = $request->phone;\n $employee->address = $request->address;\n $employee->type_id = $request->type_id;\n\n if(!$employee->isDirty())\n {\n return response()->json([\"error\" => 'se debe especificar al menos un valor diferente para actualizar', \"code\" => 422],422);\n }\n\n $employee->save();\n\n return $this->showOne($employee, 'employee actulizado correctamente');\n }", "title": "" }, { "docid": "42e1f6a60c3676cb0a118d4d89a2aa85", "score": "0.5332131", "text": "public function edit(Employees $employees)\n {\n //\n }", "title": "" }, { "docid": "42e1f6a60c3676cb0a118d4d89a2aa85", "score": "0.5332131", "text": "public function edit(Employees $employees)\n {\n //\n }", "title": "" }, { "docid": "c084b933d28df7032197e2f9721dd34c", "score": "0.53255826", "text": "public function postEdit($employee, $employeecertification)\n {\n // Validate the inputs\n $validator = Validator::make(Input::all(), array('certification_id' => 'required'));\n\t if ($validator->passes())\n\t {\n\t\t $result['failedValidate'] = false;\n\n\t\t Input::merge(array('employee_id' => $employee->id));\n\n\t\t $employeecertification->fill(Input::all())->save();\n\n\t\t if( $employeecertification->id )\n\t\t {\n\t\t\t $result['messages'] = array('success' => Lang::get('admin/employeecertifications/messages.edit.success'));\n\t\t\t return Response::json(json_encode($result));\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $result['messages'] = array('error' => Lang::get('admin/employeecertifications/messages.edit.error'));\n\t\t\t return Response::json(json_encode($result));\n\t\t }\n\t }\n\t else\n\t {\n\t\t $result['failedValidate'] = true;\n\t\t $result['messages'] = $validator->messages()->toJson();\n\t\t return Response::json(json_encode($result));\n\t }\n }", "title": "" }, { "docid": "91971dc58ee7783610c00c6f5faa19b7", "score": "0.5300808", "text": "public function update(Request $request, employee $employee)\n {\n $number=$request->phone;\n $id =$employee->id;\n if(!is_null($number)){\n $length=strlen($number);\n if($length!=11){\n return Redirect::back()->withErrors([\"Enter a Valid Phone\"]);\n }\n else{\n $employees= employee::where('phone',$number)->first();\n if(!is_null( $employees)){\n if($id != $employees->id){\n return Redirect::back()->withErrors([\"This Phone is Already taken\"]);\n }\n }\n }\n } \n \n $employee->update($request->all());\n return redirect()->back()->withSuccess(['Successfully Updated']);\n\n \n // $employee->name = $request->name;\n // $employee->phone = $request->phone;\n // $employee->address = $request->address;\n // $employee->joining_date = $request->joining_date;\n // $employee->reference = $request->reference;\n // $employee->term_of_contract = $request->term_of_contract;\n // $employee->fixed_duty_hour = $request->fixed_duty_hour;\n // $employee->salary = $request->salary;\n // $employee->designation_id = $request->designation_id;\n // $employee->save();\n // return back();\n }", "title": "" }, { "docid": "c33566de54101409a2fc42639ea7d5f0", "score": "0.5262827", "text": "public function edit(EmployeeWorkStation $employeeWorkStation)\n {\n //\n }", "title": "" }, { "docid": "b01fd1e28fbcc33e16b79894ae326327", "score": "0.5255549", "text": "public function update(Request $request)\n {\n $user = User::findorfail($request->id);\n $user->name = $request->name;\n $user->save();\n $userdetails= Employee::where(\"user_id\",$user->id)->get()->first();\n $employee = Employee::findorfail($userdetails->id);\n $employee->emp_name = $request->name;\n $employee->p_email = $request->p_email;\n $employee->o_email = $request->o_email;\n $employee->phone = $request->phone;\n $employee->dob = $request->dob;\n $employee->doj = $request->doj;\n $employee->experiance = $request->experiance;\n $employee->address = $request->address;\n $employee->designation = $request->designation;\n $employee->save();\n return redirect()\n ->back()\n ->withInput()\n ->with('success', 'Employee Updated Successfully');\n }", "title": "" }, { "docid": "c2c61a410ac9178b025030c056f4f196", "score": "0.5254986", "text": "public function update(EmployeesRequest $request, $id)\n {\n $employe = Employees::find($id);\n $employe->first_name = $request->first_name;\n $employe->last_name = $request->last_name;\n $employe->gender = $request->gender;\n $employe->hire_date = $request->hire_date;\n $employe->birth_date = $request->birth_date;\n $employe->save();\n\n $title = Titles::where('emp_id', $employe->id)->first();\n $title->title = $request->title;\n $title->emp_id = $employe->id;\n $title->save();\n\n $salarie = Salaries::where('emp_id', $employe->id)->first();\n $salarie->salary = $request->salary;\n $salarie->emp_id = $employe->id;\n $salarie->save();\n\n $departmentsEmployeesDelete = DepartmentsEmployees::where('emp_id', $employe->id)->forcedelete();\n\n foreach ($request->department as $key => $value) {\n $departmentsEmployees = new DepartmentsEmployees;\n $departmentsEmployees->emp_id = $employe->id;\n $departmentsEmployees->dept_id = $value;\n $departmentsEmployees->save();\n }\n\n $messageReturn = \"Funcionario '\".$employe->first_name.\"' alterado com sucesso\";\n return redirect('dashboard/employees')->with('status', $messageReturn);;\n }", "title": "" }, { "docid": "de618e211f6089dc723e8532fe992b95", "score": "0.5254367", "text": "public function update_employee($id,$first_name,$last_name,$email,$phone_number,$hire_date,$job_id,$salary,$department_id)\r\n \t{\r\n\r\n $query =\"UPDATE `employees` SET `first_name`=?,`last_name`=?,`email`=?,`phone_number`=?,`hire_date`=?,`job_id`=?,`salary`=?,`department_id`=? WHERE `employee_id`=?\";\r\n\r\n // prepare query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n\r\n // bind values\r\n $stmt->bindParam(1, $first_name);\r\n $stmt->bindParam(2, $last_name);\r\n $stmt->bindParam(3, $email);\r\n $stmt->bindParam(4, $phone_number);\r\n $stmt->bindParam(5, $hire_date);\r\n $stmt->bindParam(6, $job_id);\r\n $stmt->bindParam(7, $salary);\r\n $stmt->bindParam(8, $department_id);\r\n $stmt->bindParam(9, $id);\r\n\r\n // execute query\r\n if ($stmt->execute()) {\r\n\r\n http_response_code(200);\r\n // tell the user\r\n return array(\"message\" => \"Zaposlenik je azuriran.\");\r\n }\r\n\r\n // set response code - 503 service unavailable\r\n http_response_code(503);\r\n // tell the user\r\n return array(\"message\" => \"Nije moguce azurirati zaposlenika.\");\r\n \t}", "title": "" }, { "docid": "d309d1e246b860e2af155ecbdc83e4bc", "score": "0.5237063", "text": "public function editInPlaceAction()\n {\n $idColumn = explode('-', $this->get('request')->get('id'));\n\n $employeeId = $idColumn[0];\n $employeeAttr = $idColumn[1];\n $value = $this->get('request')->get('value');\n\n $em = $this->getDoctrine()->getManager();\n $employee = $em->getRepository('InodataFloraBundle:Employee')\n ->find($employeeId);\n\n switch ($employeeAttr) {\n case 'name':\n $employee->setName($value);\n break;\n case 'lastname':\n $employee->setLastname($value);\n break;\n case 'phone':\n $employee->setPhone($value);\n break;\n }\n\n $em->persist($employee);\n\n $em->flush();\n $em->clear();\n\n return new Response($value);\n }", "title": "" }, { "docid": "3721bcc51a3c2adc89eb3ada90e71d26", "score": "0.5235653", "text": "public function updateJob()\n {\n // if we have POST data to create a new job entry\n if (isset($_POST[\"submit_update_job\"])) {\n // do updateJob() from model/model.php\n $this->model->updateJob($_POST[\"employeeId\"], $_POST[\"orderId\"], $_POST[\"start\"], $_POST[\"complected\"], $_POST['job_id']);\n }\n\n // where to go after job has been added\n header('location: ' . URL . 'jobs/index');\n }", "title": "" }, { "docid": "30c2890216f871f9a46e27a66412899d", "score": "0.52321404", "text": "public function postEditEmployeeSalary(Request $request)\n {\n $self='employee-salary-list';\n if (\\Auth::user()->user_name!=='admin'){\n $get_perm=permission::permitted($self);\n\n if ($get_perm=='access denied'){\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important'=>true\n ]);\n }\n }\n\n $cmd = Input::get('cmd');\n\n $v = \\Validator::make($request->all(), [\n 'payment_type' => 'required'\n ]);\n\n if ($v->fails()) {\n return redirect('payroll/employee-salary-edit/' . $cmd)->withErrors($v->errors());\n }\n\n $payment_type=Input::get('payment_type');\n\n $employee = Employee::find($cmd);\n if ($employee) {\n\n $employee->payment_type=$payment_type;\n\n if($payment_type=='Hourly'){\n $employee->working_hourly_rate = $request->hourly_working_rate;\n $employee->overtime_hourly_rate = $request->hourly_overtime_rate;\n }else{\n $employee->basic_salary=$request->basic_salary;\n $employee->overtime_salary=$request->overtime_salary;\n }\n\n $employee->save();\n\n return redirect('payroll/employee-salary-list')->with([\n 'message' => language_data('Salary Updated Successfully')\n ]);\n } else {\n return redirect('payroll/employee-salary-list')->with([\n 'message' => language_data('Employee Not Found'),\n 'message_important' => true\n ]);\n }\n\n }", "title": "" }, { "docid": "8e8170bfee72d71827ebb932b022518d", "score": "0.52253824", "text": "public function update(Request $request, Enterprise $enterprise)\n {\n //\n }", "title": "" }, { "docid": "afa685b5104fe2b04838e1f077bf5497", "score": "0.5224196", "text": "public function update(Request $request, Elder $elder)\n {\n //\n }", "title": "" }, { "docid": "23216c8206b36fd3c30bde012d603410", "score": "0.52146494", "text": "public function edit(HrmEmployee $employee)\n {\n $departmetn = HrmDepartment::where('status','Active')->get();\n $position = HrmPosition::where('status','Active')->get();\n $Addstr = HrmSalaryStructure::where('type','Add')->get();\n $Deductstr = HrmSalaryStructure::where('type','Deduct')->get();\n $empsalarystructure = HrmEmpSalaryStructure::where('emp_id',$employee->id)->with('salarystr')->get();\n // dd($empsalarystructure);\n return view('hrm.employee.edit',compact('employee','departmetn','position','Addstr','Deductstr','empsalarystructure'));\n }", "title": "" }, { "docid": "6c728f7814ecc7fc8394fc5908d6474e", "score": "0.52110803", "text": "public function update(EmployeeRequest $request, Employee $employee)\n {\n if ($employee->update($request->all())) {\n return response()->json([\n 'message' => 'OK',\n 'data' => $employee,\n ], 201);\n }\n\n return response()->json([\n 'message' => 'Bad Request',\n 'data' => [],\n ], 400);\n }", "title": "" }, { "docid": "e5ffc5c318353f438d4167ec9733225a", "score": "0.52027065", "text": "public function update(Employee $employee)\n {\n if(Auth::user()->company == null)\n return Redirect::route('dashboard')->with('error',\"No company selected. Ask the website administrator to assign one\");\n Request::validate([\n 'name' => ['required', 'min:3'],\n 'occupation' => ['required', 'min:3'],\n 'bio' => ['required', 'min:3'],\n 'email' => ['required', 'min:2'],\n 'social_media' => ['required', 'min:2'],\n 'company_id' => ['required'],\n 'photo' => ['nullable', 'image', 'max:1024'],\n ]);\n\n $employee->update([\n 'name' => Request::get('name'),\n 'occupation' => Request::get('occupation'),\n 'bio' => Request::get('bio'),\n 'email' => Request::get('email'),\n 'social_media' => Request::get('social_media'),\n 'company_id' => Request::get('company_id'),\n ]);\n\n if (Request::hasFile('photo')) {\n $photo = Request::file('photo');\n Storage::disk('public')->delete($employee->photo);\n\n $employee->forceFill([\n 'photo' => $photo->storePublicly(\n 'employee-photos', ['disk' => 'public']\n ),\n ])->save();\n }\n return Redirect::route('employee.index')->with('success', \"Employee edited\");\n }", "title": "" }, { "docid": "4e0f752bfe101e62f3337887250e2bb1", "score": "0.5201234", "text": "public function update(Request $request, Employee $employee)\n {\n //\n if(Auth::check()){\n $employeeAddress = Address::where('id', $employee->address->id)\n ->update([\n 'address1'=> $request->input('add1'),\n 'address2'=> $request->input('add2'),\n 'city_id'=> $request->input('city'),\n 'type'=> 'Employee'\n ]);\n\n $employeeContact = Contact::where('id', $employee->contact->id)\n ->update([\n 'mobile1'=> $request->input('mobile1'),\n 'mobile2'=> $request->input('mobile2'), \n 'home'=> $request->input('home'),\n 'work'=> $request->input('work'), \n 'email1'=> $request->input('email1'),\n 'email2'=> $request->input('email2'),\n 'type'=> 'Employee'\n ]);\n\n $employee->update([\n 'fname'=> $request->input('fname'),\n 'mname'=> $request->input('mname'),\n 'lname'=> $request->input('lname'),\n 'dob'=> $request->input('dob'),\n 'sex'=> $request->input('sex'),\n 'degree'=> $request->input('degree'),\n 'driver'=> $request->input('driver'),\n 'status'=> $request->input('status'),\n 'subject'=> $request->input('career'),\n 'shirt'=> $request->input('t-shirt'),\n 'allergy'=> $request->input('allergy'),\n 'meal'=> $request->input('meal'),\n 'type'=> $request->input('s_type'),\n 'yr'=> $request->input('stem_yr'),\n 'region'=> $request->input('region'),\n 'address_id'=>$employee->address->id,\n 'contact_id'=>$employee->contact->id\n ]);\n if($employeeAddress && $employeeContact && $employee){\n return redirect()->route('employees.edit', ['employee'=> $employee->id])\n ->with('success','Staff Member successfully updated');\n }\n }\n return back()->withInput('errors' , 'Staff Member could NOT be updated');\n }", "title": "" }, { "docid": "8de368d4004dd01ef329b7843c35469d", "score": "0.5194407", "text": "public function update(){\n\t\tcheck_page_redirection();\n\t\t$data['message_employee_added'] = \"\";\n\t\tif($this->session->userdata('user_role_id') == 11){\n\t\t\t $data['designation'] = $this->login_model->index_not_superadmin();\n\t\t }else{\n\t\t\t $data['designation'] = $this->login_model->index_not_superadmin_hr();\n\t\t }\n\t\t$this->load->view('employee/update', $data);\n\t}", "title": "" }, { "docid": "dbf8d15c6ffe8ab218d407c69d8a4a35", "score": "0.5193307", "text": "public function updateJob($id, $job_title, $company, $city, $street,$job_desc,$job_req,$salary,$telNo,$email){\n $query = \"UPDATE jobsoffering SET job_title='$job_title', email='$email',\n telNo=$telNo, company_name='$company', city='$city', street='$street', job_des='$job_desc',\n job_req ='$job_req', salary='$salary' WHERE id=$id\";\n $conn = $this->connect();\n $result = $conn -> query($query);\n return $result;\n }", "title": "" }, { "docid": "8fc9c9744579f9cc2b374758a419fefa", "score": "0.5188544", "text": "public function update(Request $request, $employee_id)\n {\n $this->authorize('admins', User::class);\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'location_id' => 'required|exists:locations,store_code',\n ]);\n\n $user = $this->getUser($employee_id);\n $user->name = $request->name;\n $user->location_id = $request->location_id;\n $user->save();\n\n \\Session::flash('success', 'Thanks , User with Name (' . $user->name . ')\n has been Successfully Updated');\n\n return redirect('/users/' . $user->employee_id);\n }", "title": "" }, { "docid": "97f9e1995fd204cb9fe07d5cf2e80cf3", "score": "0.51847476", "text": "public function update(Request $request, InvoiceEmailTeamplate $invoiceEmailTeamplate)\n {\n $tab=InvoiceEmailTeamplate::where('store_id',$this->sdc->storeID())->first();\n $tab->store_id=$this->sdc->storeID();\n $tab->updated_by=$this->sdc->UserID();\n $tab->company_name=$request->company_name;\n $tab->city=$request->city;\n $tab->address=$request->address;\n $tab->phone=$request->phone;\n $tab->terms_title=$request->terms_title;\n $tab->terms_text=$request->terms_text;\n $tab->save();\n \n return redirect('settings/invoice/email')->with('status','Successfully Update Data Saved');\n \n\n \n }", "title": "" }, { "docid": "7888d3498ddc58165f4bf9e8793168ab", "score": "0.51844114", "text": "protected function updateEmployee(\\Employee $instance) {\n\t\t\t\t$data = json_decode(file_get_contents('php://input'), true);\n\n\t\t\t\t$instance->Name = $data['Name'];\n\t\t\t\ttry {\n\t\t\t\t\t$address = Address::GetDuplicate($data['Address']['Street'], $data['Address']['Zip'], $data['Address']['City'], $data['Address']['Country']);\n\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\t$address = new Address();\n\t\t\t\t\t$address->Street = $data['Address']['Street'];\n\t\t\t\t\t$address->Zip = $data['Address']['Zip'];\n\t\t\t\t\t$address->City = $data['Address']['City'];\n\t\t\t\t\t$address->Country = $data['Address']['Country'];\n\t\t\t\t}\n\t\t\t\t$instance->Address = $address;\n\t\t\t\t$instance->StartAt = new DateTime($data['StartAt']);\n\t\t\t\tif(isset($data['EndAt']) && $data['EndAt']) {\n\t\t\t\t\t$instance->EndAt = new DateTime($data['EndAt']);\n\t\t\t\t} else {\n\t\t\t\t\t$instance->EndAt = null;\n\t\t\t\t}\n\t\t\t\t$instance->Email = $data['Email'];\n\t\t\t\t$instance->Phone = $data['Phone'];\n\t\t\t\t$instance->BornAt = new DateTime($data['BornAt']);\n\t\t\t\tif(isset($data['Unit'])) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$instance->Unit = Unit::GetById($data['Unit']);\n\t\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\t\t$instance->Unit = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($instance->Commit()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "title": "" }, { "docid": "e773e96e3987f80cd34ca5ac593d09ed", "score": "0.51827824", "text": "public function saveTerm(Term $term);", "title": "" }, { "docid": "0c7015eaa07d0b7f3e136ad129c47ba7", "score": "0.51756173", "text": "public function testUpdateAccountingSupplier()\n {\n }", "title": "" }, { "docid": "6d7306d0a3a95b5e9b85b62850ef6407", "score": "0.5164742", "text": "public function updateAction()\n\t{\n\t\tif (!$this->request->isPost()) {\n\t\t\t$this->response->redirect('employee');\n\t\t}\n\n\t\t$id = $this->request->getPost('id', 'int');\n\t\t$employee = Employee::findFirst($id);\n\t\tif (!$employee) {\n\t\t\t// pag walang ganun ma record\n\t\t\t$this->response->redirect('employee');\n\t\t}\n\n\t\t// lets do the update\n\t\t$employee->firstname = $this->request->getPost('firstname', ['trim', 'string']);\n\t\t$employee->lastname = $this->request->getPost('lastname');\n\t\t$employee->age = $this->request->getPost('age', 'int');\n\t\t$employee->address = $this->request->getPost('address');\n\n\n\t\t//save here\n\t\tif ($employee->save()) {\n\t\t\t// redirect\n\t\t\t$this->session->set('message', 'Student details has been updated!');\n\t\t\t//$this->response->redirect('employee/detail/' . $id);\n\t\t\t$this->response->redirect('employee');\n\n\t\t} else {\n\t\t\t// flash error muna\n\t\t\t$this->flash->error($employee->getMessages());\n\t\t\treturn $this->dispatcher->forward([\n\t\t\t\t\"controller\" => \"employee\",\n\t\t\t\t\"action\" => \"detail\",\n\t\t\t\t\"params\" => [$id]\n\t\t\t]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "65f967a475a7a3b8288f123338496830", "score": "0.51641995", "text": "public function postEditEmployeeSalaryIncrement(Request $request)\n {\n $self='employee-salary-increment';\n if (\\Auth::user()->user_name!=='admin'){\n $get_perm=permission::permitted($self);\n\n if ($get_perm=='access denied'){\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important'=>true\n ]);\n }\n }\n\n\n $cmd = Input::get('cmd');\n\n $v = \\Validator::make($request->all(), [\n 'payment_type' => 'required'\n ]);\n\n if ($v->fails()) {\n return redirect('payroll/employee-salary-increment-edit/' . $cmd)->withErrors($v->errors());\n }\n\n $employee = Employee::find($cmd);\n if ($employee) {\n\n if($request->payment_type=='Monthly'){\n\n $employee->basic_salary_increment = $request->basic_salary;\n $employee->overtime_salary_increment = $request->overtime_salary;\n\n }else{\n $employee->working_hourly_increment_rate = $request->hourly_working_rate;\n $employee->overtime_hourly_increment_rate = $request->hourly_overtime_rate;\n }\n\n $employee->save();\n\n return redirect('payroll/employee-salary-increment')->with([\n 'message' => language_data('Salary Updated Successfully')\n ]);\n } else {\n return redirect('payroll/employee-salary-increment')->with([\n 'message' => language_data('Employee Not Found'),\n 'message_important' => true\n ]);\n }\n\n }", "title": "" }, { "docid": "44a0c543600f4d1e31f8231d6d11db1c", "score": "0.516402", "text": "public function update(Request $request, $id)\n {\n $emp = Employee::find($id);\n $emp->company_name = $request->upcompany_name;\n $emp->name = $request->upuser_name;\n $emp->mobile_1 = $request->upmobile;\n $emp->type = '1';\n $emp->save();\n return back();\n }", "title": "" }, { "docid": "81b0cb37aa1ae1e67a72641fac0fa4d1", "score": "0.5163461", "text": "public function update($eid)\n\t{\n $user = Sentry::getUser();\n if(!$user->hasAccess('member')){\n return Redirect::to('dashboard')->with('message','danger|NO access');\n }\n\n $input = \\Input::only(\"user_id\",\"amount\",\"category_id\",\"payee_id\",\"description\",\"delete\",\"update\",'created_at');\n $input['created_at'] = \\Carbon\\Carbon::parse($input['created_at'])->toDateTimeString();\n\n //cmd delete\n if($input['delete']=='delete'){\n return $this->destroy($eid);\n }\n\n //cmd update\n $validation = \\Validator::make($input, Expense::rules());\n\n if ($validation->passes())\n {\n $expense = Expense::find($eid);\n $expense->fill($input);\n $expense->save();\n return \\Redirect::to('finance/expense')->with(\"message|Updated success.\");\n }else {\n return \\Redirect::route('finance.expense.index')\n ->withInput()\n ->with('message', 'danger|'.$validation->errors()->first());\n }\n\t}", "title": "" }, { "docid": "e92bb2f62582c26ce0e1406c68815352", "score": "0.51611495", "text": "public function setTerm($term, $description=\"\") {\n\n $term = ($term instanceof Term) ? $term : Term::findOrFail($term);\n\n if(!$term)\n return;\n\n // Check if the new term is already there\n $related = $this->related()->first();\n\n if( $related && $related->term->id == $term->id )\n {\n return $this->updateTerm($term, $description);\n }\n\n // Remove all term from same vocabulary\n $this->related()->where('relationable_id', $this->id)->delete();\n\n return $this->addTerm($term->id,$description);\n }", "title": "" }, { "docid": "9401dd25b9980ff5cc2690f1f797170a", "score": "0.51590943", "text": "public function update(Request $request, $id)\n {\n //dd($request->all());\n\n if(Auth::guard('admins')->user()){\n $company_id = Auth::guard('admins')->user()->id;\n }else{\n $company_id = Auth::guard('employee')->user()->company_id;\n }\n $data = EmployeeSkill::findOrFail($id);\n $data->skill_id = $request->skills;\n $data->years_of_exp = $request->year_of_experience;\n $data->comments = $request->comments;\n $data->save();\n// $data = DB::table('tbl_hr_emp_skill as es')\n// ->join('tbl_skill as s','es.skill_id','=','s.id')\n// ->where('s.id',$request->skill_id)\n// ->first();\n //return response()->json($data);\n //\n return redirect('/administration/employee-qualification')->with('success','Item has been edited successfully');\n //\n }", "title": "" }, { "docid": "486ee2ac0fde2081d382d1006bf9e696", "score": "0.51557803", "text": "public function update(Request $request, Salary $salary)\n {\n //\n }", "title": "" }, { "docid": "486ee2ac0fde2081d382d1006bf9e696", "score": "0.51557803", "text": "public function update(Request $request, Salary $salary)\n {\n //\n }", "title": "" }, { "docid": "dbf3573d8161baaf865e115c5057c7e0", "score": "0.5154288", "text": "public function update(EmployeeRequest $request, Employee $employee)\n {\n\n $employee->update($request->all());\n $employee->statuses()->sync((!$request->input('status_list') ? [] : $request->input('status_list')));\n $employee->conditions()->sync((!$request->input('condition_list') ? [] : $request->input('condition_list')));\n\n\n if($request->hasFile('avatar')){\n $avatar = $request->file('avatar');\n $filename = time() . '.' .$avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300,300)->save( public_path('/avatar/' . $filename ) ); \n $employee->avatar = $filename;\n $employee->save();\n }\n\n flashy()->success('Employee successfully updated!');\n\n return redirect('employees');\n }", "title": "" }, { "docid": "677910e5c42c4327f69cdf20f5ac353c", "score": "0.51540124", "text": "public function editable($employee_id, $id)\n {\n $employee_term = $this->findOrFail($employee_id, $id);\n\n $employee_terms = $employee_term->Employee->EmployeeTerms;\n\n if ($employee_terms->where('id', '!=', $id)->where('date_of_joining', '>', $employee_term->date_of_joining)->count()) {\n throw ValidationException::withMessages(['message' => trans('employee.only_last_term_is_editable')]);\n }\n\n return $employee_term;\n }", "title": "" }, { "docid": "7b3b9abbaaaa239168b5347bd750c646", "score": "0.5151649", "text": "public function update(Request $request, EmployeeWebHistory $employeeWebHistory)\n {\n //\n }", "title": "" }, { "docid": "bd36b9ceb738feac718113b73a7acd53", "score": "0.51488173", "text": "public function updateEmployee($name, $job_name, $manager_name)\n {\n $this->_checkInputValue($name);\n $this->_checkInputValue($job_name);\n\n // get the employee\n $employee = Employee::getByName($name);\n $this->_checkInputValue($employee, sprintf(ProxyLayer::kINVALID_NAME, $name));\n // get the job_id\n $employee->job_id = $this->_getJobId($job_name);\n // get the manager_id, if possible\n $employee->manager_id = $this->_getManagerId($manager_name);\n\n $employee->update();\n }", "title": "" }, { "docid": "98f542d6606abb17d8726d9f5e24e0fa", "score": "0.5145142", "text": "public function update(Request $request, Teacher $teacher)\n {\n //\n }", "title": "" }, { "docid": "314f9ce3cbafb315b38c7d5663fe8a16", "score": "0.5137392", "text": "public function update(Request $request, Empleados $empleados)\n {\n //\n }", "title": "" } ]
66a9ec0afbfcfb3efe899788fa2240a8
Get the h effectives.
[ { "docid": "a34bb50f66aeb7626c1a359b817b06e1", "score": "0.70665383", "text": "public function getHEffectives(): ?float {\n return $this->hEffectives;\n }", "title": "" } ]
[ { "docid": "b5d769055297bf70fd8e23309c87d699", "score": "0.7197583", "text": "public function getEffectHuit()\n {\n return $this->effectHuit;\n }", "title": "" }, { "docid": "03ac1e6524317e93ac86f2187ca44281", "score": "0.57840455", "text": "public function get_objectives()\n\t{\n\t\treturn $this->objectives;\n\t}", "title": "" }, { "docid": "8dba2021519176ec0e7500ad9d07e8f0", "score": "0.575815", "text": "public function getEffecteds()\n {\n return $this->_effecteds;\n }", "title": "" }, { "docid": "accea2533f3195f53632ca2038195a8b", "score": "0.5747245", "text": "public function setHEffectives(?float $hEffectives): PrepaPaieRepos {\n $this->hEffectives = $hEffectives;\n return $this;\n }", "title": "" }, { "docid": "338d2e5bf35cd0e87be7e248c807b754", "score": "0.57303405", "text": "public function getHeslo()\n {\n return $this->heslo;\n }", "title": "" }, { "docid": "7e582caf4d126c5ec48a71c86a37dca9", "score": "0.56375974", "text": "public function getDamage();", "title": "" }, { "docid": "2b5158e4790ad1671a8886e6a32efe92", "score": "0.55965054", "text": "public function get_hazmat() {\n\t\treturn $this->getInvHazmatItem();\n\t}", "title": "" }, { "docid": "90073353069ad598e1b98161dab893eb", "score": "0.5581717", "text": "protected function effects() {\n $table = new ContainerTable($this->tab, 'effects', n2_('Effects'));\n\n /**\n * Used for field injection: /animations/effects/effects-row1\n */\n $row = $table->createRow('effects-row1');\n }", "title": "" }, { "docid": "4c36707f94d0649c8028e33e88720fc9", "score": "0.55743325", "text": "public function get_heure()\n {\n return $this->_heure;\n }", "title": "" }, { "docid": "78f8151ceaca10989b51e2b43a3a4a06", "score": "0.55381924", "text": "public function hm() {\n\t\treturn R::$redbean->getHits().'-'.R::$redbean->getMisses();\n\t}", "title": "" }, { "docid": "501b0ddf67164969684ef4dfc7df1395", "score": "0.55049396", "text": "public function getEffectTrois()\n {\n return $this->effectTrois;\n }", "title": "" }, { "docid": "d5b9647b7567dcba5108a27ed79f2cfb", "score": "0.549948", "text": "public function getHearAbout(){\n $hears = HearAbout::find()->where(['status' => 1])->orderBy('id')->all();\n return ArrayHelper::map($hears,'id','name');\n }", "title": "" }, { "docid": "35649420d012f34eb2bc957b0ececeb3", "score": "0.5455765", "text": "public function getAnimations(){\n \treturn $this->animations;\n }", "title": "" }, { "docid": "f48105319a5cd0125e122a8972190efb", "score": "0.5440475", "text": "public function hens()\n {\n \n }", "title": "" }, { "docid": "7cc35d49680957a3ac92c7fabc71f1b5", "score": "0.5425899", "text": "public function getTipeHp()\n {\n return $this->db->get('tb_tipe_hp')->result_array();\n }", "title": "" }, { "docid": "bae3ab4706e5d9e6da7a5c7bd4e2ab63", "score": "0.54246175", "text": "public function getEffect() {\n\t\treturn $this->effect;\n\t}", "title": "" }, { "docid": "57db1be979aef7c900a71e959ff36c51", "score": "0.539681", "text": "public function getEffectSix()\n {\n return $this->effectSix;\n }", "title": "" }, { "docid": "4f1dc3a3d9d0666cc87083793fc1950f", "score": "0.5388844", "text": "public function gethelado()\n {\n return $this->helado;\n }", "title": "" }, { "docid": "9e569f66165d8646de26dcdf36bcb783", "score": "0.5388825", "text": "public function getHealth() {\n\t\treturn $this->hp;\n\t}", "title": "" }, { "docid": "5b83232e7c3b213b488a5a8be5930347", "score": "0.5375079", "text": "public function getHorasElegidas()\r\n {\r\n return $this->horasElegidas;\r\n }", "title": "" }, { "docid": "89ebcf78007f2e5de45fde9b0b8cd22d", "score": "0.536158", "text": "public function getHealth(){\n\t\treturn $this->currentHealth;\n\t}", "title": "" }, { "docid": "ed9b4673e2ea6ad9c3c4ca8fa688421e", "score": "0.53448", "text": "function getFilterHAge()\n\t{\n\t\treturn $this->filterHAge;\n\t}", "title": "" }, { "docid": "0a76e91c7a40692ef3f5011d09a1e750", "score": "0.53098077", "text": "public static function getPassives()\n {\n return [\n static::MENACE,\n static::HASTE,\n static::VIGILANCE,\n static::FLYING,\n static::FIRST_STRIKE,\n ];\n }", "title": "" }, { "docid": "4d3650dd76372e56f139db5b10f28b69", "score": "0.5303845", "text": "public function getShortEffect() {\n\t\treturn $this->shortEffect;\n\t}", "title": "" }, { "docid": "8fa73a87963f7ece49c03821c604f0ff", "score": "0.53021544", "text": "function getAnimations() { return $this->readAnimations(); }", "title": "" }, { "docid": "6679ba41ce065d008bc2171da5748224", "score": "0.52524686", "text": "function dish_info_list(){\n\t\treturn $this->dish_info_list;\n\t}", "title": "" }, { "docid": "f43d90fc307d49544747be955d3e8e8b", "score": "0.5245534", "text": "function wp_review_get_animations_out() {\n\treturn array(\n\t\t__( 'Attention Seekers', 'wp-review' ) => array(\n\t\t\t'bounce' => __( 'bounce', 'wp-review' ),\n\t\t\t'flash' => __( 'flash', 'wp-review' ),\n\t\t\t'pulse' => __( 'pulse', 'wp-review' ),\n\t\t\t'rubberBand' => __( 'rubberBand', 'wp-review' ),\n\t\t\t'shake' => __( 'shake', 'wp-review' ),\n\t\t\t'swing' => __( 'swing', 'wp-review' ),\n\t\t\t'tada' => __( 'tada', 'wp-review' ),\n\t\t\t'wobble' => __( 'wobble', 'wp-review' ),\n\t\t\t'jello' => __( 'jello', 'wp-review' ),\n\t\t),\n\t\t__( 'Bouncing Exits', 'wp-review' ) => array(\n\t\t\t'bounceOut' => __( 'bounceOut', 'wp-review' ),\n\t\t\t'bounceOutDown' => __( 'bounceOutDown', 'wp-review' ),\n\t\t\t'bounceOutLeft' => __( 'bounceOutLeft', 'wp-review' ),\n\t\t\t'bounceOutRight' => __( 'bounceOutRight', 'wp-review' ),\n\t\t\t'bounceOutUp' => __( 'bounceOutUp', 'wp-review' ),\n\t\t),\n\t\t__( 'Fading Exits', 'wp-review' ) => array(\n\t\t\t'fadeOut' => __( 'fadeOut', 'wp-review' ),\n\t\t\t'fadeOutDown' => __( 'fadeOutDown', 'wp-review' ),\n\t\t\t'fadeOutDownBig' => __( 'fadeOutDownBig', 'wp-review' ),\n\t\t\t'fadeOutLeft' => __( 'fadeOutLeft', 'wp-review' ),\n\t\t\t'fadeOutLeftBig' => __( 'fadeOutLeftBig', 'wp-review' ),\n\t\t\t'fadeOutRight' => __( 'fadeOutRight', 'wp-review' ),\n\t\t\t'fadeOutRightBig' => __( 'fadeOutRightBig', 'wp-review' ),\n\t\t\t'fadeOutUp' => __( 'fadeOutUp', 'wp-review' ),\n\t\t\t'fadeOutUpBig' => __( 'fadeOutUpBig', 'wp-review' ),\n\t\t),\n\t\t__( 'Flippers', 'wp-review' ) => array(\n\t\t\t'flip' => __( 'flip', 'wp-review' ),\n\t\t\t'flipInX' => __( 'flipInX', 'wp-review' ),\n\t\t\t'flipInY' => __( 'flipInY', 'wp-review' ),\n\t\t\t'flipOutX' => __( 'flipOutX', 'wp-review' ),\n\t\t\t'flipOutY' => __( 'flipOutY', 'wp-review' ),\n\t\t),\n\t\t__( 'Lightspeed', 'wp-review' ) => array(\n\t\t\t'lightSpeedIn' => __( 'lightSpeedIn', 'wp-review' ),\n\t\t\t'lightSpeedOut' => __( 'lightSpeedOut', 'wp-review' ),\n\t\t),\n\t\t__( 'Rotating Exits', 'wp-review' ) => array(\n\t\t\t'rotateOut' => __( 'rotateOut', 'wp-review' ),\n\t\t\t'rotateOutDownLeft' => __( 'rotateOutDownLeft', 'wp-review' ),\n\t\t\t'rotateOutDownRight' => __( 'rotateOutDownRight', 'wp-review' ),\n\t\t\t'rotateOutUpLeft' => __( 'rotateOutUpLeft', 'wp-review' ),\n\t\t\t'rotateOutUpRight' => __( 'rotateOutUpRight', 'wp-review' ),\n\t\t),\n\t\t__( 'Sliding Exits', 'wp-review' ) => array(\n\t\t\t'slideOutUp' => __( 'slideOutUp', 'wp-review' ),\n\t\t\t'slideOutDown' => __( 'slideOutDown', 'wp-review' ),\n\t\t\t'slideOutLeft' => __( 'slideOutLeft', 'wp-review' ),\n\t\t\t'slideOutRight' => __( 'slideOutRight', 'wp-review' ),\n\t\t),\n\t\t__( 'Zoom Exits', 'wp-review' ) => array(\n\t\t\t'zoomOut' => __( 'zoomOut', 'wp-review' ),\n\t\t\t'zoomOutDown' => __( 'zoomOutDown', 'wp-review' ),\n\t\t\t'zoomOutLeft' => __( 'zoomOutLeft', 'wp-review' ),\n\t\t\t'zoomOutRight' => __( 'zoomOutRight', 'wp-review' ),\n\t\t\t'zoomOutUp' => __( 'zoomOutUp', 'wp-review' ),\n\t\t),\n\t\t__( 'Specials', 'wp-review' ) => array(\n\t\t\t'hinge' => __( 'hinge', 'wp-review' ),\n\t\t\t'jackInTheBox' => __( 'jackInTheBox', 'wp-review' ),\n\t\t\t'rollIn' => __( 'rollIn', 'wp-review' ),\n\t\t\t'rollOut' => __( 'rollOut', 'wp-review' ),\n\t\t),\n\t);\n}", "title": "" }, { "docid": "e690f9b67358a93e68f12595fabd66f7", "score": "0.52301234", "text": "public function getHP()\n {\n return $this->HP;\n }", "title": "" }, { "docid": "c193f6bc6b5e7c03de29468bc63b76e0", "score": "0.52199346", "text": "final public function getHedge(){}", "title": "" }, { "docid": "e62acaea6a9ebfa8f818e6b9f26286e2", "score": "0.52120554", "text": "public function get_Impact() {\n return $this->impact;\n }", "title": "" }, { "docid": "ea667cd651130d98f0e904f7dba833d0", "score": "0.520309", "text": "function wp_review_get_animations_in() {\n\treturn array(\n\t\t__( 'Attention Seekers', 'wp-review' ) => array(\n\t\t\t'bounce' => __( 'bounce', 'wp-review' ),\n\t\t\t'flash' => __( 'flash', 'wp-review' ),\n\t\t\t'pulse' => __( 'pulse', 'wp-review' ),\n\t\t\t'rubberBand' => __( 'rubberBand', 'wp-review' ),\n\t\t\t'shake' => __( 'shake', 'wp-review' ),\n\t\t\t'swing' => __( 'swing', 'wp-review' ),\n\t\t\t'tada' => __( 'tada', 'wp-review' ),\n\t\t\t'wobble' => __( 'wobble', 'wp-review' ),\n\t\t\t'jello' => __( 'jello', 'wp-review' ),\n\t\t),\n\t\t__( 'Bouncing Entrances', 'wp-review' ) => array(\n\t\t\t'bounceIn' => __( 'bounceIn', 'wp-review' ),\n\t\t\t'bounceInDown' => __( 'bounceInDown', 'wp-review' ),\n\t\t\t'bounceInLeft' => __( 'bounceInLeft', 'wp-review' ),\n\t\t\t'bounceInRight' => __( 'bounceInRight', 'wp-review' ),\n\t\t\t'bounceInUp' => __( 'bounceInUp', 'wp-review' ),\n\t\t),\n\t\t__( 'Fading Entrances', 'wp-review' ) => array(\n\t\t\t'fadeIn' => __( 'fadeIn', 'wp-review' ),\n\t\t\t'fadeInDown' => __( 'fadeInDown', 'wp-review' ),\n\t\t\t'fadeInDownBig' => __( 'fadeInDownBig', 'wp-review' ),\n\t\t\t'fadeInLeft' => __( 'fadeInLeft', 'wp-review' ),\n\t\t\t'fadeInLeftBig' => __( 'fadeInLeftBig', 'wp-review' ),\n\t\t\t'fadeInRight' => __( 'fadeInRight', 'wp-review' ),\n\t\t\t'fadeInRightBig' => __( 'fadeInRightBig', 'wp-review' ),\n\t\t\t'fadeInUp' => __( 'fadeInUp', 'wp-review' ),\n\t\t\t'fadeInUpBig' => __( 'fadeInUpBig', 'wp-review' ),\n\t\t),\n\t\t__( 'Flippers', 'wp-review' ) => array(\n\t\t\t'flip' => __( 'flip', 'wp-review' ),\n\t\t\t'flipInX' => __( 'flipInX', 'wp-review' ),\n\t\t\t'flipInY' => __( 'flipInY', 'wp-review' ),\n\t\t\t'flipOutX' => __( 'flipOutX', 'wp-review' ),\n\t\t\t'flipOutY' => __( 'flipOutY', 'wp-review' ),\n\t\t),\n\t\t__( 'Lightspeed', 'wp-review' ) => array(\n\t\t\t'lightSpeedIn' => __( 'lightSpeedIn', 'wp-review' ),\n\t\t\t'lightSpeedOut' => __( 'lightSpeedOut', 'wp-review' ),\n\t\t),\n\t\t__( 'Rotating Entrances', 'wp-review' ) => array(\n\t\t\t'rotateIn' => __( 'rotateIn', 'wp-review' ),\n\t\t\t'rotateInDownLeft' => __( 'rotateInDownLeft', 'wp-review' ),\n\t\t\t'rotateInDownRight' => __( 'rotateInDownRight', 'wp-review' ),\n\t\t\t'rotateInUpLeft' => __( 'rotateInUpLeft', 'wp-review' ),\n\t\t\t'rotateInUpRight' => __( 'rotateInUpRight', 'wp-review' ),\n\t\t),\n\t\t__( 'Sliding Entrances', 'wp-review' ) => array(\n\t\t\t'slideInUp' => __( 'slideInUp', 'wp-review' ),\n\t\t\t'slideInDown' => __( 'slideInDown', 'wp-review' ),\n\t\t\t'slideInLeft' => __( 'slideInLeft', 'wp-review' ),\n\t\t\t'slideInRight' => __( 'slideInRight', 'wp-review' ),\n\t\t),\n\t\t__( 'Zoom Entrances', 'wp-review' ) => array(\n\t\t\t'zoomIn' => __( 'zoomIn', 'wp-review' ),\n\t\t\t'zoomInDown' => __( 'zoomInDown', 'wp-review' ),\n\t\t\t'zoomInLeft' => __( 'zoomInLeft', 'wp-review' ),\n\t\t\t'zoomInRight' => __( 'zoomInRight', 'wp-review' ),\n\t\t\t'zoomInUp' => __( 'zoomInUp', 'wp-review' ),\n\t\t),\n\t\t__( 'Specials', 'wp-review' ) => array(\n\t\t\t'hinge' => __( 'hinge', 'wp-review' ),\n\t\t\t'jackInTheBox' => __( 'jackInTheBox', 'wp-review' ),\n\t\t\t'rollIn' => __( 'rollIn', 'wp-review' ),\n\t\t\t'rollOut' => __( 'rollOut', 'wp-review' ),\n\t\t),\n\t);\n}", "title": "" }, { "docid": "4a450d4b56bed55adbd72b0a0a50c43f", "score": "0.51997113", "text": "public function getHufschmied()\n {\n\n return $this->hufschmied;\n }", "title": "" }, { "docid": "795c901d6ab6147b21c7ba5bf5c986d4", "score": "0.5194662", "text": "public function getHoras()\r\n {\r\n return $this->horas;\r\n }", "title": "" }, { "docid": "ea545f44f9b65b17788f0ebb96c4d976", "score": "0.51917255", "text": "public function getTransitions();", "title": "" }, { "docid": "54f1bf117e8da0d7c7862a74ba13e3a3", "score": "0.51892114", "text": "public function getHealth()\r\n {\r\n return $this->health;\r\n }", "title": "" }, { "docid": "25ddc27fa7f63af6a652cc17e7485094", "score": "0.517034", "text": "public function getBallHeat(){\n\t\treturn $ballHeat;\n\t}", "title": "" }, { "docid": "e220fe1d45925b8513507b218541bab6", "score": "0.51519775", "text": "public function getHands($player){\n return self::$allhands[$player];\n }", "title": "" }, { "docid": "2303dc7e22c185a49d5e04c4145eda69", "score": "0.5134963", "text": "protected function get_shoots(){\n\t\treturn $this->shoots;\n\t}", "title": "" }, { "docid": "9e49d87141ae1ee4e79a9eb3810c2f00", "score": "0.5084738", "text": "public function getAttackData() {\n\t\t$table = $this->networkTable('wfHits');\n\t\t$lastAttackDataTruncateTime = floatval($this->getConfig('lastAttackDataTruncateTime'));\n\t\t$results = $this->db->get_results('SELECT * FROM ' . $table . ' WHERE attackLogTime > ?', array(\n\t\t\t$lastAttackDataTruncateTime,\n\t\t));\n\n\t\t$data = array();\n\t\tforeach ($results as $row) {\n\t\t\t$actionData = wfWAFUtils::json_decode($row['actionData'], true);\n\t\t\t$data[] = array(\n\t\t\t\t$row['attackLogTime'],\n\t\t\t\t$row['ctime'],\n\t\t\t\twfWAFUtils::inet_ntop($row['IP']),\n\t\t\t\t(array_key_exists('learningMode', $actionData) ? $actionData['learningMode'] : 0),\n\t\t\t\t(array_key_exists('paramKey', $actionData) ? $actionData['paramKey'] : false),\n\t\t\t\t(array_key_exists('paramValue', $actionData) ? $actionData['paramValue'] : false),\n\t\t\t\t(array_key_exists('failedRules', $actionData) ? $actionData['failedRules'] : ''),\n\t\t\t\tstrpos($row['URL'], 'https') === 0 ? 1 : 0,\n\t\t\t\t(array_key_exists('fullRequest', $actionData) ? $actionData['fullRequest'] : ''),\n\t\t\t);\n\t\t}\n\t\treturn wfWAFUtils::json_encode($data);\n\t}", "title": "" }, { "docid": "3b11533d4aaee66acb854f532717a6d2", "score": "0.5069515", "text": "function getThrowList($dartGame){\n\t$hitList = array();\n\tforeach ($dartGame->getThrows() as $dartThrow) {\n\t\t$hitList[$dartThrow->getTarget()] ++;\n\t}\n\treturn $hitList;\n}", "title": "" }, { "docid": "7d7dea84020343a1e78661b0691361e7", "score": "0.50615877", "text": "public function getHeading();", "title": "" }, { "docid": "db365175c1e37012d3e762a15a0d1a87", "score": "0.5044052", "text": "public function horses()\n {\n return $this->hasMany(Horse::class);\n }", "title": "" }, { "docid": "af927813c9ac048f07671fa9d35c0384", "score": "0.50249475", "text": "public function getEffectDix()\n {\n return $this->effectDix;\n }", "title": "" }, { "docid": "2cfa12f06eb1aca08eb1190e429f4263", "score": "0.5024752", "text": "public function getHealth() {\n return $this->health;\n }", "title": "" }, { "docid": "8b1e73d72a257b9940f63f211413a14d", "score": "0.50118786", "text": "public function getEffectCinq()\n {\n return $this->effectCinq;\n }", "title": "" }, { "docid": "ee7c8ce19b39291fc43fee83cc8462aa", "score": "0.50110066", "text": "function item_effects($item_id){\n\t$sel = 'SELECT effect_identity, effect_name, effect_verb, effect_self FROM effects\n\t\t JOIN item_effects ON _effect_id = effect_id WHERE _item_id = :item_id';\n\t\t$data = query_array($sel, array(':item_id' => array($item_id, PDO::PARAM_INT)));\n\t\t$res = array();\n\t\tforeach ($data as $effect) {\n\t\t\t$res[strtolower($effect['effect_identity'])] = $effect;\n\t\t}\n\t\treturn $res;\n}", "title": "" }, { "docid": "b44bf60b8a4d292dd9dcf926a2b25533", "score": "0.5003437", "text": "public function getEffectNeuf()\n {\n return $this->effectNeuf;\n }", "title": "" }, { "docid": "a466e24ca180974b8f8a456989d661cf", "score": "0.49972233", "text": "function mipress_slider_transition_effects() {\n\t$options = array(\n\t\t'fade' => esc_html__( 'Fade', 'mipress' ),\n\t\t'fadeout' => esc_html__( 'Fade Out', 'mipress' ),\n\t\t'none' => esc_html__( 'None', 'mipress' ),\n\t\t'scrollHorz' => esc_html__( 'Scroll Horizontal', 'mipress' ),\n\t\t'scrollVert' => esc_html__( 'Scroll Vertical', 'mipress' ),\n\t\t'flipHorz' => esc_html__( 'Flip Horizontal', 'mipress' ),\n\t\t'flipVert' => esc_html__( 'Flip Vertical', 'mipress' ),\n\t\t'tileSlide' => esc_html__( 'Tile Slide', 'mipress' ),\n\t\t'tileBlind' => esc_html__( 'Tile Blind', 'mipress' ),\n\t\t'shuffle' => esc_html__( 'Shuffle', 'mipress' ),\n\t);\n\n\treturn apply_filters( 'mipress_slider_transition_effects', $options );\n}", "title": "" }, { "docid": "3cbe55513166593cb863ab99d81d77ea", "score": "0.49846116", "text": "public function heal();", "title": "" }, { "docid": "0602099ede646ffbbc20f80f2e9c0b69", "score": "0.4984436", "text": "public function getContentDamage()\n {\n return $this->contentDamage;\n }", "title": "" }, { "docid": "6ed5a75e5c5071471137cb62b2c3863c", "score": "0.49808368", "text": "public function getRoHS()\n {\n return $this->rohs;\n }", "title": "" }, { "docid": "b16ba368738a0fbb037bb5d1510bc547", "score": "0.49771103", "text": "public static function getHIW() {\n\t\t\t\t$data\t\t\t = DB::table('tb_content_block')->whereblock_type('hiw')->get();\n\t\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "a08c2c7f2324704dd26a97ed31f0688a", "score": "0.4976688", "text": "public function getEffectDeux()\n {\n return $this->effectDeux;\n }", "title": "" }, { "docid": "f03ec6c7b1daf5ebd82aeb3b666a2d40", "score": "0.49662903", "text": "public function getImpact()\n {\n return $this->impact;\n }", "title": "" }, { "docid": "ba877a7f6144f5ee6d5002e85d8f001c", "score": "0.49650025", "text": "public function getAnimations() {\r\n return $this->animations;\r\n }", "title": "" }, { "docid": "0a02eccc62c33e9a548508c3e53f4029", "score": "0.49621955", "text": "public function getTransitions(){\n \treturn $this->transitions;\n }", "title": "" }, { "docid": "88ca14ee272d6f3ec3fd6f4c3e2933a5", "score": "0.49592736", "text": "public function get() {\n\t\t//Select database using drupal inbuit APIs\n\t\t$query = db_select('vizh5p' , 'v');\n\t\t$data = $query\n\t\t\t\t->fields('v' , array('time','content_id','actor','verb'))\n\t\t\t\t->orderBy('time' , 'ASC')\n\t\t\t\t->execute()->fetchAll();\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "1e09e27ccbb59c259d10bfa57d762e3e", "score": "0.4956887", "text": "public function getList()\r\n\t{\r\n $heartrateModel = $this->getServiceLocator()->get('HeartrateModel');\r\n $heartrates = $heartrateModel->getHeartrates();\r\n return $heartrates;\r\n\t}", "title": "" }, { "docid": "b240e6a4acf65e9ef649633312d94028", "score": "0.4933165", "text": "protected static function get_interaction_descriptions() {\n return array(\n 'Mighty' => 'Dice with both Fire and Mighty skills do not grow ' .\n 'when firing, only when actually rolling',\n 'Weak' => 'Dice with both Fire and Weak skills do not shrink ' .\n 'when firing, only when actually rolling',\n );\n }", "title": "" }, { "docid": "a86c145b934ab6337243a864ff315547", "score": "0.49303854", "text": "public function hasEffect(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "138c9a05e384e606cc42fe90c50b1765", "score": "0.49262804", "text": "function getAllAreAttackingAcrossRiverCombatEffect()\n {\n return $this->allAreAttackingAcrossRiverCombatEffect;\n }", "title": "" }, { "docid": "08ef0e936f1a5554754cffe48e1633d9", "score": "0.49242988", "text": "public function isHungry()\n {\n return $this->hunger;\n }", "title": "" }, { "docid": "7617945bec44800596b90226e203d1e3", "score": "0.49140638", "text": "public function getHSL () {}", "title": "" }, { "docid": "067b5b24c381898ea8c4796f07ef7c73", "score": "0.49075457", "text": "public function getNbHeures() {\n return $this->nbHeures;\n }", "title": "" }, { "docid": "a1e2b99d4f1ab161dc7a11e5b4c90845", "score": "0.49072647", "text": "public function getEffectUn()\n {\n return $this->effectUn;\n }", "title": "" }, { "docid": "041a963dd2e40fb524b64af04b5ec09b", "score": "0.49014133", "text": "public function getHalls()\n {\n return $this->hasMany(Halls::className(), ['movie_theaters_id' => 'id']);\n }", "title": "" }, { "docid": "926a318b94b30a30a20153b8f0c62655", "score": "0.4899334", "text": "public function getHommes()\r\n {\r\n try { // Joining the three tables so as to select all hommes categories\r\n $request = $this->bdd->prepare(\"SELECT * FROM products \r\n LEFT JOIN categories ON products.cat_id = categories.cat_id\r\n LEFT JOIN product_categories ON products.p_cat_id = product_categories.p_cat_id \r\n WHERE cat_title = ? \");\r\n $request->execute(array(\r\n \"HOMMES\"\r\n ));\r\n return $solution = $request->fetchAll();\r\n } catch (Exception $e) {\r\n var_dump(\"Erreur \" . $e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "175bb7e7cabc4b8509c4c3e9958a3c6a", "score": "0.48853827", "text": "public function getHits()\n {\n return $this->hits; \n }", "title": "" }, { "docid": "a2142b05d3c5f16f16e650ca5b104b66", "score": "0.48836228", "text": "public function getHPP(){\n $hpp = $this->harganetto - ($this->harganetto * $this->persendiscount / 100) - $this->jmldiscount; //di persendiscount dan jmldiscount HARUS salahsatu\n if ($this->persenppn > 0){\n $hpp = ($hpp + ($hpp * ($this->persenppn/100)));\n }\n if($this->persenpph > 0){\n $hpp = ($hpp + ($hpp * ($this->persenpph/100)));\n }\n return $hpp;\n }", "title": "" }, { "docid": "fbe050d4c03f7740f00e26c8fecc5c57", "score": "0.48799127", "text": "public function getHero()\n\t{\n\t\tif($this->gender==\"male\" && $this->weapon==\"bow\" && $this->ally==\"Red\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='RedMaleBow.jpg' title='RedMaleBow' alt='Error' />\";\n\t\t}\n\t\n\t\tif($this->gender==\"male\" && $this->weapon==\"bow\" && $this->ally==\"Blue\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='BlueMaleBow.jpg' title='BlueMaleBow' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"male\" && $this->weapon==\"sword\" && $this->ally==\"Red\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='RedMaleSword.jpg' title='RedMaleSword' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"male\" && $this->weapon==\"sword\" && $this->ally==\"Blue\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='BlueMaleSword.jpg' title='BlueMaleSword' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"female\" && $this->weapon==\"bow\" && $this->ally==\"Red\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='RedFemaleBow.jpg' title='RedFemaleBow' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"female\" && $this->weapon==\"bow\" && $this->ally==\"Blue\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='BlueFemaleBow.jpg' title='BlueFemaleBow' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"female\" && $this->weapon==\"sword\" && $this->ally==\"Red\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='RedFemaleSword.jpg' title='RedFemaleSword' alt='Error' />\";\n\t\t}\n\t\t\n\t\tif($this->gender==\"female\" && $this->weapon==\"sword\" && $this->ally==\"Blue\")\n\t\t{\n\t\t\techo nl2br(\"\\n\");\n\t\t\techo \"<img src='BlueFemaleSword.jpg' title='BlueFemaleSword' alt='Error' />\";\n\t\t}\n\t}", "title": "" }, { "docid": "a968ad00660e4e7c7ec086bd76ff7a6d", "score": "0.48732483", "text": "function TS_VCSC_Add_Image_Hover_Effects_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Image_Hover_Effects', \t\t\t\t\tarray($this, 'TS_VCSC_Add_Image_Hover_Effects_Elements'), null);\r\n\t\t\t}", "title": "" }, { "docid": "750b72db1cbe32483c80fdce484f21e0", "score": "0.4873012", "text": "public function get_historial($id){\n $this->conectar();\n $sql=\"SELECT * \n FROM Rh_hislaboral \n WHERE Id_his=$id\n AND Centrocosto=\".$_SESSION[\"Id_centro\"];\n $res=mysql_query($sql);\n\n while($row=mysql_fetch_assoc($res)){\n $this->equipos[]=$row;\n\n } \n return $this->equipos;\n }", "title": "" }, { "docid": "05de0e7ae891be83cba61ff8ad75f980", "score": "0.48652774", "text": "public function getNoHp()\n {\n return $this->no_hp;\n }", "title": "" }, { "docid": "a85f3ef838947ad1faa37c08b2a7b75f", "score": "0.4862672", "text": "public function getAdvice()\n\t {\n\t \t return $this->response->result->advice;\n\t }", "title": "" }, { "docid": "27df14879dafb52c0e2b1364f112176f", "score": "0.48569775", "text": "public function getHpTheoNonAffectees(): ?float {\n return $this->hpTheoNonAffectees;\n }", "title": "" }, { "docid": "f4ac7e2e535c0f614b9ec594fc608b99", "score": "0.48566478", "text": "public function play()\r\n {\r\n return $this->buildEffect();\r\n }", "title": "" }, { "docid": "f51eed98bafc5e3c91c68f39e29fe5e2", "score": "0.4833423", "text": "public function index()\n {\n $client = new HttpClient;\n $response = $client->get([\n 'url' => Config::get('app.api') . \"atomic/beehives\",\n 'headers' => ['Content-type: application/json','APIKEY:' . \\Session::get('api_token')]\n ]);\n $view = BeeTools::isError($response);\n if ($view) {\n return $view;\n }\n\n $hives = Hive::getHivesApiaries($response->json());\n\n foreach ($hives as $key => $hive) {\n if (!empty($hive->units)) {\n $unit_current = $hive->units[0]->id;\n $unit = Unit::get($unit_current);\n if (is_object($unit->beehive) && is_object($unit->queen) && is_object($unit->swarm)){\n $hives[$key]->need = null;\n }\n if (is_null($unit->queen) && is_object($unit->swarm)) {\n $hives[$key]->need = 'queen';\n }\n if (is_null($unit->swarm) && is_object($unit->queen)) {\n $hives[$key]->need = 'swarm';\n }\n if (is_null($unit->queen) && is_null($unit->swarm)) {\n $hives[$key]->need = 'all';\n }\n } else {\n $hives[$key]->need = 'all';\n }\n }\n\n $apiaries = Apiary::get();\n foreach ($apiaries as $key => $apiary) {\n if ($apiary->hives_capacity == count($apiary->productions)){\n unset($apiaries[$key]);\n }\n }\n\n return View::make('hives.index', [\"hives\" => $hives, 'apiaries' => $apiaries]);\n }", "title": "" }, { "docid": "e438163de1851df2640260a5e7dc5af9", "score": "0.4831936", "text": "public function weaponz() {\n return $this->weapons()->with('childItems');\n }", "title": "" }, { "docid": "d7f14c9653a4abfbf056dbd00a9830ad", "score": "0.48264024", "text": "public function when()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d422d348e6883b5798f4e18c8c4c931d", "score": "0.48254046", "text": "public function getAffectation()\n {\n return $this->affectation;\n }", "title": "" }, { "docid": "bbce9604296b320e59c065aa321ccd00", "score": "0.48246488", "text": "public function victories()\n {\n return $this->games()->filter(function(Game $game) {\n return $this->hasWon($game);\n })->values();\n }", "title": "" }, { "docid": "7ecc346a8f6ed696837d10efde3532c3", "score": "0.48219535", "text": "public function getAnimationFade()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "32d1226fea84eeab0e47081ad7da7114", "score": "0.48029503", "text": "public function horses()\n {\n return $this->hasMany(Horse::class, \"race_id\");\n }", "title": "" }, { "docid": "8266552b2e0e0311123b9d13a131243d", "score": "0.4801968", "text": "public function getHSL()\n\t{\n\t\treturn array(\n\t\t\t'h' => (float) $this->_hue,\n\t\t\t's' => (float) $this->_saturation,\n\t\t\t'l' => (float) $this->_lightness,\n\t\t);\n\t}", "title": "" }, { "docid": "320d2b97d52d965cd0424010a36009a1", "score": "0.47971138", "text": "public function getHs35Heures(): ?float {\n return $this->hs35Heures;\n }", "title": "" }, { "docid": "57ed3523877cfd6101a355c35c6ce6d1", "score": "0.47958207", "text": "function getMiniStayHeaderMenuDetails()\n\t\t{\n\t\t\t$returnArr = array();\n\t\t\t$result = $this->db->select('a.static_program_id as id , c.nome_centri as name')\n\t\t\t\t\t\t\t->from(TABLE_JUNIOR_MINISTAY_SECTION.' a')\n\t\t\t\t\t\t\t->join(TABLE_JUNIOR_MINISTAY.' b' , 'a.junior_ministay_id = b.junior_ministay_id' , 'left')\n\t\t\t\t\t\t\t->join(TABLE_CENTRE.' c' , 'b.centre_id = c.id' , 'left')\n\t\t\t\t\t\t\t->where('b.junior_ministay_status = 1 AND b.delete_flag = 0')\n\t\t\t\t\t\t\t->where('((c.attivo = 1) or (c.is_mini_stay = 1 and c.attivo = 0))')\n\t\t\t\t\t\t\t->order_by('c.nome_centri')\n\t\t\t\t\t\t\t->get()->result_array();\n\t\t\tif(!empty($result))\n\t\t\t{\n\t\t\t\tforeach($result as $value)\n\t\t\t\t\t$returnArr[$value['id']][] = $value['name'];\n\t\t\t}\n\t\t\treturn $returnArr;\n\t\t}", "title": "" }, { "docid": "db18c0b7fff6da6d19c6b222b54cc834", "score": "0.47936922", "text": "private static function _getColorInfo($h)\n {\n if ($h >= 334 && $h <= 360) {\n $h -= 360;\n }\n\n foreach (self::$dictionary as $color) {\n if ($color['h'] !== null && $h >= $color['h'][0] && $h <= $color['h'][1]) {\n return $color;\n }\n }\n }", "title": "" }, { "docid": "444188010b489a1a101bee5579e371fd", "score": "0.47800416", "text": "public function getObjectives()\n {\n return $this->_db->select(\"SELECT * FROM `objectives`\");\n }", "title": "" }, { "docid": "88dcdf7269c9cbbf03c68fe84271d39e", "score": "0.4777044", "text": "public static function getHIWPOP() {\n\t\t\t\t$data\t\t\t = DB::table('tb_content_block')->whereblock_type('hiw_pop')->get();\n\t\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "a59cd9888db94c1a39648668ff5ea6d9", "score": "0.47757813", "text": "public function getStats(){}", "title": "" }, { "docid": "4da096feb1daf19391a1086e4279b48d", "score": "0.47754064", "text": "public function horaireAlim()\n {\n return $this->hasMany(HalimentTable::class);\n }", "title": "" }, { "docid": "dba931c8574c1b5c8384f3be959f73f1", "score": "0.47694108", "text": "public function getOpacity() { }", "title": "" }, { "docid": "bf571ddae22f238a85b4888c8121e6b9", "score": "0.476937", "text": "public function getFutureship();", "title": "" }, { "docid": "8a8ffef9171b05bd8b22c654dfc71e6a", "score": "0.47689092", "text": "public function get_weaponDamage()\n {\n return $this->_weaponDamage;\n }", "title": "" }, { "docid": "610313e420f4fceacd434fda357603b8", "score": "0.4766571", "text": "public function getExperience()\n {\n return $this->_db->select(\"SELECT * FROM `experience` Order by `Start` DESC\");\n }", "title": "" }, { "docid": "0c096677b1346130cefb0ca2653e547b", "score": "0.47654733", "text": "public function getHealthStates()\n {\n if (array_key_exists(\"healthStates\", $this->_propDict)) {\n return $this->_propDict[\"healthStates\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "2fe4cd3b3a4d45af15b9bbc61d3fe070", "score": "0.47643125", "text": "public function getDamage() {\n return $this->damage;\n }", "title": "" }, { "docid": "1dce90651fe3e4f442cf41d978f33b2b", "score": "0.4762701", "text": "function getHSL(){}", "title": "" }, { "docid": "ec881853b470a8e06f2719f02dcadb75", "score": "0.47623292", "text": "public function get_hot()\n {\n return Response::forge(Presenter::forge('api/clinear/pillar/hot', 'view', NULL, 'api/response'), 200, array('Content-Type','application/json'));\n }", "title": "" }, { "docid": "36052f178186c3b808ae140e6318ad02", "score": "0.4751239", "text": "function getExperiences(){\n\t\n\t\t$experiences = $this->attributes['Experience'];\n\t\treturn $experiences;\n\t}", "title": "" } ]
b273d13639553ef68c97d14b9bdb364a
/ Bulk Mail Queue Reply
[ { "docid": "71e3363ae270482fd5d7ce360c0bdc70", "score": "0.72709936", "text": "public function bulk_mail_queue_reply(){\n\n\n #$auto_email_send = CentralSettings::where('title', '=', 'is-paused')->first();\n #if($auto_email_send->status !='yes')\n #{\n //email queue data\n $email_queue_data = EmailQueue::where('send_time', '<=', date('Y-m-d H:i:s'))->get();\n\n if(count($email_queue_data)>0)\n {\n foreach($email_queue_data as $mail_data)\n {\n // Get Subject\n $popped_msg_hd = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n $subject = $popped_msg_hd->subject;\n\n try\n {\n if($mail_data->sub_message_id)\n {\n $sub_message = SubMessage::with('relSubMessageAttachment')->where('id',$mail_data->sub_message_id)->first();\n\n $sub_message_body = $sub_message->description;\n //$subject_of_msg = mb_substr($sub_message->description, 0, 100);\n\n $file_name = null;\n if(count($sub_message->relSubMessageAttachment)>0){\n foreach($sub_message->relSubMessageAttachment as $val){\n $file_name []= public_path().\"/\".$val->file_name;\n }\n }else{\n $file_name = null;\n }\n\n // check string is available or not and set body message\n $user_name = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n if (strpos($sub_message_body,'{name}') !== false)\n {\n $new_body = str_replace(\"{name}\", $user_name->user_name, $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{fname}') !== false)\n {\n $arr = explode(' ',trim($user_name->user_name));\n $fname = $arr[0];\n $new_body = str_replace(\"{fname}\", $fname, $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{lname}') !== false)\n {\n $pieces = explode(' ', $user_name->user_name);\n $lname = array_pop($pieces);\n $new_body = str_replace(\"{lname}\", $lname?$lname:'', $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{email}') !== false)\n {\n $new_body = str_replace(\"{email}\", $user_name->user_email, $sub_message_body);\n }\n else\n {\n $new_body = $sub_message_body;\n }\n\n // Check valid or invalid email\n $check_email_valid_invalid = SenderEmailCheck::sender_email_checking($mail_data->sender_email_id);\n\n if($check_email_valid_invalid){ // if valid\n $domain_se_id = $mail_data->sender_email_id;\n }else{\n $se_email_address= SenderEmail::where($mail_data->sender_email_id)->email;\n $check_email_public_domain = SenderEmail::EmailTypeIdentification($se_email_address, 'status');\n $camp_id = PoppedMessageHeader::findOrNew($mail_data->popped_message_header_id)->campaign_id;\n if($check_email_public_domain=='public'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'public')\n ->orderBy('count', 'asc')\n ->first();\n }elseif($check_email_public_domain=='domain'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'domain')\n ->orderBy('count', 'asc')\n ->first();\n }\n $domain_se_id = $domain_se->id;\n // Update the sender email status\n DB::table('popped_message_header')->where('id', $mail_data->popped_message_header_id)->update(['sender_email_id' => $domain_se_id]);\n DB::table('email_queue')->where('id', $mail_data->id)->update(['sender_email_id' => $domain_se_id]);\n }\n\n //sender email data\n $sender_email_data = SenderEmail::with('relSmtp')->where('id', '=', $domain_se_id)->first();\n\n if(count($sender_email_data)>0){\n\n /* ----- Start Email sending process ------ */\n $host=$sender_email_data->relSmtp->smtp;\n $port=$sender_email_data->relSmtp->port;\n $from_email=$sender_email_data->email;\n $from_name=$sender_email_data->name;\n $username=$sender_email_data->email;\n $password=$sender_email_data->password;\n if (strpos($mail_data->to_email, ' <') !== false) {\n $split = explode(' <', $mail_data->to_email );\n $name = $split[0];\n $email = rtrim($split[1], '>');\n $to_email = preg_replace('/<>*?/', '', $email); // final email\n } else {\n $to_email = $mail_data->to_email;\n }\n $subject=\"RE: \".$subject;\n $body=$new_body;\n $reply_to=$mail_data->reply_to;\n\n // fire email\n $result = EmailSend::reply_email($host, $port, $from_email,$from_name,$username,$password,$to_email, $subject, $body, $file_name, $reply_to);\n\n /* ----- End Email sending process ------ */\n if($result){\n // Store into Detail table\n $model = new PoppedMessageDetail();\n $model->popped_message_header_id = $mail_data->popped_message_header_id;\n $model->sub_message_id = $mail_data->sub_message_id;\n $model->followup_sub_message_id = $mail_data->followup_sub_message_id;\n $model->sender_email = $sender_email_data->email;\n $model->d_status = 'mail-sent';\n $model->sent_time = date('Y-m-d H:i:s');\n $model->save() ;\n\n //update sender email count\n /*$sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update->count = $sender_email_update->count +1;\n $sender_email_update->update();*/\n $sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update->count = $sender_email_update->count +1;\n $sender_email_update->update();\n\n // Delete from Email Queue\n $model_lt = EmailQueue::find($mail_data->id);\n $model_lt->delete();\n }\n }\n }\n if(count($mail_data->followup_sub_message_id)>0){\n $followup_sub_message = FollowupSubMessage::with('relFollowupSubMessageAttachment')\n ->where('id',$mail_data->followup_sub_message_id)->first();\n\n if($followup_sub_message){\n $followup_sub_message_body = $followup_sub_message->description;\n //$subject_of_foll_msg = mb_substr($followup_sub_message->description, 0, 100);\n\n $file_name = null;\n if(count($followup_sub_message->relFollowupSubMessageAttachment)>0){\n foreach($followup_sub_message->relFollowupSubMessageAttachment as $val){\n $file_name []= public_path().\"/\".$val->file_name;\n }\n }else{\n $file_name = null;\n }\n\n // check string is available or not and set body message\n $user_name = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n if (strpos($followup_sub_message_body,'{name}') !== false)\n {\n $new_body = str_replace(\"{name}\", $user_name->user_name, $followup_sub_message_body);\n }\n elseif(strpos($followup_sub_message_body,'{fname}') !== false)\n {\n $arr = explode(' ',trim($user_name->user_name));\n $fname = $arr[0];\n $new_body = str_replace(\"{fname}\", $fname, $followup_sub_message_body);\n\n }\n elseif(strpos($followup_sub_message_body,'{lname}') !== false)\n {\n $pieces = explode(' ', $user_name->user_name);\n $lname = array_pop($pieces);\n $new_body = str_replace(\"{lname}\", $lname?$lname:'', $followup_sub_message_body);\n }\n elseif(strpos($followup_sub_message_body,'{email}') !== false)\n {\n $new_body = str_replace(\"{email}\", $user_name->user_email, $followup_sub_message_body);\n }\n else\n {\n $new_body = $followup_sub_message_body;\n }\n\n $foll_sub_att_id = FollowupSubMessageAttachment::where('followup_sub_message_id', '=', $followup_sub_message->id)->first();\n\n // Check Valid or invalid Email\n $check_email_valid_invalid = SenderEmailCheck::sender_email_checking($mail_data->sender_email_id);\n\n if($check_email_valid_invalid){ //if Valid\n $domain_se_id = $mail_data->sender_email_id;\n }else{\n $se_email_address= SenderEmail::findOrNew($mail_data->sender_email_id)->email;\n $check_email_public_domain = SenderEmail::EmailTypeIdentification($se_email_address, 'status');\n $camp_id = PoppedMessageHeader::findOrNew($mail_data->popped_message_header_id)->campaign_id;\n if($check_email_public_domain=='public'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'public')\n ->orderBy('count', 'asc')\n ->first();\n\n }elseif($check_email_public_domain=='domain'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'domain')\n ->orderBy('count', 'asc')\n ->first();\n\n }\n $domain_se_id = $domain_se->id;\n // Update the sender email status\n DB::table('popped_message_header')->where('id', $mail_data->popped_message_header_id)->update(['sender_email_id' => $domain_se_id]);\n DB::table('email_queue')->where('id', $mail_data->id)->update(['sender_email_id' => $domain_se_id]);\n }\n\n //sender email data\n $sender_email_data = SenderEmail::with('relSmtp')->where('id', '=', $domain_se_id)->first();\n\n if(count($sender_email_data)> 0){\n\n //Start Email sending process\n $host=$sender_email_data->relSmtp->smtp;\n $port=$sender_email_data->relSmtp->port;\n $from_email=$sender_email_data->email;\n $from_name=$sender_email_data->name;\n $username=$sender_email_data->email;\n $password= $sender_email_data->password;\n if (strpos($mail_data->to_email, ' <') !== false) {\n $split = explode(' <', $mail_data->to_email );\n $name = $split[0];\n $email = rtrim($split[1], '>');\n $to_email = preg_replace('/<>*?/', '', $email); // final email\n } else {\n $to_email = $mail_data->to_email;\n }\n $subject=\"RE: \".$subject;\n $body=$new_body;\n $reply_to= $mail_data->reply_to;\n\n // fire email\n $result = EmailSend::reply_email($host, $port, $from_email,$from_name,$username,$password,$to_email, $subject, $body, $file_name, $reply_to);\n /* ----- End Email sending process ------ */\n if($result){\n // Store into Detail table\n $model = new PoppedMessageDetail();\n $model->popped_message_header_id = $mail_data->popped_message_header_id;\n $model->sub_message_id = $mail_data->sub_message_id;\n $model->followup_sub_message_id = $mail_data->followup_sub_message_id;\n $model->sender_email = $sender_email_data->email;\n $model->d_status = 'mail-sent';\n $model->sent_time = date('Y-m-d H:i:s');\n $model->save();\n\n //update sender email count\n /*$sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update_data['count'] = $sender_email_update->count +1;\n $sender_email_update->fill($sender_email_update_data)->update();*/\n $sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update->count = $sender_email_update->count +1;\n $sender_email_update->update();\n\n // Delete from Email Queue\n $model_lt = EmailQueue::find($mail_data->id);\n $model_lt->delete();\n }\n }\n\n }\n }\n\n Session::flash('flash_message_error', 'Sent Successfully!');\n }catch (\\Exception $e){\n Session::flash('flash_message_error', $e->getMessage());\n }\n }\n }else{\n Session::flash('flash_message_error', 'No Queued mail found to reply !');\n }\n #}else{\n # Session::flash('flash_message_error', 'Settings is not allowed to send email automatically !');\n #}\n return redirect('mail-queue');\n }", "title": "" } ]
[ { "docid": "ddfa8ca4cdfb20c73a20dc7cdb9360dd", "score": "0.6765235", "text": "public function handle()\n {\n /* bulk_mail_queue_reply from EmailQueueController */\n\n $timezone = +6; //(GMT +6:00)\n $current_time = gmdate(\"Y-m-d H:i:s\", time() + 3600*($timezone+date(\"I\")));\n $date = date(\"Y-m-d H:i:s\");\n\n\n //email queue data\n $email_queue_data = EmailQueue::whereNotNull('sub_message_id')\n ->where('send_time', '<=', $date)->get();\n\n $follow_up_msg = DB::table('email_queue')->whereNotNull('followup_sub_message_id')\n ->where('send_time', '<=', $date)->get();\n\n //TODO: sub message sending ...\n if(count($email_queue_data)>0)\n {\n foreach($email_queue_data as $mail_data)\n {\n DB::beginTransaction();\n try {\n // Get Subject\n $popped_msg_hd = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n $subject = $popped_msg_hd->subject;\n $sub_message = SubMessage::with('relSubMessageAttachment')->where('id',$mail_data->sub_message_id)->first();\n $sub_message_body = $sub_message->description;\n\n $file_name = null;\n if(count($sub_message->relSubMessageAttachment)>0){\n foreach($sub_message->relSubMessageAttachment as $val)\n {\n $file_name []= public_path().\"/\".$val->file_name;\n }\n }else{\n $file_name = null;\n }\n // check string is available or not and set body message\n $user_name = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n if (strpos($sub_message_body,'{name}') !== false)\n {\n $new_body = str_replace(\"{name}\", $user_name->user_name, $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{fname}') !== false)\n {\n $arr = explode(' ',trim($user_name->user_name));\n $fname = $arr[0];\n $new_body = str_replace(\"{fname}\", $fname, $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{lname}') !== false)\n {\n $pieces = explode(' ', $user_name->user_name);\n $lname = array_pop($pieces);\n $new_body = str_replace(\"{lname}\", $lname?$lname:'', $sub_message_body);\n }\n elseif(strpos($sub_message_body,'{email}') !== false)\n {\n $new_body = str_replace(\"{email}\", $user_name->user_email, $sub_message_body);\n }\n else\n {\n $new_body = $sub_message_body;\n }\n\n // Check valid or invalid email\n $check_email_valid_invalid = SenderEmailCheck::sender_email_checking($mail_data->sender_email_id);\n if($check_email_valid_invalid){ // if valid\n $domain_se_id = $mail_data->sender_email_id;\n }else{\n $se_email_address= SenderEmail::findOrNew($mail_data->sender_email_id);\n $camp_id = PoppedMessageHeader::findOrNew($mail_data->popped_message_header_id)->campaign_id;\n\n if($se_email_address->status=='public' || $se_email_address->status=='invalid'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'public')\n ->orderBy('count', 'asc')\n ->first();\n }elseif($se_email_address->status=='domain'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'domain')\n ->orderBy('count', 'asc')\n ->first();\n }\n $domain_se_id = $domain_se->id;\n // Update the sender email status\n DB::table('popped_message_header')->where('id', $mail_data->popped_message_header_id)->update(['sender_email_id' => $domain_se_id]);\n DB::table('email_queue')->where('id', $mail_data->id)->update(['sender_email_id' => $domain_se_id]);\n }\n\n //sender email data\n $sender_email_data = SenderEmail::with('relSmtp')->where('id', '=', $domain_se_id)->first();\n\n if(count($sender_email_data)>0){\n // TODO:: Start Email sending process\n $host=$sender_email_data->relSmtp->smtp;\n $port=$sender_email_data->relSmtp->port;\n $from_email=$sender_email_data->email;\n $from_name=$sender_email_data->name;\n $username=$sender_email_data->email;\n $password=$sender_email_data->password;\n\n if (strpos($mail_data->to_email, ' <') !== false) {\n $split = explode(' <', $mail_data->to_email );\n $name = $split[0];\n $email = rtrim($split[1], '>');\n $to_email = preg_replace('/<>*?/', '', $email); // final email\n } else {\n $to_email = $mail_data->to_email;\n }\n $subject=\"RE: \".$subject;\n $body=$new_body;\n $reply_to=$mail_data->reply_to;\n\n // fire email\n $result = MailQueueJobs::mail_jobs($host, $port, $from_email,$from_name,$username,$password,$to_email, $subject, $body, $file_name, $reply_to);\n\n // TODO: End Email sending process\n if($result){\n // Store into Detail table\n $model = new PoppedMessageDetail();\n $model->popped_message_header_id = $mail_data->popped_message_header_id;\n $model->sub_message_id = $mail_data->sub_message_id;\n $model->followup_sub_message_id = $mail_data->followup_sub_message_id;\n $model->sender_email = $sender_email_data->email;\n $model->sent_time = date('Y-m-d H:i:s');\n $model->d_status = 'mail-sent';\n $model->save() ;\n\n //update sender email count\n $sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update_data['count'] = $sender_email_data->count +1;\n $sender_email_update->fill($sender_email_update_data)->save();\n\n // Delete from Email Queue\n $model_lt = EmailQueue::find($mail_data->id);\n $model_lt->delete();\n }\n }\n\n DB::commit();\n echo \"Sent Successfully ! \";\n }catch (Exception $ex){\n DB::rollback();\n }\n }\n }\n\n //TODO: Folow up Messages sending ... ... ...\n if(count($follow_up_msg)>0)\n {\n foreach($follow_up_msg as $mail_data){\n DB::beginTransaction();\n try {\n // get followup sub message\n $followup_sub_message = FollowupSubMessage::with('relFollowupSubMessageAttachment')\n ->where('id',$mail_data->followup_sub_message_id)->first();\n // Get Subject\n $popped_msg_hd = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n $subject = $popped_msg_hd->subject;\n\n if($followup_sub_message){\n $followup_sub_message_body = $followup_sub_message->description;\n $subject_of_foll_msg = mb_substr($followup_sub_message->description, 0, 100);\n\n $file_name = null;\n if(count($followup_sub_message->relFollowupSubMessageAttachment)>0){\n foreach($followup_sub_message->relFollowupSubMessageAttachment as $val)\n {\n $file_name []= public_path().\"/\".$val->file_name;\n }\n }else{\n $file_name = null;\n }\n // check string is available or not and set body message\n $user_name = PoppedMessageHeader::where('id', $mail_data->popped_message_header_id)->first();\n if (strpos($followup_sub_message_body,'{name}') !== false)\n {\n $new_body = str_replace(\"{name}\", $user_name->user_name, $followup_sub_message_body);\n }\n elseif(strpos($followup_sub_message_body,'{fname}') !== false)\n {\n $arr = explode(' ',trim($user_name->user_name));\n $fname = $arr[0];\n $new_body = str_replace(\"{fname}\", $fname, $followup_sub_message_body);\n\n }\n elseif(strpos($followup_sub_message_body,'{lname}') !== false)\n {\n $pieces = explode(' ', $user_name->user_name);\n $lname = array_pop($pieces);\n $new_body = str_replace(\"{lname}\", $lname?$lname:'', $followup_sub_message_body);\n }\n elseif(strpos($followup_sub_message_body,'{email}') !== false)\n {\n $new_body = str_replace(\"{email}\", $user_name->user_email, $followup_sub_message_body);\n }\n else\n {\n $new_body = $followup_sub_message_body;\n }\n\n $foll_sub_att_id = FollowupSubMessageAttachment::where('followup_sub_message_id', '=', $followup_sub_message->id)->first();\n\n // Check Valid or invalid Email\n $check_email_valid_invalid = SenderEmailCheck::sender_email_checking($mail_data->sender_email_id);\n if($check_email_valid_invalid){ //if Valid\n $domain_se_id = $mail_data->sender_email_id;\n }else{\n $se_email_address= SenderEmail::findOrNew($mail_data->sender_email_id);\n $camp_id = PoppedMessageHeader::findOrNew($mail_data->popped_message_header_id)->campaign_id;\n if($se_email_address->status=='public' || $se_email_address->status=='invalid'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'public')\n ->orderBy('count', 'asc')\n ->first();\n\n }elseif($se_email_address->status=='domain'){\n $domain_se = DB::table('sender_email')\n ->where('campaign_id', $camp_id)\n ->where('status', 'domain')\n ->orderBy('count', 'asc')\n ->first();\n\n }\n $domain_se_id = $domain_se->id;\n // Update the sender email status\n DB::table('popped_message_header')->where('id', $mail_data->popped_message_header_id)->update(['sender_email_id' => $domain_se_id]);\n DB::table('email_queue')->where('id', $mail_data->id)->update(['sender_email_id' => $domain_se_id]);\n }\n\n //sender email data\n $sender_email_data = SenderEmail::with('relSmtp')->where('id', '=', $domain_se_id)->first();\n\n if(count($sender_email_data)> 0){\n // Start Email sending process\n $host=$sender_email_data->relSmtp->smtp;\n $port=$sender_email_data->relSmtp->port;\n $from_email=$sender_email_data->email;\n $from_name=$sender_email_data->name;\n $username=$sender_email_data->email;\n $password= $sender_email_data->password;\n if (strpos($mail_data->to_email, ' <') !== false) {\n $split = explode(' <', $mail_data->to_email );\n $name = $split[0];\n $email = rtrim($split[1], '>');\n $to_email = preg_replace('/<>*?/', '', $email); // final email\n } else {\n $to_email = $mail_data->to_email;\n }\n $subject=\"RE: \".$subject;\n $body=$new_body;\n $reply_to= $mail_data->reply_to;\n\n // fire email\n $result = MailQueueJobs::mail_jobs($host, $port, $from_email,$from_name,$username,$password,$to_email, $subject, $body, $file_name, $reply_to);\n // End Email sending process\n if($result){\n // Store into Detail table\n $model = new PoppedMessageDetail();\n $model->popped_message_header_id = $mail_data->popped_message_header_id;\n $model->sub_message_id = $mail_data->sub_message_id;\n $model->followup_sub_message_id = $mail_data->followup_sub_message_id;\n $model->sender_email = $sender_email_data->email;\n $model->sent_time = date('Y-m-d H:i:s');\n $model->d_status = 'mail-sent';\n $model->save();\n //update sender email count\n $sender_email_update = SenderEmail::findOrFail($sender_email_data->id);\n $sender_email_update_data['count'] = $sender_email_data->count +1;\n $sender_email_update->fill($sender_email_update_data)->save();\n\n // Delete from Email Queue\n $model_lt = EmailQueue::find($mail_data->id);\n $model_lt->delete();\n }\n }\n }\n DB::commit();\n #echo \"Sent Successfully ! \";\n }catch (Exception $ex){\n DB::rollback();\n }\n }\n }\n\n echo \"Sent Successfully ! \";\n // TODO:: return\n return true;\n\n }", "title": "" }, { "docid": "6e33185566b664efa36e1caad58d93d2", "score": "0.66426903", "text": "function execute_mail_queue() {\n\tglobal $_DBA, $_MAILQUEUE, $_SETTINGS;\n\t\n\tif(is_array($_MAILQUEUE) && !empty($_MAILQUEUE)) {\n\t\tarray_values($_MAILQUEUE);\n\t\t\n\t\t$page\t\t\t\t= &new Url(forum_url());\n\t\t$page->args\t\t\t= array();\n\t\t$page->file\t\t\t= FALSE;\n\t\t$page->path\t\t\t= FALSE;\n\t\t$page->anchor\t\t= FALSE;\n\t\t$page->scheme\t\t= FALSE;\n\n\t\tif(isset($_MAILQUEUE[0])) {\n\t\t\t\n\t\t\t$queue\t\t\t= $_MAILQUEUE[0];\n\t\t\t\n\t\t\t$users\t\t\t= unserialize($_MAILQUEUE[0]['userinfo']);\n\n\t\t\tif(is_array($users) && !empty($users)) {\n\t\t\t\t\n\t\t\t\t/* Reset the starting point of this array */\n\t\t\t\t$users\t\t= array_values($users);\n\t\t\t\t$count\t\t= count($users);\n\t\t\t\t$user_query\t= '';\n\n\t\t\t\t/* Loop through the users */\n\t\t\t\tfor($i = 0; $i < EMAIL_INTERVAL; $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif(isset($users[$i]) && is_array($users[$i]) && intval($users[$i]['id']) != 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($users[$i]['name'] != $users[$i]['poster_name']) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$message\t= sprintf($_MAILQUEUE[0]['message'], $users[$i]['name'], $users[$i]['poster_name']);\n\n\t\t\t\t\t\t\t/* Email our user */\n\t\t\t\t\t\t\tmail($users[$i]['email'], $_MAILQUEUE[0]['subject'], $message, \"From: \\\"\". $_SETTINGS['bbtitle'] .\" Forums\\\" <noreply@\". $page->__toString() .\">\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tunset($users[$i]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$user_query\t.= $i == 0 ? 'user_id = '. intval($users[$i]['id']) : ' OR user_id = '. intval($users[$i]['id']);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/* Update the subscriptions 'requires revisit' field */\n\t\t\t\t$_DBA->executeUpdate(\"UPDATE \". SUBSCRIPTIONS .\" SET requires_revisit = 1 WHERE topic_id = \". $queue['row_id'] .\" AND (\". $user_query .\")\");\n\t\t\t\t\n\t\t\t\t/* If we have finished with this queue item */\n\t\t\t\tif($count <= EMAIL_INTERVAL) {\n\t\t\t\t\t$_DBA->executeUpdate(\"DELETE FROM \". MAILQUEUE .\" WHERE id = \". intval($_MAILQUEUE[0]['id']));\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$users\t\t= array_values($users);\n\t\t\t\t\t$update\t\t= $_DBA->prepareStatement(\"UPDATE \". MAILQUEUE .\" SET userinfo=? WHERE id=?\");\n\t\t\t\t\t$update->setString(1, serialize($users));\n\t\t\t\t\t$update->setInt(2, $_MAILQUEUE[0]['id']);\n\t\t\t\t\t$update->executeUpdate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Reset the filetime on our email cache file */\n\t\t\t\tif(!@touch(CACHE_EMAIL_FILE, time()-86460)) {\n\t\t\t\t\t@unlink(CACHE_EMAIL_FILE);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$_DBA->executeUpdate(\"DELETE FROM \". MAILQUEUE .\" WHERE id = \". intval($_MAILQUEUE[0]['id']));\n\t\t\t\t\t\n\t\t\t\t/* Reset the filetime on our email cache file */\n\t\t\t\tif(!@touch(CACHE_EMAIL_FILE, time()-86460)) {\n\t\t\t\t\t@unlink(CACHE_EMAIL_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "60bcf2addf4348f389798625b805a8de", "score": "0.65954244", "text": "public function mail_queue_reply($id){\n\n $email_queue_id = $id;\n $email_queue = EmailQueue::findOrFail($email_queue_id);\n\n /*\n * Configure Mail.php // @Overriding TODO:: not done yet .. configure them all\n */\n\n $smtp_id = SenderEmail::where('email', '=', $email_queue->sender_email)->first();\n $smtp_host = Smtp::where('id', '=', $smtp_id->smtp_id)->first();\n\n\n\n Config::set('mail.driver', 'smtp');\n //Config::set('mail.host', 'edutechsolutionsbd.com');\n Config::set('mail.host', $smtp_host->host);\n Config::set('mail.port', 465);\n Config::set('mail.from', ['address' => $email_queue->sender_email, 'name' => \"Affi Fact\"]);\n Config::set('mail.encryption', 'ssl');\n Config::set('mail.username', $email_queue->sender_email);\n //Config::set('mail.username', '[email protected]');\n Config::set('mail.password', $smtp_id->password);\n //Config::set('mail.password', 'edutech@123');\n Config::set('mail.sendmail', '/usr/sbin/sendmail -bs');\n Config::set('mail.pretend', false);\n #Config::set('mail.encryption', $sender_email->relSmtp->secure);\n\n\n try{\n\n Mail::send('pages.test', array(''), function ($message) use($email_queue) {\n $message->from($email_queue->sender_email, 'Affi Fact');\n $message->to($email_queue->to_email);\n $message->subject('RE: Mail Queue Process.');\n\n # email send $message->attach('../public/Asesorias/a.txt');\n });\n // Delete from Email Queue\n //$model = EmailQueue::find($id);\n //$model->delete();\n\n Session::flash('flash_message', 'Sent First Message to : '.$email_queue->to_email);\n }catch (\\Exception $e){\n\n //exit(\"OK4\");\n Session::flash('flash_message_error', $e->getMessage());\n }\n\n return redirect('mail-queue');\n }", "title": "" }, { "docid": "8c357ee3d01b4d1b7ecfdfc10ed4f858", "score": "0.6594984", "text": "function send_reply(){\n \t\t\t$sendmail='no';\n\t\t\t\t \t$clinicId = $this->clinicInfo('clinic_id'); \n\t\t\t\t \t$sql_addon=\"select patient_email_notification from addon_services where clinic_id=\".$clinicId;\n $query_addon=$this->execute_query($sql_addon);\n if($this->num_rows($query_addon)>0) {\n $rowaddon=$this->fetch_array($query_addon);\n //print_r($rowaddon);\n //die;\n if($rowaddon[0]['patient_email_notification']==1){\n \t$sendmail='yes';\n }\n }\n \t\t$data = array(\n \t\t\t\t'subject' => 'reply',\t\n \t\t\t\t'content' => $this->encrypt_data($this->value('content')),\n \t\t\t\t'patient_id' => $this->get_field($this->value('message_id'),\"message\",\"patient_id\"),\n \t\t\t\t'parent_id' => $this->value('message_id'),\n \t\t\t\t'sender_id' => $this->userInfo('user_id'),\n \t\t\t\t'sent_date' => date('Y-m-d H:i:s'),\n \t\t\t);\n \t\t\t\n \t\t\tif($this->insert(\"message\",$data)){\n \t\t\t\t// Add record for therapist in message user table.\n \t\t\t\t$new_message_id = $this->insert_id();\n \n // Update recent_date and replies column in message table.\n $arr_message = array(\n 'recent_date' => $data['sent_date'],\n 'replies' => \"'{$this->num_replies($this->value('message_id'))}'\"\n );\n //print_r($arr_message);\n \n //$where = \" message_id = '{$this->value('message_id')}' \";\n $query = \" update message set recent_date = '{$data['sent_date']}', \n replies = '{$this->num_replies($this->value('message_id'))}' \n where message_id = '{$this->value('message_id')}' \";\n @mysql_query($query);\n $sql=\"select * from message where message_id='{$this->value('message_id')}'\";\n $sql_res=@mysql_query($sql);\n $sql_row = @mysql_fetch_array($sql_res);\n \n if($sql_row['mass_patient_id']!=0){\n $update_message=\"update message set mass_patient_id=\".$sql_row['sender_id'].\" where message_id=\".$this->value('message_id'); \n // @mysql_query($update_message); \n }\n \n if($sql_row['mass_patient_id']==0){\n $flag1=0;\n if($this->get_field($this->value('message_id'),\"message\",\"patient_id\")!=$this->get_field($this->value('message_id'),\"message\",\"sender_id\")){\n $flag1=1;\n }\n $sqlAA=\"select * from therapist_patient where patient_id = '{$this->get_field($this->value('message_id'),\"message\",\"patient_id\")}' and therapist_id='{$this->get_field($this->value('message_id'),\"message\",\"sender_id\")}'\";\n $resultAA=@mysql_query($sqlAA);\n if(@mysql_num_rows($resultAA)==0 and $flag1==1){\n $data = array(\n\t\t\t \t\t\t\t'message_id' => $this->value('message_id'),\n\t\t\t \t\t\t\t'user_id' => $sql_row['sender_id'],\n\t\t\t \t\t\t\t'unread_message' => '1'\n\t\t\t \t\t\t);\n\t\t\t \t\t\t$this->insert(\"message_user\",$data); \n if( $row['therapist_id'] != \"\" && is_numeric($row['therapist_id']) ){\n\t\t\t\t \t\t\t\tif($sendmail=='yes')\n\t\t\t\t \t\t\t\t$this->new_post_notification($row['therapist_id']);\n\t\t\t\t \t\t\t} \n }else{\n \n \t\t\t\t$query = \"select therapist_id from therapist_patient \n\t\t \t\t\t\t where patient_id = '{$this->get_field($this->value('message_id'),\"message\",\"patient_id\")}' \n\t\t \t\t\t\t and status = 1 \";\n\t\t \t\t\t$result = @mysql_query($query);\n\t\t \t\t\t$status=0;\n while( $row = @mysql_fetch_array($result)){\n\t\t\t \t\t\t// Entry for Therapist\n\t\t\t \t\t\t\n $data = array(\n\t\t\t \t\t\t\t'message_id' => $this->value('message_id'),\n\t\t\t \t\t\t\t'user_id' => $row['therapist_id'],\n\t\t\t \t\t\t\t'unread_message' => '1'\n\t\t\t \t\t\t);\n\t\t\t \t\t\t$this->insert(\"message_user\",$data);\n if($sql_row['sender_id']==$row['therapist_id']){\n $status=1;\n }\n if($sql_row['sender_id']==$this->userInfo('user_id')){\n $status=1;\n }\n if( $row['therapist_id'] != \"\" && is_numeric($row['therapist_id']) ){\n\t\t\t\t \t\t\t\tif($sendmail=='yes')\n\t\t\t\t \t\t\t\t$this->new_post_notification($row['therapist_id']);\n\t\t\t\t \t\t\t}\n // Delete user_id from system_message table to show the reply.\n $message_id = $this->value('message_id');\n $therapist_id = $row['therapist_id'];\n $query = \"delete from system_message where message_id = '{$message_id}' and user_id = '{$therapist_id}' \";\n @mysql_query($query);\n\t\t \t\t\t}\n }\n // echo $status;die;\n \n }else{\n $data = array(\n\t\t\t \t\t\t\t'message_id' => $this->value('message_id'),\n\t\t\t \t\t\t\t'user_id' => $sql_row['sender_id'],\n\t\t\t \t\t\t\t'unread_message' => '1'\n\t\t\t \t\t\t);\n\t\t\t \t\t\t$this->insert(\"message_user\",$data); \n \n }\n\t\t \t\t\t\n \n // End \n\t\t \t\t\t\n\t\t \t\t\t// Add record for patient in message user table.\n\t\t \t\t\t$data = array(\n\t\t \t\t\t\t'message_id' => $this->value('message_id'),\n\t\t \t\t\t\t'user_id' => $this->get_field($this->value('message_id'),\"message\",\"patient_id\"),\n\t\t \t\t\t\t'unread_message' => '2'\n\t\t \t\t\t);\n\t\t \t\t\t$this->insert(\"message_user\",$data);\n\t\t \t\t\t// End\n \t\t\t}\n }", "title": "" }, { "docid": "b7f3f16aae203122bf6a645c779883a4", "score": "0.6591858", "text": "public function process_que()\n {\n $mail_que = $this->fetch_mail_que($this->ini_array['emailque']['que_size']);\n if ($mail_que) {\n foreach ($mail_que as $mail_id => $mail_data) {\n $mail_sent = $this->send_mail($mail_data);\n echo $mail_data['emailque_to_address'] . \": \" . fyesNo($mail_sent) . \"<br>\";\n $this->update_mail_status($mail_id, $mail_sent);\n }\n die(\"<br>Mailqueue has processed \" . sizeof($mail_que) . \" mails: \" . date(\"Y-m-d H:i:s\"));\n } else {\n die(\"Nothing to process in mailqueue: \" . date(\"Y-m-d H:i:s\"));\n }\n // wts($mail_que);\n // die($msg);\n }", "title": "" }, { "docid": "67b0103e667fb672dc22a7ccd261fb81", "score": "0.6501317", "text": "public function sendQueuedMessages()\n {\n // get lock\n if ($this->_getLock(self::SEND_MESSAGE_PROCESS_ID)) {\n //load queued message list\n $queuedMessages = Mage::getModel('dolist/dolistemt_message_queued')\n ->getCollection()\n ->setOrder('id', 'ASC');\n //prepare collection by template\n $messagesByTemplates = array();\n foreach ($queuedMessages as $message) {\n $messagesByTemplates[$message->getTemplateId()][] = $message;\n }\n \n foreach ($messagesByTemplates as $templateId => $templateMessages) {\n foreach($templateMessages as $message) {\n try {\n //prepare message\n $messageContent = unserialize($message->getSerializedMessage());\n // try to send message\n Mage::getSingleton('dolist/service')->callDolistEmtSendmail($messageContent, $templateId, $message->getStoreId());\n //remove from queue\n $message->delete();\n \n } catch (SoapFault $fault) {\n $queue = Mage::helper('dolist/queue');\n /// All temporary errors (including \"limit reached\") should be requeued\n if ($queue->isTemporaryError($fault)) {\n Mage::log($fault);\n $newQueuedMessage = clone $message;\n //remove from queue and re-queue it\n $message->delete();\n $newQueuedMessage->setId(null)->save();\n //else log & remove\n } else {\n $message->delete();\n Mage::helper('dolist/log')->logError($message, $fault, 'SendMessage');\n }\n //if the error is a \"limit reached\" break to the next template\n if ($queue->isLimitReachedError($fault)) {\n break;\n } \n }\n }\n }\n \n //release the lock\n $this->_releaseLock(self::SEND_MESSAGE_PROCESS_ID);\n }\n }", "title": "" }, { "docid": "111713855eeb64b6fed339e5a02c73db", "score": "0.6414342", "text": "function set_send_reply_mail($topic_id, $poster_name) {\n\n\tglobal $_DBA, $_QUERYPARAMS, $_SETTINGS, $lang;\n\n\tif(ctype_digit($topic_id) && intval($topic_id) != 0) {\n\t\t\n\t\t$topic\t\t\t\t= $_DBA->getRow(\"SELECT \". $_QUERYPARAMS['info'] . $_QUERYPARAMS['topic'] .\" FROM \". TOPICS .\" t LEFT JOIN \". INFO .\" i ON t.topic_id = i.id WHERE i.id = \". intval($topic_id));\n\t\t\n\t\tif(is_array($topic) && !empty($topic)) {\n\t\t\t\n\n\t\t\t/**\n\t\t\t * Get the subscribers of this topic\n\t\t\t */\n\t\t\t$users\t\t\t= &$_DBA->executeQuery(\"SELECT * FROM \". SUBSCRIPTIONS .\" WHERE topic_id = \". intval($topic['id']) .\" AND requires_revisit = 0\");\n\t\t\t\n\t\t\t$subscribers\t= array();\n\n\t\t\twhile($users->next()) {\n\t\t\t\t\n\t\t\t\t$u\t\t\t\t= $users->current();\n\t\t\t\t$subscribers[]\t= array('name' => $u['user_name'], 'id' => $u['user_id'], 'email' => $u['email'], 'poster_name' => $poster_name, 'topic_id' => $topic['id']);\n\t\t\t}\n\t\t\t\n\t\t\t/* Memory Saving */\n\t\t\t$users->freeResult();\n\t\t\tunset($users);\n\n\t\t\t/**\n\t\t\t * Insert the data into the mail queue\n\t\t\t */\n\t\t\t$subject\t\t\t= $lang['L_REPLYTO'] .\": \". $topic['name'];\n\t\t\t$message\t\t\t= sprintf($lang['L_TOPICSUBSCRIBEEMAIL'], \"%s\", \"%s\", $topic['name'], $topic['id'], $_SETTINGS['bbtitle'], $topic['id']);\n\t\t\t$userinfo\t\t\t= serialize($subscribers);\n\t\t\t\n\t\t\t$insert\t\t\t\t= &$_DBA->prepareStatement(\"INSERT INTO \". MAILQUEUE .\" (subject,message,row_id,row_type,userinfo) VALUES (?,?,?,?,?)\");\n\t\t\t$insert->setString(1, $subject);\n\t\t\t$insert->setString(2, $message);\n\t\t\t$insert->setInt(3, $topic['id']);\n\t\t\t$insert->setInt(4, TOPIC);\n\t\t\t$insert->setString(5, $userinfo);\n\n\t\t\t$insert->executeUpdate();\n\t\t\t\n\t\t\t/* Memory saving */\n\t\t\tunset($_SETTINGS, $lang, $_QUERYPARAMS, $_DBA);\n\n\t\t\tif(!@touch(CACHE_EMAIL_FILE, time()-86460)) {\n\t\t\t\t@unlink(CACHE_EMAIL_FILE);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "97a3b6c7a56f8fa8d797e0b7e47c644a", "score": "0.63441277", "text": "function vbmail_end()\n{\n\tglobal $bulkon , $mailsql , $mailcounter, $DB_site, $vboptions;\n\n\t$bulkon = false;\n\n\tif ($mailcounter AND $mailsql AND $vboptions['usemailqueue'])\n\t{\n\t\t$DB_site->query(\"\n\t\t\tINSERT INTO \" . TABLE_PREFIX . \"mailqueue\n\t\t\t(dateline,toemail,subject,message,header)\n\t\t\tVALUES\n\t\t\t\" . $mailsql\n\t\t);\n\t\t$DB_site->query(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore\n\t\t\tSET data = data + \" . intval($mailcounter) . \"\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\tbuild_datastore();\n\n\t\tunset($mailsql);\n\t\t$mailcounter = 0;\n\t}\n}", "title": "" }, { "docid": "487377e96d0f47f891c8c893b19a5638", "score": "0.6296955", "text": "function privatemsg_rules_reply($thread_id, $body, $author) {\n rules_log(t('Writing reply to thread %thread_id from %author', array('%thread_id' => $thread_id, '%user' => $recipient->name, '%author' => $author->name)));\n $result = privatemsg_reply($thread_id, $body, array('author' => $author));\n if ($result['success']) {\n rules_log(t('New message sucessfully sent, !link', array('!link' => l($subject, 'messages/view/' . $result['message']['thread_id']))));\n }\n else {\n foreach ($result['messages']['error'] as $message) {\n rules_log(t('Message not sent, reported error: !error', array('!error' => $message)), TRUE);\n }\n }\n foreach ($result['messages']['warning'] as $message) {\n rules_log(t('Warning message reported when trying to send message: !warning', array('!warning' => $message)), TRUE);\n }\n}", "title": "" }, { "docid": "8ee0571442db81e53bc3a42440cb751c", "score": "0.6279745", "text": "public function sendReplyEmailMessage($id = 33, $body = \"my message\", $subject = \"uMail subject\"): bool;", "title": "" }, { "docid": "898810963612c72a7a89ec981b03e44c", "score": "0.6242004", "text": "function send_queued_emails() \n{\n $emailQueue = EmailQueue::first();\n \n\n // if no more datasets are found, exit the function\n if ($emailQueue->count() == 0) {\n return; \n }\n\n // mail the queried data\n $mailer = new Mailer();\n $mailer->setAddress($emailQueue->addresses)\n ->setSubject($emailQueue->subject)\n ->setBody($emailQueue->body)\n ->send();\n\n $emailSent = new EmailSent();\n $emailSent->addresses = $emailQueue->addresses;\n $emailSent->subject = $emailQueue->subject;\n $emailSent->body = $emailQueue->body;\n $emailSent->alt_body = $emailQueue->alt_body;\n $emailSent->from = $emailQueue->from;\n $emailSent->reply_to = $emailQueue->reply_to;\n $emailSent->cc = $emailQueue->cc;\n $emailSent->bcc = $emailQueue->bcc;\n $emailSent->attachments = $emailQueue->attachments;\n $emailSent->save();\n \n // delete the email from the queue\n $emailQueue->delete();\n\n // recursively call the function\n send_queued_emails();\n}", "title": "" }, { "docid": "77a5c978399e8667f7a89a60024b42d2", "score": "0.6233443", "text": "function Reply ($subject, $name, $email, $original_message, $reply)\r\n{\r\n\tglobal $conf;\r\n\t#get the template file for the reply message\r\n\t$text = GetFileContent('../templates/emails/admin_reply.tpl');\r\n\t#replace the tags with the info\r\n\t$text = str_replace(\"%REPLY%\", stripslashes($reply), $text);\r\n\t$text = str_replace(\"%NAME%\", stripslashes($name), $text);\r\n\t$text = str_replace(\"%EMAIL%\", stripslashes($email), $text);\r\n\t$text = str_replace(\"%ORIGINAL_MESSAGE%\", stripslashes($original_message), $text);\r\n\t#send email\r\n\t$Sender = 'Admin <'.$conf->admin_email.'>';\r\n\t$Recipiant = $email;\r\n\t$CustomHeaders ='';\r\n\r\n\t$Subject = $subject;\r\n\t$message = new Email($Recipiant, $Sender, $Subject, $CustomHeaders);\r\n\t$message->SetHtmlContent($text);\r\n\t$message->Send();\r\n}", "title": "" }, { "docid": "f26035f2268d6ab3f7db6cfe3bf91822", "score": "0.62101364", "text": "function run()\n\t{\n\t\tif (get_option('mail_queue_debug')=='0')\n\t\t{\n\t\t\t// Implement basic locking\n\t\t\tif (get_long_value_newer_than('mailer_currently_dripping',time()-60*5)==='1') return;\n\t\t\tset_long_value('mailer_currently_dripping','1');\n\n\t\t\t$mails=$GLOBALS['SITE_DB']->query_select(\n\t\t\t\t'logged_mail_messages',\n\t\t\t\tarray('id','m_subject','m_message','m_to_email','m_to_name','m_from_email','m_from_name','m_priority','m_attachments','m_no_cc','m_as','m_as_admin','m_in_html','m_date_and_time','m_member_id','m_url','m_template'),\n\t\t\t\tarray('m_queued'=>1),\n\t\t\t\t'',\n\t\t\t\t100\n\t\t\t);\n\n\t\t\tif (count($mails)!=0)\n\t\t\t{\n\t\t\t\trequire_code('mail');\n\n\t\t\t\tforeach ($mails as $row)\n\t\t\t\t{\n\t\t\t\t\t$subject=$row['m_subject'];\n\t\t\t\t\t$message=$row['m_message'];\n\t\t\t\t\t$to_email=unserialize($row['m_to_email']);\n\t\t\t\t\t$to_name=unserialize($row['m_to_name']);\n\t\t\t\t\t$from_email=$row['m_from_email'];\n\t\t\t\t\t$from_name=$row['m_from_name'];\n\n\t\t\t\t\tmail_wrap($subject,$message,$to_email,$to_name,$from_email,$from_name,$row['m_priority'],unserialize($row['m_attachments']),$row['m_no_cc']==1,$row['m_as'],$row['m_as_admin']==1,$row['m_in_html']==1,true,$row['m_template']);\n\n\t\t\t\t\t$GLOBALS['SITE_DB']->query_update('logged_mail_messages',array('m_queued'=>0),array('id'=>$row['id']),'',1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tset_long_value('mailer_currently_dripping','0');\n\t}", "title": "" }, { "docid": "eaf77b64b1adb9d6cb0e6bd7b8c3edc1", "score": "0.61880344", "text": "function processMailQueue()\n\t{\n\t\t//-----------------------------------------\n\t\t//\tInit\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->settings['mail_queue_per_blob']\t\t=\tintval($this->settings['mail_queue_per_blob']);\n\t\t$this->settings['mail_queue_current_state']\t=\tintval($this->settings['mail_queue_current_state']);\n\t\t\n\t\t$this->settings['mail_queue_per_blob']\t\t=\t( $this->settings['mail_queue_per_blob'] < 5 ? 5 : $this->settings['mail_queue_per_blob'] );\n\t\t$this->settings['mail_queue_current_state']\t=\t( $this->settings['mail_queue_current_state'] < 0 ? 0 : $this->settings['mail_queue_current_state'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t//\tDo we got mails to send?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->settings['mail_queue_current_state'] > 0 )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t//\tGet the mails list\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->db->query('SELECT * FROM pear_mail_queue LIMIT 0,' . $this->settings['mail_queue_per_blob']);\n\t\t\t\n\t\t\t$mails\t\t\t=\tarray();\n\t\t\twhile ( ($mail = $this->db->fetchRow()) !== FALSE )\n\t\t\t{\n\t\t\t\t$mails[ $mail['mail_id'] ] = $mail;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t//\tGot mails?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( count($mails) > 0 )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t//\tUpdate setting value\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->settings['mail_queue_current_state']\t\t\t=\t( $this->settings['mail_queue_current_state'] - $this->settings['mail_queue_per_blob'] );\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t//\tLoad the mail library\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\r\n\t\t\t\t$mailSender = $this->loadLibrary('PearEmail', 'email');\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t//\tIterate and send\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $mails as $mail )\n\t\t\t\t{\n\t\t\t\t\tif ( ! empty($mail['mail_subject']) AND ! empty($mail['mail_content']) AND ! empty($mail['mail_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$mailSender->senderAddress\t\t\t\t= $mail['mail_from'];\r\n\t\t\t\t\t\t$mailSender->receiverAddress\t\t\t\t= $mail['mail_to'];\r\n\t\t\t\t\t\t$mailSender->emailSubject\t\t\t\t= $mail['mail_subject'];\n\t\t\t\t\t\tif ( $mail['mail_use_pear_wrapper'] )\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$mailSender->emailMessage\t\t\t= $mail['mail_content'];\r\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mailSender->emailMessage\t\t\t= $this->response->loadedViews['global']->render('emailLayout', array( 'message' => $mail['mail_content'] ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mailSender->emailContainsHtml\t\t\t= (intval($mail['mail_is_html']) ? true : false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$mailSender->send();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//----------------------------\r\n\t\t\t\t\t\t//\tBroadcast mail event\r\n\t\t\t\t\t\t//----------------------------\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t$this->notificationsDispatcher->post(PEAR_EVENT_SENT_MAIL, $this, array( 'email' => $mailSender ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t//\tRemove mails from DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->db->remove('mail_queue', 'mail_id IN(' . implode(', ', array_keys($mails)) . ')');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->settings['mail_queue_current_state']\t\t\t=\t0;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t//\tUpdate the setting value\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->db->update('setting', array( 'mail_queue_current_state' => $this->settings['mail_queue_current_state'] ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t//\tBroadcast notification\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->notificationsDispatcher->post(PEAR_EVENT_PROCESS_MAIL_QUEUE);\n\t}", "title": "" }, { "docid": "07ed21668b2f427646a7c18da18ac2ed", "score": "0.6003955", "text": "public static function processQueue() {\n\t\t$queue = static::get()->filter(\n\t\t\t[ \"Status\" => self::StatusQueued ]\n\t\t)->sort(\"Created\", \"ASC\")->limit(AuthSMTPService::send_window_size());\n\n\t\tif ($queue->count() == 0) {\n\t\t\techo \"No Emails Available\" . \"\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ($queue as $msg) {\n\n\t\t\t$msg->update([\n\t\t\t\t'Status' => self::StatusSending\n\t\t\t])->write();\n\n\t\t\t/** @var Email $notifier */\n\t\t\t$notifier = Email::create($msg->From, $msg->Recipient, $msg->Subject, $msg->Body);\n\t\t\t$notifier->setTemplate($msg->Template);\n\n\t\t\t//attachments\n\t\t\t$files = json_decode($msg->Attachments, true);\n\t\t\tif (!empty($files)) {\n\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\t$f = File::get()->byID($file['ID']);\n\t\t\t\t\tif ($f->exists()) {\n\t\t\t\t\t\t$path = $f->getFullPath();\n\t\t\t\t\t\t$notifier->attachFile($path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//customer header\n\t\t\t$headers = json_decode($msg->CustomHeader, true);\n\t\t\tif (!empty($headers)) {\n\t\t\t\tforeach ($headers as $HeaderName => $HeaderValue) {\n\t\t\t\t\t$notifier->addCustomHeader($HeaderName, $HeaderValue);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//template data\n\t\t\t$TemplateData = unserialize(base64_decode($msg->TemplateData));\n\t\t\tif (!empty($TemplateData)) {\n\n\t\t\t\t$notifier->populateTemplate($TemplateData);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t//send and update message in queue when successful\n\t\t\t\tif ($notifier->send()) {\n\t\t\t\t\techo \"Sent notification to \" . $msg->Recipient . \"\\n\";\n\n\t\t\t\t\t$msg->update([\n\t\t\t\t\t\t'Status' => self::StatusSent,\n\t\t\t\t\t\t'Result' => 'OK'\n\t\t\t\t\t])->write();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Exception(\"Failed to send notification '$msg->Subject' to '$msg->Recipient' from '$from'\\n\");\n\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// we'll probably never get here as the sendPlain and sendHTML methods should have done this already\n\t\t\t\t// but implementation may change...\n\t\t\t\techo $e->getMessage();\n\n\t\t\t\t$msg->update([\n\t\t\t\t\t'Status' => self::StatusFailed,\n\t\t\t\t\t'Result' => $e->getMessage()\n\t\t\t\t])->write();\n\n\t\t\t\t// this will die\n\t\t\t\tAuthSMTPService::error($e->getMessage());\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7bfe0382e47a90abe0272e07ef998757", "score": "0.5994993", "text": "public function getMessageQueue();", "title": "" }, { "docid": "3aaabdcd3da9029296be5c9ebcca90fa", "score": "0.5986766", "text": "public function mail_queue(){\n\n $pageTitle = 'Emails are in Queue';\n //sub-message data\n\n $statement = \"\n SELECT popped_message_header_id, sub_message_id, send_time,\n (SELECT email from sender_email WHERE id=sender_email_id) AS sender_email_id,\n to_email\n FROM email_queue WHERE sub_message_id IS NOT NULL\n UNION\n SELECT tmp_garbage.popped_message_header_id, tmp_garbage.sub_message_id,\n ' processing.. ' AS send_time,\n tmp_garbage.from_email AS sender_email_id, tmp_garbage.to_email\n FROM tmp_garbage WHERE sub_message_id IS NOT NULL\n \";\n\n $data = DB::Select($statement);\n\n // Get the current page from the url if it's not set default to 1\n $page = Input::get('page', 1);\n // Number of items per page\n $perPage = 100;\n // Start displaying items from this number;\n $offSet = ($page * $perPage) - $perPage; // Start displaying items from this number\n // Get only the items you need using array_slice (only get 10 items since that's what you need)\n $itemsForCurrentPage = array_slice($data, $offSet, $perPage, true);\n // Return the paginator with only 10 items but with the count of all items and set the it on the correct page\n $data = new LengthAwarePaginator($itemsForCurrentPage, count($data), $perPage, $page);\n\n\n return view('mail_queue.index', [\n 'data' => $data, 'pageTitle'=> $pageTitle\n ]);\n }", "title": "" }, { "docid": "b091599b8227e683115ad9ccca97fb37", "score": "0.593624", "text": "function sendoutMultiMessages($msgUIDList) {\n\t\t// LOOKUP MESSAGES IN DATABASE\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->postTable, \"uid IN (\".$msgUIDList.\")\", '');\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res)) {\n\t\t\t// go through and send each message out\n\t\t\t$count = 0;\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\tif ($this->conf['sendOnlyPosts'] && ($row['reply_uid'] != 0))\n\t\t\t\t\tcontinue;\n\t\t\t\tforeach ($this->db_fields AS $field) {\n\t\t\t\t\t$entry[$count][$field] = $row[$field];\n\t\t\t\t}\n\t\t\t\t$entry[$count]['message'] = $this->html_entity_decode($entry[$count]['message']);\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\tif ($count)\n\t\t\t\t$this->sendoutMessages($entry, $count);\n\t\t}\n\t\telse {\n\t\t\tt3lib_div::debug('SELECT * FROM '.$this->postTable.' WHERE uid IN ('.$msgUIDList.') NOT FOUND');\n\t\t}\n\t}", "title": "" }, { "docid": "e2da1876b089bdd1f0d6b99fea3af63f", "score": "0.59025323", "text": "function end_email_output_buffering($is_success, $to, $subject, $message, $headers) {\n global $wpdb;\n \n if (array_key_exists('PNCT-TOKEN', $headers) == FALSE) {\n return;\n }\n \n $smtp_debug = ob_get_clean();\n \n $table_name = $wpdb->prefix . Email_Log_Gravityforms::TABLE_NAME;\n \n $sql = \"UPDATE `\" . $table_name . \"` SET `smtp_response` = '\". mysql_real_escape_string($smtp_debug) .\"'\"\n . \"WHERE `headers` LIKE '%\" . $headers['PNCT-TOKEN'] . \"%' ;\";\n \n $wpdb->query($sql);\n }", "title": "" }, { "docid": "dff740a1eae22317af08e795a2622faf", "score": "0.586147", "text": "public function testAutoReplyCanQueue()\n {\n $this->initSettings([\n 'auto_reply' => true,\n 'queue_emails' => true,\n ]);\n\n $component = $this->getComponent();\n\n $post = [\n 'name' => 'valid',\n 'email' => '[email protected]',\n 'comment' => 'valid',\n ];\n Input::replace($post);\n\n Mail::shouldReceive('queue')->once();\n\n $resp = $component->onFormSubmit();\n\n $this->assertEquals($resp->getStatusCode(), 200);\n $this->assertEquals($resp->getData()->success, true);\n }", "title": "" }, { "docid": "5e4707d913312c19c9f9dd6a1ba6c52d", "score": "0.5847302", "text": "private function emailReply() {\n\t\tif($this->getReply()->isExternal()) { // check that comment replied to isn't external\n\t\t\treturn false;\n\t\t}\n\t\t$email = new Email();\n\t\t$email->setTo($this->getReply()->getUser()->getEmail(true));\n\t\t$email->setSubject($this->getName().' has replied to your comment on \"'.$this->getArticle()->getTitle().'\"');\n\n\t\tob_start();\n\t\t$comment = $this->getReply();\n\t\t$reply = $this;\n\t\tinclude(BASE_DIRECTORY.'/templates/emails/comment_reply_notification.php');\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\n\t\t$email->setContent($message);\n\n\t\treturn $email->send();\n\t}", "title": "" }, { "docid": "79c5934612f46393f58e20665c0eed29", "score": "0.58193606", "text": "public function execute($queue)\n {\n\n try {\n\n \\Yii::$app->mailer->compose()\n ->setFrom([\\Yii::$app->params['noreplyEmail'] => \\Yii::$app->params['noreplyTitle']])\n ->setTo($this->email)\n ->setSubject($this->subject)\n ->setHtmlBody($this->content)\n ->setTextBody(strip_tags($this->content))\n ->send();\n\n } catch (\\Exception $ex) {\n\n \\Yii::error($ex);\n\n throw $ex;\n }\n }", "title": "" }, { "docid": "f301ada7eb40d5499e43573727d895aa", "score": "0.5802743", "text": "public static function sendEmails(){\n\t\treturn ORM::factory('EmailQueue')->sendEmails();\n\t}", "title": "" }, { "docid": "6afff69f1c5556cb7ef952f146721dda", "score": "0.5757717", "text": "public function replytoJob($req, $response) {\n\t\t\tif ($req->has('correlation_id')) {\n\t\t\t\t$msg = new AMQPMessage($response, array('correlation_id' => $req->get('correlation_id')));\n\t\t\t\t$req->delivery_info['channel']->basic_publish($msg, '', $req->get('reply_to'));\n\t\t\t}\n\n\t\t\t$req->delivery_info['channel']->basic_ack($req->delivery_info['delivery_tag']);\n\t\t}", "title": "" }, { "docid": "1abb31005511ff302b085386b0419606", "score": "0.57387286", "text": "public function send() {\n\t\t// Fetch the template and set a local copy of the subject\n\t\t$emailBody = file_get_contents(PATH_EMAIL . $this->_emailTemplate . '.phtml');\n\t\t$emailSubject = $this->_emailSubject;\n\n\t\t// Perform variable replacements\n\t\tforeach ($this->_emailVariables as $variable => $value) {\n\t\t\t// Replace from body and subject\n\t\t\t$emailBody = str_replace('{' . $variable . '}', $value, $emailBody);\n\t\t\t$emailSubject = str_replace('{' . $variable . '}', $value, $emailSubject);\n\t\t}\n\n\t\t// And insert into the queue\n\t\t// Get the database connection\n\t\t$database = Core_Database::getInstance();\n\t\t$statement = $database->prepare(\"\n\t\t\tINSERT INTO `email`\n\t\t\t(\n\t\t\t\t`email_to`,\n\t\t\t\t`email_from`,\n\t\t\t\t`email_subject`,\n\t\t\t\t`email_body`,\n\t\t\t\t`email_attachment`,\n\t\t\t\t`email_send_after`\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\t:email_to,\n\t\t\t\t:email_from,\n\t\t\t\t:email_subject,\n\t\t\t\t:email_body,\n\t\t\t\t:email_attachment,\n\t\t\t\t:email_send_after\n\t\t\t)\n\t\t\");\n\n\t\t// Execute the query\n\t\treturn $statement->execute(array(\n\t\t\t':email_to' => $this->_emailTo,\n\t\t\t':email_from' => $this->_emailFrom,\n\t\t\t':email_subject' => $emailSubject,\n\t\t\t':email_body' => $emailBody,\n\t\t\t':email_attachment' => $this->_emailAttachment,\n\t\t\t':email_send_after' => $this->_emailSendAfter\n\t\t));\n\t}", "title": "" }, { "docid": "7ea95bf386c6c12bedc6b23d10cbeefc", "score": "0.57203025", "text": "function show_mass_resend_email()\n\t{\n\t\tglobal $wpdb;\n\t\t\n\t\tglobal $current_user;\n\t\tget_currentuserinfo();\n\t\t\n\t\t$error = '';\n\t\t\n\t\t$resend_ids_string = get_option('formbuilder_db_resend_ids');\n\t\t$vals = explode(',', $resend_ids_string);\n\t\t\n\t\tforeach($vals as $val)\n\t\t{\n\t\t\tif(strpos($val, ':'))\n\t\t\t{\n\t\t\t\tlist($key, $value) = explode(':', $val);\n\t\t\t\t$params[$key] = $value;\n\t\t\t}\n\t\t\telseif(is_numeric($val))\n\t\t\t{\n\t\t\t\t$email_ids[] = $val;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!is_array($email_ids))\n\t\t\t$error .= \"No email ID's detected. \";\n\t\t\n\t\tif($current_user->user_login != $params['Name'])\n\t\t\t$error .= \"You are trying to resend someone else's send list. \";\n\t\t\n\t\tif($params['Time'] < time() - (3600))\n\t\t\t$error .= \"The time period in which you could have resent these emails has expired. Please try again. \"; \n\t\t\n\t\tforeach($email_ids as $email_id)\n\t\t\tif(!eregi('^[0-9]+$', $email_id)) $error .= \"Invalid email ID(s) detected. \";\n\t\t\n\t\tif(!$error)\n\t\t{\n\t\t\tforeach($email_ids as $email_id)\n\t\t\t{\n\t\t\t\t$sql = \"SELECT * FROM \" . FORMBUILDER_TABLE_RESULTS . \" WHERE id='$email_id' ORDER BY timestamp DESC LIMIT 0,\" . $this->result_limit . \";\";\n\t\t\t\t$result = $wpdb->get_row($sql, ARRAY_A);\n\t\t\t\tif($result == false) $error .= \"No email found with that ID.\";\n\t\t\t\t$form_data = $this->xmltoarray($result['xmldata']);\n\t\t\t\t$form_data['timestamp'] = $result['timestamp'];\n\t\t\t\t$forms[] = $form_data;\n\t\t\t}\n\t\t}\n\n\t\t?>\n\t\t<?php formbuilder_admin_nav('formResults'); ?>\n\t\t<h3><?php _e('Mass ReSend Form Results', 'formbuilder'); ?>: </h3>\n\t\t\n\t\t<?php\n\t\t\n\t\t\tif(!$error)\n\t\t\t{\n\t\t\t\tif($_GET['fbxmlconfirm_resend'] == 'yes')\n\t\t\t\t{\n\t\t\t\t\tforeach($email_ids as $email_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result = $this->resend_email($email_id);\n\t\t\t\t\t\tif(!$result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<p class='fbxml-warning'><?php _e('Error resending email. Error message was:', 'formbuilder'); ?> <?php echo $this->resend_email_errors; ?></p>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<p class='fbxml-message'><?php _e('Sending Email Now.', 'formbuilder'); ?></p>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<meta HTTP-EQUIV='REFRESH' content='0; url=\" . FB_ADMIN_PLUGIN_PATH\n\t\t\t\t\t\t . \"&fbaction=formResults&fbxmlaction=mass-resend&fbxmlconfirm_resend=sent'>\";\n\t\t\t\t\t\t return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($_GET['fbxmlconfirm_resend'] == 'sent')\n\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<p class='fbxml-message'><?php _e('These emails have been re-sent.', 'formbuilder'); ?></p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\treturn;\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\t<p class='fbxml-warning'><?php _e('Are you sure you want to resend the following emails? They will be sent using the standard FB email controls.', 'formbuilder'); ?></p>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t?>\n\n\t\t<fieldset class=\"options metabox-holder\">\n\t\t\t<div class=\"info-box-formbuilder postbox\">\n\t\t\t\t<h3 class=\"info-box-title hndle\"><?php _e('Emails to be resent:', 'formbuilder'); ?> </h3>\n\t\t\t\t<div class=\"fbxml-form-details inside\">\n\t\t\t\t<?php\n\t\t\t\t\tif($error)\n\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p class='fbxml-warning'><?php echo $error; ?></p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($forms as $form_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message = \"\";\n\t\t\t\t\t\t\tforeach($form_data['form'] as $key=>$value) {\n\t\t\t\t\t\t\t\t\t$message .= strtoupper($key) . \": \" . $value . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(strlen($message) > 140) $message = substr($message, 0, 140) . \"...\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo date(\"F j, Y, g:i a\", $form_data['timestamp']) . \": \" . $message . \"<br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t\t\n\t\t\n\t\t<div class=\"fbxml-controls\">\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"<?php echo FB_ADMIN_PLUGIN_PATH; ?>&fbaction=formResults&fbxmlaction=mass-resend&fbxmlconfirm_resend=yes\" class='fbxml-control-confirm'><?php _e('Yes. Resend all.', 'formbuilder'); ?></a></li>\n\t\t\t\t<li><a href=\"<?php echo FB_ADMIN_PLUGIN_PATH; ?>&fbaction=formResults\" class='fbxml-control-deny'><?php _e('No. Do not resend it.', 'formbuilder'); ?></a></li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "95151e7d09db43690ca52c95150913ed", "score": "0.57083017", "text": "function forward_message2($mailobject, $uid, $subject, $_message, $queue=0)\n\t{\n\t\t$this->smtpMail->ClearAddresses();\n\t\t$this->smtpMail->ClearAttachments();\n\t\t$this->smtpMail->AddAddress($this->mailhandling[$queue]['forward_to'], $this->mailhandling[$queue]['forward_to']);\n\t\t$this->smtpMail->AddCustomHeader('X-EGroupware-type: tracker-forward');\n\t\t$this->smtpMail->AddCustomHeader('X-EGroupware-Tracker: '.$queue);\n\t\t$this->smtpMail->AddCustomHeader('X-EGroupware-Install: '.$GLOBALS['egw_info']['server']['install_id'].'@'.$GLOBALS['egw_info']['server']['default_domain']);\n\t\t//$this->mail->AddCustomHeader('X-EGroupware-URL: notification-mail');\n\t\t//$this->mail->AddCustomHeader('X-EGroupware-Tracker: notification-mail');\n\t\t$account_email = $GLOBALS['egw']->accounts->id2name($this->sender,'account_email');\n\t\t$account_lid = $GLOBALS['egw']->accounts->id2name($this->sender,'account_lid');\n\t\t$notificationSender = (!empty($this->notification[$queue]['sender'])?$this->notification[$queue]['sender']:$this->notification[0]['sender']);\n\t\t$this->smtpMail->From = (!empty($notificationSender)?$notificationSender:$account_email);\n\t\t$this->smtpMail->FromName = (!empty($notificationSender)?$notificationSender:$account_lid);\n\t\t$this->smtpMail->Subject = lang('[FWD]').' '.$subject;\n\t\t$this->smtpMail->IsHTML(false);\n\t\t$this->smtpMail->Body = lang(\"This message was forwarded to you from EGroupware-Tracker Mailhandling: %1. \\r\\nSee attachment (original mail) for further details\\r\\n %2\",$queue,$_message);\n\n\t\t$rawBody = $mailobject->getMessageRawBody($uid,'',(!empty($this->mailhandling[$queue]['folder'])?$this->mailhandling[$queue]['folder']:'INBOX'));\n\t\t$this->smtpMail->AddStringAttachment($rawBody, $this->smtpMail->EncodeHeader($subject), '7bit', 'message/rfc822');\n\t\tif(!$error=$this->smtpMail->Send())\n\t\t{\n\t\t\terror_log(__METHOD__.__LINE__.\" Failed forwarding message via email.$error\".print_r($this->smtpMail->ErrorInfo,true));\n\t\t\treturn false;\n\t\t}\n\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.array2string($this->smtpMail));\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7dec43520b1ff791254d5c5f55fbfb1f", "score": "0.57044166", "text": "function SendCommandQueue() {\n\t\tif ( $this->debugging ) echo \"mpd->SendCommandQueue()\\n\";\n\t\tif ( ! $this->connected ) {\n\t\t\techo \"mpd->SendCommandQueue() / Error: Not connected\\n\";\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t$this->command_queue .= MPD_CMD_END_BULK . \"\\n\";\n\t\t\tif ( is_null($respStr = $this->SendCommand($this->command_queue)) ) {\n\t\t\t\treturn NULL;\n\t\t\t} else {\n\t\t\t\t$this->command_queue = NULL;\n\t\t\t\tif ( $this->debugging ) echo \"mpd->SendCommandQueue() / response: '\".$respStr.\"'\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $respStr;\n\t}", "title": "" }, { "docid": "f83d2936208132fdc4fd058d8946ccce", "score": "0.5697371", "text": "public function post_save_reply_message()\n {\n $messageID = \\Input::post('messageID');\n \n $data = array(\n 'messageID' => $messageID,\n 'from' => 'client',\n 'message' => \\Input::post('message'),\n 'statusID' => 1,\n );\n \n $messagePostID = 0;\n $messagePostID = Model_Intranet::saveMessagePost($data);\n \n Model_Intranet::setLastPostReplied($messageID);\n \n $status = '';\n $message = '';\n \n if($messagePostID > 0)\n {\n $status = 'success';\n }\n else\n {\n $status = 'failed';\n }\n \n return Json::output($status, $message);\n }", "title": "" }, { "docid": "b35b6b5a2384959144a0f7e28da74021", "score": "0.56708795", "text": "public function UpdateEmailFooter()\n\t{\n\t\t$db = ECash::getMasterDb();\n\t\t$footer_id = $this->request->footer_id;\n\t\t$email_replyto = $db->quote($this->request->response_sender_label);\n\t\t$footer_text = $db->quote($this->request->footer_text);\n\t\t$company_id = $this->request->footer_company;\n\t\t$queue_name = $this->request->footer_queue;\n\n\t\tif ( is_numeric($footer_id) )\n\t\t{\n\t\t\t$query = \"\n\t\t\t\t\t UPDATE\n\t\t\t\t\t email_response_footer\n\t\t\t\t\t SET\n\t\t\t\t\t email_replyto = {$email_replyto},\n\t\t\t\t\t footer_text = {$footer_text}\n\t\t\t\t\t WHERE\n\t\t\t\t\t company_id = '{$company_id}'\n\t\t\t\t\t AND\n\t\t\t\t\t queue_name = '{$queue_name}'\n\t\t\t\t\t\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"\n\t\t\t\t\t INSERT INTO email_response_footer\n\t\t\t\t\t (\n\t\t\t\t\t email_replyto,\n\t\t\t\t\t footer_text,\n\t\t\t\t\t company_id,\n\t\t\t\t\t\tqueue_name,\n\t\t\t\t\t date_created\n\t\t\t\t\t )\n\t\t\t\t\t VALUES\n\t\t\t\t\t (\n\t\t\t\t\t {$email_replyto},\n\t\t\t\t\t {$footer_text},\n\t\t\t\t\t '{$company_id}',\n\t\t\t\t\t '{$queue_name}',\n\t\t\t\t\t '\" . date('Y-m-d H:i:s') . \"'\n\t\t\t\t\t )\n\t\t\t\t\t\";\n\t\t}\n\n\t\t$result = $db->query($query);\n\n\n\t\t$data = new StdClass;\n\t\t$data->mode = 'docs_config';\n\t\t$data->view = 'email_footers';\n\t\tECash::getTransport()->Set_Data($data);\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "a93b493f1b6d846043a00b3ec6ab560a", "score": "0.5638113", "text": "function send_message_OLD($vars)\n\t{\n\t\t$tp = e107::getParser();\n\t\t$sql = e107::getDb();\n\t\t$pmsize = 0;\n\t\t$attachlist = '';\n\t\t$pm_options = '';\n\t\t$ret = '';\n\t\t$maxSendNow = varset($this->plugprefs['pm_max_send'], 100); // Max # of messages before having to queue\n\n\t\tif (isset($vars['pm_from']))\n\t\t{\t// Doing bulk send off cron task\n\t\t\t$info = array();\n\t\t\tforeach ($vars as $k => $v)\n\t\t\t{\n\t\t\t\tif (strpos($k, 'pm_') === 0)\n\t\t\t\t{\n\t\t\t\t\t$info[$k] = $v;\n\t\t\t\t\tunset($vars[$k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t// Send triggered by user - may be immediate or bulk dependent on number of recipients\n\t\t\t$vars['options'] = '';\n\t\t\tif(isset($vars['receipt']) && $vars['receipt']) {$pm_options .= '+rr+';\t}\n\t\t\tif(isset($vars['uploaded']))\n\t\t\t{\n\t\t\t\tforeach($vars['uploaded'] as $u)\n\t\t\t\t{\n\t\t\t\t\tif (!isset($u['error']) || !$u['error'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pmsize += $u['size'];\n\t\t\t\t\t\t$a_list[] = $u['name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$attachlist = implode(chr(0), $a_list);\n\t\t\t}\n\t\t\t$pmsize += strlen($vars['pm_message']);\n\n\t\t\t$pm_subject = trim($tp->toDB($vars['pm_subject']));\n\t\t\t$pm_message = trim($tp->toDB($vars['pm_message']));\n\n\t\t\tif (!$pm_subject && !$pm_message && !$attachlist)\n\t\t\t{ // Error - no subject, no message body and no uploaded files\n\t\t\t\treturn LAN_PM_65;\n\t\t\t}\n\n\t\t\t// Most of the pm info is fixed - just need to set the 'to' user on each send\n\t\t\t$info = array(\n\t\t\t\t'pm_from' => $vars['from_id'],\n\t\t\t\t'pm_sent' => time(),\t\t\t\t\t/* Date sent */\n\t\t\t\t'pm_read' => 0,\t\t\t\t\t\t\t/* Date read */\n\t\t\t\t'pm_subject' => $pm_subject,\n\t\t\t\t'pm_text' => $pm_message,\n\t\t\t\t'pm_sent_del' => 0,\t\t\t\t\t\t/* Set when can delete */\n\t\t\t\t'pm_read_del' => 0,\t\t\t\t\t\t/* set when can delete */\n\t\t\t\t'pm_attachments' => $attachlist,\n\t\t\t\t'pm_option' => $pm_options,\t\t\t\t/* Options associated with PM - '+rr' for read receipt */\n\t\t\t\t'pm_size' => $pmsize\n\t\t\t\t);\n\t\t}\n\n\t\tif(isset($vars['to_userclass']) || isset($vars['to_array']))\n\t\t{\n\t\t\tif(isset($vars['to_userclass']))\n\t\t\t{\n\t\t\t\t$toclass = e107::getUserClass()->uc_get_classname($vars['pm_userclass']);\n\t\t\t\t$tolist = $this->get_users_inclass($vars['pm_userclass']);\n\t\t\t\t$ret .= LAN_PM_38.\": {$toclass}<br />\";\n\t\t\t\t$class = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tolist = $vars['to_array'];\n\t\t\t\t$class = FALSE;\n\t\t\t}\n\t\t\t// Sending multiple PMs here. If more than some number ($maxSendNow), need to split into blocks.\n\t\t\tif (count($tolist) > $maxSendNow)\n\t\t\t{\n\t\t\t\t$totalSend = count($tolist);\n\t\t\t\t$targets = array_chunk($tolist, $maxSendNow);\t\t// Split into a number of lists, each with the maximum number of elements (apart from the last block, of course)\n\t\t\t\tunset($tolist);\n\t\t\t\t$array = new ArrayData;\n\t\t\t\t$pmInfo = $info;\n\t\t\t\t$genInfo = array(\n\t\t\t\t\t'gen_type' => 'pm_bulk',\n\t\t\t\t\t'gen_datestamp' => time(),\n\t\t\t\t\t'gen_user_id' => USERID,\n\t\t\t\t\t'gen_ip' => ''\n\t\t\t\t\t);\n\t\t\t\tfor ($i = 0; $i < count($targets) - 1; $i++)\n\t\t\t\t{\t// Save the list in the 'generic' table\n\t\t\t\t\t$pmInfo['to_array'] = $targets[$i];\t\t\t// Should be in exactly the right format\n\t\t\t\t\t$genInfo['gen_intdata'] = count($targets[$i]);\n\t\t\t\t\t$genInfo['gen_chardata'] = $array->WriteArray($pmInfo,TRUE);\n\t\t\t\t\t$sql->insert('generic', array('data' => $genInfo, '_FIELD_TYPES' => array('gen_chardata' => 'string')));\t// Don't want any of the clever sanitising now\n\t\t\t\t}\n\t\t\t\t$toclass .= ' ['.$totalSend.']';\n\t\t\t\t$tolist = $targets[count($targets) - 1];\t\t// Send the residue now (means user probably isn't kept hanging around too long if sending lots)\n\t\t\t\tunset($targets);\n\t\t\t}\n\t\t\tforeach($tolist as $u)\n\t\t\t{\n\t\t\t\tset_time_limit(30);\n\t\t\t\t$info['pm_to'] = intval($u['user_id']);\t\t// Sending to a single user now\n\n\t\t\t\tif($pmid = $sql->insert('private_msg', $info))\n\t\t\t\t{\n\t\t\t\t\t$info['pm_id'] = $pmid;\n\t\t\t\t\te107::getEvent()->trigger('user_pm_sent', $info);\n\n\t\t\t\t\tunset($info['pm_id']); // prevent it from being used on the next record.\n\n\t\t\t\t\tif($class == FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$toclass .= $u['user_name'].', ';\n\t\t\t\t\t}\n\t\t\t\t\tif(check_class($this->plugprefs['notify_class'], $u['user_class']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$vars['to_info'] = $u;\n\t\t\t\t\t\t$this->pm_send_notify($u['user_id'], $vars, $pmid, count($a_list));\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\t$ret .= LAN_PM_39.\": {$u['user_name']} <br />\";\n\t\t\t\t\te107::getMessage()->addDebug($sql->getLastErrorText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($addOutbox)\n\t\t\t{\n\t\t\t\t$info['pm_to'] = $toclass;\t\t// Class info to put into outbox\n\t\t\t\t$info['pm_sent_del'] = 0;\n\t\t\t\t$info['pm_read_del'] = 1;\n\t\t\t\tif(!$pmid = $sql->insert('private_msg', $info))\n\t\t\t\t{\n\t\t\t\t\t$ret .= LAN_PM_41.'<br />';\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\t// Sending to a single person\n\t\t\t$info['pm_to'] = intval($vars['to_info']['user_id']);\t\t// Sending to a single user now\n\t\t\tif($pmid = $sql->insert('private_msg', $info))\n\t\t\t{\n\t\t\t\t$info['pm_id'] = $pmid;\n\t\t\t\te107::getEvent()->trigger('user_pm_sent', $info);\n\t\t\t\tif(check_class($this->plugprefs['notify_class'], $vars['to_info']['user_class']))\n\t\t\t\t{\n\t\t\t\t\tset_time_limit(30);\n\t\t\t\t\t$this->pm_send_notify($vars['to_info']['user_id'], $vars, $pmid, count($a_list));\n\t\t\t\t}\n\t\t\t\t$ret .= LAN_PM_40.\": {$vars['to_info']['user_name']}<br />\";\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "3d48a900a136f7a58fc6a6e743d27a8a", "score": "0.56366503", "text": "function mail_wrap($subject_tag,$message_raw,$to_email=NULL,$to_name=NULL,$from_email='',$from_name='',$priority=3,$attachments=NULL,$no_cc=false,$as=NULL,$as_admin=false,$in_html=false,$coming_out_of_queue=false,$mail_template='MAIL',$bypass_queue=false)\n{\n\tif (running_script('stress_test_loader')) return NULL;\n\n\tglobal $EMAIL_ATTACHMENTS;\n\t$EMAIL_ATTACHMENTS=array();\n\n\trequire_code('site');\n\trequire_code('mime_types');\n\n\t$bypass_queue=($bypass_queue || ($priority<3) || (strpos(serialize($attachments),'tmpfile')!==false));\n\n\tif (is_null($as)) $as=$GLOBALS['FORUM_DRIVER']->get_guest_id();\n\n\tif (!$coming_out_of_queue)\n\t{\n\t\t$GLOBALS['SITE_DB']->query('DELETE FROM '.get_table_prefix().'logged_mail_messages WHERE m_date_and_time<'.strval(time()-60*60*24*14).' AND m_queued=0'); // Log it all for 2 weeks, then delete\n\n\t\t$through_queue=(!$bypass_queue) && (((cron_installed()) && (get_option('mail_queue')==='1'))) || (get_option('mail_queue_debug')==='1');\n\n\t\t$GLOBALS['SITE_DB']->query_insert('logged_mail_messages',array(\n\t\t\t'm_subject'=>ocp_mb_substr($subject_tag,0,255),\n\t\t\t'm_message'=>$message_raw,\n\t\t\t'm_to_email'=>serialize($to_email),\n\t\t\t'm_to_name'=>serialize($to_name),\n\t\t\t'm_from_email'=>$from_email,\n\t\t\t'm_from_name'=>$from_name,\n\t\t\t'm_priority'=>$priority,\n\t\t\t'm_attachments'=>serialize($attachments),\n\t\t\t'm_no_cc'=>$no_cc?1:0,\n\t\t\t'm_as'=>$as,\n\t\t\t'm_as_admin'=>$as_admin?1:0,\n\t\t\t'm_in_html'=>$in_html?1:0,\n\t\t\t'm_date_and_time'=>time(),\n\t\t\t'm_member_id'=>get_member(),\n\t\t\t'm_url'=>get_self_url(true),\n\t\t\t'm_queued'=>$through_queue?1:0,\n\t\t\t'm_template'=>$mail_template,\n\t\t),false,!$through_queue); // No errors if we don't NEED this to work\n\n\t\tif ($through_queue) return NULL;\n\t}\n\n\tif (count($attachments)==0) $attachments=NULL;\n\n\tglobal $SENDING_MAIL;\n\tif ($SENDING_MAIL) return NULL;\n\t$SENDING_MAIL=true;\n\n\t// To and from, and language\n\t$staff_address=get_option('staff_address');\n\tif (is_null($to_email)) $to_email=array($staff_address);\n\t$to_email_new=array();\n\tforeach ($to_email as $test_address)\n\t{\n\t\tif ($test_address!='') $to_email_new[]=$test_address;\n\t}\n\t$to_email=$to_email_new;\n\tif ($to_email==array())\n\t{\n\t\t$SENDING_MAIL=false;\n\t\treturn NULL;\n\t}\n\tif ($to_email[0]==$staff_address)\n\t{\n\t\t$lang=get_site_default_lang();\n\t} else\n\t{\n\t\t$lang=user_lang();\n\t\tif (method_exists($GLOBALS['FORUM_DRIVER'],'get_member_from_email_address'))\n\t\t{\n\t\t\t$member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_email_address($to_email[0]);\n\t\t\tif (!is_null($member_id))\n\t\t\t{\n\t\t\t\t$lang=get_lang($member_id);\n\t\t\t}\n\t\t}\n\t}\n\tif (is_null($to_name))\n\t{\n\t\tif ($to_email[0]==$staff_address)\n\t\t{\n\t\t\t$to_name=get_site_name();\n\t\t} else\n\t\t{\n\t\t\t$to_name='';\n\t\t}\n\t}\n\tif ($from_email=='') $from_email=get_option('staff_address');\n\tif ($from_name=='') $from_name=get_site_name();\n\t$from_email=str_replace(\"\\r\",'',$from_email);\n\t$from_email=str_replace(\"\\n\",'',$from_email);\n\t$from_name=str_replace(\"\\r\",'',$from_name);\n\t$from_name=str_replace(\"\\n\",'',$from_name);\n\n\t$theme=method_exists($GLOBALS['FORUM_DRIVER'],'get_theme')?$GLOBALS['FORUM_DRIVER']->get_theme():'default';\n\tif ($theme=='default') // Sucks, probably due to sending from Admin Zone...\n\t{\n\t\t$theme=$GLOBALS['FORUM_DRIVER']->get_theme(''); // ... So get theme of welcome zone\n\t}\n\n\t// Line termination is fiddly. It is safer to rely on sendmail supporting \\n than undetectable-qmail/postfix-masquerading-as-sendmail not supporting the correct \\r\\n\n\t/*$sendmail_path=ini_get('sendmail_path');\n\tif ((strpos($sendmail_path,'qmail')!==false) || (strpos($sendmail_path,'sendmail')!==false))\n\t\t$line_term=\"\\n\";\n\telse\n\t\t$line_term=\"\\r\\n\";\n\t*/\n\tif ((strtoupper(substr(PHP_OS,0,3))=='WIN') || (get_option('smtp_sockets_use')=='1'))\n\t{\n\t\t$line_term=\"\\r\\n\";\n\t/*} elseif (strtoupper(substr(PHP_OS,0,3))=='MAC')\n\t{\n\t\t$line_term=\"\\r\";*/\n\t} else\n\t{\n\t\t$line_term=\"\\n\";\n\t}\n\n\t// We use the boundary to seperate message parts\n\t$_boundary=uniqid('ocPortal',true);\n\t$boundary=$_boundary.'_1';\n\t$boundary2=$_boundary.'_2';\n\t$boundary3=$_boundary.'_3';\n\n\t// Our subject\n\t$subject=do_template('MAIL_SUBJECT',array('_GUID'=>'44a57c666bb00f96723256e26aade9e5','SUBJECT_TAG'=>$subject_tag),$lang,false,NULL,'.tpl','templates',$theme);\n\t$tightened_subject=$subject->evaluate($lang); // Note that this is slightly against spec, because characters aren't forced to be printable us-ascii. But it's better we allow this (which works in practice) than risk incompatibility via charset-base64 encoding.\n\t$tightened_subject=str_replace(chr(10),'',$tightened_subject);\n\t$tightened_subject=str_replace(chr(13),'',$tightened_subject);\n\n\t$regexp='#^[\\x'.dechex(32).'-\\x'.dechex(126).']*$#';\n\tif (preg_match($regexp,$tightened_subject)==0) $tightened_subject='=?'.do_lang('charset',NULL,NULL,NULL,$lang).'?B?'.base64_encode($tightened_subject).\"?=\";\n\tif (preg_match($regexp,$from_name)==0) $from_name='=?'.do_lang('charset',NULL,NULL,NULL,$lang).'?B?'.base64_encode($from_name).\"?=\";\n\tif (is_array($to_name))\n\t{\n\t\tforeach ($to_name as $i=>$_to_name)\n\t\t{\n\t\t\tif (preg_match($regexp,$_to_name)==0) $to_name[$i]='=?'.do_lang('charset',NULL,NULL,NULL,$lang).'?B?'.base64_encode($_to_name).\"?=\";\n\t\t}\n\t} else\n\t{\n\t\tif (preg_match($regexp,$to_name)==0) $to_name='=?'.do_lang('charset',NULL,NULL,NULL,$lang).'?B?'.base64_encode($to_name).\"?=\";\n\t}\n\n\t$simplify_when_can=true; // Used for testing. Not actually needed\n\n\t// Evaluate message. Needs doing early so we know if we have any headers\n\t$GLOBALS['NO_LINK_TITLES']=true;\n\tglobal $LAX_COMCODE;\n\t$temp=$LAX_COMCODE;\n\t$LAX_COMCODE=true;\n\t$html_content=comcode_to_tempcode($message_raw,$as,$as_admin);\n\t$LAX_COMCODE=$temp;\n\t$GLOBALS['NO_LINK_TITLES']=false;\n\t$attachments=array_merge(is_null($attachments)?array():$attachments,$EMAIL_ATTACHMENTS);\n\n\t// Headers\n\t$website_email=get_option('website_email');\n\tif ($website_email=='') $website_email=$from_email;\n\tif (get_value('use_true_from')!=='1')\n\t{\n\t\t$headers='From: \"'.$from_name.'\" <'.$website_email.'>'.$line_term;\n\t} else\n\t{\n\t\t$headers='From: <'.$from_email.'>'.$line_term;\n\t}\n\t$headers.='Reply-To: <'.$from_email.'>'.$line_term;\n\t$headers.='Return-Path: <'.$website_email.'>'.$line_term;\n\t$headers.='X-Sender: <'.$website_email.'>'.$line_term;\n\t$cc_address=$no_cc?'':get_option('cc_address');\n\tif (($cc_address!='') && (!in_array($cc_address,$to_email))) $headers.=((get_option('bcc')=='1')?'Bcc: <':'Cc: <').$cc_address.'>'.$line_term;\n\t$headers.='Message-ID: <'.$_boundary.'@'.get_domain().'>'.$line_term;\n\t$headers.='X-Priority: '.strval($priority).$line_term;\n\t$brand_name=get_value('rebrand_name');\n\tif (is_null($brand_name)) $brand_name='ocPortal';\n\t$headers.='X-Mailer: '.$brand_name.$line_term;\n\t$headers.='MIME-Version: 1.0'.$line_term;\n\tif ((!empty($attachments)) || (!$simplify_when_can))\n\t{\n\t\t$headers.='Content-Type: multipart/mixed; boundary=\"'.$boundary.'\"';\n\t} else\n\t{\n\t\t$headers.='Content-Type: multipart/alternative; boundary=\"'.$boundary2.'\"';\n\t}\n\t$sending_message='';\n\t$sending_message.='This is a multi-part message in MIME format.'.$line_term.$line_term;\n\tif ((!empty($attachments)) || (!$simplify_when_can))\n\t{\n\t\t$sending_message.='--'.$boundary.$line_term;\n\t\t$sending_message.='Content-Type: multipart/alternative; boundary=\"'.$boundary2.'\"'.$line_term.$line_term.$line_term;\n\t}\n\n\tglobal $CID_IMG_ATTACHMENT;\n\t$CID_IMG_ATTACHMENT=array();\n\n\t// Message starts (actually: it is kind of in header form also as it uses mime multi-part)\n\tif (!$in_html)\n\t{\n\t\t$_html_content=$html_content->evaluate($lang);\n\t\t$_html_content=preg_replace('#(keep|for)_session=[\\d\\w]*#','filtered=1',$_html_content);\n\t\t$message_html=(strpos($_html_content,'<html')!==false)?make_string_tempcode($_html_content):do_template($mail_template,array('_GUID'=>'b23069c20202aa59b7450ebf8d49cde1','CSS'=>'{CSS}','LOGOURL'=>get_logo_url(''),/*'LOGOMAP'=>get_option('logo_map'),*/'LANG'=>$lang,'TITLE'=>$subject,'CONTENT'=>$_html_content),$lang,false,NULL,'.tpl','templates',$theme);\n\t\t$css=css_tempcode(true,true,$message_html->evaluate($lang),$theme);\n\t\t$_css=$css->evaluate($lang);\n\t\tif (get_option('allow_ext_images')!='1')\n\t\t{\n\t\t\t$_css=preg_replace_callback('#url\\([\"\\']?(https?://[^\"]*)[\"\\']?\\)#U','_mail_css_rep_callback',$_css);\n\t\t}\n\t\t$html_evaluated=$message_html->evaluate($lang);\n\t\t$html_evaluated=str_replace('{CSS}',$_css,$html_evaluated);\n\n\t\t// Cleanup the Comcode a bit\n\t\t$message_plain=comcode_to_clean_text($message_raw);\n\t} else\n\t{\n\t\t$html_evaluated=$message_raw;\n\t}\n\n\n\t$base64_encode=(get_value('base64_emails')==='1'); // More robust, but more likely to be spam-blocked, and some servers can scramble it.\n\n\t// Plain version\n\tif (!$in_html)\n\t{\n\t\t$sending_message.='--'.$boundary2.$line_term;\n\t\t$sending_message.='Content-Type: text/plain; charset='.((preg_match($regexp,$message_plain)==0)?do_lang('charset',NULL,NULL,NULL,$lang):'us-ascii').$line_term; // '; name=\"message.txt\"'.\tOutlook doesn't like: makes it think it's an attachment\n\t\tif ($base64_encode)\n\t\t{\n\t\t\t$sending_message.='Content-Transfer-Encoding: base64'.$line_term.$line_term;\n\t\t\t$sending_message.=chunk_split(base64_encode(unixify_line_format($message_plain)).$line_term,76,$line_term);\n\t\t} else\n\t\t{\n\t\t\t$sending_message.='Content-Transfer-Encoding: 8bit'.$line_term.$line_term;\n\t\t\t$sending_message.=wordwrap(str_replace(chr(10),$line_term,unixify_line_format($message_plain)).$line_term,998,$line_term);\n\t\t}\n\t}\n\n\t// HTML version\n\t$sending_message.='--'.$boundary2.$line_term;\n\t$sending_message.='Content-Type: multipart/related; boundary=\"'.$boundary3.'\"'.$line_term.$line_term.$line_term;\n\t$sending_message.='--'.$boundary3.$line_term;\n\t$sending_message.='Content-Type: text/html; charset='.((preg_match($regexp,$html_evaluated)==0)?do_lang('charset',NULL,NULL,NULL,$lang):'us-ascii').$line_term; // .'; name=\"message.html\"'.\tOutlook doesn't like: makes it think it's an attachment\n\tif (get_option('allow_ext_images')!='1')\n\t{\n\t\t$html_evaluated=preg_replace_callback('#<img\\s([^>]*)src=\"(https?://[^\"]*)\"#U','_mail_img_rep_callback',$html_evaluated);\n\t\t$matches=array();\n\t\tforeach (array('#<([^\"<>]*\\s)style=\"([^\"]*)\"#','#<style( [^<>]*)?'.'>(.*)</style>#Us') as $over)\n\t\t{\n\t\t\t$num_matches=preg_match_all($over,$html_evaluated,$matches);\n\t\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t\t{\n\t\t\t\t$altered_inner=preg_replace_callback('#url\\([\"\\']?(https?://[^\"]*)[\"\\']?\\)#U','_mail_css_rep_callback',$matches[2][$i]);\n\t\t\t\tif ($matches[2][$i]!=$altered_inner)\n\t\t\t\t{\n\t\t\t\t\t$altered_outer=str_replace($matches[2][$i],$altered_inner,$matches[0][$i]);\n\t\t\t\t\t$html_evaluated=str_replace($matches[0][$i],$altered_outer,$html_evaluated);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tforeach ($CID_IMG_ATTACHMENT as $id=>$img) // Make sure all inline images are referenced with img tags, otherwise some e-mail software may show it as an attachment\n\t{\n\t\t$html_evaluated.='<!-- <img src=\"cid:'.$id.'\" /> -->';\n\t}\n\n\tif ($base64_encode)\n\t{\n\t\t$sending_message.='Content-Transfer-Encoding: base64'.$line_term.$line_term;\n\t\t$sending_message.=chunk_split(base64_encode(unixify_line_format($html_evaluated)).$line_term,76,$line_term);\n\t} else\n\t{\n\t\t$sending_message.='Content-Transfer-Encoding: 8bit'.$line_term.$line_term; // Requires RFC 1652\n\t\t$sending_message.=wordwrap(str_replace(chr(10),$line_term,unixify_line_format($html_evaluated)).$line_term,998,$line_term);\n\t}\n\t$total_filesize=0;\n\tforeach ($CID_IMG_ATTACHMENT as $id=>$img)\n\t{\n\t\t$sending_message.='--'.$boundary3.$line_term;\n\t\t$file_path_stub=convert_url_to_path($img);\n\t\t$mime_type=get_mime_type(get_file_extension($img));\n\t\t$filename=basename($img);\n\t\tif (!is_null($file_path_stub))\n\t\t{\n\t\t\t$total_filesize+=@filesize($file_path_stub);\n\t\t\tif ($total_filesize>1024*1024*5) continue; // Too large to process into an email\n\n\t\t\t$file_contents=@file_get_contents($file_path_stub);\n\t\t} else\n\t\t{\n\t\t\t$file_contents=http_download_file($img,NULL,false);\n\t\t\t$total_filesize+=strlen($file_contents);\n\t\t\tif ($total_filesize>=1024*1024*5) continue; // Too large to process into an email\n\t\t\tif (!is_null($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'])) $mime_type=$GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'];\n\t\t\tif (!is_null($GLOBALS['HTTP_FILENAME'])) $filename=$GLOBALS['HTTP_FILENAME'];\n\t\t}\n\t\t$sending_message.='Content-Type: '.str_replace(\"\\r\",'',str_replace(\"\\n\",'',$mime_type)).'; name=\"'.str_replace(\"\\r\",'',str_replace(\"\\n\",'',$filename)).'\"'.$line_term;\n\t\t$sending_message.='Content-Transfer-Encoding: base64'.$line_term;\n\t\t$sending_message.='Content-ID: <'.$id.'>'.$line_term;\n\t\t$sending_message.='Content-Disposition: inline; filename=\"'.str_replace(\"\\r\",'',str_replace(\"\\n\",'',$filename)).'\"'.$line_term.$line_term;\n\t\tif (is_string($file_contents))\n\t\t\t$sending_message.=chunk_split(base64_encode($file_contents),76,$line_term);\n\t}\n\t$sending_message.=$line_term.'--'.$boundary3.'--'.$line_term;\n\n\t$sending_message.=$line_term.'--'.$boundary2.'--'.$line_term;\n\n\t// Attachments\n\tif (!empty($attachments))\n\t{\n\t\tforeach ($attachments as $path=>$filename)\n\t\t{\n\t\t\t$sending_message.='--'.$boundary.$line_term;\n\t\t\t$sending_message.='Content-Type: '.get_mime_type(get_file_extension($filename)).$line_term; // .'; name=\"'.str_replace(\"\\r\",'',str_replace(\"\\n\",'',$filename)).'\"' http://www.imc.org/ietf-822/old-archive2/msg02121.html\n\t\t\t$sending_message.='Content-Transfer-Encoding: base64'.$line_term;\n\t\t\t$sending_message.='Content-Disposition: attachment; filename=\"'.str_replace(\"\\r\",'',str_replace(\"\\n\",'',$filename)).'\"'.$line_term.$line_term;\n\n\t\t\tif (strpos($path,'://')===false)\n\t\t\t{\n\t\t\t\t$sending_message.=chunk_split(base64_encode(file_get_contents($path)),76,$line_term);\n\t\t\t} else\n\t\t\t{\n\t\t\t\trequire_code('files');\n\t\t\t\t$sending_message.=chunk_split(base64_encode(http_download_file($path)),76,$line_term);\n\t\t\t}\n\t\t}\n\n\t\t$sending_message.=$line_term.'--'.$boundary.'--'.$line_term;\n\t}\n\n\t// Support for SMTP sockets rather than PHP mail()\n\t$error=NULL;\n\tif (get_option('smtp_sockets_use')=='1')\n\t{\n\t\t$worked=false;\n\n\t\t$host=get_option('smtp_sockets_host');\n\t\t$port=intval(get_option('smtp_sockets_port'));\n\n\t\t$errno=0;\n\t\t$errstr='';\n\t\tforeach ($to_email as $i=>$to)\n\t\t{\n\t\t\t$socket=@fsockopen($host,$port,$errno,$errstr,30.0);\n\t\t\tif ($socket!==false)\n\t\t\t{\n\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t$base_url=parse_url(get_base_url());\n\t\t\t\t$domain=$base_url['host'];\n\n\t\t\t\t// Login if necessary\n\t\t\t\t$username=get_option('smtp_sockets_username');\n\t\t\t\t$password=get_option('smtp_sockets_password');\n\t\t\t\tif ($username!='')\n\t\t\t\t{\n\t\t\t\t\tfwrite($socket,'EHLO '.$domain.\"\\r\\n\");\n\t\t\t\t\t$rcv=fread($socket,1024);\n\n\t\t\t\t\tfwrite($socket,\"AUTH LOGIN\\r\\n\");\n\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\tif (strtolower(substr($rcv,0,3))=='334')\n\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($socket,base64_encode($username).\"\\r\\n\");\n\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\tif ((strtolower(substr($rcv,0,3))=='235') || (strtolower(substr($rcv,0,3))=='334'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfwrite($socket,base64_encode($password).\"\\r\\n\");\n\t\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\t\tif (strtolower(substr($rcv,0,3))=='235')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t} else $error=do_lang('MAIL_ERROR_CONNECT_PASSWORD').' ('.str_replace($password,'*',$rcv).')';\n\t\t\t\t\t\t} else $error=do_lang('MAIL_ERROR_CONNECT_USERNAME').' ('.$rcv.')';\n\t\t\t\t\t} else $error=do_lang('MAIL_ERROR_CONNECT_AUTH').' ('.$rcv.')';\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tfwrite($socket,'HELO '.$domain.\"\\r\\n\");\n\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t}\n\n\t\t\t\tif (is_null($error))\n\t\t\t\t{\n\t\t\t\t\t$smtp_from_address=get_option('smtp_from_address');\n\t\t\t\t\tif ($smtp_from_address=='') $smtp_from_address=$website_email;\n\t\t\t\t\tfwrite($socket,'MAIL FROM:<'.$smtp_from_address.\">\\r\\n\");\n\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\tif ((strtolower(substr($rcv,0,3))=='250') || (strtolower(substr($rcv,0,3))=='251'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sent_one=false;\n\t\t\t\t\t\tfwrite($socket,\"RCPT TO:<\".$to_email[$i].\">\\r\\n\");\n\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\tif ((strtolower(substr($rcv,0,3))!='250') && (strtolower(substr($rcv,0,3))!='251'))\n\t\t\t\t\t\t\t$error=do_lang('MAIL_ERROR_TO').' ('.$rcv.')'.' '.$to_email[$i];\n\t\t\t\t\t\telse $sent_one=true;\n\t\t\t\t\t\tif ($sent_one)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfwrite($socket,\"DATA\\r\\n\");\n\t\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\t\tif (strtolower(substr($rcv,0,3))=='354')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_to_name=preg_replace('#@.*$#','',is_array($to_name)?$to_name[$i]:$to_name); // preg_replace is because some servers may reject sending names that look like e-mail addresses. ocP tries this from recommend module.\n\t\t\t\t\t\t\t\tif (count($to_email)==1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($_to_name=='')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfwrite($socket,'To: '.$to_email[$i].\"\\r\\n\");\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfwrite($socket,'To: '.$_to_name.' <'.$to_email[$i].'>'.\"\\r\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfwrite($socket,'To: '.$_to_name.\"\\r\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfwrite($socket,'Subject: '.$tightened_subject.\"\\r\\n\");\n\t\t\t\t\t\t\t\t$headers=preg_replace('#^\\.#m','..',$headers);\n\t\t\t\t\t\t\t\t$sending_message=preg_replace('#^\\.#m','..',$sending_message);\n\t\t\t\t\t\t\t\tfwrite($socket,$headers.\"\\r\\n\\r\\n\");\n\t\t\t\t\t\t\t\tfwrite($socket,$sending_message);\n\t\t\t\t\t\t\t\tfwrite($socket,\"\\r\\n.\\r\\n\");\n\t\t\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\t\t\tif (strtolower(substr($rcv,0,3))!='250')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$error=do_lang('MAIL_ERROR_DATA').' ('.$rcv.')';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfwrite($socket,\"QUIT\\r\\n\");\n\t\t\t\t\t\t\t\t$rcv=fread($socket,1024);\n\t\t\t\t\t\t\t} else $error=do_lang('MAIL_ERROR_DATA').' ('.$rcv.')';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else $error=do_lang('MAIL_ERROR_FROM').' ('.$rcv.')';\n\n\t\t\t\t\tif (@fwrite($socket,\"RSET\\r\\n\")===false) // Cut out. At least one server does this\n\t\t\t\t\t{\n\t\t\t\t\t\t@fclose($socket);\n\t\t\t\t\t\t$socket=NULL;\n\t\t\t\t\t} else $rcv=fread($socket,1024);\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($socket)) fclose($socket);\n\t\t\t\tif (is_null($error)) $worked=true;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$error=do_lang('MAIL_ERROR_CONNECT',$host,strval($port));\n\t\t\t}\n\t\t}\n\t} else\n\t{\n\t\t$worked=false;\n\t\tforeach ($to_email as $i=>$to)\n\t\t{\n\t\t\t//exit($headers.chr(10).$sending_message);\n\t\t\t$GLOBALS['SUPPRESS_ERROR_DEATH']=true;\n\n\t\t\t$additional='';\n\t\t\tif (get_option('enveloper_override')=='1')\n\t\t\t{\n\t\t\t\trequire_code('type_validation');\n\t\t\t\tif (is_valid_email_address($website_email)) $additional='-f '.$website_email;\n\t\t\t}\n\t\t\t$_to_name=preg_replace('#@.*$#','',is_array($to_name)?$to_name[$i]:$to_name); // preg_replace is because some servers may reject sending names that look like e-mail addresses. ocP tries this from recommend module.\n\t\t\tif (($_to_name=='') || (strtoupper(substr(PHP_OS,0,3))=='WIN'))\n\t\t\t{\n\t\t\t\t$to_line=$to;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$to_line='\"'.$_to_name.'\" <'.$to.'>';\n\t\t\t}\n\t\t\t//if (function_exists('mb_language')) mb_language('en');\tStop overridden mbstring mail function from messing and base64'ing stuff. Actually we don't need this as we make sure to pass through as headers with blank message, bypassing any filtering.\n\t\t\tif (str_replace(array('on','true','yes'),array('1','1','1'),strtolower(ini_get('safe_mode')))=='1')\n\t\t\t{\n\t\t\t\t$worked=mail($to_line,$tightened_subject,$sending_message,$headers);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$worked=mail($to_line,$tightened_subject,$sending_message,$headers,$additional);\n\t\t\t}\n\t\t\tif ((!$worked) && (isset($php_errormsg)))\n\t\t\t{\n\t\t\t\t$error=$php_errormsg;\n\t\t\t}\n\t\t\t$GLOBALS['SUPPRESS_ERROR_DEATH']=false;\n\t\t}\n\t}\n\n\tif (!$worked)\n\t{\n\t\t$SENDING_MAIL=false;\n\t\tif (get_param_integer('keep_hide_mail_failure',0)==0)\n\t\t{\n\t\t\trequire_code('site');\n\t\t\tattach_message(!is_null($error)?make_string_tempcode($error):do_lang_tempcode('MAIL_FAIL',escape_html(get_option('staff_address'))),'warn');\n\t\t} else\n\t\t{\n\t\t\treturn warn_screen(get_page_title('ERROR_OCCURRED'),do_lang_tempcode('MAIL_FAIL',escape_html(get_option('staff_address'))));\n\t\t}\n\t}\n\n\t$SENDING_MAIL=false;\n\treturn NULL;\n}", "title": "" }, { "docid": "274f8282ab5f5bf64d929f700e11dbad", "score": "0.56285626", "text": "public function send_remainderdermail($hash = \"\") {\r\n if ($hash == '9d3bb895f22bf0afa958d68c2a58ded7') {\r\n $mails = $this->mailqueue_model->get_notdelivered();\r\n foreach ($mails as $m) {\r\n $message = $this->load->view('templates/emailtemplate', json_decode($m['message']), TRUE);\r\n $attachment = $m['attachment'];\r\n\r\n if ($attachment !== NULL) {\r\n $attachment = json_decode($m['attachment']);\r\n }\r\n if (send_mail($m['to'], $m['name'], $m['subject'], $message, $m['cc'], $m['bcc'], $attachment)) {\r\n $this->mailqueue_model->update_mailqueue(array('status' => 2), $m['id']);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7ad7d247dd52a9cb6440b4d18097166a", "score": "0.56170255", "text": "protected function _sendMail()\n {\n $email = $this->header . $this->EOL . $this->body;\n $this->_lastMessageId = $this->_ses->sendRawEmail($email);\n }", "title": "" }, { "docid": "ee9796d530f8adb8a0935492ec1b37d6", "score": "0.56095284", "text": "public function sendQueue()\n\t{\n\t\tif (count($this->queue) == 0) return;\n\t\t$str = json_encode($this->queue);\n\t\tif ($str === false)\n\t\t{\n\t\t\tsendCommand(self::CMD_ERRDISP, 'JSON encoding error: (' .\n\t\t\t\tjson_last_error() . ') ' . json_last_error_msg());\n\t\t\texit(1);\n\t\t}\n\t\techo self::TYPE_MULTI . $str;\n\t\t$this->queue = array();\n\t\t$this->codeStatus = false;\n\t}", "title": "" }, { "docid": "a3f88932c376b72e5be5314d7d6a06e4", "score": "0.5603837", "text": "public function execute() {\n\t\t$this->damagedDatabase = DamagedDatabase::get();\n\n\t\t$messages = $this->damagedDatabase->fetchRetryMessages(\n\t\t\t$this->getOption( 'max-messages' )\n\t\t);\n\t\t$stats = [];\n\t\tforeach ( $messages as $message ) {\n\t\t\t$queueName = $message['original_queue'];\n\t\t\tunset( $message['original_queue'] );\n\n\t\t\t// leave the source fields intact\n\t\t\t$queue = QueueWrapper::getQueue( $queueName );\n\t\t\t$queue->push( $message );\n\n\t\t\t$this->damagedDatabase->deleteMessage( $message );\n\t\t\tif ( isset( $stats[$queueName] ) ) {\n\t\t\t\t$stats[$queueName]++;\n\t\t\t} else {\n\t\t\t\t$stats[$queueName] = 1;\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $stats as $queueName => $count ) {\n\t\t\tLogger::info(\n\t\t\t\t\"Requeued $count messages to $queueName.\"\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "8d3291f878fe9e892ec5e721d7ed0136", "score": "0.56011635", "text": "abstract protected function _sendmail();", "title": "" }, { "docid": "a5322a118febd7adf4230661baa085d2", "score": "0.55899566", "text": "function reply($contact_id = 0) {\n $contact_id = base64_decode($contact_id);\n if (!$this->common_model->isLoggedIn()) {\n redirect(base_url() . \"backend/login\");\n }\n $data = $this->common_model->commonFunction();\n $data['global'] = $this->common_model->getGlobalSettings();\n if ($this->input->post()) {\n $arr_insert_fields = array(\n \"contact_id\" => $_POST['contact_id'],\n \"message_to\" => addslashes($_POST['to']),\n \"message_from_name\" => addslashes($_POST['from_name']),\n \"message_from_email\" => addslashes($_POST['from_email']),\n// \"message_subject\" => addslashes($_POST['subject']),\n \"message_body\" => addslashes($_POST['message']),\n \"reply_date\" => date('Y-m-d H:i:s')\n );\n $last_id = $this->common_model->insertRow($arr_insert_fields, TABLES::$TRANS_CONTACT_FEEDBACK);\n $arr_update_fields = array(\n \"contact_reply_status\" => '1'\n );\n $arr_condition = array(\"contact_id\" => $_POST['contact_id']);\n $this->common_model->updateRow(TABLES::$MST_CONTACT_US, $arr_update_fields, $arr_condition);\n $mail = $this->common_model->sendEmail(array($this->input->post('to')), array(\"email\" => $data['global']['site_email'], \"name\" => $data['global']['site_title']), $this->input->post('subject'), $this->input->post('message'));\n if ($mail) {\n $this->session->set_userdata(\"msg\", \"<span class='success'>Reply message sent successfully!</span>\");\n } else {\n $this->session->set_userdata(\"msg\", \"<span class='success'>Reply message sent failed!</span>\");\n }\n redirect(base_url() . 'admin/contact-us');\n }\n $data['arr_contact'] = $this->common_model->getRecords(TABLES::$MST_CONTACT_US, \"*\", array(\"contact_id\" => intval($contact_id)));\n $data['arr_feedback_contact'] = $this->common_model->getRecords(TABLES::$TRANS_CONTACT_FEEDBACK, \"message_body,message_subject,reply_date\", array(\"contact_id\" => intval($contact_id)));\n $message = PHP_EOL . PHP_EOL . PHP_EOL . PHP_EOL;\n foreach ($data['arr_feedback_contact'] as $val) {\n $reply_msg = 'Please see below you replied on user message on ' . date($data['global']['date_format'], strtotime($val['reply_date'])) . ':- ' . PHP_EOL . PHP_EOL;\n $message .= $reply_msg . $val['message_body'] . PHP_EOL . PHP_EOL;\n }\n $reply_msg = 'Please see user message on ' . date($data['global']['date_format'], strtotime($data['arr_contact'][0]['contact_created_date'])) . ':- ' . PHP_EOL . PHP_EOL;\n $message .= $reply_msg . $data['arr_contact'][0]['contact_message'] . PHP_EOL . PHP_EOL;\n\n\n\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact_list');\n $this->template->set('arr_contact', $data['arr_contact']);\n $this->template->set('arr_feedback_contact', $data['arr_feedback_contact']);\n $this->template->set('message', $message);\n $this->template->set('reply_msg', $reply_msg);\n $this->template->set('global', $this->global_setting);\n $this->template->set_theme('default_theme');\n $this->template->set_layout('backend')\n ->title($this->global_setting['site_title'] . ' | Manage Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('sidebar', 'partials/sidebar')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('contactus/contact_us_reply');\n }", "title": "" }, { "docid": "0bc1593c6bdfb816be216f127e105529", "score": "0.5572947", "text": "function purgequeue()\r\n\t{\r\n\t\t$mainframe\t=& JFactory::getApplication();\r\n\t\t\r\n\t\t$model\t\t= $this->getModel( 'Mailqueue' );\r\n\t\t$model->purge();\r\n\t\t\r\n\t\t$message\t= JText::_('CC SENT MAIL QUEUES PURGED');\r\n\t\t$mainframe->redirect( 'index.php?option=com_community&view=mailqueue' , $message );\r\n\t}", "title": "" }, { "docid": "a9fd6c2928b05b7aa152bb2bb26e8124", "score": "0.5569256", "text": "public function execute() {\n\t\t$this->damagedDatabase = DamagedDatabase::get();\n\t\t$messages = $this->damagedDatabase->fetchRetryMessages(\n\t\t\t$this->getOption( 'max-messages' ),\n\t\t\t$this->getOption( 'date' )\n\t\t);\n\t\t$stats = [];\n\t\tforeach ( $messages as $message ) {\n\t\t\t$queueName = $message['original_queue'];\n\t\t\tunset( $message['original_queue'] );\n\n\t\t\t// leave the source fields intact\n\t\t\t$queue = QueueWrapper::getQueue( $queueName );\n\t\t\t$queue->push( $message );\n\n\t\t\t$this->damagedDatabase->deleteMessage( $message );\n\t\t\tif ( isset( $stats[$queueName] ) ) {\n\t\t\t\t$stats[$queueName]++;\n\t\t\t} else {\n\t\t\t\t$stats[$queueName] = 1;\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $stats as $queueName => $count ) {\n\t\t\tLogger::info(\n\t\t\t\t\"Requeued $count messages to $queueName.\"\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1f3b34c7afc2f32129fbc9cce7847c14", "score": "0.55626285", "text": "public function sendMailOrderPlaced();", "title": "" }, { "docid": "70c60d21cd1ca3e45799fdbfab2cabbb", "score": "0.5558927", "text": "public function resend_failed_nos()\r\n\t{\r\n\t\t$this->set_recipient($this->failed_nos);\r\n\t\t\r\n\t\t//send back the message\r\n\t\t$this->send();\r\n\t}", "title": "" }, { "docid": "d89e57b524e83112395ea9f916f12374", "score": "0.5550255", "text": "function apoc_private_message_reply() {\n\tif ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )\n\t\treturn;\n\n\t// Check the nonce and register the new message\n\tcheck_ajax_referer( 'messages_send_message' );\n\t$result = messages_new_message( array( 'thread_id' => (int) $_REQUEST['thread_id'], 'content' => $_REQUEST['content'] ) );\n\n\t// If the new message was registered successfully\n\tif ( $result ) :\n\t$user = new Apoc_User( get_current_user_id() , 'reply' ); ?>\n\t<li class=\"reply new-message\">\n\n\t\t<header class=\"reply-header\">\n\t\t\t<time class=\"reply-time\">Right Now</time>\n\t\t</header>\t\n\n\t\t<section class=\"reply-body\">\t\n\t\t\t<div class=\"reply-author\">\n\t\t\t\t<?php echo $user->block; ?>\n\t\t\t</div>\n\t\t\t<div class=\"reply-content\">\n\t\t\t\t<?php echo wpautop( stripslashes( $_REQUEST['content'] ) ); ?>\n\t\t\t</div>\n\t\t\t<?php $user->signature(); ?>\n\t\t</section>\t\t\t\t\n\t</li>\n\t\n\t<?php // Otherwise, process errors\n\telse :\n\t\techo '<p class=\"error\">There was a problem sending that reply. Please try again.</p>';\n\tendif;\n\texit;\n}", "title": "" }, { "docid": "ec9bbc3004d139abd9e0e2f92abc4437", "score": "0.55466914", "text": "public function sendImmediateEmail();", "title": "" }, { "docid": "4aa4af8dd79b6776b538eaf6b1b32036", "score": "0.5532208", "text": "public function sendForwardEmailMessage($id = 33, $pkOrNick = \"\", $body = \"my message\", $subject = \"uMail subject\"): bool;", "title": "" }, { "docid": "53af29100697ba97a1dd1f203c5bb467", "score": "0.5520592", "text": "function final_send_mail($fullfrom, $from, $emailaddress, $emailsubject, $message, $attachements = \"\", $mimeready = 'no', $post_headers = \"\", $htmlmsg = \"\" ) {\n\tdate_default_timezone_set('UTC');\n\n\t#\"\\n\"=\"\\n\";\n\t$now = time();\n\n\t# Common Headers\n\t$headers .= 'From: ' . $fullfrom .\"\\n\";\n\t$headers .= 'Reply-To: ' . $fullfrom .\"\\n\";\n\t$headers .= 'Return-Path: ' . $fullfrom .\"\\n\"; // these two to set reply address\n\t$headers .= \"Message-ID: <\". $now. \"info@\".$_SERVER['SERVER_NAME'].\">\".\"\\n\";\n\t$headers .= \"X-Mailer: RepMyBlock InHse v\". phpversion(). \"\\n\"; // These two to help avoid spam-filters\n\n\tif ( $mimeready == 'no' ) {\n\n\t\tif ( empty ($htmlmsg )) { \n\t $html_body = \"$message\";\n\t\t} else {\n\t\t\t$html_body = $htmlmsg;\n\t\t}\n\n # Boundry for marking the split & Multitype Headers\n $mime_boundary = md5(time());\n $mime_boundary_start = md5(time()+4);\n $mime_boundary_start = $mime_boundary;\n \n $headers .= 'MIME-Version: 1.0' . \"\\n\";\n //$headers .= \"Content-Type: multipart/mixed; boundary=\\\"\".$mime_boundary_start.\"\\\"\\n\";\n //$headers .= \"Content-Type: multipart/mixed; boundary=\\\"\".$mime_boundary_start.\"\\\"\\n\";\n $headers .= \"Content-Type: multipart/alternative; boundary=\\\"\".$mime_boundary_start.\"\\\"\\n\";\n \n # Setup for text OR html\n #$msg .= \"Content-Type: multipart/alternative; boundary=\\\"\".$mime_boundary .\"\\\"\".\"\\n\"; \n\t \t$msg .= MimeLogo_RepMyBlock(\"--\" . $mime_boundary ) . \"\\n\\n\";\n\t\t\n\t\t# Text Version\n $msg .= \"--\" . $mime_boundary . \"\\n\";\n $msg .= $message . \"\\n\\n\\n\";\n\t\t\n\t\t# Add The logos\n\t\t#$msg .= MimeFooter_RepMyBlock(\"--\" . $mime_boundary ) . \"\\n\\n\";\n\t\t#$msg .= \"--\".$mime_boundary.\"--\".\"\\n\\n\"; // finish with two eol's for better security. see Injection.\n\n\t\t# HTML Version\n $msg .= \"--\" . $mime_boundary_start . \"\\n\";\n $msg .= $html_body . \"\\n\\n\\n\";\n \t\t\t\n\t\t###add the atachments\n\t\tif ( ! empty ($attachements)) {\n\t foreach ($attachements as $attach) {\n\t if ( ! empty ( $attach)) {\n\t # Attachment\n\t $msg .= \"--\" . $mime_boundary_start . \"\\n\";\n\n\t // sometimes i have to send MS Word, use 'msword' instead of 'pdf'\n\t $msg .= \"Content-Type: \" . $attach[\"type\"] . \"; name=\\\"\" . $attach[\"title\"] . \"\\\"n\";\n\t $msg .= \"Content-Transfer-Encoding: base64\".\"\\n\";\n\n\t // !! This line needs TWO end of lines !! IMPORTANT !!\n\t $msg .= \"Content-Disposition: attachment; filename=\\\"\" . $attach[\"title\"] . \"\\\"\\n\\n\";\n\n\t if ( ! empty ($attach[\"enc64\"]) ) {\n\t \t$msg .= chunk_split($attach[\"body\"]);\n\t } else {\n\t $msg .= chunk_split(base64_encode($attach[\"body\"]));\n\t }\n\n\t $msg .= \"\\n\\n\";\n\t }\n\t }\n }\n\t\t\n\t\t\n\t\t\n # Finished\n $msg .= \"--\".$mime_boundary_start.\"--\".\"\\n\\n\"; // finish with two eol's for better security. see Injection.\n\n\t} else {\n\t $headers .= $post_headers;\n\t $msg = $message;\n\t $msg .= \"\\n\" . \"\\n\"; // finish with two eol's for better security. see Injection.\n\t}\n\n\t# SEND THE EMAIL\n\tini_set(\"sendmail_from\", $from); // the INI lines are to force the From Address to be used !\n\t$MailResult = mail($emailaddress, $emailsubject, $msg, $headers, '-f' . $from);\n\n\t#print \"MailResult: $MailResult<BR>\";\n\n\t### Will need to add debug to file.\n\t#echo \"<pre>\";\n\t#echo \"MAILSENT : \\nmail($emailaddress, \\n$emailsubject, \\n$headers);\";\n\t#echo \"</PRE>\";\n\tini_restore(sendmail_from);\n\n}", "title": "" }, { "docid": "72ce7ae85f9cd4aa8f7aebcce95a2810", "score": "0.55201465", "text": "private function _sendEmail () {\n if ($this->adminEmail) {\n $placeholders = '/\\{\\{([^}]+)\\}\\}/';\n $subject = $this->emailSubject;\n\n // Replace any placeholders in subject with submitted values\n preg_match_all($placeholders, $subject, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $match) {\n $pattern = '/' . $match[0] . '/';\n $replacement = $_POST[$match[1]];\n $subject = preg_replace($pattern, $replacement, $subject);\n }\n\n $email = new Email([\n 'content' => $this->_results,\n 'from' => 'do-not-reply@' . $_SERVER['SERVER_NAME'],\n 'subject' => $subject,\n 'template' => $this->emailTemplate,\n 'to' => $this->adminEmail\n ]);\n\n $email->send();\n }\n }", "title": "" }, { "docid": "aa2d2a6700b7981f62e45efea6a9bd5b", "score": "0.5518862", "text": "public function sendEmailNow($reminder_record) {\n $reminderdata = $reminder_record;\n $from = $reminderdata->reminder_from;\n $to = $reminderdata->reminder_to;\n $msgstring = $reminderdata->reminder_msg;\n \\Illuminate\\Support\\Facades\\Mail::queue(\n ['html' => 'emails.bdaymailhtml'], \n $msgstring, function($message){\n $message->from('[email protected]', 'ReemindMe');\n $message->to($to,$to)->subject('Happy Birthday to You!');\n }\n \n );\n }", "title": "" }, { "docid": "4c973aac0d6be25b69a17fc48dc02d7b", "score": "0.5515604", "text": "function reply_email_message($id){\n ///////////////////////////////////////////////////\n $this->lang->load('common', $this->session->userdata('lang_file'));\n $this->data['mainTab'] = 'communication';\n $this->data['activeTab'] = 'email';\n $this->data['send_option'] = 'send_now';\n $this->data['email_subject'] = \"\";\n $this->data['email_message'] = \"\";\n $this->data['file_upload_failed'] = \"\";\n $this->data['individual_email_addresses'] = \"\";\n $mem_id = $this->session->userdata('mem_id');\n $member_org = $this->session->userdata('member_org');\n $member_group = $this->session->userdata('member_group'); \n $mem_type = $this->session->userdata('mem_type'); \n $this->data['query1'] = $this->info_model->get_logged_member_profile($mem_id); \n //$this->data['active_org_list'] = $this->info_model->get_registered_customer($org_id=\"\");\n $this->data['num_of_inbox_message'] = $this->info_model->get_member_communicate_member_message($flag=\"inbox\", $mem_id, $member_group, $mem_type);\n $this->data['num_of_sent_message'] = $this->info_model->get_member_communicate_member_message($flag=\"sent\", $mem_id, \"\", \"\");\n $this->data['org_mem_external_contact'] = $this->info_model->get_org_mem_external_contact_by_org_id($member_org, $mem_id);\n $this->data['mem_assigned_group_info'] = $this->info_model->get_mem_group_member_info($mem_id, $member_org); \n $this->data['all_active_admin'] = $this->info_model->get_org_active_admin($member_org); \n /////////////////////////////////////////////////\n $this->data['email_message_info'] = $this->info_model->get_email_message_detail($id);\n $this->data['dynamicView'] = 'pages/organization/communication_member/email_reply_view';\n $this->_commonPageLayout('frontend_viewer');\n}", "title": "" }, { "docid": "360587b629d1599eae6f9e93519fc786", "score": "0.5508562", "text": "public function process_queue() {\n\t\t// Look for existing addresses\n\t\t$existing = $this->get_queue();\n\t\tif ( ! is_array( $existing ) && $existing ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check how much emails are already sent in this interval\n\t\t$sent = WP_Temporary::get( 'simple_email_queue_sent' );\n\t\tif ( ! $sent ) {\n\t\t\t$sent = 0;\n\t\t}\n\n\t\t/*\n\t\t * Maximum number of allowed email to send\n\t\t * is difference between maximum allowed and\n\t\t * number of sent emails in this interval.\n\t\t */\n\t\t$max = $this->max() - $sent;\n\n\t\t$num_sent = 0;\n\n\t\tforeach ( $existing as $key => $value ) {\n\t\t\tif ( $num_sent >= $max ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$email_to = key( $value );\n\t\t\t$email_key = $value[ $email_to ];\n\n\t\t\t$this->send_email( $email_to, $email_key );\n\n\t\t\t// Remove item from array\n\t\t\tunset( $existing[ $key ] );\n\n\t\t\t// Increase number of sent emails\n\t\t\t$num_sent++;\n\t\t}\n\n\t\t// Save temporary that stores existing of temporary based on existence mail in queue\n\t\tif ( $existing ) {\n\t\t\tWP_Temporary::set( 'simple_email_queue_exist', 1, WEEK_IN_SECONDS );\n\t\t} else {\n\t\t\tWP_Temporary::delete( 'simple_email_queue_exist' );\n\t\t}\n\n\t\t// Save new queue\n\t\t$this->set_queue( $existing );\n\n\t\t// Save new number of sent emails in this interval\n\t\t$new_sent = $sent + $num_sent;\n\t\tWP_Temporary::update( 'simple_email_queue_sent', $new_sent, $this->interval() );\n\t}", "title": "" }, { "docid": "e56a079a944e4da59ef1b1b111285346", "score": "0.550689", "text": "function sendMailToAdmin($myaction, $messages_array) {\n\n \tglobal $conf;\n\t$title = $conf['app']['title'];\n \t$adminEmail = $conf['app']['adminEmail'];\n\n\t$sub = \"[\" . $title . \"] Notification from '\" . $_SESSION['sessionID'] . \"'\";\n\t$msg = \"Mail notification sent by '\" . $_SESSION['sessionID'] . \"' <\" . $_SESSION['sessionMail'][0] . \">.\\r\\n\\r\\n\";\n\n\tswitch ( $myaction ) {\n\t\tcase translate('Release'):\n\t\tcase translate('Release/Request release'):\n\t\t\t$msg .= translate('A problem occured when trying to release the following messages') . \":\\r\\n\\r\\n\";\n\t\t\tbreak;\n\t\tcase translate('Request release'):\n\t\t\t$msg .= translate('Please release the following messages') . \":\\r\\n\\r\\n\";\n\t\t\tbreak;\n\t\tcase translate('Delete'):\n\t\tcase translate('Delete All'):\n\t\t\t$msg .= translate('A problem occured when trying to delete the following messages') . \":\\r\\n\\r\\n\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tCmnFns::do_error_box(translate('Unknown action type'), '');\n\t}\n\n\tfor ($i = 0; is_array($messages_array) && $i < count($messages_array); $i++) {\n\t\t$rs = $messages_array[$i];\n\t\t$msg .= \"Message #\" . ($i+1) . \":\\r\\n\";\n\t\t$msg .= \"\\tmail_id = \" . $rs['mail_id'] . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('From') . \" = \" . $rs['from_addr'] . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('Subject') . \" = \" . $rs['subject'] . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('Date') . \" = \" . CmnFns::formatDateTime($rs['time_num']) . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('Score') . \" = \" . $rs['spam_level'] . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('Status') . \" = \" . $rs['status'] . \"\\r\\n\";\n\t\t$msg .= \"\\t\" . translate('Content Type') . \" = \" . $rs['content'] . \"\\r\\n\\r\\n\";\n\n\t}\n\n\t// Send email\n\t$mailer = new PHPMailer();\n\tif ( is_array($adminEmail) ) {\n\t\tforeach ($adminEmail as $email) {\n\t\t\t$mailer->AddAddress($email, '');\n\t\t}\n\t} else {\n\t\t$mailer->AddAddress($adminEmail, '');\n\t}\n\t$mailer->FromName = $_SESSION['sessionID'];\n\t$mailer->From = $_SESSION['sessionMail'][0];\n\t$mailer->Subject = $sub;\n\t$mailer->Body = $msg;\n\t$mailer->Send();\n\n\treturn true;\n\n}", "title": "" }, { "docid": "bf6366ad1474563e790299136f56407d", "score": "0.55023897", "text": "function process_message2 ($mailobject, $uid, $_folderName, $queue)\n\t{\n\t\t$mc =$this->mailClass;\n\t\t$senderIdentified = true;\n\t\t$sR = $mailobject->getHeaders($_folderName, $_startMessage=1, $_numberOfMessages=1, $_sort='INTERNALDATE', $_reverse=true, $_filter=array(),$_thisUIDOnly=$uid, $_cacheResult=false);\n\t\t$s = $sR['header'][$uid];\n\t\t$subject = $mailobject->decode_subject($s['subject']);// we use the needed headers for determining beforehand, if we have a new ticket, or a comment\n\t\t// FLAGS - control in case filter wont work\n\t\t$flags = $s;//implicit with retrieved information on getHeaders\n\t\tif ($flags['deleted'] || $flags['seen'])\n\t\t{\n\t\t\treturn false; // Already seen or deleted (in case our filter did not work as intended)\n\t\t}\n\t\t// should do the same as checking only recent, but is more robust as recent is a flag with some sideeffects\n\t\t// message should be marked/flagged as seen after processing\n\t\t// (don't forget to flag the message if forwarded; as forwarded is not supported with all IMAP use Seen instead)\n\t\tif (($flags['recent'] && $flags['seen']) ||\n\t\t\t($flags['answered'] && $flags['seen']) || // is answered and seen\n\t\t\t$flags['draft']) // is Draft\n\t\t{\n\t\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.__LINE__.':'.\"UID:$uid in Folder $_folderName with\".' Subject:'.$subject.\n\t\t\t\t\"\\n Date:\".$s['date'].\n\t \"\\n Flags:\".print_r($flags,true).\n\t\t\t\t\"\\n Stopped processing Mail ($uid). Not recent, new, or already answered, or draft\");\n\t\t\treturn false;\n\t\t}\n\t\t$subject = $mc::adaptSubjectForImport($subject);\n\t\t$tId = $this->get_ticketId($subject);\n\t\tif ($tId)\n\t\t{\n\t\t\t$t = $this->read($tId);\n\t\t\t$this->htmledit = $t['tr_edit_mode']=='html';\n\t\t}\n\t\t$addHeaderInfoSection = false;\n\t\tif (isset($this->mailhandling[$queue]['mailheaderhandling']) && $this->mailhandling[$queue]['mailheaderhandling']>0)\n\t\t{\n\t\t\t//$tId == 0 will be new ticket, else will indicate comment\n\t\t\tif ($this->mailhandling[$queue]['mailheaderhandling']==1) $addHeaderInfoSection=($tId == 0 ? true : false);\n\t\t\tif ($this->mailhandling[$queue]['mailheaderhandling']==2) $addHeaderInfoSection=($tId == 0 ? false: true);\n\t\t\tif ($this->mailhandling[$queue]['mailheaderhandling']==3) $addHeaderInfoSection=true;\n\t\t}\n\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.__LINE__.\"# $uid with title:\".$subject.($tId==0?' for new ticket':' for ticket:'.$tId).'. FetchMailHeader:'.$addHeaderInfoSectiont.' mailheaderhandling:'.$this->mailhandling[$queue]['mailheaderhandling']);\n\t\t$mailcontent = $mailobject::get_mailcontent($mailobject,$uid,$partid='',$_folderName,$this->htmledit,$addHeaderInfoSection,(!($GLOBALS['egw_info']['user']['preferences']['mail']['saveAsOptions']==='text_only')));\n\n\t\t// on we go, as everything seems to be in order. flagging the message\n\t\t$rv = $mailobject->flagMessages('seen', $uid, $_folderName);\n\t\tif ( PEAR::isError($rv)) error_log(__METHOD__.__LINE__.\" failed to flag Message $uid as Seen in Folder: \".$_folderName.' due to:'.$rv->message);\n\n\t\t// this one adds the mail itself (as message/rfc822 (.eml) file) to the infolog as additional attachment\n\t\t// this is done to have a simple archive functionality\n\t\tif ($mailcontent && $GLOBALS['egw_info']['user']['preferences']['mail']['saveAsOptions']==='add_raw')\n\t\t{\n\t\t\t$message = $mailobject->getMessageRawBody($uid, $partid, $_folderName);\n\t\t\t$headers = $mailobject->getMessageHeader($uid, $partid,true,false,$_folderName);\n\t\t\t$subject = $mc::adaptSubjectForImport($headers['SUBJECT']);\n\t\t\t$attachment_file =tempnam($GLOBALS['egw_info']['server']['temp_dir'],$GLOBALS['egw_info']['flags']['currentapp'].\"_\");\n\t\t\t$tmpfile = fopen($attachment_file,'w');\n\t\t\tfwrite($tmpfile,$message);\n\t\t\tfclose($tmpfile);\n\t\t\t$size = filesize($attachment_file);\n\t\t\t$mailcontent['attachments'][] = array(\n\t\t\t\t\t'name' => trim($subject).'.eml',\n\t\t\t\t\t'mimeType' => 'message/rfc822',\n\t\t\t\t\t'type' => 'message/rfc822',\n\t\t\t\t\t'tmp_name' => $attachment_file,\n\t\t\t\t\t'size' => $size,\n\t\t\t\t);\n\t\t}\n\t\tif (self::LOG_LEVEL>1 && $mailcontent)\n\t\t{\n\t\t\terror_log(__METHOD__.__LINE__.'#'.array2string($mailcontent));\n\t\t\tif (!empty($mailcontent['attachments'])) error_log(__METHOD__.__LINE__.'#'.array2string($mailcontent['attachments']));\n\t\t}\n\t\tif (!$mailcontent)\n\t\t{\n\t\t\terror_log(__METHOD__.__LINE__.\" Could not retrieve Content for message $uid in $_folderName for Server with ID:\".$mailobject->icServer->ImapServerId.\" for Queue: $queue\");\n\t\t\treturn false;\n\t\t}\n\t\t// prepare the data to be saved\n\t\t// (use bo function connected to the ui interface mail import, so after preparing we need to adjust stuff)\n\t\t$mailcontent['subject'] = $mc::adaptSubjectForImport($mailcontent['subject']);\n\t\t$this->data = $this->prepare_import_mail(\n\t\t\t$mailcontent['mailaddress'],\n\t\t\t$mailcontent['subject'],\n\t\t\t$mailcontent['message'],\n\t\t\t$mailcontent['attachments'],\n\t\t\t($tId?$tId:0),\n\t\t\t$queue\n\t\t);\n\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.array2string($this->data));\n\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.' Mailaddress:'.array2string($mailcontent['mailaddress']));\n\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.__LINE__.':'.$this->mailhandling[$queue]['unrecognized_mails'].':'.($this->data['tr_id']?$this->data['reply_creator']:$this->data['tr_creator']).' vs. '.array2string($this->user).' Ticket:'.$this->data['tr_id'].' Message:'.$this->data['msg']);\n\n\t\t// handle auto - mails\n\t\tif ($this->is_automail2($mailobject, $uid, $mailcontent['subject'], $mailcontent['headers'], $queue)) {\n\t\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.' Automails will not be processed.');\n\t\t\treturn false;\n\t\t}\n\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.array2string($this->data['msg']).':'.$this->data['tr_creator'].'=='.$this->data['reply_creator'].'=='. $this->user);\n\t\t// Handle unrecognized mails: we get a warning from prepare_import_mail, when mail is not recognized\n\t\t// ToDo: Introduce a key, to be able to tell the error-condition\n\t\tif (!empty($this->data['msg']) && (($this->data['tr_creator'] == $this->user) || ($this->data['tr_id'] && $this->data['reply_creator'] == $this->user)))\n\t\t{\n\t\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.__LINE__.array2string($this->data['msg']).':'.$this->data['tr_creator'].'=='. $this->user);\n\t\t\tif ($this->data['tr_id'] && $this->data['reply_creator'] == $this->user) unset($this->data['reply_creator']);\n\t\t\t$senderIdentified = false;\n\t\t\t$replytoAddress = $mailcontent['mailaddress'];\n\t\t\tif (self::LOG_LEVEL>1) error_log(__METHOD__.__LINE__.' ReplyToAddress:'.$replytoAddress);\n\t\t\tswitch ($this->mailhandling[$queue]['unrecognized_mails'])\n\t\t\t{\n\t\t\t\tcase 'ignore' :\t\t// Do nothing\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delete' :\t\t// Delete, whatever the overall delete setting is\n\t\t\t\t\t$mailobject->deleteMessages($uid, $_folderName, 'move_to_trash');\n\t\t\t\t\treturn false;\t// Prevent from a second delete attempt\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'forward' :\t// Return the status of the forward attempt\n\t\t\t\t\t$returnVal = $this->forward_message2($mailobject, $uid, $mailcontent['subject'], $this->data['msg'], $queue);\n\t\t\t\t\tif ($returnVal)\n\t\t\t\t\t{\n\t\t\t\t\t\t$rv = $mailobject->flagMessages('seen', $uid, $_folderName);\n\t\t\t\t\t\t$rv = $mailobject->flagMessages('forwarded', $uid, $_folderName);\n\t\t\t\t\t}\n\t\t\t\t\treturn $returnVal;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'default' :\t// Save as default user; handled below\n\t\t\t\tdefault :\t\t\t// Duh ??\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$replytoAddress = ($this->data['tr_id']?$this->data['reply_creator']:$this->data['tr_creator']);\n\t\t}\n\n\t\t// do not fetch the possible ticketID (again), use what is returned by prepare_import_mail\n\t\t$this->ticketId = $this->data['tr_id'];\n\n\n\t\tif ($this->ticketId == 0) // Create new ticket?\n\t\t{\n\t\t\tif (empty($this->mailhandling[$queue]['default_tracker']))\n\t\t\t{\n\t\t\t\treturn false; // Not allowed\n\t\t\t}\n\t\t\tif (!$senderIdentified) // Unknown user\n\t\t\t{\n\t\t\t\tif (empty($this->mailhandling[$queue]['unrec_mail']))\n\t\t\t\t{\n\t\t\t\t\treturn false; // Not allowed for unknown users\n\t\t\t\t}\n\t\t\t\t$this->mailSender = $this->mailhandling[$queue]['unrec_mail']; // Ok, set default user\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->mailSender = (!$senderIdentified?$this->mailhandling[$queue]['unrec_mail']:$this->data['reply_creator']);\n\t\t}\n\n\t\tif ($this->ticketId == 0)\n\t\t{\n\n\t\t\t$this->data['tr_tracker'] = $this->mailhandling[$queue]['default_tracker'];\n\t\t\t$this->data['cat_id'] = $this->mailhandling[$queue]['default_cat'];\n\t\t\t$this->data['tr_version'] = $this->mailhandling[$queue]['default_version'];\n\t\t\t$this->data['tr_priority'] = 5;\n\t\t\tif (!$senderIdentified && isset($this->mailSender)) $this->data['tr_creator'] = $this->user = $this->mailSender;\n\t\t\t//error_log(__METHOD__.__LINE__.array2string($this->data));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Extract latest reply from the mail message content and replace it for last comment\n\t\t\t$this->data['reply_message'] = $this->extract_latestReply($this->data['reply_message']);\n\n\t\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.array2string($this->data['reply_message']));\n\t\t\tif (!$senderIdentified)\n\t\t\t{\n\t\t\t\tif (self::LOG_LEVEL>2) error_log(__METHOD__.__LINE__.':'.$this->data['tr_creator'].':'.$this->mailhandling[$queue]['unrec_mail'].':'.$this->user.':'.$this->mailSender.'#');\n\t\t\t\tswitch ($this->mailhandling[$queue]['unrec_reply'])\n\t\t\t\t{\n\t\t\t\t\tcase 0 :\n\t\t\t\t\t\t$this->user = (!empty($this->data['tr_creator'])?$this->data['tr_creator']:(!empty($this->mailhandling[$queue]['unrec_mail'])?$this->mailhandling[$queue]['unrec_mail']:$this->user));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t$this->user = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$this->user = (!empty($this->mailhandling[$queue]['unrec_mail'])?$this->mailhandling[$queue]['unrec_mail']:0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->user = $this->mailSender;\n\t\t\t}\n\t\t}\n\t\tif ($this->ticketId == 0 && (!isset($this->mailhandling[$queue]['auto_cc']) || $this->mailhandling[$queue]['auto_cc']==false))\n\t\t{\n\t\t\tunset($this->data['tr_cc']);\n\t\t}\n\t\t$this->data['tr_status'] = parent::STATUS_OPEN; // If the ticket isn't new, (re)open it anyway\n\n\t\tif ($this->data['popup']) unset($this->data['popup']);\n\t\t// Save Current edition mode preventing mixed types\n\t\tif ($this->data['tr_edit_mode'] == 'html' && !$this->htmledit)\n\t\t{\n\t\t\t$this->data['tr_edit_mode'] = 'html';\n\t\t}\n\t\telseif ($this->data['tr_edit_mode'] == 'ascii' && $this->htmledit)\n\t\t{\n\t\t\t$this->data['tr_edit_mode'] = 'ascii';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->htmledit ? $this->data['tr_edit_mode'] = 'html' : $this->data['tr_edit_mode'] = 'ascii';\n\t\t}\n\t\tif (self::LOG_LEVEL>1 && $replytoAddress) error_log(__METHOD__.__LINE__.' Replytoaddress:'.array2string($replytoAddress).' Text:'.$this->mailhandling[$queue]['reply_text']);\n\t\t// Save the ticket and let tracker_bo->save() handle the autorepl, if required\n\t\t$saverv = $this->save(null,\n\t\t\t(($this->mailhandling[$queue]['auto_reply'] == 2\t\t// Always reply or\n\t\t\t|| ($this->mailhandling[$queue]['auto_reply'] == 1\t// only new tickets\n\t\t\t\t&& $this->ticketId == 0)\t\t\t\t\t// and this is a new one\n\t\t\t\t) && (\t\t\t\t\t\t\t\t\t\t// AND\n\t\t\t\t\t$senderIdentified\t\t \t\t\t\t// we know this user\n\t\t\t\t|| (!$senderIdentified\t\t\t\t\t\t// or we don't and\n\t\t\t\t&& $this->mailhandling[$queue]['reply_unknown'] == 1 // don't care\n\t\t\t))) == true\n\t\t\t\t? array(\n\t\t\t\t\t'reply_text' => $this->mailhandling[$queue]['reply_text'],\n\t\t\t\t\t// UserID or mail address\n\t\t\t\t\t'reply_to' => ($replytoAddress ? $replytoAddress : $this->user),\n\t\t\t\t)\n\t\t\t\t: null\n\t\t);\n\t\t// attachments must be saved/linked after saving the ticket\n\t\tif (($saverv==0) && is_array($mailcontent['attachments']))\n\t\t{\n\t\t\tforeach ($mailcontent['attachments'] as $attachment)\n\t\t\t{\n\t\t\t\t//error_log(__METHOD__.__LINE__.'#'.$attachment['tmp_name'].'#'.$this->data['tr_id']);\n\t\t\t\tif(is_readable($attachment['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\t//error_log(__METHOD__.__LINE__.'# trying to link '.$attachment['tmp_name'].'# to:'.$this->data['tr_id']);\n\t\t\t\t\tegw_link::attach_file('tracker',$this->data['tr_id'],$attachment);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn !$saverv;\n\t}", "title": "" }, { "docid": "de56d8ee2d36d8332db76efe4b3c2c54", "score": "0.550098", "text": "public function send_mailqueue($hash = \"\") {\r\n if ($hash == '9d3bb895f22bf0afa958d68c2a58ded7') {\r\n $mails = $this->mailqueue_model->get_mailqueue();\r\n foreach ($mails as $m) {\r\n $message = $this->load->view('templates/emailtemplate', json_decode($m['message']), TRUE);\r\n $attachment = $m['attachment'];\r\n if ($attachment !== NULL) {\r\n $attachment = json_decode($m['attachment']);\r\n }\r\n if (send_mail($m['to'], $m['name'], $m['subject'], $message, $m['cc'], $m['bcc'], $attachment)) {\r\n $this->mailqueue_model->update_mailqueue(array('status' => 2), $m['id']);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c98e86fc1b3580e5415757fd11be78fd", "score": "0.5489192", "text": "function _enviarMailResponsable($params){\r\n if($params[\"body\"]==\"\") return;\r\n\t\t\r\n MailHelper::sendmail($params);\r\n\t}", "title": "" }, { "docid": "4281b72dff22486c05d87529bb93e14a", "score": "0.5487999", "text": "function sendEmailReminder($id)\n{\n return;\n\n $auto3dprintqueue = Auto3dprintqueue::findOrfail($id);\n $user = User::findOrFail($auto3dprintqueue->user->id);\n\n Mail::send('auto3dprintqueue.email', ['user' => $user, 'auto3dprintqueue' => $auto3dprintqueue], function ($m) use ($user, $auto3dprintqueue) {\n $m->from('[email protected]', '3d Print Complete.');\n\n\n $mysubject = \"3d Print id # (\" . $auto3dprintqueue->id . \") Status has changed to \" . $auto3dprintqueue->Status;\n $m->to($user->email, $user->name)->subject($mysubject);\n });\n}", "title": "" }, { "docid": "1eb1928947845e249815db4585f3bfef", "score": "0.54542845", "text": "function ReplyMessage($mid){\n\ninclude \"dbitcon.php\";\n\n//Select Message to Reply to\n$msgq = \"SELECT Message,OpenLink,Subject,dateSent,timeSent,MTo,wid FROM Messages WHERE mid = $mid\";\n$msgqu = sqlsrv_query($conn, $msgq);\nwhile( $row = sqlsrv_fetch_array($msgqu, SQLSRV_FETCH_ASSOC))\n{\n$MTo = $row['MTo'];\n$Message = $row['Message'];\n$OpenLink = $row['OpenLink'];\n$Subject = $row['Subject'];\n$dateSent = $row['dateSent'];\n$timeSent = $row['timeSent'];\n$wid = $row['wid'];\n}\n\n//Decode the HTML\n$dmsg = html_entity_decode($Message);\n\n//Echo the Message\necho \"<link rel='stylesheet' type='text/css' href='js/UAT_18June2012/COMS.css'>\";\necho \"<form enctype='multipart/form-data' method='POST' action='\".$_SERVER['PHP_SELF'].\"'>\";\necho \"<input type='hidden' name='MTo' value='\".$MTo.\"'>\";\necho \"<input type='hidden' name='wid' value='\".$wid.\"'>\";\necho \"<table border='1' cellspacing='4' cellpadding='4' align='center'>\";\n//echo \"<tr><td>Message ID:\".$mid.\"</td></tr>\";\necho \"<tr><td>Subject: <input name='Subject' value='RE: \".$Subject.\"' size='100'></td></tr>\";\n//echo \"<tr><td>Sent: \".$dateSent.\", \".$timeSent.\"</td></tr>\";\necho \"<tr><td><textarea rows=15 cols=100 name='msgreply'></textarea></td></tr>\";\necho \"<tr><td align='center'><input type='Submit' name='sendMessage' value='&nbsp;&nbsp;Send&nbsp;&nbsp;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='Reset' name='Clear' value='&nbsp;&nbsp;Clear&nbsp;&nbsp;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='Reset' name='Cancel' value='&nbsp;&nbsp;Cancel&nbsp;&nbsp;'></td></tr>\";\necho \"<tr><td><b>Previous Message</b></td></tr>\";\necho \"<tr><td><i>\".$dmsg.\"</i></td></tr>\";\necho \"<tr><td align='center'><a href='https://\".$_SESSION['domain'].\"/reply.php'>Reply</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://\".$_SESSION['domain'].\"/forward.php'>Forward</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://\".$_SESSION['domain'].\"/delete.php'>Delete</a></td></tr>\";\necho \"</table>\";\necho \"</form>\";\n\n\n}", "title": "" }, { "docid": "2b4f3646f20df26367247b37c30d7ebd", "score": "0.5454", "text": "function sendMail($inbatch=false, $idctrl){\n\t\n\t\t$start_time = time();\n\t\t\t\n\t\tif (!$inbatch){\n\t\t\t$ctrl=$this->loadControl($idctrl);\n\t\t\t$wctrl='and tx_auxnewsmailer_msglist.idctrl='.$ctrl['uid'];\n\t\t}else{\n\t\t\t$ctrl=$this->loadControl($idctrl);\t\t\n\t\t\t$wctrl='and tx_auxnewsmailer_msglist.idctrl='.intval($idctrl);\t\n\t\t}\n\t\t\n\t\t$this->limit = $ctrl['tx_auxnewsmailersplitcat_tmplmsgbounce'];\n\t\t\n $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'tx_auxnewsmailer_usrmsg.*',\n 'tx_auxnewsmailer_usrmsg,tx_auxnewsmailer_msglist',\n \t'tx_auxnewsmailer_usrmsg.state=0 and tx_auxnewsmailer_usrmsg.idmsg=tx_auxnewsmailer_msglist.uid '.$wctrl,\n '',\n 'idmsg',\n '0,'.$this->limit\n );\n\t\t$cnt=0;\n\t\t$cid=0;\t\t\n\t\t$msglist_count = $GLOBALS['TYPO3_DB']->sql_affected_rows();\n\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {\n\t\t\n\t\t\t// For statistics if diferent idmsg breakloop\n\t\t\tif ($cid==0){$idmsg=$row['idmsg'];}\t\t\t\t\n\t\t\tif ($cid!=0 && $cid!=$row['idmsg']){break;}\n\t\t\t$cid = $row['idmsg'];\n\t\t\t\t\t\n\t \t\t$userinfo=$this->getUserInfo($row['iduser']);\n\t\t\t$msg=$this->getMessageInfo($row['idmsg']);\n\n\t\t\t$title=$msg['subject'];\n\t\t\t$fromEmail=$msg['returnmail'];\n\t\t\t$fromName=$msg['organisation'];\n\t\t\tif ($fromName!='')\n\t\t\t\t$fromName.='-';\n\t\t\t$fromName.=$msg['name'];\n\n\t\t\t$marker=array();\n\t\t\t$marker['###name###']=$userinfo['name'];\n\t\t\t$marker['###orgname###']=$msg['name'];\n\t\t\t$marker['###org###']=$msg['organisation'];\n\t\t\t$marker['###domain###']=$msg['orgdomain'];\n\n\t\t\t$plain=$this->cObj->substituteMarkerArray($msg['plain'],$marker);\n\t\t\t$title=$this->cObj->substituteMarkerArray($title,$marker);\n\n\t\t\tif ($userinfo['html'])\n\t\t\t\t$html=$this->cObj->substituteMarkerArray($msg['html'],$marker);\n\t\t\telse\n\t\t\t\t$html='';\n\t\t\t$this->domail($userinfo['mail'],$title,$plain,$fromEmail,$fromName,$html);\n\t\t\t/*$content.='----------------------</br>';\n\t\t\t$content.=$userinfo['mail'].'</br>';\n\t\t\t$content.=$msg['plain'].'</br>';*/\n\t\t\t$updateArray=array(\n\t\t\t\t'state' => '2',\n\t\t\t\t'tstamp'=>time(),\n\t\t\t);\n\t\t\t$ures = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_auxnewsmailer_usrmsg','idmsg='.$row['idmsg'].' and iduser='.$row['iduser'], $updateArray);\n\t\t\t$cnt++;\n\t\t}\n\t\t\n\t\t// Process Create Statistics\n\t\t$restat = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t '*',\n\t 'tx_auxnewsmailer_sendstat',\n\t 'idmsg='.intval($idmsg).' and pid='.intval($ctrl['pid']),\n\t '',\n\t 'idmsg',\n\t\t\t\t\t''\n\t );\t\n\t\t$row_count = $GLOBALS['TYPO3_DB']->sql_affected_rows();\t\t\t\t\t\t\n\t\tif ($row_count>0 && $msglist_count>0){\n\t\t\twhile($rowstat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($restat)) {\n\t\t\t\t$new_total_time = (time()-$start_time) + $rowstat['send_total_time_seconds'];\t\n\t\t\t\t$updateArray=array(\n\t\t\t\t\t'send_total_msg' => intval($rowstat['send_total_msg']+$cnt),\t\n\t\t\t\t\t'send_total_time' => t3lib_BEfunc::calcAge($new_total_time),\n\t\t\t\t\t'send_total_time_seconds' => intval($new_total_time),\n\t\t\t\t\t'crdate' => time(),\t\t\t\t\n\t\t\t\t);\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_auxnewsmailer_sendstat','idmsg='.intval($idmsg).' and pid='.intval($ctrl['pid']), $updateArray);\t\t\n\t\t\t}\n\t\t}else if ($msglist_count>0){ \n\t\t\t$new_total_time = time() - $start_time;\t\t\t\n\t\t\t$insertArray = array(\n\t\t\t\t'tstamp' => time(),\t\n\t\t\t\t'idmsg' => intval($idmsg),\t\t\t\t\t\t\t\t\n\t\t\t\t'pid' => intval($ctrl['pid']),\t\t\t\n\t\t\t\t'send_total_msg' => intval($cnt),\t\n\t\t\t\t'send_total_time' => t3lib_BEfunc::calcAge($new_total_time),\n\t\t\t\t'send_total_time_seconds' => intval($new_total_time),\n\t\t\t\t'crdate' => time(),\t\t\t\t\n\t\t\t);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_auxnewsmailer_sendstat', $insertArray);\t\n\t\t}\t\n\t\t\t\t\n\t\treturn $cnt;\n\n\t}", "title": "" }, { "docid": "63c224615f2c8086bdb04b2e7be8b441", "score": "0.54451984", "text": "function reply_message($message_id)\n {\n $query = \"select * from message where parent_id = '{$message_id}' order by sent_date asc\";\n $result = @mysql_query($query);\n while($row = @mysql_fetch_array($result))\n {\n // Sender Id retrived from message table.\n $sender_id = $this->get_field($row['message_id'], \"message\", \"sender_id\");\n // Therapist or Patient name retrive from user table.\n if($sender_id != \"\")\n {\n $data['name_first'] = $this->get_field($sender_id, \"user\", \"name_first\");\n $data['name_last'] = $this->get_field($sender_id, \"user\", \"name_last\");\n }\n $data['sent_date'] = $this->formatDateExtra($row['sent_date'], $this->userInfo('timezone'));\n $data['content'] = $this->hyperlink(html_entity_decode(nl2br(str_replace(\"&amp;\", \"&\", $this->decrypt_data($row['content'])))));\n $reply_message .= $this->build_template($this->get_template(\"reply_message\"), $data);\n }\n return $reply_message;\n }", "title": "" }, { "docid": "5222d62e8ea54cb543bcb3aa3ca68b58", "score": "0.54378086", "text": "function formatReplyMessage()\n\t{\n\t\tif(empty($this->mail_data))\n\t\t{\n\t\t\treturn false;\n\t\t}\n#\t\tdebug($this->mail_data[\"m_message\"]);\n\t\t$bodylines = explode(chr(13).chr(10), $this->mail_data[\"m_message\"]);\n#\t\tvar_dump(\"<pre>\",$bodylines,\"</pre\");\n\t\tfor ($i = 0; $i < count($bodylines); $i++)\n\t\t{\n\t\t\t$bodylines[$i] = \"> \".$bodylines[$i];\n\t\t}\n\t\treturn $this->mail_data[\"m_message\"] = implode(chr(13).chr(10), $bodylines);\n\t}", "title": "" }, { "docid": "942f60a415773b055e30961bfd16bcc2", "score": "0.5434249", "text": "public function replyTo($msg)\n {\n if (!empty($msg)) {\n // checks for the value send\n $userId = $msg->userId;\n // stores id of the person whom message is to be sent\n $receiverID = $msg->name;\n $identifier;\n\n if ($receiverID > $userId) {\n // geneate specific unique code to store messages\n $user1 = $userId;\n $user2 = $receiverID;\n $identifier = $userId.\":\".$receiverID;\n } else {\n $user1 = $receiverID;\n $user2 = $userId;\n $identifier = $receiverID.\":\".$userId;\n }\n\n // stores the message sent by the user.\n $reply = addslashes(trim($msg->reply));\n // current time\n $time = date(\"D d M Y H:i:s\");\n // echo $time;\n // to sort the array on the basis of time\n $time_id = date(\"YmdHis\");\n\n // the sender id must not be equal to current session id\n if ($reply != \"\" && $receiverID != $userId) {\n // check whether the receiver is authorized or registered\n $query = \"SELECT * from login where login_id = '$receiverID'\";\n\n $result = $this->connect->query($query);\n if ($result->num_rows > 0) {\n // check whether he is sending message\n // for the first time or he has sent messages before\n $query = \"SELECT * from total_message where\n identifier = '$identifier'\";\n $result = $this->connect->query($query);\n if ($result->num_rows > 0) {\n // if he has sent messages before Update Total_Message Table\n $query = \"UPDATE total_message SET\n total_messages = total_messages + 1,\n time = '$time', unread = 1,\n id = '$time_id' WHERE identifier = '$identifier'\";\n\n return $this->updateMessages(\n $query, $identifier, $reply, $userId, $time\n );\n\n } else {\n // if he sends message for the first time\n // insert Details in Total_Message Table\n $query = \"INSERT into total_message values(\n '$identifier', 1, '$user1', '$user2', 1,\n '$time', '$time_id'\n )\";\n return $this->updateMessages(\n $query, $identifier, $reply, $userId, $time\n );\n }\n }\n // if he is unauthorized echo message is failed\n return \"Invalid Authentication\";\n }\n }\n return \"Failed\";\n }", "title": "" }, { "docid": "98bc616c8d0535876d1c0b252c4c95f9", "score": "0.54318917", "text": "public function receiverMail()\n {\n\n $connection = new AMQPStreamConnection($receivemail->localhost,$receivemail->port,$receivemail->username,$receivemail->password);\n $channel = $connection->channel();\n\n $channel->queue_declare('fundoo', false, false, false, false);\n\n // echo \"\\nReceiving the Message ....\\n\";\n\n // echo \"[*] Waiting for messages. To exit press CTRL+C\\n\";\n\n $callback = function ($msg) {\n\n // echo \" * Message received\", \"\\n\";\n $data = json_decode($msg->body, true);\n\n $from = $data['from'];\n $from_email = $data['from_email'];\n $to_email = $data['to_email'];\n $subject = $data['subject'];\n $message = $data['message'];\n\n /**\n * Create the Transport\n */\n $transport = (new Swift_SmtpTransport('smtp.gmail.com', 587, 'tls'))\n ->setUsername($receivemail->email)\n ->setPassword($receivemail->emailPass);\n /**\n * Create the Mailer using your created Transport\n */\n $mailer = new Swift_Mailer($transport);\n\n /**\n * Create a message\n */\n $message = (new Swift_Message($subject))\n ->setFrom([$data['from'] => $receivemail->from])\n ->setTo([$to_email])\n ->setBody($message);\n /**\n * Send the message\n */\n $result = $mailer->send($message);\n\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n };\n\n $channel->basic_qos(null, 1, null);\n $channel->basic_consume('fundoo', '', false, false, false, false, $callback);\n\n while(count[$channel->callbacks]){\n $channel->wait();\n }\n \n\n }", "title": "" }, { "docid": "0cdbac2ed3181dd16b90f29174ffada0", "score": "0.54293424", "text": "function sendoutMessages($dataList, $total = 1) {\n\t\t// First compose the header info\n\t\t//---------------------------------------------------\n\t\t$emailFrom = $this->makeFromEmail();\n\t\t$thisDescription = $this->config['title'] ? $this->config['title'] : $this->pi_getLL('title_description', 'Discussion Board');\n\t\t$emailSubject = ($total > 1) ? $this->pi_getLL('email_subject_multiple', 'New Messages Posted') : $this->pi_getLL('email_subject', 'New Message Posted');\n\n\t\t// Next, create the email message content\n\t\t//----------------------------------------------------\n\t\t$emailBody = $emailSubject.' at: <a href = \"'.$this->getAbsoluteURL($this->id,'',TRUE).'\">'.$this->getAbsoluteURL($this->id,'',TRUE).'</a><br /><br />';\n\t\tif ($this->config['subscriber_emailHeader'])\n\t\t\t$emailBody .= '<br />' . $this->config['subscriber_emailHeader'] . '<br />';\n\t\t$adminText = '';\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\tif ($i > 0)\n\t\t\t\t$emailBody .= $this->pi_getLL('email_msgSeparator','----------------------------------------------').'<br /><br />';\n\n\t\t\t$thisSubject = str_replace('&quot;', \"\\\"\", $dataList[$i]['subject']);\n\t\t\t$emailBody .= $this->pi_getLL('email_subjectText', 'Subject: ') . stripslashes($thisSubject) . \"<br />\";\n\t\t\t$emailBody .= $this->pi_getLL('email_postedbyText', 'Posted By: ') . $dataList[$i]['name'] . ($dataList[$i]['email'] ? ' <'.$dataList[$i]['email'].'>' : '').\"<br />\";\n\t\t\tif ($dataList[$i]['category']) {\n\t\t\t\t$catName = $this->categoryListByUID[$dataList[$i]['category']];\n\t\t\t\tif (!strlen($catName)) $catName = $dataList[$i]['category'];\n\t\t\t\t$emailBody .= $this->pi_getLL('email_categoryText', 'Category: ') . $catName . \"<br />\";\n\t\t\t}\n\n\t\t\t$emailBody .= '<br />';\n\t\t\t$thisMessage = $dataList[$i]['message'];\n\n\t\t\tif ($dataList[$i]['image']) {\n\t\t\t\t$thisMessage .= '<br />' . $this->getImageURL($dataList[$i]['image']) . '<br />';\n\t\t\t}\n\t\t\tif ($dataList[$i]['ipAddress']) {\n\t\t\t\t$adminText = $this->pi_getLL('ip_address_field','IP: ') . t3lib_div::getIndpEnv('REMOTE_ADDR');\n\t\t\t}\n\n\t\t\t$emailBody .= $this->pi_getLL('email_messageText', 'Message: ') . stripslashes($thisMessage) . \"<br /><br />\";\n\t\t}\n\n\t\tif ($this->config['subscriber_emailFooter']) {\n\t\t\t$emailBody .= \"<br />\" . $this->config['subscriber_emailFooter'];\n\t\t}\n\n\t\t// Build a list of any authors to email\n\t\t//-------------------------------------------------------------------------\n\t\t$emailedAuthor = array();\n\t\t$emailedAuthorCount = 0;\n\t\tif ($this->config['email_author_replies']) {\n\t\t\tfor ($j = 0; $j < $total; $j++) {\n\t\t\t\tif ($thisID = $dataList[$j]['toplevel_uid']) {\n\t\t\t\t\t// grab the top level message and add email if author has requested it...\n\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('name,email,email_author_replies', $this->postTable, 'uid='.$thisID, '');\n\t\t\t\t\tif (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) && $row['email_author_replies']) {\n\t\t\t\t\t\t$emailedAuthor[$j] = $row;\n\t\t\t\t\t\t$emailedAuthorCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Now load in the email subscriber list\n\t\t//-------------------------------------------------------------------------\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->groupTable, 'pid IN(' . $GLOBALS['TYPO3_DB']->cleanIntList($this->pid_list) . ')', '');\n\t\t$count = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t$listCount = 0;\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\tif ($row['user_email']) {\n\t\t\t\t$emailList[$listCount]['email'] = $row['user_email'];\n\t\t\t\t$emailList[$listCount]['name'] = $row['user_name'];\n\t\t\t\t$emailList[$listCount]['author'] = false;\n\t\t\t\t$listCount++;\n\n\t\t\t\t// if the current email is the author, then mark that we don't need to add them.\n\t\t\t\tfor ($j = 0; $j < $emailedAuthorCount; $j++) {\n\t\t\t\t\tif ($row['user_email'] == $emailedAuthor[$j]['email']) {\n\t\t\t\t\t\t$emailedAuthor[$j] = 0;\n\t\t\t\t\t\t$emailedAuthorCount--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if should email author the replies, then m\n\t\tif ($this->config['email_author_replies'] && $emailedAuthorCount) {\n\t\t\tfor ($j = 0; $j < $emailedAuthorCount; $j++) {\n\t\t\t\tif ($emailedAuthor[$j]) {\n\t\t\t\t\t$emailList[$listCount]['email'] = $emailedAuthor[$j]['email'];\n\t\t\t\t\t$emailList[$listCount]['name'] = $emailedAuthor[$j]['name'];\n\t\t\t\t\t$emailList[$listCount]['author'] = true;\n\t\t\t\t\t$listCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// FINALLY, send out the email to the whole list\n\t\t// do not send if only supposed to send top-level posts\n\t\tif (!$this->conf['sendOnlyPosts'] || ($row['reply_uid'] == 0)) {\n\t\t\tfor ($i = 0; $i < $listCount; $i++) {\n\t\t\t\t$listEmailFrom = $emailFrom;\n\t\t\t\t$sendEmailBody = $emailBody;\n\t\t\t\t$sendEmailSubject = $emailSubject;\n\n\t\t\t\t// if no valid email, skip this person\n\t\t\t\tif (!$emailList[$i]['email'])\n\t\t\t\t\tcontinue;\n\t\t\t\telse if ($emailList[$i]['name'])\n\t\t\t\t\t$toName = $emailList[$i]['name'].' <'.$emailList[$i]['email'].'>';\n\t\t\t\telse\n\t\t\t\t\t$toName = $emailList[$i]['email'];\n\n\t\t\t\t// add footer for unsubscribing\n\t\t\t\tif (!$emailList[$i]['author']) {\n\t\t\t\t\t$urlPar['tx_wecdiscussion[sub]'] = 2;\n\t\t\t\t\t$urlPar['tx_wecdiscussion[email]'] = htmlspecialchars($emailList[$i]['email']);\n\t\t\t\t\t$sendEmailBody .= \"<br />\";\n\t\t\t\t\tif ($this->pi_getLL('email_unsubscribeText1')) {\n\t\t\t\t\t\t$sendEmailBody .= $this->pi_getLL('email_unsubscribeText1', '-------------------------------------------');\n\t\t\t\t\t\t$sendEmailBody .= \"<br />\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->pi_getLL('email_unsubscribeText2'))\n\t\t\t\t\t\t$sendEmailBody .= $this->pi_getLL('email_unsubscribeText2', 'To be unsubscribed from this list and not receive these emails anymore, please click ');\n\t\t\t\t\tif ($unsub3Text = $this->pi_getLL('email_unsubscribeText3')) {\n\t\t\t\t\t\t$sendEmailBody .= '<a href=\"'.$this->getAbsoluteURL($this->id, $urlPar,TRUE).'\">'.$unsub3Text.\"</a>\";\n\t\t\t\t\t\t$sendEmailBody .= \"<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sendEmailSubject = $this->pi_getLL('email_subject_author_comment','Your Message Was Replied To');\n\t\t\t\t}\n\t\t\t\t// format for text and HTML\n\t\t\t\t$emailHTMLAndText = $this->formatTextHTMLEmail($sendEmailBody,$listEmailFrom);\n\t\t\t\t// send out to person\n\t\t\t\tmail($toName, $sendEmailSubject, $emailHTMLAndText, $listEmailFrom);\n\t\t\t}\n\t\t}\n\n\t\t// format for admin emails...\n\t\tif (strlen($adminText))\n\t\t\t$emailBody .= '<br />' . $adminText;\n\t\t$emailHTMLAndText = $this->formatTextHTMLEmail($emailBody,$emailFrom);\n\n\t\t// and then send out to notify email if listed\n\t\tif ($this->config['notify_email']) {\n\t\t\tmail($this->config['notify_email'], $this->pi_getLL('email_notify', 'NOTIFY:').$emailSubject, $emailHTMLAndText, $emailFrom);\n\t\t}\n\n\t\t// and send out to admins if requested (but if already moderated, this will be sent, so do not resend)\n\t\tif ($this->config['email_admin_posts'] && !$this->config['do_moderate']) {\n\t\t\t$adminList = $this->getAdmins($this->config['administrator_userlist'], $this->config['administrator_usergroup']);\n\t\t\tif (count($adminList)) {\n\t\t\t\tforeach ($adminList as $thisAdmin) {\n\t\t\t\t\tmail($thisAdmin['email'], $this->pi_getLL('email_notify', 'NOTIFY:').$emailSubject, $emailHTMLAndText, $emailFrom);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9369d6511595fa7703cbfea85ed5296a", "score": "0.54237443", "text": "public function setReply(tx_ptmail_address $reply);", "title": "" }, { "docid": "49a83dc81c0ed69ec62fc4a84f94ebfe", "score": "0.54226786", "text": "public function ClearReplyTos() {\n $this->ReplyTo = array();\n }", "title": "" }, { "docid": "49a83dc81c0ed69ec62fc4a84f94ebfe", "score": "0.54226786", "text": "public function ClearReplyTos() {\n $this->ReplyTo = array();\n }", "title": "" }, { "docid": "c77eef7b042ba5dcb8b8b3480673f085", "score": "0.54182136", "text": "function powerreplyfunction(){\r\n \r\n global $wpdb;\r\n\r\n if (isset($_POST['status_message']))\r\n {\r\n $status = $_POST['status'];\r\n $status_id = $_POST['status_message'];\r\n\r\n $table_name = $wpdb->prefix . 'super_sticky_notes';\r\n if($status == 'delete'){\r\n $delete = $this->wpdb->delete(\r\n $table_name,\r\n array('id' => $status_id),\r\n array('%d') \r\n );\r\n }else{\r\n $wpdb->update( $table_name,\r\n array(\r\n 'note_status' => $status\r\n ),\r\n array(\r\n 'id'=> $status_id\r\n ),\r\n array('%s'),\r\n array('%d')\r\n );\r\n }\r\n }\r\n if (isset($_POST['note_reply_ids']))\r\n {\r\n $status_ids = $_POST['note_reply_ids'];\r\n $note_reply_admin_role = $_POST['note_reply_admin_role'];\r\n $note_reply = $_POST['note_reply_text'];\r\n $next_conv_allowed = $_POST['next_conv_allowed'];\r\n $note_repliedOn_date = date(\"Y-m-d\");\r\n\r\n $table_name = $wpdb->prefix . 'super_sticky_notes';\r\n $user_id_and_user_note = $this->wpdb->get_results( \"SELECT `user_id`, `note_values` FROM $table_name WHERE `id` = $status_ids \", OBJECT);\r\n $user_id_and_user_note = json_decode(json_encode($user_id_and_user_note), true);\r\n $note_user_id = $user_id_and_user_note[0]['user_id'];\r\n $note_values = $user_id_and_user_note[0]['note_values'];\r\n $user_info = get_userdata($note_user_id);\r\n $user_email = $user_info->user_email;\r\n $next_con = ($next_conv_allowed == 1) ? 'Yes' : 'No';\r\n\r\n $to = $user_email;\r\n\r\n $subject = 'Congratulations Instructor has replied to your comment.';\r\n $body = '<p><strong>Your Question :</strong> ' . $note_values . '.</br></p>' .\r\n '<p><strong>Instructor Reply :</strong> ' . $note_reply . '.</br></p>' .\r\n '<p>Next Conversation : ' . $next_con . '.</br></p>';\r\n $headers = array('Content-Type: text/html; charset=UTF-8');\r\n\r\n\r\n $mail = wp_mail( $to, $subject, $body, $headers );\r\n\r\n $table_name = $wpdb->prefix . 'super_sticky_notes';\r\n $wpdb->update( $table_name,\r\n array(\r\n 'note_reply_admin_role' => $note_reply_admin_role,\r\n 'note_reply' => $note_reply,\r\n 'next_conv_allowed' => $next_conv_allowed,\r\n 'note_repliedOn' => $note_repliedOn_date\r\n ),\r\n array(\r\n 'id'=> $status_ids\r\n ),\r\n array( '%d', '%s', '%d', '%s' ),\r\n array( '%d' )\r\n );\r\n }\r\n\r\n ?>\r\n <div class=\"super-sticky-notes\">\r\n <div class=\"sticky-setting-title\"><div class=setting-icon><h1><?php _e('Comments Table', 'wp_super_sticky_notes'); ?></h1></div></div>\r\n <div id=\"all\" class=\"tabcontent\" style=\"display:block;\" >\r\n <div class=\"table-responsive\">\r\n <table class=\"table sticky-notes-data-table jquerydatatable\">\r\n <thead>\r\n <tr class=\"note-heading-wrapper\">\r\n <th><?php _e('User', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('Asked Question', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('Page/Post', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('AskedOn', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('Action', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('Reply', 'wp_super_sticky_notes'); ?></th>\r\n <th><?php _e('RepliedOn', 'wp_super_sticky_notes'); ?></th>\r\n </tr>\r\n </thead>\r\n <?php\r\n $current_user_id = get_current_user_id();\r\n $table_name = $wpdb->prefix . 'super_sticky_notes';\r\n $qry = $this->wpdb->prepare(\"SELECT * FROM $table_name ssn WHERE ssn.`priv` != %d AND ssn.`page_author_id` = $current_user_id ORDER BY ssn.`insert_time` DESC\", 1);\r\n $all_valus_notes = $this->wpdb->get_results($qry, OBJECT); \r\n $all_valus_notes = json_decode(json_encode($all_valus_notes), true);\r\n\r\n ?>\r\n\r\n <tbody>\r\n <?php foreach ($all_valus_notes as $note_values){ \r\n $note_values_note = $note_values['note_values'];\r\n ?>\r\n <tr>\r\n <td><?php \r\n $author_obj = get_user_by('id', $note_values['user_id']); \r\n echo $author_obj->data->user_nicename; ?></td>\r\n <td><?php echo $note_values_note; ?></td>\r\n <td class=\"note-title\"><a href=\"<?php echo get_permalink($note_values['page_id']); ?>\" target=\"_blank\"><?php echo $note_values['title']; ?></a></td>\r\n <td><?php echo $note_values['insert_time']; ?></td>\r\n <td>\r\n <?php if($note_values['note_status'] == 'Disapproved'){?>\r\n <div class=\"disapproved-reply\"><?php _e('REPLY', 'wp_super_sticky_notes'); ?></div>\r\n <?php }else{\r\n $current_id = $note_values['id'];\r\n ?>\r\n <button class=\"reply\"><?php _e('REPLY', 'wp_super_sticky_notes'); ?></button>\r\n <div class=\"modal-overlay\">\r\n <div class=\"modal\">\r\n <a class=\"close-modal\">\r\n <svg viewBox=\"0 0 20 20\">\r\n <path fill=\"#000000\" d=\"M15.898,4.045c-0.271-0.272-0.713-0.272-0.986,0l-4.71,4.711L5.493,4.045c-0.272-0.272-0.714-0.272-0.986,0s-0.272,0.714,0,0.986l4.709,4.711l-4.71,4.711c-0.272,0.271-0.272,0.713,0,0.986c0.136,0.136,0.314,0.203,0.492,0.203c0.179,0,0.357-0.067,0.493-0.203l4.711-4.711l4.71,4.711c0.137,0.136,0.314,0.203,0.494,0.203c0.178,0,0.355-0.067,0.492-0.203c0.273-0.273,0.273-0.715,0-0.986l-4.711-4.711l4.711-4.711C16.172,4.759,16.172,4.317,15.898,4.045z\"></path>\r\n </svg>\r\n </a>\r\n <div class=\"modal-content\">\r\n\r\n <h3><?php _e('Write your reply', 'wp_super_sticky_notes'); ?></h3>\r\n <div class=\"note-reply-page\">\r\n <form method=\"POST\">\r\n <input type=\"hidden\" name=\"note_reply_ids\" value=\"<?php echo $current_id; ?>\" />\r\n <input type=\"hidden\" name=\"note_reply_admin_role\" value=\"<?php echo get_current_user_id(); ?>\" />\r\n <!-- <input type=\"text\" name=\"note_reply_title\" placeholder=\"Title\"> -->\r\n <textarea name=\"note_reply_text\" id=\"note_reply_text\" placeholder=\"Write your reply..\" style=\"height:200px\"><?php echo $note_values['note_reply']; ?></textarea>\r\n \r\n <div class=\"next-conversation\">\r\n <p><?php _e('Next Conversation Allowed', 'wp_super_sticky_notes'); ?></p>\r\n <label class=\"switch\">\r\n <?php $checked = ($note_values['next_conv_allowed'] == 1) ? 'checked' : ''; ?>\r\n <input type=\"hidden\" name=\"next_conv_allowed\" value=\"0\" />\r\n <input type=\"checkbox\" name=\"next_conv_allowed\" value=\"1\" <?php echo $checked; ?>/>\r\n <span class=\"slider round\"></span>\r\n </label>\r\n <!-- <p class=\"checked-message\"></p> -->\r\n </div>\r\n <input type=\"submit\" class=\"note-reply\" value=\"Reply\">\r\n </form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <?php }?> \r\n </td>\r\n <td class=\"note-class-view\"><?php if($note_values['note_status'] == 'Disapproved'){ ?> <div class=\"note-disapproved\"><p><?php _e('Disapproved', 'wp_super_sticky_notes'); ?></p></div> <?php }else{ echo $note_values['note_reply']; } ?></td>\r\n <td><?php if($note_values['note_status'] == 'Disapproved'){ ?> <div class=\"note-disapproved\"><p><?php _e('Disapproved', 'wp_super_sticky_notes'); ?></p></div> <?php }else{ echo $note_values['note_repliedOn']; } ?></td>\r\n </tr>\r\n <?php } ?>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n <?php\r\n }", "title": "" }, { "docid": "4910206aaf338605a24e9df344fc3727", "score": "0.53980553", "text": "function actual_send_newsletter($message, $subject, $language, $send_details, $html_only = 0, $from_email = '', $from_name = '', $priority = 3, $csv_data = '', $mail_template = 'MAIL')\n{\n require_lang('newsletter');\n\n // Put in archive\n $GLOBALS['SITE_DB']->query_insert('newsletter_archive', array('date_and_time' => time(), 'subject' => $subject, 'newsletter' => $message, 'language' => $language, 'importance_level' => 1));\n\n // Mark as done\n log_it('NEWSLETTER_SEND', $subject);\n set_value('newsletter_send_time', strval(time()));\n\n // Schedule the task\n require_code('tasks');\n return call_user_func_array__long_task(do_lang('NEWSLETTER_SEND'), get_screen_title('NEWSLETTER_SEND'), 'send_newsletter', array($message, $subject, $language, $send_details, $html_only, $from_email, $from_name, $priority, $csv_data, $mail_template), false, get_param_integer('keep_send_immediately', 0) == 1, false);\n}", "title": "" }, { "docid": "ab936735f514c24b9c00e2fb2de7f08e", "score": "0.53959125", "text": "public function reply_email($id){\n\n /*$popped_message_id = $id;\n $popped_message = PoppedMessageHeader::findOrFail($popped_message_id);\n $campaign_id = $popped_message->campaign_id;\n $camp_exists = Campaign::where('id', $campaign_id)->where('status', 'active')->exists();\n\n if($camp_exists){\n\n $sender_email = SenderEmail::with('relSmtp')->where('campaign_id', $campaign_id)\n ->where('status','!=', 'invalid')\n ->first();\n #print_r($sender_email);exit;\n\n $host = $sender_email->relSmtp->host;\n $port = $sender_email->relSmtp->port;\n $from_email = $sender_email->email;\n $from_name = $sender_email->name;\n $username = $sender_email->email;\n $password = $sender_email->password;\n $to_email = $popped_message->user_email;\n $subject = $popped_message->subject;\n// $body = ;\n\n try{\n // fire email\n $result = EmailSend::reply_email($host, $port, $from_email,$from_name,$username,$password,$to_email, $subject, $body);\n if($result){\n DB::beginTransaction();\n\n //Popping Status in sender_email table\n $sm_model = SenderEmail::findOrNew($sender_email->id);\n $sm_model->popping_status = 'true';\n $sm_model->save();\n\n //Commit\n DB::commit();\n Session::flash('flash_message', 'Sent First Message to : '.$popped_message->user_email);\n }\n }catch (\\Exception $e){\n DB::rollback();\n Session::flash('flash_message_error', $e->getMessage());\n }\n }else{\n Session::flash('flash_message_error', 'Campaign is not Activated yet!');\n }\n return redirect('popped-message');*/\n }", "title": "" }, { "docid": "3df02b6caa35e36d6a8ee065a9aeb939", "score": "0.5395127", "text": "function sendPendingMail()\r\n {\r\n $ini =& INIFile::globalINI();\r\n $Language = $ini->read_var( \"eZArticleMain\", \"Language\" );\r\n $adminSiteURL = $ini->read_var( \"site\", \"AdminSiteURL\" );\r\n $index = $ini->Index;\r\n $wwwDir = $ini->WWWDir;\r\n global $HTTP_HOST;\r\n\r\n $definition = $this->categoryDefinition();\r\n\r\n $editorGroup = $definition->editorGroup();\r\n\r\n\r\n $mailTemplate = new eZTemplate( \"ezarticle/admin/\" . $ini->read_var( \"eZArticleMain\", \"AdminTemplateDir\" ),\r\n \"ezarticle/admin/intl\", $Language, \"pendingmail.php\" );\r\n\r\n $mailTemplate->set_file( \"pending_mail_tpl\", \"pendingmail.tpl\" );\r\n $mailTemplate->setAllStrings();\r\n\r\n\r\n $mail = new eZMail();\r\n\r\n $author = $this->contentsWriter();\r\n $authorEmail = $author->email();\r\n $name = $author->name();\r\n\r\n $mailTemplate->set_var( \"author\", $name . \" \" . $authorEmail );\r\n $mailTemplate->set_var( \"url\", \"http://\" . $HTTP_HOST . $wwwDir . $index .\r\n \"/article/articlepreview/\" . $this->ID . \"/\" );\r\n $mailBody = $mailTemplate->parse( \"dummy\", \"pending_mail_tpl\" );\r\n $mail->setBody( $mailBody );\r\n\r\n $mail->setFrom( $authorEmail );\r\n\r\n $users = $editorGroup->users();\r\n foreach ( $users as $userItem )\r\n {\r\n $mail->setTo( $userItem->email() );\r\n $mail->send();\r\n }\r\n }", "title": "" }, { "docid": "121e7916888c080b5062e7a2d7953d86", "score": "0.5393059", "text": "public function sendPendingMail () {\n //get pending mail\n $criteria = new CDbCriteria();\n $criteria->compare('runTime', '<' . time());\n $criteria->compare('status', 'pending');\n $criteria->limit = 100;\n $criteria->order = 'runTime ASC';\n $emails = DbMailOutbox::Model()->findAll($criteria);\n if (!empty($emails)) {\n\n //get mailer extension\n Yii::import('ext.YiiMailer.YiiMailer');\n $this->mailer = new YiiMailer();\n\n foreach ($emails as $i => $email) {\n //clear mailer data from previous email\n $this->mailer->clear();\n\n //set recipients\n if(strpos($email->sendFrom,'@completeintel.com') !== false){\n $this->mailer->setFrom($email->sendFrom, Yii::app()->params['name']);\n } else {\n $this->mailer->setFrom($email->sendFrom, $email->sendFrom);\n }\n $this->mailer->Sender = $email->sendFrom;\n $this->mailer->ReturnPath = $email->sendFrom;\n\n if (strpos($email->sendTo, ',') !== false) {\n $this->mailer->setTo(explode(',', $email->sendTo));\n } else {\n $this->mailer->setTo($email->sendTo);\n }\n\n if (strpos($email->sendCc, ',') !== false) {\n $this->mailer->setCc(explode(',', $email->sendCc));\n } else {\n $this->mailer->setCc($email->sendCc);\n }\n\n if (strpos($email->sendBcc, ',') !== false) {\n $this->mailer->setBcc(explode(',', $email->sendBcc));\n } else {\n $this->mailer->setBcc($email->sendBcc);\n }\n \n\n //attach files\n if (!empty($email->attach)) {\n $email->formatSerialised('attach', 'array');\n foreach ($email->attach as $attachment) {\n $path = $attachment;\n if (!file_exists($path) || !is_file($path)) {\n $path = YiiBase::getPathOfAlias('root') . '/' . $attachment;\n }\n $this->mailer->setAttachment($path);\n }\n }\n\n //set email content\n $this->mailer->setBody($this->emogrify($email->body));\n $this->mailer->setSubject($email->subject);\n\n $this->mailer->isHTML(true);\n $this->mailer->clearLayout();\n $this->mailer->clearView();\n\n //send and log outcome\n if ($this->mailer->send()) {\n $email->status = 'sent';\n $email->sentTime = time();\n } else {\n $email->status = 'failed';\n }\n $email->save();\n }\n }\n }", "title": "" }, { "docid": "82c4f036f18094449ecfa6be255dd3e1", "score": "0.53778267", "text": "function SendMailOneToAnothor($vEmailCode,$ToEmail,$bodyArr,$postArr,$FromEmail,$vFromName){\n\n\t\t$columnsToSelect = 'iEmailTemplateId,vEmailCode,vFromName,vFromEmail,vFromEmail,vEmailSubject,tEmailMessage,dtCreatedDateTime,eStatus';\n\t\t$comparisonColumnsAndValues = array('vEmailCode' => array($vEmailCode,'where'));\n\t\t$email_info=$this->QueryCreator_model->selectQuery('email_templates',$columnsToSelect,$comparisonColumnsAndValues,'Single',NULL);\n\t\t$Subject = strtr($email_info['vEmailSubject'], \"\\r\\n\" , \" \" );\n\t\t$body = stripslashes($email_info['tEmailMessage']);\n $body = str_replace($bodyArr,$postArr, $body);\n\t\t\n\t\trequire_once(APPPATH.'third_party/PHPMailer-master/PHPMailerAutoload.php');\n $mail = new PHPMailer;\n $mail->isSMTP();\n $mail->Host = \"smtp.gmail.com\";\n $mail->SMTPAuth = true; \n $mail->SMTPDebug = 0; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'demo12345'; \n $mail->SMTPSecure = 'tls'; \n $mail->Port = 587; // TCP port to connect to\n $mail->From = $FromEmail;\n $mail->FromName = $vFromName;\n $mail->addAddress($ToEmail); // Add a recipient\n \n $mail->WordWrap = 50; // Set word wrap to 50 characters\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $Subject;\n $mail->Body = $body;\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if(!$mail->send()) {\n $res = 0;\n } else {\n $res = 1;\n }\n return $res;\t\t\t\n\t}", "title": "" }, { "docid": "5150ab007059c68ab0addf77c0ade006", "score": "0.5371764", "text": "function resendInviteEmail($post ) {\n\n\t\n\t\t$to = $post['email'];\n\t\t$subject = \"Affiliate Invitation\";\n\t\t$message = \"<p>Page Link: \".$post['page_link'].\"<br/> Url: \".$post['url'].\"</p><p>\".$post['message'].\"</p>\";\n\t\t$from = '[email protected]';\n\t\t$headers = \"From:\" . $from. \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-type: text/html\\r\\n\";\n mail($to,$subject,$message,$headers);\n \n\n }", "title": "" }, { "docid": "f7116748ee7ef974fe7b2d2c5b7199fa", "score": "0.5367943", "text": "function send_reply($chatid, $msgid, $text)\n{\n global $debug;\n $data = array(\n 'chat_id' => $chatid,\n 'text' => $text,\n 'reply_to_message_id' => $msgid // <---- biar ada reply nya balasannya, opsional, bisa dihapus baris ini\n );\n // use key 'http' even if you send the request to https://...\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data),\n ),\n );\n $context = stream_context_create($options);\n $result = file_get_contents(request_url('sendMessage'), false, $context);\n if ($debug) {\n print_r($result);\n }\n}", "title": "" }, { "docid": "7d17cfffd77bd4d72eaa6b80b1576c99", "score": "0.536781", "text": "function forward_message($mid=0, &$headers=null, $queue=0)\n\t{\n\n\t\tif ($mid == 0 || $headers == null) // no data\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Sending mail is not implemented using notifations, since it's pretty straight forward here\n\t\t$to = $this->mailhandling[$queue]['forward_to'];\n\t\t$subj = $headers->subject;\n\t\t$body = imap_body($this->mbox, $mid, FK_INTERNAL);\n\t\t$hdrs = 'From: ' . $headers->fromaddress . \"\\r\\n\" .\n\t\t\t\t'Reply-To: ' . $headers->reply_toaddress . \"\\r\\n\";\n\n\t\treturn (mail($to, $subj, $body, $hdrs));\n\n\t}", "title": "" }, { "docid": "d9f5b5a3d4c2467e2a126e666674163c", "score": "0.5364233", "text": "function _erpal_basic_helper_notifications_queue_run($message_arr) {\n //send the message here\n $users = array_unique($message_arr['users']); // remove user duplicates\n $message = unserialize($message_arr['message']);\n $module = $message_arr['module'];\n $message_type = $message_arr['message_type'];\n _erpal_basic_helper_notify_users_send($users, $message, $module, $message_type);\n}", "title": "" }, { "docid": "ed1f38f39904170caa8c5c6f5bb6f616", "score": "0.5355228", "text": "public function handle()\n {\n $smtp = DB::table('smtp')->get();\n $errors = array();\n\n foreach ($smtp as $connection)\n {\n\n // Try connection. Catch exceptions to output them later.\n try {\n $client = new Client([\n 'host' => $connection->host,\n 'port' => $connection->port,\n 'encryption' => $connection->encryption,\n 'validate_cert' => $connection->verify,\n 'username' => $connection->username,\n 'password' => $connection->password,\n 'protocol' => 'imap'\n ]);\n\n $client->connect();\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n }\n\n // Check whether the client connected - true/false\n if ($client->isConnected())\n {\n $this->info('Connected successfully to: ' . $connection->username);\n } else {\n $this->error('Unable to connect to: ' . $connection->username);\n foreach ($errors as $key => $error)\n {\n $this->error($error);\n }\n continue;\n }\n\n // Retrieve all unread messages from the INBOX folder.\n $emails = $client->getUnseenMessages($client->getFolder('INBOX'));\n\n foreach ($emails as $email)\n {\n // Get array of email.\n $sender = $email->getFrom();\n if(preg_match('(re:|RE:|Re:|fw:|FW:|Fw:)', $email->getSubject()))\n {\n // Check if the previous preg_match also has a ticket id.\n if(preg_match('/\\[#(.*?)\\]/', $email->getSubject(), $matches))\n {\n $reply = new Reply();\n $reply->ticketId = $matches[1];\n $reply->body = $email->getTextBody();\n $reply->sender = $sender[0]->mail;\n $reply->name = $sender[0]->personal;\n $reply->attachment = '0';\n $reply->save();\n continue;\n } else {\n $this->error('Unable to save message subject \"' . $email->getSubject() . '\" because it has no ticket id associated with it!');\n continue;\n }\n }\n\n if(Ticket::where('subject' , 'LIKE', '%' . $email->getSubject() . '%')->where('body', '=', $email->getTextBody())->where('sender', '=', $sender[0]->mail)->exists())\n {\n continue;\n }\n\n $ticketId = $this->generateTicketId();\n // Create new ticket.\n $ticket = new Ticket();\n $ticket->ticketId = $ticketId;\n $ticket->subject = $email->getSubject();\n $ticket->body = $email->getTextBody();\n $ticket->sender = $sender[0]->mail;\n $ticket->name = $sender[0]->personal;\n $ticket->attachments = '0';\n $ticket->assignedTo = '0';\n $ticket->status = '1';\n $ticket->priority = '1';\n $ticket->save();\n sleep(1);\n }\n }\n }", "title": "" }, { "docid": "d27fb7361d880e68e8403af3cd20d3f4", "score": "0.5347779", "text": "public function index() {\n // SendOrderEmail::dispatch($order);\n\n // Log::info('Dispatched order ' . $order->id);\n // return 'Dispatched order ' . $order->id;\n\n for ($i=0; $i<20; $i++) { \n $order = Order::findOrFail( rand(1,50) ); \n if (rand(1, 3) > 1) {\n SendOrderEmail::dispatch($order)->onQueue('email');\n } else {\n SendOrderEmail::dispatch($order)->onQueue('sms');\n }\n }\n\n return 'Dispatched orders';\n }", "title": "" }, { "docid": "47f0c070eb1a7ed1e83cdb3ae29eed36", "score": "0.53458947", "text": "public function getReply() {\n\t\treturn \\Model\\ThreadPost::Fetch($this->reply);\n\t}", "title": "" }, { "docid": "5638559f8894c221c2bba3dc5c18453f", "score": "0.5336368", "text": "public function sendLargeMail($mailTo, $subject = '', $message = '', $api = null, $templateid = '',$from = null) {\n if (SEND_SMS_EMAIL) {\n if ($api) {\n $api_key = API_KEY;\n $subject = urlencode($subject);\n $fromname = 'Vivahaayojan.com';\n if(!$from){\n //$from = '[email protected]';\n $from = SUPPORT_EMAIL;\n }\n \n $content = rawurlencode($message);\n $sendto = $mailTo;\n $url = API_EMAIL_URL;\n $replytoid = '';\n\n if ($templateid) {\n $template = '&template=' . $templateid;\n } else {\n $template = '';\n }\n \n $post_data ='api_key=' . $api_key . '&subject=' . $subject . '&fromname=' . $fromname . '&from=' . $from . '&replytoid=' . $replytoid . '&content=' . $content . '&recipients=' . $sendto . $template;\n \n // $handle = curl_init($url . '?api_key=' . $api_key . '&subject=' . $subject . '&fromname=' . $fromname . '&from=' . $from . '&replytoid=' . $replytoid . '&content=' . $content . '&recipients=' . $sendto . $template);\n \n\n //Create a curl object\n $ch = curl_init();\n $agent = $_SERVER[\"HTTP_USER_AGENT\"];\n curl_setopt($ch, CURLOPT_USERAGENT, $agent);\n curl_setopt($ch, CURLOPT_URL, $url );\n //This is a POST query\n curl_setopt($ch, CURLOPT_POST, 1 );\n //Set the post data\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n //We want the content after the query\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n //Follow Location redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSLVERSION, 4);\n \n $postResult = curl_exec($ch); \n //throw new Exception(curl_error($handle), curl_errno($handle)); die;\n curl_close($ch);\n \n return $content;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "73ca2b6dde7b2d729efd9b90f32fe4b4", "score": "0.5335917", "text": "public function sendNotificationReplyEmail($postId,$email,$name,$mensagem)\n{\n \n \n $httpHost = isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:'localhost';\n $adURL = 'http://' . $httpHost . '/curriculosposts/view/' . $postId;\n \n $post = $this->entityManager->getRepository(Curriculos::class)\n ->findOneById($postId);\n \n $user = $this->entityManager->getRepository(User::class)\n ->findOneById($post->getIdentidade());\n \n $u=$user->getUnsubscribe();\n \n if($u==0)\n {\n \n $sendemail=$user->getEmail();\n $useridforunsubscribe=$user->getId();\n $adURLuseridforunsubscribe = 'http://' . $httpHost . '/unsubscribe/unsubscribe/' . $useridforunsubscribe;\n \n\t\t$transport = $this->mailtransport; //$this->getServiceLocator()->get('mail.transport');\n\t\t$message = new Message();\n\t\t$this->getRequest()->getServer(); //Server vars\n $htmlMarkup='The ad :<br>'.$adURL.'<br><br>This email was sent for your email : <br> '.$sendemail.' <br><br> The link to unsubscribe : <br>'.$adURLuseridforunsubscribe.'<br><br><br>';\n $html = new MimePart($htmlMarkup);\n $html->type = \"text/html\";\n $body = new MimeMessage();\n $body->setParts(array($html));\n\t\t$message->addTo($sendemail)\n\t\t\t\t->addFrom('[email protected]')\n\t\t\t\t->setSubject('Someone replied to your ad at www.thejoboard.com')\n\t\t\t\t->setBody($body);\n \n //Send it!\n $sent = true;\n try {\n $transport->send($message);\n } catch (Exception $e){\n $sent = false;\n }\n\n //Do stuff (display error message, log it, redirect user, etc)\n if($sent){\n return 1;\n } else {\n //Mail failed to send.\n return 0;\n }\n \n }else\n {\n return -2;\n \n }\n \n\t\t\n}", "title": "" }, { "docid": "ba59f40c40c22e540f5a6598106cf27a", "score": "0.5331288", "text": "private function SendMessage()\n\t\t{\n\n\t\t\tif (!gzte11(ISC_LARGEPRINT)) {\n\t\t\t\tob_end_clean();\n\t\t\t\theader(\"Location: \" . $GLOBALS['ShopPath']);\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tif (isset($_POST['message_order_id']) && isset($_POST['message_subject']) && isset($_POST['message_content'])) {\n\t\t\t\t$message = $_POST['message_content'];\n\t\t\t\t$NewMessage = array(\n\t\t\t\t\t\"messagefrom\" => \"customer\",\n\t\t\t\t\t\"subject\" => $_POST['message_subject'],\n\t\t\t\t\t\"message\" => $message,\n\t\t\t\t\t\"datestamp\" => time(),\n\t\t\t\t\t\"messageorderid\" => (int)$_POST['message_order_id'],\n\t\t\t\t\t\"messagestatus\" => 'unread',\n\t\t\t\t\t\"staffuserid\" => 0,\n\t\t\t\t\t\"isflagged\" => 0\n\t\t\t\t);\n\n\t\t\t\t$GLOBALS['HideNoOrderMessage'] = \"none\";\n\t\t\t\t$GLOBALS['HideInboxMessage'] = \"none\";\n\n if ($GLOBALS['ISC_CLASS_DB']->InsertQuery(\"order_messages\", $NewMessage)) {\n # Added the following code to send a mail to admin what the customer send the order message -- Baskaran\n $cid = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId();\n $query = $GLOBALS['ISC_CLASS_DB']->Query(\"SELECT * FROM [|PREFIX|]customers where customerid = '$cid'\");\n $row = $GLOBALS['ISC_CLASS_DB']->Fetch($query);\n $ordId = (int)$_POST['message_order_id'];\n \n $ordquery = $GLOBALS['ISC_CLASS_DB']->Query(\"SELECT ordtotalamount, orddate FROM [|PREFIX|]orders where orderid = '$ordId'\");\n $orow = $GLOBALS['ISC_CLASS_DB']->Fetch($ordquery);\n \n $subject = \"Order Mail\";\n $to = GetConfig('AdminEmail');\n// $to = \"[email protected]\";\n \n $msgsubject = $_POST['message_subject'];\n $customerName = $row['custconfirstname'].\" \".$row['custconlastname'];\n $cemail = $row['custconemail'];\n $phonenumber = $row['custconphone'];\n $orderNo = $ordId;\n $totalAmt = $orow['ordtotalamount'];\n $orderDate = date('m-d-Y', $orow['orddate']);\n \n $message = \"<table cellpadding='2' cellspacing='2'><tr><td>Subject:</td><td colspan='5'>$msgsubject</td></tr><tr><td>Message:</td><td colspan='5'>$message</td></tr><tr><td colspan='6'>&nbsp;</td></tr><tr><td>Customer Name:</td><td>$customerName</td><td>Email:</td><td>$cemail</td><td>Phone Number:</td><td>$phonenumber</td></tr><tr><td>Order Number:</td><td>$orderNo</td><td>Total Amount:</td><td>$totalAmt</td><td>Order date:</td><td>$orderDate</td></tr><tr><td colspan='6'>Please see the <a href='http://test.congoworld.com/admin/index.php?ToDo=viewOrders'>order message</a> on the admin panel.</td></tr></table>\";\n require_once(ISC_BASE_PATH . \"/lib/email.php\");\n $obj_email = GetEmailClass();\n $obj_email->Set('CharSet', GetConfig('CharacterSet'));\n $obj_email->From(GetConfig('OrderEmail'), $email);\n // $obj_email->Set('ReplyTo', $email);\n $obj_email->Set(\"Subject\", $subject);\n $obj_email->AddBody(\"html\", $message);\n $obj_email->AddRecipient($to, \"\", \"h\");\n $email_result = $obj_email->Send();\n \n $GLOBALS['HideMessageSuccess'] = \"\";\n $GLOBALS['HideMessageError'] = \"none\";\n }\n\t\t\t\telse {\n\t\t\t\t\t$GLOBALS['HideMessageError'] = \"\";\n\t\t\t\t\t$GLOBALS['HideMessageSuccess'] = \"none\";\n\t\t\t\t}\n\n\t\t\t\t$this->Inbox($cemail);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3be796c60db0f67275d628423be39d71", "score": "0.53243375", "text": "function mailRead_sendmail($recipients, $subject, $body, $from=null, $msgid=null, $html=false, $pri=1, $hotmail=null) {\n\t\t\t\tglobal $topic, $db_prefix, $id_msg, $smcFunc;\n\n\t\t\t\tforeach($recipients as $member=>$recipient) {\n\t\t\t\t\t// Clear old logs\n\t\t\t\t\t$smcFunc['db_query']('', \"delete from {db_prefix}mailread where id_msg=$id_msg and id_member=$member\");\n\t\t\t\t\t\n\t\t\t\t\t// Insert new log\n\t\t\t\t\t$smcFunc['db_query']('', \"INSERT INTO {db_prefix}mailread (id_member, id_msg) values($member, $id_msg)\");\n\t\t\t\t\tsendmail($recipient, $subject, str_replace('{mailreadMEMBERVAR}', $member, $body), $from, $msgid, $html, $pri, $hotmail);\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "bd4c7dace871600f3fe00e4cfd4e6d3a", "score": "0.53225046", "text": "abstract protected function sendBatch(array $messages);", "title": "" }, { "docid": "d95866f894ee76799883ae3381c2d6d9", "score": "0.5322145", "text": "public function sendPendingMessage() {\n\t\t$this->pending_messages[] = false;\n\t}", "title": "" }, { "docid": "a8343df451fb0350eecb957d880c86e5", "score": "0.5318212", "text": "function execute_topic_queue() {\n\tglobal $_DBA, $_TOPICQUEUE;\n\t\n\tif(is_array($_TOPICQUEUE) && !empty($_TOPICQUEUE)) {\n\t\tarray_values($_TOPICQUEUE);\n\t\t\n\t\tif(isset($_TOPICQUEUE[0])) {\n\t\t\t\n\t\t\t$queue\t\t\t= $_TOPICQUEUE[0];\n\t\t\t\n\t\t\t$topics\t\t\t= unserialize($_TOPICQUEUE[0]['topicinfo']);\n\t\t\t\n\t\t\tif(is_array($topics) && !empty($topics)) {\n\t\t\t\t\n\t\t\t\t/* Reset the starting point of this array */\n\t\t\t\t$topics\t\t= array_values($topics);\n\t\t\t\t$count\t\t= count($topics);\n\t\t\t\t\n\t\t\t\t/* Loop through the users */\n\t\t\t\tfor($i = 0; $i < TOPIC_INTERVAL; $i++) {\n\t\t\t\t\t\n\t\t\t\t\tif(isset($topics[$i]) && intval($topics[$i]) != 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Remove this topic */\n\t\t\t\t\t\tremove_item(intval($topics[$i]), 'topic_id');\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($topics[$i]);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* If we have finished with this queue item */\n\t\t\t\tif($count <= TOPIC_INTERVAL) {\n\t\t\t\t\t$_DBA->executeUpdate(\"DELETE FROM \". TOPICQUEUE .\" WHERE id = \". intval($_TOPICQUEUE[0]['id']));\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$topics\t\t= array_values($topics);\n\t\t\t\t\t$update\t\t= $_DBA->prepareStatement(\"UPDATE \". TOPICQUEUE .\" SET topicinfo=? WHERE id=?\");\n\t\t\t\t\t$update->setString(1, serialize($topics));\n\t\t\t\t\t$update->setInt(2, $_TOPICQUEUE[0]['id']);\n\t\t\t\t\t$update->executeUpdate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Reset the filetime on our email cache file */\n\t\t\t\tif(!@touch(CACHE_TOPIC_FILE, time()-86460)) {\n\t\t\t\t\t@unlink(CACHE_TOPIC_FILE);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$_DBA->executeUpdate(\"DELETE FROM \". TOPICQUEUE .\" WHERE id = \". intval($_TOPICQUEUE[0]['id']));\n\t\t\t\t\t\n\t\t\t\t/* Reset the filetime on our email cache file */\n\t\t\t\tif(!@touch(CACHE_TOPIC_FILE, time()-86460)) {\n\t\t\t\t\t@unlink(CACHE_TOPIC_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "aaf8ed54f3e2ff0507b7da2d321046e1", "score": "0.5313066", "text": "public function singleMailUnique(){\n\n Log::info(\"[Mail][singleMailUnique]\");\n\n $params = $this->data;\n\n $to = $params['to'];\n $subject = $params['subject'];\n $body = $params['body'];\n $priority = $params['priority'];\n $name = $params['name'];\n\n $bmsmail = App\\Bmsmail::addMailQueue(0, 'emails.single', $to, $priority, $body, $subject, $name);\n \n }", "title": "" }, { "docid": "e4979353adf552cb8bb7efac1dee8dfe", "score": "0.5312658", "text": "function is_automail2($mailobject, $uid, $subject, $msgHeaders, $queue=0)\n\t{\n\t\t// This array can be filled with checks that should be made.\n\t\t// 'bounces' and 'autoreplies' (level 1) are the keys coded below, the level 2 arrays\n\t\t// must match $msgHeader properties.\n\t\t//\n\t\t$autoMails = array(\n\t\t\t 'bounces' => array(\n\t\t\t\t 'subject' => array(\n\t\t\t\t)\n\t\t\t\t,'from' => array(\n\t\t\t\t\t 'mailer-daemon'\n\t\t\t\t)\n\t\t\t)\n\t\t\t,'autoreplies' => array(\n\t\t\t\t 'subject' => array(\n\t\t\t\t\t 'out of the office',\n\t\t\t\t\t 'out of office',\n\t\t\t\t\t 'autoreply'\n\t\t\t\t\t)\n\t\t\t\t,'auto-submitted' => array(\n\t\t\t\t\t'auto-replied'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Check for bounced messages\n\t\tforeach ($autoMails['bounces'] as $_k => $_v) {\n\t\t\tif (count($_v) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_re = '/(' . implode('|', $_v) . ')/i';\n\t\t\tif (preg_match($_re, $msgHeader[strtoupper($_k)])) {\n\t\t\t\tswitch ($this->mailhandling[0]['bounces']) {\n\t\t\t\t\tcase 'delete' :\t\t// Delete, whatever the overall delete setting is\n\t\t\t\t\t\t$returnVal = $mailobject->deleteMessages($uid, $_folderName, 'move_to_trash');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'forward' :\t// Return the status of the forward attempt\n\t\t\t\t\t\t$returnVal = $this->forward_message2($mailobject, $uid, $mailcontent['subject'], lang(\"automatic mails (bounces) are configured to be forwarded\"), $queue);\n\t\t\t\t\t\tif ($returnVal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rv = $mailobject->flagMessages('seen', $uid, $_folderName);\n\t\t\t\t\t\t\t$rv = $mailobject->flagMessages('forwarded', $uid, $_folderName);\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault :\t\t\t// default: 'ignore'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Check for autoreplies\n\t\tforeach ($autoMails['autoreplies'] as $_k => $_v) {\n\t\t\tif (count($_v) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_re = '/(' . implode('|', $_v) . ')/i';\n\t\t\tif (preg_match($_re, $msgHeader[strtoupper($_k)])) {\n\t\t\t\tswitch ($this->mailhandling[0]['autoreplies']) {\n\t\t\t\t\tcase 'delete' :\t\t// Delete, whatever the overall delete setting is\n\t\t\t\t\t\t$returnVal = $mailobject->deleteMessages($uid, $_folderName, 'move_to_trash');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'forward' :\t// Return the status of the forward attempt\n\t\t\t\t\t\t$returnVal = $this->forward_message2($mailobject, $uid, $mailcontent['subject'], lang(\"automatic mails (replies) are configured to be forwarded\"), $queue);\n\t\t\t\t\t\tif ($returnVal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rv = $mailobject->flagMessages('seen', $uid, $_folderName);\n\t\t\t\t\t\t\t$rv = $mailobject->flagMessages('forwarded', $uid, $_folderName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'process' :\t// Process normally...\n\t\t\t\t\t\treturn false;\t// ...so act as if it's no automail\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\t\t\t// default: 'ignore'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "90e0c26136db853e0741c3937d6099d7", "score": "0.53110045", "text": "function createReply($message, $thread_id, $user_id, $topic_id, $user_group) {\n global $db;\n\n if($user_group != 3) {\n $run = $db->prepare(\"INSERT INTO replies(content, user_id, thread_id, topic_id, created_on) \n VALUES(:content, :user_id, :thread_id, :topic_id, NOW())\");\n $res = $run->execute(['content'=>$message,'user_id'=>$user_id,'thread_id'=>$thread_id,'topic_id'=>$topic_id]);\n } else {\n $run = $db->prepare(\"INSERT INTO replies(content, user_id, thread_id, topic_id, created_on) \n VALUES(:content, :user_id, :thread_id, :topic_id, NOW())\");\n $res = $run->execute(['content'=>$message,'user_id'=>$user_id,'thread_id'=>$thread_id,'topic_id'=>$topic_id]);\n \n $status = $db->prepare(\"UPDATE `threads` SET `status` = 1 WHERE `id` = :thread_id\");\n $status->execute(['thread_id' => $thread_id]);\n }\n \n \n $next = $db->prepare(\"UPDATE `threads` SET `last_reply` = NOW() WHERE `id` = :thread_id\");\n $next->execute(['thread_id' => $thread_id]);\n\n return $res;\n}", "title": "" }, { "docid": "55c611b6b105d59160dd208c5fa8c108", "score": "0.530214", "text": "function mailtopic($whichlist,$numoftopics,$esubject,$topicst,$topicbody)\r\n {\r\n\r\n\r\n $headers = \"From: \" . \"[email protected]\" . \" \\r\\n\";\r\n\t$headers .= \"MIME-Version: 1.0 \\r\\n\";\r\n\t$headers .= \"Content-Type: text/html;charset=utf-8 \\r\\n\";\r\n\t$headers .= \"Content-Transfer-Encoding: base64 \\r\\n\\r\\n\";\r\n\r\n\t//build the message\r\n\t$message = '<html><body>';\r\n\tif ($numoftopics>1)\r\n\t{\r\n\t\t//put a topic list header \r\n$message .= '<p>________________________________________________________________</p>';\r\n\t\tfor ($num=0;$num<$numoftopics;$num++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$newnum = $num+1;\r\n\t\t\t$message .= $newnum. '. '.$topicst[$num] ;\r\n\t\t\t$message .= '</br>';\r\n\t\t\t\r\n\t\t\t}\r\n$message .= '<p>________________________________________________________________</p>';\r\n \t\tfor ($num=0;$num<$numoftopics;$num++)\r\n\t\t\t{\r\n\t\t$message .= '<strong>'. $topicst[$num] .'</strong>';\r\n\t\t$message .= '<p>'. $topicbody[$num] .'</p>';\r\n\t\t}\r\n\t}\r\n\telse { \r\n\t$num=0;\r\n $message .= 'Dear CFMRI Users,'; \r\n\t $message .= '</br>';\r\n\t $message .= '<p>________________________________________________________________</p>';\r\n\t\t$message .= '<strong>'. $topicst[$num] .'</strong>';\t\r\n\t\t\t\t\t$message .= '<p>________________________________________________________________</p>';\r\n$message .= '<p>'. $topicbody[$num] .'</p>';\r\n\t}\r\n\t$message .= '</br>';\r\n \r\n\t//$message .= 'Please feel free to contact us at [email protected] <mailto:[email protected]> if you have any questions.';\r\n\t//$message .= '<br>';\r\n\t$message .= '<br>';\r\n\t$message .= 'CFMRI';\r\n\t$message .= '</body></html>';\r\n\t$message = stripslashes($message);\r\n\t$message = chunk_split(base64_encode($message));\r\n\t\r\n\tif ($whichlist=='3T')\r\n\t\tmail (\"[email protected]\", $esubject, $message, $headers);\r\n\telseif ($whichlist=='7T')\r\n\t\tmail (\"[email protected]\", $esubject, $message, $headers);\r\n\telseif ($whichlist=='G')\r\n\t {\r\n\t\tmail (\"[email protected]\", $esubject, $message, $headers);\r\n\t\tmail (\"[email protected]\", $esubject, $message, $headers);\r\n\t}\r\n \r\n \r\n }", "title": "" }, { "docid": "196d96a6e3231edf7bf99695c3c16327", "score": "0.53013223", "text": "public function testGetReplyForSmsMessage()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "2dd4d03628cafd07d669649ec57c2b2c", "score": "0.5300328", "text": "public function reply($message): void;", "title": "" }, { "docid": "347497ae7db1187126a5735933b82a5f", "score": "0.5300297", "text": "public function render()\n\t{\n\t\tif( $_POST )\n\t\t{\n\t\t\t$sending = ( ! empty( $_POST['send'] ) ) ? TRUE : FALSE;\n\n\t\t\t$email = $_POST['email']; unset( $_POST['save'], $_POST['send'], $_POST['email'] );\n\n\t\t\tif( $this->db->save_reply( $_POST['message_id'], $_POST, $sending ) )\n\t\t\t{\n\t\t\t\t$this->ext->set_advice_message( __( 'The reply has been saved to the database.', \"bulk\" ), 'success' );\n\n\t\t\t\tif( $sending AND $this->send_reply( $email, $_POST['subject'], $_POST['message'] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ext->set_advice_message( __( 'The reply has been successfully sent.', \"bulk\" ), 'success' );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( empty( $_POST['message'] ) OR empty( $_POST['subject'] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ext->set_advice_message( __( 'You should complete the subject and message in order to send or store the reply.', \"bulk\" ), 'danger' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ext->set_advice_message( __( 'The reply could not been sent or saved. Try again.', \"bulk\" ), 'danger' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$list = new BulkMeNow_List;\n\t\t\n\t\t$message = FALSE;\n\n\t\tif( BulkMeNow_Externals::current_user_can_see( 'messages' ) ) $message = ( isset( $_GET['message_id'] ) ) ? $this->db->get_message( $_GET['message_id'] ) : FALSE;\n\n\t\tif( ! empty( $message ) )\n\t\t{\n\t\t\tif( $message['status'] == 1 ) $this->db->move_message( $message['message_id'], 2 );\n\n\t\t\t$reply = $this->db->get_reply( $_GET['message_id'] );\n\n\t\t\t$avatar_size = 44;\n\t\t}\n\n\t\trequire( dirname( dirname( __FILE__ ) ) . '/views/message.template.php' );\n\t}", "title": "" }, { "docid": "9ab9eea9ff5f7275623c336894e0afad", "score": "0.53001803", "text": "function sympa_mailing_lists_send_list_command($request) {\n foreach ($request->lists as $id => $list) {\n $list = explode('@', $list);\n if ($request->command == 'subscribe')\n $commands[] = 'QUIET ADD ' . $list[0] . ' ' . $request->email;\n else\n $commands[] = 'QUIET DELETE ' . $list[0] . ' ' . $request->email;\n }\n $commands[] = 'QUIT';\n $to = array('[email protected]', get_option('admin_email'));\n $from = 'From: ' . get_option('admin_email');\n $subject = '';\n $message = implode(\"\\n\", $commands);\n\n $headers[] = $from;\n return wp_mail($to, $subject, $message, $headers);\n}", "title": "" }, { "docid": "3141060cf72780e19f7f9f8c516aa4a6", "score": "0.5298086", "text": "public function replyAction() {\n // Make sure user exists\n if (!$this -> _helper -> requireUser() -> isValid())\n return;\n\n // Make form\n $this -> view -> form = $form = new Yncomment_Form_Reply();\n // Not post\n if (!$this -> getRequest() -> isPost()) {\n $this -> view -> status = false;\n $this -> view -> error = Zend_Registry::get('Zend_Translate') -> _('Not a post');\n return;\n }\n $settings = Engine_Api::_() -> getApi('settings', 'core');\n \n $params = $this -> _getAllParams();\n $body = $params['body'];\n $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');\n $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');\n $params['body'] = $body;\n \n // Not valid\n if (!$form -> isValid($params)) {\n $this -> view -> status = false;\n $this -> view -> error = Zend_Registry::get('Zend_Translate') -> _('Invalid data');\n return;\n }\n \n // Start transaction\n $db = Engine_Api::_() -> getDbtable('actions', 'ynfeed') -> getAdapter();\n $db -> beginTransaction();\n\n try {\n $viewer = Engine_Api::_() -> user() -> getViewer();\n $action_id = $this -> view -> action_id = $this -> _getParam('action_id', $this -> _getParam('action', null));\n $action = Engine_Api::_() -> getDbtable('actions', 'ynfeed') -> getActionById($action_id);\n $actionOwner = Engine_Api::_() -> getItemByGuid($action -> subject_type . \"_\" . $action -> subject_id);\n // Filter HTML\n $filter = new Zend_Filter();\n $filter -> addFilter(new Engine_Filter_Censor());\n $filter -> addFilter(new Engine_Filter_HtmlSpecialChars());\n \n $body = $form -> getValue('body');\n // fix SE enable link issue\n $body = str_replace('&amp;quot;\"', '\"', $body);\n $body = str_replace('&quot;</a>', '</a>\"', $body);\n \n $body = preg_replace('/<br[^<>]*>/', \"\\n\", $body);\n\n if($action->getCommentObject() && !in_array($action->getCommentObject() -> getType(), array('core_link', 'ynfeed_map')))\n {\n // Check authorization\n if (!Engine_Api::_()->authorization()->isAllowed($action->getCommentObject(), null, 'comment'))\n throw new Engine_Exception('This user is not allowed to comment on this item.');\n }\n\n // Add the comment\n $subject = $viewer;\n $row = $action -> comments() -> addComment($subject, $body);\n $row -> parent_comment_id = $this -> _getParam('comment_id', null);\n $row -> save();\n\n // Notifications\n $notifyApi = Engine_Api::_() -> getDbtable('notifications', 'activity');\n\n // Add notification for owner of activity (if user and not viewer)\n if ($action -> subject_type == 'user' && $action -> subject_id != $viewer -> getIdentity()) {\n $notifyApi -> addNotification($actionOwner, $subject, $action, 'replied', array('label' => 'post'));\n }\n\n // Add a notification for all users that commented or like except the viewer and poster\n // @todo we should probably limit this\n $commentedUserNotifications = array();\n foreach ($action->comments()->getAllCommentsUsers() as $notifyUser) {\n if ($notifyUser -> getType() == 'user' && $notifyUser -> getIdentity() != $viewer -> getIdentity() && $notifyUser -> getIdentity() != $actionOwner -> getIdentity()) {\n\n $commentedUserNotifications[] = $notifyUser -> getIdentity();\n $notifyApi -> addNotification($notifyUser, $subject, $action, 'replied_replied', array('label' => 'post'));\n }\n }\n\n // Add a notification for all users that commented or like except the viewer and poster\n // @todo we should probably limit this\n foreach ($action->likes()->getAllLikesUsers() as $notifyUser) {\n if (in_array($notifyUser -> getIdentity(), $commentedUserNotifications))\n continue;\n\n if ($notifyUser -> getType() == 'user' && $notifyUser -> getIdentity() != $viewer -> getIdentity() && $notifyUser -> getIdentity() != $actionOwner -> getIdentity()) {\n $notifyApi -> addNotification($notifyUser, $subject, $action, 'liked_replied', array('label' => 'post'));\n }\n }\n\n // Stats\n $attachment = null;\n $attachmentPhotoValue = $this -> _getParam('photo_id');\n $attachmentType = $this -> _getParam('type');\n \n $linkEnabled = $this -> _getParam('linkEnabled');\n\n if ($attachmentPhotoValue && $attachmentType) {\n if (Engine_Api::_()->hasModuleBootstrap('advalbum'))\n $attachment = Engine_Api::_()->getItem('advalbum_photo', $attachmentPhotoValue);\n else\n $attachment = Engine_Api::_()->getItem('album_photo', $attachmentPhotoValue);\n }\n // check body exist link\n else if ($linkEnabled && Engine_Api::_()->authorization()->isAllowed('core_link', null, 'create')) \n {\n $body_decode = html_entity_decode($body);\n $body_decode = html_entity_decode($body_decode);\n $body_decode = html_entity_decode($body_decode);\n $regex = '/http(s)?:\\/\\/([^\" ]*)/mi';\n preg_match_all($regex, $body_decode, $matches);\n if (count($matches) > 0) \n {\n $link = $matches[0][0];\n if ($link) \n {\n $info = parse_url($link);\n try\n {\n $client = new Zend_Http_Client($link, array(\n 'maxredirects' => 2,\n 'timeout' => 30,\n ));\n \n // Try to mimic the requesting user's UA\n $client->setHeaders(array(\n 'User-Agent' => $_SERVER['HTTP_USER_AGENT'],\n 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'X-Powered-By' => 'Zend Framework'\n ));\n $response = $client->request();\n \n // Get content-type\n list($contentType) = explode(';', $response->getHeader('content-type'));\n $this->view->contentType = $contentType;\n \n // Handling based on content-type\n switch( strtolower($contentType) ) \n {\n // Images\n case 'image/gif':\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/tif': // Might not work\n case 'image/xbm':\n case 'image/xpm':\n case 'image/png':\n case 'image/bmp': // Might not work\n $attachmentData = $this->_previewImage($link, $response);\n break;\n \n // HTML\n case '':\n case 'text/html':\n $attachmentData = $this->_previewHtml($link, $response);\n break;\n \n // Plain text\n case 'text/plain':\n $attachmentData = $this->_previewText($link, $response);\n break;\n }\n }\n catch( Exception $e )\n {\n throw $e;\n }\n if($attachmentData)\n {\n $attachmentData['uri'] = $link;\n if (Engine_Api::_() -> core() -> hasSubject()) {\n $subject = Engine_Api::_() -> core() -> getSubject();\n if ($subject -> getType() != 'user') \n {\n $attachmentData['parent_type'] = $subject -> getType();\n $attachmentData['parent_id'] = $subject -> getIdentity();\n }\n }\n if (!empty($attachmentData['title'])) {\n $attachmentData['title'] = $filter -> filter($attachmentData['title']);\n }\n if (!empty($attachmentData['description'])) {\n $attachmentData['description'] = $filter -> filter($attachmentData['description']);\n }\n else {\n $attachmentData['description'] = $attachmentData['title'];\n }\n $attachment = Engine_Api::_() -> getApi('links', 'core') -> createLink($viewer, $attachmentData);\n }\n }\n }\n }\n if (isset($row->attachment_type))\n $row->attachment_type = ( $attachment ? $attachment->getType() : '' );\n if (isset($row->attachment_id))\n $row->attachment_id = ( $attachment ? $attachment->getIdentity() : 0 );\n $row->save();\n\n $composerDatas = $this -> getRequest() -> getParam('composer', null);\n $tagsArray = array();\n parse_str($composerDatas['tag'], $tagsArray);\n if (!empty($tagsArray)) {\n $viewer = Engine_Api::_() -> _() -> user() -> getViewer();\n $type_name = Zend_Registry::get('Zend_Translate') -> translate('post');\n if (is_array($type_name)) {\n $type_name = $type_name[0];\n } else {\n $type_name = 'post';\n }\n $notificationAPi = Engine_Api::_() -> getDbtable('notifications', 'activity');\n\n foreach ($tagsArray as $key => $tagStrValue) {\n $tag = Engine_Api::_() -> getItemByGuid($key);\n if ($tag && ($tag instanceof User_Model_User) && !$tag -> isSelf($viewer)) {\n $notifyApi -> addNotification($tag, $viewer, $action, 'tagged', array('object_type_name' => $type_name, 'label' => $type_name, ));\n } else if ($tag && ($tag instanceof Core_Model_Item_Abstract)) {\n $subject_title = $viewer -> getTitle();\n $item_type = Zend_Registry::get('Zend_Translate') -> translate($tag -> getShortType());\n $item_title = $tag -> getTitle();\n $owner = $tag -> getOwner();\n if ($action && $owner && ($owner instanceof User_Model_User) && !$owner -> isSelf($viewer)) {\n $notifyApi -> addNotification($owner, $viewer, $action, 'yncomment_tagged', array('subject_title' => $subject_title, 'label' => $type_name, 'object_type_name' => $type_name, 'item_title' => $item_title, 'item_type' => $item_type));\n }\n if (($tag instanceof Group_Model_Group)) {\n foreach ($tag->getOfficerList()->getAll() as $offices) {\n $owner = Engine_Api::_() -> getItem('user', $offices -> child_id);\n if ($action && $owner && ($owner instanceof User_Model_User) && !$owner -> isSelf($viewer)) {\n $notifyApi -> addNotification($owner, $viewer, $action, 'yncomment_tagged', array('subject_title' => $subject_title, 'label' => $type_name, 'object_type_name' => $type_name, 'item_title' => $item_title, 'item_type' => $item_type));\n }\n }\n }\n }\n }\n\n if ($action) {\n $data = array_merge((array)$action -> params, array('tags' => $tagsArray));\n $row -> params = Zend_Json::encode($data);\n }\n $row -> save();\n }\n\n $db -> commit();\n } catch (Exception $e) {\n $db -> rollBack();\n throw $e;\n }\n\n // Assign message for json\n $this -> view -> status = true;\n $this -> view -> message = Zend_Registry::get('Zend_Translate') -> _('Comment posted');\n\n // Redirect if not json\n if (null === $this -> _getParam('format', null)) {\n $this -> _redirect($form -> return_url -> getValue(), array('prependBase' => false));\n } else if ('json' === $this -> _getParam('format', null)) {\n $helper = 'ynfeed';\n $method = 'update';\n $show_all_comments = $this -> _getParam('show_all_comments');\n if(is_array($show_all_comments) && count($show_all_comments) > 1)\n {\n $show_all_comments = $show_all_comments[1];\n }\n\n $onViewPage = $this -> _getParam('onViewPage');\n if ($onViewPage) {\n $show_all_comments = true;\n }\n $this -> view -> body = $this -> view -> $helper($action, array('noList' => false, 'submitReply' => false, 'onViewPage' => $onViewPage, 'viewAllLikes' => $onViewPage, 'viewAllComments' => $onViewPage, 'hideReply' => true, 'ynfeed_comment_like_box_show' => 1), $method, $show_all_comments);\n }\n }", "title": "" }, { "docid": "3a1d6c120c062520d86cad4c29fa0fa4", "score": "0.5295179", "text": "public function testGetNextMail()\n {\n $queue = MailQueue\\MailQueue::getInstance();\n $mailIds = array();\n for ($i = 1; $i <= 3; $i ++) {\n $mail = new MailQueue\\Mail();\n $mail->setRecipient(\"receiver{$i}@example.org\");\n $mail->setSubject(\"Subject $i\");\n $mail->setMessage(\"Message $i\");\n $mail->setHeaders(\"From: [email protected]\");\n $queue->addMail($mail);\n $mailIds[] = $mail->getID();\n }\n \n $mail = $queue->getNextMail();\n $this->assertEquals($mailIds[0], $mail->getID());\n $mail = $queue->getNextMail();\n $this->assertEquals($mailIds[1], $mail->getID());\n $mail = $queue->getNextMail();\n $this->assertEquals($mailIds[2], $mail->getID());\n \n $queue->flushMailQueue();\n }", "title": "" }, { "docid": "f88c1d34f39ac2f0f0ee09df0adf9363", "score": "0.52945596", "text": "public function run()\n {\n $r1=[\n 'user_id'=>1,\n 'discussion_id'=>1,\n 'content'=>'the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',\n ];\n $r2=[\n 'user_id'=>2,\n 'discussion_id'=>3,\n 'content'=>'Ipsum as their default model text, and a search for \\'lorem ipsum\\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).',\n ];\n $r3=[\n 'user_id'=>1,\n 'discussion_id'=>3,\n 'content'=>'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem',\n ];\n Reply::create($r1);\n Reply::create($r2);\n Reply::create($r3);\n }", "title": "" }, { "docid": "b8e613558d8b9ccce1dd40aa7c5dfa3b", "score": "0.52929527", "text": "function email_delete(){\n\n\t\t\t\t\t\timap_delete($this->link, $this->msgid); \n\n\t\t\t\t\t}", "title": "" }, { "docid": "e617496406204d1ac3b081abf1cd0225", "score": "0.5286724", "text": "static function send_staff_reply($ticket, $reply) {\n $tpl = self::get_template('staff_reply');\n\n /**\n * Regularly send email to assigned operator\n */\n $subject = self::apply_tags($tpl['subject'], $ticket, $reply);\n $message = self::apply_tags($tpl['content'], $ticket, $reply);\n $operator = new aiosc_User($ticket->op_id);\n $reply_to = self::get_replyto_email($operator,$ticket);\n if(!$operator->get_meta('aiosc_notifications')) return false;\n $real_result = self::send($operator->wpUser->user_email, $reply_to, $subject, $message, null, 'aiosc_email_staff_reply_sent');\n\n /**\n * Send email-templates to all staff members from ticket's department, but only\n * if they have @aiosc_department_notifications enabled.\n * This excludes assigned operator, he will get his mail sent at the end of the function\n * and return result.\n * @since 1.0.3\n */\n $dep = new aiosc_Department($ticket->department_id);\n $usrs = $dep->get_ops(true);\n if(!empty($usrs) && is_array($usrs)) {\n foreach($usrs as $usr) {\n if($usr->ID != $ticket->op_id && $usr->get_meta('aiosc_department_notifications')) {\n $subject = self::apply_tags($tpl['subject'], $ticket, $reply, $usr);\n $message = self::apply_tags($tpl['content'], $ticket, $reply, $usr);\n $reply_to = self::get_replyto_email($usr,$ticket);\n self::send($usr->wpUser->user_email, $reply_to, $subject, $message, null, 'aiosc_email_staff_reply_sent');\n }\n }\n }\n return $real_result;\n }", "title": "" }, { "docid": "d1902248a046e9dd0c64cae388e31241", "score": "0.5281535", "text": "function sendResponse($type, $prefix)\n {\n // Create a message in our outbox\n $outgoing = $this->createOutgoingMessage();\n $messageprops = mapi_getprops($this->message, array(PR_CONVERSATION_TOPIC, PR_MESSAGE_CLASS, $this->props['complete']));\n\n $attach = mapi_message_createattach($outgoing);\n mapi_setprops($attach, array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_CONVERSATION_TOPIC], PR_ATTACHMENT_HIDDEN => true));\n $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY);\n\n $message = !$this->isTaskRequest() ? $this->message : $this->getAssociatedTask(false);\n\n $ignoreProps = array(PR_ICON_INDEX, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_SEARCH_KEY);\n\n mapi_copyto($message, array(), $ignoreProps, $outgoing);\n mapi_copyto($message, array(), array(), $sub);\n\n if (!$this->setRecipientsForResponse($outgoing, $type)) {\n return false;\n }\n\n $props = array();\n switch($type) {\n case tdmtTaskAcc:\n $props[PR_MESSAGE_CLASS] = \"IPM.TaskRequest.Accept\";\n mapi_setprops($sub, array(PR_ICON_INDEX => ICON_TASK_ASSIGNER));\n break;\n case tdmtTaskDec:\n $props[PR_MESSAGE_CLASS] = \"IPM.TaskRequest.Decline\";\n mapi_setprops($sub, array(PR_ICON_INDEX => ICON_TASK_DECLINE));\n break;\n case tdmtTaskUpd:\n mapi_setprops($sub, array(PR_ICON_INDEX => ICON_TASK_ASSIGNER));\n if($messageprops[$this->props['complete']]) {\n $props[PR_MESSAGE_CLASS] = \"IPM.TaskRequest.Complete\";\n } else {\n $props[PR_MESSAGE_CLASS] = \"IPM.TaskRequest.Update\";\n }\n\n break;\n };\n\n mapi_savechanges($sub);\n mapi_savechanges($attach);\n\n $props[PR_SUBJECT] = $prefix . $messageprops[PR_CONVERSATION_TOPIC];\n $props[$this->props['taskmode']] = $type;\n $props[$this->props['task_assigned_time']] = time();\n\n mapi_setprops($outgoing, $props);\n\n // taskCommentsInfo contains some comments which added by assignee while\n // edit response before sending task response.\n if ($this->taskCommentsInfo) {\n $comments = $this->getTaskCommentsInfo();\n $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, STGM_TRANSACTED, MAPI_CREATE | MAPI_MODIFY);\n mapi_stream_setsize($stream, strlen($comments));\n mapi_stream_write($stream, $comments);\n mapi_stream_commit($stream);\n }\n\n mapi_savechanges($outgoing);\n mapi_message_submitmessage($outgoing);\n return true;\n }", "title": "" }, { "docid": "0430965c1bfb9550eb855fd3bb832567", "score": "0.52776736", "text": "function sendMessages($queue)\n{\n echo \"Pre send Message Count: \" . count($queue) . PHP_EOL;\n\n for ($j = 1; $j <=5; $j++){\n $message = \"Stuff-$j\";\n $queue->send($message);\n }\n // Get number of messages in a queue (supports Countable interface from SPL)\n echo \"Post send Message Count: \" . count($queue) . PHP_EOL;\n}", "title": "" } ]
3d845275bbcd12bb944a395c701b0933
Adds a GET parameter to the url. The url is passed by reference.
[ { "docid": "314c66ffefea16ce665bd4de44c128de", "score": "0.7050954", "text": "function add_param(&$url, $name, $value)\n{\n $sep = strpos($url, '?') !== false ? '&' : '?';\n $url .= $sep . $name . \"=\" . urlencode($value);\n return $url;\n}", "title": "" } ]
[ { "docid": "065b2a7d6f9a5b886266e7e333ba7fc6", "score": "0.72580487", "text": "function appendGETParameter( $url, $parameter ) {\n\n\t $questionMark = '?';\n\t $ampersand = '&';\n\t $separator = '';\t//initial blank value\n\n\t if ($this->debug) {\n\t\t echo \"$url / $parameter\";\n\t }\n\t //If there isn't already a parameter\n\t if (false !== (strpos($url, $questionMark ))) {\n\t\t $separator = $ampersand; //this is the 2nd or greater parameter, so add a &\n\t } else {\n\t\t $separator = $questionMark; //this is the 1st parameter, so add a questionmark.\n\t }\n\t \n\t $urlAppended = $url . $separator . $parameter;\n\t if ($this->debug) {\n\t\t echo \" \\n <br> $urlAppended \";\n\t }\n\t return $urlAppended;\n }", "title": "" }, { "docid": "b616e44af66c43d916e4c3e5d7b836f1", "score": "0.71102005", "text": "function add_param(&$url, $name, $value) {\n\t\t$sep = strpos($url, '?') !== false ? '&' : '?';\n\t\t$url .= $sep . $name . \"=\" . urlencode($value);\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "06718dca8e41153805cc23d0491195e3", "score": "0.66097534", "text": "function AddParamToURL($url, $paramStr)\n{\n // whether there are any existing parameters\n if (strpos($url, \"?\") !== false)\n return $url . \"&amp;\" . $paramStr;\n else\n return $url . \"?\" . $paramStr;\n}", "title": "" }, { "docid": "2ef1260a93d55e599d68929b8679122f", "score": "0.65561897", "text": "function add_url_query_param($field, $value) {\n $this->_extra_query[$field] = $value;\n }", "title": "" }, { "docid": "f73b8522be98032a0d23ba96aa9dbf29", "score": "0.6417404", "text": "public function addUrlQueryParameter(string $key, $value = null): self;", "title": "" }, { "docid": "2ff9c0a5ec4c462072e5fffac70b9af8", "score": "0.62779075", "text": "static function addUrlParameter($a_url)\n\t{\n\t\tfor ($i = 1; $i < func_num_args(); $i += 2)\n\t\t{\n\t\t\tif (is_int(strpos($a_url, '?')))\n\t\t\t{\n\t\t\t\t$a_url .= '&' . func_get_arg($i) . \"=\" . urlencode(func_get_arg($i+1)); \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$a_url .= '?' . func_get_arg($i) . \"=\" . urlencode(func_get_arg($i+1)); \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $a_url;\n\t}", "title": "" }, { "docid": "89d0cfd1f63b0f0409c312afbdebba0c", "score": "0.62728065", "text": "private function setUrl() {\n $_GET['url'] = isset($_GET['url']) ? $_GET['url'] : 'IndexAction.index';\n $this->url = $_GET['url'];\n }", "title": "" }, { "docid": "43cef9d7da936e7b222ad075b8f85848", "score": "0.6215767", "text": "function addQSVar($url, $key, $value)\n {\n// $url = substr($url, 0, -1);\n $url = $this->removeQSVar($url, $key);\n if (strpos($url, '?') === false) {\n return ($url . '?' . $key . '=' . $value);\n } else {\n return ($url . '&' . $key . '=' . $value);\n }\n }", "title": "" }, { "docid": "e9bad81f78a26aec5d7454a21872ff47", "score": "0.6187635", "text": "function addUrlParam($url, array $params) {\n\t\t$query = parse_url($url, PHP_URL_QUERY);\n\n\t\t// Returns the URL string with new parameters\n\t\tif ($query) {\n\t\t\t$url .= '&' . http_build_query($params);\n\t\t} else {\n\t\t\t$url .= '?' . http_build_query($params);\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "37fa1932bb7147df44593b1e5f3e6de3", "score": "0.61331856", "text": "function &addVariable( $url, $variable, $value )\r\n {\r\n $pos = strpos( $url, \"?\" );\r\n\r\n if ( $pos )\r\n {\r\n $string = $url . \"&\" . $variable. \"=\" . $value;\r\n }\r\n else\r\n {\r\n $string = $url . \"?\" . $variable. \"=\" . $value;\r\n }\r\n\r\n return $string;\r\n }", "title": "" }, { "docid": "7c7bf3c9e3118ae93a4cf69059964e00", "score": "0.61000603", "text": "private function setUrl() {\n\t\t $_GET['url'] = ( isset($_GET['url']) ? $_GET['url'] : 'Portal/index/index/index' );\n\t\t \n\t\t $this->_url = $_GET['url'];\n\n\t }", "title": "" }, { "docid": "417e7d2391c6dd4408446b4a9d4aab46", "score": "0.60773027", "text": "function url($add){\n\t\tif ($add){\n\t\t\tif (is_array($add)){\n\t\t\t\t$out2 = $add;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tparse_str($add, $out2);\n\t\t\t}\n\t\t\t\tparse_str($_SERVER['QUERY_STRING'], $out1);\n\t\t\t\t$out = array_merge($out1, $out2);\n\t\t\t\t$out = array_map('urlencode', $out);\n\t\t\t\treturn $_SERVER['PHP_SELF'].'?'.http_build_query($out);\t\t\t\n\t\t}\n\t\telse {\n\t\t\treturn $_SERVER['REQUEST_URI'];\n\t\t}\n\t}", "title": "" }, { "docid": "5d4b67666f2e0154a2cc90e059384c1e", "score": "0.60293394", "text": "static function addUrlParam($url, $key, $val)\n {\n // Separate the anchor element from the URL if it exists.\n $urlParts = parse_url($url);\n if(isset($urlParts['fragment'])){\n $url = str_replace('#'.$urlParts['fragment'], '', $url);\n }\n\n $separator = (parse_url($url, PHP_URL_QUERY) == NULL) ? '?' : '&';\n $url .= $separator.$key.'='.$val;\n\n // Add the anchor back to the URL.\n if(isset($urlParts['fragment'])){\n $url .= '#'.$urlParts['fragment'];\n }\n\n return $url;\n }", "title": "" }, { "docid": "efd996c98eebc4ba8d5449648a6bcce6", "score": "0.6016815", "text": "private function setGet()\n\t{\n\t\treturn $this->get = $_GET;\n\t}", "title": "" }, { "docid": "2fc5c8565fab7e32bb8aa935087816b4", "score": "0.59985614", "text": "protected function _populateGet()\n\t{\n\t\t$uriPieces = parse_url($_SERVER['REQUEST_URI']);\n\t\tif (array_key_exists('query', $uriPieces)) {\n\t\t\tparse_str($uriPieces['query'], $_GET);\n\t\t}\n\t}", "title": "" }, { "docid": "1d7f80a507501deba517c51acba712d3", "score": "0.59632695", "text": "private function _getUrl()\n\t\t{\n\t\t\t$this->_url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t\t$this->_url = rtrim($this->_url, '/');\n\t\t\t$this->_url = explode(\"/\", $this->_url);\n\t\t}", "title": "" }, { "docid": "36fbbc5ce1a1117bd76fc1121ab9e1d4", "score": "0.59623957", "text": "public function setGetUrl($getUrl) {\n\t\t\t$this->getUrl = $getUrl;\n\t\t}", "title": "" }, { "docid": "a6c5a3558e2384ec11e26bbbe4cba39d", "score": "0.59528357", "text": "private function getRidOfGET()\n\t{\n $url = trim($this->url, '/');\n//cast information after &\n\t\tif(stripos($url, '?')!== false){ $url = explode('?', $url); $url= $url[0];}\n $this->url = $url;\n\t}", "title": "" }, { "docid": "a9a380a92b0fd9f9542b17913e12211c", "score": "0.58929044", "text": "private function _getUrl()\n {\n //var_dump($_GET['url']);\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "178487169e1fec014ef2bd9e1c9ac915", "score": "0.5890189", "text": "function build_geturl()\n {\n global $REQUEST_URI, $REQUEST_METHOD, $HTTP_GET_VARS, $HTTP_POST_VARS, $QUERY_STRING;\t\n list($fullfile, $voided) = explode(\"?\", $REQUEST_URI);\n $this->file = $fullfile;\n $cgi = $REQUEST_METHOD == 'GET' ? $HTTP_GET_VARS : $HTTP_POST_VARS;\n reset ($cgi);\n while (list($key, $value) = each($cgi)) \n\t\t{\n if (($key != \"row\") && ($REQUEST_METHOD == 'GET'))\n $query_string .= \"&\" . $key . \"=\" . $value;\n }\n if ($REQUEST_METHOD != 'GET')\n {\n $query_string .= $QUERY_STRING;\n }\n\t\t\n\t\tif ($HTTP_GET_VARS['mod'] != '') $query_string .= \"&mod={$HTTP_GET_VARS['mod']}\";\n\t/*\tif ($HTTP_GET_VARS['submod'] != '') $query_string .= \"&submod={$HTTP_GET_VARS['submod']}\";\n\t\tif ($HTTP_GET_VARS['sub'] != '') $query_string .= \"&sub={$HTTP_GET_VARS['sub']}\";\n\t\t*/\n return $query_string;\n }", "title": "" }, { "docid": "266e1a6c1e8e8a8013ca491c03b3a38e", "score": "0.5871716", "text": "public function get($url, $fn)\n {\n $this->rutasGET[$url] = $fn;\n }", "title": "" }, { "docid": "6b8caeade9c99b71a55dbe0a3120395d", "score": "0.5860634", "text": "public function add_parameter($newParam){\n\t\tforeach($newParam as $key=>$value){\n\t\t\t$this->$params[$key] = $value;\n\t\t}\n\t\t$this->url = NULL;\t//\tThe previously set url does not reflect the changes, by setting it to null, we indicate to the object that it needs to recalculate the url.\n\t\t$this->executed = false;\n\t}", "title": "" }, { "docid": "8988e33507fe36a67026186b8ad32153", "score": "0.5859009", "text": "public function get($url,$fn){\n $this->rutasGET[$url] = $fn;\n // debuguear($this->rutasGET[$url]);\n }", "title": "" }, { "docid": "7b131491bb6bb118870097228096c6b3", "score": "0.58550066", "text": "static function add_query_arg( $key, $value = false, $url = false ) {\n\t\t$url = empty( $url ) ? self::get_search_url() : $url;\n\t\tif ( is_array( $key ) ) {\n\t\t\treturn add_query_arg( $key, $url );\n\t\t}\n\n\t\treturn add_query_arg( $key, $value, $url );\n\t}", "title": "" }, { "docid": "22e2a9c00ee519c4ca2440cc4afd06a5", "score": "0.5850308", "text": "public function get(string $param = '');", "title": "" }, { "docid": "ccbecacf02186bc2ad56b2ac38c6a7ad", "score": "0.58011967", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "ccbecacf02186bc2ad56b2ac38c6a7ad", "score": "0.58011967", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "ccbecacf02186bc2ad56b2ac38c6a7ad", "score": "0.58011967", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "ccbecacf02186bc2ad56b2ac38c6a7ad", "score": "0.58011967", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "632b4916ecd2b91f76c88261d5c852a4", "score": "0.5794686", "text": "function get_param_url($param_array) {\n\t$GET = $_GET;\n\tforeach ($param_array as $k => $v) $GET[$k]=$v;\n // set new parameters and override the old ones if neccessary\n\t\n\t$b = strpos(curPageURL(),'?');\n\tif ($b ===false)\n\t\t$u = curPageURL().'?';\n\telse\n\t\t$u = substr(curPageURL(),0, $b).'?';\n\tforeach ($GET as $k => $v)\t$u = $u.$k.'='.urlencode($v).'&';\n\treturn $u;\n }", "title": "" }, { "docid": "3212eb583c722045bcc268e65aa65803", "score": "0.57905525", "text": "static function urlAdd($url, $type, $value, $operation = 'and'){\n\t\t$filter = $_GET;\n\t\t\n\t\tif(!isset($filter['es'])){\n\t\t\t$filter['es'] = array();\n\t\t}\n\n\t\t$es = &$filter['es'];\n\n\t\t$op = $operation;\n\n\t\tif(isset($es[$type])){\n\t\t\t$op = array_keys($es[$type]);\n\t\t\t$op = $op[0];\n\t\t}\n\n\t\t$es[$type][$op][] = $value;\n\n\t\treturn self::_buildUrl($url, $filter);\n\t}", "title": "" }, { "docid": "c61ff3ba790ddfec554ddd2927c9d966", "score": "0.5774273", "text": "function addURLParameters( $url, $params ){\n foreach( $params as $key=>$param ) { $url = addURLParameter( $url, $key, $param ); }\n return $url;\n}", "title": "" }, { "docid": "1a93375fac81aa10fa1e4fc3bc03bfb1", "score": "0.5754295", "text": "function urlGetLine() {\r\n\t$getline = \"\";\r\n\t$first = true;\r\n\tforeach( $_GET as $attribute => $value ) {\r\n\t\tif( !$first ) $getline .= \"&\";\r\n\t\t$getline .= $attribute.\"=\".urlencode( $value );\r\n\t\t$first = false;\r\n\t}\r\n\tif( !$first ) $getline = \"?\".$getline;\r\n\treturn $getline;\r\n}", "title": "" }, { "docid": "1a93375fac81aa10fa1e4fc3bc03bfb1", "score": "0.5754295", "text": "function urlGetLine() {\r\n\t$getline = \"\";\r\n\t$first = true;\r\n\tforeach( $_GET as $attribute => $value ) {\r\n\t\tif( !$first ) $getline .= \"&\";\r\n\t\t$getline .= $attribute.\"=\".urlencode( $value );\r\n\t\t$first = false;\r\n\t}\r\n\tif( !$first ) $getline = \"?\".$getline;\r\n\treturn $getline;\r\n}", "title": "" }, { "docid": "6650bf9aae4a1bb74966ba707c54d714", "score": "0.5729696", "text": "public function set_get($p_index, $p_value): void {\n $_GET[$p_index] = $p_value;\n }", "title": "" }, { "docid": "61f7a339f810394b566ef359e1219457", "score": "0.5698999", "text": "public final function addUrlParam($name, $value) {\n if (isset($value)) {\n // Validate request parameter value.\n if (!is_string($value) || !valid_url($value)) {\n throw new InvalidArgumentException(\"Parameter \\\"{$name}\\\" must contain an absolute URL value.\", ISSUU_API_ERROR_INVALID_FIELD_FORMAT);\n }\n // Add request parameter.\n $this->addParam($name, $value);\n }\n }", "title": "" }, { "docid": "724fe01c62476c15ec8a0b514c3d0a0b", "score": "0.5694776", "text": "function toUrl($url, $queryString=''){\r\n\t\techo addUrlVar($url, $queryString);\r\n\t}", "title": "" }, { "docid": "260508162ee4f656681f79790b1627f5", "score": "0.5684369", "text": "public function addFiltersToUrl()\n {\n }", "title": "" }, { "docid": "260508162ee4f656681f79790b1627f5", "score": "0.5684369", "text": "public function addFiltersToUrl()\n {\n }", "title": "" }, { "docid": "2c6e824037f8ecbd5b5103f41e3a326b", "score": "0.56456906", "text": "public function get($url, $query = []);", "title": "" }, { "docid": "415628a694dc69bd755bf448a905982c", "score": "0.5637544", "text": "public function addRequestParam($url, $params)\n {\n return Url::addRequestParam($url, $params);\n }", "title": "" }, { "docid": "ee2399e1107d496a2b70a4932707afee", "score": "0.5624924", "text": "function add_query_arg() {\n\t$ret = '';\n\tif ( is_array(func_get_arg(0)) ) {\n\t\t$uri = @func_get_arg(1);\n\t} else {\n\t\tif ( @func_num_args() < 3 )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = @func_get_arg(2);\n\t}\n\n\tif ( strstr($uri, '?') ) {\n\t\t$parts = explode('?', $uri, 2);\n\t\tif ( 1 == count($parts) ) {\n\t\t\t$base = '?';\n\t\t\t$query = $parts[0];\n\t\t} else {\n\t\t\t$base = $parts[0] . '?';\n\t\t\t$query = $parts[1];\n\t\t}\n\t}\n\telse if ( strstr($uri, '/') ) {\n\t\t$base = $uri . '?';\n\t\t$query = '';\n\t} else {\n\t\t$base = '';\n\t\t$query = $uri;\n\t}\n\n\tparse_str($query, $qs);\n\tif ( is_array(func_get_arg(0)) ) {\n\t\t$kayvees = func_get_arg(0);\n\t\t$qs = array_merge($qs, $kayvees);\n\t} else {\n\t\t$qs[func_get_arg(0)] = func_get_arg(1);\n\t}\n\n\tforeach($qs as $k => $v) {\n\t\tif ( $v != '' ) {\n\t\t\tif ( $ret != '' )\n\t\t\t\t$ret .= '&';\n\t\t\t$ret .= \"$k=$v\";\n\t\t}\n\t}\n\t$ret = $base . $ret;\n\treturn trim($ret, '?');\n}", "title": "" }, { "docid": "02b6befb18b7a73cfcfada6c8d7e9fdd", "score": "0.5619542", "text": "public function getUrlWithParams()\n {\n $params = $this->paramsToString($this->getParams);\n\n if ( ! empty($params)) $params = '?' . $params;\n\n return $this->requestUrl . $params;\n }", "title": "" }, { "docid": "738e88350ac72b22e67d242eb626917f", "score": "0.55993694", "text": "public function get($url, array $params=array());", "title": "" }, { "docid": "d5b7973e0529b345a5186b70cad1ab9f", "score": "0.55828154", "text": "public function addRequestParam($url, $param)\n {\n $startDelimiter = false === strpos($url, '?') ? '?' : '&';\n\n $arrQueryParams = [];\n foreach ($param as $key => $value) {\n if (is_numeric($key) || is_object($value)) {\n continue;\n }\n\n if (is_array($value)) {\n // $key[]=$value1&$key[]=$value2 ...\n $arrQueryParams[] = $key . '[]=' . implode('&' . $key . '[]=', $value);\n } elseif ($value === null) {\n $arrQueryParams[] = $key;\n } else {\n $arrQueryParams[] = $key . '=' . $value;\n }\n }\n if (!empty($arrQueryParams)) {\n $url .= $startDelimiter . implode('&', $arrQueryParams);\n }\n\n return $url;\n }", "title": "" }, { "docid": "7c4bae2dd10cf58729af21925d63988c", "score": "0.55771595", "text": "public function get($url, $action)\n\t{\n\t\t$this->add($url, 'GET', $action);\n\t}", "title": "" }, { "docid": "03ec9fb73a767cf8de4519d5d707cdd3", "score": "0.55650824", "text": "function appendQueryString($url, $qs)\n\t{\n\t\tif ($url[0] == \"&\") \n\t\t{\n\t\t\t$url = $qs.$url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url .= (strstr($url, \"?\") !== false) ? \"&$qs\" : \"?$qs\";\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "1ee1eb8a3ee7bcb059d6509db9630a6c", "score": "0.5563719", "text": "private function add_querystring ($url, $args = NULL)\n\t{\n\t\tif (!is_null($args))\n\t\t\tksort($args);\n\t\t$first_arg = true;\n\t\tforeach($args as $key => $value) {\n\t\t\tif($first_arg) { \n\t\t\t\t//$url .= '?' . $key . '=' . urlencode($value); \n\t\t\t\t$url .= '?' . $key . '=' . $value; \n\t\t\t\t$first_arg = false;\n\t\t\t} \n\t\t\telse {\t\n\t\t\t\t//$url .= '&' . $key . '=' . urlencode($value); \n\t\t\t\t$url .= '&' . $key . '=' . $value; \n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->debug_message (__FUNCTION__, 'returning url: ' . $url);\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "503c2b74439d0db21a73e580ef37e674", "score": "0.5547904", "text": "public static function addURLParams($url, $additional_params = array())\n {\n $params = array();\n if (strpos($url, '?') !== false) {\n list($url, $existing_params) = explode('?', $url);\n $existing_params = explode('&', $existing_params);\n foreach ($existing_params as $val) {\n list($var, $val) = explode('=', $val);\n $params[$var] = $val;\n }\n }\n\n $params = array_merge($params, $additional_params);\n\n $url .= '?';\n\n foreach ($params as $option=>$value) {\n if ($option == 'driver') {\n continue;\n }\n if ($option == 'format'\n && $value == 'html') {\n continue;\n }\n if (!empty($value)) {\n $url .= \"&$option=$value\";\n }\n }\n $url = str_replace('?&', '?', $url);\n return trim($url, '?;=');\n }", "title": "" }, { "docid": "6475bca8551755308b68e4e1b2c79573", "score": "0.5545426", "text": "public function addGetParameters(array $params);", "title": "" }, { "docid": "0ff748a58defca0f9a215d39ed980d75", "score": "0.55254143", "text": "public function __construct(){\n $this->url = $_GET['url'];\n }", "title": "" }, { "docid": "ebc8fb33266b6df901746ee005ce490f", "score": "0.55094045", "text": "protected function _addAdditionalGetParams($params)\n {\n $params = $this->_normalizeGetParams($params);\n $this->_additional404GetParams = array_merge($this->_additional404GetParams, GeneralUtility::trimExplode('&', $params, true));\n }", "title": "" }, { "docid": "c788cd309f09e11b06078abfdb340f8a", "score": "0.5497175", "text": "public static function removeGetQuery($url)\n\t{\n\t\t# Create a variable wth the default value of the passed URL.\n\t\t$alt_url=str_ireplace(GET_QUERY, '', $url);\n\t\t# Check if the link has a page query.\n\t\tif(!empty($alt_url))\n\t\t{\n\t\t\t$url=$alt_url;\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "ebe4ba6779a476d9ea276e7ecf05942f", "score": "0.548459", "text": "public function url($url) {\n\t\treturn $this->add('url', $url);\n\t}", "title": "" }, { "docid": "6f7e1f66d3a0860ee883404c69ff6522", "score": "0.5483479", "text": "public static function addParams($url,$params) {\r\n\t\tif(!is_array($params)) {\r\n\t\t\t$params=self::expandRequest($params);\r\n\t\t}\r\n\r\n\t\t$parts=explode('?',$url);\r\n\t\t$existingParams=array();\r\n\t\tif(count($parts)>1) {\r\n\t\t\t$existingParams=self::expandRequest(array_pop($parts));\r\n\t\t}\r\n\r\n\t\t$params=array_merge($existingParams,$params);\r\n\t\t$paramParts=array();\r\n\r\n\t\tforeach($params as $key=>$value) {\r\n\t\t\t$paramParts[]=\"{$key}=\".urlencode($value);\r\n\t\t}\r\n\r\n\t\treturn array_shift($parts).(count($paramParts)?'?'.implode('&',$paramParts):'');\r\n\t}", "title": "" }, { "docid": "c095921de893e2577ed70dd098f37279", "score": "0.5479016", "text": "protected function addParameterToUrl($url, $parameter, $value)\n {\n $cleanUrl = $this->removeParameterFromUrl($url, $parameter);\n \n $url = explode( '?', $cleanUrl );\n if (sizeof($url)>1) {\n // already have a ?\n $joiner = \"&\";\n } else {\n $joiner = \"?\";\n }\n\n $urlParameter = $joiner . $parameter . '=' . urlencode($value);\n\n return $cleanUrl .= $urlParameter;\n }", "title": "" }, { "docid": "e47ec419a9eae04c4a7de6535d5717d7", "score": "0.54779077", "text": "public function buildGETURL()\n\t{\n\t\t$data = array();\n\t\tif(!empty($this->username))\n\t\t{\n\t\t\t$this->username = array_map('rawurlencode', $this->username);\n\t\t\t$data[] = 'username[]=' . implode('&username[]=', $this->username);\n\t\t}\n\n\t\tif(!empty($this->email))\n\t\t{\n\t\t\t$this->email = array_map('rawurlencode', $this->email);\n\t\t\t$data[] = 'email[]=' . implode('&email[]=', $this->email);\n\t\t}\n\n\t\tif(!empty($this->ip))\n\t\t{\n\t\t\t$this->ip = array_map('rawurlencode', $this->ip);\n\t\t\t$data[] = 'ip[]=' . implode('&ip[]=', $this->ip);\n\t\t}\n\n\t\t// Allow the API URL to be overridden if we need to, but if we don't want to, fall back to the default URL.\n\t\t$url = Core::getConfig('sfs.api_url') ?: self::API_URL;\n\t\t$url .= '?' . implode('&', $data) . '&f=json&unix=1';\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "b7ea5a40a46832758b9e2a92870b04bf", "score": "0.54708433", "text": "function get($url);", "title": "" }, { "docid": "5db1f5c1843a28ef9368e00abeb37866", "score": "0.5468627", "text": "public function addQueryString($key, $value, $preEncoded = false);", "title": "" }, { "docid": "aef4c30e03e3b26c6d722dd5c8f9cb00", "score": "0.5465344", "text": "function get($path, $action, $name = NULL) {\n $GLOBALS['app']->addRoute('GET', $path, $action, $name);\n}", "title": "" }, { "docid": "214beea89a5eab10b7f39e0289cee5d2", "score": "0.5464947", "text": "public function form_action_url_params($new_params=''){\n\t\tif(isset($_GET)){\n\t\t\t$url_params = '';\n $final_param_array=array();\n if(!empty($new_params)){\n $new_params_array = explode('&',$new_params);\n foreach($new_params_array as $k => $param_set){\n if(strstr($param_set,'-')==true){\n $negative_keys[] = substr($param_set,1);\n unset($new_params_array[$k]);\n continue;\n }\n $single_param = explode('=',$param_set);\n $final_param_array[$single_param[0]] = $single_param[1];\n }\n }\n\t\t\tforeach($_GET as $k => $v){\n if(count($final_param_array)>0){ foreach($final_param_array as $new_k => $new_v){\n if($k==$new_k){\n $v=$new_v;\n unset($final_param_array[$new_k]);\n }\n }}\n $url_params .= \"{$k}={$v}&\";\n }\n if(count($final_param_array)>0){\n foreach($final_param_array as $k => $v){\n $url_params .= \"{$k}={$v}&\";\n }\n }\n\t\t}\n\t\t$url = $url_params . '#call-' . $this->id;\n\t\t\n\t\techo $url;\n\t\treturn;\n\t}", "title": "" }, { "docid": "91d635a3ad6f9312cf8dbfb1807ba7bd", "score": "0.5457909", "text": "function add_query_arg() {\n\t$args = func_get_args();\n\tif ( is_array( $args[0] ) ) {\n\t\tif ( count( $args ) < 2 || false === $args[1] )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = $args[1];\n\t} else {\n\t\tif ( count( $args ) < 3 || false === $args[2] )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = $args[2];\n\t}\n\n\tif ( $frag = strstr( $uri, '#' ) )\n\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\n\telse\n\t\t$frag = '';\n\n\tif ( 0 === stripos( $uri, 'http://' ) ) {\n\t\t$protocol = 'http://';\n\t\t$uri = substr( $uri, 7 );\n\t} elseif ( 0 === stripos( $uri, 'https://' ) ) {\n\t\t$protocol = 'https://';\n\t\t$uri = substr( $uri, 8 );\n\t} else {\n\t\t$protocol = '';\n\t}\n\n\tif ( strpos( $uri, '?' ) !== false ) {\n\t\tlist( $base, $query ) = explode( '?', $uri, 2 );\n\t\t$base .= '?';\n\t} elseif ( $protocol || strpos( $uri, '=' ) === false ) {\n\t\t$base = $uri . '?';\n\t\t$query = '';\n\t} else {\n\t\t$base = '';\n\t\t$query = $uri;\n\t}\n\n\tasc_parse_str( $query, $qs );\n\t$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\n\tif ( is_array( $args[0] ) ) {\n\t\t$kayvees = $args[0];\n\t\t$qs = array_merge( $qs, $kayvees );\n\t} else {\n\t\t$qs[ $args[0] ] = $args[1];\n\t}\n\n\tforeach ( $qs as $k => $v ) {\n\t\tif ( $v === false )\n\t\t\tunset( $qs[$k] );\n\t}\n\n\t$ret = build_query( $qs );\n\t$ret = trim( $ret, '?' );\n\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\n\t$ret = $protocol . $base . $ret . $frag;\n\t$ret = rtrim( $ret, '?' );\n\treturn $ret;\n}", "title": "" }, { "docid": "645ee8b32429f2e97bd9dc113bf9b3bc", "score": "0.54521465", "text": "public static function pushGetVar($url = null, $data = array()){\n\t\treturn $url . ((strpos($url, '?') > 0) ? null : '?') . str_replace('?', '', self::addToGetString(array_keys($data), array_values($data)));\n\t}", "title": "" }, { "docid": "aaeb6b679d6065164caa5ce00720d2f3", "score": "0.54509664", "text": "public static function add_query_arg() {\r\n\t\t$ret = '';\r\n\t\tif ( is_array( func_get_arg(0) ) ) {\r\n\t\t\t$uri = ( @func_num_args() < 2 || false === @func_get_arg( 1 ) ) ? $_SERVER['REQUEST_URI'] : @func_get_arg( 1 );\r\n\t\t} else {\r\n\t\t\t$uri = ( @func_num_args() < 3 || false === @func_get_arg( 2 ) ) ? $_SERVER['REQUEST_URI'] : @func_get_arg( 2 );\r\n\t\t}\r\n\r\n\t\tif ( $frag = strstr( $uri, '#' ) ) {\r\n\t\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\r\n\t\t} else {\r\n\t\t\t$frag = '';\r\n\t\t}\r\n\r\n\t\tif ( preg_match( '|^https?://|i', $uri, $matches ) ) {\r\n\t\t\t$protocol = $matches[0];\r\n\t\t\t$uri = substr( $uri, strlen( $protocol ) );\r\n\t\t} else {\r\n\t\t\t$protocol = '';\r\n\t\t}\r\n\r\n\t\tif ( strpos( $uri, '?' ) !== false ) {\r\n\t\t\t$parts = explode( '?', $uri, 2 );\r\n\t\t\tif ( 1 == count( $parts ) ) {\r\n\t\t\t\t$base = '?';\r\n\t\t\t\t$query = $parts[0];\r\n\t\t\t} else {\r\n\t\t\t\t$base = $parts[0] . '?';\r\n\t\t\t\t$query = $parts[1];\r\n\t\t\t}\r\n\t\t} elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) {\r\n\t\t\t$base = $uri . '?';\r\n\t\t\t$query = '';\r\n\t\t} else {\r\n\t\t\t$base = '';\r\n\t\t\t$query = $uri;\r\n\t\t}\r\n\r\n\t\tparse_str( $query, $qs );\r\n\r\n\t\tif ( get_magic_quotes_gpc() )\r\n\t\t\t$qs = format::stripslashes_deep( $qs );\r\n\r\n\t\t$qs = format::urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\r\n\t\tif ( is_array( func_get_arg( 0 ) ) ) {\r\n\t\t\t$kayvees = func_get_arg( 0 );\r\n\t\t\t$qs = array_merge( $qs, $kayvees );\r\n\t\t} else {\r\n\t\t\t$qs[func_get_arg( 0 )] = func_get_arg( 1 );\r\n\t\t}\r\n\r\n\t\tforeach ( ( array ) $qs as $k => $v ) {\r\n\t\t\tif ( $v === false )\r\n\t\t\t\tunset( $qs[$k] );\r\n\t\t}\r\n\r\n\t\t$ret = http_build_query( $qs, '', '&' );\r\n\t\t$ret = trim( $ret, '?' );\r\n\t\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\r\n\t\t$ret = $protocol . $base . $ret . $frag;\r\n\t\t$ret = rtrim( $ret, '?' );\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "24ff622713a851364f26aa0c2677e493", "score": "0.5430426", "text": "function add_query_arg() {\n\t$ret = '';\n\tif ( is_array( func_get_arg(0) ) ) {\n\t\tif ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = @func_get_arg( 1 );\n\t} else {\n\t\tif ( @func_num_args() < 3 || false === @func_get_arg( 2 ) )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = @func_get_arg( 2 );\n\t}\n\n\tif ( $frag = strstr( $uri, '#' ) )\n\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\n\telse\n\t\t$frag = '';\n\n\tif ( preg_match( '|^https?://|i', $uri, $matches ) ) {\n\t\t$protocol = $matches[0];\n\t\t$uri = substr( $uri, strlen( $protocol ) );\n\t} else {\n\t\t$protocol = '';\n\t}\n\n\tif ( strpos( $uri, '?' ) !== false ) {\n\t\t$parts = explode( '?', $uri, 2 );\n\t\tif ( 1 == count( $parts ) ) {\n\t\t\t$base = '?';\n\t\t\t$query = $parts[0];\n\t\t} else {\n\t\t\t$base = $parts[0] . '?';\n\t\t\t$query = $parts[1];\n\t\t}\n\t} elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) {\n\t\t$base = $uri . '?';\n\t\t$query = '';\n\t} else {\n\t\t$base = '';\n\t\t$query = $uri;\n\t}\n\n\tcm_parse_str( $query, $qs );\n\t$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\n\tif ( is_array( func_get_arg( 0 ) ) ) {\n\t\t$kayvees = func_get_arg( 0 );\n\t\t$qs = array_merge( $qs, $kayvees );\n\t} else {\n\t\t$qs[func_get_arg( 0 )] = func_get_arg( 1 );\n\t}\n\n\tforeach ( (array) $qs as $k => $v ) {\n\t\tif ( $v === false )\n\t\t\tunset( $qs[$k] );\n\t}\n\n\t$ret = build_query( $qs );\n\t$ret = trim( $ret, '?' );\n\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\n\t$ret = $protocol . $base . $ret . $frag;\n\t$ret = rtrim( $ret, '?' );\n\treturn $ret;\n}", "title": "" }, { "docid": "436d2e4e9010bb1920e85be7d40baf7c", "score": "0.5409314", "text": "public function urlParam()\n {\n return 'up-'.$this->id;\n }", "title": "" }, { "docid": "ec9ea84cc5df46304294be170f2f58eb", "score": "0.5392189", "text": "public static function addGetParameters(string $url, array $params)\n {\n $uri = new Uri($url);\n $uri->addParams($params);\n return $uri->getUri();\n }", "title": "" }, { "docid": "22300e5745202a3c7c5a3e836bdb282b", "score": "0.5391622", "text": "private function createRequestUriGiven(){\n\t $this->request = $this->backref;\n if (count($_GET) > 6) {\n $this->request .= \"&\";\n } else {\n $this->request .= \"?\";\n }\n foreach ($this->returnVars as $var) {\n $this->request .= $var . \"=\" . urlencode($_GET[$var]) . \"&\";\n }\n $this->request = substr($this->request, 0, -1);\n }", "title": "" }, { "docid": "832f542c5e37578b13336c19d9837b27", "score": "0.5386086", "text": "public function setRequestUrl ($url) {}", "title": "" }, { "docid": "9f8db4e90a5f877228d4065e4b207b85", "score": "0.53857285", "text": "function linkparam($param){\r\n\t\tif (substr($param,0,1) != \"&\") $param = \"&\".$param;\r\n\t\t$this->parameters = $param;\r\n\t}", "title": "" }, { "docid": "c591833c06639f2183410b5ad76da961", "score": "0.5382748", "text": "public static function addHttpQuery($url, $query)\n {\n $fragment = parse_url($url, PHP_URL_FRAGMENT);\n $separator = (parse_url($url, PHP_URL_QUERY) === NULL) ? '?' : '&';\n if ($fragment === NULL) {\n return $url . $separator . $query;\n } else {\n return strstr($url, '#', true) . $separator . $query . $fragment;\n }\n }", "title": "" }, { "docid": "3a0da6fdeeb856b139ac6923b2a079c7", "score": "0.5376382", "text": "public function url($url) {\n\t\t$this->url = $url;\n\t}", "title": "" }, { "docid": "f5205e2ed23bc712b4d6691e3e9a4a42", "score": "0.5368727", "text": "public function get($url) {}", "title": "" }, { "docid": "501fdd7e3ea234bf13f75736305198e0", "score": "0.536457", "text": "function CriaUrl($tipo = 'GET',$exclui = false){\n list($nome_arq, $voided) = explode(\"?\", $_SERVER[REQUEST_URI]);\n $cgi = ($tipo == 'GET')?$_GET: $_POST;\n reset ($cgi);\n while(list($key, $value) = each($cgi)) {\n if(is_array($exclui)){\n if(in_array($key,$exclui))continue;\n }else{\n if($exclui != false){\n if($key == $exclui)continue;\n }\n }\n if($key == \"atual\")continue;\n $query_string .= \"&\" . $key . \"=\" . $value;\n }\n return $query_string;\n}", "title": "" }, { "docid": "a6176c138d85e05c094f3a749f0f7169", "score": "0.53564906", "text": "protected function url_params()\r\n\t{\r\n\r\n\t\t$excludes = func_get_args();\r\n\t\tfor($i=0;$i<count($excludes);++$i)\r\n\t\t{\r\n\t\t\tif(is_array($excludes[$i]))\r\n\t\t\t{\r\n\t\t\t\t$excludes = array_merge($excludes,$excludes[$i]);\r\n\t\t\t\tunset($excludes[$i]);\r\n\t\t\t}\r\n\t\t\tif(is_null($excludes[$i]))\r\n\t\t\t{\r\n\t\t\t\tunset($excludes[$i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$returnValue = \"\";\r\n\r\n\t\tforeach ($_GET as $key => $value)\r\n\t\t{\r\n\t\t\tif (!(in_array($key, $excludes))) $returnValue.=\"&$key=$value\";\r\n\t\t}\r\n\t\treturn $returnValue;\r\n\t}", "title": "" }, { "docid": "394f49e6739898a1fa26336dab835ff9", "score": "0.534832", "text": "public function add_endpoint_to_url( $url ) {\n\t\t$options = Mint_AB_Testing_Options::instance();\n\n\t\t$url = add_query_arg( $options->get_option( 'endpoint' ), '', $url );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "8224044f61a8a5d11a079efb683ac412", "score": "0.5329705", "text": "protected function set_url( string $new_url ) {\n\t\t\t$this->url = $new_url;\n\t\t}", "title": "" }, { "docid": "27a41e5c174f7ec0fe5155164dc23cc8", "score": "0.5328462", "text": "function print_get($skip)\n{\n echo \"s=$skip\";\n foreach ($_GET as $key => $value)\n echo \"&\" . urlencode($key) . \"=\" . urlencode($value);\n}", "title": "" }, { "docid": "6a72a1bc4f406665e7df497199f53527", "score": "0.53245103", "text": "public function get($url, array $params = []);", "title": "" }, { "docid": "41994a4bd323bebd3336baecd66e1413", "score": "0.5301293", "text": "public function assembleUrlStringWithFakeGet()\n {\n $fakeGet = $this->fakeGet;\n $parsedUrl = parse_url($this->url);\n $fakeGet['scheme'] = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : 'http';\n $urlWithoutProtocol = preg_replace('@^.*://@', '', $this->url);\n $fakeGetString = http_build_query($fakeGet);\n $ret = sprintf(\"/%s/%s\", $fakeGetString, $urlWithoutProtocol);\n return $ret;\n }", "title": "" }, { "docid": "3c4db29a6bda395247ae6da2debaf0b6", "score": "0.52956593", "text": "public static function addURLparameter($url, $parameter) {\n\n\t\t/* For backwards compatibility - allow $parameter to be a string. */\n\t\tif(is_string($parameter)) {\n\t\t\t/* Print warning to log. */\n\t\t\t$backtrace = debug_backtrace();\n\t\t\t$where = $backtrace[0]['file'] . ':' . $backtrace[0]['line'];\n\t\t\tSimpleSAML_Logger::warning(\n\t\t\t\t'Deprecated use of SimpleSAML_Utilities::addURLparameter at ' .\t$where .\n\t\t\t\t'. The parameter \"$parameter\" should now be an array, but a string was passed.');\n\n\t\t\t$parameter = self::parseQueryString($parameter);\n\t\t}\n\t\tassert('is_array($parameter)');\n\n\t\t$queryStart = strpos($url, '?');\n\t\tif($queryStart === FALSE) {\n\t\t\t$oldQuery = array();\n\t\t\t$url .= '?';\n\t\t} else {\n\t\t\t$oldQuery = substr($url, $queryStart + 1);\n\t\t\tif($oldQuery === FALSE) {\n\t\t\t\t$oldQuery = array();\n\t\t\t} else {\n\t\t\t\t$oldQuery = self::parseQueryString($oldQuery);\n\t\t\t}\n\t\t\t$url = substr($url, 0, $queryStart + 1);\n\t\t}\n\n\t\t$query = array_merge($oldQuery, $parameter);\n\t\t$url .= http_build_query($query, '', '&');\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "00054c153d04e74e81811279adf33d59", "score": "0.5292619", "text": "function http_get ($url, array $options = null , array &$info = null ) {}", "title": "" }, { "docid": "9c052d59fd02153625caa03e8d39b432", "score": "0.52811474", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->id->CurrentValue)) {\n\t\t\t$sUrl .= \"id=\" . urlencode($this->id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "ae278b2909063bb98d54758dc6055ec1", "score": "0.5266012", "text": "static function SetParam($url, $name, $value)\r\n\t{\r\n $replacement = \"\";\r\n\t\tif ($value !== NULL)\r\n {\r\n $value = Url::EncodeURIComponent($value);\r\n $replacement = \"$name=$value\";\r\n }\r\n\r\n\t\tif (strpos($url, \"$name=\") === false)\r\n\t\t{\r\n\t\t if (!empty($replacement))\r\n {\r\n if (strpos($url, \"?\") === false)\r\n {\r\n $url .= \"?$replacement\";\r\n }\r\n else\r\n {\r\n $url .= \"&$replacement\";\r\n }\r\n }\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$url = preg_replace(\"/$name=[^&=]*/\", $replacement, $url);\r\n\t\t}\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "title": "" }, { "docid": "89b6044172c7095508b375273fb603d7", "score": "0.5265788", "text": "function KeyUrl($url, $parm = \"\") {\r\n\t\t$sUrl = $url . \"?\";\r\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\r\n\t\tif (!is_null($this->u_ID->CurrentValue)) {\r\n\t\t\t$sUrl .= \"u_ID=\" . urlencode($this->u_ID->CurrentValue);\r\n\t\t} else {\r\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\r\n\t\t}\r\n\t\treturn $sUrl;\r\n\t}", "title": "" }, { "docid": "11d67f8a76fb2cc16a9c67b6bbe78d7b", "score": "0.5251949", "text": "private function addGetToAction($f_key,$f_val) {\n $key = preg_replace('/[^A-Za-z0-9_]/',\"\",$f_key);\n $val = htmlentities(urlencode($f_val));\n \n /*--if action is already query string, simply append key/val pair--*/\n if (false !== strstr($this->action,\"?\")) {\n $this->action .= \"&amp;$key=$val\";\n } else { /*--if it's not a query string yet, make it one--*/\n $this->action .= \"?$key=$val\";\n }\n \n }", "title": "" }, { "docid": "1cf92c178f1e6c979a476b230d702d73", "score": "0.5243064", "text": "private function prepareQueryUrl() {\n $url = $this->url;\n\n if ($this->sheet) {\n $this->queryParams['sheet'] = $this->sheet;\n }\n\n if ($this->queryParams) {\n $url .= '/?';\n $url .= http_build_query($this->queryParams);\n $this->url = $url;\n }\n }", "title": "" }, { "docid": "08475e57c54677cd0783fe547a5f2a1c", "score": "0.523627", "text": "public function selfUrl($extra_get_variables = '')\n {\n return $this->buildURL(false, $extra_get_variables, true);\n }", "title": "" }, { "docid": "5b8f556e27998e463102881790d52ea8", "score": "0.5230219", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->id->CurrentValue)) {\n\t\t\t$sUrl .= \"id=\" . urlencode($this->id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\tif (!is_null($this->angsuran->CurrentValue)) {\n\t\t\t$sUrl .= \"&angsuran=\" . urlencode($this->angsuran->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "6d4f466b640b42a23423e5ec5e007cde", "score": "0.52286243", "text": "protected function curlSetGet()\n\t{\n\t\tcurl_setopt( $this->curlHandle, CURLOPT_POST, 0 );\n\t\tcurl_setopt( $this->curlHandle, CURLOPT_HTTPGET, 1 );\n\t}", "title": "" }, { "docid": "f32ba13ca6439d9d0c2a06910dda2787", "score": "0.52184266", "text": "private function setMethodToGet(){\n $this->method = 'GET';\n }", "title": "" }, { "docid": "0c28a85dab25d6fa79998111fe6f3cbf", "score": "0.5197132", "text": "function addQueryString($name, $value, $preencoded = false)\r\n {\r\n if ($preencoded) {\r\n $this->querystring[$name] = $value;\r\n } else {\r\n $this->querystring[$name] = is_array($value) ? array_map('rawurlencode', $value): rawurlencode($value);\r\n }\r\n }", "title": "" }, { "docid": "a7c48851749019b0196ce8b8e4e47f9a", "score": "0.5189221", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->nro_orden->CurrentValue)) {\n\t\t\t$sUrl .= \"nro_orden=\" . urlencode($this->nro_orden->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "db96273cc255024f763464e274504619", "score": "0.5188959", "text": "function GetUrl ($path='', $arg='', $val='')\n{\n\t$get = $_GET;\n\t$get['path'] = $path;\n\n\t# delete switches from URL\n\t$get['lang'] = $get['auth'] = '';\n\n\tif ($arg <> '') {\n\t\tif (! is_array($arg)) $get[$arg] = $val;\n\t\telse foreach ($arg as $key=>$value) $get[$key] = $value;\n\t}\n\n\t# build query string\n\t$query = array();\n\tforeach ($get as $key=>$value) if ($value <> '') {\n\t\tif ($this->cfgModRewrite <> true OR $key <> 'path') {\n\t\t\t$query[] = urlencode($key).'='.urlencode($value);\n\t\t}\n\t}\n\tif (($query = join('&',$query)) <> '') $query = '?'.$query;\n\n\tif ($this->cfgModRewrite) {\n\t\treturn $this->cfgBaseUrl.str_replace('%2F','/',urlencode($get['path'])).$query;\n\t} else {\n\t\treturn $_SERVER['PHP_SELF'].$query;\n\t}\n}", "title": "" }, { "docid": "fd97a5cad86e922b97549fa9b820bb5a", "score": "0.51760083", "text": "public function AddParamsToUrlProvider() {\n $data = array();\n\n // Base case.\n $data[] = array('http://www.foo.com', array('a' => 'b'),\n 'http://www.foo.com?a=b');\n // Multiple parameters.\n $data[] = array('http://www.foo.com', array('a' => 'b', 'c' => 'd'),\n 'http://www.foo.com?a=b&c=d');\n // Params in URL.\n $data[] = array('http://www.foo.com?x=y', array('a' => 'b'),\n 'http://www.foo.com?x=y&a=b');\n // Requires URL encoding.\n $data[] = array('http://www.foo.com', array('a a' => 'b&b'),\n 'http://www.foo.com?a+a=b%26b');\n // Empty params.\n $data[] = array('http://www.foo.com', array(), 'http://www.foo.com');\n // Null params.\n $data[] = array('http://www.foo.com', NULL, 'http://www.foo.com');\n\n return $data;\n }", "title": "" }, { "docid": "914d22f02a782421659c5bb53166419b", "score": "0.51722205", "text": "function get($name) {\n\t\treturn get_arg(\"GET\", $name);\n }", "title": "" }, { "docid": "dbe7450fce927b92adc530524201e72a", "score": "0.51701766", "text": "private function addToQueryParams($key, $value)\n {\n $this->queryParams[$key] = $value;\n }", "title": "" }, { "docid": "740f506a5ffad92e2f6e6cc71d29af37", "score": "0.5166118", "text": "public function addParams($url = '', $params = array(), $urlencode = true) \n {\n if(count($params)>0) {\n foreach($params as $key=>$value){\n if(parse_url($url, PHP_URL_QUERY)) {\n if($urlencode) {\n $url .= '&'.$key.'='.$this->prepareParams($value); \n }\n else {\n $url .= '&'.$key.'='.$value; \n }\n } else {\n if($urlencode) {\n $url .= '?'.$key.'='.$this->prepareParams($value); \n }\n else {\n $url .= '?'.$key.'='.$value; \n }\n }\n }\n }\n return $url;\n }", "title": "" }, { "docid": "ea3fdc2f51118755123ada599c1b753d", "score": "0.5165088", "text": "function addParam($name, $value);", "title": "" }, { "docid": "c8d574d7d2af2e1afd3b4015288caf16", "score": "0.51634085", "text": "public function inc($url);", "title": "" } ]
b7fcd73a2e350791e783dad8777cf3ed
Get the path to a versioned Mix file.
[ { "docid": "31a8ec7f9615615835d273f489f40899", "score": "0.0", "text": "function mix($path, $manifestDirectory = '')\n {\n static $manifests = [];\n\n if (! \\Illuminate\\Support\\Str::startsWith($path, '/')) {\n $path = \"/{$path}\";\n }\n\n if ($manifestDirectory && ! \\Illuminate\\Support\\Str::startsWith($manifestDirectory, '/')) {\n $manifestDirectory = \"/{$manifestDirectory}\";\n }\n\n $manifestPath = __DIR__ . '/../public/assets'.$manifestDirectory.'/mix-manifest.json';\n\n if (! isset($manifests[$manifestPath])) {\n if (! file_exists($manifestPath)) {\n throw new Exception('The Mix manifest does not exist.' . $manifestPath);\n }\n\n $manifests[$manifestPath] = json_decode(file_get_contents($manifestPath), true);\n }\n\n $manifest = $manifests[$manifestPath];\n\n if (! isset($manifest[$path])) {\n throw new Exception(\"Unable to locate Mix file: {$path}.\" . json_encode($manifest));\n }\n\n return new \\Illuminate\\Support\\HtmlString('/assets'.$manifestDirectory.$manifest[$path]);\n }", "title": "" } ]
[ { "docid": "02b3279df7d89d090934af5adbe16adf", "score": "0.68957204", "text": "private function getVersionedFilepath($file) {\n $path = \"/public{$file}\";\n\n // Check if the manifest exists\n if (! file_exists($manifestPath = $_SERVER['DOCUMENT_ROOT'] . '/../mix-manifest.json')) return $file;\n\n // Read the manifest\n $manifest = json_decode(file_get_contents($manifestPath), true);\n\n // Check if the requested file is listed in the manifest\n if (! array_key_exists($path, $manifest)) return $file;\n\n // Check if the file was actually versioned\n if($manifest[$path] == $path) return $file;\n\n // Remove 'public' from the output\n return str_replace('/public/', '/', $manifest[$path]);\n }", "title": "" }, { "docid": "ad1c0805729c6894b6442e081add91a1", "score": "0.6504422", "text": "public static function mix(string $file): string\n {\n $path = '';\n $mix_manifest = file_get_contents(__DIR__ . '/../../build/mix-manifest.json');\n $manifest = json_decode($mix_manifest);\n $file = '/' . ltrim($file, '/');\n if (isset($manifest->{$file})) {\n $version = $manifest->{$file};\n $path = get_template_directory_uri() . '/build' . $version;\n }\n return $path;\n }", "title": "" }, { "docid": "f55aaf5451a9f455d24a8a4b5e3e1fcc", "score": "0.6465198", "text": "public static function getVersionFileLocation()\n {\n return realpath(dirname(__FILE__) . '/Version/Number.txt');\n }", "title": "" }, { "docid": "15e90c8c3c4a0fb19dd6950bce77d2e1", "score": "0.6214676", "text": "public function versionsPath() {\n\t\treturn '/'.config('folio.admin-path-prefix').'/item/versions/'.$this->id;\n\t}", "title": "" }, { "docid": "c1345bfa590d011309cbea49ef5d2cef", "score": "0.6102164", "text": "function tailpress_get_mix_compiled_asset_url( $path ) {\n\t$path = '/' . $path;\n\t$stylesheet_dir_uri = get_stylesheet_directory_uri();\n\t$stylesheet_dir_path = get_stylesheet_directory();\n\n\tif ( ! file_exists( $stylesheet_dir_path . '/mix-manifest.json' ) ) {\n\t\treturn $stylesheet_dir_uri . $path;\n\t}\n\n\t$mix_file_path = file_get_contents( $stylesheet_dir_path . '/mix-manifest.json' );\n\t$manifest = json_decode( $mix_file_path, true );\n\t$asset_path = ! empty( $manifest[ $path ] ) ? $manifest[ $path ] : $path;\n\n\treturn $stylesheet_dir_uri . $asset_path;\n}", "title": "" }, { "docid": "c1345bfa590d011309cbea49ef5d2cef", "score": "0.6102164", "text": "function tailpress_get_mix_compiled_asset_url( $path ) {\n\t$path = '/' . $path;\n\t$stylesheet_dir_uri = get_stylesheet_directory_uri();\n\t$stylesheet_dir_path = get_stylesheet_directory();\n\n\tif ( ! file_exists( $stylesheet_dir_path . '/mix-manifest.json' ) ) {\n\t\treturn $stylesheet_dir_uri . $path;\n\t}\n\n\t$mix_file_path = file_get_contents( $stylesheet_dir_path . '/mix-manifest.json' );\n\t$manifest = json_decode( $mix_file_path, true );\n\t$asset_path = ! empty( $manifest[ $path ] ) ? $manifest[ $path ] : $path;\n\n\treturn $stylesheet_dir_uri . $asset_path;\n}", "title": "" }, { "docid": "16d5a068709d00e1a72cedf76a7c7963", "score": "0.608263", "text": "public function getVersion($path);", "title": "" }, { "docid": "c90d0d0a1a58e0dc111b8b8b9a4a9460", "score": "0.6049277", "text": "function mix($path)\n {\n static $manifest;\n $enviroment = WP_DEBUG ? '/dev' : '/dist';\n if (!$manifest) {\n if (!file_exists($manifestPath = get_template_directory(). $enviroment . '/mix-manifest.json')) {\n \techo \"File Not Found\";\n }\n $manifest = json_decode(file_get_contents($manifestPath), true);\n }\n $path = \"/{$path}\";\n return get_template_directory_uri(). $enviroment .$manifest[$path];\n }", "title": "" }, { "docid": "e2f71e1497b9d64bf9fa72fcc8273776", "score": "0.6015126", "text": "function version($path)\n {\n $version = filemtime(public_path($path));\n\n return asset(\"$path?v=$version\");\n }", "title": "" }, { "docid": "938bbfac81c0c61bab7cdc61a5f8143f", "score": "0.59662586", "text": "public function laravelMix($file)\n {\n return $this->getVersionedAsset($file);\n }", "title": "" }, { "docid": "48d89b2aa09cee4a1864c272d5773d8d", "score": "0.5939655", "text": "protected function get_file_path(): string {\n\t\t\treturn $this->file_handler->get_file_path_by_name(\n\t\t\t\t$this->get_file_name()\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "00c559ad6a63a95fc3e5692f46b539f8", "score": "0.5937223", "text": "public function version($file)\n {\n return Mix::$plugin->mix->version($file);\n }", "title": "" }, { "docid": "532dc00326a85f2b0e8aa6501cac24c9", "score": "0.59318316", "text": "public function src($path)\n {\n return $this->component->getComponentPath('/'.ltrim($path, '/'));\n }", "title": "" }, { "docid": "c2be440a4b651b412bd07490da27673f", "score": "0.5916544", "text": "public function getFilePath() {\n // If the path variable is set then use that, otherwise assume a default\n // inside the current theme.\n $path = \\Drupal::config('kalastatic.settings')->get('kalastatic_src_path');\n return $path ? $path : kalastatic_path_to_src_default();\n }", "title": "" }, { "docid": "de3ea28c5207a7a474160094b0d9d45d", "score": "0.5913658", "text": "public function getAssetPath()\n {\n if (!$path = $this->getFilePath()) {\n return null;\n }\n\n return 'storage::' . $path;\n }", "title": "" }, { "docid": "56ef0dc91ec86634833152468a416475", "score": "0.59011865", "text": "protected function getFilePath()\n {\n return __DIR__ . '/files/response-test.zip';\n }", "title": "" }, { "docid": "c17614092d2b28c5191770102565d0d6", "score": "0.5893753", "text": "public function getScriptPath();", "title": "" }, { "docid": "049af40a435bd4b395ee2973155a9e9e", "score": "0.5852243", "text": "function getScriptPath() {\r\n\t\t$currentFile = $_SERVER[\"SCRIPT_NAME\"];\r\n\t\t$parts = Explode('/', $currentFile);\r\n\t\t$currentFile = $parts[count($parts) - 1]; \r\n \r\n\t\treturn $currentFile;\r\n\t}", "title": "" }, { "docid": "494f34ce629897bde6bbd00d04b4f718", "score": "0.5832637", "text": "public function getUploadPath(Version $version)\n {\n $basepath = $this->transporter->getPath();\n\n if (null === $this->uploadPath) {\n $suffix = '';\n $count = 0;\n\n do {\n $releasePath = 'releases/' . $version->getName() . '-' . substr($version->getBuild(), 0, 6) . $suffix;\n $suffix = '_' . ++$count;\n } while ($this->transporter->exists($basepath . '/' . $releasePath));\n\n $this->uploadPath = $releasePath;\n }\n\n return $this->uploadPath;\n }", "title": "" }, { "docid": "772e37a9a972bd50a77fe48f36a2c85c", "score": "0.58181536", "text": "public function path ()\n {\n return $this->src->path;\n }", "title": "" }, { "docid": "3acf71447e8cf3f4212ace1fa9f7f56d", "score": "0.5804826", "text": "#[Pure] public function getPath(): string\n {\n $path = ($this->getConfig()['path'] ?? '');\n if ($path) {\n return $path;\n }\n }", "title": "" }, { "docid": "4a70ad72fd9a49043ac58931b1cde5a6", "score": "0.5801018", "text": "public function get_file_path() {\n\n\t\t\t/**\n\t\t\t * Filters the product catalog feed file path.\n\t\t\t *\n\t\t\t * @since 1.11.0\n\t\t\t *\n\t\t\t * @param string $file_path the file path\n\t\t\t */\n\t\t\treturn apply_filters( 'wc_facebook_product_catalog_feed_file_path', \"{$this->get_file_directory()}/{$this->get_file_name()}\" );\n\t\t}", "title": "" }, { "docid": "9eebd43c4d1d033848b0120f080c9eaf", "score": "0.57908916", "text": "public function getCurrentVersion()\n {\n $version = File::get(base_path() . '/version.txt');\n return $version;\n }", "title": "" }, { "docid": "a8c9e2c55b319ca8ffa2b7e6dabcca9d", "score": "0.5785662", "text": "public function getFilePath()\n {\n if (!$this->entry->exists) {\n return null;\n }\n\n $slug = $this->entry->getStreamSlug();\n $namespace = $this->entry->getStreamNamespace();\n $directory = $this->entry->getEntryId();\n $file = $this->getFileName();\n\n return \"{$namespace}/{$slug}/{$directory}/{$file}\";\n }", "title": "" }, { "docid": "085dc13836021b9f4db1889a6de8bece", "score": "0.57841665", "text": "function auto_version($file_path){\n \n $asset_path = FCPATH.'frontend_asset'; //get absolute server path\n $mtime = filemtime($asset_path.$file_path); //get last modified file time\n \n if(strpos($file_path, '/') !== 0 || !$mtime)\n return $file_path;\n \n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file_path);\n}", "title": "" }, { "docid": "4e3ddfc067b0f72c41a381e05f480756", "score": "0.57838356", "text": "public function get_file_path(): string {\n\t\treturn $this->file_path . '/templates/';\n\t}", "title": "" }, { "docid": "8905ac5ab13dfdbc3e372943e7d5bbcb", "score": "0.5760612", "text": "public function filePath(){\n\n\t\t\t$filePath = FILES_PRODUCTION_FOLDER . $this->className() . \"/\" . $this->vars[\"fileID\"];\n\t\t\tdebugln(\"this is the production folder: \" . $filePath);\n\n\t\t\treturn $filePath;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ec5bc3ff36740165ef91c4f4c86303a9", "score": "0.5733204", "text": "public function GetFilePath()\n\t{\n\t\treturn sprintf('%s%s.%s', $this->GetStorageDirectory(), $this->GetTagsHash(), $this->strExtension);\n\t}", "title": "" }, { "docid": "a443bc51ae2f06c311ee6470f07651ee", "score": "0.57286066", "text": "public function getUpgradeFile($version)\n {\n return $this->app->getBasepath() . 'db' . DS . 'upgrade' . $version . '.sql';\n }", "title": "" }, { "docid": "56e82f6ece7d546f60c3e81cf4f745fb", "score": "0.57284635", "text": "protected function getPath()\n\t{\n\t\t$path = app_path() . \"/{$this->folder}/{$this->name}\";\n\n\t\treturn str_replace('//', '/', $path);\n\t}", "title": "" }, { "docid": "c2ed76d1d8aef3b8b856e8c40ebe3b13", "score": "0.5709367", "text": "public function vendorPath(): string\n {\n return getcwd() . '/vendor';\n }", "title": "" }, { "docid": "727f55ce416a8e5b5038eae88a5fad86", "score": "0.5707368", "text": "private function getOutputFilePath($version)\n {\n $this->log('Detecting output file path...');\n\n $outFile = current($this->argvParser->getArg(['o', 'out-file']));\n if ($outFile !== false) {\n if (file_exists($outFile) && !$this->argvParser->hasFlag(['f', 'force'])) {\n throw new \\LogicException('The specified output file already exists, use the -f/--force option to overwrite');\n } else if (!$this->openAndTruncateFile($outFile)) {\n throw new \\LogicException('Unable to open output file in read/write mode');\n }\n\n $this->log('Output file path detected successfully: ' . $outFile);\n } else {\n $outFile = null;\n $this->log('Output file path will be derived from package version.');\n }\n\n return $outFile;\n }", "title": "" }, { "docid": "37dda9a8d271be1d30b321bb3e2b7d3b", "score": "0.5687362", "text": "public function path()\n\t{\n\t\treturn dirname( $this->m_filename );\n\t}", "title": "" }, { "docid": "d2c0352fcf9ad560a07dd9fa6b195eea", "score": "0.5681022", "text": "private function getFilePath()\n\t{\n\t\treturn $this->autoupgradePath.DIRECTORY_SEPARATOR.$this->destDownloadFilename;\n\t}", "title": "" }, { "docid": "7fa87c8d05616578df9f5471e7b96249", "score": "0.5678631", "text": "public static function get_plugin_file() {\n\t\treturn __FILE__;\n\t}", "title": "" }, { "docid": "717622eae084d250d1e96de0af144d03", "score": "0.5673576", "text": "public function getFile()\n\t{\n\t\treturn __FILE__;\n\t}", "title": "" }, { "docid": "80df1edb05c39f9e18259700855dac43", "score": "0.5670275", "text": "public function getFilePath()\n {\n $fileName = $this->getFileName();\n return $this->folder !== null ? \"{$this->folder}/{$fileName}\" : $fileName;\n }", "title": "" }, { "docid": "dbb465122b1cfd4cb1d5325850f68cf0", "score": "0.5659975", "text": "function asset($path, $prefix = '/public')\n{\n // get flight\n $app = Flight::app();\n\n // getting basePath\n $basePath = $app->get('basePath');\n\n // path to mix-manifest\n $file = $app->get('basePath').'mix-manifest.json';\n\n if (file_exists($file)) {\n $manifest = file_get_contents($file);\n $files = json_decode($manifest, true);\n\n if (isset($files[$prefix.$path])) {\n $path = str_replace($prefix, '', $files[$prefix.$path]);\n }\n }\n\n return $path;\n}", "title": "" }, { "docid": "eb8ee327c9b4747935db8bdac6d74a09", "score": "0.5659086", "text": "public function getFilePath()\n {\n return 'media/' . $this->name;\n }", "title": "" }, { "docid": "f9657e02eaaeaa1d3f736602c4fa3ac2", "score": "0.5655558", "text": "protected function getVersionedAsset($file)\n {\n if (self::$manifestObject == null) {\n self::$manifestObject = $this->readManifestFile();\n }\n $publicPath = DIRECTORY_SEPARATOR . 'web' ;\n\n if(self::$manifestObject === false) {\n return $file;\n }\n // check if the asset exists in the object\n\n $versionedFile=self::$manifestObject[$publicPath . $file];\n if($versionedFile) {\n // please strip the $publicPath part\n $versionedFile=substr($versionedFile, strlen($publicPath));\n return $versionedFile;\n } else\n {\n return $file;\n }\n }", "title": "" }, { "docid": "5233ae8943897f8f658a1396e5be0d18", "score": "0.56525993", "text": "private function getPathname(): string\n {\n return rtrim($this->config->getMoDirectory(), '/') . '/' . 'revisions.json';\n }", "title": "" }, { "docid": "a02bf56ebe277595058b2f2bec4f34d0", "score": "0.5649874", "text": "public function getRelativeFilePath() {\n\t\treturn parse_url( $this->getPath( self::PATH_FILE ), PHP_URL_PATH );\n\t}", "title": "" }, { "docid": "4aa45eea8e672575a4c7ac287ad9f1b5", "score": "0.56461287", "text": "public function getResourcePath(): string;", "title": "" }, { "docid": "d51548f490dd903186429778a4160274", "score": "0.56437594", "text": "public static function getVersion()\r\n {\r\n return trim(file_get_contents(dirname(__FILE__) . '/../../version.txt'));\r\n }", "title": "" }, { "docid": "49b382474b0f79b71a905da3be492224", "score": "0.5641065", "text": "public function getFilePath()\n {\n return $this->getStorageDir() . DS\n . $this->directory . DS\n . $this->name . '.'\n . strtolower($this->format);\n }", "title": "" }, { "docid": "761d52ade56bd92c3e9bc0ade5aa8a70", "score": "0.56170934", "text": "public function getPath_SourceCurrent() {\n\t\treturn trailingslashit( path_join( $this->getRootDir(), $this->getPluginSpec_Path( 'source' ) ) );\n\t}", "title": "" }, { "docid": "eba9578dce07b1d578baf3fcc102c7ea", "score": "0.5615545", "text": "public function getCurrentReleasePath() : string\n {\n assert(valid_num_args());\n\n $paths = $this->getPaths();\n\n return $this->getReleasesPath() . $this->getCurrent() . '/';\n }", "title": "" }, { "docid": "58f4940f54eea6dd6582efc481ffd022", "score": "0.5612448", "text": "protected function getFile()\n {\n // Get asset source\n $source = $this->getSource();\n\n // Get asset source type\n $sourceType = $source->getSourceType();\n\n // Get local copy from asset source type\n $file = $sourceType->getLocalCopy($this);\n\n // Return file path\n return $file;\n }", "title": "" }, { "docid": "5fbab917bd4ba61a18f335353d0fc500", "score": "0.55902594", "text": "public function getRelativeCurrentPath();", "title": "" }, { "docid": "f5fca2121dddcde29ef8484444ee3a62", "score": "0.55898815", "text": "public function getBuildFilePath()\n {\n return $this->directory . $this->buildFile;\n }", "title": "" }, { "docid": "af91c1ef0b9e7716342cc9738f979904", "score": "0.5587818", "text": "public static function getVersion(): string\n {\n $version_file = dirname(__DIR__) . '/VERSION';\n if (!file_exists($version_file)) {\n trigger_error(\"Version file $version_file not found\", E_USER_WARNING);\n return ((string) self::BASE_VERSION) . '.0.0-unknown';\n }\n return file_get_contents($version_file);\n }", "title": "" }, { "docid": "adc4f4f378935025366e03c9ee6d139a", "score": "0.558355", "text": "public function path(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "e421cf006608ec92a57be55f7639750f", "score": "0.557202", "text": "function getFilePath() {\r\n\t\treturn Config::getVar('general', 'base_url') . '/public/about/' . $this->getFileName();\r\n\t}", "title": "" }, { "docid": "c3df6e580b5da40f6f54c23e46abb7c1", "score": "0.5567071", "text": "public function getPath(): string\n {\n return parent::getPath() . $this->getName() . 'sResource.php';\n }", "title": "" }, { "docid": "769cdfb3a46429aa9e7e3f986d558642", "score": "0.55572045", "text": "function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "769cdfb3a46429aa9e7e3f986d558642", "score": "0.55572045", "text": "function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "769cdfb3a46429aa9e7e3f986d558642", "score": "0.55572045", "text": "function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "8a6ab867e923e395e23194e2f69550c0", "score": "0.5551488", "text": "public function resourcePath(): string;", "title": "" }, { "docid": "6193affd78e4897ad28d6f02ff2ddc35", "score": "0.55472255", "text": "public function getFilename(): string\n {\n return \\getcwd().'/public/index.php';\n }", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.55447334", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.55447334", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.55447334", "text": "public function getFilePath();", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5543663", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5543663", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5543663", "text": "public function getPath(): string;", "title": "" }, { "docid": "46660aac94ed3f1694135563c61b65a1", "score": "0.5543574", "text": "public function getBasePath()\n {\n\n $base_path = $this->hasOption('path') ? base_path() .'/'. $this->normalizePath($this->path): base_path() ;\n $base_path = $this->hasOption('path') && $this->path && $this->hasOption('src') && $this->src ? $base_path .'/src': $base_path;\n\n return $this->normalizePath($base_path);\n }", "title": "" }, { "docid": "f74e1ee276d48af77fcc17979ae28d29", "score": "0.5540662", "text": "public function getCurrentReleasePath()\n {\n return 'current';\n }", "title": "" }, { "docid": "f7740ef94f138e4cfc6c8f9748128406", "score": "0.55371785", "text": "protected function getTranslationsDestinationPath()\n {\n return resource_path('lang'.DS.'vendor'.DS.$this->package);\n }", "title": "" }, { "docid": "825564245d127a076865373d36ab2bec", "score": "0.5530831", "text": "protected function makePath() : string\n {\n return $this->path = app_path($this->getFileName());\n }", "title": "" }, { "docid": "b6cd774a2c58c47e1b337f7ba035df80", "score": "0.5525377", "text": "protected function getPath()\n\t{\n\t\treturn $this->modules->getPath($this->data->slug);\n\t}", "title": "" }, { "docid": "efd4a681657f38207134d131103db917", "score": "0.5518262", "text": "protected function getTranslationsPath()\n {\n return $this->getResourcesPath().DS.'lang';\n }", "title": "" }, { "docid": "479632d11867462cd07b845763afc5b3", "score": "0.55132157", "text": "protected function getConfiguredPath()\n {\n $type = $this->getUploadType();\n return $this->redactor->getOption('redactor.' . $type . '_upload_path', null, 'assets/uploads/');\n }", "title": "" }, { "docid": "5dd8cd23445c94432aa93f4d9ead56e9", "score": "0.5507595", "text": "public function path()\n {\n return $this->file->getStream()->getMetadata()['uri'];\n }", "title": "" }, { "docid": "9aadec974512b6c618c285c0612a6be5", "score": "0.55052286", "text": "public function getFilePath() {\n return $this->file->getPathname();\n }", "title": "" }, { "docid": "eb1087b3f68024a156d0cf8cd09c7944", "score": "0.5504574", "text": "protected function applyVersion($path, $version = null)\n {\n $file = $path;\n // apply the base path\n if ('/' !== substr($path, 0, 1)) {\n $file = '/'.$path;\n }\n\n $reved = $this->getRevedFilename($file);\n\n $fullpath = $this->rootDir . $file;\n $fullreved = $this->rootDir . $reved;\n\n // $reved or unversioned\n if (file_exists($fullreved)) {\n return $reved;\n\n // fallback\n } else {\n $pattern = preg_replace('/\\.([^\\.]+$)/', '.*.$1', $fullpath);\n $regex = preg_replace('/\\.([^\\.]+$)/', '\\.[\\d\\w]{8}\\.$1', $fullpath);\n $base = str_replace($path, '', $fullpath);\n foreach (glob($pattern) as $filepath) {\n if (preg_match('#' . $regex . '#', $filepath)) {\n $result = str_replace($base, '', $filepath);\n $this->summary->set($file, $result);\n\n return $result;\n }\n };\n\n }\n\n return $path;\n }", "title": "" }, { "docid": "59c8e70d85c22f79df4a1d08c0b9ee0b", "score": "0.54972523", "text": "public function getPath($filename = null, $version = null)\r\n {\r\n $dir = $this->config['upload_dir'];\r\n $versionPath = '';\r\n\r\n if ($version) {\r\n $versionDir = $this->config[\"image_versions.$version.upload_dir\"];\r\n\r\n if ($versionDir) {\r\n $dir = $versionDir;\r\n } else {\r\n $versionPath = '/'.$version;\r\n }\r\n }\r\n\r\n if ($filename) {\r\n $filename = $this->getFilename($this->normalize($filename), $version);\r\n }\r\n\r\n return $dir.$versionPath.($filename ? '/'.$filename : '');\r\n }", "title": "" }, { "docid": "b9cdaf0f9476fd45e0f7e4bbb812a7b4", "score": "0.5495332", "text": "function vendor_path($path = '')\n {\n return royalcms()->vendorPath().($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "27c6fa158c512db4317583480405570d", "score": "0.5491686", "text": "public static function version()\n\t{\n\t\treturn @file_get_contents(Config::getRootPath() . 'VERSION');\n\t}", "title": "" }, { "docid": "0c86f0032e2f6ac2afce8d56b368df75", "score": "0.5489312", "text": "public function getPath() {\n\t\treturn $this->tsValue('path');\n\t}", "title": "" }, { "docid": "02c7b9f09a35cdd39c0b6f22fe8e0d2f", "score": "0.54849935", "text": "public function getCustomFilesPath()\n {\n return $this->config->theme->path ?? \"public/assets/custom/\";\n\t}", "title": "" }, { "docid": "3ad00cede4fd41ab252d337652d7efbe", "score": "0.54846895", "text": "public static function file_path($file)\n {\n return plugin_dir_path(__FILE__) . $file;\n }", "title": "" }, { "docid": "75f6db3d4fb83128bddee00614332353", "score": "0.5484172", "text": "public function get_fullpath_name()\n {\n return $this->get_fullpath() . self::c_cache_file;\n }", "title": "" }, { "docid": "b1690eadcf9ca9c4154c4d31c2185bdd", "score": "0.5480296", "text": "public static function plugin_path()\n {\n $self = self::instance();\n return $self->plugin_path;\n }", "title": "" }, { "docid": "b3b1149c9888e97c5b9749b4a4ec0fad", "score": "0.5477239", "text": "function file_version ( $version_file = '0.0.1' ) {\n return WP_DEBUG ? time() : $version_file;\n}", "title": "" }, { "docid": "39dccdf568ae7f57cf3eaa56b620bacf", "score": "0.5477042", "text": "public function getMetaPath();", "title": "" }, { "docid": "c863e5df3514dea32ee8b304a4ee5ce3", "score": "0.54730153", "text": "public function getPath()\n {\n\n $return = $this->getBasePath() . '/' . $this->getConfigGeneratorClassPath($this->getClassType(), true) . '/'. 'api.php';\n // Log::debug($return);\n return $return;\n }", "title": "" }, { "docid": "1624f18e2783ff0bb582c0f6455250f1", "score": "0.54713124", "text": "public function getPath()\r\n {\r\n $path = $this->key('path');\r\n return file_exists($this->key('path')) ? realpath($this->key('path')) : $this->key('path');\r\n }", "title": "" }, { "docid": "ae74c02c11ffa926aba4510f8b66e77a", "score": "0.5470548", "text": "protected function getComposerPath()\n\t{\n\t\treturn $this->laravel['path.base'].'/composer.json';\n\t}", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.546202", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "d47a1ff524fd8f7c0a410ca6cecc93df", "score": "0.54564315", "text": "public static function getBasePath(): string {}", "title": "" }, { "docid": "9bbdd67aeafdc539d0b2f0f50277ea72", "score": "0.5453842", "text": "public function getPath() {\n\t\t$path = FileUtil::getRealPath(WCF_DIR . $this->packageDir) . 'templates/' . $this->templatePackFolderName . $this->templateName . '.tpl';\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "12b6b6457b49f0731ec0d8952ce8c92d", "score": "0.5450637", "text": "protected function getPath()\n {\n return sprintf('/%s/index.mq', $this->getAppName());\n }", "title": "" }, { "docid": "f7567db0ecb8eb24e445cb08421befd6", "score": "0.54496765", "text": "public function getPublishedPath($path)\n {\n $path = Yii::getAlias($path);\n\n if (isset($this->_published[$path])) {\n return $this->_published[$path][0];\n }\n if (is_string($path) && ($path = realpath($path)) !== false) {\n $base = $this->basePath . DIRECTORY_SEPARATOR;\n if (is_file($path)) {\n return $base . $this->hash(dirname($path) . filemtime($path)) . DIRECTORY_SEPARATOR . basename($path);\n } else {\n return $base . $this->hash($path . filemtime($path));\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "47c0c11daebe8f419701e6c32fadba94", "score": "0.54489416", "text": "public function getFilePath($name) {\n $file = $this->get($name);\n return $file ? Yii::getPathOfAlias($this->getPath()) . DS . $file->hash . '.' . $file->extension : null;\n }", "title": "" }, { "docid": "c6051b61003acc8bd4b93df0e8b43acd", "score": "0.54461944", "text": "public function getBasePath(): string;", "title": "" } ]
1862681e0a00f2c4338b7767009907d3
Returns the current active record model's name based on the name of this controller.
[ { "docid": "3fc2d2551acc7ad436372d9f66f9659f", "score": "0.708775", "text": "public function getModelName()\n\t{\n\t\treturn ucfirst($this->getId());\n\t}", "title": "" } ]
[ { "docid": "74b21e414fe0ec8decb78a9eb4a6afbf", "score": "0.79427373", "text": "protected function modelName() {\n return ucfirst(Str::singular(Str::camel($this->name)));\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.79245126", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.79245126", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "2b4f1ac8df20d05c07f48ff2f9c78bb6", "score": "0.7754914", "text": "public static function modelName()\n {\n return Inflector::pluralize(Inflector::camel2id(StringHelper::basename(get_called_class()), '-'));\n }", "title": "" }, { "docid": "c80ae6b8d99d884701b8916004d0afbd", "score": "0.77118623", "text": "private function getModelName()\n {\n $controller = explode('\\\\', get_class($this))[2];\n $modelName = str_replace('Controller', '', $controller);\n\n return 'Application\\\\Model\\\\'.$modelName;\n }", "title": "" }, { "docid": "f38369fbfd5916baeb5aad324453fa12", "score": "0.7650634", "text": "public static function getModelName()\n {\n return (new ReflectionClass(get_called_class()))->getShortName();\n }", "title": "" }, { "docid": "2bff01fc8583dcb512235fa57e62c85a", "score": "0.7556879", "text": "protected function getModelName(){\n return snake_case(class_basename($this->model));\n }", "title": "" }, { "docid": "23f419260a6eb3b741a5fd6f1c0dd350", "score": "0.7540863", "text": "protected function filename()\n {\n $controllerClass = get_class(request()->route()->getController());\n $model = $controllerClass::$model;\n return strtolower($model);\n }", "title": "" }, { "docid": "3190056d5d20b585fbec66f8f8ae8c04", "score": "0.7530916", "text": "public function getControllerName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "6feb9d53de74f9bbb798b30a870b78ba", "score": "0.74696386", "text": "private function getControllerName() {\n // Parse out the controller's name\n $controllerName = substr(get_class($this), 0, strlen('Controller') * -1);\n return $controllerName;\n }", "title": "" }, { "docid": "36f7afbd1ec6fe9b5ebc6dda1c711c78", "score": "0.7448737", "text": "final public function GetName() {\n\n return $this->\n model;\n }", "title": "" }, { "docid": "12e24ae45efa56c69590f766d3555c5c", "score": "0.7447802", "text": "public static function getModelName(): string\n {\n return class_basename(get_called_class());\n }", "title": "" }, { "docid": "12e24ae45efa56c69590f766d3555c5c", "score": "0.7447802", "text": "public static function getModelName(): string\n {\n return class_basename(get_called_class());\n }", "title": "" }, { "docid": "33b8370123578ab03b12c9c19618c100", "score": "0.7347803", "text": "public function getControllerName(): string\n {\n return ucfirst($this->getPluralName());\n }", "title": "" }, { "docid": "10a854d810ef8b262c33947c44586a4a", "score": "0.731902", "text": "protected function getMemberName() {\n $name_array = explode('\\\\', get_class($this));\n $model_name = $name_array[0]\n . '\\\\' . $name_array[1]\n . '\\\\' . substr(array_pop($name_array), 0, -1);\n return $model_name;\n }", "title": "" }, { "docid": "116ad4122cee58a15225116fbbb3440b", "score": "0.73075145", "text": "public function fetchName()\n\t{\n\t\t$fullname = get_called_class();\n\t\t$controller_pos = strpos( $fullname, 'Controller');\n\t\t$shortname = strtolower( substr( $fullname, 0, $controller_pos ) );\n\t\treturn $shortname;\n\t}", "title": "" }, { "docid": "2fd67f52f084500b1bb8472d61942f6c", "score": "0.73005927", "text": "public function getControllerObjectName();", "title": "" }, { "docid": "b5d88f8a56fcc9e6224eaca1bc35df31", "score": "0.72853357", "text": "protected function getModelName()\n {\n return ucwords(str_singular(camel_case($this->option('model'))));\n }", "title": "" }, { "docid": "536e956db95c897cc916b1b4fb936e79", "score": "0.72750986", "text": "public function getControllerName()\n\t{\n\t\tif (!$this->_controller) {\n\t\t\t$this->_controller = $this->__get($this->_controllerKey);\n\t\t}\n\t\treturn $this->_controller;\n\t}", "title": "" }, { "docid": "064910479dd402fc1b3eebb2bb354f05", "score": "0.72618735", "text": "protected function getModelName()\n {\n // Set model.\n $model = $this->getModel();\n\n // Check if the model isset.\n if (isset($model) && ! empty($model)) {\n $model_name = $model;\n }\n else {\n // Set the model name by the stripped repository name.\n $model_name = str_singular($this->stripRepositoryName());\n }\n\n // Return the model name.\n return $model_name;\n }", "title": "" }, { "docid": "f0d5651c1057fa9e247db9e1ed62231a", "score": "0.7254569", "text": "public function getModelName() : string\n {\n return $this->modelName;\n }", "title": "" }, { "docid": "b77dfeead7c2c967c4c2a38b51973a89", "score": "0.72511554", "text": "public function getControllerName() {}", "title": "" }, { "docid": "b77dfeead7c2c967c4c2a38b51973a89", "score": "0.72511554", "text": "public function getControllerName() {}", "title": "" }, { "docid": "6d7f5dec9e8180df64d04cec06c92fd4", "score": "0.7250137", "text": "public function getModelName() {\n\t\treturn ucfirst($this->modelName);\n\t}", "title": "" }, { "docid": "b2719c9c751ad938c32a63863dbf33ea", "score": "0.72498727", "text": "protected function getControllerName()\n {\n return $this->input->getControllerName();\n }", "title": "" }, { "docid": "304c6f8f59510ad5ae165905972ce19c", "score": "0.7240306", "text": "function getControllerName() {\n return $this->controller;\n }", "title": "" }, { "docid": "5fe5a8b63fc773bc54add310e90dcdae", "score": "0.72282153", "text": "public function getControllerName()\n {\n $this->refreshControllerInfo();\n return $this->controller;\n }", "title": "" }, { "docid": "84351d34c8a6fbdc222afea60b9d49f5", "score": "0.72204614", "text": "protected function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }", "title": "" }, { "docid": "2104482d1c44045a9c6fbe2e2951283e", "score": "0.72078377", "text": "public function getControllerName()\n {\n if (!$this->translationEnabled()) {\n return parent::getControllerName();\n }\n\n return $this->getTranslationModel()->translateControllerToFront(parent::getControllerName());\n }", "title": "" }, { "docid": "6b0650fb5c62f2e727cfee1572f73d0a", "score": "0.7191553", "text": "public function getModelName()\n {\n return $this->model_name;\n }", "title": "" }, { "docid": "a22d41b16ee08a300e17c3899f397326", "score": "0.7179783", "text": "public function getControllerName(){\n\t\t\treturn $this->controllerName;\n\t\t}", "title": "" }, { "docid": "aa91731e0f1c4a6ec10736f9d29c3a4b", "score": "0.71746653", "text": "public static function getObjectName(): string\n {\n return Str::snake(static::getModelName());\n }", "title": "" }, { "docid": "b808501ab129397970a12f90c791a25e", "score": "0.7172094", "text": "public function getModelName()\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "7104715c115c6a0dbb0363bc147e18ad", "score": "0.7163778", "text": "function _modelName($name) {\r\n\t\treturn Inflector::camelize(Inflector::singularize($name));\r\n\t}", "title": "" }, { "docid": "2300e1f359ea1cfb2d9bd65e2bddf8bd", "score": "0.7154834", "text": "public function getNameAttribute () {\n return $this->model;\n }", "title": "" }, { "docid": "05528fc63eeaca81eaf8b2018444953d", "score": "0.71462697", "text": "public function getControllerName()\n {\n return $this->controller_name;\n }", "title": "" }, { "docid": "73c4c5f99e0774f6e314152a719af8f8", "score": "0.7145958", "text": "public function getControllerObjectName() {}", "title": "" }, { "docid": "73c4c5f99e0774f6e314152a719af8f8", "score": "0.7145958", "text": "public function getControllerObjectName() {}", "title": "" }, { "docid": "a540fe1fc61d46fc6517ef33bdf3e63d", "score": "0.7143331", "text": "public function getName()\r\r\n\t{\r\r\n\t\t$name = $this->_name;\r\r\n\r\r\n\t\tif (empty( $name ))\r\r\n\t\t{\r\r\n\t\t\t$r = null;\r\r\n\r\r\n\t\t\tif (!preg_match('/Model(.*)/i', get_class($this), $r)) {\r\r\n\t\t\t\tthrow(new Exception(\"500,Model::getName() : Can't get or parse class name.\"));\r\r\n\t\t\t\texit();\r\r\n\t\t\t}\r\r\n\t\t\t$name = strtolower( $r[1] );\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $name;\r\r\n\t}", "title": "" }, { "docid": "495c756fcbc80aa7dc3808a417d8c19c", "score": "0.7135093", "text": "public function getControllerName()\n {\n return $this->controllerName;\n }", "title": "" }, { "docid": "a1f2deed0ce7773c35dcef332b270c3f", "score": "0.7125575", "text": "public function getModelName(): string\n {\n return $this->modelName;\n }", "title": "" }, { "docid": "39d3c3596e6e08effb946a1323d33984", "score": "0.711914", "text": "public function controllerClassName()\n {\n return studly_case(str_singular($this->table_name)).\"Controller\";\n }", "title": "" }, { "docid": "3eb18fc63b09dacee536b5f0e309ad4f", "score": "0.7117054", "text": "public function getModelName() \n {\n $class = $this->getClassName()['class'];\n\n $name = preg_split('/(?=[A-Z])/', $class, -1, PREG_SPLIT_NO_EMPTY);\n\n $name = $name[array_key_first($name)];\n\n return $name;\n }", "title": "" }, { "docid": "56db6fda42562aef440f77923a58cc6f", "score": "0.71143514", "text": "public function getControllerName() {\n\t\tif (empty($this->controllerName)) {\n\t\t\t$parts = t3lib_div::trimExplode('_', get_class($this));\n\t\t\t$this->controllerName = implode('_', array_slice($parts, 3)); // throw away \"tx\", \"<condensedExtKey>\", \"controller\"\n\t\t}\n\t\treturn $this->controllerName;\n\t}", "title": "" }, { "docid": "bf75baea36a391769a122d6f5d35be2a", "score": "0.7113512", "text": "public function getControllerName() {\n\t\treturn $this->controllerName;\n\t}", "title": "" }, { "docid": "b3740e814b29862021abf5e87a511137", "score": "0.711269", "text": "public function controllerName() {\n return $this->ControllerName.'Controller';\n }", "title": "" }, { "docid": "0bcc34fa8405a136dcd5a64bd83aa11d", "score": "0.70971507", "text": "public function getModelName()\n {\n return self::$modelName;\n }", "title": "" }, { "docid": "7374dd7cd7d392423ab9527d2e7345e2", "score": "0.70932525", "text": "public function getModelName()\n {\n return $this->_modelName;\n }", "title": "" }, { "docid": "04310f281d52b671dbc97d8e33f62c35", "score": "0.7089006", "text": "public function getControllerName():string\n {\n return $this->controller;\n }", "title": "" }, { "docid": "e25db674efe3d3c0c4bb7e1c18590a0f", "score": "0.7087406", "text": "public function getControllerName ()\n {\n return $this->_controllerName;\n }", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.70772564", "text": "public function getModelName();", "title": "" }, { "docid": "992a107719adb60688e3ba38b45cb816", "score": "0.70730597", "text": "public function getControllerName(){\n return $this->ControllerName;\n }", "title": "" }, { "docid": "c99ee458708d4a6592f62fe216ee284c", "score": "0.7070398", "text": "public function getControllerName()\n {\n return $this->controller;\n }", "title": "" }, { "docid": "10fd3309617d1a2a88fdc7090e19ac4d", "score": "0.7068791", "text": "public function getControllerName()\n {\n return $this->_controller;\n }", "title": "" }, { "docid": "e8f756ae024342402aa1e6995e8837bc", "score": "0.7068534", "text": "public function getModelName() {\n return get_called_class();\n }", "title": "" }, { "docid": "8938e722a6932e6bc25477ca0b8060d4", "score": "0.70601416", "text": "function getModelName() {\n\t\treturn $this->_ModelName;\n\t}", "title": "" }, { "docid": "07e37f96220299639552aed77b870246", "score": "0.7057987", "text": "public function getModelName() {\n\t\treturn $this->modelName;\n\t}", "title": "" }, { "docid": "8e894101162a3577eeb1830ee874cab3", "score": "0.7055489", "text": "public function getControllerName()\r\n\t{\r\n\t\treturn $this->controller;\r\n\t}", "title": "" }, { "docid": "52f796f4d1dba2647d851f9003716812", "score": "0.70236444", "text": "private function modelName($name)\n {\n return ucfirst($name);\n }", "title": "" }, { "docid": "25baa39e4a9371daf559beae94ee176c", "score": "0.70217746", "text": "public function getControllerName()\n\t{\n\t\treturn $this->_controller;\n\t}", "title": "" }, { "docid": "cee1b16618c5602e8320489a5a70a493", "score": "0.7015561", "text": "public function getModelName()\n {\n return $this->getClassName();\n }", "title": "" }, { "docid": "5ae488d112ec0de83ab38b0a83af1b69", "score": "0.69890517", "text": "public function modelVariableName()\n {\n return camel_case(str_singular($this->table_name));\n }", "title": "" }, { "docid": "462f129a2397649ab37ab4b680443a94", "score": "0.69751173", "text": "public function getControllerName()\n\t{\n\t\treturn $this->_sController;\n\t}", "title": "" }, { "docid": "608433cb5af35b78f1732de579f8f97b", "score": "0.69445", "text": "public function getModelName()\n {\n if ($this->model_type == 'product') {\n $name = $this->product->name;\n } else {\n $name = $this->category->name;\n }\n\n return $name;\n }", "title": "" }, { "docid": "0a8f31c006573bc607f38699b283ea09", "score": "0.69379634", "text": "protected function getControllerName()\n {\n if(strpos(strtolower($this->option('controller')), 'controller') > 0)\n {\n return ucwords(camel_case($this->option('controller')));\n }\n\n return ucwords(camel_case($this->option('controller'))).'Controller';\n }", "title": "" }, { "docid": "3e396d9d815719adfd0572750cdedaba", "score": "0.69339424", "text": "protected function getModel(): string\n {\n $name = $this->getNameInput();\n $rootNamespace = $this->laravel->getNamespace();\n $model = $this->option('model') || $this->option('model-namespace');\n $modelNamespace = $this->option('model-namespace') ? $this->option('model-namespace') : $this->laravel['config']->get('datatables-buttons.namespace.model');\n\n return $model\n ? ($modelNamespace ?? $rootNamespace) . '\\\\' . Str::singular($name)\n : $rootNamespace . '\\\\Models\\\\User';\n }", "title": "" }, { "docid": "49cd148a4fabe88c66a58750cb23505f", "score": "0.6930034", "text": "public function getControllerName()\n {\n return $this->getRequest()->getControllerName();\n }", "title": "" }, { "docid": "82834d033729614fdb62bd78f9cd4918", "score": "0.6927951", "text": "public function getControllerObjectName()\n {\n return 'Ecodev\\\\Newsletter\\\\Controller\\\\' . $this->action;\n }", "title": "" }, { "docid": "8e731eff695000d2cf0f853e125630cf", "score": "0.6913694", "text": "protected function _model($request) {\n\t\treturn Inflector::camelize(Inflector::pluralize($request->action));\n\t}", "title": "" }, { "docid": "886dd70993f3d3767486167329006d3a", "score": "0.68993986", "text": "public function getControllerName(): string;", "title": "" }, { "docid": "5f0f9f6eb33781377a41dc15fe7de5a7", "score": "0.6899186", "text": "function getControllerObjectName() ;", "title": "" }, { "docid": "b49bfa32a4fd40af0343b33ee620b196", "score": "0.6893801", "text": "public function getControllerSimpleName()\n {\n\n return end(explode('\\\\', $this->controllerName));\n }", "title": "" }, { "docid": "c80d7b9ad589d0a67fa6c5e99560c1cb", "score": "0.6865954", "text": "function _getController() {\n\t\treturn strtolower($this->_CONTROLLER_NAME);\n }", "title": "" }, { "docid": "c1b543e2d6130ccfe15973fa4bfef95f", "score": "0.6862019", "text": "public function getThisAroName(){\n \n return strtolower($this->App->request->controller);\n }", "title": "" }, { "docid": "fa642c7eb6f9909b1e7bcf5a640fb65c", "score": "0.6843146", "text": "private function getClassName()\n : string\n {\n if (!Str::contains($this->name, 'Controller')) {\n return $this->name . 'Controller';\n }\n return $this->name;\n }", "title": "" }, { "docid": "aa0e4593bf15059ae22a29bff049f1b7", "score": "0.6815084", "text": "public function get_model_name()\n {\n if (isset($this->model) && $this->model instanceof Supermodlr) \n {\n return $this->model->get_name();\n }\n else\n {\n return NULL;\n }\n }", "title": "" }, { "docid": "f0fbf4e3b189ce33ce46eba47ca40793", "score": "0.67925507", "text": "public abstract function getNameModel();", "title": "" }, { "docid": "f0fbf4e3b189ce33ce46eba47ca40793", "score": "0.67925507", "text": "public abstract function getNameModel();", "title": "" }, { "docid": "39846cded2a8bca582a8cd625f23c0f7", "score": "0.67534256", "text": "protected function getNameInput()\n {\n $name = Str::studly(parent::getNameInput());\n if (Str::contains(strtolower($name), 'controller') === false) {\n $name .= 'Controller';\n }\n \n return $name;\n }", "title": "" }, { "docid": "46aa517a406f1df47e70de284cde660e", "score": "0.6733489", "text": "public function getModel($controllerName) {\n\t\t$array = \\explode(\"\\\\\", $controllerName);\n\t\t$result = \\ucfirst(end($array));\n\t\tif (UString::endswith($result, \"s\")) {\n\t\t\t$result = \\substr($result, 0, -1);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d5cc1582643591d3e63e42b3e34031ac", "score": "0.67311627", "text": "public static function getControllerName()\n {\n return static::$_module.\".controller.\".static::$_prefix;\n }", "title": "" }, { "docid": "2de76e8a485c698f0d763d8958fdb6fe", "score": "0.67293304", "text": "public function modelName()\n {\n // TODO: Implement modelName() method.\n return Category::class;\n }", "title": "" }, { "docid": "b73ed6cd714bb7207bc5207000170e50", "score": "0.67252713", "text": "protected function getEntityName()\n {\n if (!empty($this->entity)) {\n return (new \\ReflectionClass($this->entity))->getShortName();\n }\n\n if (!empty($this->route)) {\n $controllerName = (new \\ReflectionClass($this->route->getController()))->getShortName();\n\n $namePos = strpos($controllerName, $this->getConfig('controller_naming'));\n\n if ($namePos === false) {\n return '';\n }\n\n return substr($controllerName, 0, $namePos);\n }\n\n return '';\n }", "title": "" }, { "docid": "65cef4d553f17194af26f11ce4a77f92", "score": "0.6707856", "text": "public function Controller() {\n return ucwords($this->controller);\n }", "title": "" }, { "docid": "6bdef24bb715b9aa1c5631b9ecc3f98d", "score": "0.6693896", "text": "public static function getModuleModelName() {\n return X2Model::getModelName(Yii::app()->controller->module->name);\n }", "title": "" }, { "docid": "5b36090a5701b9dbb24168c2c90527f6", "score": "0.6687353", "text": "public function getModelName()\n {\n return $this->beautify($this->getSingularName());\n }", "title": "" }, { "docid": "e0f014136a9fabde61e64ae17436be5c", "score": "0.6682477", "text": "public function modelSingularVariableName()\n {\n return camel_case($this->table_name);\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.66751456", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.66751456", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" } ]
12bdad1328dec5e346c2670860ea4ccb
Resizes image and saves it with suffix 'w$wh$h'
[ { "docid": "3f8a9b3e8ba8fb01e1174c2d45cdebd3", "score": "0.5810609", "text": "public static function resizeImage($filename, $path, $w, $h=null, $enlarge=false)\n\t{\n\t\tif (empty($filename)||!file_exists($path.$filename)) {\n\t\t\treturn false;\n\t\t}\n\t\t$newFilename = $filename.'-w'.(is_null($w)?'-null':$w).'-h'.(is_null($h)?'-null':$h).'.jpg';\n\t\tif(!file_exists($path.$newFilename)){\n\t\t\t$img = Nette\\Image::fromFile($path.$filename);\n\t\t\t$originalWidth = $img->getWidth();\n\t\t\t$img->resize($w, $h, $enlarge ? Nette\\Image::ENLARGE : 0);\n\t\t\tif($originalWidth > $w) $img->sharpen();\n\t\t\t$img->save($path.$newFilename, 85, Nette\\Image::JPEG);\n\t\t}\n\t\treturn $newFilename;\n\t}", "title": "" } ]
[ { "docid": "e9ae30b842f06d985ab02ce2e064f48e", "score": "0.69249964", "text": "function image_resize_and_save($width, $height, $directory, $destroy){\r\n\tglobal $nameDestination,$relative_link,$link, $id, $title,$extensionFile, $directoryDestination;\r\n\t\r\n\t//to load the image\r\n\tif ($extensionFile == 'jpg' OR $extensionFile == 'jpeg')\r\n\t\t$source = imagecreatefromjpeg($link);\r\n\telse if ($extensionFile == 'gd')\t\r\n\t\t$source = imagecreatefromgd($link);\r\n\telse if ($extensionFile == 'png')\t\r\n\t\t$source = imagecreatefrompng($link);\r\n\telse if ($extensionFile == 'gd2')\r\n\t\t$source = imagecreatefromgd2($link);\r\n\telse if ($extensionFile == 'gif')\r\n\t\t$source = imagecreatefromgif($link);\r\n\telse if ($extensionFile == 'wbmp')\r\n\t\t$source = imagecreatefromwbmp($link);\r\n\telse if ($extensionFile == 'xbm')\r\n\t\t$source = imagecreatefromxbm($link);\r\n\telse if ($extensionFile == 'xpm')\r\n\t\t$source = imagecreatefromxpm($link);\r\n\telse {\r\n\t\t$source = NULL ;\r\n\t}\r\n\t\r\n\tif(isset($source)){\r\n\t\t// the fonctions imagesx and imagesy returns the images dimensions\r\n\t\t$width_source = imagesx($source);\r\n\t\t$height_source = imagesy($source);\r\n\t\t\t\t\t\r\n\t\t//we have to resize only when $width and $height are positive\r\n\t\tif(($width>0) && ($height>0)){\r\n\t\t//figure out the new size of our image\r\n\t\t\t\r\n\t\t\t//we compare the width/height ratio to $width/$height\r\n\t\t\tif(($width_source/$height_source) > ($width/$height)){//means that the width is the overflow factor\r\n\t\t\t\t//then we check if the image is too large for our new size. In that case, we reduce the image with an alpha factor, else no touch\r\n\t\t\t\tif($width_source>$width)\r\n\t\t\t\t\t$alpha = $width/$width_source;\r\n\t\t\t\telse\r\n\t\t\t\t\t$alpha = 1;\r\n\t\t\t}\r\n\t\t\telse{//means that the height may be the overflow factor\r\n\t\t\t\t//then we check if the image is too long for our new size. In that case, we reduce the image with an alpha factor, else no touch\r\n\t\t\t\tif($height_source>$height)\r\n\t\t\t\t\t$alpha = $height/$height_source;\r\n\t\t\t\telse\r\n\t\t\t\t\t$alpha = 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//as we have our alpha factor, we can figure out the new size of our image\r\n\t\t\t$image_height = $height_source * $alpha ;\r\n\t\t\t$image_width = $width_source * $alpha ;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$image_height = $height_source;\r\n\t\t\t$image_width = $width_source;\r\n\t\t}\r\n\t\t\r\n\t\t//now we got the new size, we can start resizing\r\n\t\t// On create the image bloc\r\n\t\tif(!($destination = imagecreatetruecolor($image_width,$image_height))) // we just create an empty image\r\n\t\t\treturn NULL;\r\n\t\t\t\r\n\t\t// To a white background\r\n\t\t$white = ImageColorAllocate($destination, 255, 255, 255); \r\n\t\tImageFillToBorder($destination, 0, 0, $white, $white); \r\n\r\n\t\t// the resize\r\n\t\tif(!imagecopyresampled($destination, $source, 0, 0, 0, 0, $image_width, $image_height, $width_source, $height_source))\r\n\t\t\treturn NULL;\r\n\t\r\n\t\r\n\t\t//then we can save the image\r\n\t\t$nameDestination = $id.\"_\".$title.\".\".$image_width.\"x\".$image_height.\".png\";\r\n\t\t$relative_link = $directory.$nameDestination ;\r\n\t\t//image saved as a png\r\n\t\t$save = imagepng($destination, $directoryDestination.$relative_link);\r\n\t\t\r\n\t\tif(!($save)){\r\n\t\t\t// destruction of temporary images\r\n\t\t\timagedestroy($source); \r\n\t\t\timagedestroy($destination);\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif($destroy){//if we can destroy the original uploaded file\r\n\t\t\t\tunlink($link);\r\n\t\t\t\t$link = $directoryDestination.$relative_link;\r\n\t\t\t\t$extensionFile = \"png\";\r\n\t\t\t}\r\n\t\t\t// destruction of temporary images\r\n\t\t\timagedestroy($source); \r\n\t\t\timagedestroy($destination);\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n\telse return NULL;\r\n}", "title": "" }, { "docid": "067ef1d060c05df4753af6a9d818c6e8", "score": "0.6861392", "text": "function getResizedImage()\r\n\t{\r\n\t\t$this->src_image = imagecreatefrompng($this->imageName);\r\n\t\t$this->resizeImage();\r\n\t\timagepng($this->dest_image, $this->resizedImageName);\r\n\t}", "title": "" }, { "docid": "0e5a7983696d0ce8bb775f4b4afd0b19", "score": "0.6772212", "text": "public function make()\n {\n Image::make($this->image)\n ->resize($this->weight, $this->height, function ($constraint) {\n $this->aspectRatio ? $constraint->aspectRatio() : null;\n $this->aspectRatio ? $constraint->upsize() : null;\n })\n ->save($this->path . '/' . $this->fileName.'.'.$this->format, $this->compress);\n }", "title": "" }, { "docid": "21ac6abfffa6192dd6c0c0a0e32cb21b", "score": "0.6688349", "text": "function resizeImage($file_tmp_name, $name) {\n\n $name = explode('.', $name);\n $image_name = $name[0];\n $image_type = $name[1];\n $image_width = getimagesize($file_tmp_name)[0];\n\n // Small Image\n if ($image_width < $this->image_size_small) {\n\n // Low Resolution\n $this->saveImage($file_tmp_name, $image_name . '-low-res', $image_type, 10);\n\n // Same size\n $this->saveImage($file_tmp_name, $image_name . '-small', $image_type, 100);\n }\n\n // Medium Image\n if ($image_width >= $this->image_size_small && $image_width < $this->image_size_medium) {\n \n // Low Resolution\n $this->saveImage($file_tmp_name, $image_name . '-low-res', $image_type, 10);\n\n // Small\n $this->saveImage($file_tmp_name, $image_name . '-small', $image_type, 100, 'sm');\n\n // Same size\n $this->saveImage($file_tmp_name, $image_name . '-medium', $image_type, 100);\n }\n\n // large Image\n if ($image_width > $this->image_size_large) {\n\n // Low Resolution\n $this->saveImage($file_tmp_name, $image_name . '-low-res', $image_type, 10);\n\n // Small\n $this->saveImage($file_tmp_name, $image_name . '-small', $image_type, 100, 'sm');\n\n // Medium\n $this->saveImage($file_tmp_name, $image_name . '-medium', $image_type, 100, 'md');\n\n // Same size\n $this->saveImage($file_tmp_name, $image_name . '-large', $image_type, 100);\n }\n }", "title": "" }, { "docid": "bb48fcfa52a72f484488141a3ae69e75", "score": "0.66478336", "text": "function make_thumb($img_name,$filename,$new_w,$new_h)\r\n {\r\n //get image extension.\r\n $ext=getExtension($img_name);\r\n\t $ext= strtolower($ext);\r\n //creates the new image using the appropriate function from gd library\r\n if(!strcmp(\"jpg\",$ext) || !strcmp(\"jpeg\",$ext))\r\n $src_img=imagecreatefromjpeg($img_name);\r\n\r\n if(!strcmp(\"png\",$ext))\r\n $src_img=imagecreatefrompng($img_name);\r\n\t\t \r\n\tif(!strcmp(\"gif\",$ext))\r\n $src_img=imagecreatefromgif($img_name);\r\n\tif(!strcmp(\"bmp\",$ext))\r\n $src_img=imagecreatefromwbmp($img_name);\r\n\r\n //gets the dimmensions of the image\r\n $old_x=imageSX($src_img);\r\n $old_y=imageSY($src_img);\r\n\r\n // next we will calculate the new dimmensions for the thumbnail image\r\n // the next steps will be taken: \r\n // 1. calculate the ratio by dividing the old dimmensions with the new ones\r\n // 2. if the ratio for the width is higher, the width will remain the one define in WIDTH variable\r\n // and the height will be calculated so the image ratio will not change\r\n // 3. otherwise we will use the height ratio for the image\r\n // as a result, only one of the dimmensions will be from the fixed ones\r\n $ratio1=$old_x/$new_w;\r\n $ratio2=$old_y/$new_h;\r\n if($ratio1>$ratio2) {\r\n $thumb_w=$new_w;\r\n $thumb_h=$old_y/$ratio1;\r\n }\r\n else {\r\n $thumb_h=$new_h;\r\n $thumb_w=$old_x/$ratio2;\r\n }\r\n\r\n // we create a new image with the new dimmensions\r\n $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);\r\n\r\n // resize the big image to the new created one\r\n imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); \r\n\r\n // output the created image to the file. Now we will have the thumbnail into the file named by $filename\r\n if(!strcmp(\"png\",$ext))\r\n imagepng($dst_img,$filename); \r\n else\r\n imagejpeg($dst_img,$filename); \r\n\r\n //destroys source and destination images. \r\n imagedestroy($dst_img); \r\n imagedestroy($src_img); \r\n }", "title": "" }, { "docid": "538772b9c254ca21c2be11ef38b46eb8", "score": "0.6635893", "text": "function getResizedImage()\r\n\t{\r\n\t\t$this->src_image = imagecreatefromjpeg($this->imageName);\r\n\t\t$this->resizeImage();\r\n\t\timagejpeg($this->dest_image, $this->resizedImageName);\r\n\t}", "title": "" }, { "docid": "8f66de83650a372d9bd6f73f77b2db2e", "score": "0.6631915", "text": "function ull_image_resize_build_filename($path, $options)\n{\n $width = (isset($options['width'])) ? $options['width'] : 0;\n $height = (isset($options['height'])) ? $options['height'] : 0;\n \n $suffixParts = array();\n \n if ($width)\n {\n $suffixParts[] = 'width_' . $width;\n }\n \n if ($height)\n {\n $suffixParts[] = 'height_' . $height;\n } \n \n $suffix = '_' . implode('_', $suffixParts);\n\n $suffixPath = ull_path_add_filename_suffix($path, $suffix);\n $subDirPath = ull_path_add_sub_directory($suffixPath, 'resized_images');\n\n return $subDirPath;\n}", "title": "" }, { "docid": "70c840625f84948623a1711bc124320c", "score": "0.6583528", "text": "function resizeImageUsingImagemagick( $filename , $newwidth , $newheight , $newPath='' )\n\t\t{\n\t\t\tif( !trim($newPath) ) $newPath = $filename ;\n\t\t\tsystem( \"convert \".$filename.\" -resize \".$newwidth.\"x\".$newheight.\" \".$newPath ) ;\n\t\t}", "title": "" }, { "docid": "5d5577ea2db5806777d476415861532e", "score": "0.6563456", "text": "function make_thumb($img_name,$filename,$new_w,$new_h)\r\n {\r\n //get image extension.\r\n $ext=getExtension($img_name);\r\n //creates the new image using the appropriate function from gd library\r\n if(!strcmp(\"jpg\",$ext) || !strcmp(\"jpeg\",$ext))\r\n $src_img=imagecreatefromjpeg($img_name);\r\n\r\n if(!strcmp(\"png\",$ext))\r\n $src_img=imagecreatefrompng($img_name);\r\n\r\n //gets the dimmensions of the image\r\n $old_x=imageSX($src_img);\r\n $old_y=imageSY($src_img);\r\n\r\n // next we will calculate the new dimmensions for the thumbnail image\r\n // the next steps will be taken: \r\n // \t1. calculate the ratio by dividing the old dimmensions with the new ones\r\n //\t2. if the ratio for the width is higher, the width will remain the one define in WIDTH variable\r\n //\t\tand the height will be calculated so the image ratio will not change\r\n //\t3. otherwise we will use the height ratio for the image\r\n // as a result, only one of the dimmensions will be from the fixed ones\r\n $ratio1=$old_x/$new_w;\r\n $ratio2=$old_y/$new_h;\r\n if($ratio1>$ratio2)\t{\r\n $thumb_w=$new_w;\r\n $thumb_h=$old_y/$ratio1;\r\n }\r\n else\t{\r\n $thumb_h=$new_h;\r\n $thumb_w=$old_x/$ratio2;\r\n }\r\n\r\n // we create a new image with the new dimmensions\r\n $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);\r\n\r\n // resize the big image to the new created one\r\n imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); \r\n\r\n // output the created image to the file. Now we will have the thumbnail into the file named by $filename\r\n if(!strcmp(\"png\",$ext))\r\n imagepng($dst_img,$filename); \r\n else\r\n imagejpeg($dst_img,$filename); \r\n\r\n //destroys source and destination images. \r\n imagedestroy($dst_img); \r\n imagedestroy($src_img); \r\n }", "title": "" }, { "docid": "c6833f7bf7c372c278da97263e81f970", "score": "0.6560483", "text": "private function imageResizing(){\n\n\t\tif (imagesx($this->imgTmp) < 800 && imagesy($this->imgTmp) < 800) {\n\t\t\t$this->imgScaledLarge = $this->imgTmp;\n\t\t\treturn;\n\t\t}\n\n\t\t$aspect = (imagesx($this->imgTmp) / imagesy($this->imgTmp));\n\t\t\n\t\t/* Based on aspect ratio, either width 800 or maximum height 800 */\n\t\tif ($aspect<1) {\n\n\t\t\t$this->imgScaledLarge = imagescale($this->imgTmp, (800 * $aspect));\n\t\t} else {\n\t\t\t$this->imgScaledLarge = imagescale($this->imgTmp, 800);\n\t\t}\n\t}", "title": "" }, { "docid": "076da9d2829ef628410564674d75dba6", "score": "0.6545812", "text": "function resizeto ( $src, $desDir, $desired_width){\r\n \r\n\t/* read the source image */\r\n\t$source_image = imagecreatefromjpeg($src);\r\n\t//$source_image = imagecreatefrompng($src);\r\n\t\r\n\t$width = imagesx($source_image);\r\n\t$height = imagesy($source_image);\r\n\t\r\n\t/* find the \"desired height\" of this thumbnail, relative to the desired width */\r\n\t$desired_height = floor($height * ($desired_width / $width));\r\n\t\r\n\t/* create a new, \"virtual\" image */\r\n\t$virtual_image = imagecreatetruecolor($desired_width, $desired_height);\r\n\t\r\n\t/* copy source image at a resized size */\r\n\timagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height);\r\n\t\r\n\t/* create the physical thumbnail image to its destination */\r\n\t$dest=$desDir. basename($src);\r\n\t//echo $dest.\"\\n\";\r\n\techo \".\";\r\n\timagejpeg($virtual_image, $dest);\r\n}", "title": "" }, { "docid": "21e32b87b30d506fe0082dc8c30f0a50", "score": "0.6498176", "text": "function myResizeFunction($target, $newcopy, $w, $h, $ext) {\n\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\") {\n $img = imagecreatefromgif($target);\n } else if ($ext == \"png\") {\n $img = imagecreatefrompng($target);\n } else {\n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n// imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h);\n\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $newcopy, 100);\n}", "title": "" }, { "docid": "dd1896451e06ba3234c6063ab1b3d529", "score": "0.64284134", "text": "function resize($target, $w, $h, $ext)\n {\n list($w_orig, $h_orig) = getimagesize($target);\n\n $img = '';\n $ext = strtolower($ext);\n if ($ext == \"gif\") {\n $img = imagecreatefromgif($target);\n } else if ($ext == \"png\") {\n $img = imagecreatefrompng($target);\n } else {\n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $target, 80);\n }", "title": "" }, { "docid": "2e9767d6ab27fa978f18ae0f9cda0ae4", "score": "0.6386396", "text": "function IMG_setFilenameSize($fileName,$size)\n{\n\t// FABR: hier wird das Image umbenannt.\n\t// FABR-FIX-ME: fix bug in IMG_showImageManagement fuer Aktion 'del'\n\t// Die Datei mit dem MBR wird nicht umbenannt.\n\n\t$newName=str_replace(\".0.\",\".$size.\",$fileName);\n\t\n\tsystem(\"sudo mv \".IMGSTOREDIR.\"$fileName \".IMGSTOREDIR.$newName);\n}", "title": "" }, { "docid": "7419db9b9e371036f08bc8586d4b0c2d", "score": "0.6374528", "text": "function convert_to_png($stageImage, $imgDir, $width, $height, $name) {\n $thumb = new GD($stageImage);\n\n try {\n $thumb->adaptiveResize($width, $height);\n $thumb->save($imgDir.'/'.$name);\n } catch (Exception $e) {\n }\n}", "title": "" }, { "docid": "82969c5f17413c78c7583604dca35fd6", "score": "0.63653314", "text": "function ak_img_resize($target,$newcopy,$w,$h,$ext)\n{\n\tlist($w_orig,$h_orig) = getimagesize($target);\n\t$scale_ratio = $w_orig / $h_orig;\n\tif (($w/$h) > $scale_ratio) {\n\t\t$w = $h * $scale_ratio;\n\t} else {\n\t\t$h = $w/$scale_ratio;\n\t}\n\t$img=\"\";\n\tif ($ext == \"gif\" || $ext == \"GIF\") {\n\t\t$img = imagecreatefromgif($target);\n\t} elseif ($ext == \"png\" || $ext == \"PNG\") {\n\t\t$img = imagecreatefrompng($target);\n\t} else {\n\t\t$img = imagecreatefromjpeg($target);\n\t}\n\t$tci = imagecreatetruecolor($w, $h);\n\timagecopyresampled($tci,$img,0,0,0,0,$w,$h,$w_orig,$h_orig);\n\timagejpeg($tci, $newcopy, 80);\n}", "title": "" }, { "docid": "14fbc83ec7590aebc0f3f036e31b9036", "score": "0.6354952", "text": "function ResizeImage($fileid,$purpose) {\n\tglobal $dirlocation;\n\tif (preg_match(\"/\\.jpg/\",$fileid)) {\n\t\t$origimage = imagecreatefromjpeg(\"$dirlocation/i/$purpose/original-$fileid\");\n\t} elseif (preg_match(\"/\\.png/\",$fileid)) {\n\t\t$origimage = imagecreatefrompng(\"$dirlocation/i/$purpose/original-$fileid\");\n\t\timagealphablending($origimage, true);\n\t\timagesavealpha($origimage, true);\n\t}\n\tif ($origimage) {\n\t\tif (preg_match(\"/category/\",$purpose)) {\n\t\t\t$width = 728;\n\t\t\t$height = 90;\n\t\t}\n\t\tif (preg_match(\"/sample/\",$purpose)) {\n\t\t\t$height = 450;\n\t\t\t$width = abs(round( (imagesX($origimage) / imagesY($origimage)) * $height ));\n\t\t}\n\t\tif (preg_match(\"/carousel/\",$purpose)) {\n\t\t\t$height = 400;\n\t\t\t$width = 266;\n\t\t}\n\t\t$newimage = imagecreatetruecolor($width,$height);\n\t\timagesavealpha($newimage, true);\n\t\t$color = imagecolorallocatealpha($newimage,0x00,0x00,0x00,127);\n\t\timagefill($newimage, 0, 0, $color);\n\t\t// dest , src , x dest, y dest , x src , y src , dest w, dest h, src w, src h\n\t\tif (!imagecopyresampled($newimage,$origimage,0, 0, 0, 0, $width, $height, imagesX($origimage), imagesY($origimage))) {\n\t\t\techo \"<div class='AdminError'>Image No Web Resize/Compress WTF $fileid</div>\";\n\t\t}\n\t\t// if its a category, only do a transparent png. sample, whatever came in.\n\t\tif (preg_match(\"/\\.jpg/\",$fileid) && (!preg_match(\"/category/\",$purpose))) {\n\t\t\t$newfilename = substr($fileid,0,-4) . \".jpg\";\n\t\t\timagejpeg($newimage, \"$dirlocation/i/$purpose/$newfilename\", 80); // http://www.ebrueggeman.com/blog/php_image_optimization\n\t\t} else if (preg_match(\"/\\.png/\",$fileid)) {\n\t\t\t$newfilename = substr($fileid,0,-4) . \".png\";\n\t\t\timagepng($newimage, \"$dirlocation/i/$purpose/$newfilename\",9);\n\t\t}\n\t\timagedestroy($origimage);\n\t\timagedestroy($newimage);\n\t}\n\tif (preg_match(\"/\\.mp4/\",$fileid)) {\n\t\t// create a thumbnail\n\t\t// XXXXXX\n\t\texec(\"/usr/local/bin/ffprobe -i m/$fileid -v quiet -print_format json -show_format -show_streams -hide_banner\", $ffresult);\n\t\t$ffresult = implode(\"\",$ffresult);\n\t\t$ffinfo = json_decode($ffresult, TRUE);\n\t\t$vidlength = ceil($ffinfo['format']['duration']);\n\t\t$totalframes = $vidlength * 30; // assuming 30fps...\n\t\t// XXX: This takes some time to render\n\t\tfor ($i = 1; $i < 5; $i++) {\n\t\t\t$thumbnailname = substr($fileid,0,-4) . \"-$i.jpg\";\n\t\t\t$frame = framesToTC(ceil($totalframes*($i * \"0.2\")), 30); // make four thumbnails every 200~ish frames, assuming 30 fps\n\t\t\techo \"rendering preview $i using frame \". ceil($totalframes*($i * \"0.1\")) .\" at \". $frame .\" of $totalframes\\n<br>\";\n\t\t\texec (\"/usr/local/bin/ffmpeg -v quiet -hide_banner -ss $frame -i $dirlocation/m/$fileid -frames 1 -qscale:v 2 $dirlocation/i/$purpose/$thumbnailname\");\n\t\t}\n\t\t// whatever image is fileid.jpg is the visible thumbnail, others just there for alternates \n\t\tcopy (\"$dirlocation/i/$purpose/\".substr($fileid,0,-4) . \"-1.jpg\", \"$dirlocation/i/$purpose/\". substr($fileid,0,-4) .\".jpg\");\n\t\t$newfilename = $fileid;\n\t}\n\treturn($newfilename);\n}", "title": "" }, { "docid": "dfd1a175d3251895019870b100e932c7", "score": "0.6311383", "text": "function resize_image($file, $newwidth, $newheight) {\r\n list($width, $height) = getimagesize($file);\r\n $src = imagecreatefromjpeg($file);\r\n $dst = imagecreatetruecolor( $newwidth, $newheight);\r\n imagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\r\n imagejpeg($dst, $file, 100);\r\n}", "title": "" }, { "docid": "f560f69d451a459034ede1515215589b", "score": "0.63065124", "text": "function ak_img_resize($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){ \n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){ \n $img = imagecreatefrompng($target);\n } else { \n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $newcopy, 80);\n}", "title": "" }, { "docid": "88446147d0d21106f79e21c2ee407a48", "score": "0.6296671", "text": "function serendipity_resizeImageGD($infilename, $outfilename, $newwidth, $newheight = null) {\n\n $func = serendipity_functionsGD($infilename);\n if (!is_array($func)) {\n return false;\n }\n\n try {\n // If an image exist that can not be loaded (invalid GIF for example), the page shall still be rendered\n $in = @$func['load']($infilename);\n } catch (\\Throwable $t) {\n echo 'serendipity_resizeImageGD(): Could not create thumbnail resource: ', $t->getMessage(), \"\\n\";\n return false;\n }\n\n // imagecreatefromwebp() -> imagesx() expects parameter 1 to be resource, bool given when is animated gif for example\n if (is_bool($in)) {\n return false;\n }\n\n $width = imagesx($in);\n $height = imagesy($in);\n\n if (is_null($newheight)) {\n $newsizes = serendipity_calculateAspectSize($width, $height, $newwidth, 'width');\n $newwidth = $newsizes[0];\n $newheight = $newsizes[1];\n }\n\n if (is_null($newwidth)) {\n $newsizes = serendipity_calculateAspectSize($width, $height, $newheight, 'height');\n $newwidth = $newsizes[0];\n $newheight = $newsizes[1];\n }\n\n $out = imagecreatetruecolor((int) $newwidth, (int) $newheight);\n\n /* Attempt to copy transparency information, this really only works for PNG */\n if (function_exists('imagesavealpha') && $func['save'] == 'imagepng') {\n imagealphablending($out, false);\n imagesavealpha($out, true);\n }\n\n imagecopyresampled($out, $in, 0, 0, 0, 0, (int) $newwidth, (int) $newheight, $width, $height);\n @umask(0000);\n touch($outfilename); // safe_mode requirement\n if ($func['save'] == 'imagegif') {\n @$func['save']($out, $outfilename); // A 2 param func only. Mute possible expectations, eg. animated gifs with GD\n } else {\n @$func['save']($out, $outfilename, $func['qual']); // Else functs have at least 3 params. Mute possible expectations, eg. animated gifs with GD\n }\n @chmod($outfilename, 0664);\n $out = null;\n $in = null;\n\n return array((float)$newwidth, $newheight);\n}", "title": "" }, { "docid": "0225fe1733900a882156d0be8120c1b2", "score": "0.6285445", "text": "function gen_thumbnail($path_in, $path_out, $maxW, $maxH, $method='ImageMagick') {\n $return = array('success'=> true, 'msg'=> '', 'output_w'=> $maxW, 'output_h'=> $maxH);\n\n $type = get_image_type_name($path_in);\n $src = imagecreatefrom_by_type($path_in);\n // get the source image's width and height\n $src_w = imagesx($src);\n $src_h = imagesy($src);\n\n $new_size = fit_size($src_w, $src_h, $maxW, $maxH);\n $thumb_w = $new_size['width'];\n $thumb_h = $new_size['height'];\n\n// $thumb_w = $maxW;\n// $thumb_h = $maxH;\n\n $return['output_w'] = $thumb_w;\n $return['output_h'] = $thumb_h;\n\n if ('GD' == $method) {\n $thumb = imagecreatetruecolor($thumb_w, $thumb_h);\n // start resize\n imagecopyresized($thumb, $src, 0, 0, 0, 0, $thumb_w, $thumb_h, $src_w, $src_h);\n // save thumbnail\n image_by_type($type, $thumb, $path_out);\n } else if ('ImageMagick' == $method) {\n $exports = array(\n 'PATH'=> '$PATH:/opt/ImageMagick/bin/'\n );\n $exec_info = execute_external(\n '/opt/ImageMagick/bin/convert', array(\"-resize {$thumb_w}x{$thumb_h} '$path_in' '$path_out'\"),\n '', $exports, '.'\n );\n if ($exec_info['code'] !== 0) {\n $return = array('success'=> false, 'msg'=> $exec_info['out']);\n return $return;\n }\n\n// $cmd = \"convert -strip -interlace plane '$path_out' '$path_out'\";\n// shell_exec($cmd);\n// $cmd = \"convert -resize {$thumb_w}x{$thumb_h} '$path_in' '$path_out' 2>&1\";\n// shell_exec($cmd);\n }\n return $return;\n}", "title": "" }, { "docid": "dd6727ed8102711d1548f4ed21bbf8a5", "score": "0.62689906", "text": "function ak_img_resize($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){\n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){\n $img = imagecreatefrompng($target);\n } else {\n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n if ($ext == \"gif\"){\n imagegif($tci, $newcopy);\n } else if($ext ==\"png\"){\n imagepng($tci, $newcopy);\n } else {\n imagejpeg($tci, $newcopy, 84);\n }\n }", "title": "" }, { "docid": "6f4890004dd0b4254e445b9087e527c0", "score": "0.62497723", "text": "function saveFull($fileName)\n\t{\n\t\t$config['image_library'] = 'gd2';\n\t\t$config['source_image']\t= $this->imgFolder.$fileName;\n\t\t$config['create_thumb'] = TRUE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\t$config['width']\t = 1200;\n\t\t$config['height']\t= 800;\n\t\t$config['quality']\t= '70%';\n\t\t$config['thumb_marker'] = false;\n\t\t$config['new_image']\t= $this->imgFolder.'full/';\n\t\t\n\t\t\n\t\t//$this->load->library('image_lib', $config);\n\t\t$this->image_lib->initialize($config);\n\t\t\n\t\treturn $this->image_lib->resize();\n\t}", "title": "" }, { "docid": "37a9b606bf716fb6a50719ab5a57a26d", "score": "0.6226906", "text": "private function resize($filename,$width,$height) {\n\t\tif (!file_exists($filename)) {\n\t\t\treturn $this->CI->config->item('base_url').$this->CI->config->item('assets_folder').'/img/img-not-found.gif';\n\t\t}\n\n\t\t/* does this image already exist? then just return it */\n\t\t$path_info = pathinfo($filename);\n\t\t\n\t\t$new_name = $path_info['filename'].$width.'x'.$height.'.'.$path_info['extension'];\n\t\t$final_name = $this->CI->config->item('base_url').$this->CI->config->item('assets_folder').'/img/'.$new_name;\n\n\t\tif (file_exists($final_name)) return $final_name;\n\t\t\n\t\t$config['source_image']\t= $filename;\n\t\t$config['create_thumb'] = TRUE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\tif ($height > 0 && $width == 0) {\n\t\t\t$config['master_dim'] = 'height';\n\t\t\t$config['height']\t= $height;\n\t\t\t$config['width'] = 1;\n\t\t}\n\t\tif ($width > 0 && $height == 0) {\n\t\t\t$config['master_dim'] = 'width';\n\t\t\t$config['width'] = $width;\n\t\t\t$config['height'] = 1;\n\t\t}\n\t\tif ($height > 0 && $width > 0) {\n\t\t\t$config['width'] = $width;\n\t\t\t$config['height']\t= $height;\n\t\t\t$config['master_dim'] = 'auto';\n\t\t}\n\t\t\n\t\t$config['thumb_marker'] = $width.'x'.$height;\n\n\t\t$new_image = $path_info['dirname'].'/'.$new_name;\n\n\t\t$this->CI->load->library('image_lib', $config);\n\n\t\t$this->CI->image_lib->resize();\n\t\t\n\t\tif ( ! $this->CI->image_lib->resize())\n\t\t{\n\t\t\tlog_message('error', $this->CI->image_lib->display_errors());\n\t\t}\n\t\t\n\t\treturn $final_name;\n\t}", "title": "" }, { "docid": "6f2496b80f58c3e7c675e5d2d9d7e8b4", "score": "0.62193257", "text": "function setImageWidth($image, $file_tmp_name, $size) {\n\n $new_width = 0;\n\n switch ($size) {\n case 'sm':\n $new_width = $this->image_size_small;\n break;\n case 'md':\n $new_width = $this->image_size_medium;\n break;\n }\n \n list($image_width, $image_height) = getimagesize($file_tmp_name);\n\n $new_height = ($image_height / $image_width) * $new_width;\n $tmp_image = imagecreatetruecolor($new_width, $new_height);\n imagecopyresampled($tmp_image, $image, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height);\n\n return $tmp_image;\n }", "title": "" }, { "docid": "1ae11b55487213a99106cdf4a6ddf345", "score": "0.61929816", "text": "function createthumb ($img=\"\", $sml=\"s\"){\r\n\t\t\t\t\r\n\t\t//First, check for a valid file.\r\n\t\tif (is_file ($img)){\r\n\t\t\t\r\n\t\t\t//Now, get the current file size.\r\n\t\t\tif ($cursize = getimagesize ($img)){\r\n\t\t\t\r\n\t\t\t\t//Then, based on the sml variable, find the new size we want.\r\n\t\t\t\t$size = array(\"s\" => 100, \"m\" => 300, \"l\" => 600);\r\n\t\t\t\tif (!array_key_exists($sml, $size)){\r\n\t\t\t\t\t$sml = \"s\";\r\n\t\t\t\t}\r\n\t\t\t\t$newsize = setWidthHeight($cursize[0], $cursize[1], $size[$sml], $size[$sml]);\r\n\t\t\t\t\r\n\t\t\t\t//Now that we have the size constraints, let's find the file type.\r\n\t\t\t\t$thepath = pathinfo ($img);\r\n\t\t\t\t//Setup our thumbnail.\r\n\t\t\t\t$dst = imagecreatetruecolor ($newsize[0],$newsize[1]);\r\n\t\t\t\t//Make a file name.\r\n\t\t\t\t$filename = str_replace (\".\".$thepath['extension'],\"\",$img);\r\n\t\t\t\t\r\n\t\t\t\t$types = array('jpg' => array('imagecreatefromjpeg', 'imagejpeg'), 'jpeg' => array('imagecreatefromjpeg', 'imagejpeg'), 'gif' => array('imagecreatefromgif', 'imagegif'), 'png' => array('imagecreatefrompng', 'imagepng'));\r\n\t\t\t\t\r\n\t\t\t\t$src = $types[$thepath['extension']][0] ($img);\r\n\t\t\t\t//Create the copy.\r\n\t\t\t\timagecopyresampled ($dst,$src,0,0,0,0,$newsize[0],$newsize[1],$cursize[0],$cursize[1]);\r\n\t\t\t\t//Create the thumbnail.\r\n\t\t\t\t$types[$thepath['extension']][1] ($dst,$filename.\"_th\".$sml.\".\".$thepath['extension'].\"\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//Clear the cache.\r\n\t\t\t\theader(\"Cache-control: private, no-cache\");\r\n\t\t\t\theader(\"Expires: Mon, 26 Jun 1997 05:00:00 GMT\");\r\n\t\t\t\theader(\"Pragma: no-cache\");\r\n\t\t\t\t\r\n\t\t\t\t//Show the img.\r\n\t\t\t\t?>\r\n\t\t\t\t<img src=\"<?php echo $filename; ?>_th<?php echo $sml; ?>.<?php echo strtolower($thepath['extension']); ?>\" alt=\"\" title=\"\" style=\"border: none;\" />\r\n\t\t\t\t<p>Change Image Size: <a href=\"thumb.php?img=<?=$img?>&amp;sml=s\" onclick=\"changesize('<?=$img?>','s'); return false;\">Small</a> | <a href=\"thumb.php?img=<?=$img?>&amp;sml=m\" onclick=\"changesize('<?=$img?>','m'); return false;\">Medium</a> | <a href=\"thumb.php?img=<?=$img?>&amp;sml=l\" onclick=\"changesize('<?=$img?>','l'); return false;\">Large</a></p>\r\n\t\t\t\t<?php\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\techo \"No image found.\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\techo \"No image found.\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6210a031ee0618fbc83c4ecc4778bd95", "score": "0.618936", "text": "public function makeSize($folder, $name, $scale, $variation_id, $width, $height)\n {\n if ($scale = 'w') {\n $img = Image::make($folder . \"/\" . $name)->resize(\n $width,\n null,\n function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n }\n );\n } else {\n $img = Image::make($folder . \"/\" . $name)->resize(\n null,\n $height,\n function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n }\n );\n }\n $new_name = $variation_id . \"_\" . $width . \"x\" . $height . \"_\" . $name;\n $img->save($folder . \"/\" . $new_name);\n File::delete($folder . \"/\" . $name);\n\n return Config('paths.CACHE_MEDIA_URL') . $new_name;\n }", "title": "" }, { "docid": "4b501f2c25c666392ed75f0f4804541e", "score": "0.61775315", "text": "function resizeImage($fileName, $constraint, $flag){\r\n\t//we retrieve the info from the current image\r\n\tlist($orig_width, $orig_height, $type) = getimagesize($fileName);\r\n \t$new_width\t='';\r\n \t$new_height\t='';\r\n\tif($flag == \"width\"){\r\n \t\tif($orig_width > $constraint){\r\n\t \t\t$new_height=round(( $constraint * $orig_height) / $orig_width);\r\n\t \t\t$new_width = $constraint;\r\n \t\t}else{\r\n \t\t\t$new_height = $orig_height;\r\n \t\t\t$new_width = $orig_width;\r\n \t\t}\r\n \t}else{\r\n \t\tif($orig_height > $constraint){\r\n\t \t\t$new_width=round(( $constraint * $orig_width) / $orig_height);\r\n \t\t\t$new_height = $constraint;\r\n \t\t}else{\r\n \t\t\t$new_height = $orig_height;\r\n \t\t\t$new_width = $orig_width;\r\n \t\t}\r\n\t}\t\t\r\n\r\n //we create a new image template\r\n $image_p = imagecreatetruecolor($new_width, $new_height);\r\n //we create a variable that will hold the new image\r\n $image = null;\r\n //only the three first of all the possible formats are supported, the original image is loaded if it is one of them\r\n\tswitch($type){\r\n\t case 1: //GIF\r\n\t\t\t$image = imagecreatefromgif($fileName);\r\n\t\t\tbreak;\r\n\t case 2: //JPEG\r\n\t \t$image = imagecreatefromjpeg($fileName);\r\n\t \tbreak;\r\n\t case 3: //PNG\r\n\t \t$image = imagecreatefrompng($fileName);\r\n\t \tbreak;\r\n\t default;\r\n\t\t\texec(\"convert \".$fileName.\" \".$fileName.\".jpg\");\r\n\t\t\texec(\"rm \".$fileName);\r\n\t\t\texec(\"mv \".$fileName.\".jpg \".$fileName);\r\n\t \t$image = imagecreatefromjpeg($fileName);\r\n\t \tbreak;\r\n\t}\r\n\t//we copy the resized image from the original into the new one and save the result as a jpeg \r\n\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $orig_width, $orig_height);\r\n\timagejpeg($image_p, $fileName, 100);\r\n\treturn true;\r\n}", "title": "" }, { "docid": "335e2a2d315bcfb023d988f5581bf3e2", "score": "0.61766535", "text": "function resizePicture($path, $new_path,$new_width, $proportion = false) {\n // $im->readImage($source_url);\n // $im->setImageCompressionQuality($quality);\n // // $im->setImageFormat($type);\n // $im->stripImage();\n // if(!empty($profiles)) $im->profileImage(\"icc\", $profiles['icc']);\n // $im->writeImage($destination_url);\n // $im->destroy();\n\n\n $im = new Imagick($path);\n $im->setImageCompressionQuality(40);\n $profiles = $im->getImageProfiles(\"icc\", true);\n $im->stripImage();\n if(isset($profiles['icc'])){\n $im->profileImage(\"icc\", $profiles['icc']);\n } \n $im->thumbnailImage($new_width,null);\n $im->writeImage($new_path);\n if(!isset($profiles['icc'])){\n $im->setImageFormat('webp');\n $im->writeImage($new_path.'.webp');\n }\n // $size = getimagesize($path);\n // $x = 0;\n // $y = 0;\n\n // switch($size['mime']) {\n // case 'image/jpeg':\n // $picture = imagecreatefromjpeg($path);\n // break;\n // case 'image/png':\n // $picture = imagecreatefrompng($path);\n // break;\n // case 'image/gif':\n // $picture = imagecreatefromgif($path);\n // break;\n // default:\n // return false;\n // break;\n // }\n\n // $width = $size[0];\n // $height = $size[1];\n\n \n // $new_height=$new_width*($height/$width);\n // $frame = imagecreatetruecolor($new_width, $new_height);\n // if($size['mime'] == 'image/jpeg') {\n // $bg = imagecolorallocate($frame, 255, 255, 255);\n // imagefill($frame, 0, 0, $bg);\n // } else if($size['mime'] == 'image/gif' or $size['mime'] == 'image/png') {\n // imagealphablending($picture, false);\n // imagesavealpha($picture, true);\n // imagealphablending($frame, false);\n // imagesavealpha($frame, true);\n // }\n // // imagecopyresampled(dst_image, src_image, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h);\n // imagecopyresampled($frame, $picture, $x, $y, 0, 0, $new_width, $new_height, $width, $height);\n\n\n // switch($size['mime']) {\n // case 'image/jpeg':\n // imagejpeg($frame, $new_path, 85);\n // break;\n // case 'image/png':\n // imagepng($frame, $new_path, 80);\n // break;\n // case 'image/gif':\n // imagegif($frame, $new_path);\n // break;\n // default:\n // return false;\n // break;\n // }\n // imagewebp($frame,$new_path.'.webp');\n return $new_path;\n\n}", "title": "" }, { "docid": "eb51ab971614f03528213d5298596a43", "score": "0.6172915", "text": "function resize($source_image, $temp_name, $img_ext, $width, $height, $folder_path, $unique_id){\n\n\t\t/* Get original image x y*/\n\n\t\tlist($w, $h) = getimagesize($temp_name);\n\n\t\t/* calculate new image size with ratio */\n\n\t\t$ratio = max($width/$w, $height/$h);\n\n\t\t$h = ceil($height / $ratio);\n\n\t\t$x = ($w - $width / $ratio) / 2;\n\n\t\t$w = ceil($width / $ratio);\n\n\t\t/* new file name */\n\n\t\t$path = $folder_path.$width.'x'.$height.'_'.$unique_id.$source_image;\n\n\t\t/* read binary data from image file */\n\n\t\t$imgString = file_get_contents($temp_name);\n\n\t\t/* create image from string */\n\n\t\t$image = imagecreatefromstring($imgString);\n\n\t\t$tmp = imagecreatetruecolor($width, $height);\n\n\t\timagecopyresampled($tmp, $image,\n\n\t\t0, 0,\n\n\t\t$x, 0,\n\n\t\t$width, $height,\n\n\t\t$w, $h);\n\n\t\t/* Save image */\n\n\t\tswitch ($img_ext) {\n\n\t\t\tcase 'image/jpeg':\n\n\t\t\t\timagejpeg($tmp, $path, 100);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/png':\n\n\t\t\t\timagepng($tmp, $path, 0);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/gif':\n\n\t\t\t\timagegif($tmp, $path);\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\texit;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\treturn $path;\n\n\t\t/* cleanup memory */\n\n\t\timagedestroy($image);\n\n\t\timagedestroy($tmp);\n\n\t}", "title": "" }, { "docid": "0f1f168e60dd5db3bc799d4a16a8d1ec", "score": "0.6166789", "text": "function resizeImage($image,$width,$height,$scale) {\r\n $newImageWidth = ceil($width * $scale);\r\n $newImageHeight = ceil($height * $scale);\r\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\r\n $source = imagecreatefromjpeg($image);\r\n imagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\r\n imagejpeg($newImage,$image,90);\r\n chmod($image, 0777);\r\n return $image;\r\n}", "title": "" }, { "docid": "9d2240729d93b22385c630eeee0083a7", "score": "0.61661357", "text": "function imageResize ($source, $destination, $width, $height) {\n\n $ext = explode(\".\", $source);\n $ext = end($ext);\n $ext = strtolower($ext);\n $image = \"\";\n\n if ($ext == \"jpg\" || $ext == \"jpeg\")\n $image = imagecreatefromjpeg($source);\n if ($ext==\"png\")\n $image = imagecreatefrompng($source);\n if ($ext==\"bmp\")\n $image = imagecreatefrombmp($source);\n if ($ext==\"gif\")\n $image = imagecreatefromgif($source);\n\n $tmp = imagecreatetruecolor($width, $height);\n\n imagecopyresized($tmp, $image, 0, 0, 0, 0, $width, $height, imagesx($image), imagesy($image));\n\n imagejpeg($tmp, $destination);\n}", "title": "" }, { "docid": "25a7d510c406da1a79eb0f3b1acf951e", "score": "0.616528", "text": "function do_thumbResize2($filename,$newfilename,$width,$height,$quality)\n{\n\t$max_height = $height;\n\t//header(\"Content-type: image/jpeg\");\n\t$size = getimagesize($filename); // Read the size\n\t$img_width = $size[0];\n\t$img_height = $size[1];\n\t\n\t//$y_ratio = $max_height / $height;\t \n\t\n\tif ($img_width==$img_height){\n\t$new_h=$new_w=$width;\n\t}else if($img_width>$img_height){\n\t\n\t$ratio = $img_height/$height;\t\n\t$new_h=$height;\n\t$new_w=$img_width/$ratio;\n\t\n\tif ($new_w<$width){\n\t//$new_h=$new_h+10;\n\t//$new_w=$new_w+10;\n\t$ratio = $img_width/$width ;\t\n\t$new_h=$img_height/$ratio;\n\t$new_w=$width;\n\t}\n\t\n\t}else{\n\t\n\t$ratio = $img_width/$width ;\t\n\t$new_h=$img_height/$ratio;\n\t$new_w=$width;\n\t}\t\n\t\n\t$newfilename = $filename; \n\n $src = imagecreatefromjpeg($newfilename);\n $dst = imagecreatetruecolor($new_w, $new_h);\n\timagecopyresampled($dst, $src, 0, 0, 0, 0, $new_w, $new_h, $img_width, $img_height);\n\t imagejpeg ($dst , $newfilename , $quality);\n}", "title": "" }, { "docid": "afc3f674df09095de92a0bebaffe2957", "score": "0.6141271", "text": "function resize($width, $height)\n {\n list($w, $h) = getimagesize($_FILES['image']['tmp_name']);\n /* calculate new image size with ratio */\n $ratio = max($width / $w, $height / $h);\n $h = ceil($height / $ratio);\n $x = ($w - $width / $ratio) / 2;\n $w = ceil($width / $ratio);\n /* new file name */\n $path = 'uploads/' . $width . 'x' . $height . '_' . $_FILES['image']['name'];\n /* read binary data from image file */\n $imgString = file_get_contents($_FILES['image']['tmp_name']);\n /* create image from string */\n $image = imagecreatefromstring($imgString);\n $tmp = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp, $image,\n 0, 0,\n $x, 0,\n $width, $height,\n $w, $h);\n /* Save image */\n switch ($_FILES['image']['type']) {\n case 'image/jpeg':\n imagejpeg($tmp, $path, 100);\n break;\n case 'image/png':\n imagepng($tmp, $path, 0);\n break;\n case 'image/gif':\n imagegif($tmp, $path);\n break;\n default:\n exit;\n break;\n }\n return $path;\n /* cleanup memory */\n imagedestroy($image);\n imagedestroy($tmp);\n }", "title": "" }, { "docid": "73888ea6884aa74573117bd93a1a950f", "score": "0.6133823", "text": "function ImageResizePng($imageName, $resizedImageName, $newWidth, $newHeight)\r\n\t{\r\n\t\t$this->imageName = $imageName;\r\n\t\t$this->resizedImageName = $resizedImageName;\r\n\t\t$this->newWidth = $newWidth;\r\n\t\t$this->newHeight = $newHeight;\r\n\t}", "title": "" }, { "docid": "cf6f44a11cc9df9013aec3a44af26a57", "score": "0.6132868", "text": "function saveImage($file_tmp_name, $image_name, $image_type, $quality, $size = null) {\n\n $destination = $this->output_directory . \"/$image_name.$image_type\";\n\n if ($image_type == 'png') {\n\n $image = imagecreatefrompng($file_tmp_name);\n\n // PNG quality must be 0 (Highest) to 9 (Lowest)\n // Turn scale 0 - 100 into 0 - 9.\n $quality = 10 - ( ceil($quality) / 10 );\n\n // Resize the image\n if ($size) {\n $image = $this->setImageWidth($image, $file_tmp_name, $size);\n }\n\n imagepng($image, $destination, $quality);\n imagedestroy($image);\n \n } else if ($image_type == 'jpg') {\n\n $image = @imagecreatefromjpeg($file_tmp_name);\n\n // Resize the image\n if ($size) {\n $image = $this->setImageWidth($image, $file_tmp_name, $size);\n }\n\n imagejpeg($image, $destination, $quality);\n imagedestroy($image);\n }\n }", "title": "" }, { "docid": "d62f36ce042f26b5798d762aee5e3ab1", "score": "0.6116728", "text": "public function scaleImageDown(){\n if($this->imageWidth > $this->maxSize || $this->imageHeight > $this->maxSize){\n if($this->imageWidth > $this->imageHeight){\n $newWidth = $this->maxSize;\n $ratio = $this->imageWidth / $this->maxSize;\n $newHeight = $this->imageHeight / $ratio;\n }else{\n $newHeight = $this->maxSize;\n $ratio = $this->imageHeight / $this->maxSize;\n $newWidth = $this->imageWidth / $ratio;\n }\n $newImage = imagecreatetruecolor($newWidth, $newHeight);\n imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $newWidth, $newHeight, $this->imageWidth, $this->imageHeight);\n if($this->imageFormat == 'jpg'){\n imagejpeg($newImage, $this->savePath);\n $this->image = imagecreatefromjpeg($this->savePath);\n }else if($this->imageFormat == 'png'){\n imagepng($newImage, $this->savePath);\n $this->image = imagecreatefrompng($this->savePath);\n }\n $this->imageWidth = floor($newWidth);\n $this->imageHeight = floor($newHeight);\n }\n }", "title": "" }, { "docid": "617806bfa8559e57435445af7992ec7b", "score": "0.6101109", "text": "function ak_img_resize($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){ \n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){ \n $img = imagecreatefrompng($target);\n imagesavealpha($img, true);\n\n } else { \n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n $background = imagecolorallocatealpha($tci, 255, 255, 255, 127);\n imagecolortransparent($tci, $background);\n imagealphablending($tci, false);\n imagesavealpha($tci, true);\n // imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagepng($tci, $newcopy);\n}", "title": "" }, { "docid": "dc6ed24fd563744dc49a67422ce36393", "score": "0.6101104", "text": "function MSR_m23ImagerSize()\n{\n\tIMG_setFilenameSize(urldecode($_POST['imagename']),($_POST['data'] * 1048576));\n}", "title": "" }, { "docid": "6c6d2aecb6a52f1bd797829780ca718a", "score": "0.6099587", "text": "function do_resize1($filename,$width,$height,$quality)\n{\n$max_width = $width;\n$max_height = $height;\n\n //header(\"Content-type: image/jpeg\");\n \n $size = getimagesize($filename); // Read the size\n $width = $size[0];\n $height = $size[1];\n \n\n // Proportionally resize the image to the\n // max sizes specified above\n \n $x_ratio = $max_width / $width;\n $y_ratio = $max_height / $height;\n\n if( ($width <= $max_width) && ($height <= $max_height) )\n {\n $tn_width = $width;\n $tn_height = $height;\n }\n elseif (($x_ratio * $height) < $max_height)\n {\n $tn_height = ceil($x_ratio * $height);\n $tn_width = $max_width;\n }\n else\n {\n $tn_width = ceil($y_ratio * $width);\n $tn_height = $max_height;\n }\n // Increase memory limit to support larger files\n\n ini_set('memory_limit', '128M');\n \n // Create the new image!\n $src = imagecreatefromjpeg($filename);\n $dst = imagecreatetruecolor($tn_width, $tn_height);\n // imagecopyresized($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);\n\timagecopyresampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);\n // imagejpeg($dst);\n\t imagejpeg ($dst , $filename , $quality);\n\n}", "title": "" }, { "docid": "9a5bacf8a7f0b28e1c4a9c1fb07b9826", "score": "0.60982466", "text": "protected static function resize($width = null, $height=null, $directory, $filename, $extension, $type)\n {\n Log::info($directory.\"/\".$filename.\".\".$extension);\n $img = Image::make($directory.\"/\".$filename. \".\" .$extension);\n $img->resize($width, $height, function ($constraint) {\n $constraint->aspectRatio();\n });\n $imgString = $directory.\"/\".$type.\"/\".$filename.\"_\";\n\n if ($width != null ) {\n \n $imgString .= $width;\n if ($height != null) {\n $imgString .= \"X\".$height; \n }\n\n }\n else if ($height != null){\n \n $imgString .= $height;\n\n }\n $imgString .= \".jpg\";\n $img->save($imgString);\n $img->destroy();\n }", "title": "" }, { "docid": "f16a03783089e9a41832cd6c22ebe3ba", "score": "0.6079138", "text": "function ImageResize($img,$w,$h,$dest,$filename)\n{\n\t//$img = $_GET['img'];\n\t//$percent = $_GET['percent'];\n\t/*$constrain = $_GET['constrain'];\n\t$w = $_GET['w'];\n\t$h = $_GET['h'];*/\n\t//Copy Org Image To Destination\n\t//@copy($img,$dest.'/'.$filename);\n\t\n\t\n\t// get image size of img\n\t$x = @getimagesize($img);\n\t// image width\n\t$sw = $x[0];\n\t// image height\n\t$sh = $x[1];\n\t\n\tif ($percent > 0) {\n\t\t// calculate resized height and width if percent is defined\n\t\t$percent = $percent * 0.01;\n\t\t$w = $sw * $percent;\n\t\t$h = $sh * $percent;\n\t} else {\n\t\tif (isset ($w) AND !isset ($h)) {\n\t\t\t// autocompute height if only width is set\n\t\t\t$h = (100 / ($sw / $w)) * .01;\n\t\t\t$h = @round ($sh * $h);\n\t\t} elseif (isset ($h) AND !isset ($w)) {\n\t\t\t// autocompute width if only height is set\n\t\t\t$w = (100 / ($sh / $h)) * .01;\n\t\t\t$w = @round ($sw * $w);\n\t\t} elseif (isset ($h) AND isset ($w) AND isset ($constrain)) {\n\t\t\t// get the smaller resulting image dimension if both height\n\t\t\t// and width are set and $constrain is also set\n\t\t\t$hx = (100 / ($sw / $w)) * .01;\n\t\t\t$hx = @round ($sh * $hx);\n\t\n\t\t\t$wx = (100 / ($sh / $h)) * .01;\n\t\t\t$wx = @round ($sw * $wx);\n\t\n\t\t\tif ($hx < $h) {\n\t\t\t\t$h = (100 / ($sw / $w)) * .01;\n\t\t\t\t$h = @round ($sh * $h);\n\t\t\t} else {\n\t\t\t\t$w = (100 / ($sh / $h)) * .01;\n\t\t\t\t$w = @round ($sw * $w);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$im = @ImageCreateFromJPEG ($img) or // Read JPEG Image\n\t$im = @ImageCreateFromPNG ($img) or // or PNG Image\n\t$im = @ImageCreateFromGIF ($img) or // or GIF Image\n\t$im = false; // If image is not JPEG, PNG, or GIF\n\t\n\tif (!$im) {\n\t\t// We get errors from PHP's ImageCreate functions...\n\t\t// So let's echo back the contents of the actual image.\n\t\treadfile ($img);\n\t} else {\n\t\t// Create the resized image destination\n\t\t$thumb = @ImageCreateTrueColor ($w, $h);\n\t\t// Copy from image source, resize it, and paste to image destination\n\t\t@ImageCopyResampled ($thumb, $im, 0, 0, 0, 0, $w, $h, $sw, $sh);\n\t\t//@imagecopyresized($this->dest_image, $this->src_image, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);\n\t\t// Output resized image\n\t\t@ImageJPEG ($thumb,$dest.'/'.$filename);\n\t\t//if($thumb)copy($thumb,'thumb_'.$filename);\n\t}\n}", "title": "" }, { "docid": "a9cba7b976f2d907fd222bda4f7e77f7", "score": "0.60774034", "text": "public function createThumbnail()\n {\n $image = new Imagick($this->getAbsoluteFilePath());\n $image->setImageCompressionQuality(self::$compressionQuality);\n if ($this->isInPortraitFormat())\n {\n $image->thumbnailImage(555, 0);\n }\n else\n {\n $image->thumbnailImage(0, 500);\n }\n $image->writeImage(public_path() . '/uploads/' . $this->id . '_thumb.jpeg');\n }", "title": "" }, { "docid": "ae9f4cf5487254a18735db89069a62fe", "score": "0.6070643", "text": "public function resize($original,$name,$folder,$size=\"medium\") {\n \n // basic info\n $path = $folder.\"/\".\"$size/\";\n // die($path);\n $pathinfo = pathinfo($path);\n //$size = \"small\";\n // $original = $pathinfo[\"dirname\"] . \"/\" . str_ireplace(\"-\" . $size, \"\", $pathinfo[\"basename\"]);\n \n // original image not found, show 404\n if (!file_exists($original)) {\n show_404($original);\n }\n \n // load the allowed image sizes\n $this->load->config(\"images\");\n $sizes = $this->config->item(\"image_sizes\");\n $allowed = FALSE;\n \n if (stripos($size, \"x\") !== FALSE) {\n // dimensions are provided as size\n @list($width, $height) = explode(\"x\", $size);\n \n // security check, to avoid users requesting random sizes\n foreach ($sizes as $s) {\n if ($width == $s[0] && $height == $s[1]) {\n $allowed = TRUE;\n break;\n }\n }\n } else if (isset($sizes[$size])) {\n // optional, the preset is provided instead of the dimensions\n // NOTE: the controller will be executed EVERY time you request the image this way\n @list($width, $height) = $sizes[$size];\n $allowed = TRUE;\n \n // set the correct output path\n //$path = str_ireplace($size, $width . \"x\" . $height, $path);\n \n // die($path);\n }\n //var_dump($allowed);\n //die();\n // only continue with a valid width and height\n if ($allowed && $width >= 0 && $height >= 0) {\n // initialize library\n $config[\"source_image\"] = $original;\n $config['new_image'] = \"$path$name\";\n //die($config['new_image']);\n $config[\"width\"] = $width;\n $config[\"height\"] = $height;\n $config[\"dynamic_output\"] = FALSE; // always save as cache\n \n $this->load->library('image_lib');\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n $this->image_lib->fit();\n }\n \n \n }", "title": "" }, { "docid": "65795460cb0bc033d699a846fed6842e", "score": "0.606315", "text": "function resizeImage($originalImage,$toWidth,$toHeight,$filename, $path, $extention)\n {\n\t\t$new_width = $toWidth;\n $new_height = $toHeight;\n // Get the original geometry and calculate scales\n list($width, $height) = getimagesize($originalImage);\n $xscale=$width/$toWidth;\n $yscale=$height/$toHeight;\n if(($width != $toWidth) && ($height != $toHeight))\n {\n // Recalculate new size with default ratio\n if ($yscale<$xscale)\n {\n $new_width = round($width * (0.8/$yscale));\n $new_height = round($height * (1/$yscale));\n }\n else\n {\n $new_width = round($width * (1/$xscale));\n $new_height = round($height * (1/$xscale));\n }\n }\n else\n {\n\t\t\t$new_width \t= $width;\n $new_height = $height;\n }\n // Resize the original image\n $imageResized = imagecreatetruecolor($new_width, $new_height);\n $extention = strtolower($extention);\n if($extention == 'image/jpeg' || $extention == 'image/jpg') \n { \n $imageTmp = imagecreatefromjpeg ($originalImage);\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n imagejpeg($imageResized,$path.IMG_THUMB_PRE.$filename,100); \n }\n else if($extention == 'image/png')\n {\n $imageTmp = imagecreatefrompng ($originalImage);\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n imagepng($imageResized,$path.IMG_THUMB_PRE.$filename);\n }\n else if($extention == 'image/gif')\n {\n $imageTmp = imagecreatefromgif ($originalImage);\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n imagegif($imageResized,$path.IMG_THUMB_PRE.$filename,100); \n }\n return $imageResized; \n }", "title": "" }, { "docid": "c5ad5d9bb51e4b6d3d49f490ed07690c", "score": "0.6061721", "text": "protected function _getresizeImg($fileName, $width, $height, $path, $sid)\n {\n $folderURL = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA). DS . 'marketplace/'.$sid;\n $imageURL = $folderURL .'/'. $fileName;\n\n $basePath = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA). DS . 'marketplace/'.$sid.'/'.$fileName;\n $newPath = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA). DS . 'marketplace/'.$sid.'/'.$fileName;\n //if width empty then return original size image's URL\n if ($width != '') \n {\n //if image has already resized then just return URL\n if (file_exists($basePath) && is_file($basePath)) {\n $imageObj = new Varien_Image($basePath);\n $imageObj->constrainOnly(TRUE);\n $imageObj->keepAspectRatio(FALSE);\n $imageObj->keepFrame(FALSE);\n $imageObj->resize($width, $height);\n $imageObj->save($newPath);\n }\n $resizedURL = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA). 'marketplace/'.$sid.'/'.$fileName;\n } else {\n $resizedURL = $imageURL;\n }\n \n return $resizedURL;\n }", "title": "" }, { "docid": "01ac3086b4c0c7fe754913bd398a9472", "score": "0.6057764", "text": "private function generateThumbnail()\r\n {\r\n // is better equipped for this sort of thing.\r\n $this->hImage = $this->library('hImage');\r\n\r\n $this->hImage->resizeImage(\r\n $this->hFileSystemImagePath,\r\n $this->hFileSystemThumbnailPath,\r\n 110,\r\n 110\r\n );\r\n }", "title": "" }, { "docid": "85086fda712981f205802cbc0ee7c9b2", "score": "0.6050272", "text": "function create_thumb($max_output_size, $original_name, $new_thumb_name){\n list($width, $height, $image_type) = getimagesize($original_name);\n \n if($image_type == 2){\n $img = imagecreatefromjpeg($original_name);\n } else if($image_type == 1){\n $img = imagecreatefromgif($original_name);\n } else if($image_type == 3){\n $img = imagecreatefrompng($original_name);\n } else {\n echo(\"failed to find image type \");\n return false;\n }\n if ($img === false) {\n echo(\"failed to create img \");\n return false;\n }\n $aspect_ratio = $width / $height;\n if ($width <= $max_output_size && $height <= $max_output_size){\n $output_width = $max_output_size;\n $output_height = $max_output_size;\n } else if($aspect_ratio < 1) {\n $output_width = $max_output_size * $aspect_ratio;\n $output_height = $max_output_size;\n } else {\n $output_width = $max_output_size;\n $output_height = $max_output_size / $aspect_ratio;\n }\n \n $tmp_img = imagecreatetruecolor($output_width, $output_height);\n \n imagecopyresampled($tmp_img, $img, 0, 0, 0, 0, $output_width, $output_height, $width, $height);\n imagejpeg($tmp_img, $new_thumb_name . \".jpg\", 90);\n imagedestroy($tmp_img);\n imagedestroy($img);\n \n return true;\n }", "title": "" }, { "docid": "16968547dff6c76570e512dd0b81e989", "score": "0.60464203", "text": "function resizeImage($img,$path) {\n\t$type == 'jpeg';\n\tif(substr(strtolower($img),-4,4) == \".gif\") {\n\t\t$type = 'gif';\n\t} else if(substr(strtolower($img),-4,4) == \".bmp\") {\n\t\t$type = 'bmp';\n\t}\n\n\tif($type == 'gif') {\n\t\t$src = imagecreatefromgif($path.$img);\n\t} else if($type == 'bmp') {\n\t\t$src = imagecreatefromwbmp($path.$img);\n\t} else {\n\t\t$src = imagecreatefromjpeg($path.$img);\n\t}\n\n\t// Capture the original size of the uploaded image\n\tlist($width,$height)=getimagesize($path.$img);\n\t\n\t$newwidth=50;\n\t$newheight=($height/$width)*50;\n\t$tmp=imagecreatetruecolor($newwidth,$newheight);\n\n\t// this line actually does the image resizing, copying from the original\n\timagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);\n\n\t$filename = $path.$img;\n\tif($type == 'gif') {\n\t\timagegif($tmp,$filename,100);\n\t} else if($type == 'bmp') {\n\t\timagewbmp($tmp,$filename,100);\n\t} else {\n\t\timagejpeg($tmp,$filename,100);\n\t}\n\n\timagedestroy($src);\n\timagedestroy($tmp);\t\t\t\t\t\t\t\t\n}", "title": "" }, { "docid": "81fd2ffceddd2c7a23922bf4597645b3", "score": "0.60378796", "text": "function resize_img($imgPath, $maxWidth, $maxHeight, $directOutput = true, $quality = 90, $verbose,$imageType)\r\n{\r\n // 2 is (1 = GIF, 2 = JPG, 3 = PNG)\r\n \r\n $size = getimagesize($imgPath);\r\n\t\t$arr=explode(\".\",$imgPath);\t\t\r\n // break and return false if failed to read image infos\r\n if(!$size){\r\n if($verbose && !$directOutput)echo \"<br />Not able to read image infos.<br />\";\r\n return false;\r\n }\r\n\r\n // relation: width/height\r\n $relation = $size[0]/$size[1];\r\n\t \r\n\t $relation_original = $relation;\r\n \r\n \r\n // maximal size (if parameter == false, no resizing will be made)\r\n $maxSize = array($maxWidth?$maxWidth:$size[0],$maxHeight?$maxHeight:$size[1]);\r\n // declaring array for new size (initial value = original size)\r\n $newSize = $size;\r\n // width/height relation\r\n $relation = array($size[1]/$size[0], $size[0]/$size[1]);\r\n\r\n\r\n\tif(($newSize[0] > $maxWidth))\r\n\t{\r\n\t\t$newSize[0]=$maxSize[0];\r\n\t\t$newSize[1]=$newSize[0]*$relation[0];\r\n\t\t/*if($newSize[1]>180)\r\n\t\t{\r\n\t\t\t$newSize[1]=180;\r\n\t\t\t$newSize[1]=$newSize[0]*$relation[0];\r\n\t\t}*/\r\n\t\t\r\n\t\r\n\t\t$newSize[0]=$maxWidth;\r\n\t\t$newSize[1]=$newSize[0]*$relation[0];\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\t\t$newSize[0]=$maxWidth;\r\n\t\t$newSize[1]=$newSize[0]*$relation[0];\t\r\n\t\r\n\t\t \r\n\t\r\n\t/*\r\n\tif(($newSize[1] > $maxHeight))\r\n\t{\r\n\t\t$newSize[1]=$maxSize[1];\r\n\t\t$newSize[0]=$newSize[1]*$relation[1];\r\n\t}\r\n\t*/\r\n // create image\r\n\r\n switch($size[2])\r\n {\r\n case 1:\r\n if(function_exists(\"imagecreatefromgif\"))\r\n {\r\n $originalImage = imagecreatefromgif($imgPath);\r\n }else{\r\n if($verbose && !$directOutput)echo \"<br />No GIF support in this php installation, sorry.<br />\";\r\n return false;\r\n }\r\n break;\r\n case 2: $originalImage = imagecreatefromjpeg($imgPath); break;\r\n case 3: $originalImage = imagecreatefrompng($imgPath); break;\r\n default:\r\n if($verbose && !$directOutput)echo \"<br />No valid image type.<br />\";\r\n return false;\r\n }\r\n\r\n\r\n // create new image\r\n\r\n $resizedImage = imagecreatetruecolor($newSize[0], $newSize[1]); \r\n\r\n imagecopyresampled($resizedImage, $originalImage,0, 0, 0, 0,$newSize[0], $newSize[1], $size[0], $size[1]);\r\n\r\n\t$rz=$imgPath;\r\n\r\n // output or save\r\n if($directOutput)\r\n\t\t{\r\n imagejpeg($resizedImage);\r\n\t\t }\r\n\t\t else\r\n\t\t{\r\n\t\t\t\r\n\t\t\t $rz=preg_replace(\"/\\.([a-zA-Z]{3,4})$/\",\"\".$imageType.\".\".$arr[count($arr)-1],$imgPath);\r\n \t\timagejpeg($resizedImage, $rz, $quality);\r\n }\r\n // return true if successfull\r\n return $rz;\r\n}", "title": "" }, { "docid": "19fd0bfaeac4604920a3afc8e495348c", "score": "0.60199386", "text": "protected function createThumbnail()\n {\n \n $filename = $this->generateFilename();\n\n if(!$this->isInThumbnailsDir($filename))\n { \n $image = WideImage::load($this->image->getPath());\n\n $image = $image->resize($this->thumbnail['width'], $this->thumbnail['height'], $this->thumbnail['method']);\n\n $image->saveToFile($this->image->getThumbnailsDir().'/'.$filename);\n }\n\n return $filename;\n }", "title": "" }, { "docid": "1527dd75477c1076c5407ea11fa7069a", "score": "0.60120773", "text": "function do_some_image($img) {\n\n\t\t$file = $img['root_path'] . $img['basename'];\n\t\t$width = $img['out_width'];\n\t\t$height = $img['out_height'];\n\t\t$crop = $img['crop'];\n\t\t$proportional = $img['proportional'];\n\t\t$output = $img['cache_path'] . $img['out_name'];\n\n\t\t$quality = (!$this->EE->TMPL->fetch_param('quality')) ? '100' : $this->EE->TMPL->fetch_param('quality');\n\t\t$quality = \"100\";\n\t\t$greyscale = (!$this->EE->TMPL->fetch_param('greyscale')) ? '' : $this->EE->TMPL->fetch_param('greyscale');\n\n\t\tif ($height <= 0 && $width <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$info = getimagesize($file);\n\t\t$image = '';\n\n\t\t$final_width = 0;\n\t\t$final_height = 0;\n\t\tlist($width_old, $height_old) = $info;\n\n\t\tif ($proportional) {\n\t\t\tif ($width == 0) {\n\t\t\t\t$factor = $height / $height_old;\n\t\t\t} elseif ($height == 0) {\n\t\t\t\t$factor = $width / $width_old;\n\t\t\t} else {\n\t\t\t\t$factor = min($width / $width_old, $height / $height_old);\n\t\t\t}\n\n\t\t\t$final_width = round($width_old * $factor);\n\t\t\t$final_height = round($height_old * $factor);\n\n\t\t} else {\n\t\t\t$final_width = ($width <= 0) ? $width_old : $width;\n\t\t\t$final_height = ($height <= 0) ? $height_old : $height;\n\t\t}\n\n\t\tif ($crop) {\n\n\t\t\t$int_width = 0;\n\t\t\t$int_height = 0;\n\n\t\t\t$adjusted_height = $final_height;\n\t\t\t$adjusted_width = $final_width;\n\n\t\t\t$wm = $width_old / $width;\n\t\t\t$hm = $height_old / $height;\n\t\t\t$h_height = $height / 2;\n\t\t\t$w_height = $width / 2;\n\n\t\t\t$ratio = $width / $height;\n\t\t\t$old_img_ratio = $width_old / $height_old;\n\n\t\t\tif ($old_img_ratio > $ratio) {\n\t\t\t\t$adjusted_width = $width_old / $hm;\n\t\t\t\t$half_width = $adjusted_width / 2;\n\t\t\t\t$int_width = $half_width - $w_height;\n\t\t\t} else if ($old_img_ratio <= $ratio) {\n\t\t\t\t$adjusted_height = $height_old / $wm;\n\t\t\t\t$half_height = $adjusted_height / 2;\n\t\t\t\t$int_height = $half_height - $h_height;\n\t\t\t}\n\t\t}\n\n\t\tif ($img['do_cache']) {\n\n\t\t\tswitch (\n\t\t\t\t\t$info[2]) {\n\t\t\t\tcase IMAGETYPE_GIF:\n\t\t\t\t\t$image = imagecreatefromgif($file);\n\t\t\t\t\tbreak;\n\t\t\t\tcase IMAGETYPE_JPEG:\n\t\t\t\t\t$image = imagecreatefromjpeg($file);\n\t\t\t\t\tbreak;\n\t\t\t\tcase IMAGETYPE_PNG:\n\t\t\t\t\t$image = imagecreatefrompng($file);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$image_resized = imagecreatetruecolor($final_width, $final_height);\n\n\t\t\tif (($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG)) {\n\t\t\t\t$trnprt_indx = imagecolortransparent($image);\n\n\t\t\t\t// If we have a specific transparent color\n\t\t\t\tif ($trnprt_indx >= 0) {\n\n\t\t\t\t\t// Get the original image's transparent color's RGB values\n\t\t\t\t\t$trnprt_color = imagecolorsforindex($image, $trnprt_indx);\n\n\t\t\t\t\t// Allocate the same color in the new image resource\n\t\t\t\t\t$trnprt_indx = imagecolorallocate($image_resized, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);\n\n\t\t\t\t\t// Completely fill the background of the new image with allocated color.\n\t\t\t\t\timagefill($image_resized, 0, 0, $trnprt_indx);\n\n\t\t\t\t\t// Set the background color for new image to transparent\n\t\t\t\t\timagecolortransparent($image_resized, $trnprt_indx);\n\n\t\t\t\t}\n\t\t\t\t// Always make a transparent background color for PNGs that don't have one allocated already\n\t\t\t\telseif ($info[2] == IMAGETYPE_PNG) {\n\n\t\t\t\t\t// Turn off transparency blending (temporarily)\n\t\t\t\t\timagealphablending($image_resized, false);\n\n\t\t\t\t\t// Create a new transparent color for image\n\t\t\t\t\t$color = imagecolorallocatealpha($image_resized, 0, 0, 0, 127);\n\n\t\t\t\t\t// Completely fill the background of the new image with allocated color.\n\t\t\t\t\timagefill($image_resized, 0, 0, $color);\n\n\t\t\t\t\t// Restore transparency blending\n\t\t\t\t\timagesavealpha($image_resized, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($crop) {\n\t\t\t\timagecopyresampled($image_resized, $image, -$int_width, -$int_height, 0, 0, $adjusted_width, $adjusted_height, $width_old, $height_old);\n\t\t\t} else {\n\t\t\t\timagecopyresampled($image_resized, $image, 0, 0, 0, 0, $final_width, $final_height, $width_old, $height_old);\n\t\t\t}\n\n\t\t\tif ($greyscale) {\n\t\t\t\tfor ($c = 0; $c < 256; $c++) {\n\t\t\t\t\t$palette[$c] = imagecolorallocate($image_resized, $c, $c, $c);\n\t\t\t\t}\n\n\t\t\t\tfor ($y = 0; $y < $final_height; $y++) {\n\t\t\t\t\tfor ($x = 0; $x < $final_width; $x++) {\n\t\t\t\t\t\t$rgb = imagecolorat($image_resized, $x, $y);\n\t\t\t\t\t\t$r = ($rgb >> 16) & 0xFF;\n\t\t\t\t\t\t$g = ($rgb >> 8) & 0xFF;\n\t\t\t\t\t\t$b = $rgb & 0xFF;\n\t\t\t\t\t\t$gs = $this->yiq($r, $g, $b);\n\t\t\t\t\t\timagesetpixel($image_resized, $x, $y, $palette[$gs]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch ($info[2]) {\n\t\t\t\tcase IMAGETYPE_GIF:\n\t\t\t\t\timagegif($image_resized, $output);\n\t\t\t\t\tbreak;\n\t\t\t\tcase IMAGETYPE_JPEG:\n\t\t\t\t\timagejpeg($image_resized, $output, $quality);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase IMAGETYPE_PNG:\n\t\t\t\t\timagepng($image_resized, $output);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$img['out_width'] = $final_width;\n\t\t$img['out_height'] = $final_height;\n\n\t\treturn $img;\n\n\t}", "title": "" }, { "docid": "412e7d80094723498dd72058f66b83e0", "score": "0.6008863", "text": "function img_resize_png($in_img_file, $out_img_file, $req_width, $req_height) {\n // Get image file details\n $details = getimagesize($in_img_file);\n if ($details !== false) {\n $width = $details[0];\n $height = $details[1];\n //keep aspect ratio while resizing and set the new width and height in their respective variables\n $source_aspect_ratio = $width / $height;\n $thumbnail_aspect_ratio = $req_width / $req_height;\n if ($width <= $req_width && $height <= $req_height) {\n $new_width = $width;\n $new_height = $height;\n }elseif ($thumbnail_aspect_ratio > $source_aspect_ratio) {\n $new_width = (int) ($req_height * $source_aspect_ratio);\n $new_height = $req_height;\n } else {\n $new_width = $req_width;\n $new_height = (int) ($req_width / $source_aspect_ratio);\n }\n //create a new canvas, resize image and save in the folder passed as an argument \n $new = imagecreatetruecolor($new_width, $new_height);\n imagealphablending($new, false);\n imagesavealpha($new, true);\n $src = imagecreatefrompng($in_img_file);\n imagecopyresampled($new, $src, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n imagepng($new, $out_img_file, 9);\n imagedestroy($src);\n imagedestroy($new);\n return true;\n }else {\n return false;\n }\n}", "title": "" }, { "docid": "6c3e847a6af28e216990ca2fcf044f27", "score": "0.60075283", "text": "function do_thumbResize($filename,$newfilename,$width,$height,$quality)\n{\n$max_height = $height;\n//header(\"Content-type: image/jpeg\");\n$size = getimagesize($filename); // Read the size\n$img_width = $size[0];\n$img_height = $size[1];\n\n//$y_ratio = $max_height / $height;\t \n\nif ($img_width==$img_height){\n$new_h=$new_w=$width;\n}else if($img_width>$img_height){\n\n$ratio = $img_height/$height;\t\n$new_h=$height;\n$new_w=$img_width/$ratio;\n\nif ($new_w<$width){\n//$new_h=$new_h+10;\n//$new_w=$new_w+10;\n$ratio = $img_width/$width ;\t\n$new_h=$img_height/$ratio;\n$new_w=$width;\n}\n\n}else{\n\n$ratio = $img_width/$width ;\t\n$new_h=$img_height/$ratio;\n$new_w=$width;\n}\n\n//echo(\"original \".$img_width.\",\".$img_height.\" new \".$new_w.\",\".$new_h.\" ratio \".$ratio);\ncopyfile($filename,$newfilename);\n // Create the new image!\n $src = imagecreatefromjpeg($newfilename);\n $dst = imagecreatetruecolor($new_w, $new_h);\n\timagecopyresampled($dst, $src, 0, 0, 0, 0, $new_w, $new_h, $img_width, $img_height);\n // imagejpeg($dst);\n\t imagejpeg ($dst , $newfilename , $quality);\n}", "title": "" }, { "docid": "922e174cc1d104c7055b5dc4c6d20af2", "score": "0.6005732", "text": "function resize($width, $height){\n list($w, $h) = getimagesize($_FILES['image']['tmp_name']);\n /* calculate new image size with ratio */\n $ratio = max($width/$w, $height/$h);\n $h = ceil($height / $ratio);\n $x = ($w - $width / $ratio) / 2;\n $w = ceil($width / $ratio);\n $rand = time();\n /* new file name */\n $imgn = $rand.'_'.$height.'_'.$_FILES['image']['name'];\n //$path = 'uploads/'.$rand.'_'.$height.'_'.$_FILES['image']['name'];\n //$path = \"../../../mi/csm/\";\n $path = \"../images/\";\n /* read binary data from image file */\n $imgString = file_get_contents($_FILES['image']['tmp_name']);\n /* create image from string */\n $image = imagecreatefromstring($imgString);\n $tmp = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp, $image,\n 0, 0,\n $x, 0,\n $width, $height,\n $w, $h);\n /* Save image */\n switch ($_FILES['image']['type']) {\n case 'image/jpeg':\n imagejpeg($tmp, $path.$imgn, 100);\n break;\n case 'image/png':\n imagepng($tmp, $path.$imgn, 0);\n break;\n case 'image/gif':\n imagegif($tmp, $path.$imgn);\n break;\n default:\n exit;\n break;\n }\n //return $path.$imgn;\n return $imgn;\n /* cleanup memory */\n imagedestroy($image);\n imagedestroy($tmp);\n}", "title": "" }, { "docid": "8a84cb5c6364ba4441646790751fdb87", "score": "0.6001024", "text": "public function saveImage($filename){\n\t\t$finfo = new finfo(FILEINFO_MIME_TYPE);\n\t\t$mime = $finfo->file($filename);\n\n\t\t//List of acceptable file types\n\t\t$extensions = [\n\t\t\t'image/jpg' => '.jpg',\n\t\t\t'image/jpeg' => '.jpeg',\n\t\t\t'image/png' => '.png',\n\t\t\t'image/gif' => '.gif'\n\t\t];\n\n\t\t//If an extention is set and is in the valid extensions then that is ok\n\t\t//If not make extension .jpg\n\t\tif(isset($extensions[$mime])){\n\t\t\t$extension = $extensions[$mime];\n\t\t} else {\n\t\t\t$extension = '.jpg';\n\t\t}\n\n\t\t//Give the image a unique name\n\t\t$newFileName = uniqid() . $extension;\n\n\t\t//On mac, make sure you set all folders that will be getting the images to read and write permissions\n\n\t\t//Point to the image folder\n\t\t//Check to see if Orginals folder exsists\n\t\t//If not create one\n\t\t$folder = \"./images/originals\";\n\t\tif(! is_dir($folder)){\n\t\t\tmkdir($folder, 0777, true);\n\t\t}\n\t\t//Move the image to that folder\n\t\t$destination = $folder . \"/\" . $newFileName;\n\t\tmove_uploaded_file($filename, $destination);\n\n\n\t\t//Moves the first image then we can manipulate it again\n\n\t\t//If Thumbnail folder doesnt exsist\n\t\tif(! is_dir(\"./images/thumbnails\")){\n\t\t\tmkdir(\"./images/thumbnails/\", 0777, true);\n\t\t}\n\n\n\t\t//Make an instance of Image Intervention\n\t\t$img = Image::make($destination);\n\t\t$img->resize(null, 300, function($constraint){\n\t\t\t$constraint->aspectRatio();\n\t\t});\n\t\t$img->save(\"./images/thumbnails/\" . $newFileName);\n\n\t\t//Save the filename in database\n\t\t$this->image = $newFileName;\n\n\n\t}", "title": "" }, { "docid": "4acc9f68487fd6caf74a170686852b62", "score": "0.6000328", "text": "static function resize($sourcePath,$width,$height)\n\t {\n\t \t $file_name = basename($sourcePath);\n\t \t $time=md5(strftime(\"%Y-%m-%d %H:%M:%S\",time()));\n \t $tmp_path = $sourcePath.\"_\". $time;\n \t \n \t $width-=1;\n \t $height-=1;\n \t \n \t $dest= $_SERVER['DOCUMENT_ROOT'].\"/upload/user_photos/\".md5($time.$_SESSION['user_id'].$width).\"_.jpg\";\n \t // $cmd= \"convert $sourcePath -resize ${width}x$height $tmp_path\";\n \t $cmd= \"convert $sourcePath -resize ${width}x$height $dest\";\n passthru($cmd);\n \n return $dest;\n\t }", "title": "" }, { "docid": "39403c8ce1be0ed3162becbf45f3e940", "score": "0.5999019", "text": "function saveThumb($fileName)\n\t{\n\t\t$config['image_library'] = 'gd2';\n\t\t$config['source_image']\t= $this->imgFolder.$fileName;\n\t\t$config['create_thumb'] = TRUE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\t$config['width']\t = 75;\n\t\t$config['height']\t= 50;\n\t\t$config['quality']\t= '50%';\n\t\t$config['thumb_marker'] = false;\n\t\t$config['new_image']\t= $this->imgFolder.'thumbs/';\n\t\t\n\t\t\n\t\t//$this->load->library('image_lib', $config);\n\t\t$this->image_lib->initialize($config);\n\t\t\n\t\treturn $this->image_lib->resize();\n\t}", "title": "" }, { "docid": "1c85e274b62c68ba300b9b7735957a17", "score": "0.59981847", "text": "function getResizedName($fullpathfile, $width, $height, $mkDir = TRUE)\r\n\t{\r\n\t\t$path_parts = pathinfo($fullpathfile);\r\n\r\n\t\t$thumbnail = $this->config['resized_prefix'].\"_{$width}x{$height}_{$path_parts['basename']}\";\r\n\r\n\t\tif( strlen(trim($this->config['resized_dir'])) == 0 || $this->config['safe_mode'] == true )\r\n\t\t{\r\n\t\t\tReturn Files::makeFile($path_parts['dirname'],$thumbnail);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$path = Files::makePath($path_parts['dirname'],$this->config['resized_dir']);\r\n\t\t\tif($mkDir && !is_dir($path))\r\n\t\t\t\tFiles::createFolder($path);\r\n\t\t\tReturn Files::makeFile($path,$thumbnail);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "98d7f825d33751675d67e908f5ec957c", "score": "0.59947735", "text": "public function create(string $srcPath, string $filename, int $newWidth): void\n {\n $img = new Imagick($srcPath);\n $img->thumbnailImage($newWidth, $newWidth, true);\n file_put_contents($filename, $img); // works, or:\n }", "title": "" }, { "docid": "e1c522e1987f74e7cc86093f6c8efd67", "score": "0.5978508", "text": "function ull_image_resize($path, $options)\n{\n $image = new sfImage($path, 'image/jpg');\n \n $width = (isset($options['width'])) ? $options['width'] : 0;\n $height = (isset($options['height'])) ? $options['height'] : 0;\n \n // Preserve aspect ration when giving both width and height\n if ($width && $height)\n {\n if (($image->getWidth() / $width) > ($image->getHeight() / $height))\n {\n $height = 0;\n }\n else\n {\n $width = 0;\n } \n }\n \n //Not jpg necessarly. Just a mandatory sfImage option\n $image->resize($width, $height);\n \n $newPath = ull_image_resize_build_filename($path, $options);\n \n $dir = dirname($newPath);\n \n if (!file_exists($dir))\n {\n mkdir($dir, 0777);\n }\n \n $image->saveAs($newPath);\n \n return $newPath;\n}", "title": "" }, { "docid": "e13d3578fbdc3af8bda85962a714e9e4", "score": "0.5965633", "text": "private function saveImagickPreview(&$im, $filepath, $format, $w, $h)\n\t{\n\t\t$im->setImageFormat($format);\n\t\t$im->thumbnailImage($w, $h);\n\t\t$im->writeImage($filepath);\n\t\t$im->clear();\n\t\t$im->destroy();\n\t}", "title": "" }, { "docid": "8065a1c13921df2d8060e8c1c2243ad7", "score": "0.59644586", "text": "private function _resize($size = array(), $imagePath='', $thumbPath='' ,$image=''){\n $this->Image->set_paths($imagePath, $thumbPath);\n $this->Image->width = $size[0];\n $this->Image->height = $size[1];\n $thumb = $this->Image->thumb($imagePath . $image);\n rename($thumb, $thumbPath . $image); \n \n }", "title": "" }, { "docid": "843aaae8598785e55d5716fae1e48c2d", "score": "0.59644055", "text": "public function resize($filename, $width, $height) {\n\n if (!file_exists(DIR_MEDIA_UPLOAD . $filename) || !is_file(DIR_MEDIA_UPLOAD . $filename)) {\n\n return;\n\n }\n\n $info = pathinfo($filename);\n $extension = $info['extension'];\n\n $old_image = $filename;\n\n $new_image = utf8_substr($filename, 0, utf8_strrpos($filename, '.')) . '-' . $width . 'x' . $height . '.' . $extension;\n\n $image_cache = DIR_MEDIA_CACHE . $new_image;\n\n // echo '<br>image_c='.$image_cache;\n\n if (!file_exists($image_cache) || (filemtime(DIR_MEDIA_UPLOAD . $old_image) > filemtime($image_cache))) {\n\n $path = '';\n\n $directories = explode('/', dirname($new_image));\n\n //echo dirname( $new_image);pr($directories);\n\n foreach ($directories as $directory) {\n\n $path = $path . '/' . $directory;\n\n\n\n if (!file_exists(DIR_MEDIA_CACHE . $path)) {\n\n @mkdir(DIR_MEDIA_CACHE . $path, 0777);\n\n }\n\n }\n\n $config = array();\n\n $config['image_library'] = 'gd2';\n\n $config['source_image'] = DIR_MEDIA_UPLOAD . $old_image;\n\n $config['new_image'] = $image_cache;\n\n $config['width'] = $width;\n\n $config['height'] = $height;\n\n $config['maintain_ratio'] = FALSE;\n\n $obj = 'image_lib_' . random_string('unique');\n\n $this->load->library('image_lib', $config, $obj);\n\n $this->$obj->resize();\n\n }\n\n return HTTP_MEDIA_CACHE . $new_image;\n\n }", "title": "" }, { "docid": "f778d76a8a74da289d36d6c816e0b0ea", "score": "0.5956082", "text": "static public function creat_thumbail($img,$x,$y)\n {\n $path_parts = pathinfo($img);\n $path = $path_parts['dirname'];\n $image = new Image($img);\n $imgname = md5($img).$x.\"X\".$y;\n if(!file_exists($path.SLASH.$imgname.'.png')){\n $image->resize($x,$y,'corp');\n $image->save($imgname, $path,'png');\n \n }\n \n return $path.SLASH.$imgname.'.png';\n \n \n }", "title": "" }, { "docid": "ec87cb08775e6babd81fd012863b963e", "score": "0.5942578", "text": "function imageResize($file,$width,$height) {\n $targetWidth =500;\n $targetHeight =400;\n\n if($width > $height && $targetHeight < $height){\n $targetHeight = $height / ($width / $targetWidth);\n } else if ($width < $height && $targetWidth < $width) {\n $targetWidth = $width / ($height / $targetHeight); \n } else {\n $newwidth = $width;\n $newheight = $height;\n }\n $targetLayer=imagecreatetruecolor($targetWidth,$targetHeight);\n imagecopyresampled($targetLayer,$file,0,0,0,0,$targetWidth,$targetHeight, $width,$height);\n return $targetLayer;\n}", "title": "" }, { "docid": "12f3982edeea616e7785f43224a5cf0e", "score": "0.5938156", "text": "function buat_thumbnail($file_src,$file_dst) {\n\t\tlist($w_src,$h_src,$type) = getImageSize($file_src);\n\t\n\t\tswitch ($type) {\n\t\tcase 1://gif -->jpg\n\t\t\t$img_src = imagecreatefromgif($file_src);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$img_src =imagecreatefromjpeg($file_src);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$img_src = imagecreatefrompng($file_src);\n\t\t\tbreak;\n\t\t}\n\t\t$thumb = 100;\n\t\t\tif ($w_src > $h_src) {\n\t\t\t$w_dst = $thumb;\n\t\t\t$h_dst = round($thumb / $w_src * $h_src);\n\t\t}else {\n\t\t\t$w_dst = round($thumb / $h_src * $w_src );\n\t\t\t$h_dst = $thumb;\n\t\t}\n\t\t\n\t\t$img_dst = imagecreatetruecolor($w_dst,$h_dst);\n\t\n\t\timagecopyresampled($img_dst, $img_src, 0,0,0,0,\n\t\t\t$w_dst,$h_dst,$w_src,$h_src);\n\t\t\timagejpeg($img_dst, $file_dst);\n\t\t\n\t\t\timagedestroy($img_src);\n\t\t\timagedestroy($img_dst);\n\t}", "title": "" }, { "docid": "263283a6c31ede08cd82d74abe436cbc", "score": "0.59366894", "text": "function createSizes($maintainAspect = true){\n\t\t//exec(\"convert -resize 500x300 input.jpg -background black -gravity center -extent 500x300 output.jpg\");\n\n\t\t//Convert for Single Page\n\t\t$origPath = \"uploads/\" . $this->image;\n\t\t$path = \"uploads/images/big/\" . $this->image;\n\t\t$size = \"770x400\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\t\t\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\t//Convert to long\n\t\t$path = \"uploads/images/long/\" . $this->image;\n\t\t$size = \"375x464\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\t\t\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\t//Convert for Thumbnail\n\t\t$path = \"uploads/images/thumb/\" . $this->image;\n\t\t$size = \"320x176\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\t//Convert for Small\n\t\t$path = \"uploads/images/small/\" . $this->image;\n\t\t$size = \"345x265\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\t//Convert for NewsRoom\n\t\t$path = \"uploads/images/newsroom/\" . $this->image;\n\t\t$size = \"770x245\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\t//Convert for Device\n\t\t$path = \"uploads/images/device/\" . $this->image;\n\t\t$size = \"640x480\";\n\t\t$cmd = \"convert -resize \" . $size . \" \" . $origPath . \" -background black -gravity center -extent \" . $size . \" \" . $path;\n\t\texec($cmd);\n\t\t$cmd = \"composite -dissolve 50% -gravity northeast assets/images/MojoScribe_logo.png \".$path.\" \" . $path;\n\t\texec($cmd);\n\n\t\treturn array(\n\t\t\t\t'small' => \"uploads/images/small/\" . $this->image,\n\t\t\t\t'thumb' => \"uploads/images/thumb/\" . $this->image,\n\t\t\t\t'long' => \"uploads/images/long/\" . $this->image,\n\t\t\t\t'newsroom' => \"uploads/images/newsroom/\" . $this->image,\n\t\t\t\t'big' => \"uploads/images/big/\" . $this->image,\n\t\t\t\t'device'=>\"uploads/images/device/\".$this->image\n\t\t\t);\n\t}", "title": "" }, { "docid": "3e1481db8108d9a403c74a7fc89e056f", "score": "0.59329367", "text": "function printImage($width, $height) {\n global $width_original, $height_original, $target_file;\n\n echo \"<center><font color=\\\"red\\\">Note: Some images are too large, so they get \n truncated. Click on images to show full size, double click to restore to \n original size!</font> <br><br><img src= \\\"$target_file\\\" alt=\\\"image\\\" \n width=\\\"$width\\\" height=\\\"$height\\\" style=\\\"cursor:pointer;cursor:hand\\\" \n\tonclick=\\\"this.src='$target_file'; this.height='$height_original'; \n\tthis.width='$width_original'\\\" ondblclick=\\\"this.src='$target_file';\n\tthis.height='$height';this.width='$width'\\\" /></center>\";\n}", "title": "" }, { "docid": "87a57d7e16fdc8d586118d2a7dbd9787", "score": "0.5932064", "text": "public static function getresizedimage($name,$size=null){\r\n \r\n if(\\Yii::$app->params['islive'] == 0){\r\n $filepath = 'https://farmeruncle.com/images/';\r\n } else{\r\n $filepath = Yii::$app->params['frontendUrl'].'images/';\r\n }\r\n if(!empty($name)){\r\n if(!empty($size)){\r\n \r\n $_img_extn = explode('.', $name);\r\n if($size == '60')\r\n return $filepath.'thumb_60/'.$_img_extn[0].'_x60.'.$_img_extn[1];\r\n else if($size=='480')\r\n return $filepath.'thumb_480/'.$_img_extn[0].'_x480.'.$_img_extn[1];\r\n else if($size=='600')\r\n return $filepath.'thumb_600/'.$_img_extn[0].'_x600.'.$_img_extn[1];\r\n else if($size=='300')\r\n return $filepath.'thumb_300/'.$_img_extn[0].'_x300.'.$_img_extn[1];\r\n else\r\n return $filepath.'original/'.$name;\r\n }else{\r\n return $filepath.'original/'.$name;\r\n }\r\n }\r\n else{\r\n return $filepath.'images/default-cover.jpg';\r\n }\r\n }", "title": "" }, { "docid": "3c0da547499d22d5bfe6ac058a96a1a9", "score": "0.5929899", "text": "function resize_main($src_file){\n\t\t\n\t\t$ezrparams = JComponentHelper::getParams ('com_ezrealty');\n\t\n\t\t$imagetype = array( 1 => 'GIF', 2 => 'JPG', 3 => 'PNG');\n\t\t$imginfo = getimagesize($src_file);\n\t\n\t\tif ($imginfo == null) die(\"ERROR: Source file not found!\");\n\t\n\t\t$imginfo[2] = $imagetype[$imginfo[2]];\n\t\n\t\t// height/width\n\t\t$srcWidth = $imginfo[0];\n\t\t$srcHeight = $imginfo[1];\n\t\n\t\t// Set a maximum height and width\n\t\t$width = $ezrparams->get( 'er_maxwidth') ;\n\t\t$height = $ezrparams->get( 'er_maxheight') ;\n\t\n\t\n\t\tif ($srcWidth > $width OR $srcHeight > $height) {\n\t\n\t\n\t\t\t// Get new dimensions\n\t\t\tlist($width_orig, $height_orig) = getimagesize($src_file);\n\t\n\t\t\t$ratio_orig = $width_orig/$height_orig;\n\t\n\t\t\tif ($width/$height > $ratio_orig) {\n\t\t\t\t$width = $height*$ratio_orig;\n\t\t\t} else {\n\t\t\t\t$height = $width/$ratio_orig;\n\t\t\t}\n\t\n\t\t\t// Resample\n\t\t\t$image_p = imagecreatetruecolor($width, $height);\n\t\n\t\t\tif ($imginfo[2] == 'JPG')\n\t\t\t$image = imagecreatefromjpeg($src_file);\n\t\t\tif ($imginfo[2] == 'GIF')\n\t\t\t$image = imagecreatefromgif($src_file);\n\t\t\tif ($imginfo[2] == 'PNG')\n\t\t\t$image = imagecreatefrompng($src_file);\n\t\n\t\t\t$withSampling = true;\n\t\n\t\t\t// Resize\n\t\t\tif($withSampling)\n\t\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\t\t\telse\n\t\t\timagecopyresized($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\t\n\t\t\t// Output\n\t\t\tif(imagejpeg($image_p, $src_file, $ezrparams->get( 'er_thumbquality') )) {\n\t\t\t\treturn 1;\n\t\t\t} else if(imagegif($image_p, $src_file, $ezrparams->get( 'er_thumbquality') )) {\n\t\t\t\treturn 1;\n\t\t\t} else if(imagepng($image_p, $src_file, $ezrparams->get( 'er_thumbquality') )) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "090f08b17d70232af3ba0d289c05b8e1", "score": "0.59163237", "text": "function reviews_createthumb($name,$root, $path, $savepath, $new_w=100, $new_h=100, $quality=80){\r\n\r\n //$savefile = $path.$savepath.$new_w.\"x\".$new_h.\"_\".$name;\r\n $savefile = $path.$savepath.$name;\r\n $savepath = $root.$savefile;\r\n\r\n if(!file_exists($savepath)){\r\n\r\n // Get image location\r\n $image_path = $root.$path .\"/\".$name;\r\n //echo \"$image_path\";\r\n // Load image\r\n $img = null;\r\n //$ext = end(explode('.', $image_path));\r\n $extention = get_ext($image_path);\r\n if ($extention == 'jpg' || $extention == 'jpeg') {\r\n if (!function_exists('imagecreatefromjpeg'))\r\n {\r\n redirect_header('index.php',2,_MD_NO_GD_FOUND);\r\n }//End if\r\n $img = @imagecreatefromjpeg($image_path);\r\n } else if ($extention == 'png') {\r\n $img = @imagecreatefrompng($image_path);\r\n // Only if your version of GD includes GIF support\r\n } else if ($extention == 'gif') {\r\n $img = @imagecreatefrompng($image_path);\r\n }\r\n // If an image was successfully loaded, test the image for size\r\n if ($img) {\r\n\r\n // Get image size and scale ratio\r\n $width = imagesx($img);\r\n $height = imagesy($img);\r\n $scale = min($new_w/$width, $new_h/$height);\r\n\r\n // If the image is larger than the max shrink it\r\n if ($scale < 1) {\r\n $new_width = floor($scale*$width);\r\n $new_height = floor($scale*$height);\r\n\r\n // Create a new temporary image\r\n //$tmp_img = imagecreatetruecolor($new_width, $new_height);\r\n if (!function_exists('imagecreatetruecolor'))\r\n {\r\n $tmp_img = @imagecreatetruecolor($new_width, $new_height);\r\n }\r\n else\r\n {\r\n $tmp_img = @imagecreate($new_width, $new_height);\r\n }//End if\r\n\r\n // Copy and resize old image into new image\r\n imagecopyresized($tmp_img, $img, 0, 0, 0, 0,\r\n $new_width, $new_height, $width, $height);\r\n imagedestroy($img);\r\n $img = $tmp_img;\r\n }\r\n }\r\n /*\r\n // Create error image if necessary\r\n if (!$img) {\r\n $img = imagecreate($new_w, $new_h);\r\n imagecolorallocate($img,0,0,0);\r\n $c = imagecolorallocate($img,70,70,70);\r\n imageline($img,0,0,$new_w,$new_h,$c2);\r\n imageline($img,$new_w,0,0,$new_h,$c2);\r\n }\r\n */\r\n\r\n // output the image as a file to the output stream\r\n //echo \"$savepath\";\r\n if ($extention == 'jpg' || $extention == 'jpeg')\r\n {\r\n Imagejpeg($img,$savepath,$quality);\r\n }//End if\r\n\r\n }\r\n return $savefile;\r\n}", "title": "" }, { "docid": "bbb826f6647db5aba31577a73445e85c", "score": "0.59064025", "text": "function createRespectThumbImage($name, $newname, $new_w, $new_h, $border=true, $base64=false)\n {\n\t\tif(file_exists($newname)){\n\t\t\t@unlink($newname);\n\t\t}\n\t\tif(!file_exists($name)){\n\t\t\treturn false;\n\t\t}\n\t\t$arr = explode(\".\",$name);\n\t\t$ext = $arr[count($arr)-1];\n\t\tif($ext==\"jpeg\" || $ext==\"jpg\" || $ext==\"JPEG\" || $ext==\"JPG\"){\n\t\t\t$transparency = false;\n\t\t\t$img = @imagecreatefromjpeg($name);\n\t\t} elseif($ext==\"png\" || $ext==\"PNG\"){\n\t\t\t$transparency = true;\n\t\t\t$img = @imagecreatefrompng($name);\n\t\t} elseif($ext==\"gif\" || $ext==\"GIF\") {\n\t\t\t$transparency = true;\n\t\t\t$img = @imagecreatefromgif($name);\n\t\t}\n\t\tif(!$img){\n\t\t\treturn false;\n\t\t}\n\t\t$old_x = imageSX($img);\n\t\t$old_y = imageSY($img);\n\t\tif($old_x < $new_w && $old_y < $new_h) {\n\t\t\t$thumb_w = $old_x;\n\t\t\t$thumb_h = $old_y;\n\t\t} elseif ($old_x > $old_y) {\n\t\t\t$thumb_w = $new_w;\n\t\t\t$thumb_h = floor(($old_y*($new_h/$old_x)));\n\t\t} elseif ($old_x < $old_y) {\n\t\t\t$thumb_w = floor($old_x*($new_w/$old_y));\n\t\t\t$thumb_h = $new_h;\n\t\t} elseif ($old_x == $old_y) { \n\t\t\t$thumb_w = $new_w;\n\t\t\t$thumb_h = $new_h;\n\t\t}\n\t\t$thumb_w = ($thumb_w<1) ? 1 : $thumb_w;\n\t\t$thumb_h = ($thumb_h<1) ? 1 : $thumb_h;\n\t\t$new_img = ImageCreateTrueColor($thumb_w, $thumb_h);\n\t\tif($transparency) {\n\t\t\tif($ext==\"png\" || $ext==\"PNG\") {\n\t\t\t\timagealphablending($new_img, false);\n\t\t\t\t$colorTransparent = imagecolorallocatealpha($new_img, 0, 0, 0, 127);\n\t\t\t\timagefill($new_img, 0, 0, $colorTransparent);\n\t\t\t\timagesavealpha($new_img, true);\n\t\t\t} elseif($ext==\"gif\" || $ext==\"GIF\") {\n\t\t\t\t$trnprt_indx = imagecolortransparent($img);\n\t\t\t\tif ($trnprt_indx >= 0) {\n\t\t\t\t\t//its transparent\n\t\t\t\t\t$trnprt_color = imagecolorsforindex($img, $trnprt_indx);\n\t\t\t\t\t$trnprt_indx = imagecolorallocate($new_img, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);\n\t\t\t\t\timagefill($new_img, 0, 0, $trnprt_indx);\n\t\t\t\t\timagecolortransparent($new_img, $trnprt_indx);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tImagefill($new_img, 0, 0, imagecolorallocate($new_img, 255, 255, 255));\n\t\t}\n\t\timagecopyresampled($new_img, $img, 0,0,0,0, $thumb_w, $thumb_h, $old_x, $old_y); \n\t\tif($border) {\n\t\t\t$black = imagecolorallocate($new_img, 0, 0, 0);\n\t\t\timagerectangle($new_img,0,0, $thumb_w, $thumb_h, $black);\n\t\t}\n\t\tif($base64) {\n\t\t\tob_start();\n\t\t\timagepng($new_img);\n\t\t\t$img = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t$return = base64_encode($img);\n\t\t} else {\n\t\t\tif($ext==\"jpeg\" || $ext==\"jpg\" || $ext==\"JPEG\" || $ext==\"JPG\"){\n\t\t\t\timagejpeg($new_img, $newname);\n\t\t\t\t$return = true;\n\t\t\t} elseif($ext==\"png\" || $ext==\"PNG\"){\n\t\t\t\timagepng($new_img, $newname);\n\t\t\t\t$return = true;\n\t\t\t} elseif($ext==\"gif\" || $ext==\"GIF\") {\n\t\t\t\timagegif($new_img, $newname);\n\t\t\t\t$return = true;\n\t\t\t}\n\t\t}\n\t\timagedestroy($new_img);\n\t\timagedestroy($img);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "7c645420a50be566c5154dffde7fe23d", "score": "0.5906235", "text": "function process_image($dir, $filename) {\n $dir = $dir . DIRECTORY_SEPARATOR;\n $i = strrpos($filename, '.');\n $image_name = substr($filename, 0, $i);\n $ext = substr($filename, $i);\n\n // Set up the read path\n $image_path = $dir . DIRECTORY_SEPARATOR . $filename;\n\n // Set up the write paths\n $image_path_400 = $dir . $image_name . '_400' . $ext;\n $image_path_100 = $dir . $image_name . '_100' . $ext;\n\n // Create an image that's a maximum of 400x300 pixels\n resize_image($image_path, $image_path_400, 400, 300);\n\n // Create a thumbnail image that's a maximum of 100x100 pixels\n resize_image($image_path, $image_path_100, 100, 100);\n}", "title": "" }, { "docid": "09d476d873d282b014212e56325a1d5c", "score": "0.5904374", "text": "function resize_image($image)\n{\n // Some configuration variables !\n $localDir = $_SERVER['DOCUMENT_ROOT'].\"/images/\";\n\n $AutorisedImageType = array (\"jpg\", \"jpeg\", \"gif\", \"png\", \"tmp\");\n\n\n $ext = substr($image, strpos($image, \".\")+1, strlen($image));\n//echo \"$ext<br />\";\n if( in_array($ext, $AutorisedImageType) )\n {\n\n list($width, $height, $type, $attr) = @getimagesize( $image );\n\n $xRatio = MAXWIDTH / $width;\n $yRatio = MAXHEIGHT / $height;\n\n if ( ($width <= MAXWIDTH) && ($height <= MAXHEIGHT) )\n {\n $newWidth = $width;\n $newHeight = $height;\n }\n else if (($xRatio * $height) < MAXHEIGHT)\n {\n $newHeight = ceil($xRatio * $height);\n $newWidth = MAXWIDTH;\n }\n else\n {\n $newWidth = ceil($yRatio * $width);\n $newHeight = MAXHEIGHT;\n }\n//echo \"width=\".MAXWIDTH.\" <br />height=\".MAXHEIGHT.\" <br />img src =$image <br />width=$newWidth <br />height=$newHeight <br />attr $attr<br />\";\n }\n $newimage[width]=$newWidth;\n $newimage[height]=$newHeight;\n return($newimage);\n}", "title": "" }, { "docid": "202a6c612fd5aa67454582b65f83cbdb", "score": "0.589751", "text": "private function NewImgResize($orig_img) {\n\t\t$orig_size = getimagesize($this->file);\n\n\t\t$maxX = $this->file_out_width;\n\t\t$maxY = $this->file_out_height;\n\n\t\tif ($orig_size[0] < $orig_size[1]) {\n\t\t\t$this->file_out_width = $this->file_out_height* ($orig_size[0]/$orig_size[1]);\n\t\t\t$adjustX = ($maxX - $this->file_out_width)/2;\n\t\t\t$adjustY = 0;\n\t\t}\n\t\telse {\n\t\t\t$this->file_out_height = $this->file_out_width / ($orig_size[0]/$orig_size[1]);\n\t\t\t$adjustX = 0;\n\t\t\t$adjustY = ($maxY - $this->file_out_height)/2;\n\t\t}\n\n\t\twhile ($this->file_out_width < 1 || $this->file_out_height < 1) {\n\t\t\t$this->file_out_width*= 2;\n\t\t\t$this->file_out_height*= 2;\n\t\t}\n\n\t\t// See if we need to create an image at maximum size\n\t\tif ($this->maxSize) {\n\t\t\tif (function_exists(\"imagecreatetruecolor\")) $im_out = imagecreatetruecolor($maxX,$maxY);\n\t\t\telse $im_out = imagecreate($maxX,$maxY);\n\n\t\t\tif ($im_out) {\n\t\t\t\t// Need to image fill just in case image is transparent, don't always want black background\n\t\t\t\t$bgfill = imagecolorallocate( $im_out, $this->bg_red, $this->bg_green, $this->bg_blue );\n\n\t\t\t\tif (function_exists(\"imageAntiAlias\")) imageAntiAlias($im_out,true);\n\t\t\t\timagealphablending($im_out, false);\n\n\t\t\t\tif (function_exists(\"imagesavealpha\")) imagesavealpha($im_out,true);\n\n\t\t\t\tif (function_exists( \"imagecolorallocatealpha\")) $transparent = imagecolorallocatealpha($im_out, 255, 255, 255, 127);\n\n\t\t\t\tif (function_exists(\"imagecopyresampled\")) ImageCopyResampled($im_out, $orig_img, $adjustX, $adjustY, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]);\n\t\t\t\telse ImageCopyResized($im_out, $orig_img, $adjustX, $adjustY, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]);\n\t\t\t}\n\t\t\telse return false;\n\t\t}\n\t\telse {\n\t\t\tif (function_exists(\"imagecreatetruecolor\")) $im_out = ImageCreateTrueColor($this->file_out_width,$this->file_out_height);\n\t\t\telse $im_out = imagecreate($this->file_out_width,$this->file_out_height);\n\n\t\t\tif ($im_out) {\n\t\t\t\tif (function_exists(\"imageAntiAlias\")) imageAntiAlias($im_out,true);\n\t\t\t\timagealphablending($im_out, false);\n\n\t\t\t\tif (function_exists(\"imagesavealpha\")) imagesavealpha($im_out,true);\n\t\t\t\tif (function_exists(\"imagecolorallocatealpha\")) $transparent = imagecolorallocatealpha($im_out, 255, 255, 255, 127);\n\n\t\t\t\tif (function_exists(\"imagecopyresampled\")) ImageCopyResampled($im_out, $orig_img, 0, 0, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]);\n\t\t\t\telse ImageCopyResized($im_out, $orig_img, 0, 0, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]);\n\t\t\t}\n\t\t\telse return false;\n\t\t}\n\n\t\treturn $im_out;\n\t}", "title": "" }, { "docid": "dd9b351aa77ab9d38d4f51fafe4fac02", "score": "0.5881133", "text": "function _genThumbnail($base_path, $original_image_name)\n {\n $w = SHIN_Core::$_config['store']['thumbnails_images_width'];\n $h = SHIN_Core::$_config['store']['thumbnails_images_height'];\n\n SHIN_Core::$_libs['image']->load($base_path.$original_image_name)->resize($w, $h)->saveToFile($base_path.SHIN_Core::$_config['store']['thumbnails_prefix'].$original_image_name);\n }", "title": "" }, { "docid": "80e3b11d65dd97b0a7ef80ab4fcc9849", "score": "0.5875378", "text": "public function saveImage($path, $image_file, $image_name){\n if (!file_exists($path)) {\n\n mkdir($path,0777,true);\n\n } else {\n\n File::deleteDirectory($path,true);\n\n }\n\n $img = Image::make($image_file);\n\n $img->resize(150,150,function($constraint){\n\n $constraint->upsize();\n\n });\n\n $img->save($path . $image_name,70);\n\n }", "title": "" }, { "docid": "8845f8d58575aa70dc365e34966cbcce", "score": "0.58632207", "text": "public function example(){\n $img = Image::make('D:/image/1.jpg');\n\n // now you are able to resize the instance\n $img->resize(320, 240);\n\n // and insert a watermark for example\n $img->insert('D:/image/4.png');\n\n // finally we save the image as a new file\n $img->save('D:/image/4.jpg');\n }", "title": "" }, { "docid": "f0d8a6cde45c59fd5560464c1512ce1e", "score": "0.586168", "text": "function ReSizePhotoPNG($uploadfile = '', $file = '', $maxwidth = 0, $maxheight = 0, $imagetype = '')\n\t{\t$isize = getimagesize($uploadfile);\n\t\t$ratio = $maxwidth / $isize[0];\n\t\t$h_ratio = $maxheight / $isize[1];\n\t\tif ($h_ratio > $ratio)\n\t\t{\t$ratio = $h_ratio;\n\t\t}\n\t\tswitch ($imagetype)\n\t\t{\tcase 'png': $oldimage = imagecreatefrompng($uploadfile);\n\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'jpg':\n\t\t\tcase 'jpeg': $oldimage = imagecreatefromjpeg($uploadfile);\n\t\t\t\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif ($oldimage)\n\t\t{\t$w_new = ceil($isize[0] * $ratio);\n\t\t\t$h_new = ceil($isize[1] * $ratio);\n\t\t\t\n\t\t\tif ($ratio != 1)\n\t\t\t{\t$newimage = imagecreatetruecolor($w_new,$h_new);\n\t\t\t\tif ($imagetype == 'png')\n\t\t\t\t{\timagealphablending( $newimage, false );\n\t\t\t\t\timagesavealpha( $newimage, true );\n\t\t\t\t}\n\t\t\t\timagecopyresampled($newimage,$oldimage,0,0,0,0,$w_new, $h_new, $isize[0], $isize[1]);\n\t\t\t} else\n\t\t\t{\t$newimage = $oldimage;\n\t\t\t\tif ($imagetype == 'png')\n\t\t\t\t{\timagealphablending( $newimage, false );\n\t\t\t\t\timagesavealpha( $newimage, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// now get middle chunk - horizontally\n\t\t\tif ($w_new > $maxwidth || $h_new > $maxheight)\n\t\t\t{\t$resizeimg = imagecreatetruecolor($maxwidth,$maxheight);\n\t\t\t\tif ($imagetype == 'png')\n\t\t\t\t{\timagealphablending( $resizeimg, false );\n\t\t\t\t\timagesavealpha( $resizeimg, true );\n\t\t\t\t}\n\t\t\t\t$leftoffset = floor(($w_new - $maxwidth) / 2);\n\t\t\t\timagecopyresampled($resizeimg, $newimage,0,0,floor(($w_new - $maxwidth) / 2),floor(($h_new - $maxheight) / 2),$maxwidth, $maxheight, $maxwidth, $maxheight);\n\t\t\t\t$newimage = $resizeimg;\n\t\t\t}\n\t\t\t\n\t\t\tob_start();\n\t\t\timagepng($newimage, NULL, 3);\n\t\t\treturn file_put_contents($file, ob_get_clean());\n\t\t}\n\t}", "title": "" }, { "docid": "9bcbf0ffac5badbb910b560b6093214d", "score": "0.58599424", "text": "function resizeImage($image, $width, $height, $scale)\n {\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\n $imageType = image_type_to_mime_type($imageType);\n $newImageWidth = ceil($width * $scale);\n $newImageHeight = ceil($height * $scale);\n $newImage = imagecreatetruecolor($newImageWidth, $newImageHeight);\n switch ($imageType) {\n case \"image/gif\":\n $source = imagecreatefromgif($image);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n $source = imagecreatefromjpeg($image);\n break;\n case \"image/png\":\n case \"image/x-png\":\n $source = imagecreatefrompng($image);\n break;\n }\n imagecopyresampled($newImage, $source, 0, 0, 0, 0, $newImageWidth, $newImageHeight, $width, $height);\n\n switch ($imageType) {\n case \"image/gif\":\n imagegif($newImage, $image);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n imagejpeg($newImage, $image, 90);\n break;\n case \"image/png\":\n case \"image/x-png\":\n imagepng($newImage, $image);\n break;\n }\n\n chmod($image, 0777);\n return $image;\n }", "title": "" }, { "docid": "e478a0dbb5e43cbcaa1cc6adb3d5f2cc", "score": "0.58583826", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\r\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\r\n $imageType = image_type_to_mime_type($imageType);\r\n \r\n $newImageWidth = ceil($width * $scale);\r\n $newImageHeight = ceil($height * $scale);\r\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n $source=imagecreatefromgif($image);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n $source=imagecreatefromjpeg($image);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n $source=imagecreatefrompng($image);\r\n break;\r\n }\r\n imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n imagegif($newImage,$thumb_image_name);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n imagejpeg($newImage,$thumb_image_name,90);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n imagepng($newImage,$thumb_image_name);\r\n break;\r\n }\r\n chmod($thumb_image_name, 0777);\r\n return $thumb_image_name;\r\n }", "title": "" }, { "docid": "5ddb7c858a60c7be2875e23f795326e4", "score": "0.5857494", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$thumb_image_name); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$thumb_image_name,100); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\tbreak;\n }\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}", "title": "" }, { "docid": "1d2c9973cbba5f509b009c894b177f52", "score": "0.5854941", "text": "public function resize($width=null, $height=null, $master=Image::AUTO) {}", "title": "" }, { "docid": "4da22107b73fdd6d51fdd596e8920b32", "score": "0.5850944", "text": "function img_resize($in_img_file, $out_img_file, $req_width, $req_height) {\n // Get image file details\n $details = getimagesize($in_img_file);\n if ($details !== false) {\n $width = $details[0];\n $height = $details[1];\n //keep aspect ratio while resizing and set the new width and height in their respective variables\n $source_aspect_ratio = $width / $height;\n $thumbnail_aspect_ratio = $req_width / $req_height;\n if ($width <= $req_width && $height <= $req_height) {\n $new_width = $width;\n $new_height = $height;\n }elseif ($thumbnail_aspect_ratio > $source_aspect_ratio) {\n $new_width = (int) ($req_height * $source_aspect_ratio);\n $new_height = $req_height;\n } else {\n $new_width = $req_width;\n $new_height = (int) ($req_width / $source_aspect_ratio);\n }\n //create a new canvas, resize image and save in the folder passed as an argument \n $new = imagecreatetruecolor($new_width, $new_height);\n $src = imagecreatefromjpeg($in_img_file);\n imagecopyresampled($new, $src, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n imagejpeg($new, $out_img_file, 90);\n imagedestroy($src);\n imagedestroy($new);\n return true;\n }else {\n return false;\n }\n}", "title": "" }, { "docid": "2c939bba90067f9c12183052578bb7a3", "score": "0.5850931", "text": "public function resize($width, $height = 'auto') {\n\t\tif($width <= 0) {\n\t\t\tthrow new InvalidArgumentException('Width must be greater than 0');\t\n\t\t}\n\t\t\n\t\t// We do not make images bigger\n\t\tif($width >= $this->width) {\n\t\t\t$this->file->download(true, false);\n\t\t}\n\t\t\n\t\t// Compute new height\n\t\tif($height == 'auto' || !is_numeric($height)) {\n\t\t\t$height = $this->height / ($this->width / $width);\n\t\t}\n\t\t\n\t\t$resized = imagecreatetruecolor($width, $height);\n\t\t\n\t\t// Set transparency\n\t\t$this->setTransparency($resized, $width, $height);\n\t\t\n\t\t// Resize\n\t\timagecopyresampled($resized, $this->handle, 0, 0, 0, 0, $width, $height, $this->width, $this->height);\n\t\t\n\t\t// Output\n\t\theader('Content-Type: image/png');\n\t\timagepng($resized);\n\t\timagedestroy($resized);\n\t\texit;\n\t}", "title": "" }, { "docid": "ffdad4f6589fcfce73160dc7f040450c", "score": "0.5850156", "text": "function resizeStamp($orig,$width_max,$height_max,$rozm) {\n\n\t$in = $orig; // png\n \n\n\tif($width_max > $height_max) {\n\t\t$k_width = $width_max / $height_max;\n\t\t$k_height = 1;\n\t} elseif($height_max > $width_max) {\n\t\t$k_width = 1;\n\t\t$k_height = $height_max / $width_max;\n\t} else {\n\t\t$k_width = 1;\n\t\t$k_height = 1;\n\t}\n\t\n\tif($rozm[0] < $width_max && $rozm[1] < $height_max) {\n\t\t$width = $rozm[0];\n\t\t$height = $rozm[1];\n\t} elseif($rozm[0] / $k_width > $rozm[1] / $k_height) {\n\t\t$width = $width_max;\n\t\t$k = $rozm[0] / $width_max;\n\t\t$height = ceil($rozm[1] / $k);\n\t} elseif($rozm[0] / $k_width < $rozm[1] / $k_height) { \n \t$height = $height_max;\n\t\t$k = $rozm[1] / $height_max;\n\t\t$width = ceil($rozm[0] / $k);\n\t} else {\n\t\tif($width_max > $height_max) {\t\t\t\n\t\t\t$width = $height_max * $k_width;\n\t\t\t$height = $height_max * $k_height;\n\t\t} else {\n\t\t\t$width = $width_max * $k_width;\n\t\t\t$height = $width_max * $k_height;\t\t\t\n\t\t}\n\t\n\t}\n\n\t\n\t$out = imagecreatetruecolor($width,$height);\n\t\n\t\n\timagecopyresampled($out,$in,0,0,0,0,$width,$height,$rozm[0],$rozm[1]);\n\t\n return $out;\n}", "title": "" }, { "docid": "07d6a79aeb08e6d9b081b2f2abfba043", "score": "0.5849001", "text": "function ThumbMe($format, $image_name, $width_new, $height_new, $quality, $size){\r\n\t\t\tglobal $siteroot,$debug,$TheDayToday;\r\n\t\t\tglobal $CMSMakeImages;\r\n\t\t\t\r\n\t\t\t$loc_highres = getImgDirSession('highres');\r\n\t\t\t$loc_large = getImgDirSession('large');\r\n\t\t\t$loc_primary = getImgDirSession('primary');\r\n\t\t\t$loc_thumbs = getImgDirSession('thumbs');\r\n\r\n\t\t\t$UploadedFileDir = $loc_large;\r\n\t\t\tif($CMSMakeImages->HasHighRes()) $UploadedFileDir = $loc_highres;\r\n\t\t\t\r\n\t\t\tif($size == \"thumb\"){\r\n\t\t\t\t$loc_dynamic = $loc_thumbs;\r\n\t\t\t}elseif($size == \"primary\"){\r\n\t\t\t\t$loc_dynamic = $loc_primary;\r\n\t\t\t}elseif($size == \"highres\"){\r\n\t\t\t\t$loc_dynamic = $loc_highres;\r\n\t\t\t}else{\r\n\t\t\t\t$loc_dynamic = $loc_large;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($destimg=imageCreate($width_new, $height_new) ) {\r\n\t\t\t\t//\r\n\t\t\t} else {\r\n\t\t\t\techo '<p class=\"error\">Problem creating image. Please contact support</p>';\r\n\t\t\t}\r\n\t\t\t//$destimg=imageCreate($width_new, $height_new) or die(\"Problem creating image\");\r\n\t\t\t\t\r\n\t\t\t///////////// MAKE JPEG THUMBNAIL\r\n\t\t\tswitch($format) {\r\n\t\t\t\tcase \"jpg\":\r\n\t\t\t\t\t$debug .= '<br>$loc_large: '.$loc_large;\r\n\t\t\t\t\t$debug .= '<br>$image_name: '.$image_name;\r\n\t\t\t\t\techo $debug;\r\n\t\t\t\t\t$srcimg=ImageCreateFromJPEG($UploadedFileDir.$image_name) or die(\"problem opening source image $UploadedFileDir > $image_name\");\t\r\n\t\t\t\t\tImageCopyResized($destimg,$srcimg,0,0,0,0,$width_new,$height_new,ImageSX($srcimg),ImageSY($srcimg) ) or die(\"Problem in resizing\");\t\r\n\t\t\t\t\t//ImageJPEG($destimg,$loc_dynamic.$image_name, $quality) or die(\"Problem in saving\");\r\n\t\t\t\t\t$CMSMakeImages->MakeImage_MergeCenter($UploadedFileDir.$image_name, $loc_dynamic.$image_name, $width_new, $height_new);\r\n\t\t\t\t\tbreak;\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////// MAKE PNG THUMBNAIL\r\n\t\t\t\tcase \"png\":\r\n\t\t\t\t\t$srcimg=ImageCreateFromPNG($UploadedFileDir.$image_name) or die(\"problem opening source image $UploadedFileDir $image_name \");\t\r\n\t\t\t\t\tImageCopyResized($destimg,$srcimg,0,0,0,0,$width_new,$height_new,ImageSX($srcimg),ImageSY($srcimg) ) or die(\"Problem in resizing\");\t\r\n\t\t\t\t\tImagePNG($destimg,$loc_dynamic.$image_name, $quality) or die(\"Problem in saving\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////// MAKE PNG THUMBNAIL\r\n\t\t\t\tcase \"gif\":\r\n\t\t\t\t\t$srcimg=ImageCreateFromGIF($UploadedFileDir.$image_name) or die(\"problem opening source image $UploadedFileDir $image_name \");\t\r\n\t\t\t\t\tImageCopyResized($destimg,$srcimg,0,0,0,0,$width_new,$height_new,ImageSX($srcimg),ImageSY($srcimg) ) or die(\"Problem in resizing\");\t\r\n\t\t\t\t\tImageGIF($destimg,$loc_dynamic.$image_name) or die(\"Problem in saving\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//echo \"<HR><HR><strong>IMAGE COMPRESSION....(\".$format.\" @:\".$quality.\"%)</strong> can be found in thumbs directory<HR>\";\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "d96f798c6b2c272e8a3b0df22c34ac62", "score": "0.5847454", "text": "function resizeImage()\r\n\t{\r\n\t\t$old_x = imagesx($this->src_image);\r\n\t\t$old_y = imagesy($this->src_image);\r\n\t\t/*\r\n\t\tif($old_x > $old_y)\r\n\t\t{\r\n\t\t\t$thumb_w = $this->newWidth;\r\n\t\t\t$thumb_h = $old_y*($this->newHeight/$old_x);\r\n\t\t}\r\n\t\t\r\n\t\tif($old_x < $old_y)\r\n\t\t{\r\n\t\t\t$thumb_w = $old_x*($this->newWidth/$old_y);\r\n\t\t\t$thumb_h = $this->newHeight;\r\n\t\t}\r\n\t\t\r\n\t\t/*if($old_x == $old_y)\r\n\t\t{*/\r\n\t\t\t$thumb_w = $this->newWidth;\r\n\t\t\t$thumb_h = $this->newHeight;\r\n\t\t//}\r\n\t\t\r\n\t\t$this->dest_image = imagecreatetruecolor($thumb_w, $thumb_h);\r\n\t\timagecopyresized($this->dest_image, $this->src_image, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "fb2939f10419d16147d83195405cc13a", "score": "0.58447945", "text": "function msp_the_resized_image( $img_url = \"\", $width = null , $height = null, $crop = null , $quality = 100 ) {\n echo msp_get_the_resized_image( $img_url , $width , $height , $crop , $quality );\n}", "title": "" }, { "docid": "1515e2380ff77bcc55e80981714b3c1e", "score": "0.5844022", "text": "public function image_resize ($src='', $w=100, $h=100, $zc=2)\n\t\t{\n\t\t\t// in no image source send, return no image\n\t\t\tif( trim($src) == \"\" ){\n\t\t\t\t$src = $this->cfg['paths']['freamwork_dir_url'] . '/images/no-product-img.jpg';\n\t\t\t}\n\n\t\t\tif( is_file($this->cfg['paths']['plugin_dir_path'] . 'timthumb.php') ) {\n\t\t\t\treturn $this->cfg['paths']['plugin_dir_url'] . 'timthumb.php?src=' . $src . '&w=' . $w . '&h=' . $h . '&zc=' . $zc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c10fcd28a48b3023d34a6c545f195374", "score": "0.58439523", "text": "public function createThumbnail($path, $width, $height)\n{\n $img = Image::make($path)->resize($width, $height, function ($constraint) {\n $constraint->aspectRatio();\n });\n $img->save($path);\n}", "title": "" }, { "docid": "ba945230b4d6cd37679c5c2bffecf727", "score": "0.5837123", "text": "static function resizeImage($fileName, $constraint, $flag){\r\n\t\t//we retrieve the info from the current image\r\n\t\tlist($orig_width, $orig_height, $type) = getimagesize($fileName);\r\n\t\t$new_width\t='';\r\n\t\t$new_height\t='';\r\n\t\tif($flag == \"width\"){\r\n\t\t\tif($orig_width > $constraint){\r\n\t\t\t\t$new_height=round(( $constraint * $orig_height) / $orig_width);\r\n\t\t\t\t$new_width = $constraint;\r\n\t\t\t}else{\r\n\t\t\t\t$new_height = $orig_height;\r\n\t\t\t\t$new_width = $orig_width;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($orig_height > $constraint){\r\n\t\t\t\t$new_width=round(( $constraint * $orig_width) / $orig_height);\r\n\t\t\t\t$new_height = $constraint;\r\n\t\t\t}else{\r\n\t\t\t\t$new_height = $orig_height;\r\n\t\t\t\t$new_width = $orig_width;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\r\n\t\t//we create a new image template\r\n\t\t$image_p = imagecreatetruecolor($new_width, $new_height);\r\n\t\t//we create a variable that will hold the new image\r\n\t\t$image = null;\r\n\t\t//only the three first of all the possible formats are supported, the original image is loaded if it is one of them\r\n\t\tswitch($type){\r\n\t\t\t case 1: //GIF\r\n\t\t\t\t$image = imagecreatefromgif($fileName);\r\n\t\t\t\tbreak;\r\n\t\t\t case 2: //JPEG\r\n\t\t\t\t$image = imagecreatefromjpeg($fileName);\r\n\t\t\t\tbreak;\r\n\t\t\t case 3: //PNG\r\n\t\t\t\t$image = imagecreatefrompng($fileName);\r\n\t\t\t\tbreak;\r\n\t\t\t default;\r\n\t\t\t\treturn false;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t//we copy the resized image from the original into the new one and save the result as a jpeg \r\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $orig_width, $orig_height);\r\n\t\timagejpeg($image_p, $fileName, 100);\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "943e32270705bc5d7df1b57702fa650f", "score": "0.5832087", "text": "protected function generateFilename()\n {\n $width = 'w'.$this->thumbnail['width'];\n $height = 'h'.$this->thumbnail['height'];\n $method = 'm'.$this->thumbnail['method'];\n \n return $width.$height.$method.'f'.$this->image->getFileName();\n }", "title": "" }, { "docid": "52bc4ed403d5256571c2223df9b87cd5", "score": "0.582529", "text": "function _resize_img($config=array()) {\n ini_set('memory_limit', $this->memory_limit);\n $this->load->library('image_lib');\n $default = array(\n 'image_library' => $this->img_lib,\n 'maintain_ratio' => TRUE\n );\n $config = array_merge($default, $config);\n $this->image_lib->initialize($config);\n\n $this->_mk_dir(dirname($config['new_image']));\n $result = $this->image_lib->resize();\n\n if (!$result) echo $this->image_lib->display_errors();\n }", "title": "" }, { "docid": "a6267fd933e2fa447721e1af7809f128", "score": "0.5824942", "text": "function redimPNG($filename, $nombreDestino, $max_width, $max_height, $calidad){\n list($orig_width, $orig_height) = getimagesize($filename);\n $width = $orig_width;\n $height = $orig_height;\n # taller\n if ($height > $max_height) {\n $width = ($max_height / $height) * $width;\n $height = $max_height;\n }\n # wider\n if ($width > $max_width) {\n $height = ($max_width / $width) * $height;\n $width = $max_width;\n }\n //$image_p = imagecreate($width, $height);\n $image_p = imagecreatetruecolor($width, $height);\n $image = imagecreatefrompng($filename);\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $orig_width, $orig_height);\n imagepng($image_p, $nombreDestino, $calidad);\n return true;\n}", "title": "" }, { "docid": "1265967700289af80566bcbdcdb67eae", "score": "0.58219594", "text": "private function _pathResized($width, $height)\n {\n $extension = pathinfo($this->_path, PATHINFO_EXTENSION);\n $basename = basename($this->_path, '.' . $extension);\n return self::_path(sprintf(\"%s-%dx%d.%s\", $basename, $width, $height, $extension));\n }", "title": "" }, { "docid": "5591a9ee586ac68beed38e81a9c1d0a5", "score": "0.5811517", "text": "protected function changeImageSize($image, $fileName, $save_path, $newwidth, $newheight)\n {\n // Content type\n header('Content-Type: image/jpg');\n\n // Get new sizes\n list($width, $height) = getimagesize($image);\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n// imagealphablending($thumb, false);\n// imagesavealpha($thumb, true);\n $source = imagecreatefrompng($image);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n\n // Output\n // Print image\n $path = $_SERVER['DOCUMENT_ROOT'] . $save_path . $fileName;\n\n imagejpeg($thumb, $path);\n\n return imagedestroy($thumb);\n\n }", "title": "" }, { "docid": "3ec4990ee71bddd8fbad33149acd08e4", "score": "0.5806523", "text": "function makeThumbnail($CROP_WIDTH, $CROP_HEIGHT, $CROP_2_RESIZE_DIMENTION, $x1, $y1, $x2, $y2, $w, $h, $CROP_RELATIVE_PATH, $RESIZE_RELATIVE_PATH, $FOLDER_NAME)\n{\n $scale = $CROP_WIDTH/$w;\n $cropped = resizeThumbnailImage($CROP_RELATIVE_PATH, $RESIZE_RELATIVE_PATH,$w,$h,$x1,$y1,$scale);\n \n //resize cropped image\n if(trim($CROP_2_RESIZE_DIMENTION) != \"\")\n {\n $CROP_2_RESIZE_DIMENTION = strtoupper($CROP_2_RESIZE_DIMENTION);\n $resize_size_array = explode(\"|\", $CROP_2_RESIZE_DIMENTION);\n \n if(intval(count($resize_size_array)) > intval(0))\n {\n $thumb_width_resize_array = explode(\",\", $thumb_width_resize);\n $thumb_height_resize_array = explode(\",\", $thumb_height_resize);\n \n foreach($resize_size_array as $resize_size_result)\n {\n $resize_d_array = explode(\"X\", $resize_size_result); \n \n $RESIZE_WIDTH = intval($resize_d_array[0]);\n $RESIZE_HEIGHT = intval($resize_d_array[1]); \n /*resize images*/ \n $new_file_name = basename($CROP_RELATIVE_PATH);\n $file_type = getimagesize($CROP_RELATIVE_PATH); \n $work = new ImgResizer($CROP_RELATIVE_PATH, $file_type['mime']);\n $work->resize($RESIZE_HEIGHT,$RESIZE_WIDTH, $FOLDER_NAME . \"/B\" . $RESIZE_WIDTH . \"_\" . $new_file_name);\n \n }\n }\n }\n \n //Reload the page again to view the thumbnail\n //header(\"location:\".$_SERVER[\"PHP_SELF\"]);\n //exit();\n //echo $CROP_RELATIVE_PATH; \n}", "title": "" }, { "docid": "ad3b0d29450c55bdcada42fe1ad5cbfa", "score": "0.5806199", "text": "public function recalcSize(){\r\n $this->width = imagesx($this->stage);\r\n $this->height = imagesy($this->stage);\r\n }", "title": "" } ]
8bcf44a5245f070e2039cb2b5178ff73
/ Make sure bbpress has been activated or else selfdestruct
[ { "docid": "561445eb4e5fb451e3c2ce1def859fd9", "score": "0.5891105", "text": "public function check_dependencies() {\n // do nothing if class bbPress exists\n // if ( ! class_exists( 'bbPress' ) ) {\n // trigger_error( 'This plugin requires bbPress. Please install and activate bbPress before activating this plugin.', E_USER_ERROR );\n // }\n }", "title": "" } ]
[ { "docid": "f175bc4326aeabfe6114ae2d5c86013e", "score": "0.6653763", "text": "public function maybe_self_deactivate() {\n // if ( ! class_exists( 'bbPress' ) ) {\n // require_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n // deactivate_plugins( plugin_basename( __FILE__ ) );\n // add_action( 'admin_notices', array( $this, 'self_deactivate_notice' ) );\n // }\n }", "title": "" }, { "docid": "034bfa18e6c60660d56572290a4d1b13", "score": "0.6409301", "text": "public function activation_hook() {\n\t\t$this->cleanup();\n\t}", "title": "" }, { "docid": "5739205fe66bded54b677bd41d27e22f", "score": "0.62698245", "text": "function bum_deactivate_plugin()\n{\n\t\n}", "title": "" }, { "docid": "77662fef0058b95447c9cb3629b7e812", "score": "0.6248932", "text": "function sm_rssplugin_deactivation() {\n\n\t \n\n}", "title": "" }, { "docid": "5bb141181295bc56d640c2933e66edb3", "score": "0.6245052", "text": "private function czr_fn_set_bbpress_compat() {\r\n if ( ! function_exists( 'czr_fn_bbpress_is_bbpress' ) ) {\r\n function czr_fn_bbpress_is_bbpress() {\r\n return ( function_exists('is_bbpress') && is_bbpress() );\r\n }\r\n }\r\n if ( ! function_exists( 'czr_fn_bbpress_disable_feature' ) ) {\r\n function czr_fn_bbpress_disable_feature( $bool ) {\r\n return czr_fn_bbpress_is_bbpress() ? false : $bool;\r\n }\r\n }\r\n if ( ! function_exists( 'czr_fn_bbpress_enable_feature' ) ) {\r\n function czr_fn_bbpress_enable_feature( $bool ) {\r\n return czr_fn_bbpress_is_bbpress() ? true : $bool;\r\n }\r\n }\r\n\r\n //inform czr we're not in a list of posts\r\n add_filter( 'czr_is_list_of_posts', 'czr_fn_bbpress_disable_feature' );\r\n\r\n //force display singular_title\r\n add_filter( 'czr_display_page_heading', 'czr_fn_bbpress_enable_feature' );\r\n\r\n //disables post metas\r\n add_filter( 'czr_show_post_metas', 'czr_fn_bbpress_disable_feature', 100);\r\n\r\n //disables post navigation\r\n add_filter( 'czr_show_post_navigation', 'czr_fn_bbpress_disable_feature' );\r\n\r\n //disable the smartload help block\r\n add_filter( 'tc_is_img_smartload_help_on', 'czr_fn_bbpress_disable_feature' );\r\n\r\n //disable author info in posts\r\n add_filter( 'czr_show_author_metas_in_post', 'czr_fn_bbpress_disable_feature' );\r\n\r\n //disable related posts\r\n add_filter( 'czr_display_related_posts', 'czr_fn_bbpress_disable_feature' );\r\n\r\n //custom css -> TODO: IMPROVE!\r\n add_filter( 'czr_user_options_style', 'czr_fn_bbpress_custom_style' );\r\n function czr_fn_bbpress_custom_style( $_css ) {\r\n\r\n if ( czr_fn_bbpress_is_bbpress() ) {\r\n return $_css . '\r\n#subscription-toggle {\r\n float: right;\r\n}\r\n#bbpress-forums p.bbp-topic-meta img.avatar,\r\n#bbpress-forums ul.bbp-reply-revision-log img.avatar,\r\n#bbpress-forums ul.bbp-topic-revision-log img.avatar,\r\n#bbpress-forums div.bbp-template-notice img.avatar,\r\n#bbpress-forums .widget_display_topics img.avatar,\r\n#bbpress-forums .widget_display_replies img.avatar {\r\n margin-bottom: 0;\r\n}\r\n.bbpress.post-type-archive .entry-header .btn-edit {\r\n display: none;\r\n}\r\n';\r\n }\r\n\r\n return $_css;\r\n }\r\n }", "title": "" }, { "docid": "deb147831ade9b1a1054d605e76b205c", "score": "0.6195644", "text": "private function plugin_deactivated() {\n\t}", "title": "" }, { "docid": "cf486b69f035267693bc37a9e2c15fd9", "score": "0.61329484", "text": "static function deactivate() {\n // Plugin deactivate\n }", "title": "" }, { "docid": "e890634b0a9d8f0791cebca6a24dfd78", "score": "0.61008537", "text": "public static function action_on_wp_loaded() {\n\t\tif (wnd_has_been_banned()) {\n\t\t\twp_logout();\n\t\t\twp_die('账户已被封禁', get_option('blogname'));\n\t\t}\n\t}", "title": "" }, { "docid": "a786715b202d91cbcf618c2bdedbc25d", "score": "0.60680526", "text": "public function deactivate_hook()\n {\n }", "title": "" }, { "docid": "3ab25c9cc75c202df1626d4e719f1548", "score": "0.6065743", "text": "function _deactivate() {}", "title": "" }, { "docid": "5549385b7991ebb08ab7b570796947ae", "score": "0.60636914", "text": "function yoast_wpseo_self_deactivate()\n {\n }", "title": "" }, { "docid": "8e55f82ce39910fe877820c67b713f8f", "score": "0.60612184", "text": "function thim_use_bbpress() {\n\tif ( function_exists( 'is_bbpress' ) ) {\n\t\treturn is_bbpress();\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "c93542dbf784dc9276f3d30df58397f2", "score": "0.6049694", "text": "function __destruct(){\n\t\tdb_set_active('default');\n\t}", "title": "" }, { "docid": "7a20d90224c5dfd29df0b30ceb15ff49", "score": "0.6047836", "text": "function deactivate_wp_plugin_boilerplate() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-plugin-boilerplate-deactivator.php';\n Wp_Plugin_Boilerplate_Deactivator::deactivate();\n}", "title": "" }, { "docid": "dff033d9a63a189674b26d6b1cd1de27", "score": "0.6040733", "text": "public function admin_notices() {\n // echo '<div class=\"error\"><p>My Awesome Plugin has deactivated itself because bbPress is no longer active.</p></div>';\n }", "title": "" }, { "docid": "1bc6d59d7bed8090cba217e15dda0662", "score": "0.6036326", "text": "public static function deactivate_livepress(){\n\t\t$lp_updater = LivePress_PF_Updates::get_instance();\n\t\t$blogging_tools = new LivePress_Blogging_Tools();\n\t\t$live_posts = $blogging_tools->get_all_live_posts();\n\t\t// Go thru each live post\n\t\tforeach( $live_posts as $the_post ){\n\t\t\t// Merge children posts\n\t\t\t$lp_updater->merge_children( $the_post );\n\t\t\t// Turn off live\n\t\t\t$blogging_tools->set_post_live_status( $the_post, false );\n\t\t}\n\n\t}", "title": "" }, { "docid": "5e3ba3d81915fe5c026d6cf3bdfb1d23", "score": "0.6029849", "text": "public function deactivation(){\n\t\t\t$this->remove_cpts(); \t// unregister the post type, so the rules are no longer in memory\n\t\t\tflush_rewrite_rules();\t// clear the permalinks to remove our post type's rules from the database\n\t\t\t\n\t\t\t//See Activiation: \n\t\t\t//Remove caps given to all roles for plugin specific CPTs. \n\t\t\t$this->remove_caps();\n\t\t\t$this->remove_roles();\n\t\t\t\n\t\t\t//Setup a configuration process that explains how to use the plugin. \n\t\t}", "title": "" }, { "docid": "8c7485454765fe907cf0a5d2304b8ea0", "score": "0.6025774", "text": "function NewPost_deactivate_plugin() {\n \tflush_rewrite_rules();\n }", "title": "" }, { "docid": "98725a52c6376c702365123e1c36d4f1", "score": "0.6009692", "text": "function _wpseo_deactivate()\n {\n }", "title": "" }, { "docid": "31df09a08b9412a76fe5ee690dfe418e", "score": "0.59841496", "text": "public function __destruct()\n {\n /** Hook point */\n $this->hooks->call_hook('builder_elements_destruct');\n }", "title": "" }, { "docid": "0eab48bf0c32c4c3cee8a1fcdb425981", "score": "0.59710634", "text": "protected function onCleanup() {}", "title": "" }, { "docid": "b20f5f204cef2f28f6f709bcec599a56", "score": "0.5963573", "text": "public function deactivation_hook() {\n\t\t$this->cleanup();\n\t}", "title": "" }, { "docid": "b6323865f2159fe8ebc77bc181a9b972", "score": "0.5962744", "text": "function __destruct() {\n self::DBGecho( \"END: Tearing down WikiBot instance\" );\n unset($this->bot);\n }", "title": "" }, { "docid": "b0cf8bf1a95543cdbaa8e72f084b9b7b", "score": "0.5944615", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('core.component_block_news_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "d8af0710b54c08409d90949ebb0cba26", "score": "0.59300655", "text": "public static function activation_check() {\n\t\t$environment_warning = self::get_environment_warning( true );\n\t\tif ( $environment_warning ) {\n\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\twp_die( $environment_warning );\n\t\t}\n\t}", "title": "" }, { "docid": "ca8b7b2a0a7d680a2683404e46523565", "score": "0.5929161", "text": "public static function deactivate() {\n\t\t// Do nothing.\n\t}", "title": "" }, { "docid": "7c19136e313637f8d04613bd4dde41f4", "score": "0.5923273", "text": "public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "7c19136e313637f8d04613bd4dde41f4", "score": "0.5923273", "text": "public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "7c19136e313637f8d04613bd4dde41f4", "score": "0.5923273", "text": "public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "e6a425d95cba31824827b8dbf12427e6", "score": "0.59187657", "text": "public static function deactivate() {\n\t}", "title": "" }, { "docid": "a7e3a7aa2dd0460ec2be1aa2f1b094a4", "score": "0.59183955", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('like.component_block_browse_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "b5f532f3a9030a4b74ae827d1c4c4935", "score": "0.59107596", "text": "function abmt_deactivate_plugin() {\n\n\t// Run the deactivation class.\n\tabmt_deactivate();\n\n}", "title": "" }, { "docid": "9b577881bb7d949714022fe9b8444435", "score": "0.58995765", "text": "function cvg_uninstall(){\r\r\n\t\t\t\r\r\n\t\t\tglobal $wpdb;\r\r\n\t\t\t\r\r\n\t\t\tif (function_exists('is_multisite') && is_multisite()) {\r\r\n\r\r\n\t\t\t\t$old_blog = $wpdb->blogid;\r\r\n\t\t\t\t// Get all blog ids\r\r\n\t\t\t\t$blogids = $wpdb->get_col($wpdb->prepare(\"SELECT blog_id FROM $wpdb->blogs\"));\r\r\n\t\t\t\tforeach ($blogids as $blog_id) {\r\r\n\t\t\t\t\tswitch_to_blog($blog_id);\r\r\n\t\t\t\t\t$this->_cvg_deactivate();\r\r\n\t\t\t\t}\r\r\n\t\t\t\tswitch_to_blog($old_blog);\r\r\n\t\t\t\treturn;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t$this->_cvg_deactivate();\r\r\n\t\t\t\r\r\n\t\t}", "title": "" }, { "docid": "4fdccd7ed5d3800ebe4dec901f98549a", "score": "0.5873952", "text": "function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- using same in all child themes to allow action to be unhooked.\n\trequire_once get_stylesheet_directory() . '/lib/gutenberg/init.php';\n}", "title": "" }, { "docid": "4fdccd7ed5d3800ebe4dec901f98549a", "score": "0.5873952", "text": "function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- using same in all child themes to allow action to be unhooked.\n\trequire_once get_stylesheet_directory() . '/lib/gutenberg/init.php';\n}", "title": "" }, { "docid": "4fdccd7ed5d3800ebe4dec901f98549a", "score": "0.5873952", "text": "function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- using same in all child themes to allow action to be unhooked.\n\trequire_once get_stylesheet_directory() . '/lib/gutenberg/init.php';\n}", "title": "" }, { "docid": "5660458631ba10f08a9eff51a0b9a5e0", "score": "0.5869002", "text": "function deactivate_amsc_plugin() {\n Inc\\Base\\Deactivate::deactivate();\n}", "title": "" }, { "docid": "1c1d89c265ca7e60c207da10cb533cbe", "score": "0.5863132", "text": "public static function deactivate() {\n\t if (shortcode_exists('ranchoimggen'))\n\t {\n\t remove_shortcode('ranchoimggen');\n\t }\n\t}", "title": "" }, { "docid": "0608c9862a0644109fb18ea92d5057f0", "score": "0.58621854", "text": "function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- using same in all child themes to allow action to be unhooked.\n\trequire_once CHILD_DIR . '/lib/gutenberg/init.php';\n}", "title": "" }, { "docid": "0573f8ae00ff1d6a5707dee9804eea5b", "score": "0.5857488", "text": "public static function deactivate() {\n\n\t}", "title": "" }, { "docid": "71aabdac7734d763fb362a5484e83f72", "score": "0.58502966", "text": "public static function deactivate()\n {\n // Do nothing\n }", "title": "" }, { "docid": "794b713391c8b00f98574b982164b69a", "score": "0.5850234", "text": "function g_crossposting_deactivation() {\n\t// remove our action hook for checking for new G+ posts every 5 minutes\n\twp_clear_scheduled_hook('g_crossposting_update_action');\n}", "title": "" }, { "docid": "d3e4a268528b43346a79f24d346c3fcc", "score": "0.5849426", "text": "public static function wpTearDownAfterClass() {\n\t\twp_delete_post( self::$block_id, true );\n\t\twp_delete_post( self::$post_id, true );\n\t\tself::delete_user( self::$user_id );\n\t}", "title": "" }, { "docid": "303b6b26db78d7553fe01ef3864e67bf", "score": "0.58290267", "text": "public function __destruct()\n {\n // Intentionally left empty\n }", "title": "" }, { "docid": "16fc0e845a05f1179dcdca3314d9a7b7", "score": "0.582203", "text": "public static function deactivate() {\n\t\t\t$opt = get_option( 'psforum_shortcodes' );\n\n\t\t\tif ( isset( $opt['dismiss_admin_notices'] ) ) {\n\t\t\t\tunset( $opt['dismiss_admin_notices'] );\n\t\t\t\tupdate_option( 'psforum_shortcodes', $opt );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "60b9de949d4d774f7359aaa24080000b", "score": "0.5821597", "text": "public static function deactivate()\n {\n }", "title": "" }, { "docid": "1f465f3929b19bb0f2fb245245187d69", "score": "0.5804307", "text": "public static function plugin_deactivation() {\n // clean up the custom post type (CPT)\n // flush rewrite rules will refresh the DB\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "6fe84f629eb8aceb20eda822f1215508", "score": "0.5799026", "text": "public static function deactivate() {\n }", "title": "" }, { "docid": "091fb17f66827b16ac83b4c114d2624b", "score": "0.5776718", "text": "function bpbtg_init() {\n\tif ( bp_is_active( 'groups' ) ) {\n\t\tinclude __DIR__ . '/includes/bpbtg.php';\n\t\tbuddypress()->bpbtg = new BPBTG();\n\t}\n}", "title": "" }, { "docid": "72156b522b9759da212b8ad345263d2c", "score": "0.5775826", "text": "function Comment_deactivate_plugin() {\n \tflush_rewrite_rules();\n }", "title": "" }, { "docid": "8e6722309e2c04e44009028847a117df", "score": "0.57736474", "text": "protected function _after() {\n\t\t$this->framework = null;\n\t\tparent::_after();\n\t}", "title": "" }, { "docid": "0885d665639b351192b22a32dec2ad7d", "score": "0.57725793", "text": "function deactivation_hook() {\n\n\t}", "title": "" }, { "docid": "7f21df92c465bee53c6e52fa747f824d", "score": "0.57598305", "text": "public function start_cleanup() {\n\n\t\t// Remove WP version from RSS.\n\t\tadd_filter( 'the_generator', '__return_empty_string' );\n\t}", "title": "" }, { "docid": "335bf0c2404a0cdda3e477a0f1a3416c", "score": "0.57550305", "text": "function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- using same in all child themes to allow action to be unhooked.\n require_once get_stylesheet_directory() . '/lib/gutenberg/init.php';\n}", "title": "" }, { "docid": "65c25013627b51f68742e28cc3f272c4", "score": "0.5745699", "text": "public static function deactivate()\n {\n\n }", "title": "" }, { "docid": "09adc110eb35eea43ba9aacf75bb1334", "score": "0.57400393", "text": "function deactivate_gtwregister() {\n}", "title": "" }, { "docid": "f1620489ae1d50526486825d97838581", "score": "0.57331944", "text": "function devlyCoreBlastOff() {\n\t\n\t// CLEANUP THE WORDPRESS HEAD\n\tadd_action('init', 'devlyCleanHead');\n\t\n\t// HOOK UP OUR NEW METABOX HELPER CLASS\n\tadd_action('init', 'devlyMetaboxSetup', 9999);\n\t\n\t// REMOVE WP VERSION FROM RSS\n\tadd_filter('the_generator', 'devlyVersionRSS');\n\t\n\t// REMOVE INJECTED CSS FROM COMMENTS WIDGET\n\tadd_filter( 'wp_head', 'devlyRemoveCommentWidgetStyles', 1 );\n\t\n\t// REMOVE ERRORS FROM LOGIN PAGE (SECURITY MEASURE)\n\tadd_filter('login_errors', create_function('$a', \"return null;\"));\n\t\n\t// ENQUEUE DEVLY SCRIPTS & STYLES\n\tadd_action('wp_enqueue_scripts', 'devlyLoadScriptsAndStyles', 999);\n\t\n\t// LOAD UP THE DEVLY ADMIN STYLESHEET\n\tadd_action('admin_init', 'devlyLoadScriptsAndStyles');\n\t\n\t\n\t\n\t// LOAD THIS STUFF AFTER THEME SETUP\n\tadd_action('after_setup_theme', 'devlyThemeSupport');\n\t\n\t// ADDING A COUPLE OF SIDEBARS TO WORDPRESS\n\tadd_action('widgets_init', 'devlyRegisterSidebars');\n\t\n\t// DEVLY SEARCH BAR (LOCATED IN FUNCTIONS.PHP)\n\tadd_filter('get_search_form', 'devlySearch' );\n\t\n\t// FIX THE EXCERPTS READ MORE LINK\n\tadd_filter('excerpt_more', 'devlyExcerptFix');\n\t\n\t// REMOVE P TAGS FROM AROUND POST IMAGES\n\tadd_filter('the_content', 'devlyRemoveIMGP');\n\t\n\t// REMOVE TRACKBACKS FROM COMMENT COUNT\n\tadd_filter('get_comments_number', 'devlyFixCommentCount', 0);\n\t\n\t// ADD \"TIME AGO\" FUNCTIONALITY TO WORDPRESS TIME\n\tadd_filter('the_time', 'devlyCalculateTimeAgo');\n\t\n\t\n\t\n\t// LOAD UP THEME SETTINGS FOR ADMIN (CREATED IN SETTINGS.PHP)\n\tadd_action( 'admin_init', 'devlyAdminStartup' );\n\t\n\t// REGISTER NEW MENU ITEM FOR THEME SETTINGS (CREATED IN SETTINGS.PHP)\n\tadd_action( 'admin_menu', 'devlyCreateSettingsPage' );\n\t\n\t\n\t\n\t// ADD A VIEW COUNTER THAT SAVES VIEWS TO DATABASE\n\tadd_action('wp_head', 'devlyCountPostViews');\n\t\n\t// BUILD A \"VIEWS\" COLUMN FOR POSTS IN ADMIN\n\tadd_filter('manage_posts_columns', 'devlyViewsColumn');\n\t\n\t// SHOW VIEW COUNT FOR POSTS IN NEW ADMIN COLUMN\n\tadd_action('manage_posts_custom_column', 'devlyShowPostViews', 10, 2);\n\t\n}", "title": "" }, { "docid": "9b8f6b49892b8c89cf1404308523e42c", "score": "0.5720471", "text": "public function ccll_deactivate() {\t}", "title": "" }, { "docid": "f5db23802cc2988c5d68bb2980dbf905", "score": "0.57185376", "text": "public static function deactivate() {\n\n }", "title": "" }, { "docid": "cd0feeca9fe1c3904c9903542b6ebb34", "score": "0.571397", "text": "function deactivate_wp_portfolio_plugin()\r\n{\r\n}", "title": "" }, { "docid": "ea4d9a369d462e938f8cff15fa3a6c02", "score": "0.571179", "text": "public function deactivate() {\n\t\tadd_action( 'plugins_loaded', 'flush_rewrite_rules' );\n\t}", "title": "" }, { "docid": "4fa5bdb83b092491827af2e4afb67470", "score": "0.57109654", "text": "public function __destruct()\n {\n Mage::helper('asynccache/lock')->unlock();\n }", "title": "" }, { "docid": "ba8e73ad582604c6c3ba0920ed2e8670", "score": "0.5696483", "text": "private function remove_deactivated_plugin()\n {\n }", "title": "" }, { "docid": "306932f2ee6d046e2ad025393bd08af3", "score": "0.5695744", "text": "private function cleanup() {\n\t\t$this->cancelButton->unregister();\n\t\t$this->name->unregister();\n\t\t$this->backgroundImageURL->unregister();\n\t\t$this->submitButton->unregister();\n\t}", "title": "" }, { "docid": "6a499896048a1a681ccb68acb5b5005f", "score": "0.5692817", "text": "function bigbang_cleanup() {\n\tadd_action( 'init', 'bigbang_head_cleanup' );\n\t\n\t// Remove injected css for recent comments widget.\n\tadd_filter( 'wp_head', 'bigbang_remove_widget_comments_style', 1 );\n\t\n\t// Clean up comment styles in the head\n\tadd_action( 'wp_head', 'bigbang_remove_recent_comments_style', 1 );\n\t\n\t// Clean up galleries.\n\tadd_filter( 'gallery_style', 'bigbang_gallery_style' );\n\t\n\t// Adding sidebars to Wordpress.\n\t//add_action( 'widgets_init', 'joints_register_sidebars' );\n\t\n\t// Cleaning up the excerpt.\n\tadd_filter( 'excerpt_more', 'bigbang_excerpt_more' );\n\n}", "title": "" }, { "docid": "e94f39de0d095b9da912859e4c3f1e56", "score": "0.5687744", "text": "public function __destruct() {\n set_config('existingcategoryrun', self::$existingcategoryrun, KALTURA_PLUGIN_NAME);\n set_config('sharedcategoryrun', self::$sharedcategoryrun, KALTURA_PLUGIN_NAME);\n set_config('categoriescreated', self::$categoriescreated, KALTURA_PLUGIN_NAME);\n set_config('entriesmigrated', self::$entriesmigrated, KALTURA_PLUGIN_NAME);\n set_config('migrationstarted', self::$migrationstarted, KALTURA_PLUGIN_NAME);\n set_config('kafcategoryrootid', self::$kafcategoryrootid, KALTURA_PLUGIN_NAME);\n }", "title": "" }, { "docid": "a43dd191828baa3990bf99a6395a8e2b", "score": "0.56869274", "text": "public function __destruct()\n\t {\n\t \terror_reporting(E_ALL);\n\t }", "title": "" }, { "docid": "c11dd9ebe9e479ab77eaed5c0f016baa", "score": "0.5679902", "text": "function bbgcommon_deactivate() {\n\t// Can't deactivate an MU plugin.\n\tif (BBGCOMMON_MUST_USE) {\n\t\treturn false;\n\t}\n\n\trequire_once(trailingslashit(ABSPATH) . 'wp-admin/includes/plugin.php');\n\tdeactivate_plugins(BBGCOMMON_INDEX);\n\n\tglobal $bbgcommon_errors;\n\t$bbgcommon_errors['disabled'] = __('The plugin has been automatically disabled.', 'bbg-common');\n\n\tif (isset($_GET['activate'])) {\n\t\tunset($_GET['activate']);\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "2a5d8f8dc8e0f7cc95b7973162dede17", "score": "0.567729", "text": "public function __destruct() {\n\t\t\t// do nothing\n\t\t}", "title": "" }, { "docid": "443476fff19f6e692fe459195eaed86f", "score": "0.5673248", "text": "private function plugin_activated() {\n\t}", "title": "" }, { "docid": "2482b105617827d4381db7922b637972", "score": "0.5672033", "text": "public function __destruct()\n\t{\n\t\t$this->tear_down();\n\t}", "title": "" }, { "docid": "578a5e23eadb5504d873d91ed056b72a", "score": "0.566942", "text": "public function onInit() {\n\n\t\t// Check disabled by constant\n\t\tif (!$this->plugin->enabled('DISABLE_GUTENBERG')) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the \"Try Gutenberg\" dashboard widget\n\t\tremove_action('try_gutenberg_panel', 'wp_try_gutenberg_panel');\n\n\t\t// Check Gutenberg as a plugin or default editor\n\t\tif ($this->plugin->factory->detector->detected()) {\n\n\t\t\t// Disable actions and hooks\n\t\t\t$this->plugin->factory->disabler();\n\t\t}\n\t}", "title": "" }, { "docid": "72b3be014f3f31a66b43bee7a4308e27", "score": "0.5668544", "text": "public function ensureCoreDeactivated()\n {\n $this->ensurePluginDeactivated('event-espresso', 'Plugin deactivated', true);\n }", "title": "" }, { "docid": "66b08ad1ae70a8c5439279217ae53d5c", "score": "0.5663888", "text": "function First_plg_deactivation(){}", "title": "" }, { "docid": "422b46a44f0c3b23cc21c4522e6f71e7", "score": "0.56491894", "text": "function __destruct () {\r\n\t\t\t// pero como nada de esto es basura.. jejej no destruir na... jiji\r\n\t\t}", "title": "" }, { "docid": "2fb1f185d23fd902a62edd846d9f329c", "score": "0.5648696", "text": "public function deactivate()\n\t{\n\t}", "title": "" }, { "docid": "74428cdcf255d92f7b163b3de1a09e5b", "score": "0.5642094", "text": "function __destruct() {\n\t\t}", "title": "" }, { "docid": "2b74ac2e4b0272e7824740b8daf6ea67", "score": "0.5638834", "text": "protected function _cleanup() {}", "title": "" }, { "docid": "30eb4c345c4b70fcf7ba5ef33780c8fe", "score": "0.56352496", "text": "function __destruct() {\r\n ;\r\n }", "title": "" }, { "docid": "3d039f67881c8fea1b250b0044db521d", "score": "0.5630862", "text": "function codelight_wp_cleanup_pluggable()\n{\n $cleanup = new Codelight_WP_Cleanup();\n\n // By default, remove password change emails for admin\n if (!current_theme_supports('cl-enable-password-changed-admin-email')) {\n $cleanup->disable_password_changed_admin_email();\n }\n\n // By default, remove password change emails for admin\n /*if (!current_theme_supports('cl-enable-new-user-admin-email')) {\n $cleanup->disable_new_user_admin_email();\n }*/\n\n // By default, remove user registration email for admin\n if (!current_theme_supports('cl-enable-user-registered-admin-email')) {\n $cleanup->disable_user_registered_admin_email();\n }\n}", "title": "" }, { "docid": "ea620fb3f682d7720338f3161652f99a", "score": "0.5627715", "text": "public function __destruct()\n {\n //nothing to do\n }", "title": "" }, { "docid": "79ae35117d200900c7cbf20f84f2ced4", "score": "0.5626561", "text": "function sociable_activation_hook() {\n\tglobal $wpdb;\n\t$wpdb->query(\"DELETE FROM $wpdb->postmeta WHERE meta_key = 'sociableoff'\");\n\treturn sociable_restore_config(false);\n}", "title": "" }, { "docid": "d978f42de67f6352628e1b2420cf3440", "score": "0.56236625", "text": "public function __destruct()\n\t{\n\t\tunset($this->CI);\n\t\t//echo '<pre><code>'.print_r($this , 1).'</code></pre>';\n\t\t//echo debug($this);\n\t}", "title": "" }, { "docid": "9abf47eb007eaee5884f18d7a2c0531f", "score": "0.56218684", "text": "function bones_ahoy() {\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 // adding sidebars to Wordpress (these are created in functions.php)\n add_action( 'widgets_init', 'bones_register_sidebars' );\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\n}", "title": "" }, { "docid": "80aa5db837eec326bb1501d6f47e2107", "score": "0.5621653", "text": "function __destruct()\n {\n }", "title": "" }, { "docid": "493770e5cb1e4f0355aaf816dc6c11b3", "score": "0.5621143", "text": "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('ban.component_controller_admincp_default_clean')) ? eval($sPlugin) : false);\n\t}", "title": "" }, { "docid": "64952c2a7af9de99dfcd2cd5066a8818", "score": "0.56183136", "text": "function stop_heartbeat() {\r\n global $pagenow;\r\n\r\n if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' && !is_admin() )\r\n wp_deregister_script('heartbeat');\r\n}", "title": "" }, { "docid": "c18d0923b3e824397bfcaa6282c5ce03", "score": "0.56128305", "text": "function __destruct() {\n\t}", "title": "" }, { "docid": "c18d0923b3e824397bfcaa6282c5ce03", "score": "0.56128305", "text": "function __destruct() {\n\t}", "title": "" }, { "docid": "882d14b16a63f1d166cf9c994e4223f7", "score": "0.561134", "text": "function plugin_deactivation() {\n // Reference plugin deactivation functions here\n}", "title": "" }, { "docid": "85dcd69e2d92909a6f14682b647cf7ce", "score": "0.56076014", "text": "function __destruct()\n {\n }", "title": "" }, { "docid": "85dcd69e2d92909a6f14682b647cf7ce", "score": "0.56076014", "text": "function __destruct()\n {\n }", "title": "" }, { "docid": "6f078dd1fbb0538803271f943482642d", "score": "0.56070715", "text": "function __destruct()\n {\n\n }", "title": "" }, { "docid": "f892e84ecad72f42fa9a31b934a4a795", "score": "0.5595987", "text": "public function __destruct() {\n error_reporting(E_ALL);\n }", "title": "" }, { "docid": "c34f37f7e46f80ad9a6a26824a36a0ec", "score": "0.5595923", "text": "function _s_trigger_theme_cleanup() {\n\tadd_action( 'init', '_s_theme_cleanup' );\n}", "title": "" }, { "docid": "eebdd22e03105478eb3629df6c191ef4", "score": "0.5594878", "text": "static function deactivate() {\n }", "title": "" }, { "docid": "d70113567c029e8a2c4aa5e9df98fea4", "score": "0.55943155", "text": "function NewPost_activate_plugin() {\n NewPost\\Activate::activate();\n }", "title": "" }, { "docid": "b4e0a34faaf71396593ab3bc8c81ec4f", "score": "0.5591556", "text": "public function deactivate()\n {\n // noop\n }", "title": "" }, { "docid": "a626cc9fdd9e31956bf7aba7c9d3aa69", "score": "0.55901957", "text": "function my_plugin_deactivate()\r\n{\r\n\terror_log(\"My Plugin Got Deactivated.\");\r\n}", "title": "" }, { "docid": "24de85bad877a793a66737d81038fc61", "score": "0.5589236", "text": "function drupal_clean_after_cron_run() {\n if (variable_get('cron_semaphore', false)) {\n global $conf;\n _ec_variable_del('cron_semaphore');\n $conf['cron_semaphore'] = false;\n }\n}", "title": "" } ]
2cb9fada23a26b739e5b39e8cb07d5e5
The autoren that belong to the arznei.
[ { "docid": "92f683abd2f9894f8bf4b2c4acca1a9b", "score": "0.62230194", "text": "public function autoren()\n {\n return $this->belongsToMany('App\\Autor', 'arznei_autor', 'arznei_id', 'autor_id', 'arznei_id', 'autor_id');\n }", "title": "" } ]
[ { "docid": "63434a80c8394b1b9d4ea8a22bafc14a", "score": "0.60947317", "text": "function taxonomie_autoriser(){}", "title": "" }, { "docid": "ca92d4f450560a70e32c63d2c62a6654", "score": "0.6000153", "text": "function relances_autoriser(){}", "title": "" }, { "docid": "5f46d3f159200b990d4936a2e6f065ea", "score": "0.5884621", "text": "public function getOrigen()\r\n {\r\n return $this->origen;\r\n }", "title": "" }, { "docid": "7947e418d1962cca4c64555e29eb81b8", "score": "0.58834696", "text": "public function getAno_id()\n {\n return $this->ano_id;\n }", "title": "" }, { "docid": "791a2c55672606770bece3a65bfdd905", "score": "0.58759874", "text": "public function getReacaoId()\n {\n return $this->reacaoId;\n }", "title": "" }, { "docid": "6b1fe31b451834c0c6d710d887bc3872", "score": "0.58168286", "text": "public function getAutoInscription()\n {\n return $this->autoInscription;\n }", "title": "" }, { "docid": "29ec53ad7b187b5dcf510d00009c3521", "score": "0.57750857", "text": "public function getAuto()\n {\n return $this->hasOne(Auto::className(), ['Id_auto' => 'Id_truck']);\n }", "title": "" }, { "docid": "86af262a31195d5dcef7f3ba5af92eea", "score": "0.5768847", "text": "public function getAno() {\n\t\treturn $this->ano;\n\t}", "title": "" }, { "docid": "c01f7e724176ca72b98e5ee606829f74", "score": "0.5736023", "text": "public function getArcucustid()\n {\n return $this->arcucustid;\n }", "title": "" }, { "docid": "6fd7a62f5f52307853fa4083a7925b5a", "score": "0.57193005", "text": "public function idAbonne()\n {\n return $this->id_abonne;\n }", "title": "" }, { "docid": "15fd11bfeed215c1641087c8b3b96159", "score": "0.5648247", "text": "public function getAno() {\n return $this->ano;\n }", "title": "" }, { "docid": "9df154e286b4b295a9fc946b2c61c5be", "score": "0.5640282", "text": "public function getObraAutors()\n {\n return $this->hasMany(ObraAutor::className(), ['Obra_id' => 'id']);\n }", "title": "" }, { "docid": "1773a6a0c8dbbb760da77971e787c619", "score": "0.5636577", "text": "protected static function _autori() {\n $sql = \"select * from Autor order by ImePrezime asc\";\n return MySQL::upitUNiz($sql);\n }", "title": "" }, { "docid": "671c33cd5b6175f290688f970d26c790", "score": "0.5622271", "text": "public function obtenerIdNombreAutores()\n {\n return $this->db->select('autor id, (SELECT nombre FROM editores WHERE id=autor) nombre')\n ->group_by('autor')\n ->get('noticias')->result();\n }", "title": "" }, { "docid": "1556d016f8755c31b3eba4eb31930caf", "score": "0.5599863", "text": "public function getOedtorigpric()\n {\n return $this->oedtorigpric;\n }", "title": "" }, { "docid": "ac42144afbc79d22c61fdf818c08518a", "score": "0.5574398", "text": "function abonnement_autoriser(){}", "title": "" }, { "docid": "dd0f06dfc31c604e8ec7587a9b0e724a", "score": "0.5570161", "text": "function encheres_autoriser(){}", "title": "" }, { "docid": "2e4c4f6936009db354571532102608d9", "score": "0.5534391", "text": "public function getAmaterno()\n {\n return $this->amaterno;\n }", "title": "" }, { "docid": "9f3d4d5e753edfdb03eaa49401bfd47b", "score": "0.5519699", "text": "public function getAutors()\n {\n return $this->hasMany(Autor::className(), ['id' => 'Autor_id'])->viaTable('obra_autor', ['Obra_id' => 'id']);\n }", "title": "" }, { "docid": "ae93045305f69714c6866e7d50be1d16", "score": "0.54938495", "text": "public function getCnae() {\n return $this->cnae;\n }", "title": "" }, { "docid": "9fce578c064b3b772aca7d993337861b", "score": "0.5486182", "text": "public function obtenerIdAutores()\n {\n return $this->db->select('autor')\n ->group_by('autor')\n ->get('noticias')->result();\n }", "title": "" }, { "docid": "cc2200b69669be0f4a83b1d17ca31bf6", "score": "0.54845923", "text": "public function getIdioma_nombre(){\n return $this->idioma_nombre;\n }", "title": "" }, { "docid": "993efe8c565f91a7f3a5e5c7625a2ce0", "score": "0.5434743", "text": "public function getNatoA()\n {\n return $this->hasOne(Comune::class, ['id' => 'nato_a_id']);\n }", "title": "" }, { "docid": "e7b9644b4c21bbb416ebd09a9dc5bed7", "score": "0.5432799", "text": "public function getCodigoRelatorio(){\n return $this->iCodigoRelatorio;\n }", "title": "" }, { "docid": "4ec2a334e896a03c4e923d763f2a6b92", "score": "0.54131025", "text": "public function getIdTorre()\n {\n return $this->id_torre;\n }", "title": "" }, { "docid": "1ebe2766f16c43e6313207c48cc826aa", "score": "0.54058903", "text": "public function getCijena(){ return $this->cijena; }", "title": "" }, { "docid": "7f59c88c445434449e5406236f1b1ec4", "score": "0.53870165", "text": "public function get_nourriture()\n {\n return $this->_nourriture;\n }", "title": "" }, { "docid": "7e81b2ed0104d7830449f5066a68e6c4", "score": "0.53809345", "text": "public function get_iri()\n {\n }", "title": "" }, { "docid": "6231939e5d7e5973dfbf7dfcfeafcc97", "score": "0.53793716", "text": "function livraison_autoriser(){}", "title": "" }, { "docid": "7be666a2ab03690d9b6e957bcfe6c74b", "score": "0.53572965", "text": "public function getOndaA()\n {\n return $this->ondaA;\n }", "title": "" }, { "docid": "e711549a9290cc7d0086c9bbe097c5fb", "score": "0.53564984", "text": "public function getNit_empresa_p(){\n return $this->nit_empresa_p;\n }", "title": "" }, { "docid": "401d1fa285bf21d76ea4f706bc8ca402", "score": "0.53441113", "text": "public function getAutobio() {\n return $this->autobio;\n }", "title": "" }, { "docid": "f047710f7e1ba598a205ec65a1a260fd", "score": "0.53215885", "text": "public function getAor()\r\n {\r\n return $this->getKey('Aor');\r\n }", "title": "" }, { "docid": "5b280151ff4706401d3c171e5a0082ce", "score": "0.5314733", "text": "public function get_iri() {}", "title": "" }, { "docid": "a7bced8f135d5acf451a34efee4ce8c7", "score": "0.52923584", "text": "protected function get_iri()\n {\n }", "title": "" }, { "docid": "a7bced8f135d5acf451a34efee4ce8c7", "score": "0.52923584", "text": "protected function get_iri()\n {\n }", "title": "" }, { "docid": "ccb557e44ba174633cc33bb430cf10b9", "score": "0.5288632", "text": "public function getIMAGEN()\n {\n return $this->IMAGEN;\n }", "title": "" }, { "docid": "d33ff854123b1b72c4afa9350512d397", "score": "0.5276221", "text": "public function getFkTesourariaArrecadacaoEstornadaReceita()\n {\n return $this->fkTesourariaArrecadacaoEstornadaReceita;\n }", "title": "" }, { "docid": "aba3ee4339dd6829287fec60e923d99a", "score": "0.5263391", "text": "function autoRespONNewTicket() {\n return ($this->get('ticket_autoresponder'));\n }", "title": "" }, { "docid": "d304880b41fa51f9c687202ac59dfa94", "score": "0.5258483", "text": "public function get_conta_corrente()\n {\n // loads the associated object\n if (empty($this->conta_corrente))\n $this->conta_corrente = new ContaCorrente($this->conta_corrente_id);\n \n // returns the associated object\n return $this->conta_corrente;\n }", "title": "" }, { "docid": "e764f6d4eff2acd6957048aa66b65dc0", "score": "0.5252637", "text": "public function getAor(): string\n {\n return $this->aor;\n }", "title": "" }, { "docid": "884d8c0720cdf9a21fc7601fee6d5408", "score": "0.52475893", "text": "protected function get_iri() {}", "title": "" }, { "docid": "6b2bc9c9b0d4b3ff39d7abb31b6a8ea1", "score": "0.52238643", "text": "public function getOre()\n {\n return $this->ore;\n }", "title": "" }, { "docid": "8808471be98582abbe6e90dbf3d704e8", "score": "0.51958257", "text": "function partageur_autoriser(){}", "title": "" }, { "docid": "58a35a480ba166adc3386fc84aa846cd", "score": "0.51936835", "text": "public function neocaptar () { return $this->neocaptar; }", "title": "" }, { "docid": "1cc7b6fc48ce2b75539855a1d4518702", "score": "0.51918215", "text": "public function getId_ricetta()\n {\n return $this->id_ricetta;\n }", "title": "" }, { "docid": "58edef82bc23ad732893ad0173bdb4f9", "score": "0.5189574", "text": "public function getFkTesourariaArrecadacaoCarne()\n {\n return $this->fkTesourariaArrecadacaoCarne;\n }", "title": "" }, { "docid": "de41cbc41edc12459959b7ac1889e3d8", "score": "0.5183922", "text": "public function arret()\n {\n if(in_array(5,array_keys(config('newsletter.components'))))\n {\n return $this->hasOne(config('newsletter.models.arret'), 'id', 'arret_id');\n }\n }", "title": "" }, { "docid": "b17fbd72efcb1fec3e589afc4aaf2f2d", "score": "0.5178906", "text": "public function getAnoUsu()\n {\n return $this->iAnoUsu;\n }", "title": "" }, { "docid": "d78279cf18283a23cdddf999d443986d", "score": "0.51638055", "text": "function parrainage_autoriser(){}", "title": "" }, { "docid": "b78fbf7b1bef20915e118c99fbdfc8f4", "score": "0.5163035", "text": "function campagnes_autoriser(){}", "title": "" }, { "docid": "62bc3bab888679115be7dc61a416fe03", "score": "0.5158318", "text": "public function getNombre_Art()\n {\n return $this->nombre_art;\n }", "title": "" }, { "docid": "7acf1442158ccb05124ad01f6ce32e64", "score": "0.5152625", "text": "function getNombre_incidencia() {\r\n\t\treturn $this->nombre_incidencia;\r\n }", "title": "" }, { "docid": "dad4df7c3cb2a186f341852397d01118", "score": "0.5148729", "text": "public function getTransacaoAgregadoraID () {\n\t\treturn $this->transacaoAgregadoraID;\n\t}", "title": "" }, { "docid": "95540734ea14c45e697b7debe4533e13", "score": "0.514783", "text": "public function getErn()\n {\n return $this->ern;\n }", "title": "" }, { "docid": "c7cf720908d335c2247314fcf65fe6f2", "score": "0.5143556", "text": "function getPrenotazione()\n\t{\n\t\treturn $this->prenotazione;\n\t}", "title": "" }, { "docid": "96e29459a3a31f1c9021e81f161838ae", "score": "0.5142953", "text": "public function getReacaoIcon()\n {\n return $this->reacaoIcon;\n }", "title": "" }, { "docid": "4edec4ad8a3e3b8905dfc940fc2fcbad", "score": "0.5126468", "text": "public function getRelaciones()\n {\n return $this->hasMany(Relaciones::className(), ['usuario1_id' => 'id']);\n }", "title": "" }, { "docid": "f70aed59464fd062b8cd83d3fc2ac3ba", "score": "0.5126146", "text": "function bannieres_autoriser(){}", "title": "" }, { "docid": "bb51680ccf6087090437daa1a05917d6", "score": "0.51234406", "text": "public function getIdformacionArtesano()\n {\n return $this->idformacionArtesano;\n }", "title": "" }, { "docid": "8905d8daf3bb5c2bd904dded2e6eac1c", "score": "0.5119677", "text": "public function getOndaE()\n {\n return $this->ondaE;\n }", "title": "" }, { "docid": "7ea6b9b7279370ebab83f2440c725ba5", "score": "0.511936", "text": "public function getAutor0()\n {\n return $this->hasOne(User::className(), ['id' => 'autor']);\n }", "title": "" }, { "docid": "7ea6b9b7279370ebab83f2440c725ba5", "score": "0.511936", "text": "public function getAutor0()\n {\n return $this->hasOne(User::className(), ['id' => 'autor']);\n }", "title": "" }, { "docid": "79ea5a8b566fea2cfe9c2cb11293b2c7", "score": "0.51163447", "text": "function getRequerido()\r\n {\r\n return $this->requerido;\r\n }", "title": "" }, { "docid": "837138e5f69d8f1c164f97c8ab0957ee", "score": "0.51102877", "text": "public function getCarritoClienteId(){\n \treturn $this->carritoClienteId;\n\t}", "title": "" }, { "docid": "b3e8abd91fa6b870dfb72f4c53b1c4a8", "score": "0.5105629", "text": "public function getAutor()\n {\n return $this->hasOne(Autor::className(), ['id_autor' => 'id_autor']);\n }", "title": "" }, { "docid": "f8fa9b6d47662d9e63403fb9da09c4a1", "score": "0.5103176", "text": "public function getOrdem()\n {\n return $this->ordem;\n }", "title": "" }, { "docid": "f8fa9b6d47662d9e63403fb9da09c4a1", "score": "0.5103176", "text": "public function getOrdem()\n {\n return $this->ordem;\n }", "title": "" }, { "docid": "337442a0d1984c49218e2af2fa293982", "score": "0.50933886", "text": "public function getCne()\n {\n return $this->cne;\n }", "title": "" }, { "docid": "a1b87d416c397429dcc1d1d2c820b286", "score": "0.5085774", "text": "public function getApaterno()\n {\n return $this->apaterno;\n }", "title": "" }, { "docid": "6bf2346e49cab7d1c7d958e8279e71a8", "score": "0.50841266", "text": "public function getAorta()\n {\n return $this->aorta;\n }", "title": "" }, { "docid": "afaa168e4099e09c8011d3ec966f2526", "score": "0.5080262", "text": "public function getId_Artista()\n {\n return $this->id_artista;\n }", "title": "" }, { "docid": "83ac8d1169862cd87e7359944c0bf615", "score": "0.50794405", "text": "public function relasi_resiko()\n {\n \treturn $this->belongsTo('App\\models\\Resiko', 'resiko_id', 'id');\n }", "title": "" }, { "docid": "2a62e05b661c8ec46069cfb5c0b1955d", "score": "0.50733566", "text": "public function getObra()\n {\n return $this->hasOne(Obra::className(), ['id' => 'Obra_id']);\n }", "title": "" }, { "docid": "e030240829b5660db4f4619ce8aaf34e", "score": "0.5071901", "text": "public function getFkOrcamentoReceita1()\n {\n return $this->fkOrcamentoReceita1;\n }", "title": "" }, { "docid": "16e1790012308b5d97b3137e5c192438", "score": "0.50712126", "text": "public function getRelacionlaboraliescodigo()\n\t{\n\t\treturn $this->relacionlaboraliescodigo;\n\t}", "title": "" }, { "docid": "6782f180e443f84e25f7d2bf7e0a8a3d", "score": "0.50638294", "text": "public function realex() {\n return $this->realexvid();\n }", "title": "" }, { "docid": "9a510f11f2aabfc15bbc3779ddb78682", "score": "0.5063618", "text": "public function getRaiz()\n {\n return $this->raiz;\n }", "title": "" }, { "docid": "30832e4b5161fd05195a8c23eef33518", "score": "0.5058035", "text": "public function getIdmiAgroempresa(){\n return $this->idmiAgroempresa;\n }", "title": "" }, { "docid": "f89de4d5aee7b4b2068a41be7c95ff94", "score": "0.504876", "text": "public function getAnonyme()\n {\n return $this->anonyme;\n }", "title": "" }, { "docid": "088e02392bcf2662d4e26151900f7b47", "score": "0.50396705", "text": "abstract public function getLastAnnonceId();", "title": "" }, { "docid": "71afc2f05d7f57e8e514a39257188047", "score": "0.50381196", "text": "public function getUniqIdSynchro() {\n return $this->uniqIdSynchro;\n }", "title": "" }, { "docid": "bbf5024b4fd6dec9baaf7e025498e5ae", "score": "0.50377214", "text": "public function getFkOrcamentoReceita()\n {\n return $this->fkOrcamentoReceita;\n }", "title": "" }, { "docid": "bbf5024b4fd6dec9baaf7e025498e5ae", "score": "0.50377214", "text": "public function getFkOrcamentoReceita()\n {\n return $this->fkOrcamentoReceita;\n }", "title": "" }, { "docid": "bbf5024b4fd6dec9baaf7e025498e5ae", "score": "0.50377214", "text": "public function getFkOrcamentoReceita()\n {\n return $this->fkOrcamentoReceita;\n }", "title": "" }, { "docid": "bcf9bf0067c758b4640f8207b7b51fe8", "score": "0.5035596", "text": "public function GetPrestaNiveau() {\n\t\treturn parent::GetNiveau();\n\t}", "title": "" }, { "docid": "441f9692fabdb0064e5a1791c69824b2", "score": "0.5035183", "text": "public function getRESIDENTE()\n {\n return $this->RESIDENTE;\n }", "title": "" }, { "docid": "868c8cac108c4817234678d7eb010c6f", "score": "0.5034232", "text": "public function GetPrestaNote() {\n\t\treturn $this -> _mPrestaNote;\n\t}", "title": "" }, { "docid": "802d27cc9fae81acfd2ebf1af0b50358", "score": "0.50207484", "text": "public function getFkArrecadacaoCarne()\n {\n return $this->fkArrecadacaoCarne;\n }", "title": "" }, { "docid": "6fbb345b66e1e4cdbffb03c346abd854", "score": "0.5015342", "text": "function catexpo_autoriser(){}", "title": "" }, { "docid": "8bce0051399c7c567e80e740ba6a29df", "score": "0.501218", "text": "public function getAncestro()\n {\n return static::where('id_obra', $this->id_obra)\n ->where('nivel', $this->getNivelAncestro())\n ->first();\n }", "title": "" }, { "docid": "30419e40464971ada84bbb9b3bf2d66f", "score": "0.50115687", "text": "public function getAsuntoReceptor()\r\n {\r\n return $this->asunto_receptor;\r\n }", "title": "" }, { "docid": "4be7a46022a0110d4988eea1598e11aa", "score": "0.50111246", "text": "public function empresa() {\n\t\treturn $this->empresa;\n\t}", "title": "" }, { "docid": "68de25dc772fdf59165a9b46f2c619ed", "score": "0.50030077", "text": "public function getFornecedor()\n {\n if (count($this->aFornecedores) == 0) {\n $sWhereFornecedor = \"l20_codigo = {$this->getCodigo()}\";\n $oDaoOrcamentoItemLicitacao = db_utils::getDao('pcorcamitemlic');\n\n $sCampos = \"distinct z01_numcgm, z01_nome, pc21_orcamforne, pc21_codorc \";\n $sSqlBuscaFornecedor = $oDaoOrcamentoItemLicitacao->sql_query_fornecedores(null, $sCampos, null,\n $sWhereFornecedor);\n $rsBuscaFornecedor = $oDaoOrcamentoItemLicitacao->sql_record($sSqlBuscaFornecedor);\n\n if ($oDaoOrcamentoItemLicitacao->numrows > 0) {\n $this->aFornecedores = db_utils::getCollectionByRecord($rsBuscaFornecedor);\n }\n }\n return $this->aFornecedores;\n }", "title": "" }, { "docid": "93e671247152aee2a323732e1e971155", "score": "0.5001926", "text": "public function getOrden()\n {\n return $this->orden;\n }", "title": "" }, { "docid": "e9ce70a4e9776edd68ffcd6bf079ee77", "score": "0.5000255", "text": "public function getCena0()\n {\n return $this->hasOne(OdrediCenu::className(), ['trenutna_cena' => 'cena']);\n }", "title": "" }, { "docid": "340a170928d4e334cf0513837d7e157e", "score": "0.49967843", "text": "public function getCarne()\r\n {\r\n return $this->Carne;\r\n }", "title": "" }, { "docid": "340a170928d4e334cf0513837d7e157e", "score": "0.49967843", "text": "public function getCarne()\r\n {\r\n return $this->Carne;\r\n }", "title": "" }, { "docid": "d3dde93729930c747f2aa36147dbbddc", "score": "0.49851578", "text": "public function getNim0()\n {\n return $this->hasOne(Murid::className(), ['nim' => 'nim']);\n }", "title": "" }, { "docid": "18f0023e03b5af61b8304298795a0f33", "score": "0.4983984", "text": "public function getIdentite()\n {\n return $this->identite;\n }", "title": "" } ]
5a5e75be2c74bf6bb6c9f2f99298de52
/ Convert a string into a array
[ { "docid": "2510e233bb336511893de9a5a43de678", "score": "0.0", "text": "public function addString($string, $seperator = ' ')\n\t{\n\t\t$inputArray = explode($seperator, $string);\n\t\t$tagArray = array();\n\t\tforeach ($inputArray as $inputTag) {\n\t\t\t$tagArray[]=$this->formatTag($inputTag);\n\t\t}\n\t\t$this->addTags($tagArray);\n\t}", "title": "" } ]
[ { "docid": "b072383cb155ad28f1b8a49d227e2283", "score": "0.7449541", "text": "public static function to_array($string)\n {\n return preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY);\n }", "title": "" }, { "docid": "b2ed12171ab91e77351b8b61c7c1bc56", "score": "0.7354679", "text": "function string_to_array($s)\n{\n\t$a = [];\n\tfor ($idx = 0; $idx < strlen($s); $idx++) {\n\t\t$a[] = ord($s[$idx]);\n\t}\n\treturn $a;\n}", "title": "" }, { "docid": "291cda3a7d4484d66edffd2553200783", "score": "0.73429215", "text": "public function stringToArray($string)\n\t\t{\n\t\t\treturn json_decode($string, true);\t\t\n\t\t}", "title": "" }, { "docid": "e34284ee2265ca9c1bd4ef8c04202b43", "score": "0.7293278", "text": "public static function stringToArray($str)\n {\n if (!is_string($str)) {\n throw new \\InvalidArgumentException(\n 'To convert string to array, you must provide a string value as input!'\n );\n }\n\n $arr = preg_split('//u', $str);\n $arr = array_filter($arr, function($c){return strlen($c) > 0;});\n return array_values($arr);\n }", "title": "" }, { "docid": "636d12fdef2f8031c3be8282424f3e71", "score": "0.7251473", "text": "protected function _strToArray($str)\n {\n if (!empty($str)) {\n\n if (strpos($str, ',')) {\n return explode(',', $str);\n }\n return array($str);\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "6eaee38252ee73a076584f4ae8ae6892", "score": "0.72436804", "text": "function makeArray($s){\n\t\tif(is_string($s)){\n\t\t\treturn array_slice(preg_split('//', $s), 1, -1);\n\t\t}\n\t}", "title": "" }, { "docid": "59397b36a388ef0a8ae3a08a821ee06f", "score": "0.71925664", "text": "static public function convertStringToArray() {\n $_aParams = func_get_args();\n return call_user_func_array(\n array( __CLASS__, 'getStringIntoArray' ),\n $_aParams\n );\n }", "title": "" }, { "docid": "e4900a2545a911c21bba51ad1c0def79", "score": "0.7174138", "text": "public function parseTextIntoArray(string $text):array;", "title": "" }, { "docid": "96f4757e4c3e826c39ee6102e34e2c5a", "score": "0.7146307", "text": "public static function toArray($string)\n {\n $array = preg_split(\"/[\\s,\\!\\?\\.\\:]+/\", $string);\n\n // Remove empty values\n $array = array_filter($array);\n\n return $array;\n }", "title": "" }, { "docid": "48af82ed60c8f0ba38f5f3f35f99eba4", "score": "0.70937043", "text": "public function arrayToArrayData($string)\n {\n return \\D::eval($string);\n }", "title": "" }, { "docid": "02c00709dddd15baeae7e4013149dbd8", "score": "0.7090768", "text": "function string_to_array($string, $char = ',', $trim = true)\n{\n $string = explode($char, $string);\n if ($trim) {\n for ($i = 0; $i < count($string); $i++) {\n $string[$i] = trim($string[$i]);\n }\n }\n return $string;\n}", "title": "" }, { "docid": "7af88af93685bb26582b5cc4f4d60116", "score": "0.7075369", "text": "public static function parseIntoArray($string)\n {\n preg_match_all('/\\+(?<key>\\w+)=(?<val>.*?)(?:\\+|$)/', $string, $matches);\n $result = [];\n foreach($matches['key'] as $i => $key) {\n $result[$key] = self::convert($matches['val'][$i], $key);\n \n }\n return $result;\n }", "title": "" }, { "docid": "e48496d3c6e2ec052ec50ec0eafc2212", "score": "0.70310295", "text": "public static function decodeToArray(?string $string): array\n {\n return self::decode($string, true) ?: [];\n }", "title": "" }, { "docid": "0b01604d61723d28abf619c574b1b7c1", "score": "0.7030023", "text": "public static function stringToArray(string $string) : array\n {\n if (!preg_match(\"@^{.*?}$@\", $string)) {\n throw new DomainException(\"Not array-like: $string\");\n }\n $parts = json_decode('['.substr($string, 1, -1).']');\n foreach ($parts as &$part) {\n if (preg_match('@^{.*?}@', $part)) {\n $part = self::stringToArray($part);\n }\n }\n return $parts;\n }", "title": "" }, { "docid": "58b1f92671316109bfd10d5e858f306f", "score": "0.70201594", "text": "static public function getStringIntoArray() {\n \n $intArgs = func_num_args();\n $arrArgs = func_get_args();\n $strInput = $arrArgs[ 0 ]; \n $strDelimiter = $arrArgs[ 1 ];\n \n if ( ! is_string( $strDelimiter ) || $strDelimiter == '' ) {\n return $strInput;\n }\n if ( is_array( $strInput ) ) {\n return $strInput; // note that is_string( 1 ) yields false.\n }\n \n $arrElems = preg_split( \"/[{$strDelimiter}]\\s*/\", trim( $strInput ), 0, PREG_SPLIT_NO_EMPTY );\n if ( ! is_array( $arrElems ) ) {\n return array();\n }\n \n foreach( $arrElems as &$strElem ) {\n \n $arrParams = $arrArgs;\n $arrParams[0] = $strElem;\n unset( $arrParams[ 1 ] ); // remove the used delimiter.\n // now `$strElem` becomes an array.\n // if the delimiters are gone, \n if ( count( $arrParams ) > 1 ) { \n $strElem = call_user_func_array( \n array( __CLASS__, 'getStringIntoArray' ),\n $arrParams \n );\n }\n \n // Added this because the function was not trimming the elements sometimes... not fully tested with multi-dimensional arrays. \n if ( is_string( $strElem ) ) {\n $strElem = trim( $strElem );\n }\n \n }\n return $arrElems;\n\n }", "title": "" }, { "docid": "26d80fb63f47c146d3da03ae6f886aac", "score": "0.7006352", "text": "function strToArray($str) {\n $data = array();\n // _ denotes layers, seperate these out\n $oneDimArray = explode('_', $str);\n foreach ($oneDimArray as $subArray) {\n // , denotes different settings inside layers\n $twoDimArray = explode(',', $subArray);\n foreach ($twoDimArray as $subSubArray) {\n $data = addToArrays($subSubArray, $data);\n $data = addToArrays(',', $data);\n }\n $data = addToArrays('_', $data);\n }\n return $data;\n}", "title": "" }, { "docid": "915b872bb50f0e178ab79543b9742d44", "score": "0.69992673", "text": "function webform_civicrm_str2array($str) {\n $ret = array();\n if ($str) {\n foreach (explode(\"\\n\", trim($str)) as $row) {\n list($k, $v) = explode('|', $row);\n $ret[trim($k)] = trim($v);\n }\n }\n return $ret;\n}", "title": "" }, { "docid": "fcf0c0d0e27b58060131e912dff410c5", "score": "0.6996119", "text": "static function getArray($string)\n {\n if (!$string) {\n return false;\n }\n //завантажуємо масив фоток\n $files = array();\n\n $string = trim($string);\n\n if ($string) {\n $files = explode(\",\", $string);\n }\n\n foreach ($files as $key => $file) {\n $files[$key] = trim($file);\n }\n\n return $files;\n }", "title": "" }, { "docid": "5397e32c64476349bca2f5fe9ad7f5ca", "score": "0.69820195", "text": "public static function str2array($str)\r\n\t\t{\r\n\t\t\t$rest = array();\r\n\t\t\tif(strpos($str,'|')>0)\r\n\t\t\t{\r\n\t\t\t\t$array = explode('|',$str);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$array=array($str);\r\n\t\t\t}\r\n\t\t\tforeach($array as $token)\r\n\t\t\t{\r\n\t\t\t\tlist($key,$value) = explode('&',$token);\r\n\t\t\t\t$nkey=base64_decode($key);\r\n\t\t\t\t$nvalue = (substr($value,0,1) != '$' ? base64_decode($value) : str2array(base64_decode(substr($value,1))) );\r\n\t\t\t\t$rest[$nkey] = $nvalue;\r\n\t\t\t\t//printf(\"Decoded %s,%s to %s,%s\\n\",$key,$value,$nkey,$nvalue);\r\n\t\t\t}\r\n\t\t\treturn $rest;\r\n\t\t}", "title": "" }, { "docid": "fafc27b3646c3051c200ada97ffbdd03", "score": "0.6952459", "text": "function string_to_array($string, $option = ',', $callback = null)\n {\n if (is_array($string)) {\n return $string;\n }\n $item = [];\n if ($string != '' && !is_null($string)) {\n if (strtoupper($option) == 'JSON') {\n $item = json_decode($string, true);\n if (!is_array($item)) {\n $item = [];\n }\n } else {\n $item = explode($option, $string);\n }\n }\n if ($callback) {\n return array_map($callback, $item);\n }\n return $item;\n }", "title": "" }, { "docid": "1c4c8fe500bb76b5d57c55bd44857f23", "score": "0.6921905", "text": "public function toArray(string $listStr): array;", "title": "" }, { "docid": "165ca03d28c6e41eb0d581aeae4a6434", "score": "0.69132096", "text": "private static function parseParametersFromStringToArray($string)\n\t{\n\t\tif(is_array($string))\n\t\t\treturn $string;\n\t\telse\n\t\t\t$string = str_replace('&amp;', '&', $string);\n\t\tparse_str($string, $params);\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "ab1989a17d777f0010aae8f2deea6941", "score": "0.6897653", "text": "function to_array($s)\n{\n if (is_object($s))\n return json_decode(json_encode($s), true);\n elseif (is_string($s) || is_resource($s))\n return (array) $s;\n elseif (is_array($s)) return $s;\n else return [];\n}", "title": "" }, { "docid": "e05d8d62fa9093877b523e36d790a904", "score": "0.6884748", "text": "public function stringToArray($string) {\n\t\t$string = explode(';', $string);\n\t\t$stringArr = array();\n\t\tforeach ($string as $stringElement) {\n\t\t\tif ($stringElement != null) {\n\t\t\t\t$stringElementE = explode(':', $stringElement);\n\t\t\t\tif (isset($stringElementE['1'])) {\n\t\t\t\t\t$stringArr[$stringElementE['0']] = $stringElementE['1'];\n\t\t\t\t} else {\n\t\t\t\t\t$stringArr[] = $stringElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $stringArr;\n\t}", "title": "" }, { "docid": "ff59bddb5f4d0dad4fa7dc5cb6c32eee", "score": "0.68369293", "text": "public static function getArrayFromString(string $string): array\n {\n if (strpos($string, ',') !== false) {\n return explode(',', $string);\n }\n\n return [$string];\n }", "title": "" }, { "docid": "f730aeda6bdd25908e1cba446b4fc033", "score": "0.68336385", "text": "function pgToArray(?string $string)\n{\n $string = str_replace(['{', '}', '\\'', '\"\"'], ['[', ']', '\"', '\"'], $string);\n return json_decode($string, true);\n}", "title": "" }, { "docid": "5c7387e9d3e7b7ccda4f880ac380bb51", "score": "0.68299484", "text": "public function fromString($string)\n {\n if (empty($string)) {\n return array();\n }\n \n $xml = new \\SimpleXMLElement($string);\n \n $data = (array) $xml;\n $items = reset($data);\n \n array_walk($items, function(&$item) { \n $item = (array) $item;\n });\n \n return $items;\n }", "title": "" }, { "docid": "cbaeba391728ac360cea3a1365d0aa0f", "score": "0.6816772", "text": "function generarArray($cadena_){ // metodo que separa la los caracteres de la cadena en arreglos\r\n $r = array();\r\n for($i=0; $i<strlen($cadena_); $i++) \r\n $r[$i] = $cadena_[$i];\r\n return $r;\r\n}", "title": "" }, { "docid": "a14bbe34702bac9915dead38867dde7b", "score": "0.6769245", "text": "public function likearrayToArrayData($string)\n {\n $data = [];\n \\D::unlikearray($string, $data);\n return $data;\n }", "title": "" }, { "docid": "2a400d994f819b5ee8c0084ba447ccc4", "score": "0.67560345", "text": "function string_to_array($parents_string, $glue){\n\tif( !empty($parents_string) ){\n\t\tif( strstr($parents_string, $glue) ){\n\t\t\t$parents_array = explode($glue, $parents_string);\n\t\t}else{\n\t\t\t$parents_array = array($parents_string);\n\t\t}\n\t}else{\n\t\t$parents_array = '';\n\t}\n\treturn $parents_array;// array or empty string\n}", "title": "" }, { "docid": "dae04442f75cd55ba4787a3e4b398db0", "score": "0.6745562", "text": "public static function AStrToArray( $data_string ){\n\n\t\t$string =& SimpleBlogCommon::$data[$data_string];\n\n\t\t$count = preg_match_all('#(?:([^\">]*)>)([^\">]*)#', $string, $matches);\n\t\tif( !$count ){\n\t\t\treturn array();\n\t\t}\n\n\t\t$keys = $matches[1];\n\t\t$values = $matches[2];\n\n\t\treturn array_combine($matches[1],$matches[2]);\n\t}", "title": "" }, { "docid": "569cf4f633ca491a38512c25c7de7a40", "score": "0.6733171", "text": "function json_to_array($string, $to_array = true)\n{\n return json_decode($string, $to_array);\n}", "title": "" }, { "docid": "82df7ab2c1932a2a91776fb13a08eb87", "score": "0.672479", "text": "function get_array_values_from_string( $args ) {\n\n\tif ( ! is_string( $args ) ) {\n\t\treturn false;\n\t}\n\n\t$args = trim( $args );\n\n\t// Match a string starting with 'array(' and ending with ')'.\n\tif ( ! ( ( 0 === strpos( $args, 'array(' ) ) && ( ')' === substr( $args, -1 ) ) ) ) {\n\t\treturn false;\n\t}\n\n\t$args = substr( $args, 6 );\n\t$args = substr( $args, 0, -1 );\n\t$args = explode( ',', $args );\n\t$args = array_map( 'trim', $args );\n\t$args = array_map( __NAMESPACE__ . '\\\\remove_reference', $args );\n\n\treturn $args;\n}", "title": "" }, { "docid": "8e295faec1596fa181b12e572ad9f9f6", "score": "0.67038435", "text": "public static function fromString(string $str): array\n {\n $arrStr = explode('+', $str);\n $return = [];\n\n foreach ($arrStr as $item) {\n try {\n $return[] = self::byValue(trim($item));\n } catch (InvalidArgumentException $e) {\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "914a28abae9fff1099ea2c69317d1d73", "score": "0.6701387", "text": "public function stringToArray($string)\n {\n $data = preg_split( \"/(\\n|,|;|\\|)/\", $string);\n $newData = array();\n\n foreach ($data as $value) {\n $value = trim($value);\n if (!empty($value)) {\n $newData[] = $value;\n }\n }\n\n return $newData;\n }", "title": "" }, { "docid": "6bd87a41b0f712e80d922261c2cddaa1", "score": "0.6668039", "text": "function json_decode_array($str)\n{\n return json_decode($str, true);\n}", "title": "" }, { "docid": "d19feae00c368b86c19e6a414256e609", "score": "0.6660149", "text": "function rangestr_to_array($range_str) {\n\t\t$list = split('-', $range_str);\n\t\tif (count($list) == 1) {\n\t\t\treturn array(intval($list[0]), intval($list[0]));\n\t\t} else {\n\t\t\treturn array(intval($list[0]), intval($list[1]));\n\t\t}\n\t}", "title": "" }, { "docid": "7ae0b5c6c066eed7bba9cf37ad80c74a", "score": "0.664248", "text": "public function testToArray()\n {\n $test_string = \"tag1, tag2, tag3\";\n $this->assertEquals([\"tag1\", \"tag2\", \"tag3\"], Tag::normalize($test_string));\n }", "title": "" }, { "docid": "02843b15c7f47978e84c8e6b35ee3108", "score": "0.6635891", "text": "public static function makeArray($string='')\n\t{\n\t\t$string = preg_replace('# #', ',', $string);\n\t\t$arr = preg_split('#,#', $string);\n\n\t\t$arr = self::cleanArray($arr);\n\t\t$arr = array_unique($arr);\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "33d1b618cde7a43dd846b945beabf51f", "score": "0.66342103", "text": "function stringCon2Array($stringCon){\n\t$lista = explode(\" \",$stringCon);\n\t$con = array();\n\tforeach($lista as $l){\n\t\t$teste = explode(\"=\",$l);\n\t\t$con[trim($teste[0])] = trim($teste[1]);\n\t}\n\t$c = array(\n\t\t\"dbname\" => $con[\"dbname\"],\n\t\t\"host\" => $con[\"host\"],\n\t\t\"port\" => $con[\"port\"],\n\t\t\"user\" => $con[\"user\"],\n\t\t\"password\" => $con[\"password\"]\n\t);\n\treturn $c;\n}", "title": "" }, { "docid": "906dabf264a867b314c46414830e4d1a", "score": "0.66284466", "text": "public function deserialize(string $data) : array;", "title": "" }, { "docid": "3c76a05a08c8e098b1bcf0c39309878e", "score": "0.6614397", "text": "function AttrToArray(string $attr){\n // remove spaces from string\n $clean = str_replace(\", \", \",\", $attr);\n // create array\n $array = explode(',', $clean);\n\n return $array;\n}", "title": "" }, { "docid": "995b06dd54079780436652c3b7487eec", "score": "0.65717405", "text": "public function castStringToArray($string)\n {\n $array = explode(',', $string);\n array_walk($array, function(&$value) {\n $value = trim($value);\n });\n\n return $array;\n }", "title": "" }, { "docid": "07760090904dbc418942950e8fc4b432", "score": "0.65686506", "text": "private function str_to_array($string, array &$output)\n\t{\n\t\t$a = explode(\"\\n\", $string);\n\t\tforeach ($a as $aa) {\n\t\t\tif ($aa != '') {\n\t\t\t\t$output[] = $aa;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.6565269", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.6565269", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.6565269", "text": "public function asArray();", "title": "" }, { "docid": "16c87144b6c64e7c7562e4dd501f73fb", "score": "0.65525067", "text": "function StrToArr($str, $delimiter)\n{\n $arr = explode($delimiter, $str);\n $result = [];\n foreach ($arr as $item) {\n $result[] = trim($item);\n }\n return $result;\n}", "title": "" }, { "docid": "481fa68ebe070b8bb8d02bde2f5e9ed3", "score": "0.65322226", "text": "function parseStr(string $string): array\n{\n\t$data = [];\n\t$string = trim($string);\n\t\n\t$string = str_replace(\"&amp;\", \"&\", $string);\n\t$string = str_replace(\"&\", \"&\", $string);\n\t$string = str_replace(\"\\n\", \"&\", $string);\n\t\n\tparse_str($string, $data);\n\tif (get_magic_quotes_gpc() == 1)\n\t{\n\t\t$data = stripslashes($data);\n\t}\n\tif (!is_array($data))\n\t{\n\t\t$data = [];\n\t}\n\t\n\treturn $data;\n}", "title": "" }, { "docid": "a3e4794f2f954408135257d452de3c5c", "score": "0.6528976", "text": "private function bulkStringToArray($string){\n $replaceFrom = array(\"[\",\"\\\"\",\"]\");\n $replaceTo = array(\"\",\"\",\"\");\n $cleaned = str_replace($replaceFrom,$replaceTo,$string);\n $result = explode(\",\",$cleaned);\n\n return $result;\n }", "title": "" }, { "docid": "7e3cb9464865829d11ddfbb17e5feb47", "score": "0.65207267", "text": "function themify_convert_brackets_string_to_arrays( $inputArr ) {\n\t$result = array();\n\n\tforeach ($inputArr as $key => $val) {\n\t\t$keyParts = preg_split('/[\\[\\]]+/', $key, -1, PREG_SPLIT_NO_EMPTY);\n\n\t\t$ref = &$result;\n\n\t\twhile ($keyParts) {\n\t\t\t\t$part = array_shift($keyParts);\n\n\t\t\tif ( !isset($ref[$part]) && is_array( $ref )) {\n\t\t\t\t$ref[$part] = array();\n\t\t\t}\n\n\t\t\tif ( is_array( $ref ) ) {\n\t\t\t\t$ref = &$ref[$part];\n\t\t\t}\n\t\t}\n\n\t\t$ref = $val;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "c6cf7a3b2acd188f42d94bf4c06665ea", "score": "0.65086985", "text": "public static function queryString2Array($string, $utf8 = true)\n {\n \t$string = urldecode($string);\n \t\n \tif ($utf8 == false && mb_detect_encoding($string, 'UTF-8') !== false) {\n \t\t$string = utf8_decode($string);\n \t}\n \t\n\t\t$pairs = explode('&', $string);\n\t\t$data = array();\n\t\t\t\n\t\tforeach ($pairs as $pair) {\n\n\t\t\t$elem = explode('=', $pair);\n\n\t\t\t/* try to convert meta string to array on the fly */\n\t\t\tif (substr($elem[1],0,7) == 'ARRAY:[' && substr($elem[1],-1) == ']') {\n\t\t\t\t$tmp = substr($elem[1], 7, strlen($elem[1]) -8);\n\t\t\t\t$tmp = explode(',', $tmp);\n\t\t\t\tif (is_array($tmp)) $elem[1] = $tmp;\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (substr($elem[0], -2) == '[]') {\n\t\t\t\t$elem[0] = str_replace('[]', '', $elem[0]);\n\t\t\t\tif (! isset($data[$elem[0]])) $data[$elem[0]] = array();\n\t\t\t\t$data[$elem[0]][] = $elem[1];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$data[$elem[0]] = $elem[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n }", "title": "" }, { "docid": "7599197a518b871fbddfdde697b4f27b", "score": "0.6485155", "text": "function make_comma_array($string) {\n\n // remove whitespace from between comma separated values in string.\n $string = remove_list_whitespace($string);\n\n // split string into array using commas.\n $array = preg_split(\"/,/\", $string);\n\n return $array;\n }", "title": "" }, { "docid": "d1ef047fb8e65e76d9aa42240818963a", "score": "0.64592713", "text": "public function transform(string $input): array;", "title": "" }, { "docid": "b10c23553c92d77115757127149a3c50", "score": "0.64238715", "text": "function GetArrFromColonString ( $str )\r\n{\r\n\t$arr = array();\r\n\tif ( $str )\r\n\t\t$arr = explode ( '::', trim( $str, ':' ) );\r\n\t\t\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "dae9b066960f9f72893c7d5816cb2f71", "score": "0.63915926", "text": "static public function stringToUTF8Array($str, $strictEncoding = true)\n {\n if ($str === \"\") {\n return array();\n }\n $ret = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);\n if (preg_last_error() === PREG_BAD_UTF8_ERROR) {\n if (!$strictEncoding) {\n $str = mb_convert_encoding($str, 'UTF-8', 'UTF-8');\n $ret = self::stringToUTF8Array($str, false);\n } else {\n throw new EncodingException(\"String contains invalid UTF-8\");\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.63909334", "text": "public abstract function as_array();", "title": "" }, { "docid": "84e74bdabb104ffbbea3a27a7915ea48", "score": "0.63820106", "text": "private function commaDelimToArray($str)\n\t{\n\t\tif ( ! $str)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tif (strpos($str, ',') !== FALSE)\n\t\t{\n\t\t\t$emails = preg_split('/[\\s,]/', $str, -1, PREG_SPLIT_NO_EMPTY);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$emails = (array) trim($str);\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "7e1838f5aa5d50e1a32719d08503d68e", "score": "0.6366949", "text": "function __explode($string) {\n\t\t$first = substr($string, 0, 1);\n\t\tif ($first !== false && ($first === '{' || $first === '[') && function_exists('json_decode')) {\n\t\t\t$ret = json_decode($string, true);\n\t\t\treturn ($ret != null) ? $ret : $string;\n\t\t}\n\t\t$array = array();\n\t\tforeach (explode(',', $string) as $pair) {\n\t\t\t$key = explode('|', $pair);\n\t\t\tif (!isset($key[1])) {\n\t\t\t\treturn $key[0];\n\t\t\t}\n\t\t\t$array[$key[0]] = $key[1];\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "f6a3cffd4c064ef573a94610ad3e3b91", "score": "0.63651", "text": "function wc_string_to_array($string, $delimiter = ',')\n {\n }", "title": "" }, { "docid": "15f67d809a3d1ba2d0b1657a4d0cce87", "score": "0.6364764", "text": "public static function toArray($delim, $str)\n\t{\n\t\treturn array_filter(array_map('trim', explode($delim, $str)), 'strlen');\n\t}", "title": "" }, { "docid": "64504aafe596489fd04cffc71b78992a", "score": "0.6362426", "text": "function makePhpArray($input){\r\n $start = 0;\r\n if (is_array($input))\r\n { \r\n return luaparser($input,$start);\r\n } \r\n elseif (is_string($input))\r\n {\r\n if (is_file ( $input ))\r\n {\r\n return luaparser(file($input),$start);\r\n }\r\n else\r\n {\r\n return luaparser(explode(\"\\n\",$input),$start);\r\n }\r\n } \r\n}", "title": "" }, { "docid": "5b4267cf98084cfc8e92e62bd51bd880", "score": "0.6359674", "text": "function rex_nl_2_array($str)\n{\n $arr = array_filter(preg_split(\"/\\n|\\r\\n|\\r/\", $str));\n return is_array($arr) ? $arr : array($arr);\n}", "title": "" }, { "docid": "455e20201b0bb3c94fef90a1c51c39ea", "score": "0.63569635", "text": "public static function decode( string $data ): array;", "title": "" }, { "docid": "3e1d0c5ab5d0c0b7775c58e9768b71cb", "score": "0.6331248", "text": "public function split(string $input): array;", "title": "" }, { "docid": "f5b5a334a99272c2c5b68efab0f9c853", "score": "0.63154656", "text": "function strtoarray($s_str =array(), $s_separator=\",\"){\n return array_unique(explode($s_separator, $s_str)); \n}", "title": "" }, { "docid": "f7d037faac2eb0694e17fe0095e89281", "score": "0.63138026", "text": "function answersArray($strInput)\n {\n $strLine = explode(chr(10), $strInput);\n foreach ($strLine as $intKey => $strLineValue) {\n $strValue = explode('|', $strLineValue);\n $arrOutput[$intKey + 1] = trim($strValue[0]);\n }\n\n return $arrOutput;\n }", "title": "" }, { "docid": "8a375530d821bda1a93d117e7739a94e", "score": "0.62769765", "text": "function mbStringToArray($string, $encoding = 'UTF-8')\n {\n $strlen = mb_strlen($string);\n while ($strlen) {\n $array[] = mb_substr($string, 0, 1, $encoding);\n $string = mb_substr($string, 1, $strlen, $encoding);\n $strlen = mb_strlen($string, $encoding);\n }\n return ($array);\n }", "title": "" }, { "docid": "16977925cde4a67e06280aa50bf80ede", "score": "0.62766004", "text": "public function postmanToArrayData($string)\n {\n $data = [];\n \\D::unpostman($string, $data);\n return $data;\n }", "title": "" }, { "docid": "5136c35630ae0c9a7d0e74f24acfd75a", "score": "0.62583804", "text": "function context_to_array($contextString) {\r\n $inputString = preg_replace('/ /', '', $contextString);\r\n $contextArray = explode(',', $inputString);\r\n return $contextArray;\r\n }", "title": "" }, { "docid": "6e025d5fa3d4587033a61091428d591f", "score": "0.62545633", "text": "public function listToArrayData($string)\n {\n $data = explode(\"\\n\", $string);\n\n foreach ($data as &$item)\n {\n $item = trim($item);\n }\n\n return $data;\n }", "title": "" }, { "docid": "b19fb240ef7a21bdc23b70dedceaff03", "score": "0.62491804", "text": "function fileToArray($filename) {\n $string = file_get_contents($filename);\n $arr = explode(\" \", $string);\n return $arr;\n}", "title": "" }, { "docid": "abe63eca55aa31d8236785944396dd03", "score": "0.62429184", "text": "function pipes_to_array($piped_string)\n {\n if ($piped_string) {\n $tags = explode('|', $piped_string);\n $array_values = array();\n\n foreach ($tags as $tag) {\n //save only tags with values\n if ($tags <> '' && !in_array($tag, $array_values)) {\n $array_values[] = $tag;\n }\n }\n\n return $array_values;\n } else {\n return NULL;\n }\n\n }", "title": "" }, { "docid": "ec32f702a395d430fc9887252ed9ab15", "score": "0.62418276", "text": "function stringToArray( $value = '', $delimiter = '' ){\n $stringToArray = array();\n if( trim($value) != '' ){\n $stringToArray = explode($delimiter, $value);\n }\n return $stringToArray;\n}", "title": "" }, { "docid": "24402c34c1af0c195631f253cdda8d00", "score": "0.6236684", "text": "function get_indexed_element_of_string_converted_to_array(string $str, int $index = 0, string $delimiter = '\\\\') {\n $str_arr = explode($delimiter, $str);\n return $str_arr[$index];\n}", "title": "" }, { "docid": "8534b8944920b639a346a96b4142bbce", "score": "0.62235636", "text": "public function listspaceToArrayData($string)\n {\n $res = [];\n\n $data = explode(\"\\n\", $string);\n\n foreach ($data as $item)\n {\n $item = trim($item);\n\n // 跳过空行\n if ($item == '')\n {\n continue;\n }\n\n $parts = preg_split('/\\s+/', $item);\n\n $index = trim($parts[0]);\n $value = isset($parts[1]) ? trim($parts[1]) : '';\n\n $res[$index] = $value;\n }\n return $res;\n }", "title": "" }, { "docid": "85396f6d8b82381e274ead0696d4a629", "score": "0.619789", "text": "public function urlToArray($string)\n {\n return array_values(array_filter(explode(\"/\", $string)));\n }", "title": "" }, { "docid": "572740aebefb859aadd1be9857569cd2", "score": "0.61886203", "text": "private function XML2Array( $xmlString )\n {\n $json = json_encode( $xmlString );\n\n return json_decode( $json, TRUE );\n }", "title": "" }, { "docid": "2464416df2f5570ea493ffcf8b255366", "score": "0.6176511", "text": "function text_to_array($text)\n\t{\n\t\t$place=1;\n\n\t\twhile (strpos($text,\"}\")>0)\n\t\t{\n\t\t\t$start = strpos($text,\"{\")+1;\n\t\t\t$length = strpos($text,\"}\") - $start;\n\t\t\t$array[$place] = substr($text, $start, $length);\n\t\t\t$text = substr($text, $start + $length + 1);\n\t\t\t$place=$place+1;\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "75284ae7e0c18cc09f01e8732ff9bcf5", "score": "0.61706626", "text": "public function decode(string $toDecode): array;", "title": "" }, { "docid": "dff1a4ffb43c15c78c67db4b1c55b281", "score": "0.61704236", "text": "function queryToArray(string $stringQuery): array\n{\n return array_reduce(explode('&', $stringQuery), function ($carry, $item) {\n $values = explode('=', $item);\n $carry[$values[0]] = $values[1];\n return $carry;\n }, []);\n}", "title": "" }, { "docid": "5448fc1ab42a0af5ef66f87a25dd56cb", "score": "0.61665565", "text": "function xml2arraySimple($str) {\n\t$xml = loadXML($str);\n\n\t// is it tematres XML\n\t$xml=loadTemaTresServices($xml);\n\n\treturn simplexml2array($xml);\n}", "title": "" }, { "docid": "3d9ce6297191f1709d88c758d2e0b0cd", "score": "0.61624235", "text": "function csv2array($string, $separator = ',', $delimiter = \"'\") {\n\t$array = explode($separator, $string);\n\tforeach($array as &$val) {\n\t\t$val = trim($val, $delimiter);\n\t}\n\treturn $array;\n}", "title": "" }, { "docid": "7052b3678e6fe3c7f80360b9e6aa0850", "score": "0.61595386", "text": "function OS_GetTextArrayString($str, $changeD=1) {\n\t$tab = OS_TextToTable($str, $changeD);\n\t$text = \"array(\";\n\tfor ($i = 0; $i < count($tab); $i++) {\n\t\tif ($i > 0) {\n\t\t\t$text .= \",\\n\";\n\t\t}\n\t\t$text .= \"\\t\\\"\" .$tab[$i]. \"\\\"\";\n\t}\n\t$text .= \")\";\n\treturn $text;\n}", "title": "" }, { "docid": "90b604a882df5229b4891d9ebf45e2b1", "score": "0.6130625", "text": "protected function _str2array($key)\r\n {\r\n $keys = explode('.', $key);\r\n\r\n array_walk($keys, function(& $value) {\r\n $value = trim($value);\r\n });\r\n\r\n return array_values(array_filter($keys));\r\n }", "title": "" }, { "docid": "0a22449de6f884f211e31a29d5128d03", "score": "0.6120964", "text": "function abaco_parse_array($value) {\n $res = @unserialize($value);\n if (!is_array($res)) {\n throw new InvalidArgumentException('abaco_parse_array');\n }\n return $res;\n}", "title": "" }, { "docid": "da7f66cf1f4f7ec23e269f6597171f7c", "score": "0.61157036", "text": "public function fromString($string)\n {\n if (empty($string)) {\n return array();\n }\n\n $items = array();\n\n $i = 0;\n $lines = preg_split('/[\\r\\n|\\n\\r|\\n|\\r]/', $string);\n foreach ($lines as $line) {\n if ($line) {\n $fields = explode(';', $line);\n if ($i == 0) {\n $keys = $fields;\n } else {\n $items[] = array_combine($keys, $fields);\n }\n $i++;\n }\n }\n\n return $items;\n }", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.61121905", "text": "public function asArray(): array;", "title": "" }, { "docid": "6aa002d24465ed702e33247312234683", "score": "0.61085063", "text": "private function uriToArray(string $uri)\n {\n if($uri !== '/')\n {\n $uri = Str::moveFromBothEnds($uri, '/');\n }\n else {\n $uri = '';\n }\n\n return explode('/', $uri);\n }", "title": "" }, { "docid": "051c8971fe1d272f078651c576061415", "score": "0.6107525", "text": "public function parseString( $string, &$array ) {\n \n \tparse_str( $string, $array );\n \n if ( get_magic_quotes_gpc() ) :\n \t$array = stripslashes_deep($array);\n endif;\n \n\t\treturn $array;\n \n }", "title": "" }, { "docid": "bc586e68db35d6966f9c7f2e6da1abf2", "score": "0.61055934", "text": "public function toArray($contents){\n\t\tstatic::$contents = explode(\"\\n\", $contents);\n\t\t$this::loop();\n\t\treturn static::$contents;\n\t}", "title": "" }, { "docid": "9ed022c54a8ffe18619f12f42bea2e0c", "score": "0.6078191", "text": "static function parse_str( $str ) {\n\t\t# result array\n\t\t$arr = array();\n\n\t\t# split on outer delimiter\n\t\t$pairs = explode( '&', urldecode( $str ) );\n\n\t\t# loop through each pair\n\t\tforeach ( $pairs as $i ) {\n\t\t\t# split into name and value\n\t\t\tlist( $name, $value ) = explode( '=', $i, 2 );\n\n\t\t\t# if name already exists\n\t\t\tif ( isset( $arr[ $name ] ) ) {\n\t\t\t\t# stick multiple values into an array\n\t\t\t\tif ( is_array( $arr[ $name ] ) ) {\n\t\t\t\t\t$arr[ $name ][] = $value;\n\t\t\t\t} else {\n\t\t\t\t\t$arr[ $name ] = array( $arr[ $name ], $value );\n\t\t\t\t}\n\t\t\t} # otherwise, simply stick it in a scalar\n\t\t\telse {\n\t\t\t\t$arr[ $name ] = $value;\n\t\t\t}\n\t\t}\n\n\t\t# return result array\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "14c5f48fc1f3b91ddc7f563dba37fa27", "score": "0.60617596", "text": "public function csvToArray($str){\n $linha = str_replace(\"\\r\\n\",\"\",trim($str));\n return explode(';', $linha);\n }", "title": "" }, { "docid": "92e0a0b984967d7c4813fb15be429b85", "score": "0.60616606", "text": "private function strAsArray(){\n\n\t\t\t\tif(!empty($this->strAsArray)){\n\n\t\t\t\t\treturn $this->strAsArray;\n\n\t\t\t\t}\n\n\t\t\t\t$this->strAsArray\t=\tVector::cast($this->value,$this->parameters);\n\t\t\t\t$this->strAsArray->autoCast(FALSE);\n\n\t\t\t\treturn $this->strAsArray;\n\n\t\t\t}", "title": "" }, { "docid": "04e59c53e1666dff6342728e2f66ee6b", "score": "0.6059776", "text": "public function parse($data)\n\t{\n\t\t$result = array();\n\t\tparse_str($data, $result);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "55f4711f2fbe05846b8d42ed9434ba6c", "score": "0.60459876", "text": "protected function createArray ( $string )\n {\n preg_match_all('/\\*+\\s' . $this->tag_prefix . '([\\w\\d]+)' . $this->tag_postfix . '\\s(.+)\\n/', $string, $matches);\n\n $tags = $matches[1];\n $values = $matches[2];\n\n $array = array();\n\n for ( $count = 0; $count < count($tags); $count++ ) {\n $array[$tags[$count]] = trim($values[$count]);\n }\n\n return $array;\n }", "title": "" }, { "docid": "58659c2983bcfd63f57c146ddaad9eef", "score": "0.6036158", "text": "function textToArray($text)\n {\n $ar = array_slice(unpack(\"C*\", \"\\0\".$text), 1);\n return $ar;\n }", "title": "" }, { "docid": "4f777a3af7aba23b298a469a1fe885d7", "score": "0.60340637", "text": "public static function toArray($text, $seps = \"std\") {\n\tswitch ($seps) {\n\t\tcase \"pnc\": $seps = \".,;:/\\n()\"; break;\n\t\tcase \"std\": $seps = \".,;: \\n()\"; break;\n\t\tcase \"ref\": $seps = \";|\\n\"; break;\n\t}\n\t$sep = str_split($seps);\n\t$txt = str_replace($sep, STR::$sep, $text);\n\t$arr = explode(STR::$sep, $txt);\n\t$out = array();\n\n\tforeach ($arr as $val) {\n\t\t$val = trim($val); if (! $val) continue;\n\t\t$out[$val] = $val;\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "d5a3601ee03258c50243b45ea44a920a", "score": "0.60326403", "text": "function toArray($data, $delimiter = ',')\n {\n $arr = array();\n $arr = explode($delimiter, $data);\n return $arr;\n }", "title": "" }, { "docid": "91c10383e8052900e8b36ece7efaa9cd", "score": "0.602792", "text": "private function stringTagsToArray($tags)\n {\n $tagsArray = explode(\",\",$tags);\n return $tagsArray;\n }", "title": "" }, { "docid": "3494a8490ffe20fd9d0f16aa76244fab", "score": "0.6025778", "text": "public function parse() : array {}", "title": "" } ]
a0c7ee3d6b7b150eeff73ab945200bcf
Set some defaults on the new form
[ { "docid": "fb3f0ef6d23044213019f2389e8fc944", "score": "0.65223926", "text": "public function setSomeDefaults(){\n $form = $this->getMediaInfoForm();\n \n return $this;\n }", "title": "" } ]
[ { "docid": "c8ecc5e00b5d959077ba6fb57e85eb2e", "score": "0.73315126", "text": "protected function loadDefaults(BaseForm $form){}", "title": "" }, { "docid": "600943768244ca7e37b6d9eec93ff43e", "score": "0.7242365", "text": "public function setForm()\n {\n }", "title": "" }, { "docid": "0548f91bc8a92f3d6164848ea32613ba", "score": "0.7165447", "text": "function form_init_data()\n {\n // Pick up the form initialization from the parent form\n parent::form_init_data(false) ;\n\n $this->set_element_value('Position', true) ;\n $this->set_element_value('Description', false) ;\n $this->set_element_value('Duration', true) ;\n $this->set_element_value('Type', false) ;\n $this->set_element_value('Credits', false) ;\n $this->set_element_value('Notes', true) ;\n $this->set_element_value('Duration' . FEFILTER, false) ;\n $this->set_element_value('Duration' . FEFILTERLB, WPST_JOB_DURATION_FULL_MEET) ;\n $this->set_element_value('Type' . FEFILTER, false) ;\n $this->set_element_value('Type' . FEFILTERLB, WPST_JOB_TYPE_VOLUNTEER) ;\n }", "title": "" }, { "docid": "33bce5eb54021a92bc72d7b12caec4f5", "score": "0.7140295", "text": "public function defaults()\n {\n $this->value_text_box = '';\n $this->value_check_box = '';\n $this->value_combo_box = '';\n $this->value_swipe = '';\n }", "title": "" }, { "docid": "c5fea8878f270c23375fa129b781a7bd", "score": "0.7138233", "text": "function form_init_data()\n {\n // Pick up the form initialization from the parent form\n parent::form_init_data(false) ;\n\n //$this->set_element_value('Position', true) ;\n //$this->set_element_value('Description', false) ;\n //$this->set_element_value('Duration', true) ;\n //$this->set_element_value('Type', false) ;\n //$this->set_element_value('Credits', false) ;\n //$this->set_element_value('Notes', true) ;\n //$this->set_element_value('Duration' . FEFILTER, false) ;\n //$this->set_element_value('Duration' . FEFILTERLB, WPST_JOB_DURATION_FULL_MEET) ;\n //$this->set_element_value('Type' . FEFILTER, false) ;\n //$this->set_element_value('Type' . FEFILTERLB, WPST_JOB_TYPE_VOLUNTEER) ;\n }", "title": "" }, { "docid": "237ab0fe1ae9ceccd7a0908dbac479a4", "score": "0.7094832", "text": "public function setForm() {\n\t\t$this->setMethod('post');\n\t\t\n\t\t$this->addPropertyInstructions();\n\t\t$this->addPropertyArea();\n\t\t$this->addFelonyInstructions();\n\t\t$this->addFelonyArea();\t\t\n\n\t\tif( $this->getIsSkippable() ) {\n\t\t\t$this->addSkipButton();\n\t\t}\n\t\t$this->addSubmitButton();\n\t\t$this->setLegend('rentalCriminalHistory');\n\t\t$this->setFormTranslator();\n\t\t$this->setDisplayGroup();\n\t}", "title": "" }, { "docid": "558fb19d4c8b61ab8d5524fadaa71700", "score": "0.70451134", "text": "function form_init_data()\n {\n // Initialize the form fields\n $this->set_hidden_element_value(\"_action\", WPST_ACTION_ADD) ;\n $this->set_element_value(\"Position\", \"Position Title\") ;\n $this->set_element_value(\"Description\", \"Detailed position description.\") ;\n $this->set_element_value(\"Duration\", WPST_JOB_DURATION_FULL_MEET) ;\n $this->set_element_value(\"Location\", WPST_BOTH) ;\n $this->set_element_value(\"Type\", WPST_JOB_TYPE_VOLUNTEER) ;\n $this->set_element_value(\"Credits\", 1) ;\n $this->set_element_value(\"Status\", WPST_ACTIVE) ;\n }", "title": "" }, { "docid": "6bc196b91e6e6e83c489636cdff39f80", "score": "0.7034414", "text": "public function initFromForm()\n\t{\t\t\n\t\t$form = $this->initForm();\n\t\tif($form->checkInput())\n\t\t{\t\t\t\n\t\t\tforeach(array_keys($this->presets) as $id)\n\t\t\t{\n\t\t\t\t$this->presets[$id][1] = false;\n\t\t\t}\n\t\t\tforeach($form->getInput('preset') as $value)\n\t\t\t{\n\t\t\t\tif(isset($this->presets[$value]))\n\t\t\t\t{\n\t\t\t\t\t$this->presets[$value][1] = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->addPreset($value, $value, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->setTitle($form->getInput('title'), $form->getInput('desc'));\n\t\t\t$this->setBlankColumns($form->getInput('blank'));\n\t\t\t$this->showAdmins($form->getInput('show_admins'));\n\t\t\t$this->showTutors($form->getInput('show_tutors'));\n\t\t\t$this->showMembers($form->getInput('show_members'));\t\n\t\t\t\n\t\t\tif($this->id)\n\t\t\t{\n\t\t\t\t$form->setValuesByPost();\n\t\t\t\t\n\t\t\t\tinclude_once \"Services/User/classes/class.ilUserFormSettings.php\";\n\t\t\t\t$settings = new ilUserFormSettings($this->id);\n\t\t\t\t$settings->importFromForm($form);\n\t\t\t\t$settings->store();\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "19f800f512d562d015ef6579b545a1dd", "score": "0.6953692", "text": "function setupForm(&$mform) {\n $mform->addElement('text', $this->_name, $this->_label);\n $mform->setDefault($this->_name, $this->_value);\n }", "title": "" }, { "docid": "24fb3216dd47219c2396a18a8dd7e598", "score": "0.6868147", "text": "private function inject_defaults(){\n\t\tforeach($this->form_fields as $field => &$properties){\n\t\t\tif (!isset(self::$defaults[$field])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$properties['default'] = self::$defaults[$field];\n\t\t}\n\t}", "title": "" }, { "docid": "36419eca594068530e2a2db9ade7dc84", "score": "0.68661064", "text": "public function set()\n\t{\n\t\t$form = $this->form_builder->create_form();\n\n\t\tif ($form->validate())\n\t\t{\n\t\t\t$post = $this->input->post();\n\n\t\t\t$all_saved = TRUE;\n\n\t\t\t/* Loop through table */\n\t\t\tforeach ($post as $name => $value) {\n\t\t\t\t$this->db->reset_query();\n\t\t\t\t$this->db->set('value', $value);\n\t\t\t\t$this->db->where('name', $name);\n\t\t\t\t$saved = $this->db->update('price_defaults');\n\t\t\t\tif (!$saved) $all_saved = FALSE;\n\t\t\t}\n\n\t\t\tif ($all_saved) {\n\t\t\t\t$this->system_message->set_success('All defaults saved!');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->system_message->set_error('Some input were not saved.');\n\t\t\t}\n\n\t\t\trefresh();\n\t\t}\n\n\t\t// Get defaults labels\n\t\t$query = $this->db->get('price_defaults');\n\t\t$this->mViewData['default_labels'] = $query->result_array();\n\n\t\t/* Set Page Title */\n\t\t$this->mPageTitle = 'Defaults';\n\n\t\t$this->mViewData['form'] = $form;\n\t\t$this->render('default/prices');\n\t}", "title": "" }, { "docid": "c95036bc4f85537d4b1688b95aa36240", "score": "0.6816834", "text": "function do_default() {\n $form = $this->get_engine_form();\n if (!$this->can_do_edit()) {\n $form->freeze();\n }\n $this->_form = $form;\n $this->display('default');\n }", "title": "" }, { "docid": "509334c4a6a6bf285bf86606c23ff9b7", "score": "0.6812754", "text": "private function setDefaultHiddenFormFields()\n {\n $this->fb()->add('save', 'submit', array(\n 'attr' => array('class' => 'save'),\n ));\n }", "title": "" }, { "docid": "14896068580c0d54b34e91927e7a7e49", "score": "0.67938954", "text": "public static function set_default_values() {\n\t\t?>\n\t\tcase \"programs-by-college\" :\n\t\t\tfield.label = <?php echo wp_json_encode( esc_html__( 'Program of Interest', 'national-university' ) ); ?>;\n\t\t\tfield.inputs = null;\n\t\t\tfield.isRequired = true;\n\t\t\tbreak;\n\t\t<?php\n\t}", "title": "" }, { "docid": "5607ed0a5d064a9e3063fd6ab7e95ed3", "score": "0.67833966", "text": "function default_form(){\n\n\t$default \t\t= [\n\t\t'image',\n\t\t'title',\n\t\t'price',\n\t\t'condition',\n\t\t'description'\n\t];\n\treturn $default;\n }", "title": "" }, { "docid": "52e027bc065dc633c6b6e00be2e214bd", "score": "0.6761636", "text": "public function setDefaults()\r\n {\r\n $this->configuration = array(\r\n 'description' => $this->name,\r\n 'choices' => array(),\r\n 'choicesError' => 'The field contain bad value',\r\n 'required' => false,\r\n 'requiredError' => 'The field can not be empty',\r\n 'multiply' => false,\r\n 'expanded' => false,\r\n 'explodeValue' => false,\r\n 'explodeSeparator' => ',',\r\n );\r\n }", "title": "" }, { "docid": "2ff7e05a711f69cb8c89a6e728dcbe42", "score": "0.6747147", "text": "function _setFormDef()\r\n {\r\n return parent::_setFormDef();\r\n }", "title": "" }, { "docid": "d73b2a5365807a1fa68333b7821326f5", "score": "0.6726244", "text": "protected function set_defaults(){\n\t\t// declared in defaults.php\t\n\t\tglobal $cloud_form_defaults; \n\t\treturn $cloud_form_defaults;\n\t}", "title": "" }, { "docid": "8e9fdea1da3ecdd1be21bdc2255315f0", "score": "0.6688164", "text": "function form_init_data()\n {\n $this->set_element_value('First Name', true) ;\n $this->set_element_value('Middle Name', false) ;\n $this->set_element_value('Nickname', false) ;\n $this->set_element_value('Last Name', true) ;\n $this->set_element_value('Gender', true) ;\n $this->set_element_value('Birth Date', true) ;\n $this->set_element_value('Age', true) ;\n $this->set_element_value('Age Group', true) ;\n $this->set_element_value('Primary Contact', false) ;\n $this->set_element_value('Secondary Contact', false) ;\n $this->set_element_value('Primary Contact Detail', false) ;\n $this->set_element_value('Secondary Contact Detail', false) ;\n $this->set_element_value('Results', false) ;\n $this->set_element_value('Status', false) ;\n $this->set_element_value('Swimmer Label', true) ;\n $this->set_element_value('Web Site Id', false) ;\n $this->set_element_value('Nickname Override', false) ;\n $this->set_element_value('Internal Id', false) ;\n $this->set_element_value('Results' . FEFILTER, false) ;\n $this->set_element_value('Status' . FEFILTER, true) ;\n $this->set_element_value('Gender' . FEFILTERLB, WPST_GENDER_BOTH) ;\n $this->set_element_value('Status' . FEFILTERLB, WPST_ACTIVE) ;\n $this->set_element_value('Results' . FEFILTERLB, WPST_PUBLIC) ;\n $this->set_element_value('Report', WPST_GENERATE_STATIC_WEB_PAGE) ;\n }", "title": "" }, { "docid": "214934abc84f45c1e21e816bf404ea63", "score": "0.6683019", "text": "private function loadForm()\r\n\t{\r\n\t\t$this->isGod = BackendAuthentication::getUser()->isGod();\r\n\r\n\t\t$this->frm = new BackendForm('settings');\r\n\r\n\t\t// add instagram feed field\r\n\t\t$this->frm->addText('instagram_url', BackendModel::getModuleSetting($this->URL->getModule(), 'instagram_url_' . BL::getWorkingLanguage()));\r\n\t}", "title": "" }, { "docid": "5476d251dfa522740f75b2a45551bf99", "score": "0.6679866", "text": "function setFormValues()\n\t{\n\t\t$config = $this->getOrigConfig();\n\t\t$tpl = &singleton('template');\n\t\t$db = &singleton('database');\n\t\t\n\t\t$tpl->assign('cfgUrlRoot', htmlentities($config['default']['url_root']));\n\t\t$tpl->assign('cfgDocRoot', htmlentities($config['default']['doc_root']));\n\t\t$tpl->assign('cfgActionsDir', htmlentities($config['default']['actions_dir']));\n\t\t$tpl->assign('cfgLangDir', htmlentities($config['default']['lang_dir']));\n\t\t$tpl->assign('cfgLibDir', htmlentities($config['default']['lib_dir']));\n\t\t$tpl->assign('cfgSpecialDir', htmlentities($config['default']['special_dir']));\n\t\t$tpl->assign('cfgPluginsDir', htmlentities($config['default']['plugins_dir']));\n\t\t$tpl->assign('cfgThemesDir', htmlentities($config['default']['themes_dir']));\n\t\t$tpl->assign('userGroups', $this->configUserGroups);\n\t\t$tpl->assign('cfgDefaultGGroup', $config['default']['default_guest_group']);\n\t\t$tpl->assign('cfgDefaultUGroup', $config['default']['default_user_group']);\n\t\t$tpl->assign('cfgMinPwLength', $config['default']['min_password_length']);\n\t\t$tpl->assign('cfgMinUserLength', $config['default']['min_username_length']);\n\t\t$tpl->assign('cfgMaxUserLength', $config['default']['max_username_length']);\n\t\t$tpl->assign('cfgSessLifetime', $config['default']['session_lifetime']);\n\t\t$tpl->assign('cfgCookiePrefix', $config['default']['cookie_prefix']);\n\t\t$tpl->assign('cfgCookiePath', $config['default']['cookie_path']);\n\t\t$tpl->assign('cfgCookieDomain', $config['default']['cookie_domain']);\n\t\t$tpl->assign('cfgCookieSecure', $config['default']['cookie_secure']);\n\t\t$tpl->assign('cfgWikiTitle', htmlentities($config['default']['wiki_title']));\n\t\t$tpl->assign('cfgDefaultPage', htmlentities($config['default']['default_page']));\n\t\t$tpl->assign('cfgLangs', $config['languages']);\n\t\t$tpl->assign('cfgDefaultLang', htmlentities($config['default']['default_lang']));\n\t\t$tpl->assign('cfgThemes', $config['themes']);\n\t\t$tpl->assign('cfgDefaultTheme', htmlentities($config['default']['default_theme']));\n\t\t$tpl->assign('cfgDateFormat', htmlentities($config['default']['date_format']));\n\t\t$tpl->assign('cfgTeaserLength', $config['default']['teaser_length']);\n\t\t$tpl->assign('cfgItemsPP', $config['default']['items_per_page']);\n\t\t$tpl->assign('cfgSummaryLength', $config['default']['max_summary_length']);\n\t\t$tpl->assign('cfgDblclickEditing', $config['default']['dblclick_editing']);\n\t\t$tpl->assign('cfgMailFrom', htmlentities($config['default']['mail_from']));\n\t\t$tpl->assign('cfgMailName', htmlentities($config['default']['mailer_from']));\n\t\t$tpl->assign('cfgNamespaces', $config['namespaces']);\n\t\t$tpl->assign('cfgDefaultNamespace', $config['default']['default_namespace']);\n\t\t$tpl->assign('cfgSpecialNamespace', $config['default']['special_namespace']);\n\t\t$tpl->assign('cfgUserNamespace', $config['default']['users_namespace']);\n\t\t$tpl->assign('cfgEnableUrlRewrite', $config['default']['enable_url_rewriting']);\n\t\t$tpl->assign('cfgUrlFormat', htmlentities($config['default']['url_format']));\n\t\t$tpl->assign('cfgUrlFormatShort', htmlentities($config['default']['url_format_short']));\n\t\t$tpl->assign('cfgRewriteMatch', htmlentities($config['default']['rewrite_rule_match']));\n\t\t$tpl->assign('cfgRewriteReplace', htmlentities($config['default']['rewrite_rule_replace']));\n\t\t$tpl->assign('cfgMaxIncludes', $config['default']['max_includes']);\n\t\t$tpl->assign('cfgIndentWidth', $config['default']['indent_width']);\n\t\t$tpl->assign('cfgLinkNum', $config['default']['link_num']);\n\t\t$tpl->assign('cfgTitleFormat', htmlentities($config['default']['title_format']));\n\t\t$tpl->assign('cfgTitleFormatS', htmlentities($config['default']['title_format_search']));\n\t\t$tpl->assign('cfgSpaceWords', $config['default']['space_wiki_words']);\n\t\t$tpl->assign('cfgDisplayNSpaces', $config['default']['display_namespaces']);\n\t\t$tpl->assign('cfgAutoLink', $config['default']['auto_link']);\n\t\t$tpl->assign('cfgLinkSelf', $config['default']['link_self']);\n\t\t$tpl->assign('cfgThisPage', $config['default']['thispage_interwiki']);\n\t\t$tpl->assign('cfgThisWiki', $config['default']['thiswiki_interwiki']);\n\t\t$tpl->assign('cfgEnableUploads', $config['default']['enable_uploads']);\n\t\t$tpl->assign('cfgUploadTypes', $config['default']['upload_file_types']);\n\t\t$tpl->assign('cfgUploadSize', $config['default']['upload_max_size']);\n\t\t$tpl->assign('cfgUploadThumb', $config['default']['upload_thumb_size']);\n\t}", "title": "" }, { "docid": "641992382bb929d542bf56c5ffa33bed", "score": "0.6638738", "text": "function display_field_set_default(&$mform) {\n if (!empty($default)) {\n $mform->setDefault($this->inputname, $this->field->defaultdata);\n }\n }", "title": "" }, { "docid": "67fedf0a878338d5e188b8385446b56c", "score": "0.6634734", "text": "public function init() {\n $this->setLabelMinWidth(140);\n $this->setTextFieldWidth(250);\n if (is_string($this->_model)) {\n $this->_elementList = $this->createForm($this->_model);\n $submitlabel = 'Add ' . ucfirst($this->_model);\n } else {\n $this->_elementList = $this->createForm($this->_model);\n $tablename = get_class($this->_model);\n $modelname = substr($tablename,strpos($tablename, '_')+1);\n $submitlabel = 'Edit ' . $modelname;\n }\n if ($this->_elementList) {\n foreach ($this->_elementList as $element) {\n $this->addElement($element);\n }\n $this->addSubmit($submitlabel);\n }\n }", "title": "" }, { "docid": "9a6d28d7c4fa58f21e00c8dce06a58a5", "score": "0.66317254", "text": "protected function setDefaultValues() {\n parent::setDefaultValues();\n $this->format = \"default\";\n $this->titleContentType = \"text\";\n $this->descriptionContentType = \"xhtml\";\n $this->textContentType = \"xhtml\";\n }", "title": "" }, { "docid": "315018fe07d17bdfe4f68d87fb69d6b4", "score": "0.6620367", "text": "public function SetTypeSpecificFormValues() {}", "title": "" }, { "docid": "76106efa8f47a440a147ad15ed7915ed", "score": "0.65980846", "text": "public function definition() {\n $mform = $this->_form;\n\n }", "title": "" }, { "docid": "76106efa8f47a440a147ad15ed7915ed", "score": "0.65980846", "text": "public function definition() {\n $mform = $this->_form;\n\n }", "title": "" }, { "docid": "76106efa8f47a440a147ad15ed7915ed", "score": "0.65980846", "text": "public function definition() {\n $mform = $this->_form;\n\n }", "title": "" }, { "docid": "71149c9d19622349d01a141bb36acf61", "score": "0.65939623", "text": "protected function _set_fields() {\n\t\t$this->form_data->user_id = \"\";\n\t\t$this->form_data->first_name = \"\";\n\t\t$this->form_data->last_name = \"\";\n\t\t$this->form_data->email_address = \"\";\n\t\t$this->form_data->status = \"\";\n\t\t$this->form_data->username = \"\";\n\t}", "title": "" }, { "docid": "fc74f615838e7e6b6910793abfd54717", "score": "0.65922236", "text": "function form_init_data() \r\n {\r\n //$this->set_element_value(\"Politica de privacidad\", \"Los datos serán almacenados de forma segura y no se cederán a terceras partes.\");\r\n\t//$this->set_hidden_element_value(\"date_uid\", \"2004-01-01\");\r\n \r\n\treturn;\r\n }", "title": "" }, { "docid": "423fcdfed3471d1888e4bdd830ec456d", "score": "0.6581823", "text": "private function populateForm(){}", "title": "" }, { "docid": "55913e80462419d9bc67bed39d2cebf7", "score": "0.6580836", "text": "public function init_form_fields() {\n $this->form_fields = require( dirname(__FILE__) . '/admin/ekhalti-settings.php' );\n }", "title": "" }, { "docid": "e4a9fcb9ee04df4e91d978c49b34c6df", "score": "0.6575285", "text": "public function defaults() {\n\t\ttry {\n\t\t\tparent::defaults();\n\t\t\t\n\t\t\t$this->_properties->merge(new \\Bedrock\\Common\\Config(array(\n\t\t\t\t'name' => 'field',\n\t\t\t\t'label' => 'Field',\n\t\t\t\t'type' => 'std',\n\t\t\t\t'subtype' => 'text'\n\t\t\t)), true);\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "2c13a8e8543bd7c9eb6dada6a7a8b786", "score": "0.65473956", "text": "public function applyDefaultValues()\n {\n $this->firstname = '';\n $this->lastname = '';\n $this->username = '';\n $this->password = '';\n $this->isadmin = '0';\n $this->mobile = '';\n $this->isoverviewrecipient = '0';\n $this->recievereminderemails = true;\n $this->isbandadmin = '0';\n $this->iseventeditor = '0';\n }", "title": "" }, { "docid": "fc006e8b6b73c89c1142b1f64b235088", "score": "0.6543288", "text": "public function definition()\n {\n global $CFG;\n $mform = $this->_form; // Don't forget the underscore!\n }", "title": "" }, { "docid": "afcbfa9f81c2582bedd793d88831a131", "score": "0.65419185", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n $this->set_hidden_element_value(\"jobid\", $this->getJobId()) ;\n $this->set_hidden_element_value(\"_action\", WPST_ACTION_ALLOCATE) ;\n\n $job = new SwimTeamJob() ;\n $job->loadJobByJobId($this->getJobId()) ;\n\n if (($job->getJobDuration() == WPST_JOB_DURATION_FULL_SEASON)\n || ($job->getJobDuration() == WPST_JOB_DURATION_PARTIAL_SEASON))\n $this->set_element_value(\"Type\", WPST_SEASON) ;\n else\n $this->set_element_value(\"Type\", WPST_SWIMMEET) ;\n $this->set_element_value(\"Quantity\", 1) ;\n }", "title": "" }, { "docid": "908cd86f68892ac6076508dd92d588af", "score": "0.6537164", "text": "function form_init_elements() \r\n {\r\n\r\n $this->add_element($this->_formatElem(\"FEText\", \"Nombre\", \"nomlink\", FALSE, \"70\"));\r\n\t\t$this->add_element($this->_formatElem(\"FEText\",\"Descripción\", \"descrlink\", FALSE, \"100\") );\r\n $this->add_element($this->_formatElem(\"FEText\", \"URL\" , \"urllink\", FALSE, \"50\") );\r\n \r\n //build a large textarea \r\n //$this->add_element( new FETextArea(\"Politica de privacidad\", FALSE, 20, 10,\"400px\", \"100px\" ) );\r\n\t\r\n\t $this->add_element($this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", \"Aceptar\"));\r\n\t $this->add_element($this->_formatElem(\"base_SubmitButton\", \"Cancelar\", \"back\", \"Cancelar\"));\r\n\t\r\n //lets add a hidden form field\r\n //$this->add_hidden_element(\"date_uid\");\r\n \r\n\r\n }", "title": "" }, { "docid": "abc919871b3b008de2a90dfc31368e01", "score": "0.6536835", "text": "public function setDefaults()\n\t{\n\t\t$this->set('language', 'en');\n\t\t$this->set('pubYear', date('Y'));\n\t\t$this->set('publisher', htmlspecialchars($this->_configs->publisher));\n\t\t$this->set('resourceType', 'Dataset');\n\t\t$this->set('resourceTypeTitle', 'Dataset');\n\t\t$this->set('datePublished', date('Y-m-d'));\n\t\t$this->set('dateAccepted', date('Y-m-d'));\n\t}", "title": "" }, { "docid": "f2dc6f5da5841c598ac4caa858348b74", "score": "0.65333426", "text": "public function init_form_fields()\n {\n $this->form_fields = include 'includes/settings-omnipay.php';\n }", "title": "" }, { "docid": "21f4aa631922aeb7c0f1e6cd8a520cbe", "score": "0.65286833", "text": "public function setDefaults() {\n\t\t\tif (!$this->current()->get('created')) {\n\t\t\t\t$this->current()->set('created', date(AppRegistry::get('Database')->getDatetimeFormat()));\n\t\t\t}\n\t\t\tif (!$this->current()->get('password')) {\n\t\t\t\t$this->current()->set('password', md5(time() . rand(1, 10000)));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0f59884f6797d18eabc7118818e28a5e", "score": "0.65278614", "text": "public function init_form_fields()\n {\n $this->form_fields = wc_gateway_waafipay()->admin->init_form_fields();\n }", "title": "" }, { "docid": "4bb21e2aa72941e9efe30fa39dc068de", "score": "0.65233505", "text": "protected function formCreate()\n {\n }", "title": "" }, { "docid": "7b845ca5d5d46e5513eca7e6b2e847dd", "score": "0.65211165", "text": "function hw2contracts_form() {\n $this->form_controller->init();\n }", "title": "" }, { "docid": "231a4d1b1f71db8a001b821fe44f6058", "score": "0.6517195", "text": "function init_form_fields()\n {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __('Enable', 'activeants'),\n 'type' => 'checkbox',\n 'description' => __('Enable this shipping.', 'activeants'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title', 'activeants'),\n 'type' => 'text',\n 'description' => __('Title to be display on site', 'activeants'),\n 'default' => __('ActiveAnts DHL Service Points Shipping', 'activeants')\n ),\n 'shipping_cost' => array(\n 'title' => __('Shipping Cost', 'activeants'),\n 'type' => 'text',\n 'description' => __('Cost of shipping', 'activeants'),\n 'default' => '10'\n )\n );\n }", "title": "" }, { "docid": "4f63152ff5ae753b95e70e31edaae83f", "score": "0.651474", "text": "public function init_form_fields() {\n\t\t$this->form_fields = require(dirname(__FILE__) . '/admin/yuansfer-settings.php');\n\t}", "title": "" }, { "docid": "1a587873958bf95647810f239f96de93", "score": "0.6506646", "text": "function init_form_fields()\n {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => 'Enable/Disable',\n 'type' => 'checkbox',\n 'label' => 'Enable Cyberpay Payment Plugin',\n 'description' => 'Enable or disable the gateway.',\n 'desc_tip' => true,\n 'default' => 'yes'\n ),\n 'Key' => array(\n 'title' => 'Intergation Key',\n 'type' => 'text',\n 'label' => 'Enter Cyberpay Integration Key',\n 'description' => 'Register on the platform(https://merchant.cyberpay.ng) to get Intergration Key',\n 'desc_tip' => true,\n 'default' => ''\n ),\n );\n }", "title": "" }, { "docid": "b350adff794dcdf7d5cc71e062fbdc45", "score": "0.6498952", "text": "public function init()\n {\n $gensetSummary = new Application_Form_GensetSummaryForm();\n $keadaanGenset = new Application_Form_KeadaanGensetForm();\n $pemeriksaanUmum = new Application_Form_PemeriksaanUmumForm();\n $suhuKeluaran = new Application_Form_SuhuKeluaranForm();\n \n $this->addSubForm($gensetSummary, 'gensetSummary');\n $this->addSubForm($keadaanGenset, 'keadaanGenset');\n $this->addSubForm($pemeriksaanUmum, 'pemeriksaanUmum');\n $this->addSubForm($suhuKeluaran, 'suhuKeluaran');\n \n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel('Laporkan');\n \n $batal = new Zend_Form_Element_Button('batal');\n $batal->setLabel('Cancel');\n \n $this->addElements(array($submit, $batal));\n \n }", "title": "" }, { "docid": "de0d5d196dfbca67258f75ec43ae2576", "score": "0.6461408", "text": "function form_init_elements()\n {\n // Re-use all of the elements from the TeamProfile form\n\n parent::form_init_elements() ;\n\n $this->add_hidden_element(\"_action\") ;\n $this->add_hidden_element(\"swimclubid\") ;\n\n $contactname = new FEText(\"Contact Name\", false, \"250px\") ;\n $this->add_element($contactname) ;\n\n $googlemapsurl = new FEUrl(\"Google Maps URL\", false, \"250px\") ;\n $this->add_element($googlemapsurl) ;\n\n $mapquesturl = new FEUrl(\"MapQuest URL\", false, \"250px\") ;\n $this->add_element($mapquesturl) ;\n\n $notes = new FETextArea(\"Notes\", false, 5, 40, \"400px\") ;\n $this->add_element($notes) ;\n\n return ;\n }", "title": "" }, { "docid": "3be32aa3a00fadf7ba2d4ce6bacda5af", "score": "0.645219", "text": "protected function initFormAttributes()\n {\n $this->attributes = [\n 'method' => 'POST',\n 'action' => '',\n 'class' => 'form-horizontal',\n 'accept-charset' => 'UTF-8',\n 'pjax-container' => true,\n ];\n }", "title": "" }, { "docid": "f81e6984b75b9d85aea865dce31d2d02", "score": "0.64479655", "text": "function form_init_data()\n {\n $this->set_hidden_element_value(\"_jobid\", $this->getJobId()) ;\n $this->set_hidden_element_value(\"_action\", WPST_ACTION_UPDATE) ;\n\n $job = new SwimTeamJob() ;\n $job->loadJobByJobId($this->getJobId()) ;\n\n // Initialize the form fields\n $this->set_element_value(\"Position\", $job->getJobPosition()) ;\n $this->set_element_value(\"Description\", $job->getJobDescription()) ;\n $this->set_element_value(\"Notes\", $job->getJobNotes()) ;\n $this->set_element_value(\"Duration\", $job->getJobDuration()) ;\n $this->set_element_value(\"Type\", $job->getJobType()) ;\n $this->set_element_value(\"Location\", $job->getJobLocation()) ;\n $this->set_element_value(\"Credits\", $job->getJobCredits()) ;\n $this->set_element_value(\"Status\", $job->getJobStatus()) ;\n }", "title": "" }, { "docid": "1b8fc40ffed0dabca3c056b112cb4f7e", "score": "0.6440812", "text": "public function init_form_fields() {\n\t\t$this->form_fields = WC_Checkoutcom_Cards_Settings::apple_settings();\n\t\t$this->form_fields = array_merge(\n\t\t\t$this->form_fields,\n\t\t\t[\n\t\t\t\t'screen_button' => [\n\t\t\t\t\t'id' => 'screen_button',\n\t\t\t\t\t'type' => 'screen_button',\n\t\t\t\t\t'title' => __( 'Other Settings', 'checkout-com-unified-payments-api' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "49a514b7ef6318c53342c30e6b1cf5a8", "score": "0.6440052", "text": "public function init()\r\n\t{\r\n\t\t$this->htmlOptions['id']=$this->id;\r\n\t\tif($this->stateful)\r\n\t\t\techo CHtml::statefulForm($this->action, $this->method, $this->htmlOptions);\r\n\t\telse\r\n\t\t\techo CHtml::beginForm($this->action, $this->method, $this->htmlOptions);\r\n\t}", "title": "" }, { "docid": "6cff0ba7838586b7a0a9a1859135de9d", "score": "0.6434494", "text": "protected function InitForm()\n {\n $this->radio = $this->LoadElement();\n \n $this->AddNameField();\n $this->AddValueField();\n $this->AddLabelField();\n $this->AddOptionsField();\n \n $this->AddRequiredField();\n $this->AddDisableFrontendValidationField();\n $this->AddTemplateField();\n $this->AddCssClassField();\n $this->AddCssIDField();\n $this->AddSubmit();\n }", "title": "" }, { "docid": "befccd4d62ac881e6a7b0d6aba5fb511", "score": "0.6433419", "text": "public function set_defaults() {\n\t\tglobal $core;\n\t\t$this->settings['user_id'] = -1;\n\t\t$this->settings['user_name'] = \"Guest\";\n\t\t$this->settings['user_style'] = $core->get('default_style');\n\t\t$this->settings['user_cookie'] = 0;\n\t}", "title": "" }, { "docid": "802ca89bd49d9ea2f315fac166630605", "score": "0.643287", "text": "function init_form_fields()\n {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __('Enable', 'activeants'),\n 'type' => 'checkbox',\n 'description' => __('Enable this shipping.', 'activeants'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title', 'activeants'),\n 'type' => 'text',\n 'description' => __('Title to be display on site', 'activeants'),\n 'default' => __('ActiveAnts Service Points Shipping', 'activeants')\n ),\n 'sandbox_mode' => array(\n 'title' => __('Sandbox Mode', 'activeants'),\n 'type' => 'checkbox',\n 'description' => __('PostNL Sandbox mode.', 'activeants'),\n 'default' => 'yes'\n ),\n 'api_key' => array(\n 'title' => __('API Key', 'activeants'),\n 'type' => 'text',\n 'description' => __('PostNL API Key.', 'activeants'),\n 'default' => ''\n ),\n 'shipping_cost' => array(\n 'title' => __('Shipping Cost', 'activeants'),\n 'type' => 'text',\n 'description' => __('Cost of shipping', 'activeants'),\n 'default' => '10'\n )\n );\n }", "title": "" }, { "docid": "de0f54a5fa920a4f9e698e2d0bcad6ca", "score": "0.6410316", "text": "public function setDefaultValues()\n {\n\n }", "title": "" }, { "docid": "21702aa2b3e3b4885be928dfb76e673e", "score": "0.6409207", "text": "function definition() {\r\n global $CFG, $DB, $OUTPUT, $PAGE;\r\n\r\n $PAGE->force_settings_menu();\r\n\r\n $mform =& $this->_form;\r\n\r\n $mform->addElement('header', 'generalhdr', get_string('general'));\r\n\r\n $mform->addElement('text', 'name', get_string('evaluacionname', 'evaluacion'), array('size'=>'64'));\r\n\r\n // $mform->addElement('text', 'name', get_string('evaluacionname', 'evaluacion'), array('size'=>'64'));\r\n $mform->setType('name', PARAM_TEXT);\r\n $mform->addRule('name', null, 'required', null, 'client');\r\n\r\n $this->standard_intro_elements();\r\n $this->standard_coursemodule_elements();\r\n\r\n $this->add_action_buttons();\r\n }", "title": "" }, { "docid": "d572e1246cab639b814436ec29593a03", "score": "0.6407138", "text": "function __construct($form,$tag,$label=\"\",$usage=\"static\",$html='p') {\n\tparent::__construct($form,$tag,$label,$html,$usage);\n\t$this->value=\"\";\n\t$this->html=$html;\n}", "title": "" }, { "docid": "235d30da2000aecb7bfa055e002af4e0", "score": "0.6406608", "text": "function __construct($name = null){\t\t\n\t\t$this->formName = $name;\t\t\n\t}", "title": "" }, { "docid": "ddbbfa12c014d77ce074937d84d78f30", "score": "0.63909256", "text": "public function buildForm()\n {\n $this\n ->addCollection('default_aid_type', 'Activity\\AidType','default_aid_type')\n ->addAddMoreButton('add', 'default_aid_type');\n }", "title": "" }, { "docid": "a1d1a8976c43bede08a31e1625a6e527", "score": "0.63871527", "text": "function options_form($context) {\n $form = parent::options_form($context);\n $values = $this->fetch_from_context($context);\n \n $form['page_title'] = array(\n '#title' => t('Page title'),\n '#description' => t('Provides the page title.'),\n '#type' => 'textfield',\n '#maxlength' => 255,\n '#default_value' => isset($values['page_title']) ? $values['page_title'] : '',\n );\n \n return $form;\n }", "title": "" }, { "docid": "29f3c7dbdab5567f140f874ee8370849", "score": "0.63822794", "text": "private function __construct()\n {\n if (Form::allValuesSet()) {\n $this->setOptionsQuery();\n $this->set();\n }\n }", "title": "" }, { "docid": "8faf9ae16b1cd73a7efcdd6e0bc4abc6", "score": "0.6377205", "text": "public function __construct()\r\n {\r\n $this->validations = [\r\n 'required',\r\n ];\r\n\r\n // set live validations on field\r\n $this->liveValidations = [\r\n ];\r\n\r\n // set field info\r\n $this->fieldInfo = [\r\n 'help' => '',\r\n ];\r\n\r\n // set presentation view\r\n $this->setPresentation('select_default');\r\n }", "title": "" }, { "docid": "29802c646c300c2f23a01228ad86b779", "score": "0.63686246", "text": "public function definition()\n {\n #get variable to edit the form\n $mform = $this->_form;\n\n #add a textbox called 'name'\n $mform->addElement('text', 'name', get_string('username'));\n\n #set 'name' to type TEXT\n $mform->setType('name', PARAM_TEXT);\n\n #set 'name' default value\n $mform->setDefault('name', get_string('username'));\n\n #add submit and cancel buttons\n $this->add_action_buttons(true, get_string('submit'));\n }", "title": "" }, { "docid": "d148debda8e120c5d9282f7bfa3cb996", "score": "0.636379", "text": "abstract protected function initialize(BaseForm $form);", "title": "" }, { "docid": "68dd1c013619cb688deb6ae377eead0e", "score": "0.6351443", "text": "public function __construct() {\n\n\t\tparent::__construct ( '#__form_forms' );\n\n\t\t$this->_search_fields = array ('id', 'form_name' );\n\n\t\t// Am I in test mode?\n\t\t$session = bfSession::getInstance ();\n\t\t$this->_mode = $session->get ( 'mode' );\n\t}", "title": "" }, { "docid": "976fcba8365aa11ac4d75e8b80079bf5", "score": "0.63495976", "text": "function form_data_preprocessing(&$default_values, $form) {\r\n }", "title": "" }, { "docid": "e67197e9254d198ec8f025c42510d505", "score": "0.6349013", "text": "public function __construct($formName = 'defaultForm')\n {\n $this->baseForm = '';\n $this->formElements = '';\n $this->modelInstance = '';\n $this->formName = $formName;\n $this->isFormProtected = false;\n }", "title": "" }, { "docid": "e7931b0c0f69aa6a52b8b61f7d2e9a87", "score": "0.63439167", "text": "public function newAction() { \t\n \t$this->view->form = $this->_form; \t\n }", "title": "" }, { "docid": "6398f1473744fbafe9f0e417ef3d0533", "score": "0.63263476", "text": "public function form() {\r\n $this->set('fieldPostName', $this->field('value'));\r\n \r\n // Get all possible options (cIDs and collection names)\r\n $options = $this->getAvailablePages();\r\n $this->set('options', $options);\r\n \r\n // Get currently selection values (page IDs)\r\n $selected = is_object($this->attributeValue) ? $this->getAttributeValue()->getValue() : '';\r\n $selected = explode(\"\\n\", trim($selected));\r\n $this->set('selected', $selected);\r\n \r\n $availablePages = $this->getAvailablePages();\r\n $this->set('availablePages', $availablePages);\r\n $this->set('fieldPostName', $this->field('value'));\r\n }", "title": "" }, { "docid": "76276ac616560f2a4f59099d1c9eaa80", "score": "0.6324136", "text": "public function getDefaultForm()\n {\n $page = $this->getDefaultElementConfig('page');\n $page['id'] = 1;\n $page['parentId'] = 0;\n $page['position'] = 0;\n\n $submit = $this->getDefaultElementConfig('submit');\n $submit['id'] = 2;\n $submit['parentId'] = 1;\n $submit['position'] = 0;\n\n $page['elements'] = array($submit);\n\n $notification = Quform_Notification::getDefaultConfig();\n $notification['id'] = 1;\n $notification['name'] = __tr('Admin notification', 'quform');\n $notification['html'] = '{all_form_data}';\n\n $confirmation = Quform_Confirmation::getDefaultConfig();\n $confirmation['id'] = 1;\n $confirmation['name'] = __tr('Default confirmation', 'quform');\n $confirmation['message'] = __tr('Your message has been sent, thanks.', 'quform');\n $confirmation['messageIcon'] = 'qicon-check';\n\n $form = Quform_Form::getDefaultConfig();\n $form['nextElementId'] = 3;\n $form['elements'] = array($page);\n $form['nextNotificationId'] = 2;\n $form['notifications'] = array($notification);\n $form['nextConfirmationId'] = 2;\n $form['confirmations'] = array($confirmation);\n\n $form = apply_filters('quform_default_form', $form);\n\n return $form;\n }", "title": "" }, { "docid": "56a787add4a2a993dc675b2fcea9730f", "score": "0.63201636", "text": "public function init()\n {\n $this->instance_form_fields = include __DIR__ . '/settings-postnl-standard.php';\n $this->title = $this->get_option('title');\n $this->tax_status = $this->get_option('tax_status');\n $this->cost = $this->get_option('cost');\n $this->type = $this->get_option('type', 'class');\n }", "title": "" }, { "docid": "637f2e63c9808017a947020f8292eea4", "score": "0.6313841", "text": "public function init() {\n // Top-level parent\n parent::init();\n $this->applyOmekaStyles();\n $this->setAttrib('id', 'new_task_form');\n $this->setAttrib('method', 'POST');\n $this->setAttrib('action', admin_url(array(), 'IiifItemsReannotate_Tasks_New'));\n // Name\n $this->addElement('text', 'task_name', array(\n 'label' => __(\"Name\"),\n 'description' => __(\"The name for this remapping task.\"),\n 'required' => true,\n ));\n // Source\n $this->addElement('select', 'task_source', array(\n 'label' => __(\"Source\"),\n 'description' => __(\"The source image(s) for this remapping task.\"),\n 'multiOptions' => get_table_options('Collection'),\n 'required' => true,\n ));\n // Target\n $this->addElement('select', 'task_target', array(\n 'label' => __(\"Target\"),\n 'description' => __(\"The target image(s) for this remapping task.\"),\n 'multiOptions' => get_table_options('Collection'),\n 'required' => true,\n ));\n }", "title": "" }, { "docid": "30520e487b60a27d9d6aa79ccbd0ba5d", "score": "0.63129467", "text": "function form_init_data()\n {\n $this->set_hidden_element_value(\"_action\", WPST_ACTION_ADD) ;\n // Default pool length based on plugin settings\n\n $option = get_option(WPST_OPTION_TEAM_POOL_LENGTH) ;\n\n // If option isn't stored in the database, use the default\n if ($option)\n $this->set_element_value(\"Pool Length\", $option) ;\n else\n $this->set_element_value(\"Pool Length\", WPST_DEFAULT_POOL_LENGTH) ;\n\n // Default pool measurement units based on plugin settings\n\n $option = get_option(WPST_OPTION_TEAM_POOL_MEASUREMENT_UNITS) ;\n\n // If option isn't stored in the database, use the default\n\n if ($option)\n $this->set_element_value(\"Units\", $option) ;\n else\n $this->set_element_value(\"Units\", WPST_DEFAULT_MEASUREMENT_UNITS) ;\n // Default pool length based on plugin settings\n\n $option = get_option(WPST_OPTION_TEAM_POOL_LANES) ;\n\n // If option isn't stored in the database, use the default\n if ($option)\n $this->set_element_value(\"Pool Lanes\", $option) ;\n else\n $this->set_element_value(\"Pool Lanes\", WPST_DEFAULT_POOL_LANES) ;\n\n $geography = get_option(WPST_OPTION_GEOGRAPHY) ;\n\n if ($geography == WPST_US_ONLY)\n {\n $this->set_element_value(\"Country\", ucwords(WPST_US_ONLY)) ;\n $this->set_element_value(get_option(WPST_OPTION_USER_STATE_OR_PROVINCE_LABEL),\n get_option(WPST_OPTION_TEAM_STATE_OR_PROVINCE)) ;\n }\n\n }", "title": "" }, { "docid": "e4d50f6accc921ef11938e236525f53f", "score": "0.63108844", "text": "protected function get_initial_form_values()\n {\n // Create a new empty object, which will story each of the form's defaults.\n $data = new stdClass();\n\n // And specify the base defaults: every field is empty, and the user's message format is the same as their preferred mail format.\n $data->id = null;\n $data->subject = '';\n $data->message = '';\n $data->mailto = '';\n $data->format = $this->user->mailformat;\n\n // Create copies of the following two fields in the format that Moodle expects.\n $data->messagetext = $data->message;\n $data->messageformat = $data->format;\n\n // Return the newly created defaults.\n return $data;\n }", "title": "" }, { "docid": "48d2a7144a782a5e3d2fa8d2228e70b5", "score": "0.629357", "text": "public function init_form_fields() {\n\t\t$this->form_fields = require( GWS_WC_PLUGIN_PATH . '/includes/admin/gws-settings.php' );\n\t}", "title": "" }, { "docid": "42c2b2e3050f8058ef216241abf42d56", "score": "0.6292394", "text": "public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'carton' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable Mijireh Checkout', 'carton' ),\n\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'access_key' => array(\n\t\t\t\t'title' => __( 'Access Key', 'carton' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'The Mijireh access key for your store.', 'carton' ),\n\t\t\t\t'default' => '',\n\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'carton' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'carton' ),\n\t\t\t\t'default' => __( 'Credit Card', 'carton' ),\n\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', 'carton' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'default' => __( 'Pay securely with your credit card.', 'carton' ),\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'carton' ),\n\t\t\t\t),\n\t\t);\n }", "title": "" }, { "docid": "19a27f82f5f7654fd1e5f1d9d00646d3", "score": "0.62882286", "text": "public function initRegistrationForm()\n {\n }", "title": "" }, { "docid": "c8e68b0e01867ab1abf775e290c4eb40", "score": "0.6280382", "text": "function hrc_form($form, &$form_state) {\n\t\t$s1 = new hrc_settings();\n\t\t$hrcSettings = $s1->hrc_settings();\n\t\t\n\t\tforeach($hrcSettings as $key => $setting){\n\t\t\t$form[$setting['name']] = array(\n\t\t\t'#default_value' => variable_get($setting['name']),\n\t\t\t'#title' => t($setting['title']),\n\t\t\t'#type' => $setting['field_type'],\n\t\t\t'#required' => TRUE,\n\t\t\t);\n\t\t}\t\t\t\t\n\t\t\n\treturn system_settings_form($form);\n\t}", "title": "" }, { "docid": "88d4c64e3f99856b309e9b8c113e4cc7", "score": "0.62707174", "text": "public function __construct($formName, $options = array()) {\n\n parent::__construct($options);\n\n $this->formName = $formName;\n\n // try to determine a default url to post the form to\n if (!isset($_SERVER['SCRIPT_NAME'])) {\n $scriptName = '';\n trigger_error('Input Error: Failed to determine the form_url for the current object.', E_USER_WARNING);\n } else {\n // 20100707 CSN this does not work in Kohana: $scriptName = $_SERVER['SCRIPT_NAME'];\n $scriptName = '';\n }\n\n // assign options that need defaults\n $possibleOptions = array(\n 'display_form_tag' => true,\n 'display_submit' => true,\n 'form_type' => 'post',\n 'mode' => 'save',\n 'replace_spaces' => false,\n 'form_url' => $scriptName,\n 'on_submit_event' => false,\n 'field_name_prefix' => '', // for all fields, default is no prefix\n 'enable_post_array' => true,\n 'hidden' => array(),\n 'form_name' => 'claeroForm',\n 'form_id' => 'claeroForm',\n 'date_expired_column' => CLAERO_EDIT_EXPIRY_COLUMN,\n 'modify_foreign' => false,\n 'multiple_edit_layout' => 'horizontal',\n 'checkmark_icons' => true,\n 'text_area_br' => false,\n 'prepare_fields_without_values' => false,\n 'user_action' => false,\n 'process_files' => true,\n 'additional_multiple' => array(),\n 'md5_password' => true,\n 'add_file_prefix' => true,\n 'ignore_empty_data' => false,\n 'custom_select_expressions' => array(),\n 'allowed_fields' => null,\n 'dont_allow_fields' => null,\n 'is_for_html' => true,\n 'select_default_0' => true,\n 'force_insert' => false,\n 'include_id_in_insert' => false,\n 'table_options' => array(), // array of options merged with defaults for ClaeroTable\n 'file_options' => array(), // array of options merge with defaults for ClaeroFile, can be overriden with the 'override_meta' => 'file_options' => array()\n // ^ additional option key 'destination' used for the destination file name use in ClaeroFile::Upload()\n // these are used as a global value for all the fields\n 'load_defaults' => true, // this overrides all the table & column specific settings, unless sent in as an option specifically for the table or column\n 'claero_field_options' => array(), // settings to send to ClaeroField object for all fields, overriden by override_meta\n // these are used for overriding meta data\n 'override_meta' => array(),\n // ^ this can have a sub array 'claero_field_options' that gets merged with the default options determine within PrepareForm() overriding those values\n // ^ this can have a sub array 'file_options' that gets merged with the default and global ('file_options') options sending them to ClaeroFile (has the same options as the global file_options)\n // ^ this can also include 'modify_foreign'\n 'meta' => array(), // same as override_meta, just shorter; replaces all values of override_meta\n 'include_fields' => array(),\n 'exclude_fields' => array(),\n // these are used when inserting or updating and will be in the format of data => array(table_name => array(columns))\n 'data' => array(),\n 'simple_data' => array(),\n 'data_merge' => array(),\n );\n $this->SetObjectOptions($options, $possibleOptions);\n\n // set default table options (others are set in ClaeroTable class)\n $tableOptions = array(\n 'cellspacing' => 1,\n 'cellpadding' => 2,\n 'odd_even' => true,\n 'table_id' => 'claeroEdit',\n 'table_class' => 'claeroEdit',\n 'populate_all_cols' => false,\n );\n $this->options['table_options'] = array_merge($tableOptions, $this->options['table_options']);\n\n // set default file options (others are set in ClaeroFile class)\n $fileOptions = array(\n 'private_flag' => false,\n 'file_location' => 'uploads',\n 'original_filename_column' => 'original_filename', // the location to store the user file name (if false, then it will not be stored)\n 'download_file' => PRIVATE_DOWNLOAD_FILE,\n 'delete_files' => false,\n 'file_url' => '',\n 'download_file_size' => null,\n 'desination_file' => '',\n );\n $this->options['file_options'] = array_merge($fileOptions, $this->options['file_options']);\n\n $this->claeroFieldObject = isset($options['claero_field_object']) && class_exists($options['claero_field_object']) ? $options['claero_field_object'] : 'ClaeroField';\n if (!empty($this->options['meta'])) $this->options['override_meta'] = $this->options['meta'];\n\n $this->mode = $this->options['mode'];\n\n if (!empty($this->options['simple_data'])) {\n $this->options['data'] = array(\n $formName => $this->options['simple_data'],\n );\n }\n\n // use the $_POST data or the optional data array if set for the raw data\n if (count($this->options['data']) > 0) {\n // if there is \"data_merge\" then merge this array with the data that was received\n if (!empty($this->options['data_merge'])) {\n $this->rawData = ArrayMergeClobber($this->options['data'], $this->options['data_merge']);\n } else {\n $this->rawData = $this->options['data'];\n }\n } else if (isset($_POST[CLAERO_REQUEST_RECORD])) {\n // if there is \"data_merge\" then merge this array with the data that was found in the $_POST\n if (!empty($this->options['data_merge'])) {\n $this->rawData['record'] = ArrayMergeClobber($_POST[CLAERO_REQUEST_RECORD], $this->options['data_merge']);\n } else {\n $this->rawData['record'] = $_POST[CLAERO_REQUEST_RECORD];\n }\n } else if ($this->mode == 'save') {\n if (!$this->options['ignore_empty_data']) trigger_error('Input Error: No data received for saving record (insert or update)', E_USER_ERROR);\n }\n\n $this->ProcessMetaData(); // process the meta data and populate $this->formData\n\n $this->ProcessRelationships(); // process the foreign relationships, need to ProcessMetaData() first\n //echo \"<h3>this->singleRelationships</h3>\";\n //PrintR($this->singleRelationships);\n //echo \"<h3>this->multipleRelationships</h3>\";\n //PrintR($this->multipleRelationships);\n //echo \"<h3>this->relationships</h3>\";\n //PrintR($this->relationships);\n\n $this->ProcessIds($options); // process the ids and populate $this->ids, need to ProcessRelationships() first\n //PrintR($this->ids);\n\n // populate the record count if their are more than one id\n if (count($this->ids) > 0) {\n reset($this->ids);\n $firstTable = key($this->ids); // get a table out of the id array (doesn't matter what table)\n $this->recordCount = count($this->ids[$firstTable]);\n }\n\n if ($this->GetStatus()) {\n switch($this->mode) {\n case 'edit' :\n case 'add' :\n case 'search' :\n case 'add_row' :\n case 'edit_multiple' :\n case 'edit_request' :\n $this->PrepareForm();\n break;\n case 'save' : // this is the default if no mode is specified\n $this->SaveRecord();\n break;\n case 'delete' :\n $this->DeleteRecord();\n break;\n case 'view' :\n $this->PrepareView();\n break;\n default : // will never happen because 'save' is the default value\n break;\n } // switch\n } else {\n trigger_error('Object Error: During the preparation of the ClaeroEdit object, there was an error that set the status as false and therefore the requested action cannot be performed.', E_USER_ERROR);\n }\n\n }", "title": "" }, { "docid": "db1d7af386e953faeb4393f3f6465b36", "score": "0.6268949", "text": "private function default_settings() {\n\t\tsettings_fields( '%%TEXTDOMAIN%%_settings' );\n\t\t?>\n\t\t<h2>Default Settings</h2>\n\t\tSet default form values for plugin.\n\t\t<table class=\"form-table\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Setting One</th>\n\t\t\t\t\t<td><input type=\"number\" name=\"%%TEXTDOMAIN%%_settings[one]\" value=\"<?php esc_attr_e( $this->settings['one'] )?>\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Setting Two</th>\n\t\t\t\t\t<td><input type=\"number\" name=\"%%TEXTDOMAIN%%_settings[two]\" value=\"<?php esc_attr_e( $this->settings['two'] )?>\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Setting Three</th>\n\t\t\t\t\t<td><input type=\"number\" name=\"%%TEXTDOMAIN%%_settings[three]\" value=\"<?php esc_attr_e( $this->settings['three'] )?>\"></td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?php\n\t}", "title": "" }, { "docid": "64c6e7a83fefee85b779ab822dc34f46", "score": "0.626347", "text": "function __construct() {\n $this->form_details_id = 0;\n $this->form_name = '';\n $this->order_by = 0;\n }", "title": "" }, { "docid": "20fe096d5c5652f853e51bbfa8a02fed", "score": "0.6255637", "text": "protected function InitAllForms() {}", "title": "" }, { "docid": "2cb7fdd2b2ccb8558143d8808fda1d92", "score": "0.62468606", "text": "public function form_setup() {\n\t\tadd_meta_box(\n\t\t\t'rtsettings',\n\t\t\t'ReviveToday Theme Settings',\n\t\t\tfunction( $post ) {\n\t\t\t\t$rt_dlu = (int) get_post_meta( $post->ID, 'rt_show_last_updated', true );\n\t\t\t\t$rt_dsb = (int) get_post_meta( $post->ID, 'rt_show_sharing_buttons', true );\n\t\t\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"rt_nonce\" value=\"<?php echo esc_attr( wp_create_nonce( 'rt_nonce' ) ); ?>\">\n\t\t\t\t<div>\n\t\t\t\t\t<input type=\"checkbox\" name=\"rt_displastupdated\" value=\"1\" <?php checked( $rt_dlu, 1 ); ?> />\n\t\t\t\t\t<label for=\"rt_displastupdated\">Show last updated</label>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<input type=\"checkbox\" name=\"rt_dispsharingbuttons\" value=\"1\" <?php checked( $rt_dsb, 1 ); ?> />\n\t\t\t\t\t<label for=\"rt_dispsharingbuttons\">Show sharing buttons</label>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t},\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\n\t}", "title": "" }, { "docid": "37b09abc33703e1717ee619e48723e73", "score": "0.6234709", "text": "public function initRecoveryPasswordForm()\n {\n }", "title": "" }, { "docid": "65d7a603025edb3555d529d300b1dfe4", "score": "0.6230425", "text": "public function restoreFormFields()\n\t\t\t{\n\t\t\t\t$this->setFormField('subject', '');\n\t\t\t\t$this->setFormField('message', '');\n\t\t\t}", "title": "" }, { "docid": "270749a7f532addaa024ad47f7caad37", "score": "0.62237555", "text": "protected function get_initial_form_values()\n {\n // Create a new empty object, which will story each of the form's defaults.\n $data = new stdClass();\n\n // And specify the base defaults: every field is empty, and the user's message format is the same as their preferred mail format.\n $data->id = null;\n $data->subject = '';\n $data->message = $this->get_quoted_question_summary();\n $data->mailto = '';\n $data->format = $this->user->mailformat;\n\n // Create copies of the following two fields in the format that Moodle expects.\n $data->messagetext = $data->message;\n $data->messageformat = $data->format;\n\n // Return the newly created defaults.\n return $data;\n }", "title": "" }, { "docid": "bc1bac85436814596405246ef0686de1", "score": "0.621204", "text": "public function init_form_fields()\n {\n $this->form_fields = include plugin_dir_path(__FILE__) . 'includes/settings-orangepay.php';\n }", "title": "" }, { "docid": "7e3fea04c94ab281674a601dab0056c9", "score": "0.6209222", "text": "public function defaults()\n {\n $this->settings = new ControlsPreferencesSettingsBranch();\n }", "title": "" }, { "docid": "4cda20578a5b045032fbf0de7f3c82fe", "score": "0.6206888", "text": "public function setFields()\n {\n $this->fields = array(\n\n 'email' => array(\n 'type' => 'tags',\n 'label' => t('label.email'),\n 'js_opts' => array(\n 'defaultText'=> 'Add Email',\n 'width' => '27%',\n 'height' => 'auto',\n ),\n ),\n\n 'group' => array(\n 'type' => 'select',\n 'label' => t('contact::contact.labels.group'),\n 'option' => Helper::getUserGroup()\n ),\n\n 'subject' => array(\n 'type' => 'text',\n 'label' => t('contact::contact.labels.subject'),\n 'rule' => 'required',\n ),\n\n 'message' => array(\n 'type' => 'textarea',\n 'label' => t('contact::contact.labels.message'),\n 'rule' => 'required',\n ),\n\n 'attachment' => array(\n 'type' => 'file',\n 'label' => t('contact::contact.labels.attachment'),\n ),\n );\n\n $this->submit = array('submit' => array(\n 'value' => t('contact::contact.labels.send'),\n ));\n\n $this->cancel = array(\n 'url' => 'admin/contact',\n 'class' => 'btn btn-blue'\n );\n }", "title": "" }, { "docid": "025234e74f2d477157f6a5c6c98160bd", "score": "0.61939925", "text": "public function init_form_fields()\n {\n \n $this->form_fields = array(\n 'enabled' => array(\n 'title' => 'Enable/Disable',\n 'label' => 'Enable Korapay Gateway',\n 'type' => 'checkbox',\n 'description' => 'Enable Korapay as a payment option on the checkout page',\n 'default' => 'no',\n 'desc_tip' => true\n ),\n 'title' => array(\n 'title' => 'Title',\n 'type' => 'text',\n 'description' => 'This controls the payment method title which the user sees during checkout.',\n 'default' => 'Debit/Credit Cards',\n 'desc_tip' => true\n ),\n 'description' => array(\n 'title' => 'Description',\n 'type' => 'textarea',\n 'description' => 'This controls the payment method description which the user sees during checkout.',\n 'default' => 'Initialize payment with your credit or debit cards'\n ),\n 'secret_key' => array(\n 'title' => 'Secret Key',\n 'description' => 'Enter your secret key here',\n 'type' => 'text'\n ),\n 'public_key' => array(\n 'title' => 'Public Key',\n 'type' => 'text',\n 'description' => 'Enter your public key here'\n )\n );\n \n \n }", "title": "" }, { "docid": "44be22ffc6a621bbdbdcf650f3e924ac", "score": "0.6191494", "text": "public function setDefault() {\n\t}", "title": "" }, { "docid": "83c21677263b101d1c5fbcb2d5b4f571", "score": "0.6189666", "text": "function __construct() {\n\t\t$this->form = array();\n\t\t$this->form_attr = array(\"method\"=>\"post\");\n\t\t$this->init_done = false;\n\t}", "title": "" }, { "docid": "b9087fb278745de69b7d94200b30f096", "score": "0.61895126", "text": "function form_init_data()\n {\n // Re-use the parent form_init_data()\n\n parent::form_init_data() ;\n\n $this->set_hidden_element_value(\"_action\", WPST_ACTION_UPDATE) ;\n\n $sc = new SwimClubProfile() ;\n $sc->loadSwimClubBySwimClubId($this->getSwimClubId()) ;\n\n $this->set_hidden_element_value(\"swimclubid\", $this->getSwimClubId()) ;\n\n // Initialize the form fields\n $this->set_element_value(\"Team Name\", $sc->getTeamName()) ;\n $this->set_element_value(\"Club or Pool Name\", $sc->getClubOrPoolName()) ;\n $this->set_element_value(\"Pool Length\", $sc->getPoolLength()) ;\n $this->set_element_value(\"Units\", $sc->getPoolMeasurementUnits()) ;\n $this->set_element_value(\"Pool Lanes\", $sc->getPoolLanes()) ;\n\n $this->set_element_value(\"Street 1\", $sc->getStreet1()) ;\n $this->set_element_value(\"Street 2\", $sc->getStreet2()) ;\n $this->set_element_value(\"Street 3\", $sc->getStreet3()) ;\n $this->set_element_value(\"City\", $sc->getCity()) ;\n\n $label = get_option(WPST_OPTION_USER_STATE_OR_PROVINCE_LABEL) ;\n $this->set_element_value($label, $sc->getStateOrProvince()) ;\n\n $label = get_option(WPST_OPTION_USER_POSTAL_CODE_LABEL) ;\n $this->set_element_value($label, $sc->getPostalCode()) ;\n\n $this->set_element_value(\"Country\", $sc->getCountry()) ;\n\n $this->set_element_value(\"Primary Phone\", $sc->getPrimaryPhone()) ;\n $this->set_element_value(\"Secondary Phone\", $sc->getSecondaryPhone()) ;\n $this->set_element_value(\"Contact Name\", $sc->getContactName()) ;\n $this->set_element_value(\"Email Address\", $sc->getEmailAddress()) ;\n $this->set_element_value(\"Web Site\", $sc->getWebSite()) ;\n $this->set_element_value(\"Google Maps URL\", $sc->getGoogleMapsURL()) ;\n $this->set_element_value(\"MapQuest URL\", $sc->getMapQuestURL()) ;\n $this->set_element_value(\"Notes\", $sc->getNotes()) ;\n }", "title": "" }, { "docid": "3de63ab9028727891560b533a38fee59", "score": "0.61834943", "text": "public function form() {\n\t\t$this->load();\n\n\t\t// get selected pages\n\t\t$db = Loader::db();\n\t\t$selectedPages = $this->getValue();\n\t\t$this->set('selectedPages', $selectedPages);\n\t}", "title": "" }, { "docid": "487b0da7e0e2a7abf5cb80fee56afc5d", "score": "0.61807877", "text": "private function setDefaults(){\n\t\t$this->email = NULL;\n\t\t$this->img = NULL;\n\t}", "title": "" }, { "docid": "d6faa6f267421d245c18c2f888e48a9c", "score": "0.6179402", "text": "public function definition() {\r\n\t\tglobal $CFG;\r\n\r\n\t\t$mform = $this->_form; // Don't forget the underscore!\r\n\r\n\t\t$mform->addElement('text', 'name', 'Nombre');\r\n\t\t$mform->setType('name', PARAM_TEXT);\r\n\r\n\t\t$mform->addElement('date_time_selector', 'timestart', get_string('from'));\r\n\t\t$mform->setType('timestart', PARAM_NOTAGS );\r\n\r\n\t\t$this->add_action_buttons();\r\n\t}", "title": "" }, { "docid": "90ff51fb663d99e325ad47f000700717", "score": "0.61716396", "text": "public function getSettingsForm();", "title": "" }, { "docid": "abaf7b366a9ef7498530366d1b210956", "score": "0.61698174", "text": "function options_form() {\n return array(\n 'url' => array(\n '#type' => 'textfield',\n '#title' => t('Base URL (template)'),\n '#default_value' => isset($this->data['url']) ?\n $this->data['url'] : ''\n ),\n 'layer_type' => array(\n '#type' => 'hidden',\n '#value' => 'openlayers_layer_type_osm_custom'\n ),\n );\n }", "title": "" }, { "docid": "9736ccd843d0d3dd820166f7cb9fa923", "score": "0.6161508", "text": "static function setDefaults()\n\t{\n\t}", "title": "" } ]
1a649508c935ff80281ed5d44ed0355a
rejects an Input Object type with resolver constant
[ { "docid": "bee004e1b752987b5b89b396d0020259", "score": "0.68411154", "text": "public function testRejectsAnInputObjectTypeWithIncorrectlyTypedResolver()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => [\n 'f' => [\n 'type' => stringType(),\n 'resolve' => ''\n ],\n ],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeInputObject.f field type has a resolve property, ' .\n 'but Input Types cannot define resolvers.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType->getFields();\n\n $this->addToAssertionCount(1);\n }", "title": "" } ]
[ { "docid": "b01e45a651ea91eeeffefd0ef6f86c2b", "score": "0.6583864", "text": "public function testRejectsAnInputObjectTypeWithResolvers()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => [\n 'f' => [\n 'type' => stringType(),\n 'resolve' => function () {\n return 0;\n }\n ],\n ],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeInputObject.f field type has a resolve property, ' .\n 'but Input Types cannot define resolvers.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType->getFields();\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "d4f04d2617883706f44fb2edaec6a5e0", "score": "0.5805855", "text": "public function validate(\\GraphQL\\Type\\Definition\\InputObjectType $inputObj) : void\n {\n }", "title": "" }, { "docid": "f2dbd7058d3fa7d06f1142fc3ef8d722", "score": "0.57253563", "text": "function rest_sanitize_object($maybe_object)\n {\n }", "title": "" }, { "docid": "8b3320a0446614915c806cd619f91cf4", "score": "0.5562416", "text": "public function testRejectsAnInterfaceWithAnIncorrectTypeForResolveType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objectWithIsTypeOf = newObjectType([\n 'name' => 'ObjectWithIsTypeOf',\n 'fields' => ['f' => ['type' => stringType()]],\n 'isTypeOf' => function () {\n return true;\n }\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeUnion must provide \"resolveType\" as a function.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newUnionType([\n 'name' => 'SomeUnion',\n 'types' => [$objectWithIsTypeOf],\n 'resolveType' => ''\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "f7f867794786dac4ecb63307344b9cae", "score": "0.5471815", "text": "private static function validate_type( $object_type ) {\n\t\tif ( ! in_array( $object_type, array( 'post', 'term' ), true ) ) {\n\t\t\tthrow WPSEO_Invalid_Argument_Exception::invalid_type( $object_type );\n\t\t}\n\t}", "title": "" }, { "docid": "d61b8fcee24433de5d3e53e0c389f613", "score": "0.54676014", "text": "public function checkObject(): object\n {\n if (!is_object($this->getValue())) {\n throw new TypeInvalidException('object', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "title": "" }, { "docid": "ad27e745a8adda031788a5ea8fe97b18", "score": "0.54536754", "text": "public function isNoValidationTypeDetermined($object): bool;", "title": "" }, { "docid": "734caf2bc9877e0e83289d0e2d9054a6", "score": "0.54271215", "text": "private function checkAccepted(object $object): void\n {\n if (!$object instanceof $this->accepted) {\n throw new InvalidTypeException($this->accepted, get_class($object));\n }\n }", "title": "" }, { "docid": "7f51f6985a919cf5efffe9b5082bf34b", "score": "0.5376397", "text": "static private function checkRequirments($object) {\n if (!is_object($object)) {\n self::fail('Must pass an object');\n }\n if (!self::getConfig('allowBlank') && empty((array)$object)) {\n self::fail('Empty object, and allowBlank is disabled');\n }\n if (!isset($object->_id) || empty($object->_id)) {\n $object->_id = self::getId();\n }\n if (!isset($object->_type) || empty($object->_type)) {\n $object->_type = self::getType($object);\n }\n return $object;\n }", "title": "" }, { "docid": "133b8cde4e63937f0e8327b974908974", "score": "0.52933085", "text": "public function testRejectsAnInputObjectTypeWithFieldsFunctionThatReturnsIncorrectType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => function () {\n return '';\n },\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeInputObject fields must be an associative array with field names as keys or a ' .\n 'function which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType->getField('f');\n }", "title": "" }, { "docid": "1caa6e6a0e564b16eb4e382b6417757a", "score": "0.5247406", "text": "public function testRejectsAnInputObjectTypeWithIncorrectFields()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => '',\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeInputObject fields must be an associative array with field names as keys or a ' .\n 'function which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType->getField('f');\n }", "title": "" }, { "docid": "c84f6dbeba18a86154882bf91f3735dd", "score": "0.52324647", "text": "public function testRejectsAnObjectTypeWithAnIncorrectTypeForIsTypeOf()\n {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('AnotherObject must provide \"isTypeOf\" as a function.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newObjectType([\n 'name' => 'AnotherObject',\n 'fields' => ['f' => ['type' => stringType()]],\n 'isTypeOf' => '',\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "7f3069348e38c1050ccb42dd39541ac5", "score": "0.52022153", "text": "public function testMorphClassSearchTypeErrorThrowsError()\n {\n $invalidParam = Registry::getDefinition(null);\n }", "title": "" }, { "docid": "084efdb7426eca33938693b931c450c3", "score": "0.5167611", "text": "public function testAcceptsAnInputObjectTypeWithFields()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $field = $inputObjectType->getField('f');\n $this->assertEquals(stringType(), $field->getType());\n }", "title": "" }, { "docid": "a42c8b8d97bd8d5b08ac0a199b2923fe", "score": "0.51479834", "text": "public function testRejectsAnObjectTypeWithIncorrectlyTypedFieldArgs()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'fields' => [\n 'badField' => [\n 'type' => stringType(),\n 'args' => [['badArg' => stringType()]],\n ],\n ],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeObject.badField args must be an object with argument names as keys.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getFields();\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "b70705aaa15f873cf941f6be11b27746", "score": "0.5145078", "text": "abstract protected function getValidType(): string;", "title": "" }, { "docid": "9c0058f00c1b4772d0065d04d4ed54a5", "score": "0.513153", "text": "public function testRejectsASchemaWhichDefinesAnObjectTypeTwice()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $a = newObjectType([\n 'name' => 'SameName',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $b = newObjectType([\n 'name' => 'SameName',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $queryType = newObjectType([\n 'name' => 'Query',\n 'fields' => [\n 'a' => ['type' => $a],\n 'b' => ['type' => $b],\n ]\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'Schema must contain unique named types but contains multiple types named \"SameName\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n newSchema(['query' => $queryType]);\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "5b413846dd109756cf1b849000aabb3b", "score": "0.50705767", "text": "public function testRejectsASchemaWhichDefinesABuiltInType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $fakeString = newScalarType([\n 'name' => 'String',\n 'serialize' => function () {\n return null;\n },\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $queryType = newObjectType([\n 'name' => 'Query',\n 'fields' => [\n 'normal' => ['type' => stringType()],\n 'fake' => ['type' => $fakeString],\n ]\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'Schema must contain unique named types but contains multiple types named \"String\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n newSchema(['query' => $queryType]);\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "0dd8333013215ce3462e5aa8c20d931d", "score": "0.5054936", "text": "public function validateResolved();", "title": "" }, { "docid": "0dd8333013215ce3462e5aa8c20d931d", "score": "0.5054936", "text": "public function validateResolved();", "title": "" }, { "docid": "c186f18617f5a8bfed709e6e103e539e", "score": "0.50267667", "text": "public function scrubObject(object $data) : object;", "title": "" }, { "docid": "1ee823d9b2459f5757b5a9dff4d9ade2", "score": "0.5025513", "text": "public function testRejectsAnObjectTypeWithInterfacesAsAFunctionReturningAnIncorrectType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'interfaces' => function () {\n return '';\n },\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeObject interfaces must be an array or a function which returns an array.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getInterfaces();\n }", "title": "" }, { "docid": "3ad25be56be45e8cb41e8b8661948ca2", "score": "0.5016852", "text": "public function testRejectsAnInterfaceTypeWithAnIncorrectTypeForResolveType()\n {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('AnotherInterface must provide \"resolveType\" as a function.');\n /** @noinspection PhpUnhandledExceptionInspection */\n newInterfaceType([\n 'name' => 'AnotherInterface',\n 'resolveType' => '',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n }", "title": "" }, { "docid": "5c62ceff473716e26570da756c31ce45", "score": "0.49936646", "text": "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# check\n\t\treturn in_array($this->object_type, $objects) ? true : false;\n\t}", "title": "" }, { "docid": "3af24b7e70e7e6f5fb3be4571f743fa6", "score": "0.4992924", "text": "public function testResolveType() {\n\t\t$definition = $this->getDefinitionMock('User', 'a User description', [\n\t\t\t'fetchable' => [\n\t\t\t\t'id' => Type::nonNull(Type::id()),\n\t\t\t\t'name' => Type::string()\n\t\t\t]\n\t\t]);\n\n\t\t$this->specify('tests that the resolveType will return an ObjectType', function () use ($definition) {\n\t\t\t$object = $definition->resolveType();\n\n\t\t\t$this->assertInstanceOf(ObjectType::class, $object);\n\t\t\t$this->assertTrue(is_callable($object->config['fields']));\n\t\t});\n\n\t\t$this->specify('tests that the resolveType will have corresponding fields, name and description', function () use ($definition) {\n\t\t\t$object = $definition->resolveType();\n\t\t\t$fields = call_user_func($object->config['fields']);\n\n\t\t\t$this->assertSame('User', $object->name);\n\t\t\t$this->assertSame('a User description', $object->description);\n\t\t\t$this->assertArraySubset([\n\t\t\t\t'id' => ['type' => Type::nonNull(Type::id())],\n\t\t\t\t'name' => ['type' => Type::string()]\n\t\t\t], $fields);\n\t\t});\n\t}", "title": "" }, { "docid": "64dda8135fac06c7a090cf1feede0aa5", "score": "0.49293464", "text": "public function testRejectsAnObjectTypeWithIncorrectlyTypedInterfaces()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'interfaces' => '',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeObject interfaces must be an array or a function which returns an array.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getInterfaces();\n }", "title": "" }, { "docid": "c00ed569bd142c7a15c441c8e83ba8b3", "score": "0.4927035", "text": "function rest_is_object($maybe_object)\n {\n }", "title": "" }, { "docid": "0bc7374733fb9d8746594eb436adb0c1", "score": "0.49108413", "text": "public function testDenormalizeInvalidTypeAndNoType() {\n $payload_data = [\n 'data' => [\n 'type' => 'node--article',\n 'attributes' => [\n 'title' => 'Testing article',\n 'id' => '33095485-70D2-4E51-A309-535CC5BC0115',\n ],\n 'relationships' => [\n 'uid' => [\n 'data' => [\n 'type' => 'user--user',\n 'id' => $this->user2->uuid(),\n ],\n ],\n 'field_tags' => [\n 'data' => [\n [\n 'type' => 'foobar',\n 'id' => $this->term1->uuid(),\n ],\n ],\n ],\n ],\n ],\n ];\n\n // Test relationship member with invalid type.\n $payload = Json::encode($payload_data);\n [$request, $resource_type] = $this->generateProphecies('node', 'article');\n $this->container->get('request_stack')->push($request);\n try {\n $this\n ->getNormalizer()\n ->denormalize(Json::decode($payload), NULL, 'api_json', [\n 'resource_type' => $resource_type,\n ]);\n\n $this->fail('No assertion thrown for invalid type');\n }\n catch (BadRequestHttpException $e) {\n $this->assertEquals(\"Invalid type specified for related resource: 'foobar'\", $e->getMessage());\n }\n\n // Test relationship member with no type.\n unset($payload_data['data']['relationships']['field_tags']['data'][0]['type']);\n\n $payload = Json::encode($payload_data);\n [$request, $resource_type] = $this->generateProphecies('node', 'article');\n $this->container->get('request_stack')->push($request);\n try {\n $this->container->get('jsonapi_test_normalizers_kernel.jsonapi_document_toplevel')\n ->denormalize(Json::decode($payload), NULL, 'api_json', [\n 'resource_type' => $resource_type,\n ]);\n\n $this->fail('No assertion thrown for missing type');\n }\n catch (BadRequestHttpException $e) {\n $this->assertEquals(\"No type specified for related resource\", $e->getMessage());\n }\n }", "title": "" }, { "docid": "fe72120c5650c029e01becc6f17a2ee1", "score": "0.49002317", "text": "public function testNotObject(): void\n {\n $validator = new PropertyValidator('foo');\n $result = $validator->validate([\n 'bar' => 'foo',\n ]);\n\n $this->assertFalse($result->isValid());\n }", "title": "" }, { "docid": "55dbb1f2d93a33c5a456c3aa0ab75d91", "score": "0.48990774", "text": "public function testIsValidTypeInvalid()\n {\n $this->assertFalse($this->annotation->isValidType('INVALID'));\n }", "title": "" }, { "docid": "10c619145a068a578c8258f7726e76e2", "score": "0.48836446", "text": "public function invalidPropertyTypes()\n {\n return [\n ['string<string>'],\n ['int<Neos\\Flow\\Baz>']\n ];\n }", "title": "" }, { "docid": "2ef03b1a73e35d40ea71932bd684fa2b", "score": "0.48722294", "text": "function testRejectsAnObjectTypeWithIncorrectlyTypedFields()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'fields' => [['f' => null]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeObject fields must be an associative array with field names as keys or a ' .\n 'callable which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getFields();\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "a7f0e81fdca2e8e0e65fb050625ffd75", "score": "0.4864501", "text": "function testDoNotGuessIfSpecified() {\n\t\t$result = $this->helper->__guessInputType('Test.foo', array('type' => 'bar'));\n\t\t$this->assertEqual($result, 'bar');\n\t}", "title": "" }, { "docid": "7002f223a91b2ec383607679086568ba", "score": "0.4858193", "text": "public function resolveType($objectValue, $context, \\GraphQL\\Type\\Definition\\ResolveInfo $info);", "title": "" }, { "docid": "f3ad0e3b6cfe3d61f8f8db1f27f8ec96", "score": "0.48519763", "text": "public function testRejectsAnObjectTypeWithAFieldFunctionThatReturnsIncorrectType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'fields' => function () {\n return [['f' => null]];\n },\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeObject fields must be an associative array with field names as keys or a ' .\n 'callable which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getFields();\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "a84ed3ff99afb07cad372cba13dd4261", "score": "0.48464158", "text": "public function testInvalidNamesForResourceAttributesType()\n {\n $this->document->addToData($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'type' => 'whatever'], // <-- 'type' is a reserved word and cannot be used\n new Link('selfUrl'),\n [LinkInterface::SELF => new Link('selfUrl')], // links for resource\n ['some' => 'meta']\n ), new stdClass(), true));\n }", "title": "" }, { "docid": "1f4012640fc687933bd545b2b7ab9602", "score": "0.4831256", "text": "public static function reject() {\n return new Reject('Not match Atom in []');\n }", "title": "" }, { "docid": "7a4d48402fb85a428d3fc327fd66fd4b", "score": "0.4813427", "text": "public function testLoadInvalidObjectIDType()\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(array());\r\n\t\t}", "title": "" }, { "docid": "0cea90c848101dc73c1e4b0508439824", "score": "0.48071808", "text": "public function testFromInvalidReflectionClass()\n {\n\n // create the reflection class\n $reflectionClass = new ReflectionClass('\\stdClass', array(), array());\n\n // check that the descriptor has not been initialized\n $this->assertNull($this->descriptor->fromReflectionClass($reflectionClass));\n }", "title": "" }, { "docid": "37aab345410de2039650e949472d5f6d", "score": "0.47937426", "text": "function validate_type_code($object = null, $value)\n\t{\n\t\tif (isset($value) == false || empty($value) ) {\n\t\t\treturn Localized::ModelValidation(\n\t\t\t\t$this->tableName(),\n\t\t\t\tMedia::type_code,\n\t\t\t\t\"FIELD_EMPTY\"\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "fd62d38d77ddb73dbdfbe5a56894aef0", "score": "0.4790872", "text": "protected static function nothingMatchesTheInputType($input)\n {\n throw new E4xx_UnsupportedType(SimpleType::from($input));\n }", "title": "" }, { "docid": "56a50a4101b0f715c225e5a7add0ff6b", "score": "0.47657716", "text": "public function testRejectsAnScalarFieldResolver()\n {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'BadResolver.badField field resolver must be a function if provided, but got: 0.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithObjectWithFieldResolver(0);\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "ef8682902b1cbadb8f98d455036b4ff5", "score": "0.4738072", "text": "public function testAcceptsAnInputObjectTypeWithAFieldFunction()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => function () {\n return ['f' => ['type' => stringType()]];\n },\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $field = $inputObjectType->getField('f');\n $this->assertEquals(stringType(), $field->getType());\n }", "title": "" }, { "docid": "f1d254cfdf4d05ddc7a5a44853cd9821", "score": "0.47285768", "text": "function validateData($data) {\n $data = json_decode($data);\n $typesArr = [1, 2];\n\n if (!in_array((int)$data->type, $typesArr)) {\n return false;\n } else {\n $data->type = (int)$data->type;\n }\n\n if (empty($data->feedback)) {\n return false;\n }\n\n if ($data->type == 2 && !filter_var($data->url, FILTER_VALIDATE_URL)) {\n return false;\n }\n\n if (empty($data->name)) {\n $data->name = \"anonymous\";\n }\n\n if (empty($data->email)) {\n $data->email = \"anonymous\";\n }\n\n return $data;\n }", "title": "" }, { "docid": "352a48c42fc7f1ff213cede55a1fcb4d", "score": "0.47126856", "text": "public function validateInputParam($inputParam)\n {\n $typeMap = [\n 'String' => 'is_string',\n 'Boolean' => 'is_bool'\n ];\n\n if ($typeMap[$this->type]($inputParam) === false) {\n throw new UnresolvedEndpointException(\n \"Input parameter `{$this->name}` is the wrong type. Must be a {$this->type}.\"\n );\n }\n\n if ($this->deprecated) {\n $deprecated = $this->deprecated;\n $deprecationString = \"{$this->name} has been deprecated \";\n $msg = isset($deprecated['message']) ? $deprecated['message'] : null;\n $since = isset($deprecated['since']) ? $deprecated['since'] : null;\n\n if (!is_null($since)) $deprecationString = $deprecationString\n . 'since '. $since . '. ';\n if (!is_null($msg)) $deprecationString = $deprecationString . $msg;\n\n trigger_error($deprecationString, E_USER_WARNING);\n }\n }", "title": "" }, { "docid": "9985420588dfdbb7bec7cf112693a734", "score": "0.47123456", "text": "public static function reject() {\n return new Reject('Not match Reference');\n }", "title": "" }, { "docid": "ca4dc808fcac7dc3b8320e357f0a9b9f", "score": "0.47081035", "text": "private function prepareInput($input) {\n $error_detected = [];\n\n $type = '';\n //check for requirements\n if (isset($input['type'])) {\n $type = $input['type'];\n }\n\n if (!isset($input['name']) || empty($input['name'])) {\n $error_detected[] = __sso('A Name is required');\n }\n\n if (empty($type)) {\n $error_detected[] = __('An item type is required');\n } else if (!isset(static::getTypes()[$type])) {\n $error_detected[] = sprintf(__sso('The \"%s\" is a Invalid type'), $type);\n }\n\n if (!isset($input['client_id']) || empty($input['client_id'])) {\n $error_detected[] = __sso('A Client ID is required');\n }\n\n if (!isset($input['client_secret']) || empty($input['client_secret'])) {\n $error_detected[] = __sso('A Client Secret is required');\n }\n\n if ($type === 'generic') {\n if (!isset($input['url_authorize']) || empty($input['url_authorize'])) {\n $error_detected[] = __sso('An Authorize URL is required');\n } else if (!filter_var($input['url_authorize'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Authorize URL is invalid');\n }\n\n if (!isset($input['url_access_token']) || empty($input['url_access_token'])) {\n $error_detected[] = __sso('An Access Token URL is required');\n } else if (!filter_var($input['url_access_token'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Access Token URL is invalid');\n }\n\n if (!isset($input['url_resource_owner_details']) || empty($input['url_resource_owner_details'])) {\n $error_detected[] = __sso('A Resource Owner Details URL is required');\n } else if (!filter_var($input['url_resource_owner_details'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Resource Owner Details URL is invalid');\n }\n }\n\n if (count($error_detected)) {\n foreach ($error_detected as $error) {\n Session::addMessageAfterRedirect(\n $error,\n true,\n ERROR\n );\n }\n return false;\n }\n\n return $input;\n }", "title": "" }, { "docid": "8e634608dd9233a03847a811f573386d", "score": "0.46900037", "text": "public function resolveType($objectValue, $context, \\GraphQL\\Type\\Definition\\ResolveInfo $info)\n {\n }", "title": "" }, { "docid": "8e634608dd9233a03847a811f573386d", "score": "0.46900037", "text": "public function resolveType($objectValue, $context, \\GraphQL\\Type\\Definition\\ResolveInfo $info)\n {\n }", "title": "" }, { "docid": "0d602ae0cce31fa32f54995904358484", "score": "0.46880257", "text": "function cleanInput($infoUser, $type)\r\n {\r\n switch($type)\r\n {\r\n case 0:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\r\n $error = filter_var($error, FILTER_DEFAULT);\r\n break;\r\n\r\n case 1:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_EMAIL);\r\n $error = filter_var($error, FILTER_VALIDATE_EMAIL);\r\n break;\r\n\r\n case 2:\r\n\r\n\r\n //$error = filter_var($infoUser, FILTER_SANITIZE_NUMBER_INT);\r\n if (filter_var($infoUser, FILTER_VALIDATE_INT) === 0 || !filter_var($infoUser, FILTER_VALIDATE_INT) === false) {\r\n $error = filter_var($infoUser, FILTER_VALIDATE_INT);\r\n } else {\r\n echo(\"Integer is not valid\");\r\n }\r\n break;\r\n\r\n case 3:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\r\n $error = filter_var($error, FILTER_DEFAULT);\r\n break;\r\n\r\n\r\n }\r\n return $error;\r\n\r\n }", "title": "" }, { "docid": "76cded883037c04cacd5d98c1dc40c77", "score": "0.468506", "text": "public static function nothingMatchesTheInputType($data)\n {\n throw new E4xx_UnsupportedType(SimpleType::from($data));\n }", "title": "" }, { "docid": "5a4a62e638472c723215fdf7f7917bfd", "score": "0.4683067", "text": "public function testGetInvalidFieldType()\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\r\n\t\t\t$user->get(array());\r\n\t\t}", "title": "" }, { "docid": "e7fe27ec39e8b60320ec60ed5bc297ab", "score": "0.4681757", "text": "public function testUseScalarInSchema(): void\n {\n // See http://webonyx.github.io/graphql-php/type-system/#type-registry\n $email = new Email();\n\n $schemaConfig = new SchemaConfig();\n $schemaConfig->setQuery(\n new ObjectType([\n 'name' => 'Query',\n 'fields' => [\n 'foo' => $email,\n 'bar' => $email,\n ],\n ])\n );\n\n $schema = new Schema($schemaConfig);\n\n self::assertEmpty($schema->validate());\n }", "title": "" }, { "docid": "0dcbb490e347d4b06e33fc1e4fe42805", "score": "0.46713817", "text": "public function resolveInput()\n {\n $value = $this->_value( @$_SERVER['CONTENT_TYPE'], '' );\n $value = $this->_value( @$_SERVER['HTTP_CONTENT_TYPE'], $value );\n $value = $this->_value( @$_SERVER['HTTP_X_CONTENT_TYPE'], $value );\n $parts = array();\n\n if( !empty( $value ) )\n {\n $value = 'ctype='. $value;\n $value = preg_replace( '/\\;\\s+/', '&', $value );\n parse_str( $value, $parts );\n }\n $this->ctype = $this->_value( @$parts['ctype'], '' );\n $this->boundary = $this->_value( @$parts['boundary'], '' );\n $this->input = trim( file_get_contents( 'php://input' ) );\n }", "title": "" }, { "docid": "e1afe62b22a1f88e1d2083d949f0e3c8", "score": "0.46691632", "text": "public function testRejectsUnrecognisedTypeInResourceRelationship()\n {\n $this->resourceType = 'comments';\n $comment = factory(Comment::class)->states('post')->make();\n\n $data = [\n 'type' => 'comments',\n 'attributes' => [\n 'content' => $comment->content,\n ],\n 'relationships' => [\n 'commentable' => [\n 'data' => [\n 'type' => 'post', // invalid type as expecting the plural,\n 'id' => (string) $comment->commentable_id,\n ],\n ],\n ],\n ];\n\n $response = $this\n ->actingAsUser()\n ->jsonApi()\n ->withData($data)\n ->post('/api/v1/comments');\n\n $response->assertStatus(400)->assertJson([\n 'errors' => [\n [\n 'detail' => \"Resource type post is not recognised.\",\n 'status' => '400',\n 'source' => [\n 'pointer' => '/data/relationships/commentable/data/type',\n ],\n ]\n ],\n ]);\n }", "title": "" }, { "docid": "e64664cb7a335b4aff691819e767c7a8", "score": "0.4649672", "text": "public function testDoesNotMutatePassedFieldDefinitions()\n {\n $fields = [\n 'field1' => ['type' => stringType()],\n 'field2' => [\n 'type' => stringType(),\n 'args' => [\n 'id' => ['type' => stringType()],\n ],\n ],\n ];\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $testObject1 = newObjectType([\n 'name' => 'Test1',\n 'fields' => $fields,\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $testObject2 = newObjectType([\n 'name' => 'Test2',\n 'fields' => $fields,\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals($testObject2->getFields(), $testObject1->getFields());\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $testInputObject1 = newInputObjectType([\n 'name' => 'Test1',\n 'fields' => $fields,\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $testInputObject2 = newInputObjectType([\n 'name' => 'Test2',\n 'fields' => $fields,\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals($testInputObject2->getFields(), $testInputObject1->getFields());\n\n $this->assertEquals(stringType(), $fields['field1']['type']);\n $this->assertEquals(stringType(), $fields['field2']['type']);\n $this->assertEquals(stringType(), $fields['field2']['args']['id']['type']);\n }", "title": "" }, { "docid": "acd91033f4d867836c5dc2effa54951e", "score": "0.46445504", "text": "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "title": "" }, { "docid": "6a766fb91261a2284fe06f1750cba5e6", "score": "0.46441188", "text": "private function validateType($schema, $data, $path)\n {\n // gettype() on a closure returns 'object' which is not what we want\n if (is_callable($data) && ($data instanceof \\Closure)) {\n\n $type = BaseValidator::CLOSURE;\n } else {\n\n // override because 'double' (float), 'integer' are covered by 'number' according to http://json-schema.org/latest/json-schema-validation.html#anchor79\n // strtolower; important when dealing with 'null' values\n if (in_array(($type = strtolower(gettype($data))), [BaseValidator::DOUBLE, BaseValidator::INTEGER])) {\n\n $type = BaseValidator::NUMBER;\n }\n }\n\n // check if given type matches the expected type, if not add verbose error\n if (is_array($schema->type)) {\n\n $isValid = false;\n\n foreach ($schema->type as $t) {\n\n if ($type === strtolower($t)) {\n\n $isValid = true;\n break;\n }\n }\n }\n\n if ((isset($isValid) && !$isValid) || (is_string($schema->type) && ($type !== strtolower($schema->type)))) {\n\n $msg = ValidateException::ERROR_USER_DATA_VALUE_DOES_NOT_MATCH_CORRECT_TYPE_1;\n $schemaType = (is_array($schema->type) ? implode('\\' OR \\'', $schema->type) : $schema->type);\n $params = [$path, $schemaType, $type];\n\n if (!in_array($type, [BaseValidator::OBJECT, BaseValidator::CLOSURE, BaseValidator::_ARRAY, BaseValidator::_NULL])) {\n\n $msg = ValidateException::ERROR_USER_DATA_VALUE_DOES_NOT_MATCH_CORRECT_TYPE_2;\n\n if (in_array($type, [BaseValidator::STRING])) {\n\n $data = str_replace(\"\\n\", '', $data);\n $data = preg_replace(\"/\\r|\\n/\", '', $data);\n $data = (strlen($data) < 25) ? $data : substr($data, 0, 25) . ' [...]';\n }\n\n // boolean handling\n if (in_array($type, [BaseValidator::BOOLEAN])) {\n\n $data = ($data) ? true : false;\n }\n\n $params[] = $data;\n }\n\n // add error\n $this->addError($msg, $params);\n }\n\n return $type;\n }", "title": "" }, { "docid": "cf99d1bdad778c4cacc656b77d6a8d81", "score": "0.46398243", "text": "public function validate()\n {\n $this->validateRequiredParameters();\n\n if (!is_string($this->getType())) {\n throw new InvalidDocumentException(\"The type parameter must be a string\");\n }\n }", "title": "" }, { "docid": "54d65288250a6ca8321357647a67ec58", "score": "0.4631124", "text": "public function testGuessTypeNoMetadata(): void\n {\n $class = 'FakeClass';\n $property = 'fakeProperty';\n\n $this->modelManager->method('getParentMetadataForProperty')->with($class, $property)\n ->willThrowException(new MappingException());\n\n $result = $this->guesser->guessType($class, $property, $this->modelManager);\n\n $this->assertSame('text', $result->getType());\n $this->assertSame(Guess::LOW_CONFIDENCE, $result->getConfidence());\n }", "title": "" }, { "docid": "c748d9d729ce36150ec6373d2ef5f5f2", "score": "0.46210808", "text": "public function testIsThereAnySyntaxError() {\n\t\t$var = new Convertor;\n\t\t$this->assertTrue(is_object($var));\n\t\tunset($var);\n\t}", "title": "" }, { "docid": "729fca2697dd5a588fa3b84f20132214", "score": "0.4616903", "text": "function constraint_mustBeUser($user)\n{\n\tif (!is_object($user))\n {\n \tthrow new PHP_E_ConstraintFailed(__FUNCTION__);\n }\n\n if (!$user instanceof User)\n {\n \tthrow new PHP_E_ConstraintFailed(__FUNCTION__);\n }\n}", "title": "" }, { "docid": "11fb0957254b7c7e97743e3c90c76bf7", "score": "0.4616157", "text": "function mixedTypeHintNullable(?Mixed $var1) {}", "title": "" }, { "docid": "f83b1ced9e5c49512eef4e1495e78220", "score": "0.46067852", "text": "public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }", "title": "" }, { "docid": "f83b1ced9e5c49512eef4e1495e78220", "score": "0.46067852", "text": "public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }", "title": "" }, { "docid": "a3ffc5c6babcc74dd3c837c34bfb458e", "score": "0.45812303", "text": "public function getFieldNotResolvedByObjectTypeFeedbackItemResolution($field) : FeedbackItemResolution\n {\n $operation = SuperRootHelper::getOperationFromSuperRootFieldName($field->getName());\n if ($operation !== null) {\n return new FeedbackItemResolution(ErrorFeedbackItemProvider::class, ErrorFeedbackItemProvider::E1, [$operation]);\n }\n return new FeedbackItemResolution(ErrorFeedbackItemProvider::class, ErrorFeedbackItemProvider::E1A);\n }", "title": "" }, { "docid": "40c1fc3848a8ebeed894a24a9aa77b89", "score": "0.45719236", "text": "public function testResolveInvalidRequestBody(): void\n {\n $this->expectException(ValidationException::class);\n $request = new Request([], [], [], [], [], ['CONTENT_TYPE' => ['application/json']], '{}');\n\n $validator = $this->createMock(ValidatorInterface::class);\n $violations = new ConstraintViolationList(array(\n $this->createMock(ConstraintViolation::class),\n ));\n $validator->expects($this->once())\n ->method('validate')\n ->willReturn($violations);\n $argumentMetadata = new ArgumentMetadata('resolver', PostRecruitmentArgumentResolver::class, false, false, null);\n $argumentResolver = new PostRecruitmentArgumentResolver($validator);\n $request = $argumentResolver->resolve($request, $argumentMetadata);\n $request->current();\n }", "title": "" }, { "docid": "9ee70da2bc092a45c157e5392ccfcdaa", "score": "0.45542303", "text": "public static function clean($source, $type = 'string')\n {\n // Handle the type constraint\n switch (strtoupper($type))\n {\n case 'INT':\n case 'INTEGER':\n // Only use the first integer value\n preg_match('/-?[0-9]+/', (string) $source, $matches);\n $result = @ (int) $matches[0];\n break;\n\n case 'UINT':\n // Only use the first integer value\n preg_match('/-?[0-9]+/', (string) $source, $matches);\n $result = @ abs((int) $matches[0]);\n break;\n\n case 'FLOAT':\n case 'DOUBLE':\n // Only use the first floating point value\n preg_match('/-?[0-9]+(\\.[0-9]+)?/', (string) $source, $matches);\n $result = @ (float) $matches[0];\n break;\n\n case 'BOOL':\n case 'BOOLEAN':\n $result = (bool) $source;\n break;\n\n case 'WORD':\n $result = (string) preg_replace('/[^A-Z_]/i', '', $source);\n break;\n\n case 'ALNUM':\n $result = (string) preg_replace('/[^A-Z0-9]/i', '', $source);\n break;\n\n case 'CMD':\n $result = (string) preg_replace('/[^A-Z0-9_\\.-]/i', '', $source);\n $result = ltrim($result, '.');\n break;\n\n case 'BASE64':\n $result = (string) preg_replace('/[^A-Z0-9\\/+=]/i', '', $source);\n break;\n\n case 'ARRAY':\n $result = (array) $source;\n break;\n\n case 'PATH':\n $pattern = '/^[A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*([\\\\\\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*)*$/';\n preg_match($pattern, (string) $source, $matches);\n $result = @ (string) $matches[0];\n break;\n\n case 'HTML':\n $result = (string) $source;\n break;\n\n case 'TEXT':\n $result = (string) $source;\n break;\n\n case 'STRING':\n $source = (string) $source;\n $result = trim($source);\n break;\n\n default:\n $result = $source;\n }\n\n return $result;\n }", "title": "" }, { "docid": "e16c8d6bcc5375a302356b8af0974162", "score": "0.45501775", "text": "public function testRejectsASchemaWhichHaveSameNamedObjectsImplementingAnInterface()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $anotherInterface = newInterfaceType([\n 'name' => 'AnotherInterface',\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $firstBadObject = newObjectType([\n 'name' => 'BadObject',\n 'interfaces' => [$anotherInterface],\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $secondBadObject = newObjectType([\n 'name' => 'BadObject',\n 'interfaces' => [$anotherInterface],\n 'fields' => ['f' => ['type' => stringType()]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $queryType = newObjectType([\n 'name' => 'Query',\n 'fields' => [\n 'iface' => ['type' => $anotherInterface],\n ]\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'Schema must contain unique named types but contains multiple types named \"BadObject\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n newSchema([\n 'query' => $queryType,\n 'types' => [$firstBadObject, $secondBadObject],\n ]);\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "551e24a0d7b9aa9bd189ff0811f0c903", "score": "0.45481935", "text": "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "title": "" }, { "docid": "1e80b0364edcc118c8c67102a3f90f0c", "score": "0.45425105", "text": "public function testRegistrationFieldsWrongType(): void { }", "title": "" }, { "docid": "2f8a60809b12fca77bfaf312530d433e", "score": "0.45411384", "text": "abstract function validator();", "title": "" }, { "docid": "1f91c5692761e1d055eba99e933e589b", "score": "0.45396385", "text": "private function verifyAndRefineAtlasObjectUserData(Request $request) {\n $result = array();\n $em = $this->getDoctrine()->getManager();\n $categoryRepository = $em->getRepository('ArmdAtlasBundle:Category');\n $regionRepository = $em->getRepository('ArmdAtlasBundle:Region');\n $weekdayRepository = $em->getRepository('ArmdAtlasBundle:WeekDay');\n\n //title (required!)\n $title = trim($request->get('title')); //TODO: filter!\n if (!$title) {\n throw new \\Exception('Заполните поле \"Название\"!');\n }\n $result['title'] = $title;\n\n //announce (required!)\n $announce = trim($request->get('announce')); //TODO: filter!\n if (!$announce) {\n throw new \\Exception('Заполните поле \"Анонс\"!');\n }\n $result['announce'] = $announce;\n\n //latitude (NOT required!)\n $latitude = $request->get('lat'); //TODO: filter!\n $result['lat'] = $latitude;\n\n //longitude (NOT required!)\n $longitude = $request->get('lon'); //TODO: filter!\n $result['lon'] = $longitude;\n\n //main category (required!)\n $primaryCategoryId = (int)$request->get('primaryCategory');\n if (!$primaryCategoryId) {\n throw new \\Exception('Укажите значение поля \"Категория\"!');\n }\n $primaryCategory = $categoryRepository->find($primaryCategoryId);\n if (!$primaryCategory) {\n throw new \\Exception('Указанная категория (id = '.$primaryCategoryId.') не существует!');\n }\n $result['primaryCategory'] = $primaryCategory;\n\n //secondary categories (at least one is required!)\n $result['secondaryCategories'] = array();\n $secondaryCategoriesIds = $request->get('secondaryCategories');\n\n if (!is_array($secondaryCategoriesIds) || (count($secondaryCategoriesIds) == 0)) {\n throw new \\Exception('Укажите хотя бы одно значение в поле \"Дополнительные категории\"!');\n }\n $secondaryCategoriesIds = array_map('intval', $secondaryCategoriesIds);\n foreach ($secondaryCategoriesIds as $id) {\n $category = $categoryRepository->find($id);\n if (!$category) {\n throw new \\Exception('Указанная категория (id = '.$id.') не существует!');\n }\n $result['secondaryCategories'][] = $category;\n }\n\n //site URL (NOT required!)\n $siteUrl = trim($request->get('siteUrl')); //TODO: filter!\n $result['siteUrl'] = $siteUrl;\n\n //e-mail (NOT required!)\n $email = trim($request->get('email')); //TODO: filter!\n $result['email'] = $email;\n\n //phone (NOT required!)\n $phone = trim($request->get('phone')); //TODO: filter!\n $result['phone'] = $phone;\n\n //regions (NOT required!)\n $result['regions'] = array();\n $regionsIds = $request->get('regions');\n if (is_array($regionsIds) && (count($regionsIds) > 0)) {\n $regionsIds = array_map('intval', $regionsIds);\n foreach ($regionsIds as $id) {\n $region = $regionRepository->find($id);\n if (!$region) {\n throw new \\Exception('Указанный регион (id = '.$id.') не существует!');\n }\n $result['regions'][] = $region;\n }\n }\n\n //address (NOT required!)\n $address = trim($request->get('address')); //TODO: filter!\n $result['address'] = $address;\n\n //work time (NOT required!)\n $workTime = trim($request->get('workTime')); //TODO: filter!\n $result['workTime'] = $workTime;\n\n //weekends (NOT required!)\n $result['weekends'] = array();\n $weekendsIds = $request->get('weekends');\n if (is_array($weekendsIds) && (count($weekendsIds) > 0)) {\n $weekendsIds = array_map('intval', $weekendsIds);\n foreach ($weekendsIds as $id) {\n $weekday = $weekdayRepository->find($id);\n if (!$weekday) {\n throw new \\Exception('Указанный день недели (id = '.$id.') не существует!');\n }\n $result['weekends'][] = $weekday;\n }\n }\n\n //images (NOT required!)\n $result['images'] = array();\n $mediaManager = $this->get('sonata.media.manager.media');\n $mediaIds = $request->get('media');\n if (is_array($mediaIds) && sizeof($mediaIds)) {\n $mediaIds = array_map('intval', $mediaIds);\n foreach ($mediaIds as $id) {\n $image = $mediaManager->findOneBy(array('id' => $id));\n if (!$image) {\n throw new \\Exception('Указанное изображение (id = '.$id.') не существует!');\n }\n $result['images'][] = $image;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "86ba769400cd9dba9a99be758b9d5cad", "score": "0.4537783", "text": "protected function validateOrThrow() {}", "title": "" }, { "docid": "23883dc155a63e59b8cc2cc8e45d29e6", "score": "0.4536393", "text": "public function testInvalidConstructorParams1()\n {\n new AcceptMediaType(1, null, 'subtype');\n }", "title": "" }, { "docid": "fbcc192c4052518308ec98db3e3897da", "score": "0.45318812", "text": "public function validate( $request_data ) {\n\t\tif ( WPSEO_Validator::key_exists( $request_data, 'object_type' ) ) {\n\t\t\tself::validate_type( $request_data['object_type'] );\n\t\t}\n\n\t\tif ( WPSEO_Validator::key_exists( $request_data, 'object_subtype' ) ) {\n\t\t\tself::validate_subtype( $request_data['object_type'], $request_data['object_subtype'] );\n\t\t}\n\t}", "title": "" }, { "docid": "a699ba545c04c86663bf64a4905faed8", "score": "0.4529212", "text": "public function testContainerDoesntAcceptInvalidConfigType()\n {\n $this->setExpectedException('InvalidArgumentException');\n\n $c = new Container(new \\stdClass());\n }", "title": "" }, { "docid": "c73f28c456efbef77047e3c27f1bd94d", "score": "0.45224643", "text": "public function testResolveInvalidRequestContent(): void\n {\n $this->expectException(InvalidContentException::class);\n $request = new Request([], [], [], [], [], ['CONTENT_TYPE' => ['application/json']], null);\n\n $validator = $this->createMock(ValidatorInterface::class);\n $argumentMetadata = new ArgumentMetadata('resolver', PostRecruitmentArgumentResolver::class, false, false, null);\n $argumentResolver = new PostRecruitmentArgumentResolver($validator);\n $request = $argumentResolver->resolve($request, $argumentMetadata);\n $request->current();\n }", "title": "" }, { "docid": "bf2727db3bcc6c8727165a0320a7ce4b", "score": "0.45213544", "text": "public function testRejectsNonTypesAsNullableTypeOfNonNull()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $nonTypes = [\n 'String!' => newNonNull(stringType()),\n 'Object' => new \\stdClass(),\n 'Array' => [],\n 'Function' => function () {\n return null;\n },\n '(empty string)' => '',\n 'null' => null,\n 'true' => true,\n 'false' => false,\n 'String' => 'String',\n ];\n\n foreach ($nonTypes as $string => $nonType) {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\\sprintf('Expected %s to be a GraphQL nullable type.', $string));\n\n /** @noinspection PhpUnhandledExceptionInspection */\n newNonNull($nonType);\n $this->addToAssertionCount(1);\n }\n }", "title": "" }, { "docid": "a93e223f7d2036f7d24307800d23c915", "score": "0.45116645", "text": "public function testInvalidConstructorParams2()\n {\n new AcceptMediaType(1, 'type', null);\n }", "title": "" }, { "docid": "9152c7e8d377de86ff95da273b702ea1", "score": "0.4510695", "text": "public function testConvertInvalidType()\n {\n $init = true;\n $bool = new \\Pv\\PBoolean($init);\n\n $bool->convert('foo');\n }", "title": "" }, { "docid": "5843cbfd1e6b82f7cca70e7cf3d971f3", "score": "0.45097238", "text": "public function testRejectsAScalarTypeDefiningParseValueAndParseLiteralWithAnIncorrectType()\n {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeScalar must provide both \"parseValue\" and \"parseLiteral\" functions.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newScalarType([\n 'name' => 'SomeScalar',\n 'serialize' => function () {\n return null;\n },\n 'parseValue' => '',\n 'parseLiteral' => '',\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "d242847db35c83f02232831c57e3e09d", "score": "0.45088172", "text": "public function input (\\stdClass $param);", "title": "" }, { "docid": "d67271a53af34d39229864ea59f36fab", "score": "0.45010164", "text": "public function testAcceptsUnionTypeDefiningResolveType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newUnionType([\n 'name' => 'SomeUnion',\n 'types' => [$this->objectType],\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "8666c626c6bf982bfcc3190d016d0f40", "score": "0.44967985", "text": "public static function reject() {\n return new Reject('Not match Organic Subset');\n }", "title": "" }, { "docid": "c002d8b7af7435f5139002c5c1b088ca", "score": "0.44823965", "text": "function dupeoff_options_validate($input) {\n\treturn $input; // return validated input\n}", "title": "" }, { "docid": "9211c5ee1231de041e1bb5e6383b19c1", "score": "0.448233", "text": "protected function validate()\n {\n// echo static::class;\n if (!isset($this->getProperty('raw_data')['_'])) {\n throw new InvalidEntity('Invalid entity data given: ' . json_encode($this->getRawData(), JSON_PRETTY_PRINT));\n }\n }", "title": "" }, { "docid": "818d05a497faea730b566460b70a1911", "score": "0.4479253", "text": "protected function checkForObjectIsValid()\n {\n if (!isset($this->for_object) || !$this->for_object instanceof BaseObject)\n {\n throw new Exception (sprintf('Cannot show comments for object of type %s',\n isset($this->for_object)\n ? ( is_object($this->for_object) ? get_class($this->for_object) : gettype($this->for_object) )\n : \"null\"\n ));\n }\n }", "title": "" }, { "docid": "387a7bf5263dc9dd6103e6ac9bd258d5", "score": "0.44787145", "text": "function reqType($data, $type = \"string\") {\n\t\tif (!settype($data, $type))\n\t\t\tstop(3, \"Type Mismatch! \\\"$data\\\" is not a $type\", 400);\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0c223b912cd701d388cb1f00a3d1d3ae", "score": "0.44728294", "text": "public static function _clean($source, $type) {\n switch (strtoupper($type)) {\n case 'INT' :\n case 'INTEGER' :\n // Only use the first integer value\n preg_match('/-?[0-9]+/', (string) $source, $matches);\n $result = @ (int) $matches[0];\n break;\n\n case 'FLOAT' :\n case 'DOUBLE' :\n // Only use the first floating point value\n preg_match('/-?[0-9]+(\\.[0-9]+)?/', (string) $source, $matches);\n $result = @ (float) $matches[0];\n break;\n\n case 'BOOL' :\n case 'BOOLEAN' :\n $result = (bool) $source;\n break;\n\n case 'WORD' :\n $result = (string) preg_replace('/[^A-Z_]/i', '', $source);\n break;\n\n case 'ALNUM' :\n $result = (string) preg_replace('/[^A-Z0-9]/i', '', $source);\n break;\n\n case 'CMD' :\n $result = (string) preg_replace('/[^A-Z0-9_\\.-]/i', '', $source);\n $result = ltrim($result, '.');\n break;\n\n case 'BASE64' :\n $result = (string) preg_replace('/[^A-Z0-9\\/+=]/i', '', $source);\n break;\n\n case 'STRING' :\n $result = (string) $source;\n break;\n\n case 'ARRAY' :\n $result = (array) $source;\n break;\n\n case 'PATH' :\n $pattern = '/^[A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*([\\\\\\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*)*$/';\n preg_match($pattern, (string) $source, $matches);\n $result = @ (string) $matches[0];\n break;\n\n case 'USERNAME' :\n $result = (string) preg_replace('/[\\x00-\\x1F\\x7F<>\"\\'%&]/', '', $source);\n break;\n\n\n\n default :\n $result = $source;\n break;\n }\n\n return $result;\n }", "title": "" }, { "docid": "abc599a2c1741599c5c888f9de0ede14", "score": "0.44662225", "text": "private function validate(): void\n {\n if (empty($this->options)) {\n throw new ObjectiphyException('Find options have not been set on the object fetcher.');\n }\n }", "title": "" }, { "docid": "a8ef286f4ba698897330a139b348a8ab", "score": "0.4463344", "text": "function filterRequest($msg){\n if(isset($_GET['type'])){\n $type = $_GET['type'];\n\n // Verify data type\n if($type == 'data'){\n handleDataRequest($msg);\n }else if($type == 'multiple'){\n handleMultipleData($msg);\n }else if($type == 'station'){\n handleStationsRequest($msg);\n }else{\n $msg->message = 'Requested type not existing!';\n $msg->toJson();\n }\n }else{\n $msg->message = 'Type not set!';\n $msg->toJson();\n }\n}", "title": "" }, { "docid": "1b5a47f69cd76cce1c6587851ff1793b", "score": "0.4463033", "text": "public function testAcceptsAnInterfaceTypeDefiningResolveType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $anotherInterfaceType = newInterfaceType([\n 'name' => 'AnotherInterface',\n 'fields' => ['f' => ['type' => stringType()]],\n 'resolveType' => function () {\n return '';\n }\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newObjectType([\n 'name' => 'SomeObject',\n 'interfaces' => [$anotherInterfaceType],\n 'fields' => ['f' => ['type' => stringType()]],\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "318260068ce0bb12e5cc49b6f035f619", "score": "0.4462008", "text": "private function validateObject($callback)\n\t{\n\t\tif ( ! $callback instanceof \\Closure)\n\t\t{\n\t\t\tthrow new Exceptions\\InvalidArgumentException('Object '.get_class($callback).' is not a Closure.');\n\t\t}\n\t}", "title": "" }, { "docid": "c8fff4bc1e32f0cf0c860103f0f946dd", "score": "0.44605523", "text": "function rest_sanitize_request_arg($value, $request, $param)\n {\n }", "title": "" }, { "docid": "f302df74e360c844bdf7142a6937993e", "score": "0.44568792", "text": "public function testRejectsANonTypesAsItemTypeOfList()\n {\n $notTypes = [\n 'Object' => new \\stdClass(),\n 'Array' => [],\n 'Function' => function () {\n return null;\n },\n '(empty string)' => '',\n 'null' => null,\n 'true' => true,\n 'false' => false,\n 'String' => 'String',\n ];\n\n foreach ($notTypes as $string => $notType) {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\\sprintf('Expected %s to be a GraphQL type.', $string));\n\n /** @noinspection PhpUnhandledExceptionInspection */\n newList($notType);\n $this->addToAssertionCount(1);\n }\n }", "title": "" }, { "docid": "0ac461490686eb2e094089348cdba033", "score": "0.44552845", "text": "public function testInvalidAllOf() {\n $this->expectException(ParseException::class);\n $schema = new Schema(['$ref' => '#/components/schemas/Invalid1'], $this->lookup);\n $valid = $schema->validate(['type' => 'Invalid1']);\n }", "title": "" }, { "docid": "e624e3fcf420b898913c59687d8a036f", "score": "0.44541833", "text": "public function decode($in) {}", "title": "" }, { "docid": "c6d14bb5b7f7d44909f164705f4b82ab", "score": "0.4448356", "text": "public function resolvable();", "title": "" }, { "docid": "602ba4db76c393804a07e0bdfe9e1c4c", "score": "0.44465053", "text": "public function getResolver()/*# : ParameterInterface */;", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "ae4140ebe70d17ed3191dcd93e61bc7e", "score": "0.0", "text": "public function destroy($conferenceId, $id)\n {\n $this->authorize('delete-speaker');\n $speaker = Speakers::find($id);\n\n if($speaker->delete()){\n Storage::disk('public')->delete($speaker->image);\n Storage::disk('public')->delete($speaker->attach_file);\n return redirect()->route('admin_speakers_list', [\"conference_id\" => $conferenceId])->with('success', 'Speaker has been deleted successfully');\n }else{\n return redirect()->route('admin_speakers_list', [\"conference_id\" => $conferenceId])->with('errors', 'Error');\n }\n }", "title": "" } ]
[ { "docid": "9e3888bdb250b09daf6881b2c953ce96", "score": "0.7387755", "text": "protected function removeImageFromStorage (HCResources $resource)\n {\n $path = $this->uploadPath . $resource->id;\n\n if (Storage::has ($path)) {\n Storage::delete ($path);\n }\n }", "title": "" }, { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "3f1322e69a1884d9745c5ef5f1590e48", "score": "0.7141337", "text": "public function removeResource($resourceName);", "title": "" }, { "docid": "e8f55d4cc56465e75499a86915b35d9b", "score": "0.70428175", "text": "public function delete($resource);", "title": "" }, { "docid": "e390bf434f5cce46402b827d582cdcbe", "score": "0.7039089", "text": "public function removeResource(Resource $resource): void\n {\n if (!isset($this->resources[$resource->getUri()])) {\n return;\n }\n unset($this->resources[$resource->getUri()]);\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "9d416bb966c467169e3ae97e3c181868", "score": "0.63677", "text": "abstract function deleteResource(int $id);", "title": "" }, { "docid": "b9f567113f04c7ad2db0fe760a0a6fdc", "score": "0.63184243", "text": "public function unregisterResource()\n {\n Zend_Registry::get('acl')->remove($this);\n }", "title": "" }, { "docid": "13034525cd05a6a81ce72172a28a6888", "score": "0.6213014", "text": "public function delete()\n {\n $request = new StorageDeleteRequest();\n $request->setBucketName($this->bucket->getName());\n $request->setKey($this->key);\n\n [$response, $status] = $this->storage->_baseStorageClient->Delete($request)->wait();\n Utils::okOrThrow($status);\n }", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "251c69886b6b7be9441be8fe7c79bf9f", "score": "0.6166032", "text": "public function destroy($id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "ac2ff7081643a335753979289127eb7f", "score": "0.6098791", "text": "function destroy( $resource ){\n\n\n\n\n\n \n\n}", "title": "" }, { "docid": "7f77f3b95410a985ed02a0994980a5dd", "score": "0.6076961", "text": "public function deleteResource(AbstractNode $resource) : void;", "title": "" }, { "docid": "c1246d964fe6c011b7e9a2e92e2bce69", "score": "0.60498166", "text": "public function destroy($id)\n\t{\n\t\t//\n\t\t$file = \\App\\Resource::find($id)->image;\n\t\tunlink('pictures/' . $file);\n\t\t\\App\\Resource::destroy($id);\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "e9a19d00feed0894857d58eb3e4aea34", "score": "0.6019356", "text": "protected function dropResource()\n {\n $this->dropFile('Resource', $this->getResourcePath());\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.5991417", "text": "public function rm( $path );", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "4f634fd6a5cf444037bf2efc93dadfeb", "score": "0.5945026", "text": "public function clear()\n {\n \tunlink($this->_storage);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "15a853ed70c99f4514a71c5e2d0b94aa", "score": "0.59332573", "text": "public function remove($resource)\n {\n try {\n $resourceId = $this->get($resource)->getResourceId();\n } catch (Zend_Acl_Exception $e) {\n require_once 'Zend/Acl/Exception.php';\n throw new Zend_Acl_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $resourcesRemoved = [$resourceId];\n if (null !== ($resourceParent = $this->_resources[$resourceId]['parent'])) {\n unset($this->_resources[$resourceParent->getResourceId()]['children'][$resourceId]);\n }\n foreach ($this->_resources[$resourceId]['children'] as $childId => $child) {\n $this->remove($childId);\n $resourcesRemoved[] = $childId;\n }\n\n foreach ($resourcesRemoved as $resourceIdRemoved) {\n foreach ($this->_rules['byResourceId'] as $resourceIdCurrent => $rules) {\n if ($resourceIdRemoved === $resourceIdCurrent) {\n unset($this->_rules['byResourceId'][$resourceIdCurrent]);\n }\n }\n }\n\n unset($this->_resources[$resourceId]);\n\n return $this;\n }", "title": "" }, { "docid": "b8b5d5ca606833c889a1285814fba6f4", "score": "0.5917159", "text": "public function unlinkResource() {\n\t\t$this->resource=null;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.59067374", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5856808", "text": "public function clearStorage();", "title": "" }, { "docid": "84e424b359d9d6f2b49045a0bf4df9de", "score": "0.58229584", "text": "public function destroy($id)\n {\n $productImage = ProductImage::find($id);\n $productImage->delete();\n $fullPath = str_replace(\"storage\",\"/public\",$productImage->path);\n Storage::delete($fullPath);\n return $productImage;\n }", "title": "" }, { "docid": "2d75567656921f9588d0f6a09e30ea8c", "score": "0.5816774", "text": "public function testItShouldRemoveSpecifiedResource()\n {\n $this->json['data'] = [];\n $this->json('DELETE', $this->base_url . $this->getId(), [], $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "e53013c127607b9b9763311d1d78cf4b", "score": "0.58067673", "text": "public function detach()\n {\n if (!isset($this->resource)) {\n return null;\n }\n $resource = $this->resource;\n unset($this->resource);\n $this->size = null;\n $this->uri = null;\n $this->readable = false;\n $this->seekable = false;\n $this->writable = false;\n return $resource;\n }", "title": "" }, { "docid": "567e641bf24d438f1c69a4a617fddcb1", "score": "0.57947505", "text": "function delete($resource, $headers = array())\n {\n $result = $this->client->delete($this->build_url($resource), [\n 'headers' => array_merge([\n 'Authorization' => $this->getBearer()\n ], $headers)\n ]);\n return $result;\n }", "title": "" }, { "docid": "1dee477f6e099b050eb54e8469548631", "score": "0.57649726", "text": "public function destroy($id)\n {\n $slider=Slider::find($id);\n if($slider->image)\n {\n if(Storage::exists('public/slider/' . $slider->image)){\n $delete= Storage::delete('/public/slider/' . $slider->image); \n }\n }\n $slider->delete();\n alert::success('slider Deleted Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "aa96241e32a2910707191042a72208b3", "score": "0.5733017", "text": "public function destroy(Resource $resource): JsonResponse\n {\n Storage::disk('article')->delete($resource->url);\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.5715374", "text": "public function remove (object $entity);", "title": "" }, { "docid": "148f851e6e394ade1c2f9c6b118d123d", "score": "0.5697347", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "dfafd8026a650244c991d50f54215453", "score": "0.569202", "text": "public function free():void { unlink($this->getfilename()); }", "title": "" }, { "docid": "5b249643a990832f9ecd53f247c87bb4", "score": "0.5689915", "text": "public function destroy($id)\n {\n $find = DB::table('suppliers')->where('id',$id)->first();\n $photo = $find->photo;\n\n if($photo){\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }else{\n DB::table('suppliers')->where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "c0f1056876f778bb47bd815edbae240a", "score": "0.5686687", "text": "public function destroy($id)\n {\n //\n\n $query = Picture::find($id);\n $collections = collect($query);\n $filename = $collections->get('title');\n // default is config/filesystems.php\n $contents = Storage::get($filename);\n Storage::delete($filename);\n Picture::destroy($id);\n \n return redirect('picture');\n //return $contents;\n \n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "3b5ab38f0f5c2e97d3b02bce08803b25", "score": "0.56787795", "text": "public function destroy($id)\n {\n \n $imageUpload = Image::findOrfail($id);\n\n File::delete([\n public_path(('/images/').$imageUpload->imageName),\n ]);\n $imageUpload->delete();\n }", "title": "" }, { "docid": "63bd4ba9d20687d38d658987b149d5fb", "score": "0.5676478", "text": "public function deleteResource(\n $uri = \"\",\n $headers = []\n );", "title": "" }, { "docid": "9821f26046d4f47083ca51bd2deff710", "score": "0.5674362", "text": "public function destroy($id)\n {\n //\n $item = post::find($id);\n \n$item->tags()->detach();\n $image_path = $item->file; // the value is : localhost/project/image/filename.format\n \n //Image::destroy($image_path);\n \n $item->delete();\n return redirect('post');\n }", "title": "" }, { "docid": "3d074a3589196f3e2c63d1b79c3a54f2", "score": "0.5669239", "text": "public function destroy()\n {\n $file = pathinfo(request()->getContent());\n $storagePath = $this->baseStoragePath();\n $path = \"{$storagePath}/{$file['basename']}\";\n\n $fileDeleted = Storage::disk(config('canvas.storage_disk'))->delete($path);\n\n if ($fileDeleted) {\n return response()->json([], 204);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "84ffd5d41241886a42efaaa6c4cb6c45", "score": "0.5658867", "text": "public function delete()\n {\n self::remove($this->key);\n $this->key = null;\n $this->value = null;\n }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.5646982", "text": "public abstract function remove();", "title": "" }, { "docid": "7257252b8ba3d014ab6c945b9b1f8774", "score": "0.5646248", "text": "public function destroy($id)\n {\n\n $slider = Slider::whereId($id)->first();\n $image = $slider->slider_image;\n $path = 'public/slider_images/'; \n Storage::delete( $path . $image); \n \n $data = Slider::findOrFail($id);\n $data->delete();\n\n Session::flash('success', 'Slider deleted successfully..');\n return redirect()->route('all.slider');\n }", "title": "" }, { "docid": "884fba4384b6fac636fcb5fd3a0b8119", "score": "0.56440735", "text": "public function deletePhoto($resource, $id)\n {\n if (($resource === 'user') || ($resource === 'group') || ($resource === 'memo')) {\n\n //Validate Model is valid and return valid response\n list($param, $model) = $this->validateModelIsValid($resource, $id);\n //Get Image Name\n $image = $model->img_url;\n\n //Delete Avatar and Thumbnail\n if ($image != null) {\n Storage::delete(\"/$param/avatars/thumbnails/$image\");\n Storage::delete(\"/$param/avatars/$image\");\n }\n //Update Profile Photo Field To Null\n $model->img_url = null;\n //Save in Database\n $model->save();\n //Return Response\n return response()->json($model, 202);\n }\n\n return response('Invalid request', 400);\n\n }", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "684caecb3cebeb517274f1dbe758544f", "score": "0.5639566", "text": "abstract public function remove($scope = null, $pref = null);", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "3cfb84429aef8127ecc19fa5934511fe", "score": "0.56167203", "text": "public function deleteTagging($resource)\n {\n $taggingList = $this->getEm()->createQueryBuilder()\n ->select('t')\n ->from('UnifikDoctrineBehaviorsBundle:Tagging', 't')\n ->where('t.resourceType = :type')\n ->setParameter('type', $resource->getResourceType())\n ->andWhere('t.resourceId = :id')\n ->setParameter('id', $resource->getId())\n ->getQuery()\n ->getResult();\n\n foreach ($taggingList as $tagging) {\n $this->getEm()->remove($tagging);\n }\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "8bd2c06eeb1572fe4c48014cc912a6d6", "score": "0.5607892", "text": "public function delete() {\n @unlink($this->path());\n return parent::delete();\n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "14eedb590aed3088ebca2d6e88f88b70", "score": "0.55937696", "text": "public function destroy($id)\n {\n if ($id) {\n $storagek = Storagek::find($id);\n unlink(public_path('storage/images/').$storagek->file);\n $storagek->delete();\n return response()->json([\n \"success\" => true,\n \"message\" => \"File successfully delete\",\n ]);\n } else {\n return response()->json(['Err' => 'id no found']);\n }\n\n\n\n //\n }", "title": "" }, { "docid": "1b06eb968537fe78419acb4959d62e6d", "score": "0.55909395", "text": "public function destroy(Request $request, $id)\n\t{\n\t\t$storage = Storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\n\t\tif ($storage) {\n\t\t\t$storage->delete();\n\t\t\tSession::flash('success', 'Склад была успешно удален из справочника!');\n\t\t} else {\n\t\t\tSession::flash('error', 'Склад не найден в справочнике!');\n\t\t}\n\n\t\treturn redirect()->route('storage.index');\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "b3f61ce5e85b70bb0bf7f3a5ad6064ba", "score": "0.55771476", "text": "function remove(){\n shm_remove($this->id);\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "1f9a85d3b28293dfe2336fc2953ad59f", "score": "0.55613", "text": "public function destroy($id)\n {\n // get divide\n $divide = Divide::findOrFail($id);\n \n File::delete(public_path('image/') . $divide->img);\n \n if($divide->delete()) {\n return new DivideResource($divide);\n }\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.5560665", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "82eeede68c38b70a29849c8d452c2f6a", "score": "0.5556357", "text": "public function destroy($id)\n { \n $product = Item::find($id);\n $image = $product->image;\n\n $basename ='img/products/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n if($basename != 'img/products/img_place_holder_product.png'){\n unlink($basename);\n }\n }\n $product->delete();\n\n Session::flash('success','Product Deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "7cdf7f14d455dbb5d9ed3ea3b44142b0", "score": "0.55545616", "text": "protected static function removeComponent()\n {\n (new Filesystem)->delete(\n resource_path('assets/js/components/ExampleComponent.vue')\n );\n }", "title": "" }, { "docid": "7488846bbe831c2c5afdad208317b7bd", "score": "0.5543239", "text": "public function destroy(File $file)\n {\n //\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', $file);\n }", "title": "" }, { "docid": "9d72fe7c299d9bc6b0d19ba6bb397fa3", "score": "0.55405164", "text": "public function destroy($id)\n {\n $product = Product::where('id', $id)->first();\n if ($product->image) {\n unlink($product->image);\n }\n Product::where('id', $id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "66928b15fb30f2f5cf746449308643ba", "score": "0.5534244", "text": "public function remove()\n {\n $this->_context->builder->waveletRemove($this->waveId, $this->waveletId);\n }", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.55301565", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "98e71b5db6e284bbc48862c743eb819b", "score": "0.552751", "text": "public function destroy($id)\n {\n //\n $makale_resim = Article::find($id)->img->name;\n @unlink(public_path(\"uploads/\".$makale_resim));\n @unlink(public_path(\"uploads/thumb_\".$makale_resim));\n Img::where(\"imageable_id\",$id)->where(\"imageable_type\",\"App\\Article\")->delete();\n Article::destroy($id);\n Session::flash(\"durum\",1);\n return redirect(\"/admin/haber\");\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
40974b66c4814946f3f541a7be794685
Generate the tagspecific class file.
[ { "docid": "d6b144264d5634685014f413f3fd1b8d", "score": "0.6335732", "text": "private function generateTagSpecificClass($tagId, $jsonSpec, FileManager $fileManager)\n {\n list($file, $namespace) = $fileManager->createNewNamespacedFile('Spec\\\\Tag');\n\n $className = $this->getClassNameFromId($tagId);\n\n $namespace->addUse(\"{$fileManager->getRootNamespace()}\\\\Spec\\\\SpecRule\");\n $namespace->addUse(\"{$fileManager->getRootNamespace()}\\\\Spec\\\\Tag\");\n\n $parentClass = array_key_exists('extensionSpec', $jsonSpec)\n ? 'AmpProject\\Validator\\Spec\\TagWithExtensionSpec'\n : 'AmpProject\\Validator\\Spec\\Tag';\n\n /** @var ClassType $class */\n $class = $namespace->addClass($className)\n ->setFinal()\n ->addExtend($parentClass)\n ->addImplement('AmpProject\\Validator\\Spec\\Identifiable');\n\n $class->addConstant('ID', $tagId)\n ->addComment(\"ID of the tag.\\n\\n@var string\");\n\n if (array_key_exists('extensionSpec', $jsonSpec)) {\n $extensionSpec = $jsonSpec['extensionSpec'];\n $jsonSpec['extensionSpec'] = \"self::EXTENSION_SPEC\";\n\n $class->addConstant('EXTENSION_SPEC', $extensionSpec)\n ->addComment(\"Array of extension spec rules.\\n\\n@var array\");\n\n $latestVersion = null;\n if (isset($this->extensionsMeta[$extensionSpec['name']]['latestVersion'])) {\n $latestVersion = $this->extensionsMeta[$extensionSpec['name']]['latestVersion'];\n }\n\n $class->addConstant('LATEST_VERSION', $latestVersion)\n ->addComment(\"Latest version of the extension.\\n\\n@var string\");\n\n if (isset($extensionSpec['version']) && isset($this->extensionsMeta[$extensionSpec['name']])) {\n $versionsMeta = [];\n foreach ($extensionSpec['version'] as $validVersion) {\n if (isset($this->extensionsMeta[$extensionSpec['name']]['versions'][$validVersion])) {\n $versionsMeta[$validVersion] =\n $this->extensionsMeta[$extensionSpec['name']]['versions'][$validVersion];\n }\n }\n\n $class->addConstant('VERSIONS_META', $versionsMeta)\n ->addComment(\"Meta data about the specific versions.\\n\\n@var array\");\n }\n }\n\n $class->addConstant('SPEC', $jsonSpec)\n ->addComment(\"Array of spec rules.\\n\\n@var array\");\n\n $classComment = \"Tag class {$className}.\\n\\n\";\n $classComment .= \"@package ampproject/amp-toolbox.\\n\\n\";\n $classComment .= implode(\"\\n\", $this->getMagicPropertyAnnotations($jsonSpec));\n $class->addComment($classComment);\n\n $fileManager->saveFile($file, \"Spec/Tag/{$className}.php\");\n }", "title": "" } ]
[ { "docid": "5b88eac18479800e1fb8eca475d84172", "score": "0.6167228", "text": "public function generate_class_file_contents()\n {\n \n $trait_class = $this->get_class_name();\n $name = $this->name;\n $pk_name = $this->cfg('pk_name');\n $file_contents = <<<EOF\n<?php defined('SYSPATH') or die('No direct script access.');\n/**\n * FileDescription: {$this->description}\n */\ntrait {$trait_class} {\n\nEOF;\n //set all traits as 'use' statements\n if (isset($this->traits) && is_array($this->traits)) \n {\n foreach ($this->traits as $trait)\n {\n $file_contents .= \" use \".$trait->pk_value().\";\".PHP_EOL;\n } \n\n }\n $quoted_name = Field::generate_php_value($this->name);\n $quoted_label = Field::generate_php_value($this->label);\n $quoted_desc = Field::generate_php_value($this->description);\n $file_contents .= <<<EOF\n public static \\$__{$this->name}__scfg = array (\n 'traits__{$this->name}__name' => {$quoted_name},\n 'traits__{$this->name}__label' => {$quoted_label},\n 'traits__{$this->name}__description' => {$quoted_desc}, \n 'field_keys' => array (\n\nEOF;\n\n //store all fields in trait scfg\n if (isset($this->fields) && is_array($this->fields)) \n {\n foreach ($this->fields as $field)\n {\n $field_class = $field->pk_value();\n $field_obj = $field_class::factory();\n $file_contents .= \" '\".$field_obj->name.\"',\".PHP_EOL;\n } \n }\n\n $file_contents .= \" ),\".PHP_EOL;\n $file_contents .= \" );\".PHP_EOL;\n\n //set all default values for each field on the trait\n if (isset($this->fields) && is_array($this->fields)) \n {\n foreach ($this->fields as $field)\n {\n $field_class = $field->pk_value();\n $field_obj = $field_class::factory();\n //if the default value should not be set to null and defaultvalue is null\n if ($field_obj->defaultvalue() === NULL && $field_obj->nullvalue === FALSE)\n {\n //skip defining this field so it has no default value\n continue;\n }\n else\n {\n $file_contents .= \" public \\$\".$field_obj->name.\" = \".Field::generate_php_value($field_obj->export_value($field_obj->defaultvalue())).\";\".PHP_EOL;\n }\n \n }\n\n }\n\n //loop through all stored methods\n if (isset($this->methods) && is_array($this->methods))\n {\n foreach ($this->methods as $method)\n {\n $file_contents .= PHP_EOL.\" \".$method['comment'];\n $file_contents .= $method['source'].PHP_EOL;\n\n }\n\n }\n\n $file_contents .= \"}\".PHP_EOL;\n\n return $file_contents;\n }", "title": "" }, { "docid": "63959d0e835a762c138881d17f81f6af", "score": "0.6133957", "text": "public function _generateCode(){\n\t\tforeach ($this->classes as $classname => $classinfo){\n\t\t\tforeach ($classinfo['generators'] as $generator){\n\t\t\t\t$generator->generate();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6ce7e01dac9537b3c964cf3e251b5d3d", "score": "0.58360827", "text": "public function generate()\n {\n if (!is_dir(dirname($this->saveFile))) {\n mkdir(dirname($this->saveFile), 0777, true);\n }\n\n if (is_file($this->saveFile)) {\n return;\n $content = file_get_contents($this->saveFile);\n $reflect = new ReflectionClass('Rax\\Mvc\\ServiceContainer');\n $docblock = $reflect->getDocComment();\n file_put_contents($this->saveFile, str_replace($docblock, $this->getClassDocblock($this->service->listClasses()), $content));\n } else {\n // FileSystem::save();\n // file_put_contents(FileSystem$this->saveFile, $this->getTemplate());\n file_put_contents($this->saveFile, $this->getContent());\n }\n }", "title": "" }, { "docid": "fe041db24ee9fe8ef9b55efe1792d4ad", "score": "0.5791793", "text": "public function generateObjects(): void\n {\n foreach ($this->serviceCategories as $id => &$value) {\n if (! isset($value['members']) || count($value['members']) === 0) {\n continue;\n }\n\n $value['type'] = self::TAG_TYPE;\n\n $this->generateObjectInFile($value, $id);\n }\n }", "title": "" }, { "docid": "4df9ad9fe4e81110bdf44188dd1c5c51", "score": "0.5749869", "text": "abstract public function fileClass();", "title": "" }, { "docid": "4280a305cbdb209a527848a4c0b4ea8f", "score": "0.57280874", "text": "protected function generateControllerClassFile()\n {\n $this->createFiles(\n 'controller',\n app_path().'/Http/Controllers/'.$this->controllerName.'Controller.php'\n );\n }", "title": "" }, { "docid": "6a74d4aef5ce6c39bf623d3324317f58", "score": "0.5703956", "text": "private function createBrowserKitBaseTestClass()\n {\n $testsPath = base_path('tests');\n if (!$this->files->isDirectory($testsPath)) {\n $this->files->makeDirectory($testsPath, 0777, true, true);\n }\n\n $baseTestPath = base_path(config('simple-crud.base_test_path'));\n $baseTestClass = class_basename(config('simple-crud.base_test_class'));\n\n if (!$this->files->exists($baseTestPath)) {\n $browserKitTestClassContent = str_replace(\n 'class BrowserKitTest extends',\n \"class {$baseTestClass} extends\",\n $this->getBrowserKitBaseTestContent()\n );\n\n $this->generateFile($baseTestPath, $browserKitTestClassContent);\n\n $this->command->info('BrowserKitTest generated.');\n }\n }", "title": "" }, { "docid": "defaf71012b60ca50d78267ffd5d0f4a", "score": "0.56958073", "text": "public function generateClassFromStub();", "title": "" }, { "docid": "5f840d33ab70e11074c8302bd28cc6a6", "score": "0.568253", "text": "private function generateGeneratorClass()\n {\n $this->setDataToGenerate();\n\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Generator/%s/%s.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the generator as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'generator.php', $target, $this->dataToGenerate);\n }", "title": "" }, { "docid": "347120994fe502a5b6180ef72505150f", "score": "0.5680839", "text": "protected function generateMapFile()\n {\n $namespace = $this->getNamespace();\n $class = $this->options['class'];\n\n $php = <<<EOD\n<?php\n\nnamespace $namespace;\n\nuse \\\\Pomm\\\\Object\\\\BaseObject;\nuse \\\\Pomm\\\\Exception\\\\Exception;\n\nclass $class extends BaseObject\n{\n}\n\nEOD;\n\n return $php;\n }", "title": "" }, { "docid": "6847522ab072506b1c0422f81e70b401", "score": "0.56714636", "text": "public function generateClass(Suite $suite, $contextClass);", "title": "" }, { "docid": "156f2dfd522ed3b63a601715c6fa6fcd", "score": "0.56396866", "text": "private function _task_generation()\n\t{\n\t\t$prefix = ($this->bundle == DEFAULT_BUNDLE) ? '' : Str::classify($this->bundle).'_';\n\t\t$view_prefix = ($this->bundle == DEFAULT_BUNDLE) ? '' : $this->bundle.'::';\n\n\t\t// set up the markers for replacement within source\n\t\t$markers = array(\n\t\t\t'#CLASS#'\t\t=> $prefix.$this->class_prefix.$this->class,\n\t\t\t'#LOWER#'\t\t=> $this->lower,\n\t\t\t'#LOWERFULL#'\t=> $view_prefix.Str::lower(str_replace('/','.', $this->class_path).$this->lower)\n\t\t);\n\n\t\t// loud our task template\n\t\t$template = Utils::load_template('task/task.tpl');\n\n\t\t// holder for methods source, and base template for methods\n\t\t$methods_source \t= '';\n\t\t$method_template \t= Utils::load_template('task/method.tpl');\n\n\t\t// loop through our methods\n\t\tforeach ($this->arguments as $method)\n\t\t{\n\t\t\t// add the current method to the markers\n\t\t\t$markers['#METHOD#'] = Str::lower($method);\n\n\t\t\t// append the replaces source\n\t\t\t$methods_source .= Utils::replace_markers($markers, $method_template);\n\t\t}\n\n\t\t// add a marker to replace the methods stub in the task\n\t\t// template\n\t\t$markers['#METHODS#'] = $methods_source;\n\n\t\t// added the file to be created\n\t\t$this->writer->create_file(\n\t\t\t'Task',\n\t\t\t$markers['#CLASS#'].'_Task',\n\t\t\t$this->bundle_path.'tasks/'.$this->class_path.$this->lower.EXT,\n\t\t\tUtils::replace_markers($markers, $template)\n\t\t);\n\t}", "title": "" }, { "docid": "9ab23f6129cca3686901a4eac6db0761", "score": "0.56269354", "text": "protected function generateClass(): void\n {\n if ($this->class !== null) {\n throw new RuntimeException('The class has already been generated');\n }\n\n $classBaseType = $this->getBaseTypeClass();\n\n $oClassComment\t= new PhpDocComment('Class '.$this->phpIdentifier);\n\n $this->class = new PhpClass(\n $this->phpIdentifier,\n false,\n $classBaseType,\n $oClassComment,\n false,\n $this->abstract\n );\n\n $constructorComment = new PhpDocComment();\n $constructorSource = '';\n $constructorParameters = [];\n $accessors = [];\n\n // Add base type members to constructor parameter list first and call base class constructor\n $parentMembers = $this->getBaseTypeMembers($this);\n if (!empty($parentMembers)) {\n foreach ($parentMembers as $member) {\n $name = Validator::validateAttribute($member->getName());\n\n if (!$member->getNullable()) {\n $constructorComment->addParam(PhpDocElementFactory::getParam($member->getCommentType(), $name, ''));\n $constructorParameters[$name]\t= $member->getTypeHint();\n }\n }\n $constructorSource .= \"\\t\".'parent::__construct(' . $this->buildParametersString($constructorParameters, false) . ');' . PHP_EOL;\n }\n\n // Add member variables\n foreach ($this->members as $member) {\n $type = Validator::validateType($member->getType());\n\n $strCommentType\t= $member->getCommentType();\n\n $name = Validator::validateAttribute($member->getName());\n $strTypeHint\t= $member->getTypeHint();\n\n $comment = new PhpDocComment();\n $comment->setVar(PhpDocElementFactory::getVar($strCommentType, $name, ''));\n $var = new PhpVariable('protected', $name, '', $comment);\n $this->class->addVariable($var);\n\n if($type === DateTime::class && !$this->bHasDateTimeUseClause)\n\t\t\t{\n\t\t\t\t$this->class->addUseClause(DateTime::class);\n\t\t\t\t$this->class->addUseClause(Exception::class);\n\t\t\t\t$this->bHasDateTimeUseClause\t= true;\n\t\t\t}\n\n if (!$member->getNullable()) {\n if ($type === DateTime::class) {\n if ($this->config->get('constructorParamsDefaultToNull')) {\n $constructorSource .= \"\\t\".'$this->' . $name . ' = $' . $name . ' ? $' . $name . '->format(DateTime::ATOM) : null;' . PHP_EOL;\n } else {\n $constructorSource .= \"\\t\".'$this->' . $name . ' = $' . $name . '->format(DateTime::ATOM);' . PHP_EOL;\n }\n } else {\n $constructorSource .= \"\\t\".'$this->' . $name . ' = $' . $name . ';' . PHP_EOL;\n }\n $constructorComment->addParam(PhpDocElementFactory::getParam($strCommentType, $name, ''));\n $constructorParameters[$name] = $strTypeHint;\n }\n\n $getterComment = new PhpDocComment();\n $getterComment->setReturn(PhpDocElementFactory::getReturn($strCommentType, ''));\n if ($type === DateTime::class) {\n $getterCode =\n\t\t\t\t\t\"\\t\".'if ($this->' . $name . ' === null)' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'{' . PHP_EOL .\n \"\\t\\t\".'return null;' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'}' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'try' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'{' . PHP_EOL .\n\t\t\t\t\t\"\\t\\t\".'return new DateTime($this->' . $name . ');' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'}' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'catch (Exception $oException)' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'{' . PHP_EOL .\n\t\t\t\t\t\"\\t\\t\".'return null;' . PHP_EOL .\n\t\t\t\t\t\"\\t\".'}' . PHP_EOL\n\t\t\t\t;\n } else {\n $getterCode = \"\\t\".'return $this->' . $name . ';' . PHP_EOL;\n }\n $getter = new PhpFunction('public', 'get' . ucfirst($name), '', $getterCode, $getterComment, $member->getTypeHint(true));\n $accessors[] = $getter;\n\n $setterComment = new PhpDocComment();\n $setterComment->addParam(PhpDocElementFactory::getParam($strCommentType, $name, ''));\n $setterComment->setReturn(PhpDocElementFactory::getReturn($this->phpIdentifier, ''));\n if ($type === DateTime::class) {\n if ($member->getNullable()) {\n $setterCode =\n\t\t\t\t\t\t\"\\t\".'if ($' . $name . ' === null)' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\".'{' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\\t\".'$this->' . $name . ' = null;' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\".'}' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\".'else' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\".'{' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\\t\".'$this->' . $name . ' = $' . $name . '->format(DateTime::ATOM);' . PHP_EOL .\n\t\t\t\t\t\t\"\\t\".'}' . PHP_EOL;\n } else {\n $setterCode = \"\\t\".'$this->' . $name . ' = $' . $name . '->format(DateTime::ATOM);' . PHP_EOL;\n }\n } else {\n $setterCode = \"\\t\".'$this->' . $name . ' = $' . $name . ';' . PHP_EOL;\n }\n $setterCode .= \"\\t\".'return $this;' . PHP_EOL;\n $setter = new PhpFunction(\n 'public',\n 'set' . ucfirst($name),\n $this->buildParametersString(\n array($name => $strTypeHint),\n true,\n // If the type of a member is nullable we should allow passing null to the setter. If the type\n // of the member is a class and not a primitive this is only possible if setter parameter has\n // a default null value. We can detect whether the type is a class by checking the type hint.\n $member->getNullable() && ( ($strTypeHint ?? '') !== '')\n ),\n $setterCode,\n $setterComment,\n\t\t\t\t$this->phpIdentifier\n );\n $accessors[] = $setter;\n }\n\n $constructor = new PhpFunction(\n 'public',\n '__construct',\n $this->buildParametersString(\n $constructorParameters,\n true,\n $this->config->get('constructorParamsDefaultToNull')\n ),\n $constructorSource,\n $constructorComment\n );\n $this->class->addFunction($constructor);\n\n foreach ($accessors as $accessor) {\n $this->class->addFunction($accessor);\n }\n }", "title": "" }, { "docid": "fcfb3823ae6ceb08731887b66fb6e406", "score": "0.55993074", "text": "public function generatePackage()\n {\n }", "title": "" }, { "docid": "2c0f96c37497bf312b4f6d130eab3d77", "score": "0.5584224", "text": "protected function buildClass()\n {\n return str_replace(\n ':classname',\n $this->classname,\n $this->files->get(__DIR__.'/../Stubs/Preset.stub')\n );\n }", "title": "" }, { "docid": "89a1cd9ef6c24eaa26385c70bfcd3a5d", "score": "0.5547662", "text": "public function generate()\r\n\t{\r\n\t\t$v = CValidator::$builtInValidators;\r\n\t\t$template = <<<CODE\r\n<?php\r\n/**\r\n * NOTE: This class is automatically generated from Yii validator class.\r\n * This is not actual validator. For validator class @see C%2\\$s.\r\n */\r\n%1\\$s\r\nclass %2\\$sAnnotation extends EValidatorAnnotation implements IBuiltInValidatorAnnotation\r\n{\r\n%3\\$s\r\n}\r\nCODE;\r\n\t\t$ignored = [];\r\n\t\t$info = new ReflectionClass(ValidatorAnnotation::class);\r\n\t\tforeach ($info->getProperties(ReflectionProperty::IS_PUBLIC) as $field)\r\n\t\t{\r\n\t\t\t$ignored[$field->name] = $field->name;\r\n\t\t}\r\n\t\t$ignored['attributes'] = true;\r\n\t\t$ignored['builtInValidators'] = true;\r\n\t\tforeach ($v as $n => $class)\r\n\t\t{\r\n\t\t\t$name = ucfirst($n) . 'Validator';\r\n\t\t\t$info = new ReflectionAnnotatedClass($class);\r\n\t\t\t$classComment = $info->getDocComment();\r\n\t\t\t$values = $info->getDefaultProperties();\r\n\t\t\t$fields = [];\r\n\t\t\tforeach ($info->getProperties(ReflectionProperty::IS_PUBLIC) as $field)\r\n\t\t\t{\r\n\t\t\t\tif (isset($ignored[$field->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$comment = $field->getDocComment();\r\n\t\t\t\t$fields[$field->name] = sprintf(\"\\t%s\\n\\tpublic \\$%s = %s;\\n\", $comment, $field->name, var_export($values[$field->name], true));\r\n\t\t\t}\r\n\t\t\t$code = sprintf($template, $classComment, $name, implode(\"\\n\", $fields));\r\n\t\t\tfile_put_contents(\"c:/temp/{$name}Annotation.php\", $code);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "910f38499e4029fe009976b0702d5a2f", "score": "0.55078775", "text": "private function createBrowserKitBaseTestClass()\n {\n $testsPath = base_path('tests');\n if (!$this->files->isDirectory($testsPath)) {\n $this->files->makeDirectory($testsPath, 0777, true, true);\n }\n\n $userModel = config('auth.providers.users.model');\n $baseTestPath = base_path(config('simple-crud.base_test_path'));\n $baseTestClass = class_basename(config('simple-crud.base_test_class'));\n\n if (!$this->files->exists($baseTestPath)) {\n $browserKitTestClassContent = str_replace(\n ['class BrowserKitTest extends', 'App\\User'],\n [\"class {$baseTestClass} extends\", $userModel],\n $this->getBrowserKitBaseTestContent()\n );\n\n $this->generateFile($baseTestPath, $browserKitTestClassContent);\n\n $this->command->info('BrowserKitTest generated.');\n }\n }", "title": "" }, { "docid": "e85d0afe084e73d0aae1bb4157101c18", "score": "0.5485111", "text": "public function createFiles(){\n //Para cada estructura pasada genera los archivos\n foreach ($this->structs as $struct){\n //Genera y escribe la clase en archivo\n $class=$this->generateClass($struct);\n $this->writeFile('class/'.$struct->getClass().'.php',$class);\n print_r(\"Clase generada: class/\".$struct->getClass().'.php<br/>');\n //Genera y escribe el dao de la clase en archivo\n $dao=$this->generateDao($struct);\n $this->writeFile('dao/Dao'.$struct->getClass().'.php',$dao);\n print_r(\"DAO de Clase generado: dao/Dao\".$struct->getClass().'.php<br/>');\n //Genera y escribe la estructura en archivo\n $stringStruct=$this->genetrateStruct($struct);\n $this->writeFile('struct/struct'.$struct->getClass().'.php',$stringStruct);\n print_r(\"Estructura de Clase generada: struct/struct\".$struct->getClass().'.php<br/>');\n print_r(\"---------------------------------------------------<br/>\");\n }\n }", "title": "" }, { "docid": "f2436a1404323ab8365cabf4f5c0ff69", "score": "0.5477882", "text": "public function generate()\n {\n foreach ($this->files as $file) {\n\n $currentFile = substr(str_replace($this->executionPath, '', $file), 3);\n $isPhp = strrpos($file, '.php') == strlen($file) - strlen('.php');\n\n if ($isPhp) {\n $fileReflector = new FileReflector($file);\n $parser = new CodeParser($file, $currentFile, $fileReflector);\n } else {\n $content = file_get_contents($file);\n $parser = new MarkdownParser($currentFile, $content);\n }\n\n $document = $parser->parse();\n\n $writer = new Writer(json_encode($document), $this->outputPath);\n $writer->write(substr($currentFile, 4));\n\n $this->types->addType([\n 'id' => $document['id'],\n 'title' => $document['title'],\n 'contents' => $document['id'] . '.json'\n ]);\n }\n }", "title": "" }, { "docid": "aa24907756d4774ac9e43e7bafb05527", "score": "0.546706", "text": "public function generate( $clsName, $spec ) {\n $code = $this->genClassCommentBlock( $clsName, $spec );\n \n //Generate code above the class definition\n if ( array_key_exists( 'AppUses', $spec ) ) {\n foreach( $spec['AppUses'] as $key=>$val ) {\n $code .= \"App::uses( '$key', '$val' );\\n\";\n }\n $code .= \"\\n\";\n }\n \n //Generate class definitions\n if ( array_key_exists( 'extends', $spec ) ) {\n $extendsCls = 'extends ' . $spec['extends'];\n } elseif( $clsName == 'App' . $this->name ) {\n $extendsCls = 'extends ' . $this->name;\n } else {\n $extendsCls = 'extends App' . $this->name;\n }\n $code .= \"class $clsName $extendsCls {\\n\";\n $code .= \"\\n\";\n \n //Generate class properties\n if ( array_key_exists( 'properties', $spec ) ) {\n foreach( $spec['properties'] as $name=>$prop ) {\n $code .= $this->indent( $this->genProperty( $name, $prop ) );\n } \n $code .= \"\\n\";\n }\n \n //Generate class methods\n if ( array_key_exists( 'methods', $spec ) ) {\n foreach( $spec['methods'] as $name=>$method ) {\n $code .= $this->indent( $this->genMethod( $name, $method ) );\n $code .= \"\\n\";\n } \n }\n \n //Generate class closing tag\n $code .= \"}\\n\";\n //Return generated code\n return $code;\n \n }", "title": "" }, { "docid": "a31da59e9a4afcf56335a08be9916061", "score": "0.54626584", "text": "public function generateClass($values, $className)\r\n\t\t{\r\n\t\t\t$code = array(\r\n\t\t\t\t'<?php',\r\n\t\t\t\t'namespace Infomaker\\Models\\Entities',\r\n\t\t\t\t'{',\r\n\t\t\t\t'',\r\n\t\t\t\t' /**',\r\n\t\t\t\t' * Entity ' . $className,\r\n\t\t\t\t' */',\r\n\t\t\t\t' class ' . $className . ' ' . 'extends AbstractEntity',\r\n\t\t\t\t' {'\r\n\t\t\t);\r\n\r\n\t\t\t$code[] = ''; // key 9\r\n\t\t\t$code[] = ''; // key 10\r\n\r\n\t\t\t$this->generateProperties($code, $values);\r\n\t\t\t$this->generatePropertyMethods($code, $values);\r\n\r\n\t\t\tif (!empty($this->modelAlias)) {\r\n\t\t\t\t$code[10] = ' protected $modelAlias = ' . $this->modelAlias . ';';\r\n\t\t\t\t$this->modelAlias = null;\r\n\t\t\t} else {\r\n\t\t\t\tunset($code[9], $code[10]);\r\n\t\t\t}\r\n\r\n\t\t\t$code[] = ' }';\r\n\t\t\t$code[] = '}';\r\n\r\n\t\t\tfile_put_contents(\"app/models/entities/{$className}.php\", implode(PHP_EOL, $code));\r\n\r\n\t\t\techo \"Generate file {$className}.php in models/entities/\" . PHP_EOL;\r\n\t\t}", "title": "" }, { "docid": "a03e5f9cffa45b63e480c296f68fdfad", "score": "0.54408777", "text": "public static function create( $filename,$line,$class,$method){ return new xo_codetag($filename,$line,$class,$method); }", "title": "" }, { "docid": "39a5b3b398e05577298f4d13bd278d9d", "score": "0.54174227", "text": "private function generateImpl(): PhpFile\n {\n $this->ctx->type(Type::fromName(BidiStream::class));\n $this->ctx->type(Type::fromName(\\Google\\ApiCore\\LongRunning\\OperationsClient::class));\n $this->ctx->type(Type::fromName(ServerStream::class));\n $this->ctx->type(Type::fromName(GetOperationRequest::class));\n $this->ctx->type(Type::fromName(Any::class));\n $this->ctx->type(Type::fromName(\\Google\\Protobuf\\GPBEmpty::class));\n $this->ctx->type(Type::fromName(\\PHPUnit\\Framework\\TestCase::class));\n $this->ctx->type(Type::fromName(ApiException::class));\n $this->ctx->type(Type::fromName(Code::class));\n $this->ctx->type(Type::stdClass());\n $this->ctx->type($this->serviceDetails->grpcClientType);\n foreach ($this->serviceDetails->methods->filter(fn ($x) => $x->methodType !== MethodDetails::CLIENT_STREAMING) as $method) {\n $this->ctx->type($method->requestType);\n }\n foreach ($this->serviceDetails->methods as $method) {\n foreach ($method->allFields as $field) {\n if ($field->isRepeated && $field->typeSingular->isClass() && $field->isRequired) {\n $this->ctx->type($field->typeSingular);\n }\n }\n }\n // Generate file content\n $file = AST::file($this->generateClass())\n ->withApacheLicense($this->ctx->licenseYear)\n ->withGeneratedCodeWarning();\n // Finalize as required by the source-context; e.g. add top-level 'use' statements.\n return $this->ctx->finalize($file);\n }", "title": "" }, { "docid": "653b5a505a821d24e00ce898e8e6ba38", "score": "0.54135764", "text": "protected function createPaymentMethodModelClasses()\n {\n /* @var PostFinanceCheckout_Payment_Model_Resource_PaymentMethodConfiguration_Collection $collection */\n $collection = Mage::getModel('postfinancecheckout_payment/entity_paymentMethodConfiguration')->getCollection();\n $generationDir = $this->getHelper()->getGenerationDirectoryPath() . DS . 'PostFinanceCheckout' . DS . 'Payment' .\n DS . 'Model';\n if (! file_exists($generationDir)) {\n mkdir($generationDir, 0777, true);\n }\n\n $classTemplate = file_get_contents(\n Mage::getModuleDir('', 'PostFinanceCheckout_Payment') . DS . 'Model' . DS . 'Payment' . DS . 'Method' . DS .\n 'Template.php.tpl');\n foreach ($collection->getItems() as $configuration) {\n $fileName = $generationDir . DS . 'PaymentMethod' . $configuration->getId() . '.php';\n if (! file_exists($fileName)) {\n file_put_contents($fileName,\n str_replace(array(\n '{id}'\n ), array(\n $configuration->getId()\n ), $classTemplate));\n }\n }\n }", "title": "" }, { "docid": "d64348269dd1a18682a051e17203204c", "score": "0.53920114", "text": "function generate_main_class( $class = '' ) {\n\t\t// Separates classes with a single space, collates classes for post DIV\n\t\techo 'class=\"' . join( ' ', generate_get_main_class( $class ) ) . '\"'; // WPCS: XSS ok, sanitization ok.\n\t}", "title": "" }, { "docid": "c9696cddf4a2d4cb2a07d0d465f27086", "score": "0.5389642", "text": "function generate_get_main_class( $class = '' ) {\n\n\t\t$classes = array();\n\n\t\tif ( ! empty( $class ) ) {\n\t\t\tif ( ! is_array( $class ) ) {\n\t\t\t\t$class = preg_split( '#\\s+#', $class );\n\t\t\t}\n\n\t\t\t$classes = array_merge( $classes, $class );\n\t\t}\n\n\t\t$classes = array_map( 'esc_attr', $classes );\n\n\t\treturn apply_filters( 'generate_main_class', $classes, $class );\n\t}", "title": "" }, { "docid": "56778b4ec9f8dbdbf79fc91f5d13b380", "score": "0.5384964", "text": "protected function generateCode(){\n $this->start();\n $this->attributes();\n $this->getEntity();\n $this->getEntityRef();\n $this->end();\n }", "title": "" }, { "docid": "23f9f0c277a30e8324410c2d4a92f3a7", "score": "0.53817254", "text": "function convertClass(&$element)\n {\n $this->flushPackageXml($element);\n parent::convertClass($element);\n $docblock = $this->prepareDocBlock($element);\n $this->method_data = array();\n $this->class_dir = str_replace(array('_','.'),array('-','--'),$element->docblock->package);\n $this->package = $element->docblock->package;\n $this->category = strtolower($element->docblock->category);\n if (!empty($element->docblock->subpackage)) $this->class_dir .= PATH_DELIMITER . $element->docblock->subpackage;\n $docblock = $this->prepareDocBlock($element,false);\n $this->class_data->assign(\"sdesc\",$docblock['sdesc']);\n $this->class_data->assign(\"desc\",$docblock['desc']);\n $this->class_data->assign(\"tags\",$docblock['tags']);\n\n $this->class_data->assign(\"source_location\",$element->getSourceLocation($this,$this->template_options['usepear']));\n $this->class_data->assign(\"id\",$this->getId($element));\n $this->class_data->assign(\"method_ids\",array());\n $this->left[$this->package][] = array('link' => $this->getId($element).'-summary');\n if ($t = $element->getTutorial())\n {\n $this->class_data->append(\"method_ids\",$this->getId($t));\n }\n\n if (isset($this->template_options['separatepage']) && $this->template_options['separatepage'])\n {\n $this->class_summary = &$this->newSmarty(true);\n if ($t = $element->getTutorial())\n {\n $this->class_summary->assign(\"tutorial\",$this->returnSee($t));\n }\n\n $this->class_summary->assign(\"class_name\",$this->type_adjust($element->getName()));\n $this->class_summary->assign(\"sdesc\",$docblock['sdesc']);\n $this->class_summary->assign(\"desc\",$docblock['desc']);\n $this->class_summary->assign(\"tags\",$docblock['tags']);\n $this->class_summary->assign(\"vars\",array());\n $this->class_summary->assign(\"methods\",array());\n $this->class_summary->assign(\"package\",$element->docblock->package);\n\n $this->class_summary->assign(\"children\", $this->generateChildClassList($element));\n $this->class_summary->assign(\"class_tree\", $this->generateFormattedClassTree($element));\n $this->class_summary->assign(\"conflicts\", $this->getFormattedConflicts($element,\"classes\"));\n \n $this->class_summary->assign(\"source_location\",$element->getSourceLocation($this,$this->template_options['usepear']));\n $this->class_summary->assign(\"id\",$this->getId($element).'-summary');\n $this->class_data->append(\"method_ids\",$this->getId($element).'.'.strtolower(str_replace('_','-',$element->getName())).'-summary');\n $inherited_methods = $this->getFormattedInheritedMethods($element);\n if (!empty($inherited_methods))\n {\n $this->class_summary->assign(\"imethods\",$inherited_methods);\n }\n $inherited_vars = $this->getFormattedInheritedVars($element);\n // variables are irrelevant in peardoc2\n if (false)//!empty($inherited_vars))\n {\n $this->class_summary->assign(\"ivars\",$inherited_vars);\n }\n $this->addSummaryToPackageXml($this->class_summary->fetch('class_summary.tpl'));\n }\n $this->sourceloc = $element->getSourceLocation($this,$this->template_options['usepear']);\n }", "title": "" }, { "docid": "0502df0f1e69c815b551af6cc8661d89", "score": "0.53432626", "text": "public function generate()\n {\n $info = $this->generateInfo();\n $parameters = $this->generateParameters();\n $definitions = $this->generateDefinitions();\n list($responses, $definitions) = $this->generateResponses($definitions);\n $make = str_replace('/', '.', $this->path);\n $params = [\n 'start' => \"--- {$make} start ---\",\n 'end' => \"--- {$make} end ---\",\n 'info' => $info,\n 'parameters' => $parameters,\n 'responses' => $responses,\n 'definitions' => $definitions,\n ];\n $content = $this->render('annotation.php', $params);\n $files = [];\n $filePath = $this->cacheSwagger();\n if (is_file($filePath)) {\n $regex = sprintf('~%s([\\s\\S]*)%s~m', $params['start'], $params['end']);\n $source = file_get_contents($filePath);\n if (preg_match($regex, $source)) {\n $content = substr($content, 3);\n $content = preg_replace($regex, $content, $source);\n } else {\n $content = \"/**\\n\" . $content . \"\\n */\";\n $content = $source . \"\\n\" . $content;\n }\n } else {\n $content = \"<?php\\n/**\\n\" . $content . \"\\n */\";\n }\n $files[] = new CodeFile($filePath, $content);\n return $files;\n }", "title": "" }, { "docid": "3945b6d30b4d253450cddf1cf3687528", "score": "0.5304697", "text": "function generate()\n {\n $template['model'] = file_get_contents('app/util/templates/classes/Model.template');\n $template['entity'] = file_get_contents('app/util/templates/classes/Entity.template');\n $template['controller'] = file_get_contents('app/util/templates/classes/Controller.template');\n $count = 0;\n foreach ($this->tables as $model => $value) {\n print_r(\"Generating MVCE for \" . $model . \"...\\n\");\n\n $className = $model;\n $m = $this->model($template['model'], $className, $value);\n $e = $this->entity($template['entity'], $className);\n $c = $this->controller($template['controller'], $className);\n\n $file['model'] = fopen($this->MVCFolderPath . '/models/' . $this->prefix . $className . '.php', 'w');\n $file['entity'] = fopen($this->MVCFolderPath . '/entities/' . $this->prefix . $className . 'Entity.php', 'w');\n $file['controller'] = fopen($this->MVCFolderPath . '/controllers/' . $this->prefix . $className . 'Controller.php', 'w');\n\n try {\n fwrite($file['model'], $m);\n fwrite($file['entity'], $e);\n fwrite($file['controller'], $c);\n $count += 3;\n } catch (InvalidFileException $f) {\n throw $f;\n }\n }\n print_r(\"Done!\\n\");\n print_r(\"Total files: \" . $count.\"\\n\");\n }", "title": "" }, { "docid": "90d6f6353bfb57b011d8365876606b7f", "score": "0.5275746", "text": "public function getTagName ()\n\t{\n\t\treturn 'keygen';\n\t}", "title": "" }, { "docid": "405cdc41c38e861a70f60bc0bd2b14df", "score": "0.5275565", "text": "abstract protected function _Generate();", "title": "" }, { "docid": "a1f265c5be41eeba9040b9d5afab10c4", "score": "0.52736145", "text": "function getClassID() {\r\n\r\n\t\t// Class ID serialize version info\r\n\t\t$className = 'DataSourceConfig';\r\n\t\t$fileName = 'DataSourceConfig.php';\r\n\t\t$versionID = '20021025-0955'; // date stamp\r\n\r\n\t\treturn \"$className:$fileName:$versionID\";\r\n\r\n\t}", "title": "" }, { "docid": "c69e4f368e5f9f08307fb3118d0bc629", "score": "0.5273513", "text": "public function generate()\n {\n $oMetaDataFile = new MetaData($this->getModule()->getId());\n $oMetaDataFile->setFiles($this->loadFilesOfModule());\n $oMetaDataFile->setExtensions($this->getModule()->getExtensions());\n\n $oFile = new File($this->getMetaDataPath());\n $oFile->setContent($oMetaDataFile->getContent());\n $oFile->save();\n }", "title": "" }, { "docid": "24865e0fd9a36100bf7ddca92be24704", "score": "0.5246818", "text": "public function generateCode($info) {\n\t\t$this->javadoc = ($info->options[\"javadoc\"] == \"yes\");\n\t\t\n\t\t\n\t\tif (array_key_exists (\"indent\", $info->options)) {\n\t\t\t$this->codeIndent = $info->options[\"indent\"];\n\t\t} else {\n\t\t\t$this->codeIndent = DEFAULT_INDENT;\n\t\t}\t\t\n\t\t\n\t\t\n\t\t// header.\n\t\t\n\t\t$this->code .= \"<?php \\n\";\n\t\t\t\n\t\t$jd = \"PHP Class for \".$info->databaseType.\" table \".$info->tableName.\"\\nDatabase - \".$info->databaseName.\"\\nServer Name - \".$info->serverName;\n\t\t$this->addJavadoc($jd, \"\");\n\t\t$this->code .=\"class \".$info->tableName.\"_Record {\\n\";\n\n\t\t// private members.\n\t\tforeach ($info->fieldData as $fld) {\n\t\t\t$jd = \"Member for DB field \".$fld->memberName.\" \".$info->type.\" Type: \".$fld->databaseDataType.\".\";\n\t\t\t$this->addJavadoc($jd);\n\t\t\t$this->code .= $this->codeIndent.\"private $\".strtolower($fld->memberName.\";\\n\");\n\t\t\tif($this->javadoc) {\n\t\t\t\t$this->code.=\"\\n\";\n\t\t\t}\n\t\t}\n\t\t$this->code .= \"\\n\";\n\n\t\t// getters.\n\t\t\n\t\t$this->addComment(\"Getters.\");\n\n\t\tforeach ($info->fieldData as $fld) {\n\t\t\t$jd = \"Getter for the \\$\".strtolower($fld->memberName).\" member.\\n@return Returns the value of the \\$\".strtolower($fld->memberName).\" member\";\n\t\t\t$this->addJavadoc(\"Getter for the \\$\".strtolower($fld->memberName).\" member.\\n@return Returns the value of the \\$\".strtolower($fld->memberName).\" member.\");\n\n\t\t\t$this->code .= $this->codeIndent.\"function get\".ucfirst(strtolower($fld->memberName).\"() {\\n\".$this->codeIndent.$this->codeIndent.\"return \\$this->\".strtolower($fld->memberName).\";\\n\".$this->codeIndent.\"}\\n\\n\");\n\t\t}\n\n\t\t$this->code .= \"\\n\";\n\n\t\t//setters.\n\t\t\n\t\t$this->addComment(\"Setters.\");\n\n\t\tforeach ($info->fieldData as $fld) {\n\t\t\t$jd = \"Setter for the \\$\".strtolower($fld->memberName).\" member.\\n@param \\$value The value that the \\$\".strtolower($fld->memberName).\" member will be set to.\";\n\t\t\t$this->addJavadoc($jd);\n\n\t\t\t$this->code .= $this->codeIndent.\"function set\".ucfirst(strtolower($fld->memberName).\"(\\$value) {\\n\".$this->codeIndent.$this->codeIndent.\"\\$this->\".strtolower($fld->memberName).\" = \\$value;\\n\".$this->codeIndent.\"}\\n\\n\");\n\t\t}\n\n\t\t// footer.\n\t\t\n\t\t$this->code .=\"}\\n\";\n\t\t$this->code .= \"?>\";\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "90fdb5f57f2543cdaa9d09ac50d9466c", "score": "0.5222356", "text": "protected abstract function generate();", "title": "" }, { "docid": "e59525e6401e997c38f8ece47730e07c", "score": "0.52210695", "text": "public static function writeClasses()\n {\n // loop through all classes\n foreach (self::getClasses() as $className => $reflectionClass) {\n $fileName = sprintf(\n 'The-%1$s-object.md',\n $className\n );\n\n $output = self::getDocComment($reflectionClass->getDocComment()) . \"\\n\";\n $output .= \"\\n\";\n\n // get all constants, properties and methods this class has\n $constants = $reflectionClass->getConstants();\n $properties = $reflectionClass->getProperties();\n $methods = $reflectionClass->getMethods();\n\n // build the document TOC\n if (count($constants) > 0) {\n $output .= '* [Constants](#constants)' . \"\\n\";\n }\n\n if (count($properties) > 0) {\n $output .= '* [Properties](#properties)' . \"\\n\";\n }\n\n if (count($methods) > 0) {\n $output .= '* [Methods](#methods)' . \"\\n\";\n }\n\n // if we have any constants, build that section\n if (count($constants) > 0) {\n $output .= \"\\n\";\n $output .= '# Constants' . \"\\n\";\n\n ksort($constants);\n\n // add the section TOC\n foreach ($constants as $constantName => $constantValue) {\n $output .= sprintf(\n '* [`%1$s`](#%2$s)',\n $constantName,\n strtolower($constantName)\n ) . \"\\n\";\n }\n\n // add the constant details\n foreach ($constants as $constantName => $constantValue) {\n $output .= \"\\n\";\n\n $output .= sprintf(\n '## `%1$s`',\n $constantName\n ) . \"\\n\";\n\n $output .= self::getConstantComment($reflectionClass, $constantName) . \"\\n\";\n }\n }\n\n // if we have any properties, build that section\n if (count($properties) > 0) {\n $output .= \"\\n\";\n $output .= '# Properties' . \"\\n\";\n\n usort(\n $properties, function ($a, $b) {\n /* @type $a ReflectionProperty */\n /* @type $b ReflectionProperty */\n return strcmp($a->getName(), $b->getName());\n }\n );\n\n // add the section TOC\n foreach ($properties as $reflectionProperty) {\n $output .= sprintf(\n '* %1$s%2$s%3$s%4$s[$%5$s](#%6$s)',\n $reflectionProperty->isPrivate() ? '`private` ' : '',\n $reflectionProperty->isProtected() ? '`protected` ' : '',\n $reflectionProperty->isPublic() ? '`public` ' : '',\n $reflectionProperty->isStatic() ? '`static` ' : '',\n $reflectionProperty->getName(),\n strtolower($reflectionProperty->getName())\n ) . \"\\n\";\n }\n\n // add the property details\n foreach ($properties as $reflectionProperty) {\n $output .= \"\\n\";\n\n $output .= sprintf(\n '## $%1$s',\n $reflectionProperty->getName()\n ) . \"\\n\";\n\n $output .= trim(\n sprintf(\n '%1$s%2$s%3$s%4$s',\n $reflectionProperty->isPrivate() ? '`private` ' : '',\n $reflectionProperty->isProtected() ? '`protected` ' : '',\n $reflectionProperty->isPublic() ? '`public` ' : '',\n $reflectionProperty->isStatic() ? '`static` ' : ''\n )\n ) . \"\\n\\n\";\n\n $output .= self::getDocComment($reflectionProperty->getDocComment()) . \"\\n\";\n }\n }\n\n // if we have any methods, build that section\n if (count($methods) > 0) {\n $output .= \"\\n\";\n $output .= '# Methods' . \"\\n\";\n\n usort(\n $methods, function ($a, $b) {\n /* @type $a ReflectionMethod */\n /* @type $b ReflectionMethod */\n return strcmp($a->getName(), $b->getName());\n }\n );\n\n // add the section TOC\n foreach ($methods as $reflectionMethod) {\n $output .= sprintf(\n '* %1$s%2$s%3$s%4$s[%5$s()](#%6$s)',\n $reflectionMethod->isPrivate() ? '`private` ' : '',\n $reflectionMethod->isProtected() ? '`protected` ' : '',\n $reflectionMethod->isPublic() ? '`public` ' : '',\n $reflectionMethod->isStatic() ? '`static` ' : '',\n $reflectionMethod->getName(),\n strtolower($reflectionMethod->getName())\n ) . \"\\n\";\n }\n\n // add the method details\n foreach ($methods as $reflectionMethod) {\n $output .= \"\\n\";\n\n $output .= sprintf(\n '## %1$s()',\n $reflectionMethod->getName()\n ) . \"\\n\";\n\n $output .= trim(\n sprintf(\n '%1$s%2$s%3$s%4$s',\n $reflectionMethod->isPrivate() ? '`private` ' : '',\n $reflectionMethod->isProtected() ? '`protected` ' : '',\n $reflectionMethod->isPublic() ? '`public` ' : '',\n $reflectionMethod->isStatic() ? '`static` ' : ''\n )\n ) . \"\\n\\n\";\n\n $output .= self::getDocComment($reflectionMethod->getDocComment()) . \"\\n\";\n }\n }\n\n self::setFile($fileName, $output);\n }\n }", "title": "" }, { "docid": "f50141fc3fe69c35fc8bb830e45b5541", "score": "0.5220285", "text": "function generateClass(){\n try{\n $this->setTableNameUpper();\n $this->setExtraVariables();\n\n\n $strClass = '<?php '.\"\\n\";\n //Include Definitions\n $strClass .= \"\\t\".'include_once (dirname(dirname(dirname(__FILE__))).\"\\\\cnx\\\\connection.php\");'.\"\\n\";\n $strClass .= \"\\t\".'include_once (dirname(dirname(__FILE__)).\"\\\\dto\\\\'.$this->table.'.dto.php\");'.\"\\n\";\n $strClass .= \"\\t\".'include_once (dirname(dirname(dirname(__FILE__))).\"\\lib\\logs.php\");'.\"\\n\";\n $strClass .= \"\\t\".'include_once (dirname(dirname(dirname(__FILE__))).\"\\sistema\\dao\\pa_secuencias.dao.php\");'.\"\\n\";\n $strClass .= \"\\n\";\n //Class Definition\n $strClass .= \"\\t\".'class '.$this->table.\"DAO {\\n\";\n\n //Atributes Definition\n $strClass .= \"\\t\\t\".'private $connection;'.\"\\n \\n\";\n\n //Constructor Definition\n $strClass .= \"\\t\\t\".'function '.$this->table.\"DAO(){\\n\".\"\\t\\t\".\"}\\n\\n\";\n\n //Insert Method Definition\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";\n $strClass .= \"\\t\\t\".'* Añade un Registro'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";\n $strClass .= \"\\t\\t\".'* @param '.$this->table.'TO $elem'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return int Filas Afectadas'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function insert'.$this->table.'('.$this->table.'TO $elem){'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n \n $strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"INSERT INTO '.$this->table.' (';\n foreach ($this->strFieldNames as $field){\n $strClass .= strtolower($field).',';\n }\n $strClass[strlen($strClass)-1] = ' ';\n $strClass .= ') VALUES ('.\"\\n\";\n //$strClass .= \"\\n\";\n //$strClass .= \"\\t\\t\\t\".'$PreparedStatement->bind_param(\"'.$this->strFieldTypes.'\", '.\"\\n\";\n $count = 0;\n foreach ($this->strFieldNames as $field){\n if($this->strFieldTypes[$count] == \"s\")\n $strClass .= \"\\t\\t\\t\\t\".'\\'\".$elem->get'.$field.'().\"\\','.\"\\n\";\n else\n $strClass .= \"\\t\\t\\t\\t\".'\".$elem->get'.$field.'().\",'.\"\\n\";\n\n $count++;\n }\n $strClass[strlen($strClass)-1] = ' ';\n $strClass[strlen($strClass)-2] = ' ';\n $strClass .= ');\"';\n $strClass .= ';';\n $strClass .= \"\\n\\n\";\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return odbc_num_rows($ResultSet);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\".\"}\".\"\\n\";\n $strClass .= \"\\n\";\n\n //Update Method Definition\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* Actualiza un Registro'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @param '.$this->table.'TO $elem'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return int Filas Afectadas'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function update'.$this->table.'('.$this->table.'TO $elem){'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"UPDATE '.$this->table.' SET '.\"\\n\";\n for($i = 0; $i < sizeof($this->strFieldNames); ++$i){\n if($i > 0 ){\n if($this->strFieldTypes[$i] == \"s\")\n $strClass .= \"\\t\\t\\t\\t\".strtolower($this->strFieldNames[$i]).' = \\'\".$elem->get'.$this->strFieldNames[$i].'().\"\\','.\"\\n\";\n else\n $strClass .= \"\\t\\t\\t\\t\".strtolower($this->strFieldNames[$i]).' = \".$elem->get'.$this->strFieldNames[$i].'().\",'.\"\\n\";\n }\n }\n $strClass[strlen($strClass)-2] = ' ';\n $strClass .= \"\\t\\t\\t\".'WHERE '.strtolower($this->strFieldNames[0]).' = \". $elem->get'.$this->strFieldNames[0].'()'. '.\";\"';\n $strClass .= \"\\n\\n\";\n $aux = $this->strFieldTypes;\n $pchar = $this->strFieldTypes[0];\n $this->strFieldTypes[0] = '';\n $this->strFieldTypes[strlen($this->strFieldTypes)] = $pchar;\n $this->strFieldTypes = $aux;\n $strClass[strlen($strClass)-2] = ' ';\n $strClass[strlen($strClass)-1] = ';';\n $strClass .= \"\\n\\n\";\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return odbc_num_rows($ResultSet);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\".\"}\\n\";\n $strClass .= \"\\n\";\n\n //Delete Method Definition\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* Elimina un Registro'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @param '.$this->table.'TO $elem'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return int Filas Afectadas'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function delete'.$this->table.'('.$this->table.'TO $elem){'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"DELETE FROM '.$this->table.' ';\n $strClass .= 'WHERE '.strtolower($this->strFieldNames[0]).' = \". $elem->get'.$this->strFieldNames[0].'().\";\";';\n $strClass .= \"\\n\\n\";\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return odbc_num_rows($ResultSet);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\".\"}\\n\";\n $strClass .= \"\\n\";\n \n //Select All Method Definition\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* Obtiene una lista Completa'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return ArrayObject '.$this->table.'TO'.\"\\n\";\n $strClass .= \"\\t\\t\".'* @param int $page_number'.\"\\n\";\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function selectAll'.$this->table.'($page_number){'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"SELECT ';\n foreach ($this->strFieldNames as $field){\n $strClass .= strtolower($field).\", \";\n }\n $strClass[strlen($strClass)-2] = ' ';\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY '.strtolower($this->strFieldNames[1]).') AS row FROM '.$this->table.' WHERE '.strtolower($this->strFieldNames[0]).' = '.strtolower($this->strFieldNames[0]).' ) AS '.$this->table.'_tmp '.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'WHERE row > \".($page_number*TABLE_ROW_VIEW).\" and row <= \". ($page_number+1)*TABLE_ROW_VIEW.\" ORDER BY '.strtolower($this->strFieldNames[1]).';\";'.\"\\n\\n\";\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'$arrayList = new ArrayObject();'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".' while ($row = odbc_fetch_array($ResultSet)) {'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\\t\".'$elem = new '.$this->table.'TO();'.\"\\n\";\n for($i = 0; $i < sizeof($this->strFieldNames); ++$i){\n $strClass .= \"\\t\\t\\t\\t\".'$elem->set'.$this->strFieldNames[$i].'($row[\\''.strtolower($this->strFieldNames[$i]).'\\']);'.\"\\n\";\n }\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\\t\".'$arrayList->append($elem);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'}';\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'odbc_free_result($ResultSet);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return $arrayList;'.\"\\n\";\n $strClass .= \"\\t\\t\".\"}\\n\";\n $strClass .= \"\\n\";\n\n //Select ID Method Definition\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* Obtiene un objeto '.$this->table.'TO'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return '.$this->table.'TO elem'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function selectById'.$this->table.'($'.strtolower($this->strFieldNames[0]).'){'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n//\t\t\t$strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"SELECT * FROM '.$this->table.' ';\n// $strClass .= 'WHERE '.$this->strFieldNames[0].' = '.$this->strFieldTypes[0].' ;\";';\n// $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"SELECT ';\n foreach ($this->strFieldNames as $field){\n $strClass .= strtolower($field).\", \";\n }\n $strClass[strlen($strClass)-2] = ' ';\n $strClass .=' FROM '.$this->table;\n $strClass .= ' WHERE '.strtolower($this->strFieldNames[0]).' = $'.strtolower($this->strFieldNames[0]).' ;\";';\n $strClass .= \"\\n\";\n// $strClass .= \"\\t\\t\\t\".'$PreparedStatement->bind_param(\"'.$this->strFieldTypes[0].'\", ';\n// $strClass .= '$'.$this->strFieldNames[0].');'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\n\";\n// $strClass .= \"\\t\\t\\t\".'$PreparedStatement->bind_result(';\n// for($i = 0; $i < sizeof($this->strFieldNames); ++$i){\n// $strClass .= '$'.$this->strFieldNames[$i].', ';\n// }\n// $strClass[strlen($strClass)-2] = ')';\n// $strClass[strlen($strClass)-1] = ';';\n// $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'$elem = new '.$this->table.'TO();'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'while($row = odbc_fetch_array($ResultSet)){'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\\t\".'$elem = new '.$this->table.'TO();'.\"\\n\";\n for($i = 0; $i < sizeof($this->strFieldNames); ++$i){\n $strClass .= \"\\t\\t\\t\\t\".'$elem->set'.$this->strFieldNames[$i].'($row[\\''.strtolower($this->strFieldNames[$i]).'\\']);'.\"\\n\";\n }\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'}'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'odbc_free_result($ResultSet);'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\".'return $elem;'.\"\\n\";\n $strClass .= \"\\t\\t\".'}'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* Obtiene la cantidad de filas de la tabla'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*'.\"\\n\";;\n $strClass .= \"\\t\\t\".'* @return int $rows'.\"\\n\";;\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function selectCount'.$this->table.'($criterio){'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"SELECT COUNT(*) AS count FROM '.$this->table.' WHERE '.strtolower($this->strFieldNames[0]).' = '.strtolower($this->strFieldNames[0]).' \";'.\"\\n\";\n\n foreach ($this->strFieldNames as $field){\n $strClass .= \"\\t\\t\\t\".'if(isset ($criterio[\"'.strtolower($field).'\"]) && trim($criterio[\"'.strtolower($field).'\"]) != \"0\"){'.\"\\n\";\n $strClass .= \"\\t\\t\\t\\t\".'$PreparedStatement .=\" AND '.strtolower($field).' = \".$criterio[\"'.strtolower($field).'\"];'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'}'.\"\\n\";\n }\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'$rows = 0;'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'while ($row = odbc_fetch_array($ResultSet)) {'.\"\\n\";\n $strClass .= \"\\t\\t\\t\\t\".'$rows = ceil($row[\\'count\\'] / TABLE_ROW_VIEW);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'}'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'odbc_free_result($ResultSet);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return $rows;'.\"\\n\";\n $strClass .= \"\\t\\t\".\"}\\n\\n\";\n\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\".'/**'.\"\\n\";\n $strClass .= \"\\t\\t\".'* Obtiene una coleccion de filas de la tabla'.\"\\n\";\n $strClass .= \"\\t\\t\".'*'.\"\\n\";\n $strClass .= \"\\t\\t\".'* @return ArrayObject '.$this->table.'TO'.\"\\n\";\n $strClass .= \"\\t\\t\".'* @param array $criterio'.\"\\n\";\n $strClass .= \"\\t\\t\".'*/'.\"\\n\";\n $strClass .= \"\\t\\t\".'function selectByCriteria_'.$this->table.'($criterio,$page_number){'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$this->connection = Connection::getinstance()->getConn();'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'$PreparedStatement = \"SELECT ';\n foreach ($this->strFieldNames as $field){\n $strClass .= strtolower($field).\", \";\n }\n $strClass[strlen($strClass)-2] = ' ';\n $strClass .= \"\\n\\t\\t\\t\\t\\t\\t\";\n $strClass .=' FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY '.strtolower($this->strFieldNames[1]).') AS row FROM '.$this->table.' WHERE '.strtolower($this->strFieldNames[0]).' = '.strtolower($this->strFieldNames[0]).' \";'.\"\\n\\n\";\n foreach ($this->strFieldNames as $field){\n $strClass .= \"\\t\\t\\t\".'if(isset ($criterio[\"'.strtolower($field).'\"]) && trim($criterio[\"'.strtolower($field).'\"]) != \"0\"){'.\"\\n\";\n $strClass .= \"\\t\\t\\t\\t\".'$PreparedStatement .=\" AND '.strtolower($field).' = \".$criterio[\"'.strtolower($field).'\"];'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'}'.\"\\n\";\n }\n $strClass .= \"\\t\\t\\t\".'$PreparedStatement .= \" ) AS '.$this->table.'_tmp WHERE row > \".($page_number*TABLE_ROW_VIEW).\" and row <= \". ($page_number+1)*TABLE_ROW_VIEW.\" ORDER BY '.strtolower($this->strFieldNames[0]).'\";'.\"\\n\";\n\n $strClass .= \"\\t\\t\\t\".'$ResultSet = odbc_exec($this->connection, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'logs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);'.\"\\n\";\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'$arrayList = new ArrayObject();'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".' while ($row = odbc_fetch_array($ResultSet)) {'.\"\\n\";\n\t\t\t$strClass .= \"\\t\\t\\t\\t\".'$elem = new '.$this->table.'TO();'.\"\\n\";\n for($i = 0; $i < sizeof($this->strFieldNames); ++$i){\n $strClass .= \"\\t\\t\\t\\t\".'$elem->set'.$this->strFieldNames[$i].'($row[\\''.strtolower($this->strFieldNames[$i]).'\\']);'.\"\\n\";\n }\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\\t\".'$arrayList->append($elem);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'}';\n $strClass .= \"\\n\";\n $strClass .= \"\\t\\t\\t\".'odbc_free_result($ResultSet);'.\"\\n\";\n $strClass .= \"\\t\\t\\t\".'return $arrayList;'.\"\\n\";\n $strClass .= \"\\t\\t\".\"}\\n\";\n $strClass .= \"\\n\";\n //End Class Definition\n $strClass .= \"\\t\".'}';\n $strClass .= \"\\n\";\n $strClass .= '?>'.\"\\n\";\n return $strClass;\n }catch(Exception $ex){\n throw new Exception($ex);\n }\n }", "title": "" }, { "docid": "3110f3d527174d563297cd294be053f6", "score": "0.51959735", "text": "public function createClasses()\n {\n $basepath = dirname(dirname(__FILE__));\n $filesystem = new Filesystem();\n $printer = new \\Nette\\PhpGenerator\\PsrPrinter;\n \n // For each table\n foreach ($this->tables as $key => $table) {\n // Create files\n $file = new \\Nette\\PhpGenerator\\PhpFile;\n $fileQuery = new \\Nette\\PhpGenerator\\PhpFile;\n \n // Add namespace\n $namespace = $file->addNamespace('MiniFastORM');\n $namespaceQuery = $fileQuery->addNamespace('MiniFastORM');\n \n // Add classes\n $class = $namespace->addClass($this->toCamelCase($key, true))\n ->setExtends('\\MiniFastORM\\Core\\Base');\n $methodConstruct = $class->addMethod('__construct')\n ->addBody('parent::__construct(?);', [$key]);\n $methodGetColumns = $class->addMethod('getColumns')\n ->addBody('return $this->vars;')\n ->addComment('Fetch all columns from this class')\n ->addComment('@return array All columns of this table');\n \n $classQuery = $namespaceQuery->addClass($this->toCamelCase($key, true) . 'Query')\n ->setExtends('\\MiniFastORM\\Core\\BaseQuery');\n $methodQueryConstruct = $classQuery->addMethod('__construct')\n ->addBody('parent::__construct(?);', [$key])\n ->addBody('parent::setBase($this->base);');\n $methodQueryCreate = $classQuery->addMethod('create')\n ->setStatic()\n ->setVisibility('public')\n ->addComment('Create a new instance of *' . $this->toCamelCase($key, true) . 'Query*')\n ->addComment('@param string $table The table name')\n ->addComment('@return ' . $this->toCamelCase($key, true) . 'Query')\n ->addBody('return new ?Query($table);', [new PhpLiteral($this->toCamelCase($key, true))])\n ->addParameter('table', $key)\n ->setTypeHint('string');\n $methodQueryGetColumns = $classQuery->addMethod('getColumns')\n ->addBody('$class = $this->base;')\n ->addBody('$base = new $class();')\n ->addBody('return $base->getColumns();')\n ->addComment('Fetch all columns from the base class')\n ->addComment('@return array All columns of this table');\n \n // Gathering information about vars\n if (!empty($this->foreigns[$key])) {\n foreach ($this->foreigns[$key] as $foreign) {\n $table[$foreign['local']]['foreign'] = $foreign;\n }\n }\n \n // For each column\n foreach ($table as $column) {\n // Add methods for base\n $methodSet = $class->addMethod('set' . $this->toCamelCase($column['name'], true))\n ->addBody('parent::set(?, $value);', [$column['name']])\n ->addBody('return $this;')\n ->addComment('Set `' . $column['name'] . '` in order to insert or update')\n ->addComment('@param $value The value to set')\n ->addParameter('value');\n \n // Add methods for baseQuery\n $methodQuerySet = $classQuery->addMethod('set' . $this->toCamelCase($column['name'], true))\n ->addBody('parent::set(?, $value);', [$column['name']])\n ->addBody('return $this;')\n ->addComment('Set `' . $column['name'] . '` in order to query')\n ->addComment('@param $value The value to set')\n ->addComment('@return ' . $this->toCamelCase($key, true) . 'Query The same instance')\n ->addParameter('value');\n $methodQueryFindBy = $classQuery->addMethod('findBy' . $this->toCamelCase($column['name'], true))\n ->addBody('parent::findBy(?, $value);', [$column['name']])\n ->addBody('return $this;')\n ->addComment('Set ' . $column['name'] . ' in where clause')\n ->addComment('@param $value The value to set')\n ->addComment('@return ' . $this->toCamelCase($key, true) . 'Query The same instance')\n ->addParameter('value');\n $methodQueryFilterBy = $classQuery->addMethod('filterBy' . $this->toCamelCase($column['name'], true))\n ->addBody('parent::filterBy(?, $value, $criteria);', [$column['name']])\n ->addBody('return $this;')\n ->addComment('Set ' . $column['name'] . ' in where clause')\n ->addComment('@param $value The value to set')\n ->addComment('@return ' . $this->toCamelCase($key, true) . 'Query The same instance');\n $methodQueryFilterBy->addParameter('value');\n $methodQueryFilterBy->addParameter('criteria', new PhpLiteral('parent::EQUALS'));\n $methodQueryCount = $classQuery->addMethod('count' . $column['name'])\n ->addBody('parent::count(?, $name);', [$column['name']])\n ->addBody('return $this;')\n ->addComment('Count ' . $column['name'] . ' occurences')\n ->addComment('@param');\n $methodQueryCount->addParameter('name', '')\n ->setTypeHint('string');\n }\n \n // Add properties\n $class->addProperty('tableName', $key)\n ->setVisibility('protected');\n $class->addProperty('vars', $table)\n ->setVisibility('protected');\n \n $classQuery->addProperty('base', $this->toCamelCase($key, true))\n ->setVisibility('protected');\n\n $filesystem->dumpFile($basepath . '/' . $this->toCamelCase($key, true) . '.php', $printer->printFile($file));\n $filesystem->dumpFile($basepath . '/' . $this->toCamelCase($key, true) . 'Query.php', $printer->printFile($fileQuery));\n }\n }", "title": "" }, { "docid": "18448f7c353a9d5bf1a7c16706717382", "score": "0.5188216", "text": "public function generate(\n string $namespace,\n string $newClassName,\n string $genericBaseClass,\n TypeArguments $typeArguments\n ): string;", "title": "" }, { "docid": "24e1c16386b7808391c7041a7f058062", "score": "0.51655096", "text": "abstract public function generateExt($namespace, $bundle, $dir, $format, $structure, array $options);", "title": "" }, { "docid": "b0bda9dfddfc205f1b133d5297647e18", "score": "0.51628006", "text": "#[@beforeClass]\n public static function createBase() {\n self::$base= static::baseImpl();\n self::$base->initialize(function($self) {\n $self->newType('class', 'CLT1');\n $self->newType('class', 'net.xp_framework.unittest.reflection.CLT2');\n $self->newFile('CLT1.txt', 'This is not a class');\n });\n }", "title": "" }, { "docid": "684a633b72509c81d58b347519ea8ced", "score": "0.51417243", "text": "abstract protected function buildClassContents($name, $stub_data);", "title": "" }, { "docid": "3d7c11203c271a22fefd7bc1498183a0", "score": "0.51013094", "text": "function generate_header_class( $class = '' ) {\n\t\t// Separates classes with a single space, collates classes for post DIV\n\t\techo 'class=\"' . join( ' ', generate_get_header_class( $class ) ) . '\"'; // WPCS: XSS ok, sanitization ok.\n\t}", "title": "" }, { "docid": "797678c439ff8d1cc84bb26a38a83546", "score": "0.50975657", "text": "function generate_content_class( $class = '' ) {\n\t\t// Separates classes with a single space, collates classes for post DIV\n\t\techo 'class=\"' . join( ' ', generate_get_content_class( $class ) ) . '\"'; // WPCS: XSS ok, sanitization ok.\n\t}", "title": "" }, { "docid": "da2581e0c96f3a242543048bb57a62f0", "score": "0.5084579", "text": "public function generate(): TemplateInterface\n {\n $clone = clone $this;\n\n //start php file\n $clone->fileContent = $this->creator->start();\n\n //add declare\n $clone->fileContent .= $this->creator->declare();\n\n //add namespace\n if ($this->namespace) {\n $clone->fileContent .= $this->creator->createNamespace($this->namespace);\n }\n\n //add packages\n if (count($this->packages) !== 0) {\n $clone->fileContent .= $this->creator->createPackages($this->packages);\n }\n\n // add className \n $clone->fileContent .= $this->creator->createClassStart($this->className);\n\n // add extends\n if ($this->extends) {\n $clone->fileContent .= $this->creator->createExtends($this->extends);\n }\n\n // add implements\n if ($this->implements) {\n $clone->fileContent .= $this->creator->createImplements($this->implements);\n }\n\n // add opening to class\n $clone->fileContent .= $this->creator->open();\n\n // add traits\n if (count($this->traits) !== 0) {\n $clone->fileContent .= $this->creator->createTraits($this->traits);\n }\n\n // add vars\n if (count($this->vars) !== 0) {\n $string = $this->creator->createVariables($this->vars);\n $clone->fileContent .= $string;\n }\n\n // add methods\n if (count($this->methods) !== 0) {\n $string = $this->creator->createMethods($this->methods);\n $clone->fileContent .= $string;\n }\n\n // add close to class\n $clone->fileContent .= $this->creator->close();\n\n // return class template\n return $clone;\n }", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "22f734cde1087d47413b8ab7c5aef08a", "score": "0.5082533", "text": "public function setFileClass ($class_name = null) {}", "title": "" }, { "docid": "bc7d562395fce292a9bcf69f6946d237", "score": "0.5067967", "text": "public function buildClass($name);", "title": "" }, { "docid": "13b9b5ca96083c7c2fd8066d9e60ff16", "score": "0.5067354", "text": "public static function createHelperClass($save_dir,$namespace,$class_name,$key_prefix_parts,$lang_data) {\n $f = $save_dir->newFile($class_name.\".php\");\n $f->setContent(self::getLangFileContent($namespace, $class_name, $key_prefix_parts ,$lang_data));\n }", "title": "" }, { "docid": "fffae2a1ec6ed4e7eaecd9fffe3bcfd8", "score": "0.5064309", "text": "public function createClassTemplate(String $templateName, String $filename, $savePath=null, Array $templateTags)\n\t{\n\t\t$template = file_get_contents(__DIR__ . '/templates/' . $templateName);\n\t\tforeach($templateTags as $key => $tag) {\n\t\t\tif (!preg_match_all('/' . $key . '/', $template)) {\n\t\t\t\tthrow new RuntimeException(sprintf('[%s] tag does not exist in template.', $key));\n\t\t\t}\n\t\t}\n\n\t\tif (!is_dir($savePath) || !is_readable($savePath)) {\n\t\t\tthrow new RuntimeException(sprintf('[%s] directory is not readable', $savePath));\n\t\t}\n\n\t\t$template = str_replace(\n\t\t\tarray_keys($templateTags),\n\t\t\tarray_values($templateTags),\n\t\t\t$template\n\t\t);\n\n\t\t$file = $savePath . '/' . $filename . '.php';\n\t\t$handle = fopen($file, 'w+');\n\t\tfwrite($handle, $template);\n\t\tfclose($handle);\n\n\t\t$this->env->sendOutput(\n\t\t\tsprintf(\n\t\t\t\t'[%s] class has been generated and placed in [%s]',\n\t\t\t\t$templateTags['phx:class'],\n\t\t\t\t$file\n\t\t\t),\n\t\t\t'green',\n\t\t\t'black'\n\t\t);\n\t}", "title": "" }, { "docid": "7d2ef58de41b08476bbb13b317bc30a5", "score": "0.5055188", "text": "public function renderClass()\n {\n $this->template->render(__DIR__ . '/SomeControl.renderClass.latte', ['explicitParam' => 'a']);\n }", "title": "" }, { "docid": "05fdf0c673ef6e8da93a413e05fa83ba", "score": "0.5048392", "text": "function generate_get_content_class( $class = '' ) {\n\n\t\t$classes = array();\n\n\t\tif ( ! empty( $class ) ) {\n\t\t\tif ( ! is_array( $class ) ) {\n\t\t\t\t$class = preg_split( '#\\s+#', $class );\n\t\t\t}\n\n\t\t\t$classes = array_merge( $classes, $class );\n\t\t}\n\n\t\t$classes = array_map( 'esc_attr', $classes );\n\n\t\treturn apply_filters( 'generate_content_class', $classes, $class );\n\t}", "title": "" }, { "docid": "f269dd15ff5a25665d61eda6b6d616d3", "score": "0.5026084", "text": "function drush_toolbox_ctags() {\n $ctags = drush_get_option('ctags');\n $command = $ctags .' --langmap=php:.engine.inc.module.theme.php.install.test.profile --php-kinds=cdfi --languages=php --recurse --exclude=\"\\.git\" --exclude=\"\\.svn\" --exclude=\"\\.hg\" --exclude=\"\\.bzr\" --exclude=\"CVS\" --totals=yes --tag-relative=yes --regex-PHP=\"/abstract\\s+class\\s+([^ ]+)/\\1/c/\" --regex-PHP=\"/interface\\s+([^ ]+)/\\1/c/\" --regex-PHP=\"/(public\\s+|static\\s+|abstract\\s+|protected\\s+|private\\s+)function\\s+\\&?\\s*([^ (]+)/\\2/f/\"';\n $status = drush_shell_exec($command);\n if (!$status) {\n return drush_set_error('DRUSH_TOOLBOX_CTAGS_ERROR', dt('Error running ctags'));\n }\n\n $root = drush_get_context('DRUSH_DRUPAL_ROOT');\n drush_log(dt('Tag file created at !file.', array('!file' => \"$root/tags\")), 'ok');\n}", "title": "" }, { "docid": "1878b37a58931f0e27f75beee0bdfa20", "score": "0.50245416", "text": "abstract protected function getClass(): string;", "title": "" }, { "docid": "28f961e3ada9bba77969ea9e5d5dbc07", "score": "0.50241584", "text": "public function bemItClassDefinition()\n {\n //Classes\n $classes = array();\n\n //Theme specific class\n $themeObject = wp_get_theme();\n $classes[] = \"t-\" . sanitize_title($themeObject->get(\"Name\"));\n\n //Child theme specific class\n if (is_child_theme()) {\n $childThemeObject = wp_get_theme(get_template());\n $classes[] = \"t-\" . sanitize_title($childThemeObject->get(\"Name\"));\n }\n\n //Define const for later use\n define(\"MUNICIPIO_BEM_THEME_NAME\", implode(\" \", $classes));\n }", "title": "" }, { "docid": "b3e4213cbc089be7b07970ee597139c0", "score": "0.50180423", "text": "public function generate()\n {\n }", "title": "" }, { "docid": "6e328b2831e9bba00c55f8ad3a4e4bea", "score": "0.5006092", "text": "public function generate()\n{\n$user_code=\"{% extends 'function.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('func' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "title": "" }, { "docid": "3cc49eb4f7e94affe5edd2cceaae7209", "score": "0.5001542", "text": "public function writeClassBody() {\n $this->append([\n 'private static $instance;',\n '/**',\n ' * Returns an instance of the class.',\n ' * ',\n ' * Calling this method multiple times will return same instance.',\n ' * ',\n ' * @return '.$this->getName().' An instance of the class.',\n ' */',\n 'public static function get() : '.$this->getName().' {'\n ], 1);\n $this->append('');\n $this->append('if (self::$instance === null) {', 2);\n $this->append('self::$instance = new '.$this->getName().'();', 3);\n $this->append('}', 2);\n $this->append('');\n $this->append('return self::$instance;', 2);\n $this->append('}', 1);\n $this->append([\n \"/**\",\n \" * Creates new instance of the class.\",\n \" */\",\n $this->f('__construct')\n ], 1);\n\n if ($this->getConnectionName() !== null) {\n $this->append([\n \"parent::__construct('\".$this->getConnectionName().\"');\",\n ], 2);\n } else {\n $this->append([\n '//TODO: Specify the name of database connection to use in performing operations.',\n \"parent::__construct('');\",\n ], 2);\n }\n $this->append([\n \"\\$this->register('\".str_replace(\"\\\\\", \"\\\\\\\\\", $this->getPath()).\"');\",\n ], 2);\n $this->append('}', 1);\n\n $this->writeAddRecord();\n\n $this->writeDeleteRecord();\n $this->writeGetRecord();\n $this->writeGetRecords();\n $this->writeGetRecordsCount();\n $this->writeUpdateRecord();\n\n if ($this->isColumnUpdateIncluded()) {\n $this->writeUpdateRecordMethods();\n }\n\n $this->append('}', 0);\n }", "title": "" }, { "docid": "78221a2b5c994c65cc86705a5e8d87d8", "score": "0.49970934", "text": "function _initClass( $tag, $attribs = array() ) {\n\t\t$node = new SimpleClass();\n\t\t$node->setArray($attribs);\n\t\t$node->setProp(\"_TAGNAME\", $tag);\n\t\t$this->datas[] = $node;\n\t\t//$this->_debug( 3, '', 'Initialized simple class', 'OK' );\n\t}", "title": "" }, { "docid": "ee6ba728f58ead2564e0bec63aa7de15", "score": "0.49950528", "text": "private function createDtoTestTemplate(): void\n {\n $testTemplate = <<<templateContent\n<?php\n\nnamespace {{namespace}};\n\n{{imports}}\n\n{{classPhpDoc}}\nclass {{dtoClassName}} extends {{dtoParent}}\n{\n{{constants}}{{properties}}\n}\n\ntemplateContent;\n\n file_put_contents($this->testTemplateFileName, $testTemplate);\n }", "title": "" }, { "docid": "a0d650e1994c6ef3784d8c1ec9fd96db", "score": "0.49846673", "text": "abstract protected function tag();", "title": "" }, { "docid": "544e0b5bcdf66d29c2cbd25822b41e3c", "score": "0.49835682", "text": "abstract protected function generate();", "title": "" }, { "docid": "c241b89434d468be1a551cf5658a5039", "score": "0.49822456", "text": "protected function generateViews()\n {\n /**\n * @var \\DirectoryIterator $file\n */\n foreach ($this->getTemplateFiles('crud')['views'] as $template) {\n $subDir = str_replace('Controller', '', $this->getClassName($this->getControllerClass()));\n $subDir = Text::uncamelize($subDir, '-');\n $outputFile = $this->viewPath . '/' . $subDir . '/' . $template . '.php';\n $this->files[] = $codeFile = new CodeFile($outputFile, $this->render('crud/views/' . $template));\n// $codeFile->save();\n }\n }", "title": "" }, { "docid": "a61956c98492efca85f93051fbf2cdf1", "score": "0.49793583", "text": "public function testClassToFile()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "8661b7b7c9d1e50e8851c77070660bd1", "score": "0.49707633", "text": "public function writeClassDeclaration() {\n $this->append('class '.$this->getName().' extends DB {');\n }", "title": "" }, { "docid": "b7c7419b7aa6348f889e60b06dda5d9d", "score": "0.49596027", "text": "abstract public function generate(array $files);", "title": "" }, { "docid": "4f1ea40ec752f9050e916acd9f7766e5", "score": "0.49593872", "text": "function generate_footer_class( $class = '' ) {\n\t\t// Separates classes with a single space, collates classes for post DIV\n\t\techo 'class=\"' . join( ' ', generate_get_footer_class( $class ) ) . '\"'; // WPCS: XSS ok, sanitization ok.\n\t}", "title": "" }, { "docid": "c9f635caff00dc0f512a18d4eb3df9c1", "score": "0.49586695", "text": "public function generateTestClassFromClassName($className) {\n $this->getOriginalClassConstructorParams($className);\n $arrTemplateAttributes = [\n \"namespace\" => $this->getNamespaceForTestClass($className),\n \"originalClassName\" => $className,\n \"testClassName\" => $this->getClassNameForTestClass($className),\n \"testClassAttributes\" => \"\",\n \"testClassMethods\" => $this->generateTestMethods($className),\n ];\n \n $arrTemplates = [\n __DIR__.\"/../templates/phpclass.php.txt\",\n ];\n \n if ($this->useOldPhpunit) {\n $arrTemplates = [\n __DIR__.\"/../templates/phpclass_old.php.txt\",\n ];\n }\n \n $filename = $this->getFileNameForTestClass($className);\n $path = $this->getFilePathForTestClass($className);\n $json = $this->generateJsonForFile($path.$filename, $arrTemplates, $arrTemplateAttributes);\n $project = new Project();\n $project->loadConfigJson($json);\n $project->createFiles();\n }", "title": "" }, { "docid": "d079dd2adc3e0626b8e10d74f18e22fb", "score": "0.4956488", "text": "protected function compileClasses()\n {\n $preloader = $this->getClassPreloader();\n\n $handle = $preloader->prepareOutput($this->royalcms->getCachedCompilePath());\n\n foreach ($this->getClassFiles() as $file) {\n try {\n fwrite($handle, $preloader->getCode($file, false).\"\\n\");\n } catch (SkipFileException $ex) {\n // Class Preloader 2.x\n } catch (VisitorExceptionInterface $e) {\n // Class Preloader 3.x\n }\n }\n\n fclose($handle);\n }", "title": "" }, { "docid": "30a3f08b1c24989d310726097fdc1c1a", "score": "0.49504334", "text": "protected function _getClassMapping() {\n\n\t\t// List of global use generated using following command:\n\t\t// ack \"global \\\\\\$[^;]+;\" --no-filename | tr -d '\\t' | sort | uniq | sed \"s/global //g\" | sed \"s/, /,/g\" | tr , '\\n' | sed \"s/;//g\" | sort | uniq | sed \"s/\\\\\\$//g\" | sed \"s/[^ ][^ ]*/'&' => ''/g\"\n\t\t// There is probably an easier way, there are currently no globals that are classes starting with an underscore\n\t\t$wp_globals = array(\n\t\t\t'authordata' => 'WP_User',\n\t\t\t'custom_background' => 'Custom_Background',\n\t\t\t'custom_image_header' => 'Custom_Image_Header',\n\t\t\t'phpmailer' => 'PHPMailer',\n\t\t\t'post' => 'WP_Post',\n\t\t\t'userdata' => 'WP_User', // This can also be stdClass, but you can't call methods on an stdClass\n\t\t\t'wp' => 'WP',\n\t\t\t'wp_admin_bar' => 'WP_Admin_Bar',\n\t\t\t'wp_customize' => 'WP_Customize_Manager',\n\t\t\t'wp_embed' => 'WP_Embed',\n\t\t\t'wp_filesystem' => 'WP_Filesystem',\n\t\t\t'wp_hasher' => 'PasswordHash', // This can be overridden by plugins, for core assume this is ours\n\t\t\t'wp_json' => 'Services_JSON',\n\t\t\t'wp_list_table' => 'WP_List_Table', // This one differs because there are a lot of different List Tables, assume they all only overwrite existing functions on WP_List_Table\n\t\t\t'wp_locale' => 'WP_Locale',\n\t\t\t'wp_object_cache' => 'WP_Object_Cache',\n\t\t\t'wp_query' => 'WP_Query',\n\t\t\t'wp_rewrite' => 'WP_Rewrite',\n\t\t\t'wp_roles' => 'WP_Roles',\n\t\t\t'wp_scripts' => 'WP_Scripts',\n\t\t\t'wp_styles' => 'WP_Styles',\n\t\t\t'wp_the_query' => 'WP_Query',\n\t\t\t'wp_widget_factory' => 'WP_Widget_Factory',\n\t\t\t'wp_xmlrpc_server' => 'wp_xmlrpc_server', // This can be overridden by plugins, for core assume this is ours\n\t\t\t'wpdb' => 'wpdb',\n\t\t);\n\n\t\t$wp_functions = array(\n\t\t\t'get_current_screen()' => 'WP_Screen',\n\t\t\t'_get_list_table()' => 'WP_List_Table', // This one differs because there are a lot of different List Tables, assume they all only overwrite existing functions on WP_List_Table\n\t\t\t'wp_get_theme()' => 'WP_Theme',\n\t\t);\n\n\t\t$class_mapping = array_merge( $wp_globals, $wp_functions );\n\n\t\treturn $class_mapping;\n\t}", "title": "" }, { "docid": "b69617693c795229896e1f0d1405c98b", "score": "0.49382547", "text": "function osa_load_data_obj($class_prefix, $file_part='', $rename_class=TRUE,\n\t\t\t\t\t\t\t\t\t$folder=CMS_TEMPLATE_UNIT_IDENTIFIER, $org_override=FALSE,\n\t\t\t\t\t\t\t\t\t$filepath=CMS_TEMPLATEPATH_BUILDER) {\n\t$new_class_name = $class_prefix; //Set new name to the default name\n\tif ( !empty($file_part) ) {\n\t\t$file_part = \"_$file_part\";\n\t}\n\tif ($rename_class) {\n\t\tif ( $file_part ) {\n\t\t\t//This is for supporting legacy code that expects the class name in this format\n\t\t\t$new_class_name = $class_prefix . $file_part;\n\t\t}\n\t\telse {\n\t\t\t//This is for new code that gets the class name from the return code.\n\t\t\t//So, we can use any class name as long as it is unique.\n\t\t\t$new_class_name = '_' . $class_prefix;\n\t\t\twhile (TRUE) {\n\t\t\t\t//This will loop until we have a unique class name\n\t\t\t\tif ( !class_exists($new_class_name) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$new_class_name = '_' . $new_class_name;\n\t\t\t}\n\t\t}\n\t}\n\t//To prevent loading the same class twice\n\tif ( class_exists($new_class_name, FALSE) ) {\n\t\treturn $new_class_name;\n\t}\n\n\t$CI = get_instance();\n\t//$filepath = CMS_TEMPLATEPATH_BUILDER;\n\tif ( ! empty($folder) ) {\n\t$filepath .= \"{$folder}/\"; //This can be goal, survey etc.\n\t}\n\n\tif ( $folder == CMS_TEMPLATE_SYSTEM_IDENTIFIER ) {\n\t\t$filename = CMS_TEMPLATE_SYSTEM_IDENTIFIER . $file_part;\n\t}\n\telse {\n\t\tif ( !$org_override ) {\n\t\t\t$unit_org = $CI->config->item('cms_unit_org');\n\t\t}\n\t\telse {\n\t\t\t$unit_org = $org_override;\n\t\t}\n\t\t$filename = $unit_org . $file_part;\n\t}\n\n\t$fullname = $filepath . $filename . '.php';\n\t$file_exist_checked = TRUE;\n\tif ( !file_exists($fullname) ) {\n\t\t// Template based on org does not exist so use fallback template.\n\t\t$fullname = $filepath . $CI->config->item('cms_fallback_org_name') . $file_part . '.php';\n\t\t$file_exist_checked = FALSE;\n\t}\n\n\tif ($file_exist_checked || file_exists($fullname)) {\n\t\t$contents = file_get_contents($fullname);\n\t\t//Use strpos to check which is faster than preg_match\n\t\tif ( strpos($contents, ':LOAD_REDIRECT_BEGIN:') ) {\n\t\t\t//For templates that just include the TODCM version and has a load redirect directive\n\t\t\t//The load redirect directive is a home-grown cheat to load the proper template file\n\t\t\t$matches = FALSE;\n\t\t\tpreg_match(\"/:LOAD_REDIRECT_BEGIN:(.*?):LOAD_REDIRECT_END:/\", $contents, $matches);\n\t\t\tif ( is_array($matches) && array_key_exists(1, $matches) ) {\n\t\t\t\t//This will always load from the builder folder\n\t\t\t\t//Loads the redirected file instead of the original which usually only contains a require_once statement\n\t\t\t\t$contents = file_get_contents(CMS_TEMPLATEPATH_BUILDER . $matches[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\tif ($rename_class) {\n\t\t\t$class_pattern = 'class unit_config_data';\n\t\t\tif ( $filepath == CMS_TEMPLATEPATH_MAPPING ) {\n\t\t\t\t$class_pattern = 'class search_config_data';\n\t\t\t}\n\t\t\t$contents = str_ireplace($class_pattern, 'class ' . $new_class_name, $contents);\n\t\t}\n\n\t\tif ( !empty($contents) ) {\n\t\t\t/*\n\t\t\t $contents = preg_replace(\"/\\?>(.*?)(<\\?php|<\\?)/si\", \"echo \\\"\\\\1\\\";\",$contents);\n\t\t\t */\n\t\t\t$contents = str_replace(\"<?php\", \"\", $contents);\n\t\t\t$contents = str_replace(\"?>\", \"\", $contents);\n\t\t\teval($contents);\n\t\t\tif ( class_exists($new_class_name) ) {\n\t\t\t\treturn $new_class_name;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}", "title": "" }, { "docid": "126ae8c66306ae85503aedcbdb9e14bd", "score": "0.49342635", "text": "function gen()\n\t{\n\t $this->generate();\n\t}", "title": "" }, { "docid": "181e27355973e31a6052f304fcea6326", "score": "0.4932084", "text": "public function load() {\n\t\t$path = explode( '_', $this->class );\n\t\t$this->file = '';\n\t\t$i = 0;\n\n\t\tif ( count( $path ) > 1 ) {\n\t\t\tarray_shift( $path );\n\t\t}\n\t\tend( $path );\n\n\t\t/**\n\t\t * Build directory path.\n\t\t */\n\t\twhile ( $i < key( $path ) ) {\n\t\t\t$this->build( $path[ $i ], '', '/' );\n\n\t\t\t$i++;\n\t\t}\n\n\t\t/**\n\t\t * Build filename.\n\t\t */\n\t\t$this->build( $path[ $i ], 'class', '.php' );\n\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "f6c641923cb663dec45154571225bdd2", "score": "0.49278522", "text": "public function generateSourceEntityClass()\n {\n $folder = $this->getGeneratedEntitiesFolder();\n $file = $this->getSourceClassPath();\n $fileSystem = new Filesystem();\n\n if (!$fileSystem->exists($folder)) {\n $fileSystem->mkdir($folder, 0775);\n }\n\n if (!$fileSystem->exists($file)) {\n $classGenerator = new EntityGenerator($this->nodeType, $this->container['nodeTypesBag']);\n $content = $classGenerator->getClassContent();\n\n if (false === @file_put_contents($file, $content)) {\n throw new IOException(\"Impossible to write entity class file (\".$file.\").\", 1);\n }\n /*\n * Force Zend OPcache to reset file\n */\n if (function_exists('opcache_invalidate')) {\n opcache_invalidate($file, true);\n }\n if (function_exists('apcu_clear_cache')) {\n apcu_clear_cache();\n }\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e364425492d4462f131b1944de64df0d", "score": "0.49238294", "text": "protected function generate()\n {\n $this->description = 'Werelddag voor de bestrijding van woestijnvorming en droogte';\n\n $this->setupDateTimeObjects($this->generateDateTime($this->year, 6, 17));\n }", "title": "" }, { "docid": "d346c73f43791cedb5eb6cd9807fd0e9", "score": "0.4919901", "text": "private function writeTags()\n {\n foreach ($this->glossary->getTaggedDefinitions() as $tag => $definitions) {\n $this->writeTag($tag, $definitions);\n }\n }", "title": "" }, { "docid": "f5d20758ff6a105c72f2f2e1dd13ea62", "score": "0.4909625", "text": "function createSqlTemplate($description, $client, $class) {\n if ($class_file = fopen(\"templates/template.class.php\", \"r\")) {\n\n $writeTo = fopen(\"classes/\" . $client . \"/\" . $class . \".class.php\", \"w\") \n or die (\"Unable to create Class file!\");\n\n while (!feof($class_file)) {\n $line = fgets($class_file);\n // Replace some placeholders with real values.\n $line = str_replace(\"#CLIENT-NAME\", $client, $line);\n $line = str_replace(\"#WHAT-THIS-CLASS-DOES\", $description, $line);\n $line = str_replace(\"#CLASS-NAME\", $class, $line);\n\n \n // Write the line to the file.\n fwrite($writeTo, $line);\n }\n\n // Should be done; clean up.\n fclose($writeTo);\n $class_file = NULL;\n return TRUE;\n }\n else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "a0485bbe4c41ca8968a7639a0c36478c", "score": "0.49079186", "text": "function image_tag_class($class, $id, $align, $size)\n{\n return 'align' . $align . ' size-' . $size;\n}", "title": "" }, { "docid": "3913ae2aa0a4c2fec4e0be5ed45dc14b", "score": "0.4907613", "text": "function getClassName()\n\t{\n\t\treturn \"Bayrell.Lang.LangBay.ParserBayHtml\";\n\t}", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.48974147", "text": "abstract public function generate();", "title": "" }, { "docid": "4a0ca0cda1b3434630e4743e075bbfac", "score": "0.4892159", "text": "private function _generateClassName($name)\n {\n return $name . substr(uniqid(), -5);\n }", "title": "" }, { "docid": "5c07ed9a10ef256155acca4b646387dc", "score": "0.48891467", "text": "private static function createFile($render, $class, $file)\n {\n $class = $class.'Entity';\n $return = '';\n\n $return .= \"<?php \\n\";\n $return .= \"/** \\n * Created by dFramework. \\n * Date: \".date('d/m/Y - H:i:s').\" \\n * Entity: \".$class.\" \\n*/\";\n\n $return .= \"\\n\\n\";\n $return .= \"class \".$class.\"\\n{\".$render.\"\\n}\";\n\n $fp = fopen($file, 'w');\n fwrite($fp, $return);\n fclose($fp);\n }", "title": "" }, { "docid": "df2781d22676f21d9c58b5411bb0d5b9", "score": "0.48877436", "text": "protected function _genClass($classdoc) {\n // accept only ClassDoc\n if (!is('ClassDoc', $classdoc)) {\n throw new IllegalArgumentException('No ClassDoc given!');\n }\n $ClassDoc= $classdoc;\n \n // get DiaUMLClass\n $UMLClass= new DiaUMLClass();\n $DiaClass= $UMLClass->getClass();\n $DiaMethods= $DiaClass->getMethods();\n\n // loop over methods (annotations)\n for ($i= 0, $s= sizeof($DiaMethods); $i < $s; $i++) {\n $Method= $DiaMethods[$i];\n // Console::writeLine('Method: '.$Method->getName().' Annotations: '.xp::stringOf($Method->getAnnotations()));\n // skip methods that don't have the appropriate annotation\n if (!$Method->hasAnnotation('fromClass')) continue;\n if (!$Method->hasAnnotation('fromClass', 'type')) continue;\n\n // determine action according to 'type'\n $ann_type= $Method->getAnnotation('fromClass', 'type');\n // Console::writeLine('Method: '.$Method->getName().\" Annotation-type: $ann_type\");\n switch ($ann_type) {\n case 'string':\n case 'integer':\n case 'bool':\n if ($Method->hasAnnotation('fromClass', 'eval')) {\n $ann_eval= $Method->getAnnotation('fromClass', 'eval');\n // Console::write('Evaluating: ', $ann_eval);\n $value= eval(\"return $ann_eval;\");\n // Console::writeLine('... Value: ', $value);\n try {\n $Method->invoke($UMLClass, array($value));\n } catch (Exception $e) {\n Console::writeLine('Fatal: ', $e->toString());\n exit(-1);\n }\n } else {\n Console::writeLine('Fatal ERROR: Annotation \"fromClass\" has no attribute \"eval\"!');\n exit(-1);\n }\n break;\n case 'attribute':\n $fields= $ClassDoc->fields;\n foreach (array_keys($fields) as $name) {\n if (0 == strncmp('__', $name, 2)) continue; // skip magic fields\n // TODO: can we figure out in which class the attribute was defined?\n $Method->invoke($UMLClass, array(array($name => $fields[$name])));\n }\n /** TODO:\n $Attrib= &new DiaUMLAttribute($name, $value, $type); parameters???\n $Attrib->setName($name);\n if (isset($fields[$name])) {\n $Attrib->setValue($fields[$name]);\n $Attrib->setType(xp::typeOf($fields[$name]));\n }\n $Method->invoke($UMLClass, array($Attrib));\n */\n break;\n case 'method':\n $methods= $ClassDoc->methods;\n for ($i= 0, $s= sizeof($methods); $i < $s; $i++) {\n // skip magic methods?!? what about __construct() and __destruct()?\n if (0 == strncmp('__', $methods[$i]->name(), 2)) continue;\n // TODO: can we figure out in which class the method was defined?\n $Method->invoke($UMLClass, array($methods[$i]));\n }\n break;\n default:\n throw new IllegalArgumentException(\"Unknown annotation type: '$type'\");\n }\n }\n\n return $UMLClass;\n }", "title": "" }, { "docid": "340cb2ba24b88a406613f8ff5f3d4515", "score": "0.48798063", "text": "function generate_inside_header_class( $class = '' ) {\n\t\t// Separates classes with a single space, collates classes for post DIV\n\t\techo 'class=\"' . join( ' ', generate_get_inside_header_class( $class ) ) . '\"'; // WPCS: XSS ok, sanitization ok.\n\t}", "title": "" }, { "docid": "75b32861e423cd646697a5a732589218", "score": "0.48790696", "text": "public function write_extension($definitions)\n\t{\n\t\t$class_name = $definitions['configs']['cpp-object'];\n\t\t$variable_name = strtolower($class_name);\n\n\t\t// Start class extension\n\t\t$extension = \"\\t\\t// \" . $class_name . \"\\n\";\n\t\t$extension .= \"\\t\\tPhp::Class<\" . $class_name . \"_> \" . $variable_name . \"(\\\"\" . $class_name . \"\\\");\\n\";\n\n\t\t// Verify if extends \n\t\tif($definitions['configs']['extends'] != \"Php::Base\") {\n\t\t\t$extension .= \"\\t\\t\\t\" . $variable_name . \".extends(\" . strtolower(substr($definitions['configs']['extends'], 0, -1)) . \");\\n\";\n\t\t}\n\n\t\t// loop methods\n\t\tforeach($definitions['methods'] as $method_name => $config) {\n\t\t\t$extension .= \"\\t\\t\\t\" . $variable_name . \".method<&\" . $class_name . \"_::\" . $method_name . \">(\\\"\" . $method_name . \"\\\");\\n\";\n\t\t}\n\n\t\t// Add extension\n\t\t$extension .= \"\\t\\textension.add(std::move(\" . $variable_name . \"));\\n\";\n\n\t\techo \"\\n-----\\n\";\n\t\techo $extension;\n\t\techo \"\\n-----\\n\";\n\t}", "title": "" }, { "docid": "e854f624b6e2af48eedb0a235797843e", "score": "0.48738462", "text": "protected function createThemeClass()\n {\n $stub = file_get_contents(__DIR__ . '/../stubs/theme.php.stub');\n\n $stub = str_replace(\n ['DummyNamespace', 'DummyLocation'],\n [$this->getThemeLocation(), $this->getThemeLocation()],\n $stub\n );\n\n $this->files->put($this->getThemeLocation() . '/Theme.php', $stub);\n }", "title": "" }, { "docid": "10d43670fab77c3be43d62e146c6a294", "score": "0.48722973", "text": "private function writeClass( $dir, $tableName, ezcDbSchemaTable $table )\n {\n $file = $this->openFile( $dir, $tableName );\n\n fwrite( $file, \"/**\\n\" );\n fwrite( $file, \" * Data class $tableName.\\n\" );\n fwrite( $file, \" * Class to be used with eZ Components PersistentObject.\\n\" );\n fwrite( $file, \" */\\n\" );\n fwrite( $file, \"class {$this->prefix}$tableName\\n\" );\n fwrite( $file, \"{\\n\" );\n\n // attributes \n $this->writeAttributes( $file, $table->fields );\n fwrite( $file, \"\\n\" );\n\n // methods\n $this->writeSetState( $file );\n fwrite( $file, \"\\n\" );\n $this->writeGetState( $file, $table->fields );\n\n fwrite( $file, \"}\\n\" );\n $this->closeFile( $file );\n }", "title": "" }, { "docid": "9c243edae6d7499995d987e7bf704066", "score": "0.48673698", "text": "public function testGClassOwnImportsAreWrittenToFile()\n {\n $this->expectThatWrittenCode($this->stringContains('use Other\\UsedClass;'));\n\n $this->classWriter->write($this->classWithImports, $this->file);\n }", "title": "" }, { "docid": "2ebe49a09c40a30c9ef4d990fd1262dd", "score": "0.48638973", "text": "protected function createClass()\n {\n // Result.\n $result = $this->files->put($this->getPath(), $this->populateStub());\n\n // Return the result.\n return $result;\n }", "title": "" }, { "docid": "a5f8b4415a662a307123a24c9d148f1d", "score": "0.48623848", "text": "public function baseTag()\n {\n return $this->baseTag ?: Str::kebab(class_basename($this));\n }", "title": "" }, { "docid": "245fe83c06af2a61d00f4524dec3b978", "score": "0.48555169", "text": "function generate_get_header_class( $class = '' ) {\n\n\t\t$classes = array();\n\n\t\tif ( ! empty( $class ) ) {\n\t\t\tif ( ! is_array( $class ) ) {\n\t\t\t\t$class = preg_split( '#\\s+#', $class );\n\t\t\t}\n\n\t\t\t$classes = array_merge( $classes, $class );\n\t\t}\n\n\t\t$classes = array_map( 'esc_attr', $classes );\n\n\t\treturn apply_filters( 'generate_header_class', $classes, $class );\n\t}", "title": "" }, { "docid": "e49b0083f64f6d240b9979c39c0d730a", "score": "0.48441735", "text": "public function generate()\n {\n $this->files = array();\n $blocks = $this->getBlocks();\n\n foreach ($blocks as $block) {\n $block->generateHeader($this);\n $block->generateCode($this);\n }\n\n // Adding blocks.json\n $jsonBlocks = $this->kernel->generateBlocksJSON();\n $json = '[' . implode(\",\\n\", $jsonBlocks) . ']';\n $this->writeFile('blocks.json', $json);\n\n // Adding blocks loader\n $this->render('Loader.cpp', 'blocks/Loader.cpp', array('blocks' => $blocks));\n $this->copyFile('Loader.h', 'blocks/Loader.h');\n\n // Adding static C++ files\n $files = array('Scene', 'Block', 'Edge', 'Index', 'SceneScheduler', 'Scheduler', 'JsonUtil');\n foreach ($files as $file) {\n $this->copyFile($file.'.h', 'blocks/'.$file.'.h');\n $this->copyFile($file.'.cpp', 'blocks/'.$file.'.cpp');\n }\n\n // Adding main & cmake\n $this->copyFile('main.cpp', 'main.cpp');\n $this->render('CMakeLists.txt', 'CMakeLists.txt', array('blocks' => $blocks, 'files' => $files));\n }", "title": "" }, { "docid": "27c72c64b33477f3af111712205ef9c0", "score": "0.48403156", "text": "function spl_classes () {}", "title": "" }, { "docid": "642e19d36f39ccc70b9c6d98ef99a56d", "score": "0.4834982", "text": "function generate_get_container_class( $class = '' ) {\n\n\t\t$classes = array();\n\n\t\tif ( ! empty( $class ) ) {\n\t\t\tif ( ! is_array( $class ) ) {\n\t\t\t\t$class = preg_split( '#\\s+#', $class );\n\t\t\t}\n\n\t\t\t$classes = array_merge( $classes, $class );\n\t\t}\n\n\t\t$classes = array_map( 'esc_attr', $classes );\n\n\t\treturn apply_filters( 'generate_container_class', $classes, $class );\n\t}", "title": "" } ]
dde7c9d15139426d6319856972878832
Sanitize taxonomy names. Slug format (no spaces, lowercase). Urldecode is used to reverse munging of UTF8 characters.
[ { "docid": "23ee25b0ddcab318cf73b344081a1f8a", "score": "0.7590575", "text": "function evf_sanitize_taxonomy_name( $taxonomy ) {\n\treturn apply_filters( 'sanitize_taxonomy_name', urldecode( sanitize_title( urldecode( $taxonomy ) ) ), $taxonomy );\n}", "title": "" } ]
[ { "docid": "38d1adfcb848a5cb603a2f7687b20e69", "score": "0.6699003", "text": "public static function sanitize_slug_string($str)\n {\n $str = preg_replace('/%([a-fA-F0-9][a-fA-F0-9])/', '----$1----', $str);\n // Remove % char that are not part of URLencoded chars.\n $str = str_replace('%', '', $str);\n // Restore original URLencoded chars with %.\n $str = preg_replace('/----([a-fA-F0-9][a-fA-F0-9])----/', '%$1', $str);\n\n if (static::seems_utf8($str)) {\n $str = mb_strtolower($str, 'UTF-8');\n $str = static::url_encode_unicode_chars($str);\n }\n\n // Replace nbsp ( ), ndash (–) and mdash (—) with hyphens (-)\n $str = str_replace(['&nbsp;', '&#160;', '%c2%a0', '&ndash;', '&#8211;', '%e2%80%93',\n '&mdash;', '&#8212;', '%e2%80%94'], '-', $str);\n\n // Remove non-friendly-slug chars\n $str = str_replace([\n '%c2%a1', '%c2%bf', '%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba', '%e2%80%98',\n '%e2%80%99', '%e2%80%9c', '%e2%80%9d', '%e2%80%9a', '%e2%80%9b', '%e2%80%9e',\n '%e2%80%9f', '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2', '%c2%b4',\n '%cb%8a', '%cc%81', '%cd%81', '%cc%80', '%cc%84', '%cc%8c',\n ], '', $str);\n\n $str = strtolower($str);\n\n // Simple dot replacement\n $str = str_replace('.', '-', $str);\n\n // Keep only normalized chars (including URL encoded chars)\n $str = preg_replace('/[^%a-z0-9 _-]/', '', $str);\n\n // Remove multiple spaces\n $str = preg_replace('/\\s+/', '-', $str);\n\n // Remove multiple dashes\n $str = preg_replace('/-+/', '-', $str);\n\n //Remove first and/or last dash if exists\n $str = trim($str, '-');\n\n return $str;\n }", "title": "" }, { "docid": "bb8634e3e1907eb241c9a59748a61c99", "score": "0.667329", "text": "function lebotheme_sanitize_slug_field( $input ) {\n\t\n\treturn sanitize_title( $input );\n}", "title": "" }, { "docid": "1315971eef4e5d5a31da654759709006", "score": "0.65915304", "text": "public function sanitize($raw) {\n // http://wpseek.com/sanitize_title_with_dashes/\n $slug = strtolower($raw);\n $slug = str_replace('.', '-', $slug);\n $slug = preg_replace('/[^%a-z0-9 _-]/', '', $slug);\n $slug = preg_replace('/\\s+/', '-', $slug);\n $slug = preg_replace('|-+|', '-', $slug);\n $slug = trim($slug, '-');\n return $slug;\n }", "title": "" }, { "docid": "b27308442321f85a7ff69016fc46a03a", "score": "0.6509483", "text": "function sanitize_slug( $string ) {\n\t$string = remove_accents( $string );\n\t$string = symbols_to_words( $string );\n\t$string = strtolower( $string ); // Force lowercase\n\t$space_chars = array(\n\t\t\" \", // space\n\t\t\"…\", // ellipsis\n\t\t\"–\", // en dash\n\t\t\"—\", // em dash\n\t\t\"/\", // slash\n\t\t\"\\\\\", // backslash\n\t\t\":\", // colon\n\t\t\";\", // semi-colon\n\t\t\".\", // period\n\t\t\"+\", // plus sign\n\t\t\"#\", // pound sign\n\t\t\"~\", // tilde\n\t\t\"_\", // underscore\n\t\t\"|\", // pipe\n\t);\n\tforeach( $space_chars as $char ) {\n\t\t$string = str_replace( $char, '-', $string ); // Change spaces to dashes\n\t}\n\t// Only allow letters, numbers, and dashes\n\t$string = preg_replace( '/([^a-zA-Z0-9\\-]+)/', '', $string );\n\t$string = preg_replace( '/-+/', '-', $string ); // Clean up extra dashes\n\tif ( substr( $string, -1 ) === '-' ) { // Remove - from end\n\t\t$string = substr( $string, 0, -1 );\n\t}\n\n\tif ( substr( $string, 0, 1 ) === '-' ) { // Remove - from start\n\t\t$string = substr($string, 1);\n\t}\n\n\t// Limit number of characters in slug\n\t$string = substr( $string, 0 , 50 );\n\n\treturn $string;\n}", "title": "" }, { "docid": "4026ff7b3ff40fa3b9bd314950b40494", "score": "0.63423294", "text": "function safe_name_in_url( $name ) {\r\n\t\t\t$name = strtolower( $name );\r\n\t\t\t$name = preg_replace(\"/'/\",\"\", $name );\r\n\t\t\t$name = stripslashes( $name );\r\n\t\t\t$name = $this->normalize($name);\r\n\t\t\t$name = rawurldecode( $name );\r\n\t\t\treturn $name;\r\n\t\t}", "title": "" }, { "docid": "2069f914024cb26c4b28d1b7add19cc2", "score": "0.6267045", "text": "function deSlugify(string $slug)\n{\n return ucwords(strtolower(preg_replace('/[_-]/', ' ', $slug)));\n\n}", "title": "" }, { "docid": "d3bb50df07a2d6cee520e8c2cd338780", "score": "0.62427413", "text": "public function sanitizeTaxonomyName($name) {\n $sanitizeFunctionName = 'wc_sanitize_taxonomy_name';\n if (!function_exists($sanitizeFunctionName)) {\n Informer::addError(\n sprintf('%1$s function does not exist. Taxonomy name cannot be sanitized.', $sanitizeFunctionName)\n )->addAsLog();\n\n return null;\n }\n\n return wc_sanitize_taxonomy_name($name);\n }", "title": "" }, { "docid": "0694590b1a19f98136d0b186e3fc549f", "score": "0.6183189", "text": "function url_cleaner_clean($slug) {\n\t\t// remove everything except letters, numbers and -\n\t\t$pattern = '~([^a-z0-9\\-])~i';\n\t\t$replacement = '';\n\t\t$slug = preg_replace($pattern, $replacement, $slug);\n\n\t\t// when more than one - , replace it with one only\n\t\t$pattern = '~\\-\\-+~';\n\t\t$replacement = '-';\n\t\t$slug = preg_replace($pattern, $replacement, $slug);\n\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "d55c77b132f7755ab28e343728ea7af8", "score": "0.6142098", "text": "private static function sanitizeName($name) {\n return preg_replace('#[^a-z0-9_\\-/]#i', '', $name);\n }", "title": "" }, { "docid": "1f20bbc8eace84dae0255da033db579f", "score": "0.6125214", "text": "function str_to_slug($text)\n{\n // replace non letter or digits by -\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n // trim\n $text = trim($text, '-');\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n // WP Sanitize HTML Class\n $text = sanitize_html_class($text);\n // lowercase\n $text = strtolower($text);\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "1564a9ca9568e3185089a021a6a8b863", "score": "0.6067956", "text": "private function sanitize_name( $str ) {\r\n\t\t$str = sanitize_title( $str ); // src:wp-includes/functions-formatting.php\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "13d5e21e6e8fe3a2f08fc6da56e9d14a", "score": "0.59804964", "text": "function wpt_slugify( $str )\n{\n return strtolower(str_replace(' ','_',$str));\n}", "title": "" }, { "docid": "633c00152903aa6b22da1de7d14e7a3d", "score": "0.59737134", "text": "public function normalized(){ return UString::normalize($this->name); }", "title": "" }, { "docid": "867c3c2fabff1f69aae39ba53f90a0f8", "score": "0.5959257", "text": "public function sanitize_slug($slug)\n {\n }", "title": "" }, { "docid": "afd43ec5b050c655bb0dab77880bd435", "score": "0.59538937", "text": "function slugify($name)\n {\n $result = strtolower($name);\n $result = preg_replace('/-/', '_', $result);\n $result = preg_replace('/[^a-z0-9]/', '', $result);\n return trim($result);\n }", "title": "" }, { "docid": "5106cbda4abdab4b3508b633ccb6f2bd", "score": "0.595221", "text": "function sanitizeForUrl($string, $force_lowercase = false, $anal = false) {\n $strip = array(\"~\", \"`\", \"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\", \"(\", \")\", \"_\", \"=\", \"+\", \"[\", \"{\", \"]\",\n \"}\", \"\\\\\", \"|\", \";\", \":\", \"\\\"\", \"'\", \"&#8216;\", \"&#8217;\", \"&#8220;\", \"&#8221;\", \"&#8211;\", \"&#8212;\",\n \"—\", \"–\", \",\", \"<\", \".\", \">\", \"/\", \"?\");\n $clean = trim(str_replace($strip, \"\", strip_tags($string)));\n $clean = preg_replace('/\\s+/', \"-\", $clean);\n $clean = ($anal) ? preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $clean) : $clean ;\n return ($force_lowercase) ?\n (function_exists('mb_strtolower')) ?\n mb_strtolower($clean, 'UTF-8') :\n strtolower($clean) :\n $clean;\n}", "title": "" }, { "docid": "a7bc8a915774c479580aaf40a70e83b5", "score": "0.59375155", "text": "function makeSlug( $string )\n{\n $string = iconv( \"utf-8\", \"us-ascii//translit//ignore\", $string ); // transliterate\n $string = str_replace( \"'\", \"\", $string );\n $string = preg_replace( \"~[^\\pL\\d]+~u\", \"-\", $string ); // replace non letter or non digits by \"-\"\n $string = preg_replace( \"~[^-\\w]+~\", \"\", $string ); // remove unwanted characters\n $string = preg_replace( \"~-+~\", \"-\", $string ); // remove duplicate \"-\"\n $string = trim( $string, \"-\" ); // trim \"-\"\n $string = trim( $string ); // trim\n $string = mb_strtolower( $string, \"utf-8\" ); // lowercase\n $string = urlencode( $string ); // safe\n return $string;\n}", "title": "" }, { "docid": "c11e09df41d7283f7c1206deb8b195af", "score": "0.59178454", "text": "function field_slug_from_name( $name ) {\n\t$name = preg_replace( '/[^A-Za-z0-9 ]/', '', $name );\n\treturn substr( trim( strtolower( str_replace( ' ', '-', $name ) ) ), 0, 255 );\n}", "title": "" }, { "docid": "404eca2fffecd4b5c96dee692e715ead", "score": "0.58983344", "text": "private function standardize_taxonomy_name($taxonomy) {\n if ($taxonomy == 'post_tag') {\n $taxonomy = 'tag';\n }\n return $taxonomy;\n }", "title": "" }, { "docid": "90da00852376beb4d11d678d93571c39", "score": "0.5889827", "text": "function slug($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 }\n return $text;\n}", "title": "" }, { "docid": "a32c246709f795de560de4afc3477812", "score": "0.5850151", "text": "static public function unslugify($text)\n {\n // replace all non letters or digits by -\n return str_replace('-', ' ', $text);\n }", "title": "" }, { "docid": "f2931012f8a0b4466b177c5c281d9523", "score": "0.58325016", "text": "function sanitise_name ($name)\n {\n return strip_tags (str_replace (' ', '', $name));\n }", "title": "" }, { "docid": "8874bbffaf26e1d8a0057d10f1205354", "score": "0.5828857", "text": "function slugify($text)\n{\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "44de917d523d1922c997db42f82fbc70", "score": "0.5787131", "text": "function slugify($text)\n{\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "d2518cf0757e8637dda3bf1b0db3ed8e", "score": "0.57810706", "text": "protected function _sanitize($value)\n\t{\n\t\t//remove any '-' from the string they will be used as concatonater\n\t\t$value = str_replace($this->_separator, ' ', $value);\n\t\t\n if (!JFactory::getApplication()->getCfg('unicodeslugs')) {\n\t\t\t//convert to ascii characters\n\t\t\t$value = $this->getService('koowa:filter.ascii')->sanitize($value);\n\t }\n\n\t\t//lowercase and trim\n\t\t$value = trim(strtolower($value));\n\t\t\n if (JFactory::getApplication()->getCfg('unicodeslugs')) {\n\t\t\t$value = $this->just_clean($value);\n\t } else {\n \t\t\t//remove any duplicate whitespace, and ensure all characters are alphanumeric\n\t \t$value = preg_replace(array('/\\s+/','/[^A-Za-z0-9\\-]/'), array($this->_separator,''), $value);\n\t }\n\n\t\t//limit length\n\t\tif (strlen($value) > $this->_length) {\n\t\t\t$value = substr($value, 0, $this->_length);\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "7eb3ea65b6b6b12d71e58c33407e3abd", "score": "0.57717234", "text": "function slugify($string)\n{\n $string = latinize($string);\n $string = preg_replace('~[^\\\\pL\\d]+~u', '-', $string);\n $string = trim($string, '-');\n $string = strtolower($string);\n\n return preg_replace('~[^-\\w]+~', '', $string);\n}", "title": "" }, { "docid": "19b77b58685ec22b50e7aa62c5c4f625", "score": "0.5770935", "text": "function sanitize_title_with_dashes($title) {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n\n $title = $this->remove_accents($title);\n if ($this->seems_utf8($title)) {\n if (function_exists('mb_strtolower')) {\n $title = mb_strtolower($title, 'UTF-8');\n }\n $title = $this->utf8_uri_encode($title, 200);\n }\n\n $title = strtolower($title);\n $title = preg_replace('/&.+?;/', '', $title); // kill entities\n $title = str_replace('.', '-', $title);\n $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n\n $title = $this->sanitize_html_class($title);\n\n return $title;\n }", "title": "" }, { "docid": "83296f1244d25ee07e3e40940e8c205d", "score": "0.57626337", "text": "function slug($s, $spaces='-'){\n\t$s = strtolower($s);\n\t$s = preg_replace('/[-_\\s\\.]/', $spaces, $s);\n\treturn $s;\n}", "title": "" }, { "docid": "4b4b1c25863d0dd6242988497279ed95", "score": "0.5755798", "text": "public function slugify($slug) {\n // Check if path auto is installed.\n if (\\Drupal::moduleHandler()->moduleExists('pathauto')) {\n $slug = \\Drupal::service('pathauto.alias_cleaner')->cleanString($slug);\n }\n else {\n // Remove HTML tags.\n $slug = preg_replace('/<(.*?)>/u', '', $slug);\n\n // Remove inner-word punctuation.\n $slug = preg_replace('/[\\'\"‘’“”]/u', '', $slug);\n\n // Make it lowercase.\n $slug = mb_strtolower($slug, 'UTF-8');\n\n // Get the \"words\". Split on anything that is not a unicode letter or number.\n // Periods are OK too.\n preg_match_all('/[\\p{L}\\p{N}\\._-]+/u', $slug, $words);\n $slug = implode('-', array_filter($words[0]));\n }\n\n return $slug;\n }", "title": "" }, { "docid": "da2ce5873fb3b61bce8edd5830d7a48a", "score": "0.5750045", "text": "public function slug($str) {\n $clean = trim($str);\n $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $clean);\n $clean = preg_replace(\"/[^a-zA-Z0-9\\/_| -]/\", '', $clean);\n $clean = strtolower(trim($clean, '-'));\n\n $clean = preg_replace(\"/[_| -]+/\", '-', $clean); // aquí permite el slash\n\n if (substr($clean, -1) == '/') {\n $clean = substr($clean, 0, -1);\n }\n\n return $clean;\n }", "title": "" }, { "docid": "588ee48dc04369d6cefae55ba9bb7a9e", "score": "0.57471395", "text": "function cleanUrl($url) {\n\t\t$url = str_replace(' ', '-', $url);\n\t\t$url = preg_replace('/[^\\w-+]/u', '', $url);\n\t\t$url = preg_replace('/\\-+/u', '-', $url);\n\t\treturn mb_strtolower($url);\n\t}", "title": "" }, { "docid": "c6cf90e4cc599015f21f473e6ee35f88", "score": "0.5739689", "text": "function slugify($text)\n {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n \n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n \n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n \n // trim\n $text = trim($text, '-');\n \n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n \n // lowercase\n $text = strtolower($text);\n \n if (empty($text)) {\n return 'n-a';\n }\n \n return $text;\n }", "title": "" }, { "docid": "6265f8e0440ccf54192566c25a9a9d5a", "score": "0.57365865", "text": "function desanitize_title($input) {\n\t\treturn ucwords(str_replace(array(\"-\",\"_\"), array(\" \",\" \"), $input));\n\t}", "title": "" }, { "docid": "4ff83e3d51d2cf3f849b5ec3facc0c6c", "score": "0.57339877", "text": "function slugify($text) {\r\n // replace non letter or digits by -\r\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\r\n\r\n // trim\r\n $text = trim($text, '-');\r\n\r\n // transliterate\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n // lowercase\r\n $text = strtolower($text);\r\n\r\n // remove unwanted characters\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n if (empty($text)) {\r\n return 'n-a';\r\n }\r\n\r\n return $text;\r\n }", "title": "" }, { "docid": "2d90353ea09a3790ae4abbe6f8f40b73", "score": "0.5723229", "text": "private function __unifyString($s)\n\t{\n\t\t$out = mb_strtolower($s, 'UTF-8');\n\t\t$out = Inflector::slug($out);\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "a59aa35e4646c554c554bfe8eebc2147", "score": "0.57201695", "text": "function slug($str) {\r\n\t\t// replace all spaces with underscore\r\n\t\t$str = preg_replace(\"/\\s+/\", \"_\", $str);\r\n\t\t// replace non alphanumeric characters\r\n\t\treturn strtolower( preg_replace(\"/[^a-zA-Z0-9_]/\", '_', $str) );\r\n\r\n\treturn $str;\r\n\t}", "title": "" }, { "docid": "26c4117105b075f93d11d55e39f7e798", "score": "0.57084113", "text": "function slugify($string){\n $preps = array('in', 'at', 'on', 'by', 'into', 'off', 'onto', 'from', 'to', 'with', 'a', 'an', 'the', 'using', 'for');\n $pattern = '/\\b(?:' . join('|', $preps) . ')\\b/i';\n $string = preg_replace($pattern, '', $string);\n $string = preg_replace('~[^\\\\pL\\d]+~u', '-', $string);\n $string = trim($string, '-');\n $string = iconv('utf-8', 'us-ascii//TRANSLIT', $string);\n $string = strtolower($string);\n $string = preg_replace('~[^-\\w]+~', '', $string);\n \n return $string;\n}", "title": "" }, { "docid": "ec6502364756edcc0edd079d9a8470b8", "score": "0.56975424", "text": "function slug_friendly($str) {\n return strtolower(preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'),\n array('', '-', ''), $this->remove_accent($str)));\n }", "title": "" }, { "docid": "5db4061563049c0d4aab12efe2766964", "score": "0.56940156", "text": "function sanitize_str($string) {\n $string = str_replace(' ', '_', $string); // Replace whitespace with underscore\n $string = preg_replace('/[^A-Za-z0-9\\-_.]/', '', $string); // Remove special characters\n return $string;\n}", "title": "" }, { "docid": "e76fe2fb65b2f6d99762fe105ea36e35", "score": "0.5693097", "text": "function remove_short_words( $slug )\r\n{\r\n\tif ( !is_admin() ) return $slug;\r\n\t$slug = explode( '-', $slug );\r\n\tforeach ($slug as $k => $word )\r\n\t{\r\n\t\tif ( strlen( $word ) < 3 )\r\n\t\t{\r\n\t\t\tunset( $slug[$k] );\r\n\t\t}\r\n\t}\r\n\treturn implode( '-', $slug );\r\n}", "title": "" }, { "docid": "71eb5bfd7577fd9fae8c7fe8812c97bf", "score": "0.5682359", "text": "function slugify($text){\n // replace non letter or digits by -\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicated - symbols\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "b41f6965a7991ff083d130959ae786d8", "score": "0.5679517", "text": "public static function createSlug($name) {\n $name = strtolower(str_replace(' ', '-', $name));\n\n $name = preg_replace('~[^\\\\pL0-9_]+~u', '-', $name);\n $name = trim($name, \"-\");\n $search = array('~', '`', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '+', '=', '{', '}', '[', ']', ':', ';', '\"', '\\'', '<', '>', '?', ',', '.', '/', '|');\n $name = str_replace($search, '', $name);\n //$name = iconv(\"utf-8\", \"us-ascii//TRANSLIT\", $name);\n //$name = preg_replace('~[^-a-z0-9_]+~', '', $name);\n\n return $name;\n }", "title": "" }, { "docid": "58bcfaa22657f5959f718bfe96b0bc99", "score": "0.5679086", "text": "function slugify($str) {\n $str = strtolower(trim($str)); \n\n // Replace high ascii characters\n $chars = array(\"ä\", \"ö\", \"ü\", \"ß\");\n $replacements = array(\"ae\", \"oe\", \"ue\", \"ss\");\n $str = str_replace($chars, $replacements, $str);\n $pattern = array(\"/(é|è|ë|ê)/\", \"/(ó|ò|ö|ô)/\", \"/(ú|ù|ü|û)/\");\n $replacements = array(\"e\", \"o\", \"u\");\n $str = preg_replace($pattern, $replacements, $str);\n\n // Remove puncuation\n $pattern = array(\":\", \"!\", \"?\", \".\", \"/\", \"'\");\n $str = str_replace($pattern, \"\", $str);\n\n // Hyphenate any non alphanumeric characters\n $pattern = array(\"/[^a-z0-9-]/\", \"/-+/\");\n $str = preg_replace($pattern, \"-\", $str);\n\n return $str;\n}", "title": "" }, { "docid": "ef04f3c38d0c2b038770faa0f60a117d", "score": "0.56717294", "text": "static public function slugify($text)\n \t{\n\t $text = preg_replace('/\\W+/', '-', $text); \n\t // trim and lowercase\n\t $text = strtolower(trim($text, '-')); \n\t return $text;\n\t }", "title": "" }, { "docid": "fab7818eb57e6b53aedd75d619b033b9", "score": "0.56679547", "text": "function slugify($text)\n\t{\n\t\t$text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n\t\t// transliterate\n\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n\t\t// remove unwanted characters\n\t\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\n\t\t// trim\n\t\t$text = trim($text, '-');\n\n\t\t// remove duplicate -\n\t\t$text = preg_replace('~-+~', '-', $text);\n\n\t\t// lowercase\n\t\t$text = strtolower($text);\n\n\t\tif (empty($text)) {\n\t\treturn 'n-a';\n\t\t}\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "ed4b3f9206e3fd834478111219825ba7", "score": "0.5664425", "text": "static public function urlize($text){\r\n return Doctrine_Inflector::urlize(self::slugify($text));\r\n }", "title": "" }, { "docid": "8251cf91c8923d8d0c25fd2c1544dcb8", "score": "0.5659569", "text": "public function sanitize($val) {\n $val = preg_replace ('/\\s+/', ' ', $val); // multispaces\n return preg_replace('/[^a-zA-Z0-9-_ %]/', '', $val); // keep alphanumeric, dash, underscore, single space\n }", "title": "" }, { "docid": "224de42298db56e4a230adaa7de285f8", "score": "0.56520694", "text": "function sanitize($s) {\n return preg_replace('/[^a-zA-Z0-9\\-\\._]/', '-', $s);\n }", "title": "" }, { "docid": "54aa09757a5c2b5b3265da6cf52ff99f", "score": "0.56292856", "text": "function normalizzaNome($nome) {\n\n $nome = strtolower($nome);\n\n $nome = str_replace(\"`\",\"'\",$nome);\n\n $nome = str_replace(\"a'\",\"à\",$nome);\n $nome = str_replace(\"e'\",\"è\",$nome);\n $nome = str_replace(\"i'\",\"ì\",$nome);\n $nome = str_replace(\"o'\",\"ò\",$nome);\n $nome = str_replace(\"u'\",\"ù\",$nome);\n\n $nome = ucwords($nome);\n\n $nome = str_replace(\"'a\",\"'A\",$nome);\n $nome = str_replace(\"'e\",\"'E\",$nome);\n $nome = str_replace(\"'i\",\"'I\",$nome);\n $nome = str_replace(\"'o\",\"'O\",$nome);\n $nome = str_replace(\"'u\",\"'U\",$nome);\n\n $nome = preg_replace_callback('/[.!?].*?\\w/', create_function('$matches', 'return strtoupper($matches[0]);'),$nome);\n\n return $nome;\n\n}", "title": "" }, { "docid": "408c6b1681b584e439c6e1ba174d787e", "score": "0.5627246", "text": "function filter_name( $input ) {\r\n\t$rules = array( \"\\r\" => '', \"\\n\" => '', \"\\t\" => '', '\"' => \"'\", '<' => '[', '>' => ']' );\r\n\t$name = trim( strtr( $input, $rules ) );\r\n\treturn $name;\r\n}", "title": "" }, { "docid": "c5aaffc1c960686ccf28929af8f81c39", "score": "0.562186", "text": "public function normalize_taxonomy_name($name, $prefix = 'pa_') {\n\t\t\t\treturn parent::normalize_taxonomy_name($name, $prefix = 'pa_');\n\t\t\t}", "title": "" }, { "docid": "e22f34dd0376f7c7c956e6fca2169095", "score": "0.56167156", "text": "function slugify($text){\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return strtolower(Base62::encode(random_bytes(8)));\n }\n\n return $text;\n}", "title": "" }, { "docid": "e22f34dd0376f7c7c956e6fca2169095", "score": "0.56167156", "text": "function slugify($text){\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return strtolower(Base62::encode(random_bytes(8)));\n }\n\n return $text;\n}", "title": "" }, { "docid": "96fe7137f3c5c4c13f1dc538ac449724", "score": "0.5616619", "text": "public static function sanitize( $input )\r\n\t{\r\n\t\t$input = strtolower( preg_replace( '/[^A-Za-z]/', '', $input ) );\r\n\t\treturn $input;\r\n\t}", "title": "" }, { "docid": "a6c63975d848c7c0acdba3203b66835b", "score": "0.5599196", "text": "function slugify($string) {\n\t$string = str_replace(' ', '-', strtolower($string));\n\t$string = str_replace('_', '-', $string);\n\t$string = preg_replace(\"/[^A-Za-z0-9 -]/\", '', $string);\n\t\n\treturn empty($string) ? FALSE : $string;\n}", "title": "" }, { "docid": "e21696bb2049af781792466495d8dcc3", "score": "0.5598805", "text": "function slug($text)\n {\n $this->load->helper('text');\n $slug = convert_accented_characters($text); //Without accents\n $slug = url_title($slug, '-', TRUE); //Without spaces Sin espaciosy sin caracteres\n $slug = substr($slug, 0, 140);\n \n return $slug;\n }", "title": "" }, { "docid": "859711791b13111fcedbbcdc700c0ea5", "score": "0.55983406", "text": "function slugify($text, $repl='-')\n{\n // Taken from Stack Overflow <http://stackoverflow.com/a/2955878/2582271>.\n\t$text = preg_replace('~[^\\\\pL\\d]+~u', $repl, $text);\n\t$text = trim($text, $repl);\n\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t$text = strtolower($text);\n\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\t\n\treturn $text;\n}", "title": "" }, { "docid": "e153fa6cc6d53e1383416878fa70c513", "score": "0.5593039", "text": "static public function slugify($text){\r\n\t $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\r\n\t \r\n\t // trim\r\n\t $text = trim($text, '-');\r\n\t\t\r\n\t // transliterate\r\n\t if (function_exists('iconv')){\r\n\t $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\t }\r\n\t\t\r\n\t // lowercase\r\n\t $text = strtolower($text);\r\n\t \r\n\t // remove unwanted characters\r\n\t $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\t\r\n\t if (empty($text)){\r\n\t return '';\r\n\t }\r\n\t \r\n\t return $text;\r\n\t\r\n\t}", "title": "" }, { "docid": "dc631f42c78c21b8a1dd3939659fe9df", "score": "0.5587416", "text": "public static function unslugify($slug) {\n return str_replace('-', ' ', $slug);\n }", "title": "" }, { "docid": "f4d7c53aaa26317eadd3cf83863aa077", "score": "0.55859965", "text": "public static function slugify($text)\n {\n // replace ampersands\n $text = str_replace(\"&\", \"AND\", $text);\n \n\t// replace non letter or digits by -\n\t$text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n\t// trim\n\t$text = trim($text, '-');\n\n\t// transliterate\n\tif (function_exists('iconv')) {\n\t $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t}\n\n\t// lowercase\n\t$text = strtolower($text);\n\n\t// remove unwanted characters\n\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\t\n // go up!\n $text = strtoupper($text);\n \n\treturn $text;\n }", "title": "" }, { "docid": "097efc11c06e1a86b47bdb06dfcfa8fc", "score": "0.558208", "text": "public function SanitizePath(){\r\n $sanitized = str_replace(\" \",\"_\",$this->name);\r\n return preg_replace('/[^\\w-]/', '', $sanitized);\r\n }", "title": "" }, { "docid": "5d3d3d03321fa674bb3aa8c0ff17de38", "score": "0.55767226", "text": "static public function slugify($text)\n {\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 {\n return 'n-a';\n }\n return $text;\n }", "title": "" }, { "docid": "fe3885744ab608f1926197d20c1eb393", "score": "0.55708766", "text": "public function normalize_tag($tag) \n\t{\t\t\n\t\tif ($this->config['normalize_tags'] ) \n\t\t{\n\t\t\tif ($this->config['use_gleez_normalization'])\n\t\t\t{\n\t\t\t\t$tag = URL::title($tag);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$normalized_valid_chars = $this->config['custom_normalization'];\n\t\t\t\t$tag = preg_replace(\"/[^$normalized_valid_chars]/\", \"\", $tag);\n\t\t\t}\n\t\t\t\n\t\t\treturn strtolower($tag);\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $tag;\n\t\t}\n\t}", "title": "" }, { "docid": "76a940fbb2f3e3b1e7edbc2b0fa4d0fa", "score": "0.55662054", "text": "function preetify($string)\n{\n return str_slug($string, '-');\n}", "title": "" }, { "docid": "d627be02e347a8263a7a330936d08a34", "score": "0.5552116", "text": "public function slugify($text)\n {\n \t$text = preg_replace('#[^\\\\pL\\d]+#u', '-', $text);\n \n \t// trim\n \t$text = trim($text, '-');\n \n \t// transliterate\n \tif (function_exists('iconv'))\n \t{\n \t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n \t}\n \n \t// lowercase\n \t$text = strtolower($text);\n \n \t// remove unwanted characters\n \t$text = preg_replace('#[^-\\w]+#', '', $text);\n \n \tif (empty($text))\n \t{\n \t\treturn 'n-a';\n \t}\n \n \treturn $text;\n }", "title": "" }, { "docid": "a0e0ff59f4745d1c793b37da28cc1e94", "score": "0.55493915", "text": "function sanitize($str = '', $lowerCase = false,$replace='_')\r\n{\r\n $s = preg_replace('/\\W/', $replace, $str);\r\n return $lowerCase ? strtolower($s) : $s;\r\n}", "title": "" }, { "docid": "598602372dae1fdeb0eee98ec35b4af8", "score": "0.5546357", "text": "public function testStringURLUnicodeSlug()\n\t{\n\t\t$this->assertEquals(\n\t\t\t'what-if-i-do-not-get_this-right',\n\t\t\tJFilterOutput::stringURLUnicodeSlug('What-if I do.not get_this right?'),\n\t\t\t'Should be URL unicoded'\n\t\t);\n\t}", "title": "" }, { "docid": "c4fa92fe3d3fbd581c9bc485dd18e4e7", "score": "0.55445194", "text": "private static function normalizeName($name){\n\t\treturn str_replace(' ','_',strtolower(trim($name)));\n\t}", "title": "" }, { "docid": "5125da9c9b4da76e5f763d9ea961f11b", "score": "0.5542495", "text": "function sluggify($url)\n{\n $url = strtolower($url);\n $url = strip_tags($url);\n $url = stripslashes($url);\n $url = html_entity_decode($url);\n\n # Remove quotes (can't, etc.)\n $url = str_replace('\\'', '', $url);\n\n # Replace non-alpha numeric with hyphens\n $match = '/[^a-z0-9]+/';\n $replace = '-';\n $url = preg_replace($match, $replace, $url);\n\n $url = trim($url, '-');\n\n return $url;\n}", "title": "" }, { "docid": "0adad8d83cfb4d920ecc708fab13fe97", "score": "0.55384", "text": "private function createUniqueSlugFromAttributeName($name) {\n // Try to create the slug.\n $slug = $this->sanitizeTaxonomyName($name);\n return $this->generateUniqueAttributeTaxonomySlug($slug);\n }", "title": "" }, { "docid": "ad47d9f35282f7e9af40615a71daf157", "score": "0.5536403", "text": "function cleanyeti_get_term_name() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); \n\treturn $term->name;\n}", "title": "" }, { "docid": "605eb02030e2c0f8a1dc0072a85c0280", "score": "0.55352837", "text": "static function de_slug( $string ) {\r\n return ucwords( str_replace( \"_\", \" \", $string ) );\r\n }", "title": "" }, { "docid": "0ba6294570886695ece4dbc310b0e702", "score": "0.55302685", "text": "function filenameSanitazion($in) {\n\treturn str_replace(\n\t\tarray('ä', 'Ä', 'ö', 'Ö', 'ü', 'Ü', 'ß'),\n\t\tarray('ae','Ae', 'oe','Oe', 'ue','Ue', 'ss'),\n\t\t$in\n\t);\n}", "title": "" }, { "docid": "97887410eae9821a135a521996df83ce", "score": "0.5529729", "text": "public static function slugify($text)\n\t{\n\t\t// u for turning utf-8 features on\n\t\t// Replace anything other than '\\', Unicode letters or digits with '-'\n\t\t$text = preg_replace('#[^\\\\pL\\d]+#u', '-', $text);\n\n\t\t$text = trim($text, '-');\n\n\t\tif(function_exists('iconv'))\n\t\t{\t\n\t\t\t// Converts any utf-8 character to its ascii replacement.\n\t\t\t// TRANSLIT : To translate \n\t\t\t// IGNORE: To ignore\n\t\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t\t}\n\n\t\t$text = strtolower($text);\n\n\t\t//Replaces anything other than - or an alphanumeric character with ''\n\t\t$text = preg_replace('#[^-\\w]+#', '', $text);\n\n\t\tif(empty($text)) $text = \"n-a\";\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "21087e90d105336e370f6686b079e434", "score": "0.55279064", "text": "public static function generateSafeSlug($slug)\n {\n setlocale(LC_ALL, \"en_US.utf8\");\n\n $slug = preg_replace('/[`^~\\'\"]/', null, iconv('UTF-8', 'ASCII//TRANSLIT', $slug));\n\n $slug = htmlentities($slug, ENT_QUOTES, 'UTF-8');\n\n $pattern = '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i';\n $slug = preg_replace($pattern, '$1', $slug);\n\n $slug = html_entity_decode($slug, ENT_QUOTES, 'UTF-8');\n\n $pattern = '~[^0-9a-z]+~i';\n $slug = preg_replace($pattern, '-', $slug);\n\n return strtolower(trim($slug, '-'));\n }", "title": "" }, { "docid": "dd3a7cd4fce60a66a3c0f79d0f7b88a7", "score": "0.5525902", "text": "static public function slugify($text) {\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n }", "title": "" }, { "docid": "85418e57b8cdcc9c6f4b9f8ae69e559e", "score": "0.5518402", "text": "function _sanitize_uri( $uri ){\n\n\n\n return $uri;\n}", "title": "" }, { "docid": "d485784ba1470390b10895e043a3f164", "score": "0.55094403", "text": "function makeSlug($input) {\n\t\t\t$input = str_replace(' ', '_', $input);\n\t\t\t\n\t\t\treturn $input;\n\t\t}", "title": "" }, { "docid": "ac03cb7de729157adb8e6da7d76bf0c2", "score": "0.5506206", "text": "public function slugify($text)\n\t{\n\t $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\t\n\t // trim\n\t $text = trim($text, '-');\n\t\n\t // transliterate\n\t $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t\n\t // lowercase\n\t $text = strtolower($text);\n\t\n\t // remove unwanted characters\n\t $text = preg_replace('~[^-\\w]+~', '', $text);\n\t\n\t if (empty($text))\n\t {\n\t return 'n-a';\n\t }\n\t\n\t return $text;\n\t}", "title": "" }, { "docid": "61fb40cd03c63ef63156b76fb8bb6fe7", "score": "0.5501142", "text": "private static function sanitize($txt) {\r\n\t\t\t// URL cleaning: http://www.faqs.org/rfcs/rfc1738.html\r\n\t\t\t$txt = str_replace(\"'\",'',$txt);\r\n\t\t\t$txt = str_replace(\",\",'',$txt);\r\n\t\t\t// replace all non-alpha-numeric characters, remove multiple dashes and trailing dashes\r\n\t\t\t$txt = preg_replace('/[^a-z0-9]/', '-', strtolower($txt));\r\n\t\t\t$txt = preg_replace('/-+/', '-', $txt);\r\n\t\t\t//$txt = preg_replace('/^-/','',$txt);\r\n\t\t\t//$txt = preg_replace('/-$/','',$txt);\r\n\t\t\treturn trim($txt,'- ');\r\n\t\t}", "title": "" }, { "docid": "2921271d112dc03afce5d5ab766799b1", "score": "0.5500698", "text": "private function urlize($var) {\n // in lowercase, trimmed\n $var = trim($var);\n $var = str_replace(\" \", \"_\", $var);\n $var = preg_replace(\"/[^\\w\\-\\.]/\", \"\", $var);\n $var = strtolower($var);\n return $var;\n }", "title": "" }, { "docid": "638870883d9f4358dcd92d4917023c63", "score": "0.5496365", "text": "static public function slugify($text){\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "4bb8ebd82e26c847f1bb5e424525113e", "score": "0.5487894", "text": "static private function _slugify($text) {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n \n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n \n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n \n // trim\n $text = trim($text, '-');\n \n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n \n // lowercase\n $text = strtolower($text);\n \n if (empty($text)) {\n return md5(time() . $text);\n }\n \n return $text . \"-\" . md5(time() . $text);\n }", "title": "" }, { "docid": "4fbabb1e308721b55756ab70f488d324", "score": "0.54807276", "text": "public function dataprovider__slugify() {\n return [\n 'empty string' => ['', ''],\n 'simple word' => ['Hello World', 'hello-world'],\n 'underscore' => ['hello_world', 'hello-world'],\n 'spaces and non-title words' => ['Planet Of The Apes', 'planet-apes'],\n 'spaces and non-title words case two' => ['battle of the bands', 'battle-bands'],\n 'url' => ['/capabilities', 'capabilities'],\n 'plus character' => ['slug+this', 'slug-this'],\n ];\n }", "title": "" }, { "docid": "770595d9206897ef4c415683682e2749", "score": "0.54758126", "text": "public function slugify($text)\n {\n $text = preg_replace('#[^\\\\pL\\d]+#u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n if (function_exists('iconv'))\n {\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n }\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('#[^-\\w]+#', '', $text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n }", "title": "" }, { "docid": "ad802413d7771818d7299cf8cf4f9f32", "score": "0.5474529", "text": "function sanitize_url($string) {\n\t$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.\n\t$string = str_replace('.', '-', $string); // Replaces all spaces with hyphens.\n\t$string = str_replace('&', '-', $string); // Replaces all spaces with hyphens.\n\t$string = preg_replace('/[^A-Za-z0-9\\-]/', '', $string); // Removes special chars.\n\t$string = str_replace('--', '-', $string); // Replaces all spaces with hyphens.\n\t$string = strtolower($string); // change to lower case.\n\t//\n\treturn $string;\n}", "title": "" }, { "docid": "497a2276e371b4d65586687956a88ff9", "score": "0.5474459", "text": "private function normalize($txt)\n\t{\n\t\treturn strtolower(preg_replace(\"/[^a-zA-Z0-9]/\", '', $txt));\n\t}", "title": "" }, { "docid": "aff6d66977c7597985714a552cc03c99", "score": "0.54739", "text": "protected function prepare_term( $term ) {\n\t\t$prepared \t\t= str_replace( ' ', '-', $term);\n\t\t$prepared \t\t= strtolower( $prepared );\n\n\t\treturn $prepared;\n\t}", "title": "" }, { "docid": "662404c5d36971bf467714bad1885d26", "score": "0.5473589", "text": "protected function clean_name($name){\n\t\treturn preg_replace('/[^a-zA-Z0-9_ \\.\\-]/s', '_', $name);\n\t}", "title": "" }, { "docid": "c5315b493f6d9210b89efd5c6428c2b3", "score": "0.5465515", "text": "static public function slugify($text)\n {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n }", "title": "" }, { "docid": "6d385cf7e28aa13069fa018e165be6fe", "score": "0.5461164", "text": "public function getSanitizeName()\n\t{\n\t\treturn static::sanitizeUploadFileName($this->name);\n\t}", "title": "" }, { "docid": "d9eb90d5cd77cc28462ff6f5de62c73a", "score": "0.5460041", "text": "public static function Sanitize($name) {\n\n return $name = filter_var(str_replace(' ', '', $name), FILTER_SANITIZE_STRING);\n }", "title": "" }, { "docid": "365312db9bff9c0af8706d359f1c2d0f", "score": "0.54586947", "text": "static function get_sanitized_blogname(){\n\t\treturn WordPress::get_sanitized_blogname();\n\t}", "title": "" }, { "docid": "feaf43627aa2581591b77c559f4ae6e6", "score": "0.54498255", "text": "public static function slugify($text) {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n // trim\n $text = trim($text, '-');\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n // lowercase\n $text = strtolower($text);\n if (empty($text)) {\n return 'n-a';\n }\n return $text;\n }", "title": "" }, { "docid": "f2ca9a432d4e240b5976f74cde0dc418", "score": "0.5449631", "text": "function slugify($text = '')\n\t{\n\t\t// replace non letter or digits by -\n\t\t$slug = preg_replace('#\\W+#u', '-', $text);\n\n\t\t// trim\n\t\t$slug = trim($slug, '-');\n\n\t\t// transliterate\n\t\t$slug = iconv('utf-8', 'us-ascii//TRANSLIT', $slug);\n\n\t\t// lowercase\n\t\t$slug = strtolower($slug);\n\n\t\t// remove unwanted characters\n\t\t$slug = preg_replace('#[^-\\w]+#', '', $slug);\n\n\t\tif (empty($slug)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $slug;\n\t}", "title": "" }, { "docid": "59eb7df8b498852276ca5f98e1a00194", "score": "0.544807", "text": "public function getSlugAttribute()\n {\n return strtolower(str_replace(' ', '_', $this->name));\n }", "title": "" }, { "docid": "3179dba35e8fe6d805b91becaf762192", "score": "0.5447556", "text": "public function cleanName($name)\n {\n $name = trim(geoString::specialCharsDecode($name));\n\n $reg = geoAddon::getRegistry($this->name);\n if (!$reg->allowUppercase) {\n //store all lowercase (for easier searching)\n $name = strtolower($name);\n }\n\n //get rid of non alpha-numeric, plus space and '\n $name = preg_replace('/[^a-zA-Z0-9_ \\']*/', '', $name);\n\n //push through badword filter\n return geoFilter::badword($name);\n }", "title": "" }, { "docid": "402bf4c003300c3a19a9dc3b0ad893a4", "score": "0.5445299", "text": "function sanitize($string, $force_lowercase = true, $anal = false)\n {\n $strip = array(\"~\", \"`\", \"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\", \"(\", \")\", \"_\", \"=\", \"+\", \"[\", \"{\", \"]\",\n \"}\", \"\\\\\", \"|\", \";\", \":\", \"\\\"\", \"'\", \"&#8216;\", \"&#8217;\", \"&#8220;\", \"&#8221;\", \"&#8211;\", \"&#8212;\",\n \"—\", \"–\", \",\", \"<\", \".\", \">\", \"/\", \"?\");\n $clean = trim(str_replace($strip, \"\", strip_tags($string)));\n $clean = preg_replace('/\\s+/', \"-\", $clean);\n $clean = ($anal) ? preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $clean) : $clean;\n return ($force_lowercase) ?\n (function_exists('mb_strtolower')) ?\n mb_strtolower($clean, 'UTF-8') :\n strtolower($clean) :\n $clean;\n }", "title": "" }, { "docid": "c15c0886aa3290a0b71fc13cbadf510d", "score": "0.5437631", "text": "protected function normalizeName(string $name) : string\n {\n $name = parent::normalizeName($name);\n\n if (strpos($name, 'http-') === 0) {\n $name = substr($name, 5);\n }\n\n return $name;\n }", "title": "" }, { "docid": "9b9a8b5947a0f50f6320e4e607f0e0e3", "score": "0.54363424", "text": "public function myslug($text){\n // replace non letter or digits by -\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n }", "title": "" } ]
43c1949ac3434898357590debb1481c4
Settings Cookie Consent Button Deprecated. We don't use the settings API
[ { "docid": "69ed1e2fcde2a5b0e0a973e3951dfcb0", "score": "0.6713875", "text": "public static function register_button_setting() {\n\n $option_group = 'reading';\n $option_id = 'ejo_cookie_consent_button_text';\n\n // Register Setting - Privacy Policy URL\n register_setting( $option_group, $option_id, array( 'sanitize_callback' => 'sanitize_text_field' ) );\n\n // Add Settings Field - Privacy Policy URL\n add_settings_field(\n $option_id,\n __( 'Cookie Consent Button' , 'ejo-cookie-consent' ),\n function() {\n\n $option_id = 'ejo_cookie_consent_button_text';\n $value = \\Ejo\\Cookie_Consent\\Core::get_button_text();\n ?>\n\n <input type=\"text\" class=\"regular-text\" id=\"<?= $option_id ?>\" name=\"<?= $option_id ?>\" value=\"<?= $value ?>\" />\n <p class=\"description\"><?php _e( 'Enter the text to show on the button.', 'ejo-cookie-consent' ); ?></p>\n\n <?php\n },\n $option_group,\n 'default',\n array( 'label_for' => $option_id )\n );\n }", "title": "" } ]
[ { "docid": "1bb1ca1b9174f117d89e70d4dc89d7ed", "score": "0.62293416", "text": "function best_cookies_install() {\n update_option('best_cookies_version', BESTCOOKIES_VERSION);\n //check for existing options\n $best_cookie_settings = get_option(best_cookie_settings);\n if( !$best_cookie_settings ){\n update_option(best_cookie_settings, array(\n 'active' => $best_cookie_settings['active'] ?: 1,\n 'title' => $best_cookie_settings['title'] ?: 'We use cookies to give you the best online experience',\n 'text' => $best_cookie_settings['text'] ?: 'By using our website, you agree to our <a href=\"#\">privacy policy</a>',\n 'button_size' => $best_cookie_settings['button_size'] ?: 1,\n 'button_text' => $best_cookie_settings['button_text'] ?: 'I Accept',\n 'color' => $best_cookie_settings['color'] ?: '#333333',\n 'position' => $best_cookie_settings['position'] ?: 1\n ));\n }\n}", "title": "" }, { "docid": "a8ec0fc152f94e835dc5b40156cdfe80", "score": "0.6143553", "text": "public static function admin_page() {\n $action = isset( $_POST['action'] ) ? $_POST['action'] : '';\n\n // Print javascript cookie helpers\n \\Ejo\\Cookie_Consent\\Admin::display_js_cookie_helpers();\n\n if ( ! empty( $action ) ) {\n check_admin_referer( $action );\n\n if ( 'ejo-cookie-consent-update-settings' === $action ) {\n\n // Get\n $cookie_consent_text = $_POST['ejo_cookie_consent_text'];\n $cookie_consent_button_text = $_POST['ejo_cookie_consent_button_text'];\n\n // Sanitize\n $cookie_consent_text = wp_kses_post($cookie_consent_text);\n $cookie_consent_button_text = sanitize_text_field($cookie_consent_button_text);\n\n // Save\n update_option( 'ejo_cookie_consent_text', $cookie_consent_text );\n update_option( 'ejo_cookie_consent_button_text', $cookie_consent_button_text );\n\n // Notify\n \\Ejo\\Cookie_Consent\\Admin::admin_page_notification( __( 'Cookie Consent settings updated successfully.', 'ejo-cookie-consent' ) );\n }\n\n if ( 'ejo-cookie-consent-revoke-consent' === $action ) {\n\n ?>\n <script>\n EjoCookieConsentEraseCookie( '<?= \\Ejo\\Cookie_Consent\\Cookie::get_name() ?>' );\n </script>\n <?php\n\n // Notify\n \\Ejo\\Cookie_Consent\\Admin::admin_page_notification( __( 'Cookie Consent revoked successfully.', 'ejo-cookie-consent' ) );\n }\n }\n ?>\n\n <div class=\"wrap\">\n <h1><?= __( 'Privacy Settings' ) . ' | ' . __( 'Cookie Consent', 'ejo-cookie-consent' ) ?></h1>\n <p>\n <?php\n\n $privacy_settings_permalink = '<a href=\"' . get_admin_url() . 'options-privacy.php\">' . __( 'Privacy Settings' ) . '</a>';\n printf(\n __( 'You should link to your Privacy Page in the Cookie Consent Text. If you don\\'t have a Privacy Policy Page you can set it at %s.', 'ejo-cookie-consent' ),\n $privacy_settings_permalink\n );\n\n ?>\n </p>\n <form method=\"post\" action=\"\">\n <input type=\"hidden\" name=\"action\" value=\"ejo-cookie-consent-update-settings\" />\n <table class=\"form-table ejo-cookie-consent-page\">\n <tr>\n <th scope=\"row\">\n <?= __( 'Cookie Consent Text', 'ejo-cookie-consent' ); ?>\n </th>\n <td>\n <div style=\"max-width:600px\">\n <?php\n\n $option_id = 'ejo_cookie_consent_text';\n $content = \\Ejo\\Cookie_Consent\\Core::get_text();\n\n wp_editor( $content, $option_id, [\n 'media_buttons' => false,\n 'teeny' => true,\n 'editor_height' => 100,\n ]);\n\n ?>\n </div>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <?= __( 'Cookie Consent Button Text', 'ejo-cookie-consent' ); ?>\n </th>\n <td>\n <div style=\"max-width:600px\">\n <?php\n\n $option_id = 'ejo_cookie_consent_button_text';\n $value = \\Ejo\\Cookie_Consent\\Core::get_button_text();\n ?>\n\n <input type=\"text\" class=\"regular-text\" id=\"<?= $option_id ?>\" name=\"<?= $option_id ?>\" value=\"<?= $value ?>\" />\n\n </div>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n\n </th>\n <td>\n <?php\n wp_nonce_field( 'ejo-cookie-consent-update-settings' );\n\n submit_button( __( 'Save' ), 'primary', 'submit' );\n ?>\n </td>\n </tr>\n </table>\n </form>\n\n <hr/>\n <h2><?= __( 'Personal Cookie Consent', 'ejo-cookie-consent' ); ?></h2>\n\n <table class=\"form-table ejo-cookie-consent-page\">\n <tr>\n <th scope=\"row\">\n <?= __( 'Cookie Consent?', 'ejo-cookie-consent' ); ?>\n </th>\n <td>\n <div style=\"max-width:600px\">\n\n <script>\n var EjoCookieConsentCookie = EjoCookieConsentGetCookie( '<?= \\Ejo\\Cookie_Consent\\Cookie::get_name() ?>' );\n\n if (EjoCookieConsentCookie) {\n document.write( '<p>Cookie Consent is given by you on this browser.<br/>Value: <i>' + EjoCookieConsentCookie + '</i></p>' );\n }\n else {\n document.write( '<p>No Cookie Consent is given by you on this browser.</p>' );\n }\n </script>\n\n </div>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n\n </th>\n <td>\n <form method=\"post\" action=\"\">\n <input type=\"hidden\" name=\"action\" value=\"ejo-cookie-consent-revoke-consent\" />\n\n <?php wp_nonce_field( 'ejo-cookie-consent-revoke-consent' ); ?>\n\n <input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button\" value=\"<?= __( 'Revoke your Cookie Consent', 'ejo-cookie-consent' ) ?>\">\n </form>\n </td>\n </tr>\n </table>\n </div>\n\n <?php\n }", "title": "" }, { "docid": "a9a02248a61cf5432f531e2ccbdf0089", "score": "0.60123163", "text": "function cookie() {\n $text = get_option('cookie_text', 'This website uses cookies to ensure you get the best experience on our website.');\n $button = get_option('cookie_button', 'Got it!');\n $days = get_option('cookie_days', 60);\n $cookie_name = \"newCookie\";\n $cookie_value = \"cookie\";\n\n if (!isset($_COOKIE[$cookie_name])) { ?>\n <div id=\"cookie\">\n <p><?php echo $text; ?><br>\n <button onClick=\"SetCookie('<?php echo $cookie_name; ?>','<?php echo $cookie_value; ?>','<?php echo $days; ?>')\"><?php echo $button; ?></button>\n </p>\n </div>\n <?php }\n}", "title": "" }, { "docid": "70946030a73ca58d8c4bac4284b36194", "score": "0.59968853", "text": "public function action_cookieSettings_display()\n\t{\n\t\tglobal $context, $txt, $modSettings, $cookiename, $boardurl;\n\n\t\t// Initialize the form\n\t\t$settingsForm = new SettingsForm(SettingsForm::FILE_ADAPTER);\n\n\t\t// Initialize it with our settings\n\t\t$settingsForm->setConfigVars($this->_cookieSettings());\n\n\t\t$context['post_url'] = getUrl('admin', ['action' => 'admin', 'area' => 'serversettings', 'sa' => 'cookie', 'save']);\n\t\t$context['settings_title'] = $txt['cookies_sessions_settings'];\n\n\t\t// Saving settings?\n\t\tif (isset($this->_req->query->save))\n\t\t{\n\t\t\tcall_integration_hook('integrate_save_cookie_settings');\n\n\t\t\t// Its either local or global cookies\n\t\t\tif (!empty($this->_req->post->localCookies) && empty($this->_req->post->globalCookies))\n\t\t\t{\n\t\t\t\tunset($this->_req->post->globalCookies);\n\t\t\t}\n\n\t\t\tif (!empty($this->_req->post->globalCookiesDomain) && strpos($boardurl, $this->_req->post->globalCookiesDomain) === false)\n\t\t\t{\n\t\t\t\tthrow new Exception('invalid_cookie_domain', false);\n\t\t\t}\n\n\t\t\t$settingsForm->setConfigValues((array) $this->_req->post);\n\t\t\t$settingsForm->save();\n\n\t\t\t// If the cookie name was changed, reset the cookie.\n\t\t\tif ($cookiename !== $this->_req->post->cookiename)\n\t\t\t{\n\t\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t\t$original_session_id = $context['session_id'];\n\n\t\t\t\t// Remove the old cookie, nom nom nom\n\t\t\t\tsetLoginCookie(-3600, 0);\n\n\t\t\t\t// Set the new one.\n\t\t\t\t$cookiename = $this->_req->post->cookiename;\n\t\t\t\tsetLoginCookie(60 * $modSettings['cookieTime'], (int) User::$settings['id_member'], hash('sha256', User::$settings['passwd'] . User::$settings['password_salt']));\n\n\t\t\t\tredirectexit('action=admin;area=serversettings;sa=cookie;' . $context['session_var'] . '=' . $original_session_id);\n\t\t\t}\n\n\t\t\tredirectexit('action=admin;area=serversettings;sa=cookie;' . $context['session_var'] . '=' . $context['session_id'] . ';msg=' . (!empty($context['settings_message']) ? $context['settings_message'] : 'core_settings_saved'));\n\t\t}\n\n\t\ttheme()->addInlineJavascript('\n\t\t// Initial state\n\t\thideGlobalCookies();\n\n\t\t// Update when clicked\n\t\t$(\"#localCookies, #globalCookies\").click(function () {\n\t\t\thideGlobalCookies();\n\t\t});', true);\n\n\t\t// Fill the config array.\n\t\t$settingsForm->prepare();\n\t}", "title": "" }, { "docid": "94977c048174e148eff76dafb28b94f6", "score": "0.5968488", "text": "public static function manage_settings() {\n\n if ( apply_filters( 'ejo_cookie_consent_custom_content', true ) ) {\n static::register_text_setting();\n static::register_button_setting();\n }\n else {\n static::register_privacy_policy_url_setting();\n }\n }", "title": "" }, { "docid": "cfeaad3ed8def7fe231b74654f1ffe97", "score": "0.58927953", "text": "public function setCookie()\n {\n setCookie('enableCookies', 1, time() + (10 * 365 * 24 * 60 * 60));\n }", "title": "" }, { "docid": "11dbd08a76be602f8ea722845ca1893c", "score": "0.5879024", "text": "function options_page_content() {\n\n?>\n<div class=\"wrap\">\n <h2>Cookie Consent - Settings</h2>\n <form action=\"options.php\" method=\"post\">\n <?php settings_fields( BOND_CC_OPTIONS ); ?>\n <?php do_settings_sections( BOND_CC_SLUG ); ?>\n <input name=\"Submit\" type=\"submit\" class=\"button button-primary\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n </form>\n</div>\n<?php\n\n }", "title": "" }, { "docid": "0ec52f9be46607de7574b70f8a710ba3", "score": "0.581492", "text": "protected function clickCookieBanner(): void\n {\n $button = WebDriverBy::cssSelector($this->config->options['cookie_banner_button']);\n try {\n $this->driver->wait(15)\n ->until(WebDriverExpectedCondition::elementToBeClickable($button));\n $this->driver->findElement($button)->click();\n } catch (Exception $e) {\n $this->output->writeln('<info>WARNING: Element cookie_banner_button not found (' .\n $this->config->options['cookie_banner_button'] . ')</info>');\n }\n }", "title": "" }, { "docid": "8ba96c41c1a2c97e53668177466ddb4e", "score": "0.5811461", "text": "private function _cookieSettings()\n\t{\n\t\tglobal $txt;\n\n\t\t// Define the variables we want to edit or show in the cookie form.\n\t\t$config_vars = array(\n\t\t\t// Cookies...\n\t\t\tarray('cookiename', $txt['cookie_name'], 'file', 'text', 20),\n\t\t\tarray('cookieTime', $txt['cookieTime'], 'db', 'int', 'postinput' => $txt['minutes']),\n\t\t\tarray('localCookies', $txt['localCookies'], 'subtext' => $txt['localCookies_note'], 'db', 'check', false, 'localCookies'),\n\t\t\tarray('globalCookies', $txt['globalCookies'], 'subtext' => $txt['globalCookies_note'], 'db', 'check', false, 'globalCookies'),\n\t\t\tarray('globalCookiesDomain', $txt['globalCookiesDomain'], 'subtext' => $txt['globalCookiesDomain_note'], 'db', 'text', false, 'globalCookiesDomain'),\n\t\t\tarray('secureCookies', $txt['secureCookies'], 'subtext' => $txt['secureCookies_note'], 'db', 'check', false, 'secureCookies', 'disabled' => !isset($this->_req->server->HTTPS) || !(strtolower($this->_req->server->HTTPS) === 'on' || strtolower($this->_req->server->HTTPS) == '1')),\n\t\t\tarray('httponlyCookies', $txt['httponlyCookies'], 'subtext' => $txt['httponlyCookies_note'], 'db', 'check', false, 'httponlyCookies'),\n\t\t\t'',\n\t\t\t// Sessions\n\t\t\tarray('databaseSession_enable', $txt['databaseSession_enable'], 'db', 'check', false, 'databaseSession_enable'),\n\t\t\tarray('databaseSession_loose', $txt['databaseSession_loose'], 'db', 'check', false, 'databaseSession_loose'),\n\t\t\tarray('databaseSession_lifetime', $txt['databaseSession_lifetime'], 'db', 'int', false, 'databaseSession_lifetime', 'postinput' => $txt['seconds']),\n\t\t);\n\n\t\t// Notify the integration\n\t\tcall_integration_hook('integrate_modify_cookie_settings', array(&$config_vars));\n\n\t\t// Set them vars for our settings form\n\t\treturn $config_vars;\n\t}", "title": "" }, { "docid": "0459f5de3a6b0dc557e9fc7fe17e23bb", "score": "0.5777842", "text": "function best_cookies_page() {\n //check for submit and two most important values\n if ( intval($_POST['update_cookie']) && user_can(get_current_user_id(), 'manage_options') ){\n //allow only safe tags in $allowed tags\n $best_cookies_text = wp_kses( $_POST['text'], 'default' );\n $best_cookies_button = sanitize_text_field($_POST['button_text']);\n if( !empty($best_cookies_text) && !empty($best_cookies_button) ){\n update_option(best_cookie_settings, array(\n 'active' => intval($_POST['active']),\n 'title' => sanitize_text_field($_POST['title']),\n 'text' => $best_cookies_text,\n 'button_size' => sanitize_text_field($_POST['button_size']),\n 'button_text' => $best_cookies_button,\n 'color' => sanitize_text_field($_POST['color']),\n 'position' => sanitize_text_field($_POST['position'])\n ));\n }\n }\n //show plugin page\n include 'admin_form.php';\n}", "title": "" }, { "docid": "2f557c00ef19bcdfcc373bdab014b949", "score": "0.5718698", "text": "function comment_form_change_cookies_consent($fields)\n{\n $commenter = wp_get_current_commenter();\n $consent = empty($commenter['comment_author_email']) ? '' : ' checked=\"checked\"';\n $fields['cookies'] = '<div class=\"col-xs-12\"><p class=\"comment-form-cookies-consent\"><input id=\"wp-comment-cookies-consent\" name=\"wp-comment-cookies-consent\" type=\"checkbox\" value=\"yes\"' . $consent . ' />' .\n '<label for=\"wp-comment-cookies-consent\">Save my name, email, and website in this browser for the next time I comment.</label></p></div>';\n return $fields;\n}", "title": "" }, { "docid": "523bda70f0dcc21ad326352c24d6ddca", "score": "0.5705831", "text": "function write_cookie_settings()\r\n\t{\r\n\t\tglobal $cookie, $lang, $style;\r\n\r\n\t\t//language\r\n\t\t$cookie->set('lang', $lang);\r\n\r\n\t\t//style\r\n\t\t$cookie->set('style', $style);\r\n\r\n\t\t//send cookie\r\n\t\t$cookie->header();\r\n\t}", "title": "" }, { "docid": "3ceedd42c29a328fe382953635a83692", "score": "0.56952107", "text": "function aweber_cookies_clear(){\n\t\tif(wp_verify_nonce($_POST['wpnonce'], 'update-options')){\n\t\t\tsetcookie('accessToken','',time()-60*60*24*100,'/'.$_POST['wpurl'].'inc/');\n\t\t\tsetcookie('accessTokenSecret','',time()-60*60*24*100,'/'.$_POST['wpurl'].'inc/');\n\t\t\tsetcookie('awTokenSecret','',time()-60*60*24*100,'/');\n\t\t\tsetcookie('awToken','',time()-60*60*24*100,'/');\n\t\t\tsetcookie('aw_getlists','',time()-60*60*24*100,'/');\n\t\t\t$this->update('formapi', '', false);\n\t\t}else{\n\t\t\techo '{\"error\":\"Verification failed, please refresh the page and try again.\"}';\n\t\t}\n\t\texit;\n\t}", "title": "" }, { "docid": "46160dc94112df1294b705900f9f68b3", "score": "0.5631012", "text": "function add_cookiebox_markup()\n{\n $showcookiebox = get_field('showcookiebox', \"cookiebox\");\n\n if ($showcookiebox) {\n $language = 'de';\n if (function_exists('pll_current_language')) {\n $language = pll_current_language();\n }\n $general = get_field('general', \"cookiebox_{$language}\");\n $details = get_field('details', \"cookiebox_{$language}\");\n $privacyPage = $details['detailsprivacypolicypage'];\n?>\n <?php if ($privacyPage && get_the_ID() !== $privacyPage->ID) : ?>\n <div class=\"cookiebox\">\n <div class=\"cookiebox__box\">\n\n <div class=\"cookiebox__tabWrapper\">\n <input type=\"radio\" name=\"cookiebox\" id=\"cookiebox_general\" checked=\"checked\">\n <div class=\"cookiebox__tab\">\n <p class=\"cookiebox__title\"><?= $general['generaltitle'] ?></p>\n <p class=\"cookiebox__text\"><?= $general['generalintro'] ?></p>\n <div class=\"cookiebox__buttonWrapper\">\n <label for=\"cookiebox_detail\" class=\"button button--tertiary\"><?= $general['showdetailsbuttontext'] ?></label>\n </div>\n <div class=\"cookiebox__buttonWrapper\">\n <button id=\"cookieboxAcceptAllButton\" class=\"button button--primary\"><?= $general['acceptallbuttontext'] ?></button>\n <button id=\"cookieboxAcceptMinimumButton\" class=\"button button--tertiary\"><?= $general['acceptminimumbuttontext'] ?></button>\n </div>\n <?php if ($privacyPage) : ?>\n <p class=\"cookiebox__text cookiebox__text--privacy\">\n <a href=\"<?= get_permalink($privacyPage) ?>\" target=\"_blank\" rel=\"noopener\"><?= get_the_title($privacyPage) ?></a>\n </p>\n <?php endif; ?>\n </div>\n\n <input type=\"radio\" name=\"cookiebox\" id=\"cookiebox_detail\">\n <div class=\"cookiebox__tab\">\n <p class=\"cookiebox__title\"><?= $details['detailstitle'] ?></p>\n <p class=\"cookiebox__text\"><?= $details['intro'] ?></p>\n <div class=\"cookiebox__options\">\n <?php foreach ($details['options'] as $key => $option) : ?>\n <p class=\"cookiebox__option\">\n <span>\n <input class=\"cookiebox__input\" type=\"checkbox\" name=\"\" value=\"<?= sanitize_title($option['optionstitle']) ?>\" id=\"cookiebox<?= sanitize_title($option['optionstitle']) . $key ?>\" <?= $option['optionislocked'] ? 'checked=\"checked\" disabled data-locked=\"true\"' : 'data-locked=\"false\"' ?>>\n </span>\n <label for=\"cookiebox<?= sanitize_title($option['optionstitle']) . $key ?>\">\n <span><?= $option['optionstitle'] ?></span>\n <span><?= $option['optionstext'] ?></span>\n </label>\n </p>\n <?php endforeach; ?>\n </div>\n <div class=\"cookiebox__buttonWrapper\">\n <button id=\"cookieboxSaveButton\" class=\"button button--primary\"><?= $details['detailssavebuttontext'] ?></button>\n </div>\n <?php if ($privacyPage) : ?>\n <p class=\"cookiebox__text cookiebox__text--privacy\">\n <a href=\"<?= get_permalink($privacyPage) ?>\" target=\"_blank\" rel=\"noopener\"><?= get_the_title($privacyPage) ?></a>\n </p>\n <?php endif; ?>\n </div>\n </div>\n\n </div>\n </div>\n <?php endif; ?>\n<?php\n }\n}", "title": "" }, { "docid": "de0f409cba00c3e40d76230416330ecc", "score": "0.5599838", "text": "public function client_secret_setting() {\n\t\t?>\n\t\t\t<input type=\"text\" class=\"regular-text\" name=\"gsuite_client_secret\" value=\"<?php echo esc_attr( get_site_option( 'gsuite_client_secret' ) ); ?>\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "6b4bd4c02414cdde0b3d006048f8f79c", "score": "0.55956423", "text": "public static function register_text_setting() {\n\n $option_group = 'reading';\n $option_id = 'ejo_cookie_consent_text';\n\n // Register Setting - Privacy Policy URL\n register_setting( $option_group, $option_id, [ 'sanitize_callback' => 'wp_kses_post' ] );\n\n // Add Settings Field - Privacy Policy URL\n add_settings_field(\n $option_id,\n __( 'Cookie Consent Text' , 'ejo-cookie-consent' ),\n function() {\n\n $option_id = 'ejo_cookie_consent_text';\n $content = \\Ejo\\Cookie_Consent\\Core::get_text();\n\n echo '<div style=\"max-width:600px\">';\n wp_editor( $content, $option_id, [\n 'media_buttons' => false,\n 'teeny' => true,\n 'editor_height' => 100,\n ]);\n echo '</div>';\n\n // echo (!empty($desc))?'<br/><span class=\"description\">'.$desc.'</span>':'';\n },\n $option_group,\n 'default',\n [ 'label_for' => $option_id ]\n );\n }", "title": "" }, { "docid": "9f9db7ea16368ebce28f4761b8792af5", "score": "0.5554755", "text": "public function privacy_preferences_modal() {\n\t\t$cookie_privacy_excerpt = get_option( 'uncode_privacy_cookie_privacy_excerpt', '' );\n\t\t$consent_types = uncode_toolkit_privacy_get_consent_types();\n\t\t$privacy_policy_page = get_option( 'uncode_privacy_privacy_policy_page', 0 );\n\t\t$user_consents = isset( $_COOKIE['uncode_privacy']['consent_types'] ) ? json_decode( wp_unslash( $_COOKIE['uncode_privacy']['consent_types'] ) ) : array();\n\n\t\tinclude plugin_dir_path( __FILE__ ) . 'views/public/privacy-preferences-modal.php';\n\t}", "title": "" }, { "docid": "1e8e7ed03686d7d1a832daff3521dc9d", "score": "0.54735285", "text": "public function enableCookieModule() {\n module_enable(['cookie_consent']);\n variable_set('cookie_consent_style', 'custom');\n variable_set('cookie_consent_roles', drupal_map_assoc([DRUPAL_ANONYMOUS_RID]));\n variable_set('cookie_consent_analytics', 'google_analytics/googleanalytics.js');\n }", "title": "" }, { "docid": "e1668ff295d38bae18f0b76d5dc40b71", "score": "0.54635656", "text": "public function ptpkg_api_settings_cb()\n {\n echo '<p>' . __('Please enter your api credentials from <a href=\"' . PTPKG_URL . '/settings/tokens\">ptpgk.com</a>', 'ptpkg') . '</p>';\n }", "title": "" }, { "docid": "8d19d1564faeb209aab9a8d49d7293e2", "score": "0.5457431", "text": "public function setCookies() {\n\t\t\n\t\t}", "title": "" }, { "docid": "7479d9d58f3638b81bbf5e5b5f5b1095", "score": "0.54516083", "text": "function cookieconsent_init()\n{\n\n global $conf;\n global $cc_given;\n $cc_given = (pwg_get_session_var('cconsent'))!= null ? pwg_get_session_var('cconsent')==1 : false; //check server side if consent is given\n // load plugin language file\n load_language('plugin.lang', COOKIECONSENT_PATH);\n\n // prepare plugin configuration\n $conf['cookieconsent'] = safe_unserialize($conf['cookieconsent']);\n}", "title": "" }, { "docid": "708c7f8308954cf396a2225ccf09047c", "score": "0.5449836", "text": "public function sfbl_facebook_login_action_setting_save(){\r\n\t\t if(!current_user_can('manage_options')){\r\n\t\t\twp_redirect(get_admin_url().'admin.php?page=sfbl&save_error='.urlencode('You are not allowed to edit this seetings') );\r\n\t\t\texit();\r\n\t\t }\r\n\t\t \r\n\t\t /*\r\n\t\t *\tVerify nonce field\r\n\t\t */\r\n\t\t check_admin_referer('sfbl_facebook_login_verify');\r\n\t\t \r\n\t\t if( isset($_POST['app_id']) ){\r\n\t\t\t$app_id = sanitize_text_field( $_POST['app_id']);\r\n\t\t\t$values['app_id'] = $app_id;\r\n\t\t }\r\n\t\t if( isset($_POST['secret_key']) ){\r\n\t\t\t$secret_key = sanitize_text_field($_POST['secret_key']);\r\n\t\t\t$values['secret_key'] = $secret_key;\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t\t /*\r\n\t\t\t *\tAdd option for our form if not exist \r\n\t\t\t */ \r\n\t\t\t if(!get_option( 'sfbl_settings' )){\r\n\r\n\t\t\t\t\tadd_option( 'sfbl_settings', array());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t /*\r\n\t\t\t *\tupdate settings \r\n\t\t\t */ \r\n\t\t\t update_option( 'sfbl_settings', $values);\r\n\t\t\t wp_redirect(get_admin_url().'admin.php?page=sfbl&save_success='.urlencode('Setting saved successfully') );\r\n\t\t\t exit();\r\n\t\t \r\n\t\t}", "title": "" }, { "docid": "db13f6d56bb3676cf5ca4e447fc876a0", "score": "0.543031", "text": "function it_exchange_authorizenet_addon_settings_callback() {\n\t$IT_Exchange_AuthorizeNet_Add_On = new IT_Exchange_AuthorizeNet_Add_On();\n\t$IT_Exchange_AuthorizeNet_Add_On->print_settings_page();\n}", "title": "" }, { "docid": "9bb64a2824b6c51bc9ff020039b946fb", "score": "0.5391573", "text": "function eg_iptc_setting_callback($args) {\n\n\t $html = '<input type=\"checkbox\" id=\"eg_iptc_update_caption_disclaimer\" name=\"eg_iptc_update_caption_disclaimer\"'; \n\n\t\tif ( get_option( 'eg_iptc_update_caption_disclaimer' ) ) {\n\t\t\t$html .= ' checked=\"checked\"';\n\t\t}\n\n\t\t$html .= ' /><label for=\"eg_iptc_update_caption_disclaimer\">' . \n\t\t\n\t\t__(' Check this to confirm that you understand that you are using this plugin at your own risk, and that Isabel Castillo will not be held liable under any circumstances for any adverse effects caused by this plugin. I have done my best to ensure that this works as described. You understand that this will update all captions so that you may lose dear captions that you have written in the backend.', 'eazyest-gallery-iptc-caption' );\n\t\techo $html;\n\t}", "title": "" }, { "docid": "9fd7c166ecafc406d80d86c15f02d0d0", "score": "0.5313689", "text": "public function options($key = null)\n {\n if (!$this->options) {\n $options = [\n 'cookieconsent__enabled' => true,\n 'cookieconsent__type' => 'info',\n 'cookieconsent__position' => 'bottom',\n 'cookieconsent__theme' => 'no-edge',\n 'cookieconsent__layout' => 'basic',\n 'cookieconsent__content_message' => __('We respect and value your privacy. Cookies are used on our website to ensure you the best possible user experience. By continuing to browse the site you agree to our use of cookies.', 'wp-genero-cookieconsent'),\n 'cookieconsent__content_dismiss' => __('Got it!', 'wp-genero-cookieconsent'),\n 'cookieconsent__content_allow' => __('Allow cookies', 'wp-genero-cookieconsent'),\n 'cookieconsent__content_deny' => __('Decline cookies', 'wp-genero-cookieconsent'),\n 'cookieconsent__content_link' => __('See our privacy policy for more information.', 'wp-genero-cookieconsent'),\n 'cookieconsent__content_href' => $this->default_privacy_policy_url(),\n 'cookieconsent__revoke_button' => __('Cookie Policy', 'wp-genero-cookieconsent'),\n 'cookieconsent__show_revoke' => false,\n ];\n if (function_exists('get_fields') && ($acf = get_fields('cookieconsent_options'))) {\n foreach ($acf as $_key => $value) {\n // Empty values use defaults.\n if (is_string($value) && !empty($value)) {\n $options[$_key] = $value;\n } elseif (!is_string($value)) {\n $options[$_key] = $value;\n }\n }\n }\n\n foreach ($options as $_key => $value) {\n $_key = str_replace('cookieconsent__', '', $_key);\n $this->options[$_key] = $value;\n }\n }\n\n return isset($key) ? $this->options[$key] : $this->options;\n }", "title": "" }, { "docid": "8f16733e64c783a26467479558be107c", "score": "0.5293655", "text": "public function init()\n {\n\n if (_PS_VERSION_ < 1.7) {\n if (Tools::isSubmit('ajax')) {\n if (Tools::isSubmit('method')) {\n $this->setConsentCookie(HeurekaClass::SERVICE_NAME, HeurekaClass::CONSENT_NAME);\n $this->setConsentCookie(ZboziClass::SERVICE_NAME, ZboziClass::CONSENT_NAME);\n $this->setConsentCookie(ArukeresoService::SERVICE_NAME, ArukeresoService::CONSENT_NAME);\n $this->setConsentCookie(CompariService::SERVICE_NAME, CompariService::CONSENT_NAME);\n $this->setConsentCookie(PazaruvajService::SERVICE_NAME, PazaruvajService::CONSENT_NAME);\n $this->setConsentCookie(BianoStarService::SERVICE_NAME, BianoStarService::CONSENT_NAME);\n }\n }\n }\n\n parent::init();\n }", "title": "" }, { "docid": "f9a7ad3dfbe8191d6146878f98bd0287", "score": "0.5292267", "text": "public static function saveAdvertisingChannel()\n {\n $request = Yii::$app->request;\n $channel = null;\n if ($value = $request->get(static::GOOGLE_ADS_QUERY_PARAMETER)) {\n $channel = Lead::ADVERTISING_CHANNEL_GOOGLE_ADS;\n } elseif ($value = $request->get(static::BING_ADS_QUERY_PARAMETER)) {\n $channel = Lead::ADVERTISING_CHANNEL_BING_ADS;\n }\n\n if ($channel && $value) {\n Yii::$app->response->cookies->add(new \\yii\\web\\Cookie([\n 'name' => static::ADS_CHANNEL_COOKIE,\n 'value' => $channel . static::ADS_CHANNEL_SEPARATOR . $value,\n //expiration time 1 day\n 'expire' => time() + (24 * 60 * 60),\n ]));\n }\n }", "title": "" }, { "docid": "c9281a02f15f1ef47bd056db4ce5d063", "score": "0.5282615", "text": "public function cookies_notification() {\n Flash::notice(__(\"By browsing this website you are agreeing to our use of cookies.\"));\n $_SESSION['cookies_notified'] = true;\n }", "title": "" }, { "docid": "17090cc6f82767de39b8f8dcec91ae7b", "score": "0.52825075", "text": "private function updateCookie() {\n $isSecure = (!empty($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] !== \"off\");\n setcookie($this->info[\"name\"], $this->info[\"uniqid\"], $this->info[\"timeout\"]->format(\"U\"), '/', $this->info[\"domain\"], $isSecure, $this->info[\"http\"]);\n }", "title": "" }, { "docid": "e06b5b2976924ef8c26c1bec4be4c495", "score": "0.52806526", "text": "public function cookie()\n {\n return view('web.pages.legal.cookie');\n }", "title": "" }, { "docid": "7fccdf33ba4ee96667fedf61426e63c7", "score": "0.52765", "text": "function best_cookies_uninstall(){\n echo 'We hope you come back...';\n delete_option('best_cookies_version');\n}", "title": "" }, { "docid": "7d7a4e7169db5bfa8aa690e72d34f193", "score": "0.52711713", "text": "function cf_fb_comments_admin_form() {\n\tif (isset($_POST['cf_action']) && $_POST['cf_action'] == 'save_fb_comment_api_key') {\n\t\tupdate_option('cf_fb_api_key', $_POST['api_key']);\n\t\t$updated_string = '<div class=\"updated fade\" id=\"message\" style=\"background-color: rgb(255, 251, 204);\"><p><strong>Settings saved.</strong></p></div>';\n\t}\n\t$api_key = get_option('cf_fb_api_key');\n\t\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>Facebook Comments API Key</h2>\n\t\t<?php echo $updated_string; ?>\n\t\t<form action=\"\" method=\"post\" name=\"fb_comment_api_key\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th><label for=\"api_key\">API Key</label></th>\n\t\t\t\t\t\t<td><input type=\"text\" name=\"api_key\" value=\"<?php echo attribute_escape($api_key); ?>\" id=\"api_key\" class=\"regular-text\"/></td>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<input type=\"hidden\" name=\"cf_action\" value=\"save_fb_comment_api_key\" />\n\t\t\t<p><button onclick=\"document.fb_comment_api_key.submit();\" />Save Options</button></p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "85456a70f755bd6d0fa61d1d3a02809e", "score": "0.52613276", "text": "public function config()\n {\n set_option(\n GOOGLE_ANALYTICS_ACCOUNT_OPTION,\n trim($_POST[GOOGLE_ANALYTICS_ACCOUNT_OPTION])\n );\n }", "title": "" }, { "docid": "72c8aaea1b936d410013505ed706b724", "score": "0.5254876", "text": "function pmp_client_secret_input() {\n\t$options = get_option('pmp_settings');\n\n\tif (empty($options['pmp_client_secret'])) { ?>\n\t\t<input id=\"pmp_client_secret\" name=\"pmp_settings[pmp_client_secret]\" type=\"password\" value=\"\" />\n\t<?php } else { ?>\n\t\t<a href=\"#\" id=\"pmp_client_secret_reset\">Change client secret</a>\n\t<?php }\n}", "title": "" }, { "docid": "d0b9e49fe45de861b86b6986ff5bc525", "score": "0.5203822", "text": "function best_cookies_settings_link($links) {\n $settings_link = '<a href=\"options-general.php?page=best_cookies.php\">' . __( 'Settings' ) . '</a>';\n array_unshift($links, $settings_link);\n return $links;\n}", "title": "" }, { "docid": "9425025dcf6abc1d5be80229ca744121", "score": "0.5200881", "text": "protected function _setCookie($options = array(), $cookieKey = 'rememberMe') {\r\n\t\t$this->RememberMe->settings['cookieKey'] = $cookieKey;\r\n\t\t$this->RememberMe->configureCookie($options);\r\n\t\treturn $this->RememberMe->setCookie();\r\n\t}", "title": "" }, { "docid": "b8c59cf784def7155abe1c5e11077356", "score": "0.5191974", "text": "function set_cookie_setting($name, $value)\r\n\t{\r\n\t\tglobal $cookie;\r\n\t\t$cookie->set($name, $value);\r\n\t}", "title": "" }, { "docid": "54a511609dc1c2950e320b92bd7ff49b", "score": "0.5181829", "text": "public function enable(): void\n\t{\n\t\t$this->response->setCookie(Configurator::COOKIE_SECRET, $this->cookie, strtotime('1 years'), '/', '', '', true);\n\t\t$this->enable = true;\n\t}", "title": "" }, { "docid": "5ff805b191679f448dc3889b0e62653f", "score": "0.5178289", "text": "protected function _setcookie($cookie = null)\n {\n }", "title": "" }, { "docid": "1e14c763e1a89a5a03a4f37a6dd249fe", "score": "0.51577204", "text": "public function submitCookieDialog() {\n $this->_submitCookie($this->getCookiesAcceptedCookieName(), 1);\n }", "title": "" }, { "docid": "a2bdead2bdeb99ffcbf2bdb205debae6", "score": "0.51523435", "text": "function pfex_plugin_setting_token() {\n\t$options = get_option('pfex_plugin_options');\n\techo \"<input id='pfex_token' name='pfex_plugin_options[pfex_token]' size='40' type='text' value='{$options['pfex_token']}' /><br />\";\n\t_e(\"Please enter the auth token as displayed <a href=\\\"https://app.podigee.com/settings#applications\\\" target=\\\"_blank\\\">here</a>.\", 'podigee-quick-publish');\n}", "title": "" }, { "docid": "dc644b6c0eb10c3c958eb383a492f4c6", "score": "0.51286817", "text": "function cp_siteoffline_activate() {\r\n $options = array(\r\n 'enabled' => false,\r\n 'content' => NULL,\r\n 'version' => 1.0\r\n );\r\n if (get_option('sp_siteoffline_options') === false)\r\n add_option('sp_siteoffline_options', $options);\r\n}", "title": "" }, { "docid": "9c9541487f295647a5b8932f23c5ca8e", "score": "0.5123732", "text": "function visitors_cafe_api_init() {\n // Add the section to general settings \n add_settings_section('visitors_cafe_setting_section', 'VisitorsCafe Widget', 'visitors_cafe_section_callback_function', 'general');\n\n \n add_settings_field('visitors_cafe_code', 'Widget Code', 'visitors_cafe_callback_function', 'general', 'visitors_cafe_setting_section');\n\n \n register_setting('general','visitors_cafe_code');\n}", "title": "" }, { "docid": "bb6975f87417a021f258b68e14c73c4b", "score": "0.5119983", "text": "function ch3sapi_settings_menu() {\n\tadd_options_page( 'My Google Analytics Configuration',\n\t\t'My Google Analytics - Settings API', 'manage_options',\n\t\t'ch3sapi-my-google-analytics', 'ch3sapi_config_page' );\n}", "title": "" }, { "docid": "8e6007ef80f1713493247c156a8d59e9", "score": "0.5109652", "text": "public static function register_privacy_policy_url_setting() {\n $option_group = 'reading';\n $option_id = 'ejo_cookie_consent_privacy_policy_url';\n\n // Register Setting - Privacy Policy URL\n register_setting( $option_group, $option_id, array( 'sanitize_callback' => 'esc_attr' ) );\n\n // Add Settings Field - Privacy Policy URL\n add_settings_field(\n $option_id,\n __( 'Privacy and Cookie Policy URL' , 'ejo-cookie-consent' ),\n function() {\n $option_id = 'ejo_cookie_consent_privacy_policy_url';\n $value = \\Ejo\\Cookie_Consent\\Core::get_privacy_policy_url();\n ?>\n\n <input type=\"text\" class=\"regular-text code\" id=\"<?= $option_id ?>\" name=\"<?= $option_id ?>\" value=\"<?= $value ?>\" />\n <p class=\"description\"><?php _e( 'Enter a link to your privacy and cookie policy where you outline the use of cookies. This link will be used in the cookie consent banner.', 'ejo-cookie-consent' ); ?></p>\n\n <?php\n },\n $option_group,\n 'default',\n array( 'label_for' => $option_id )\n );\n }", "title": "" }, { "docid": "3240a35a3cf011a3ef25f6f478755183", "score": "0.50927097", "text": "public function settings()\n {\n ee()->functions->redirect($this->mcp_url('settings'));\n }", "title": "" }, { "docid": "b7d3b1d8713d6e6c54b75969108d85ca", "score": "0.50922", "text": "function clear_cookie(){\n\t\tif(wp_verify_nonce($_GET['_wpnonce'], 'update-options')){\n\t\t\tif($_GET['id'] == 0){\n\t\t\t\t$id = 'zero';\n\t\t\t}else if($_GET['id'] == 1){\n\t\t\t\t$id = 'one';\n\t\t\t}else if($_GET['id'] == 3){\n\t\t\t\t$id = 'three';\n\t\t\t}else if($_GET['id'] == 4){\n\t\t\t\t$id = 'four';\n\t\t\t}else{\n\t\t\t\t$id = $_GET['id'];\n\t\t\t}\n\t\t\tsetcookie('popup_domination_hide_lightbox'.$id,'',time()-60*60*24*100,COOKIEPATH);\n\t\t\tsetcookie('popup_domination_hide_ab'.$id,'',time()-60*60*24*100,COOKIEPATH);\n\t\t\techo '{\"done\":\"done\"}';\n\t\t} else {\n\t\t\techo '{\"error\":\"Verification failed, please refresh the page and try again.\"}';\n\t\t}\n\t\tdie();\n\t}", "title": "" }, { "docid": "a82b7749d646e121efb65ca5eb8acba3", "score": "0.50905734", "text": "protected function hideCookie()\n {\n $this->options['cookie_name'] = substr(hash('sha512', $this->options['cookie_name']), 0, 10);\n }", "title": "" }, { "docid": "d8012345dabdc31aad044e5d955cb829", "score": "0.5081775", "text": "function tinychat_settings_page() {\r\n\tif (!current_user_can('manage_options')) {\r\n\t\twp_die( __('You do not have sufficient permissions to access this page.') );\r\n\t}\r\n\r\n\t$opt_val = get_option( $opt_name );\r\n\t\r\n\tif( isset($_POST['form-submit']) && $_POST['form-submit'] == '1' ) {\r\n\t\t$opt_val = $_POST['chat_enabled'];\r\n\t\tupdate_option('tinychat_chat_enabled', $opt_val);\r\n\t\t\r\n\t\t$opt_val = $_POST['chat_url'];\r\n\t\tupdate_option('tinychat_chat_url', $opt_val);\r\n\t\t\r\n\t\t$opt_val = $_POST['api_key'];\r\n\t\tupdate_option('tinychat_api_key', $opt_val);\r\n\t\t\r\n\t\t$opt_val = $_POST['api_secret'];\r\n\t\tupdate_option('tinychat_api_secret', $opt_val);\r\n\t\t\r\n\t\t$opt_val = $_POST['background_color'];\r\n\t\tupdate_option('tinychat_background_color', $opt_val);\r\n\t\t\r\n\t\tif(isset($_POST['restricted_broadcast']) && $_POST['restricted_broadcast'] == '1')\r\n\t\t\tupdate_option('tinychat_restricted_broadcast', 1);\r\n\t\telse\r\n\t\t\tupdate_option('tinychat_restricted_broadcast', 0);\r\n\t\t\t\r\n\t\tif(isset($_POST['allow_guests']) && $_POST['allow_guests'] == '1')\r\n\t\t\tupdate_option('tinychat_allow_guests', 1);\r\n\t\telse\r\n\t\t\tupdate_option('tinychat_allow_guests', 0);\r\n\t\t\t\r\n\t\tif(isset($_POST['mod_groups']) && is_array($_POST['mod_groups'])) {\r\n\t\t\t$opt_val = implode(',', $_POST['mod_groups']);\r\n\t\t\tupdate_option('tinychat_mod_groups', $opt_val);\r\n\t\t}\r\n\t\t?>\r\n\t\t<div class=\"updated\"><p><strong><?php _e('settings saved.', 'menu-test' ); ?></strong></p></div>\r\n\t\t<?php\r\n }\r\n \r\n $chat_enabled = get_option('tinychat_chat_enabled') != false ? (get_option('tinychat_chat_enabled') == '1' ? true : false) : false;\r\n $chat_url = get_option('tinychat_chat_url') != false ? get_option('tinychat_chat_url') : '';\r\n\t$api_key = get_option('tinychat_api_key') != false ? get_option('tinychat_api_key') : '';\r\n $api_secret = get_option('tinychat_api_secret') != false ? get_option('tinychat_api_secret') : '';\r\n $background_color = get_option('tinychat_background_color') != false ? get_option('tinychat_background_color') : '';\r\n $restricted_broadcast = get_option('tinychat_restricted_broadcast') != false ? (get_option('tinychat_restricted_broadcast') == '1' ? true : false) : false;\r\n $mod_groups = get_option('tinychat_mod_groups') != false ? explode(',', get_option('tinychat_mod_groups')) : array();\r\n \r\n ?>\r\n\t<div class=\"wrap\">\r\n\t<h2><?php echo __( 'Tinychat Settings', 'menu-tinychat' ); ?></h2>\r\n \r\n\t<form name=\"form1\" method=\"post\" action=\"\">\r\n\t\t<input type=\"hidden\" name=\"form-submit\" value=\"1\"/>\r\n\t\t<table class=\"form-table\">\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><?php _e(\"Chat Enabled:\", 'menu-tinychat' ); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t<label for=\"chat_enabled\">\r\n\t\t\t\t\t\t\t<input name=\"chat_enabled\" type=\"checkbox\" id=\"chat_enabled\" value=\"1\" <?php echo $chat_enabled ? 'checked=\"checked\"' : ''?> />\r\n\t\t\t\t\t\t\t<?php _e(\"Enabled\", 'menu-tinychat' ); ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"chat_url\"><?php _e(\"Chat url:\", 'menu-tinychat' ); ?></label></th>\r\n\t\t\t\t<td><input type=\"text\" class=\"regular-text\" value=\"<?php echo $chat_url?>\" id=\"chat_url\" name=\"chat_url\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"api_key\"><?php _e(\"Api Key:\", 'menu-tinychat' ); ?></label></th>\r\n\t\t\t\t<td><input type=\"text\" class=\"regular-text\" value=\"<?php echo $api_key?>\" id=\"api_key\" name=\"api_key\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"api_secret\"><?php _e(\"Api Secret:\", 'menu-tinychat' ); ?></label></th>\r\n\t\t\t\t<td><input type=\"text\" class=\"regular-text\" value=\"<?php echo $api_secret?>\" id=\"api_secret\" name=\"api_secret\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"background_color\"><?php _e(\"Background Color:\", 'menu-tinychat' ); ?></label></th>\r\n\t\t\t\t<td><input type=\"text\" class=\"regular-text\" value=\"<?php echo $background_color?>\" id=\"background_color\" name=\"background_color\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><?php _e(\"Allow guests:\", 'menu-tinychat' ); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t<label for=\"allow_guests\">\r\n\t\t\t\t\t\t\t<input name=\"allow_guests\" type=\"checkbox\" id=\"allow_guests\" value=\"1\" <?php echo $allow_guests ? 'checked=\"checked\"' : ''?> />\r\n\t\t\t\t\t\t\t<?php _e(\"Allow\", 'menu-tinychat' ); ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><?php _e(\"Restrict Broadcast:\", 'menu-tinychat' ); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t<label for=\"restricted_broadcast\">\r\n\t\t\t\t\t\t\t<input name=\"restricted_broadcast\" type=\"checkbox\" id=\"restricted_broadcast\" value=\"1\" <?php echo $restricted_broadcast ? 'checked=\"checked\"' : ''?> />\r\n\t\t\t\t\t\t\t<?php _e(\"Restrict\", 'menu-tinychat' ); ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><?php _e(\"Moderator Roles:\", 'menu-tinychat' ); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select multiple=\"multiple\" name=\"mod_groups[]\" id=\"mod_groups\" style=\"height: auto;\">\r\n\t\t\t\t\t\t<?php tinychat_roles_options($mod_groups); ?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t\t\r\n\t\t<p class=\"submit\">\r\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\r\n\t\t</p>\r\n\t</form>\r\n\t</div>\r\n\r\n\t<?php\r\n}", "title": "" }, { "docid": "0aa26a1e6905791b1e912b0ddc1aff3d", "score": "0.50739276", "text": "public static function output_back_to_settings_link()\n {\n if ( !Iconic_WDS_Core_Settings::is_settings_page( '-account' ) ) {\n return;\n }\n ?>\n\t\t<div style=\"margin: 20px 0 10px;\">\n\t\t\t<?php \n echo wp_kses_post( self::back_to_settings_link() ) ;\n ?>\n\t\t</div>\n\t\t<?php \n }", "title": "" }, { "docid": "d310d436ca332c661ef6de45aa68f81b", "score": "0.50628495", "text": "function ovr_new_appointment_created($post_id){\r\n\tif( isset($_POST['use_packk']) && $_POST['use_packk'] == 'yes' ){\r\n\t\tupdate_post_meta($post_id, 'ovr_bookedwith_pack', 'yes');\r\n\r\n\t\tsetcookie('ovr_bookingid', $post_id, time() + (86400 * 30), '/'); // 86400 = 1 day\r\n\t}\r\n}", "title": "" }, { "docid": "5d55e18232290ca32a2b582e45105456", "score": "0.50625145", "text": "protected function add_cookie_consent_div() {\n\t\tadd_action( 'jetpack_stats_extra', array( $this, 'cookie_consent_div' ), 10, 2 );\n\t}", "title": "" }, { "docid": "f15a508859c36e14c8676d3e0b41081d", "score": "0.50616974", "text": "function createRemember() {\n\n\t\t// set the cookie\n\t\t$cookie_path = cleanUrlPath(dirname($_SERVER['REQUEST_URI']).'/'.$GLOBALS['where_config_relative'].'/');\n\t\t$cookie_value = isset($_POST['login_high_accessibility']) ? 1 : 0;\n\n\t\tsetcookie(\"docebo_cookie_data[high_accessibility]\",\n\t\t\t\t$cookie_value,\n\t\t\t\ttime() + (365*24*3600),\t// for an entire year\n\t\t\t\t$cookie_path );\n\t\t$_COOKIE['docebo_cookie_data']['high_accessibility'] = $cookie_value;\n\t}", "title": "" }, { "docid": "6c47d4a8a1a8bf891726aa1b0e5cc1c3", "score": "0.50597864", "text": "function cura_page_settings() {\n\t$action = isset ( $_POST ['action'] ) ? $_POST ['action'] : '';\n\t\n\tif ('update' == $action) {\n\t\t$options = array ('title', 'keywords', 'providername', 'website', //\n'description', 'authorname', 'type', 'contact' );\n\t\tforeach ( $options as $option ) {\n\t\t\t$option = trim ( $option );\n\t\t\t$value = null;\n\t\t\tif (isset ( $_POST [$option] ))\n\t\t\t\t$value = $_POST [$option];\n\t\t\tif (! is_array ( $value ))\n\t\t\t\t$value = trim ( $value );\n\t\t\t$value = stripslashes_deep ( $value );\n\t\t\tupdate_option ( 'cura_' . $option, $value );\n\t\t}\n\t\t$goback = add_query_arg ( 'settings-updated', 'true', wp_get_referer () );\n\t\techo '<script type=\"text/javascript\">history.back()</script>';\n\t\texit ();\n\t}\n\t\n\tinclude 'views/settings.php';\n}", "title": "" }, { "docid": "4c731c1b03150789edf3905ccf694914", "score": "0.50584847", "text": "function ch3sapi_config_page() { ?>\n\t<div id=\"ch3sapi-general\" class=\"wrap\">\n\t<h2>My Google Analytics</h2>\n\n\t<form name=\"ch3sapi_options_form_settings_api\" method=\"post\" action=\"options.php\">\n\n\t<?php settings_fields( 'ch3sapi_settings' ); ?>\n\t<?php do_settings_sections( 'ch3sapi_settings_section' ); ?> \n\n\t<input type=\"submit\" value=\"Submit\" class=\"button-primary\" />\n\t</form>\n\t</div>\n<?php }", "title": "" }, { "docid": "d651772a458043524704e6c2f45c2cdf", "score": "0.5055382", "text": "public function cookiePolicyForm(Request $request)\n {\n $setting = SettingsModel::first();\n \treturn view('Admin.Home.cookie-policy',['setting'=>$setting]);\n }", "title": "" }, { "docid": "5918ef3951f9fd7c0a3ba25cf1d9bfbf", "score": "0.50527334", "text": "function capriza_enqueue_marketo_form_sdk() {\n wp_enqueue_script( 'capriza-market-subscribe-helper', '//app-ab21.marketo.com/js/forms2/js/forms2.min.js' );\n}", "title": "" }, { "docid": "1ddb2b9d99808530a2c43d647ebe08ac", "score": "0.5051793", "text": "public function cookiebot_addon_hubspot_tracking_code() {\n\t\t// Check if HubSpot Tracking Code is loaded\n\t\t$options = get_option('hs_settings');\n\t\tif ( !isset($options['hs_portal']) || $options['hs_portal'] == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if Cookiebot is activated and active.\n\t\tif ( ! function_exists( 'cookiebot_active' ) || ! cookiebot_active() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Replace original HubSpot Tracking Code with own one and delete cookie if\n\t\t// it was perviously set.\n\t\tif ( is_plugin_active('hubspot-tracking-code/hubspot-tracking-code.php') ) {\n\t\t\tnew Hubspot_Tracking_Code_Buffer_Output( 'wp_footer', 10 );\n\n\t\t\tif ( ! cookiebot_is_cookie_state_accepted( 'marketing' ) && isset($_COOKIE['hubspotutk']) ) {\n\t\t\t\tunset( $_COOKIE['hubspotutk'] );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "efe9b62d4bd07eeb6e2bf18556efde2a", "score": "0.50511783", "text": "protected function setCookie()\n {\n return $this->request->cookie('login', $this->request->post()['email'], time() + 86400 * 10)->set();\n }", "title": "" }, { "docid": "4a99c6ce19fb0d503624a31853727428", "score": "0.5050854", "text": "function apif_settings_action() {\n if( !empty( $_POST ) && wp_verify_nonce( $_POST['apif_settings_nonce'], 'apif_settings_action' ) ) {\n\n include( 'inc/backend/save-settings.php' );\n }\n }", "title": "" }, { "docid": "9d0d0618b13bb854fd2f9223410eaaf2", "score": "0.50468326", "text": "function resetCookie() {\n if ($this->cookieOk == 1) {\n $this->utility->setCookie();\n }\n\n }", "title": "" }, { "docid": "6cedb0354916998c76ad23bd7d2dfb7e", "score": "0.50403315", "text": "function politykaCookies() {\r\n $this->render('/polityka_cookies');\r\n }", "title": "" }, { "docid": "8b13d8c6f6b26100846b16ff05f72f69", "score": "0.5033941", "text": "protected function getFacadeAccessor()\n {\n return 'cookie-consent';\n }", "title": "" }, { "docid": "eb634278214bf8bd7cc2f1b38d3edd8d", "score": "0.5031895", "text": "public function action_preferences() {\n \n }", "title": "" }, { "docid": "862d638b282527a884ac820ba33253bd", "score": "0.5031116", "text": "public function client_id_setting() {\n\t\t?>\n\t\t\t<input type=\"text\" class=\"large-text\" name=\"gsuite_client_id\" value=\"<?php echo esc_attr( get_site_option( 'gsuite_client_id' ) ); ?>\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "cc8c946753e52beabcef65389bacf381", "score": "0.50284415", "text": "public function setOptionDefaults()\n\t{\n\t\t// in this case, do nothing\n\t\tif( ! isset($this->_options['default_cta']))\n\t\t\t$this->_options['default_cta'] = 'WhatsApp';\n\t}", "title": "" }, { "docid": "1d9b4cd823ed3a8fec21c803e69cf4c2", "score": "0.49956462", "text": "function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE)\r\n\t{\r\n\t\t$CI =& get_instance();\r\n\t\t$CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);\r\n\t}", "title": "" }, { "docid": "3b5b3409bdd57adb9af7c5fda7d1f43a", "score": "0.49937218", "text": "function control_panel() {\n\t\t\tif ( isset( $_POST[self::NONCE_NAME] ) ) :\n\t\t\t\t$update_message = $this->save_posted_settings();\n\t\t\tendif;\n\t\t\t\n\t\t\t$settings = $this->registry->options;\n\t\t\t\n\t\t\t?><div class=\"wrap\">\n\n\t\t\t\t<h2><?php echo $GLOBALS['title'] ?></h2>\n\n\t\t\t\t<?php \n\t\t\t\t/**\n\t\t\t\t * Prior to page output, after title\n\t\t\t\t */\n\t\t\t\tdo_action( 'wpcx_blurbette_before_controlpanel' ); ?>\n\t\t\t\t\n\t\t\t\t<?php if ( isset( $update_message ) ) : ?>\n\t\t\t\t\t<div id=\"setting-error-settings_updated\" class=\"<?php echo ( stripos( $update_message, 'saved' ) === false )? 'error' : 'updated'; ?> settings-error\"> \n\t\t\t\t\t<p><strong><?php echo $update_message ?></strong></p></div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t\t<form name=\"wpcx_blurbette_optsform\" method=\"post\" action=\"<?php\n\t\t\t\t\techo add_query_arg( array( \n\t\t\t\t\t\t'page' => $GLOBALS['plugin_page']\n\t\t\t\t\t ), admin_url( $GLOBALS['pagenow'] ) );\n\t\t\t\t\n\t\t\t\t?>\">\n\t\t\t\t<?php wp_nonce_field( self::NONCE_VALUE, self::NONCE_NAME ); ?>\n\t\t\t <table class=\"form-table\">\n\t\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\"><?php _e( 'Shortcodes', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></th>\n\t\t\t <td><label><input type=\"checkbox\" name=\"blurbette_opt[use_shortcode]\" value=\"1\" <?php\n\t\t\t \tchecked( $settings['use_shortcode'], 1 );\n\t\t\t ?> /> <?php _e( 'Use Shortcodes', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\"><?php _e( 'Widgets', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></th>\n\t\t\t <td><label><input type=\"checkbox\" name=\"blurbette_opt[use_widget]\" value=\"1\" <?php\n\t\t\t \tchecked( $settings['use_widget'], 1 );\n\t\t\t ?> /> <?php _e( 'Use Widget', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\"><?php _e( 'Copy', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></th>\n\t\t\t <td><label><input type=\"checkbox\" name=\"blurbette_opt[use_copy_metabox]\" value=\"1\" <?php\n\t\t\t \tchecked( $settings['use_copy_metabox'], 1 );\n\t\t\t ?> /> <?php _e( 'Enable &quot;Copy&quot; button in post panels', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t <blockquote><?php _e( 'New Blurbettes are available:', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?>\n\t\t\t <br />\n\t\t\t <label><input type=\"radio\" name=\"blurbette_opt[copied_everywhere]\" value=\"y\" <?php\n\t\t\t \tchecked( $settings['copied_everywhere'], 'y' );\n\t\t\t ?> /> <?php _e( 'Everywhere', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t &nbsp;\n\t\t\t <label><input type=\"radio\" name=\"blurbette_opt[copied_everywhere]\" value=\"n\" <?php\n\t\t\t \tchecked( $settings['copied_everywhere'], 'n' );\n\t\t\t ?> /> <?php _e( 'Nowhere', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t </blockquote>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\"><?php _e( 'Deactivation', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></th>\n\t\t\t <td><label><input type=\"checkbox\" name=\"blurbette_opt[clear_on_deactivate]\" value=\"1\" <?php\n\t\t\t \tchecked( $settings['clear_on_deactivate'] , 1 );\n\t\t\t ?> /> <?php _e( 'Clear everything when deactivating this plugin', WPCX_Blurbette_Def::TEXT_DOMAIN ) ?></label>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t\t</table>\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * After page output, before submit button.\n\t\t\t\t */\n\t\t\t\tdo_action( 'wpcx_blurbette_form_controlpanel' ); ?>\n\t\t\t\t<?php submit_button(); ?>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2e770c409e5b3dade582abd9fe6a80d3", "score": "0.49900892", "text": "function page_init(){\t\n\t\tregister_setting('eg-iptc-caption-settings-group', 'eg_iptc_update_caption_disclaimer', array($this, 'sanitize'));\n\t\tadd_settings_section(\n\t\t\t'eg_iptc_caption_main_settings',\n\t\t\t__( 'Update Captions', 'eazyest-gallery-iptc-caption' ),\n\t\t\tarray( $this, 'main_setting_section_callback' ),\n\t\t\t'eg-iptc-caption'\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'eg_iptc_update_caption_disclaimer',\n\t\t\t__( 'Please Agree', 'eazyest-gallery-iptc-caption' ),\n\t\t\tarray($this, 'eg_iptc_setting_callback'),\n\t\t\t'eg-iptc-caption',\n\t\t\t'eg_iptc_caption_main_settings'\n\t\t);\n\t\t\t\n\t}", "title": "" }, { "docid": "f70007ac79927ddae56b4d7e615d6f8e", "score": "0.4987963", "text": "public function onAdminSave(): void\n {\n if ($this->grav['uri']->basename() == 'custom-banner') {\n if (isset($_COOKIE[self::CUSTOM_BANNER_DISMISS])) {\n setcookie(self::CUSTOM_BANNER_DISMISS, 'false', time()-1, $this->grav['uri']->rootUrl());\n }\n }\n }", "title": "" }, { "docid": "1df5f26a45af0708f1c7dd9c47f05035", "score": "0.4987668", "text": "function aiosc_screen_options_tickets() {\n $fields = array('id','status','replies','department','priority','author','operator', 'last_update', 'date_created');\n foreach($fields as $f) {\n if(aiosc_pg($f.'-hide')) aiosc_cookie_set($f.'-hide',false, 0);\n else aiosc_cookie_set($f.'-hide',true);\n }\n $tags = array('awaiting_reply', 'requested_closure', 'attachments');\n foreach($tags as $tag) {\n if(aiosc_pg('tag-'.$tag.'-hide')) aiosc_cookie_set('tag-'.$tag.'-hide',false, 0);\n else aiosc_cookie_set('tag-'.$tag.'-hide',true);\n }\n aiosc_cookie_set('tickets-per-page',@$_POST['tickets-per-page']);\n }", "title": "" }, { "docid": "e54c491b70c1837337e7824896c3a65d", "score": "0.49847913", "text": "function culturefeed_ui_page_privacy_settings() {\n\n try {\n $culturefeed_user = DrupalCultureFeed::getLoggedInUser();\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n drupal_set_message(t('An error occurred while loading your account, please try again later.'));\n return array();\n }\n\n culturefeed_ui_set_profile_breadcrumb();\n\n $form = drupal_get_form('culturefeed_ui_privacy_settings_form', $culturefeed_user);\n\n return array(\n '#attached' => array(\n 'css' => array(\n drupal_get_path('module', 'culturefeed_ui') . '/css/privacy_settings.css',\n ),\n ),\n '#intro' => culturefeed_ui_profile_intro(),\n '#form' => drupal_render($form),\n '#profile_shortcuts' => theme('culturefeed_ui_profile_shortcuts'),\n '#theme' => 'culturefeed_ui_privacy_settings',\n );\n\n}", "title": "" }, { "docid": "36a832e791796ddc6839d0ca52a24930", "score": "0.4980521", "text": "protected function setCookie() {\n $this->cookieHash();\n setcookie(\n $this->cookieSessName,\n $this->hash,\n ($this->expireOnClose) ? 0 : time() + $this->expirationTime,\n NULL,\n NULL,\n $this->secureCookie, // samo https ako hoces\n TRUE\n );\n\n setcookie(\n $this->cookieTimeName,\n time(),\n ($this->expireOnClose) ? 0 : time() + $this->expirationTime,\n NULL,\n NULL,\n $this->secureCookie,\n TRUE\n );\n //$this->loginToken = $this->hash;\n Mapper::setLoginToken($this->id,$this->hash);\n }", "title": "" }, { "docid": "df98b1451a26a379f8d1b6537a6714be", "score": "0.4970688", "text": "public function settingsForm()\n {\n return 'twitter-form-settings';\n }", "title": "" }, { "docid": "fac37d3f9fcfe30faec8ef2ff06c6525", "score": "0.49692383", "text": "function cache_menu_settings() {\n\t\t$this->settings_hook = add_options_page( 'Cache Settings', 'Cache Settings', 'administrator', 'cache-settings', array( $this, 'cache_menu_settings_page' ) );\n\t}", "title": "" }, { "docid": "c123656a4d2ea1099cf6bc0408ebe99d", "score": "0.49661654", "text": "public function update_privacy_preferences() {\n\t\tif ( ! isset( $_POST[ 'update-privacy-preferences-nonce' ] ) || ! wp_verify_nonce( sanitize_key( $_POST[ 'update-privacy-preferences-nonce' ] ), 'uncode-privacy-update_privacy_preferences' ) ) {\n\t\t\twp_die( esc_html__( 'We could not verify the the security token. Please try again.', 'uncode-privacy' ) );\n\t\t}\n\n\t\t$consents_default_on_list = array_map( 'sanitize_text_field', (array) $_POST[ 'consents_default_on_list' ] );\n\t\t$consents = array_map( 'sanitize_text_field', (array) $_POST[ 'user_consents' ] );\n\t\t$consents_to_save = array();\n\n\t\t// First save all consents that are on by default to off (if unchecked)\n\t\tforeach ( $consents_default_on_list as $consents_on ) {\n\t\t\tif ( ! in_array( $consents_on, $consents ) ) {\n\t\t\t\t$consents_to_save[] = $consents_on . '-off';\n\t\t\t}\n\t\t}\n\n\t\t// Then save the other consents\n\t\tforeach ( $consents as $consent_id ) {\n\t\t\tif ( in_array( $consent_id, $consents_default_on_list ) ) {\n\t\t\t\t$consents_to_save[] = $consent_id . '-on';\n\t\t\t} else {\n\t\t\t\t$consents_to_save[] = $consent_id;\n\t\t\t}\n\t\t}\n\n\t\t$consents_as_json = json_encode( $consents_to_save );\n\n\t\tsetcookie( \"uncode_privacy[consent_types]\", $consents_as_json, time() + YEAR_IN_SECONDS, \"/\" );\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$user = wp_get_current_user();\n\n\t\t\tif ( ! empty( $consents_to_save ) ) {\n\t\t\t\tdelete_user_meta( $user->ID, 'uncode_privacy_consents' );\n\n\t\t\t\tforeach ( $consents_to_save as $consent ) {\n\t\t\t\t\t$consent = sanitize_text_field( wp_unslash( $consent ) );\n\t\t\t\t\tadd_user_meta( $user->ID, 'uncode_privacy_consents', $consent );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twp_safe_redirect( esc_url_raw( wp_get_referer() ) );\n\t\texit;\n\t}", "title": "" }, { "docid": "3837d21c7e16495081bd932f8cc75699", "score": "0.49649996", "text": "function wpvideocoach_settings() {\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\r\n\t}\r\n?>\r\n\t<div class=\"wrap\">\r\n\t\t<div id=\"icon-videocoach\" class=\"icon32\">\r\n \t</div><!--icon-videocoach-->\r\n \t<h2 class=\"title\"><?php echo wpvideocoach_menu_tabs(); ?></h2>\r\n\t\t\r\n <?php if( isset($_GET['settings-updated']) ) { ?>\r\n \t\t<div id=\"message\" class=\"updated\">\r\n \t\t<p><strong><?php _e('Settings saved.') ?></strong> <a href=\"admin.php?page=wpvideocoach\">View the video page</a>.</p>\r\n \t\t</div>\r\n\t\t<?php } ?>\r\n \r\n \t<form method=\"post\" action=\"options.php\" id=\"frm1\">\r\n\t\t<?php settings_fields( 'wpvideocoach-settings-group' ); ?>\r\n \r\n\r\n <div id=\"options-container\">\r\n \t<div id=\"wpvideocoach-general-settings-tab\" class=\"tabcontent\">\r\n \t<div id=\"upper-container-left\">\r\n \t\t<div id=\"licensebox\">\r\n \t\t<h3><?php echo __('Unlock the Videos', 'wp-video-coach'); ?></h3>\r\n \t\t<label for=\"wpvideocoach_client_id\" class=\"nopointer\"><?php echo __('Enter your Codeleon username:', 'wp-video-coach'); ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"wpvideocoach_client_id\" value=\"<?php echo wpvideocoach_client_id() ?>\" />\r\n <label for=\"wpvideocoach_client_password\" class=\"nopointer\"><?php echo __('Enter your Codeleon password:', 'wp-video-coach'); ?></label>\r\n\t\t\t\t\t\t<input type=\"password\" name=\"wpvideocoach_client_password\" value=\"<?php echo wpvideocoach_client_password() ?>\" />\r\n <br />\r\n <a href=\"http://codeleon.com/member/signup/7wG8x2fG\" target=\"_blank\" class=\"license-button\"><?php echo __('Subscribe Now!', 'wp-video-coach'); ?></a>\r\n <div class=\"clear\"></div>\r\n \t<p class=\"nounderline\"><?php echo __('To display WordPress tutorial videos on all your client websites, you will need a valid subscription. If you don’t have a valid subscription yet,', 'wp-video-coach'); ?> <a href=\"http://codeleon.com/member/signup/7wG8x2fG\" target=\"_blank\"><?php echo __('create your subscription', 'wp-video-coach'); ?></a>.</p>\r\n \t\r\n \t</div><!--licensebox-->\r\n </div><!--upper-container-left-->\r\n <div id=\"upper-container-right\">\r\n \t<div id=\"supportbox\">\r\n \t\t<h3><?php echo __('Support', 'wp-video-coach'); ?></h3>\r\n <ul>\r\n \t<li><a href=\"http://www.codeleon.com/contact\" target=\"_blank\" class=\"contactus\"><?php echo __('Contact us', 'wp-video-coach'); ?></a></li>\r\n <li><a onclick=\"TINY.box.show({iframe:'http://www.codeleon.com/embeds/901',boxid:'frameless',width:800,height:450,fixed:true,maskopacity:10})\" class=\"how-to-name\"><?php echo __('How to set up WP Video Coach video', 'wp-video-coach'); ?></a></li>\r\n </ul>\r\n <ul>\r\n \t<li><a href=\"http://wordpress.org/plugins/wp-video-coach\" target=\"_blank\"><?php echo __('Rate our plugin on WordPress.org', 'wp-video-coach'); ?></a></li>\r\n <li><a href=\"http://www.codeleon.com/send/surveys.php?id=3\" target=\"_blank\"><?php echo __('Leave us a testimonial', 'wp-video-coach'); ?></a></li>\r\n <li><a href=\"http://www.codeleon.com/send/surveys.php?id=4\" target=\"_blank\"><?php echo __('Help us improve', 'wp-video-coach'); ?></a></li>\r\n <li><a href=\"http://www.codeleon.com/affiliates\" target=\"_blank\"><?php echo __('Make money promoting us', 'wp-video-coach'); ?></a></li>\r\n </ul>\r\n <ul>\r\n <li><a href=\"http://twitter.com/codeleoncom\" target=\"_blank\"><?php echo __('Follow us on Twitter', 'wp-video-coach'); ?></a></li>\r\n <li><a href=\"http://www.facebook.com/codeleoncom\" target=\"_blank\"><?php echo __('Follow us on Facebook', 'wp-video-coach'); ?></a></li>\r\n <li><a href=\"http://plus.google.com/116000141335169770939\" target=\"_blank\"><?php echo __('Follow us on Google+', 'wp-video-coach'); ?></a></li>\r\n </ul>\r\n \t</div><!--supportbox-->\r\n </div><!--upper-container-right-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--wpvideocoach-general-settings-tab-->\r\n <div id=\"wpvideocoach-customization-settings-tab\" class=\"tabcontent\">\r\n \r\n \t\t<div class=\"optiongroup\">\r\n <h3><?php echo __('Branding', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('The following fields allow you to rename our plugin and add your own icons, in order to reinforce your own branding and offer your clients an even better experience.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_custom_menu_title\" class=\"nopointer\"><?php echo __('Plugin menu title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" name=\"wpvideocoach_custom_menu_title\" value=\"<?php echo wpvideocoach_custom_menu_title(); ?>\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Keep it short, e.g. \"Video Tutorial\"', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_custom_title\" class=\"nopointer\"><?php echo __('Plugin title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" name=\"wpvideocoach_custom_title\" value=\"<?php echo wpvideocoach_custom_title(); ?>\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Title as it appears on the videos page', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n \t<div class=\"preview-icon\"><img src=\"<?php echo wpvideocoach_custom_menu_icon(); ?>\" height=\"16px\" width=\"16px\" /></div><!--preview-icon-->\r\n <div class=\"iconlabel\"><label for=\"wpvideocoach_custom_menu_icon\" class=\"nopointer\"><?php echo __('Plugin menu icon', 'wp-video-coach'); ?></label></div><!--iconlabel-->\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" name=\"wpvideocoach_custom_menu_icon\" value=\"<?php echo wpvideocoach_custom_menu_icon(); ?>\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('URL for plugin menu icon', 'wp-video-coach'); ?> <span class=\"highlight\">16 x 16 px</span></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n\r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Language', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('Select a language for the videos.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_language\" class=\"nopointer\"><?php echo __('Video language', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t<!-- Clears language-based text fields on language change-->\r\n\t\t\t\t\t\t\t\tfunction clearFields() {\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('introduction1').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('introduction2').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat0').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat1').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat2').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat3').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat4').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat5').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat6').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat7').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat8').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat9').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat10').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('cat11').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('toolbar1').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('slider1').value = \"\";\r\n\t\t\t\t\t\t\t\t\tdocument.getElementById('slider2').value = \"\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</script>\r\n <select name=\"wpvideocoach_language\" onchange='clearFields()'>\r\n\t\t\t\t\t\t\t<option value=\"english\" <?php if (get_option('wpvideocoach_language')== 'english') echo 'selected=\"selected\"'; ?>><?php echo __('English', 'wp-video-coach'); ?></option>\r\n\t\t\t\t\t\t</select>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Introduction', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('You can completely hide the introduction or personalize it for your clients, welcoming them to the video tutorial page.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction\" class=\"nopointer\"><?php echo __('Introduction box', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input name=\"wpvideocoach_introduction\" id=\"introduction-show\" type=\"radio\" value=\"0\" onclick=\"document.getElementById('introduction1').disabled=false;document.getElementById('introduction2').disabled=false;\" class=\"radiobutton\" <?php echo wpvideocoach_show_introduction(); ?> /> <label for=\"introduction-show\" class=\"radiobutton-label\">Show</label>\r\n <input name=\"wpvideocoach_introduction\" id=\"introduction-hide\" type=\"radio\" value=\"1\" onclick=\"document.getElementById('introduction1').disabled=true;document.getElementById('introduction2').disabled=true;\" class=\"radiobutton\" <?php echo wpvideocoach_hide_introduction(); ?> /> <label for=\"introduction-hide\" class=\"radiobutton-label\">Hide</label>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction_box_background_color\" class=\"nopointer\"><?php echo __('Introduction box background color', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"introduction5\" name=\"wpvideocoach_introduction_box_background_color\" value=\"<?php echo wpvideocoach_get_introduction_box_background_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#FFFFFF\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction_title\" class=\"nopointer\"><?php echo __('Introduction title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"introduction1\" name=\"wpvideocoach_introduction_title\" value=\"<?php echo wpvideocoach_introduction_title(); ?>\" <?php echo wpvideocoach_hide_introduction_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Say something like \"Welcome Steven!\"', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction_title_color\" class=\"nopointer\"><?php echo __('Introduction title color', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"introduction3\" name=\"wpvideocoach_introduction_title_color\" value=\"<?php echo wpvideocoach_get_introduction_title_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#000\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction_text\" class=\"nopointer\"><?php echo __('Introduction text', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <textarea id=\"introduction2\" name=\"wpvideocoach_introduction_text\" <?php echo wpvideocoach_hide_introduction_disable_fields(); ?>><?php echo wpvideocoach_introduction_text(); ?></textarea>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Detailed introduction for your client', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_introduction_text_color\" class=\"nopointer\"><?php echo __('Introduction text color', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"introduction5\" name=\"wpvideocoach_introduction_text_color\" value=\"<?php echo wpvideocoach_get_introduction_text_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#000\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Video Link', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('You can change the colors of the video link.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_link_color\" class=\"nopointer\"><?php echo __('Video link color', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input type=\"text\" id=\"wpvideocoach_video_link_color\" name=\"wpvideocoach_video_link_color\" value=\"<?php echo wpvideocoach_get_video_link_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#21759B\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \t\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_link_hover_color\" class=\"nopointer\"><?php echo __('Video link color on hover', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"wpvideocoach_video_link_hover_color\" name=\"wpvideocoach_video_link_hover_color\" value=\"<?php echo wpvideocoach_get_video_link_hover_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#0099D5\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Toolbar Link', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('By default, the plugin will add a link to the admin toolbar, allowing your clients to easily reach the video page.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_toolbar_link\" class=\"nopointer\"><?php echo __('Toolbar link', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input name=\"wpvideocoach_toolbar_link\" id=\"toolbar-show\" type=\"radio\" value=\"0\" onclick=\"document.getElementById('toolbar1').disabled=false;\" class=\"radiobutton\" <?php echo wpvideocoach_show_toolbar_link(); ?> /> <label for=\"toolbar-show\" class=\"radiobutton-label\">Show</label>\r\n <input name=\"wpvideocoach_toolbar_link\" id=\"toolbar-hide\" type=\"radio\" value=\"1\" onclick=\"document.getElementById('toolbar1').disabled=true;\" class=\"radiobutton\" <?php echo wpvideocoach_hide_toolbar_link(); ?> /> <label for=\"toolbar-hide\" class=\"radiobutton-label\">Hide</label>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_toolbar_link_title\" class=\"nopointer\"><?php echo __('Toolbar link title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"toolbar1\" name=\"wpvideocoach_toolbar_link_title\" value=\"<?php echo wpvideocoach_toolbar_link_title(); ?>\" <?php echo wpvideocoach_hide_toolbar_disable_field(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: How to Videos', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Help Tabs', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('By default, the plugin will replace WordPress contextual help with an overview of relevant videos. You can also add your own support URL to be shown in the sidebar.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_help_tabs\" class=\"nopointer\"><?php echo __('Help tabs', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input name=\"wpvideocoach_help_tabs\" id=\"help-tabs-show\" type=\"radio\" value=\"0\" onclick=\"document.getElementById('support1').disabled=false;document.getElementById('support2').disabled=false;\" class=\"radiobutton\" <?php echo wpvideocoach_show_help_tabs(); ?> /> <label for=\"help-tabs-show\" class=\"radiobutton-label\">Show</label>\r\n <input name=\"wpvideocoach_help_tabs\" id=\"help-tabs-hide\" type=\"radio\" value=\"1\" onclick=\"document.getElementById('support1').disabled=true;document.getElementById('support2').disabled=true;\" class=\"radiobutton\" <?php echo wpvideocoach_hide_help_tabs(); ?> /> <label for=\"help-tabs-hide\" class=\"radiobutton-label\">Hide</label>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \t\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_help_tabs_title\" class=\"nopointer\"><?php echo __('Your support page title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"support1\" name=\"wpvideocoach_help_tabs_title\" value=\"<?php echo wpvideocoach_custom_support_title(); ?>\" <?php echo wpvideocoach_hide_support_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_help_tabs_url\" class=\"nopointer\"><?php echo __('Your support page URL', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"support2\" name=\"wpvideocoach_help_tabs_url\" value=\"<?php echo wpvideocoach_custom_support_url(); ?>\" <?php echo wpvideocoach_hide_support_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Dashboard Slider', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('By default, the plugin will create a dashboard slider, allowing your clients to watch videos straight from the dashboard.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_dashboard_slider\" class=\"nopointer\"><?php echo __('Dashboard slider', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input name=\"wpvideocoach_dashboard_slider\" id=\"dashboard-slider-show\" type=\"radio\" value=\"0\" onclick=\"document.getElementById('slider1').disabled=false;document.getElementById('slider2').disabled=false;\" class=\"radiobutton\" <?php echo wpvideocoach_show_dashboard_slider(); ?> /> <label for=\"dashboard-slider-show\" class=\"radiobutton-label\">Show</label>\r\n <input name=\"wpvideocoach_dashboard_slider\" id=\"dashboard-slider-hide\" type=\"radio\" value=\"1\" onclick=\"document.getElementById('slider1').disabled=true;document.getElementById('slider2').disabled=true;\" class=\"radiobutton\" <?php echo wpvideocoach_hide_dashboard_slider(); ?> /> <label for=\"dashboard-slider-hide\" class=\"radiobutton-label\">Hide</label>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_dashboard_slider_title\" class=\"nopointer\"><?php echo __('Dashboard slider title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"slider1\" name=\"wpvideocoach_dashboard_slider_title\" value=\"<?php echo wpvideocoach_dashboard_slider_title(); ?>\" <?php echo wpvideocoach_hide_dashboard_slider_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: How to Videos', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_dashboard_slider_introduction\" class=\"nopointer\"><?php echo __('Dashboard slider introduction', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <textarea id=\"slider2\" name=\"wpvideocoach_dashboard_slider_introduction\" <?php echo wpvideocoach_hide_dashboard_slider_disable_fields(); ?>><?php echo wpvideocoach_dashboard_slider_introduction(); ?></textarea>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Detailed introduction for your client', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n <div class=\"optiongroup\">\r\n <h3><?php echo __('Advanced', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('How about adding your own content to the video tutorial page? I.e. you can add links to your own website, provide your clients with more information about your services or even promote other products. Simply enter your HTML in the Additional HTML box and it will appear right below the videos. If you are a designer guru, feel free to enter custom CSS to override the plugin CSS values.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_additional_html\" class=\"nopointer\"><?php echo __('Additional HTML', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <textarea name=\"wpvideocoach_additional_html\"><?php echo wpvideocoach_additional_html(); ?></textarea>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_custom_css\" class=\"nopointer\"><?php echo __('Custom CSS', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <textarea name=\"wpvideocoach_custom_css\"><?php echo wpvideocoach_custom_css(); ?></textarea>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n </div><!--optiongroup-->\r\n \r\n \t</div><!--wpvideocoach-customization-settings-tab-->\r\n \r\n <div id=\"wpvideocoach-categories-settings-tab\" class=\"tabcontent\">\r\n \t<div class=\"optiongroup\">\r\n <h3><?php echo __('Video Categories', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('You can completely hide all category titles or rename them if you feel it better suits your clients.', 'wp-video-coach'); ?></p>\r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_categories\"><?php echo __('Category titles', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n \t<input name=\"wpvideocoach_categories\" id=\"categories-show\" type=\"radio\" value=\"0\" onclick=\"<?php echo wpvideocoach_categories_enable_fields(); ?>\" class=\"radiobutton\" <?php echo wpvideocoach_show_categories(); ?> /> <label for=\"categories-show\" class=\"radiobutton-label\">Show</label>\r\n <input name=\"wpvideocoach_categories\" id=\"categories-hide\" type=\"radio\" value=\"1\" onclick=\"<?php echo wpvideocoach_categories_disable_fields(); ?>\" class=\"radiobutton\" <?php echo wpvideocoach_hide_categories(); ?> /> <label for=\"categories-hide\" class=\"radiobutton-label\">Hide</label>\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_categories_color\" class=\"nopointer\"><?php echo __('Category titles color', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat_color\" name=\"wpvideocoach_categories_color\" value=\"<?php echo wpvideocoach_get_categories_color(); ?>\" class=\"wpvideocoach-color\" data-default-color=\"#000\" />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n \r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat1\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">01</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat1\" name=\"wpvideocoach_video_cat1\" value=\"<?php echo wpvideocoach_video_category_one(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Getting Started', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat2\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">02</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat2\" name=\"wpvideocoach_video_cat2\" value=\"<?php echo wpvideocoach_video_category_two(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Publishing Content', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat3\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">03</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat3\" name=\"wpvideocoach_video_cat3\" value=\"<?php echo wpvideocoach_video_category_three(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Organizing Content', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat4\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">04</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat4\" name=\"wpvideocoach_video_cat4\" value=\"<?php echo wpvideocoach_video_category_four(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Organizing Discussion', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat5\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">05</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat5\" name=\"wpvideocoach_video_cat5\" value=\"<?php echo wpvideocoach_video_category_five(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Changing Appearance', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat6\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">06</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat6\" name=\"wpvideocoach_video_cat6\" value=\"<?php echo wpvideocoach_video_category_six(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: User Management', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat7\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">07</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat7\" name=\"wpvideocoach_video_cat7\" value=\"<?php echo wpvideocoach_video_category_seven(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Website Management', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat8\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">08</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat8\" name=\"wpvideocoach_video_cat8\" value=\"<?php echo wpvideocoach_video_category_eight(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Quick Tips &amp; Tricks', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat9\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">09</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat9\" name=\"wpvideocoach_video_cat9\" value=\"<?php echo wpvideocoach_video_category_nine(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: WordPress SEO', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat10\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">10</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat10\" name=\"wpvideocoach_video_cat10\" value=\"<?php echo wpvideocoach_video_category_ten(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: NextGEN Gallery', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat11\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">11</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat11\" name=\"wpvideocoach_video_cat11\" value=\"<?php echo wpvideocoach_video_category_eleven(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: All in One SEO Pack', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat12\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">12</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat12\" name=\"wpvideocoach_video_cat12\" value=\"<?php echo wpvideocoach_video_category_twelve(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Google XML Sitemaps', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_video_cat13\" class=\"nopointer\"><?php echo __('Rename category', 'wp-video-coach'); ?> <span class=\"highlight-custom\">13</span></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat13\" name=\"wpvideocoach_video_cat13\" value=\"<?php echo wpvideocoach_video_category_thirteen(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: Contact Form 7', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n \r\n <div class=\"optionleft\">\r\n <label for=\"wpvideocoach_custom_videos_title\" class=\"nopointer\"><?php echo __('Custom videos title', 'wp-video-coach'); ?></label>\r\n </div><!--optionleft-->\r\n <div class=\"optionmiddle\">\r\n <input type=\"text\" id=\"cat0\" name=\"wpvideocoach_custom_videos_title\" value=\"<?php echo wpvideocoach_custom_video_category(); ?>\" <?php echo wpvideocoach_hide_categories_disable_fields(); ?> />\r\n </div><!--optionmiddle-->\r\n <div class=\"optionlast\">\r\n <p><?php echo __('Default: More Videos', 'wp-video-coach'); ?></p>\r\n </div><!--optionlast-->\r\n <div class=\"clear\"></div>\r\n </div><!--optiongroup-->\r\n </div><!--wpvideocoach-categories-settings-tab-->\r\n \r\n <div id=\"wpvideocoach-videos-settings-tab\" class=\"tabcontent\">\r\n \t<div class=\"optiongroup\">\r\n <h3><?php echo __('Videos', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('Depending on the way you have configured their installation, your clients may not use all the functionalities within WordPress. If this is the case, you can easily turn off individual videos here.', 'wp-video-coach'); ?></p>\r\n\r\n <div class=\"optionfirst\">\r\n <input id=\"wpvideocoach_hide_cat1\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_one() ?>\" <?php echo wpvideocoach_checked_one() ?> />\r\n <label for=\"wpvideocoach_hide_cat1\"><strong>Disable \"Getting Started\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_one() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat2\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_two() ?>\" <?php echo wpvideocoach_checked_two() ?> />\r\n <label for=\"wpvideocoach_hide_cat2\"><strong>Disable \"Publishing Content\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_two() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat3\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_three() ?>\" <?php echo wpvideocoach_checked_three() ?> />\r\n <label for=\"wpvideocoach_hide_cat3\"><strong>Disable \"Organizing Content\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_three() ?>\r\n </div><!--optionfirst-->\r\n <div class=\"optionsecond\">\r\n <input id=\"wpvideocoach_hide_cat4\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_four() ?>\" <?php echo wpvideocoach_checked_four() ?> />\r\n <label for=\"wpvideocoach_hide_cat4\"><strong>Disable \"Organizing Discussion\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_four() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat5\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_five() ?>\" <?php echo wpvideocoach_checked_five() ?> />\r\n <label for=\"wpvideocoach_hide_cat5\"><strong>Disable \"Changing Appearance\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_five() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat6\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_six() ?>\" <?php echo wpvideocoach_checked_six() ?> />\r\n <label for=\"wpvideocoach_hide_cat6\"><strong>Disable \"User Management\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_six() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat7\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_seven() ?>\" <?php echo wpvideocoach_checked_seven() ?> />\r\n <label for=\"wpvideocoach_hide_cat7\"><strong>Disable \"Website Management\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_seven() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat8\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_eight() ?>\" <?php echo wpvideocoach_checked_eight() ?> />\r\n <label for=\"wpvideocoach_hide_cat8\"><strong>Disable \"Quick Tips &amp; Tricks\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_eight() ?>\r\n </div><!--optionsecond-->\r\n <div class=\"optionthird\">\r\n <input id=\"wpvideocoach_hide_cat9\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_nine() ?>\" <?php echo wpvideocoach_checked_nine() ?> />\r\n <label for=\"wpvideocoach_hide_cat9\"><strong>Disable \"WordPress SEO\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_nine() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat10\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_ten() ?>\" <?php echo wpvideocoach_checked_ten() ?> />\r\n <label for=\"wpvideocoach_hide_cat10\"><strong>Disable \"NextGEN Gallery\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_ten() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat11\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_eleven() ?>\" <?php echo wpvideocoach_checked_eleven() ?> />\r\n <label for=\"wpvideocoach_hide_cat11\"><strong>Disable \"All in One SEO\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_eleven() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat12\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_twelve() ?>\" <?php echo wpvideocoach_checked_twelve() ?> />\r\n <label for=\"wpvideocoach_hide_cat12\"><strong>Disable \"Google XML Sitemaps\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_twelve() ?>\r\n \r\n <br />\r\n <input id=\"wpvideocoach_hide_cat13\" type=\"checkbox\" value=\"1\" onclick=\"<?php echo wpvideocoach_display_check_thirteen() ?>\" <?php echo wpvideocoach_checked_thirteen() ?> />\r\n <label for=\"wpvideocoach_hide_cat13\"><strong>Disable \"Contact Form 7\" category</strong></label>\r\n <div class=\"clear\"></div>\r\n <?php echo wpvideocoach_hide_videos_thirteen() ?>\r\n </div><!--optionthird-->\r\n <div class=\"clear\"></div>\r\n </div><!--optiongroup-->\r\n \r\n </div><!--wpvideocoach-videos-settings-tab-->\r\n \r\n <div id=\"wpvideocoach-thumbnails-settings-tab\" class=\"tabcontent\">\r\n \t<div class=\"optiongroup\">\r\n <h3><?php echo __('Video Thumbnails', 'wp-video-coach'); ?></h3>\r\n <p class=\"nounderline\"><?php echo __('You can easily change the video thumbnails in order to match icon colors to your own icon.', 'wp-video-coach'); ?>\r\n <!--Icons8/VisualFarm allowed the use of video icons with link on Settings Page: @https://getsatisfaction.com/icons8/topics/use_on_wordpress_plugin-->\r\n <a href=\"http://www.icons8.com\" target=\"_blank\"><?php echo __('Video icons by Icon8.com', 'wp-video-coach'); ?></a>.</p>\r\n \r\n <div id=\"thumbs-en\">\r\n <div class=\"thumb1\">\r\n <div class=\"radiocontainer\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumb0\" value=\"0\" <?php if (get_option('wpvideocoach_thumbnails')== '') echo 'checked=\"checked\"';if (get_option('wpvideocoach_thumbnails')== '0') echo 'checked=\"checked\"'; ?> />\r\n </div><!--radiocontainer-->\r\n <label for=\"thumb0\"><img src=\"<?php echo plugins_url(); ?>/wp-video-coach/thumbnails/0/preview.jpg\" /></label>\r\n <p><?php echo __('White', 'wp-video-coach'); ?></p>\r\n </div><!--thumb1-->\r\n <div class=\"thumb2\">\r\n <div class=\"radiocontainer\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumb1\" value=\"1\" <?php if (get_option('wpvideocoach_thumbnails')== '1') echo 'checked=\"checked\"'; ?> />\r\n </div><!--radiocontainer-->\r\n <label for=\"thumb1\"><img src=\"<?php echo plugins_url(); ?>/wp-video-coach/thumbnails/1/preview.jpg\" /></label>\r\n <p><?php echo __('Blue', 'wp-video-coach'); ?></p>\r\n </div><!--thumb2-->\r\n <div class=\"thumb3\">\r\n <div class=\"radiocontainer\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumb2\" value=\"2\" <?php if (get_option('wpvideocoach_thumbnails')== '2') echo 'checked=\"checked\"'; ?> />\r\n </div><!--radiocontainer-->\r\n <label for=\"thumb2\"><img src=\"<?php echo plugins_url(); ?>/wp-video-coach/thumbnails/2/preview.jpg\" /></label>\r\n <p><?php echo __('Red', 'wp-video-coach'); ?></p>\r\n </div><!--thumb3-->\r\n <div class=\"thumb4\">\r\n <div class=\"radiocontainer\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumb3\" value=\"3\" <?php if (get_option('wpvideocoach_thumbnails')== '3') echo 'checked=\"checked\"'; ?> />\r\n </div><!--radiocontainer-->\r\n <label for=\"thumb3\"><img src=\"<?php echo plugins_url(); ?>/wp-video-coach/thumbnails/3/preview.jpg\" /></label>\r\n <p><?php echo __('Green', 'wp-video-coach'); ?></p>\r\n </div><!--thumb4-->\r\n <div class=\"thumb5\">\r\n <div class=\"radiocontainer\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumb4\" value=\"4\" <?php if (get_option('wpvideocoach_thumbnails')== '4') echo 'checked=\"checked\"'; ?> />\r\n </div><!--radiocontainer-->\r\n <label for=\"thumb4\"><img src=\"<?php echo plugins_url(); ?>/wp-video-coach/thumbnails/4/preview.jpg\" /></label>\r\n <p><?php echo __('Yellow', 'wp-video-coach'); ?></p>\r\n </div><!--thumb5-->\r\n <div class=\"clear\"></div>\r\n </div><!--thumbs-en-->\r\n \r\n <h3><?php echo __('Custom Thumbnails', 'wp-video-coach'); ?></h3>\r\n \r\n <div class=\"custom-thumb-left\">\r\n <input name=\"wpvideocoach_thumbnails\" type=\"radio\" id=\"thumbcustom\" value=\"custom\" <?php if (get_option('wpvideocoach_thumbnails')== 'custom') echo 'checked=\"checked\"'; ?> />\r\n </div><!--custom-thumb-left-->\r\n <div class=\"custom-thumb-middle\">\r\n <label for=\"thumbcustom\"><?php echo __('Use custom thumbnails', 'wp-video-coach'); ?></label>\r\n </div><!--custom-thumb-middle-->\r\n <div class=\"custom-thumb-right\">\r\n <p><?php echo __('You can even create your own video thumbnails to strengthen your brand identity. Before selecting this option, create video thumbnails for all videos. Make sure that the width of the images is', 'wp-video-coach'); ?> <span class=\"highlight\">215 px</span>.</p>\r\n <p><a onclick=\"wpvideocoach_show_video_titles()\" class=\"how-to-name\"><?php echo __('How to name the images', 'wp-video-coach'); ?></a></p>\r\n <script type=\"text/javascript\">\r\n function wpvideocoach_show_video_titles() {\r\n // Get the DOM reference\r\n var contentId = document.getElementById(\"how-to-name-images\");\r\n // Toggle \r\n contentId.style.display == \"block\" ? contentId.style.display = \"none\" : \r\n contentId.style.display = \"block\"; \r\n }\r\n </script>\r\n <div id=\"how-to-name-images\" style=\"display:none;\">\r\n <div id=\"how-to-name-images-left\">\r\n <ul>\r\n <li><span class=\"highlight\">001.jpg</span> <?php echo __('A Quick Introduction', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">002.jpg</span> <?php echo __('How to Use the Admin Toolbar', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">003.jpg</span> <?php echo __('How to Customize the Work Area', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">004.jpg</span> <?php echo __('Posts Versus Pages', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">005.jpg</span> <?php echo __('How to Add a New Post', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">006.jpg</span> <?php echo __('How to Edit or Delete a Post', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">007.jpg</span> <?php echo __('How to Add a New Page', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">008.jpg</span> <?php echo __('How to Edit or Delete a Page', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">009.jpg</span> <?php echo __('How to Format Text', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">010.jpg</span> <?php echo __('How to Publish in Text Editor', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">011.jpg</span> <?php echo __('How to Use the More Tag', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">012.jpg</span> <?php echo __('How to Use Excerpts', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">013.jpg</span> <?php echo __('How to Use QuickPress', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">014.jpg</span> <?php echo __('How to Schedule Posts and Pages', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">015.jpg</span> <?php echo __('How to Add Images', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">016.jpg</span> <?php echo __('How to Edit Images', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">017.jpg</span> <?php echo __('How to Use Featured Images', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">018.jpg</span> <?php echo __('How to Add Videos', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">019.jpg</span> <?php echo __('How to Add Media Files', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">020.jpg</span> <?php echo __('How to Undo Changes', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">021.jpg</span> <?php echo __('How to Restore Autosaves', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">022.jpg</span> <?php echo __('How to Publish via Email', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">023.jpg</span> <?php echo __('How to Use PressThis', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">024.jpg</span> <?php echo __('How to Manage Categories', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">025.jpg</span> <?php echo __('How to Manage Tags', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">026.jpg</span> <?php echo __('How to Set Up a Homepage', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">027.jpg</span> <?php echo __('How to Set Up Permalinks', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">028.jpg</span> <?php echo __('How to Manage Comments', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">029.jpg</span> <?php echo __('How to Disable Comments', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">030.jpg</span> <?php echo __('How to Prevent Comment Spam', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">031.jpg</span> <?php echo __('How to Change Comment Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">032.jpg</span> <?php echo __('How to Change the Theme', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">033.jpg</span> <?php echo __('How to Use Widgets', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">034.jpg</span> <?php echo __('How to Create a Custom Menu', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">035.jpg</span> <?php echo __('How to Use Plugins', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">036.jpg</span> <?php echo __('Understanding User Permissions', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">037.jpg</span> <?php echo __('How to Create a User', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">038.jpg</span> <?php echo __('How to Edit or Delete a User', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">039.jpg</span> <?php echo __('How to Edit Your Profile', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">040.jpg</span> <?php echo __('How to Create an Avatar', 'wp-video-coach'); ?></li>\r\n </ul>\r\n </div><!--how-to-name-images-left-->\r\n <div id=\"how-to-name-images-right\">\r\n <ul>\r\n <li><span class=\"highlight\">041.jpg</span> <?php echo __('How to Change Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">042.jpg</span> <?php echo __('How to Import Data', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">043.jpg</span> <?php echo __('How to Export Data', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">044.jpg</span> <?php echo __('How to Update WordPress', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">045.jpg</span> <?php echo __('How to Update Themes and Plugins', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">046.jpg</span> <?php echo __('How to Add a Hyperlink', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">047.jpg</span> <?php echo __('How to Upload a Clickable PDF', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">048.jpg</span> <?php echo __('How to Paste Content from MS Word', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">049.jpg</span> <?php echo __('How to Edit the URL', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">050.jpg</span> <?php echo __('How to Make a Post Sticky', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">101.jpg</span> <?php echo __('How to Install WordPress SEO', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">102.jpg</span> <?php echo __('How to Change SEO Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">103.jpg</span> <?php echo __('How to Manage SEO Options', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">104.jpg</span> <?php echo __('How to Change Social Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">105.jpg</span> <?php echo __('How to Create an XML Sitemap', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">106.jpg</span> <?php echo __('How to Change Permalink Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">107.jpg</span> <?php echo __('How to Enable Breadcrumbs', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">108.jpg</span> <?php echo __('How to Change RSS Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">109.jpg</span> <?php echo __('How to Import and Export Data', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">121.jpg</span> <?php echo __('How to Install NextGEN Gallery', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">122.jpg</span> <?php echo __('How to Create a Gallery', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">123.jpg</span> <?php echo __('How to Publish a Gallery', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">124.jpg</span> <?php echo __('How to Create an Album', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">125.jpg</span> <?php echo __('How to Manage Image Tags', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">126.jpg</span> <?php echo __('How to Change Gallery Settings', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">131.jpg</span> <?php echo __('How to Install All in One SEO Pack', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">132.jpg</span> <?php echo __('How to Manage SEO Settings', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">133.jpg</span> <?php echo __('How to Change SEO Options', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">134.jpg</span> <?php echo __('How to Build an XML Sitemap', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">141.jpg</span> <?php echo __('How to Install Google XML Sitemaps', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">142.jpg</span> <?php echo __('How to Generate an XML Sitemap', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">151.jpg</span> <?php echo __('How to Install Contact Form 7', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">152.jpg</span> <?php echo __('How to Create a New Form', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">153.jpg</span> <?php echo __('How to Edit or Delete a Form', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <ul>\r\n <li><span class=\"highlight\">901.jpg</span> <?php echo __('How to Set Up WP Video Coach*', 'wp-video-coach'); ?></li>\r\n <li><span class=\"highlight\">902.jpg</span> <?php echo __('How to Unlock the Videos*', 'wp-video-coach'); ?></li>\r\n </ul>\r\n <p>* These videos appear in the Help tabs of WP Video Coach pages only.</p>\r\n </div><!--how-to-name-images-right-->\r\n <div class=\"clear\"></div>\r\n </div><!--how-to-name-images-->\r\n <p><?php echo __('Upload your images to', 'wp-video-coach'); ?> <span class=\"highlight\">wp-content/plugins/wp-video-coach/thumbnails/custom/</span> <?php echo __('folder, then select this option.', 'wp-video-coach'); ?></p>\r\n </div><!--custom-thumb-right-->\r\n <div class=\"clear\"></div>\r\n </div><!--optiongroup-->\r\n </div><!--wpvideocoach-thumbnails-settings-tab-->\r\n \r\n <div id=\"wpvideocoach-custom-videos-settings-tab\" class=\"tabcontent\">\r\n \t<div class=\"optiongroup\">\r\n <h3><?php echo __('Custom Videos', 'wp-video-coach'); ?></h3>\r\n <p><?php echo __('Add your own videos to the video tutorial page. Simply enter a title and URL for each video and your custom videos will appear alongside our videos.', 'wp-video-coach'); ?></p>\r\n <?php echo wpvideocoach_show_custom_videos_fields(); ?>\r\n \r\n <div id=\"more-custom-videos\" style=\"display:none;\">\r\n \t<?php echo wpvideocoach_show_more_custom_videos_fields(); ?>\r\n </div><!--more-custom-videos-->\r\n <div id=\"add-custom-button\">\r\n <input type=\"button\" class=\"add-custom-videos\" value=\"<?php echo __('Show More', 'wp-video-coach'); ?>\" onclick=\"wpvideocoach_show_more_custom_videos()\" />\r\n <script type=\"text/javascript\">\r\n function wpvideocoach_show_more_custom_videos() {\r\n document.getElementById('more-custom-videos').style.display = \"block\";\r\n }\r\n </script>\r\n </div><!--add-custom-button-->\r\n </div><!--optiongroup-->\r\n </div><!--wpvideocoach-custom-videos-settings-tab-->\r\n \r\n <script type=\"text/javascript\">\r\n\t\t\t\t\t\tvar wpthumbs=new ddtabcontent(\"wpvideocoach-menu-tabs\") //enter ID of Tab Container\r\n\t\t\t\t\t\twpthumbs.setpersist(true) //toogle persistence of the tabs' state\r\n\t\t\t\t\t\twpthumbs.setselectedClassTarget(\"link\") //\"link\" or \"linkparent\"\r\n\t\t\t\t\t\twpthumbs.init()\r\n\t\t\t\t</script>\r\n \r\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\r\n \r\n </div><!--options-container-->\r\n \r\n\r\n<?php }", "title": "" }, { "docid": "0da7f93ede6a8c365ca0946c6c841d73", "score": "0.4963217", "text": "public function acceptCookieNotice()\n {\n $session = $this->getSession();\n $page = $session->getPage();\n $cookie_notice_button = $page->find('css', '#' . $this->cookie_notice_css_id . ' .wp-gdpr-cookie-notice-button');\n if( null === $cookie_notice_button ) {\n throw new ExpectationException(\n \"Failed to accept the cookie notice. The cookie notice acceptance button was not found.\",\n $session->getDriver()\n );\n }\n $cookie_notice_button->press();\n // Wait for the cookie notice element to be hidden, giving up after 5 seconds.\n $session->wait(\n 5000,\n \"null !== document.getElementById('\" . $this->cookie_notice_css_id . \"') && true === document.getElementById('\" . $this->cookie_notice_css_id . \"').hidden\"\n );\n }", "title": "" }, { "docid": "f7b4db4edcc31ff017299b1d5072fca3", "score": "0.4962323", "text": "public function analyticsSettingsMarkup()\n {\n // Bail if Google_Client is not loaded\n if (!class_exists('\\\\Google_Client')) {\n echo '<div class=\"wrap\"><div class=\"notice error is-dismissible\"><p>Install library <strong>Google APIs Client Library for PHP</strong> to continue.</p></div></div>';\n return;\n }\n\n // Update options\n if (isset($_REQUEST['track_property']) && current_user_can('manage_options') && wp_verify_nonce($_REQUEST['save-tracked-property'], 'save')) {\n if (isset($_REQUEST['reset_settings'])) {\n // Delete options from db\n delete_option('options_google_analytics_ua');\n delete_option('options_google_analytics_view');\n delete_option('options_google_analytics_acc_key');\n } else {\n // Update options\n $post = json_decode(stripslashes($_POST['track_property']), true);\n update_option('options_google_analytics_ua', (!empty($post['id']) ? $post['id'] : ''));\n update_option('options_google_analytics_view', (!empty($post['view']) ? $post['view'] : ''));\n }\n }\n\n $notice = '<div class=\"notice is-dismissible\" style=\"display:none;\"></div>';\n $service_key = get_option('options_google_analytics_acc_key');\n $tracked_property = get_option('options_google_analytics_ua');\n\n $properties = array();\n if ($service_key) {\n // Decode JSON-key as array\n $service_key = json_decode($service_key, true);\n $account_email = (!empty($service_key['client_email'])) ? $service_key['client_email'] : '';\n\n try {\n // Creates a new authenticated Google client\n $client = new \\Google_Client();\n $client->setAuthConfig($service_key);\n // Set the scopes required for the API\n $client->addScope(\\Google_Service_Analytics::ANALYTICS_READONLY);\n $client->setSubject($account_email);\n $analytics_service = new \\Google_Service_Analytics($client);\n\n $web_properties = $analytics_service->management_webproperties->listManagementWebproperties('~all');\n if (!empty($web_properties->items)) {\n foreach ($web_properties->items as $item) {\n $properties[] = array(\n 'id' => $item->id,\n 'name' => $item->name,\n 'view' => $item->defaultProfileId\n );\n }\n }\n } catch (\\Google_Service_Exception $e) {\n $service_key = '';\n $notice = '<div class=\"notice error is-dismissible\"><p>' . __('Invalid Service Account', 'google-analytics') . '</p></div>';\n delete_option('options_google_analytics_acc_key');\n }\n }\n\n include GOOGLEANALYTICS_TEMPLATE_PATH . 'settings.php';\n }", "title": "" }, { "docid": "b4317e1019c7d9ecef01fed4d5dc278c", "score": "0.49572068", "text": "function digit_apisettings()\n{\n $app = get_option('digit_api');\n $appid = \"\";\n $appsecret = \"\";\n if ($app !== false) {\n $appid = $app['appid'];\n $appsecret = $app['appsecret'];\n }\n ?>\n\n <h1><?php _e(\"API Settings\", \"digits\"); ?></h1>\n <p class=\"lead\"></p>\n\n <form method=\"post\">\n <?php\n digits_api_settings();\n ?>\n <p class=\"digits-setup-action step\">\n <Button type=\"submit\" class=\"button-primary button button-large button-next\"><?php _e(\"Continue\", \"digits\"); ?></Button>\n <a href=\"<?php echo admin_url('index.php?page=digits-setup&step=documentation'); ?>\"\n class=\"button\"><?php _e(\"Back\", \"digits\"); ?></a>\n </p>\n </form>\n\n <?php\n}", "title": "" }, { "docid": "006d37984579cca50847681c7efc2e03", "score": "0.49527442", "text": "function check_channel_code_with_js() {\n ?>\n <div class=\"channel-code\" style=\"display:none;\"><?php echo $_COOKIE['apchannel'] ?></div>\n <?php\n}", "title": "" }, { "docid": "73e9fbfbf120774850b80c329f1132a4", "score": "0.49519205", "text": "function wlpd_login_designer_deactivate() {\r\n delete_option( 'wlpd_login_on_or_off');\r\n\tdelete_option( 'wlpd_login_hide_logo');\r\n\tdelete_option( 'wlpd_login_hide_error_msg');\r\n delete_option( 'wlpd_login_background_color');\r\n\tdelete_option( 'wlpd_login_background_image');\r\n\tdelete_option( 'wlpd_login_link_color');\r\n\tdelete_option( 'wlpd_login_link_hover_color');\r\n\tdelete_option( 'wlpd_login_form_margin_top');\r\n\tdelete_option( 'wlpd_login_logo_title');\r\n\tdelete_option( 'wlpd_login_link');\r\n\tdelete_option( 'wlpd_login_form_bg');\r\n delete_option( 'wlpd_login_hide_lost_password');\r\n\tdelete_option( 'wlpd_login_hide_back_to');\r\n\tdelete_option( 'wlpd_login_desable_shake');\r\n\tdelete_option( 'wlpd_login_change_login_redirect');\r\n\tdelete_option( 'wlpd_login_set_remember_me');\r\n\tdelete_option( 'wlpd_login_form_border_size');\r\n\tdelete_option( 'wlpd_login_form_border_color');\r\n\tdelete_option( 'wlpd_login_form_border_radius');\r\n\tdelete_option( 'wlpd_login_form_label_size');\r\n\tdelete_option( 'wlpd_login_form_label_color');\r\n\tdelete_option( 'wlpd_login_form_label_bold');\r\n\tdelete_option( 'wlpd_login_form_logo');\r\n\tdelete_option( 'wlpd_login_form_logo_width');\r\n\tdelete_option( 'wlpd_login_form_logo_height');\r\n\tdelete_option( 'wlpd_login_form_submit_bg');\r\n\tdelete_option( 'wlpd_login_form_submit_border_width');\r\n\tdelete_option( 'wlpd_login_form_submit_border_color');\r\n\tdelete_option( 'wlpd_login_form_submit_hover_bg');\r\n\tdelete_option( 'wlpd_login_form_submit_hover_border_width');\r\n\tdelete_option( 'wlpd_login_form_submit_hover_border_color');\r\n\tdelete_option( 'wlpd_login_form_textbox_bg');\r\n\tdelete_option( 'wlpd_login_form_textbox_border_width');\r\n\tdelete_option( 'wlpd_login_form_textbox_border_color');\r\n\tdelete_option( 'wlpd_login_form_textbox_hover_bg');\r\n\tdelete_option( 'wlpd_login_form_textbox_hover_border_width');\r\n\tdelete_option( 'wlpd_login_form_textbox_hover_border_color');\r\n\tdelete_option( 'wlpd_login_form_submit_border_radius');\r\n\tdelete_option( 'wlpd_login_form_textbox_border_radius');\r\n}", "title": "" }, { "docid": "01999ca38f751528ae19715a1447fd7e", "score": "0.49496114", "text": "function add_settings() {\n\tadd_settings_section( 'sgdd_auth', __( 'Step 1: Authorization', 'skaut-google-drive-documents' ), '\\\\Sgdd\\\\Admin\\\\SettingsPages\\\\Basic\\\\OAuthRevoke\\\\display', 'sgdd_basic' );\n\n\t\\Sgdd\\Admin\\Options\\Options::$authorized_domain->add_field( true, true );\n\t\\Sgdd\\Admin\\Options\\Options::$authorized_origin->add_field( true, true );\n\t\\Sgdd\\Admin\\Options\\Options::$redirect_uri->add_field( true, true );\n\t\\Sgdd\\Admin\\Options\\Options::$client_id->add_field( true );\n\t\\Sgdd\\Admin\\Options\\Options::$client_secret->add_field( true );\n}", "title": "" }, { "docid": "89bcf840a23e2bd37f7fddb1572da289", "score": "0.49471492", "text": "function tokensale_plugin_settings_screen() { ?>\n\n <div class=\"wrap\">\n\n <h1><?php _e( 'Token sale settings', 'wp-token-sale' ); ?></h1>\n\n <form method=\"post\" action=\"options.php\">\n\n <?php\n // Output nonce, action, and option_page fields.\n settings_fields( 'token-sale-settings' );\n\n // Prints out all settings sections added to a particular settings page.\n do_settings_sections( 'token-sale-settings' );\n\n // Echos a submit button\n submit_button();\n ?>\n\n </form>\n\n </div><!--End .wrapper-->\n\n <?php\n}", "title": "" }, { "docid": "9548f62e67eafc0e8e96f395021de38e", "score": "0.49418333", "text": "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "title": "" }, { "docid": "e68cf73de4ebba0468ae2697426f147f", "score": "0.49418077", "text": "function set_msg($message, $color = null) {\r\n\r\n global $ttf_cfg;\r\n $expire = time() + $ttf_cfg[\"cookie_time\"];\r\n\r\n $message = clean($message);\r\n setcookie($ttf_cfg[\"cookie_name\"].'-msg', $message, $expire, $ttf_cfg[\"cookie_path\"], $ttf_cfg[\"cookie_domain\"], $ttf_cfg[\"cookie_secure\"]);\r\n\r\n if (!empty($color)) {\r\n\r\n $color = clean($color);\r\n setcookie($ttf_cfg[\"cookie_name\"].'-msg-clr', $color, $expire, $ttf_cfg[\"cookie_path\"], $ttf_cfg[\"cookie_domain\"], $ttf_cfg[\"cookie_secure\"]);\r\n\r\n };\r\n\r\n}", "title": "" }, { "docid": "eb0fdf9f4c24868477397f9080999aea", "score": "0.4939685", "text": "function dbc_add_to_settings_page(){\r\n\tadd_options_page(\r\n\t\t'Demo Theme Options',\r\n\t\t'Demo Theme Options',\r\n\t\t'edit_dashboard',\r\n\t\t'manage_options',\r\n\t\t'demo-theme-options',\r\n\t\t'demo_theme_options_display'\r\n\t);\r\n}", "title": "" }, { "docid": "ba2a0824d3b5b7740414ab0ca97f1c94", "score": "0.4939041", "text": "function bccl_set_license_options($cc_settings) {\n global $wp_version;\n\n print('\n <div class=\"wrap\">\n <div id=\"icon-options-general\" class=\"icon32\"><br /></div>\n <h2>'.__('License Settings', 'cc-configurator').'</h2>\n\n <p style=\"text-align: center;\"><big>' . bccl_get_full_html_license() . '</big></p>\n <form name=\"formlicense\" id=\"bccl_reset\" method=\"post\" action=\"' . $_SERVER['REQUEST_URI'] . '\">\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Current License', 'cc-configurator').'</span></legend>\n <p>'.__('A license has been set and will be used to license your work.', 'cc-configurator').'</p>\n <p>'.__('If you need to set a different license, press the <em>Reset License</em> button below. By reseting the license, the saved plugin options are removed from the WordPress database.', 'cc-configurator').'</p>\n </fieldset>\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" name=\"license_reset\" value=\"'.__('Reset License', 'cc-configurator').'\" />\n </p>\n </form>\n </div>\n\n <div class=\"wrap\" style=\"background: #EEF6E6; padding: 1em 2em; border: 1px solid #E4E4E4;' . (($cc_settings[\"options\"][\"cc_i_have_donated\"]==\"1\") ? ' display: none;' : '') . '\">\n <h2>'.__('Message from the author', 'cc-configurator').'</h2>\n <p style=\"font-size: 1.2em; padding-left: 2em;\"><em>CC-Configurator</em> is released under the terms of the <a href=\"http://www.apache.org/licenses/LICENSE-2.0.html\">Apache License version 2</a> and, therefore, is <strong>free software</strong>.</p>\n <p style=\"font-size: 1.2em; padding-left: 2em;\">However, a significant amount of <strong>time</strong> and <strong>energy</strong> has been put into developing this plugin, so, its production has not been free from cost. If you find this plugin useful, I would appreciate an <a href=\"http://www.g-loaded.eu/about/donate/\">extra cup of coffee</a>.</p>\n <p style=\"font-size: 1.2em; padding-left: 2em;\">Thank you in advance</p>\n <div style=\"text-align: right;\"><small>'.__('This message can de deactivated in the settings below.', 'cc-configurator').'</small></div>\n </div>\n\n <div class=\"wrap\">\n <h2>'.__('Configuration', 'cc-configurator').'</h2>\n <p>'.__('Here you can choose where and how license information should be added to your blog.', 'cc-configurator').'</p>\n\n <form name=\"formbccl\" method=\"post\" action=\"' . $_SERVER['REQUEST_URI'] . '\">\n\n <table class=\"form-table\">\n <tbody>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Syndicated Content', 'cc-configurator').'</th>\n <td>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Syndicated Content', 'cc-configurator').'</span></legend>\n <input id=\"cc_feed\" type=\"checkbox\" value=\"1\" name=\"cc_feed\" '. (($cc_settings[\"options\"][\"cc_feed\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_feed\">\n '.__('Include license information in the blog feeds. (<em>Recommended</em>)', 'cc-configurator').'\n </label>\n <br />\n </fieldset>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Page Head HTML', 'cc-configurator').'</th>\n <td>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Page Head HTML', 'cc-configurator').'</span></legend>\n <input id=\"cc_head\" type=\"checkbox\" value=\"1\" name=\"cc_head\" '. (($cc_settings[\"options\"][\"cc_head\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_head\">\n '.__('Include license information in the page\\'s HTML head. This will not be visible to human visitors, but search engine bots will be able to read it. Note that the insertion of license information in the HTML head is done in relation to the content types (posts, pages or attachment pages) on which the license text block is displayed (see the <em>text block</em> settings below). (<em>Recommended</em>)', 'cc-configurator').'\n </label>\n <br />\n </fieldset>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Text Block', 'cc-configurator').'</th>\n <td>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Text Block', 'cc-configurator').'</span></legend>\n\n <p>'.__('By enabling the following options, a small block of text, which contains links to the author, the work and the used license, is appended to the published content.', 'cc-configurator').'</p>\n\n <input id=\"cc_body\" type=\"checkbox\" value=\"1\" name=\"cc_body\" '. (($cc_settings[\"options\"][\"cc_body\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_body\">\n '.__('Posts: Add the text block with license information under the published posts. (<em>Recommended</em>)', 'cc-configurator').'\n </label>\n <br />\n\n <input id=\"cc_body_pages\" type=\"checkbox\" value=\"1\" name=\"cc_body_pages\" '. (($cc_settings[\"options\"][\"cc_body_pages\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_body_pages\">\n '.__('Pages: Add the text block with license information under the published pages.', 'cc-configurator').'\n </label>\n <br />\n\n <input id=\"cc_body_attachments\" type=\"checkbox\" value=\"1\" name=\"cc_body_attachments\" '. (($cc_settings[\"options\"][\"cc_body_attachments\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_body_attachments\">\n '.__('Attachments: Add the text block with license information under the attached content in attachment pages.', 'cc-configurator').'\n </label>\n <br />\n\n <p>'.__('By enabling the following option, the license image is also included in the license text block.', 'cc-configurator').'</p>\n\n <input id=\"cc_body_img\" type=\"checkbox\" value=\"1\" name=\"cc_body_img\" '. (($cc_settings[\"options\"][\"cc_body_img\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_body_img\">\n '.__('Include the license image in the text block.', 'cc-configurator').'\n </label>\n <br />\n </fieldset>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Extra Text Block Customization', 'cc-configurator').'</th>\n <td>\n <p>'.__('The following settings have an effect only if the text block containing licensing information has been enabled above.', 'cc-configurator').'</p>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Extra Text Block Customization', 'cc-configurator').'</span></legend>\n\n <input id=\"cc_extended\" type=\"checkbox\" value=\"1\" name=\"cc_extended\" '. (($cc_settings[\"options\"][\"cc_extended\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_extended\">\n '.__('Include extended information about the published work and its creator. By enabling this option, hyperlinks to the published content and its creator/publisher are also included into the license statement inside the block. This, by being an attribution example itself, will generally help others to attribute the work to you.', 'cc-configurator').'\n </label>\n <br />\n <br />\n\n <select name=\"cc_creator\" id=\"cc_creator\">');\n $creator_arr = bccl_get_creator_pool();\n foreach ($creator_arr as $internal => $creator) {\n if ($cc_settings[\"options\"][\"cc_creator\"] == $internal) {\n $selected = ' selected=\"selected\"';\n } else {\n $selected = '';\n }\n printf('<option value=\"%s\"%s>%s</option>', $internal, $selected, $creator);\n }\n print('</select>\n <br />\n <label for=\"cc_creator\">\n '.__('If extended information about the published work has been enabled, then you can choose which name will indicate the creator of the work. By default, the blog name is used.', 'cc-configurator').'\n </label>\n <br />\n <br />\n\n <input name=\"cc_perm_url\" type=\"text\" id=\"cc_perm_url\" class=\"code\" value=\"' . $cc_settings[\"options\"][\"cc_perm_url\"] . '\" size=\"100\" maxlength=\"1024\" />\n <br />\n <label for=\"cc_perm_url\">\n '.__('If you have added any extra permissions to your license, provide the URL to the webpage that contains them. It is highly recommended to use absolute URLs.', 'cc-configurator').'\n <br />\n <strong>'.__('Example', 'cc-configurator').'</strong>: <code>http://www.example.org/ExtendedPermissions</code>\n </label>\n <br />\n\n </fieldset>\n </td>\n </tr>\n\n \n <tr valign=\"top\">\n <th scope=\"row\">'.__('Colors of the text block', 'cc-configurator').'</th>\n <td>\n <p>'.__('The following settings have an effect only if the text block containing licensing information has been enabled above.', 'cc-configurator').'</p>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Colors of the text block', 'cc-configurator').'</span></legend>\n\n <input name=\"cc_color\" type=\"text\" id=\"cc_color\" class=\"code\" value=\"' . $cc_settings[\"options\"][\"cc_color\"] . '\" size=\"7\" maxlength=\"7\" />\n <label for=\"cc_color\">\n '.__('Set a color for the text that appears within the block (does not affect hyperlinks).', 'cc-configurator').'\n <br />\n <strong>'.__('Default', 'cc-configurator').'</strong>: <code>#000000</code>\n </label>\n <br />\n <br />\n\n <input name=\"cc_bgcolor\" type=\"text\" id=\"cc_bgcolor\" class=\"code\" value=\"' . $cc_settings[\"options\"][\"cc_bgcolor\"] . '\" size=\"7\" maxlength=\"7\" />\n <label for=\"cc_bgcolor\">\n '.__('Set a background color for the block.', 'cc-configurator').'\n <br />\n <strong>'.__('Default', 'cc-configurator').'</strong>: <code>#eef6e6</code>\n </label>\n <br />\n <br />\n\n <input name=\"cc_brdr_color\" type=\"text\" id=\"cc_brdr_color\" class=\"code\" value=\"' . $cc_settings[\"options\"][\"cc_brdr_color\"] . '\" size=\"7\" maxlength=\"7\" />\n <label for=\"cc_brdr_color\">\n '.__('Set a color for the border of the block.', 'cc-configurator').'\n <br />\n <strong>'.__('Default', 'cc-configurator').'</strong>: <code>#cccccc</code>\n </label>\n <br />\n <br />\n\n <input id=\"cc_no_style\" type=\"checkbox\" value=\"1\" name=\"cc_no_style\" '. (($cc_settings[\"options\"][\"cc_no_style\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_no_style\">\n '.__('Disable the internal formatting of the license block. If the internal formatting is disabled, then the color selections above have no effect any more. You can still format the license block via your own CSS. The <em>cc-block</em> and <em>cc-button</em> classes have been reserved for formatting the license block and the license button respectively.', 'cc-configurator').'\n </label>\n <br />\n\n </fieldset>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Donations', 'cc-configurator').'</th>\n <td>\n <fieldset>\n <legend class=\"screen-reader-text\"><span>'.__('Donations', 'cc-configurator').'</span></legend>\n <input id=\"cc_i_have_donated\" type=\"checkbox\" value=\"1\" name=\"cc_i_have_donated\" '. (($cc_settings[\"options\"][\"cc_i_have_donated\"]==\"1\") ? 'checked=\"checked\"' : '') .'\" />\n <label for=\"cc_i_have_donated\">\n '.__('By checking this, the <em>message from the author</em> above goes away. Thanks for <a href=\"http://www.g-loaded.eu/about/donate/\">donating</a>!', 'cc-configurator').'\n </label>\n <br />\n\n </fieldset>\n </td>\n </tr>\n\n\n </tbody>\n </table>\n\n <p class=\"submit\">\n <input id=\"submit\" class=\"button-primary\" type=\"submit\" value=\"'.__('Save Changes', 'cc-configurator').'\" name=\"options_update\" />\n </p>\n\n </form>\n\n </div>\n\n <div class=\"wrap\">\n\n <h2>'.__('Advanced Info', 'cc-configurator').'</h2>\n <p>'.__('Apart from the options above for the inclusion of licensing information in your blog, this plugin provides some <em>Template Tags</em>, which can be used in your theme templates. These are the following:', 'cc-configurator').'\n </p>\n \n <table class=\"form-table\">\n <tbody>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Text Hyperlink', 'cc-configurator').'</th>\n <td>\n <code>bccl_get_license_text_hyperlink()</code> - '.__('Returns the text hyperlink of your current license for use in the PHP code.', 'cc-configurator').'\n <br />\n <code>bccl_license_text_hyperlink()</code> - '.__('Displays the text hyperlink.', 'cc-configurator').'\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Image Hyperlink', 'cc-configurator').'</th>\n <td>\n <code>bccl_get_license_image_hyperlink()</code> - '.__('Returns the image hyperlink of the current license.', 'cc-configurator').'\n <br />\n <code>bccl_license_image_hyperlink()</code> - '.__('Displays the image hyperlink of the current license.', 'cc-configurator').'\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('License URIs', 'cc-configurator').'</th>\n <td>\n <code>bccl_get_license_url()</code> - '.__('Returns the license\\'s URL.', 'cc-configurator').'\n <br />\n <code>bccl_get_license_deed_url()</code> - '.__('Returns the license\\'s Deed URL. Usually this is the same URI as returned by the bccl_get_license_url() function.', 'cc-configurator').'\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Full HTML Code', 'cc-configurator').'</th>\n <td>\n <code>bccl_get_full_html_license()</code> - '.__('Returns the full HTML code of the license. This includes the text and the image hyperlinks.', 'cc-configurator').'\n <br />\n <code>bccl_full_html_license()</code> - '.__('Displays the full HTML code of the license. This includes the text and the image hyperlinks.', 'cc-configurator').'\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Complete License Block', 'cc-configurator').'</th>\n <td>\n <code>bccl_license_block($work, $css_class, $show_button)</code> - '.__('Displays a complete license block. This template tag can be used to publish specific original work under the current license or in order to display the license block at custom locations on your website. This function supports the following arguments', 'cc-configurator').':\n <ol>\n <li><code>$work</code> ('.__('alphanumeric', 'cc-configurator').') : '.__('This argument is used to define the work to be licensed. Its use is optional, when the template tag is used in single-post view. If not defined, the user-defined settings for the default license block are used.', 'cc-configurator').'</li>\n <li><code>$css_class</code> ('.__('alphanumeric', 'cc-configurator').') : '.__('This argument sets the name of the CSS class that will be used to format the license block. It is optional. If not defined, then the default class <em>cc-block</em> is used.', 'cc-configurator').'</li>\n <li><code>$show_button</code> ('.__('alphanumeric', 'cc-configurator').') - (\"default\", \"yes\", \"no\") : '.__('This argument is optional. It can be used in order to control the appearance of the license icon.', 'cc-configurator').'</li>\n </ol>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">'.__('Licence Documents', 'cc-configurator').'</th>\n <td>\n <code>bccl_license_summary($width, $height, $css_class)</code> - '.__('Displays the license\\'s summary document in an <em>iframe</em>.', 'cc-configurator').'\n <br />\n <code>bccl_license_legalcode($width, $height, $css_class)</code> - '.__('Displays the license\\'s full legal code in an <em>iframe</em>.', 'cc-configurator').'\n </td>\n </tr>\n\n </tbody>\n </table>\n\n </div>\n\n ');\n}", "title": "" }, { "docid": "97ad7f39871e3030ac0aad1b9326b92c", "score": "0.49309716", "text": "function SPTK_showPage_Settings_afterSave($formValues)\n{\n\t$resultData = SPTK_api_areCredentialsCorrect();\n\t\n\t// Verification happened fine\n\tif ($resultData['success']) {\n\t\tprintf('<div class=\"sptk_msg sptk_msg_ok\">%s</div>', __('<b>Success!</b> WordPress was able to talk to the Squeeze Page Toolkit.', 'sptk_for_wp'));\n\t}\n\t\n\t// Something went wrong.\n\telse { \n\t\tprintf('<div class=\"sptk_msg sptk_msg_error\">%s<br/><br/><b>%s</b>: %s</div>', \n\t\t\t__('<b>Error!</b> WordPress was <b>not able</b> to talk to the Squeeze Page Toolkit.', 'sptk_for_wp'),\n\t\t\t__('Reason Why', 'sptk_for_wp'),\n\t\t\t$resultData['error_msg']\n\t\t);\n\t}\n\t\n\t// Flush the cache for the selected home page if there is one.\n\tif ($pageSelection = SPTK_arrays_getValue($formValues, 'homepage_squeeze', false))\n\t{\n\t\t// Homepage cache name have a slightly different name to standard pages.\n\t\tSPTK_cache_clearPageData('sptk_page_cache_' . $pageSelection . '_homepage_squeeze'); \n\t\tSPTK_cache_clearPageData('sptk_page_cache_' . $pageSelection . '_thanks_homepage_squeeze'); // The associated thanks page.\n\n\t}\n}", "title": "" }, { "docid": "4e0c2cead61528e19b9af3c73cb4ec95", "score": "0.49266472", "text": "public function setCookie(Cookie $cookie)\n {\n $this->browser->request('POST', 'cookie', json_encode(array('cookie' => $cookie->toArray())));\n }", "title": "" }, { "docid": "660f53e947a51c8b562cb89ecc1cb7cb", "score": "0.4908991", "text": "function chalk_admin_settings_render(){\n\t\t //update the api key\n\t\t if (isset($_POST['api_key'])) {\n\t\t\t$value = $_POST['api_key'];\n\t\t\tupdate_option('api_key', $value);\n\t\t}\n\n\t\t//get the api_key from wordpress and set to default if need be\n\t\t$value = get_option('api_key', '74db8efa2a6db279393b433d97c2bc843f8e32b0');\n\n\t\t//load the html for the form\t\n\t\tinclude 'form-chalk-settings.php';\n\t}", "title": "" }, { "docid": "7595180f7a9ac1f4caa4813dd7e6a162", "score": "0.49044907", "text": "function wpac_popup(){\n\tif(isset($_COOKIE['wpac_choice']) || isset($_REQUEST['wpac_choice'])) return;\n\t\n\t?>\n\t<style type=\"text/css\">\n\t\t#wpacPopup{\n\t\t\theight: 100px;\n\t\t\tposition:absolute;\n\t\t\twidth:100%;\n\t\t\tpadding:10px;\n\t\t\ttop:0;\n\t\t\tbackground-color:#ccc;\n\t\t\ttext-align:center;\n\t\t\tz-index: 1000;\n\t\t}\n\t\t\n\t\t#wpacPopup .green{\n\t\t\tbackground-color:#7a7;\n\t\t\tborder:none;\n\t\t}\n\t\t\n\t\t#wpacPopup .grey{\n\t\t\tborder:none;\n\t\t\tbackground-color:#777;\n\t\t}\n\t</style>\n\t<div id=\"wpacPopup\">\n\t<p><span style=\"font-weight: bold;\">Afin de réaliser des statistiques publicitaires et audience anonymes, je souhaite implanter un cookie sur votre ordinateur.</span></p>\n\t<div class=\"buttons\">\n\t\t<form action=\"\" method=\"post\">\n\t\t\t<button class=\"grey\" value=\"decline\" name=\"wpac_choice\" type=\"submit\">Non merci</button>\n\t\t\t<button class=\"green\" value=\"accept\" name=\"wpac_choice\" type=\"submit\">Accepter</button>\n\t\t</form>\n\t\t<p class=\"legend\">Je vais mémoriser votre choix dans un cookie. :D (si vous refusez alors certaines fonctionnalités du site seront inaccessible)</p>\n\t</div>\n</div>\n\t<?php\n}", "title": "" }, { "docid": "ab3423cb9913e2a67362b5f805777b27", "score": "0.4899072", "text": "function setck($name,$val) {\n\tsetcookie($name, $val);\n\t$_COOKIE[$name] = $val;\n}", "title": "" }, { "docid": "e6b2a4b9d5889a01cdbdfa19e372944a", "score": "0.4898951", "text": "public function settingsForm()\n {\n return 'googletraffic-form-settings';\n }", "title": "" }, { "docid": "e621967dab1d31c2cf7a05a1f89138c9", "score": "0.4895114", "text": "function settings_form($current)\n\t{\n\t\tglobal $DB, $DSP, $LANG, $IN, $PREFS, $SESS;\n\n\t\t// create a local variable for the site settings\n\t\t$settings = $this->_get_settings();\n\n\t\t$DSP->crumbline = TRUE;\n\n\t\t$DSP->title = $LANG->line('extension_settings');\n\t\t$DSP->crumb = $DSP->anchor(BASE.AMP.'C=admin'.AMP.'area=utilities', $LANG->line('utilities')).\n\t\t$DSP->crumb_item($DSP->anchor(BASE.AMP.'C=admin'.AMP.'M=utilities'.AMP.'P=extensions_manager', $LANG->line('extensions_manager')));\n\n\t\t$DSP->crumb .= $DSP->crumb_item($LANG->line('lg_firephp_title') . \" {$this->version}\");\n\n\t\t$DSP->right_crumb($LANG->line('disable_extension'), BASE.AMP.'C=admin'.AMP.'M=utilities'.AMP.'P=toggle_extension_confirm'.AMP.'which=disable'.AMP.'name='.$IN->GBL('name'));\n\n\t\t$DSP->body = '';\n\n\t\tif(isset($settings['show_donate']) === FALSE) {$settings['show_donate'] = 'y';}\n\t\tif($settings['show_donate'] == 'y')\n\t\t{\n\t\t\t$DSP->body .= \"<style type='text/css' media='screen'>\n\t\t\t\t#donate{float:right; margin-top:0; padding-left:190px; position:relative; top:-2px}\n\t\t\t\t#donate .button{background:transparent url(http://leevigraham.com/themes/site_themes/default/img/btn_paypal-donation.png) no-repeat scroll left bottom; display:block; height:0; overflow:hidden; position:absolute; top:0; left:0; padding-top:27px; text-decoration:none; width:175px}\n\t\t\t\t#donate .button:hover{background-position:top right;}\n\t\t\t</style>\";\n\t\t\t$DSP->body .= \"<p id='donate'>\n\t\t\t\t\t\t\t\" . $LANG->line('donation') .\"\n\t\t\t\t\t\t\t<a rel='external' href='https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=sales%40newism%2ecom.au&amp;item_name=LG%20Expression%20Engine%20Development&amp;amount=%2e00&amp;no_shipping=1&amp;return=http%3a%2f%2fleevigraham%2ecom%2fdonate%2fthanks&amp;cancel_return=http%3a%2f%2fleevigraham%2ecom%2fdonate%2fno%2dthanks&amp;no_note=1&amp;tax=0&amp;currency_code=USD&amp;lc=US&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8' class='button' target='_blank'>Donate</a>\n\t\t\t\t\t\t</p>\";\n\t\t}\n\n\t\t$DSP->body .= $DSP->heading($LANG->line('lg_firephp_title') . \" <small>{$this->version}</small>\");\n\n\t\t$DSP->body .= $DSP->form_open(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'action' => 'C=admin'.AMP.'M=utilities'.AMP.'P=save_extension_settings'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t// WHAT A M*THERF!@KING B!TCH THIS WAS\n\t\t\t\t\t\t\t\t// REMBER THE NAME ATTRIBUTE MUST ALWAYS MATCH THE FILENAME AND ITS CASE SENSITIVE\n\t\t\t\t\t\t\t\t// BUG??\n\t\t\t\t\t\t\t\tarray('name' => strtolower(get_class($this)))\n\t\t);\n\n\t\t// EXTENSION ACCESS\n\t\t$DSP->body .= $DSP->table_open(array('class' => 'tableBorder', 'border' => '0', 'style' => 'margin-top:18px; width:100%'));\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('tableHeading', '', '2');\n\t\t$DSP->body .= $LANG->line(\"access_rights\");\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('tableCellOne', '40%');\n\t\t$DSP->body .= $DSP->qdiv('defaultBold', $LANG->line('enable_extension_for_this_site'));\n\t\t$DSP->body .= $DSP->td_c();\n\n\t\t$DSP->body .= $DSP->td('tableCellOne');\n\t\t$DSP->body .= \"<select name='enable'>\"\n\t\t\t\t\t\t. $DSP->input_select_option('y', \"Yes\", (($settings['enable'] == 'y') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_option('n', \"No\", (($settings['enable'] == 'n') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_footer();\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('tableCellTwo', '40%');\n\t\t$DSP->body .= $DSP->qdiv('defaultBold', $LANG->line('show_test_message'));\n\t\t$DSP->body .= $DSP->td_c();\n\n\t\t$DSP->body .= $DSP->td('tableCellTwo');\n\t\t$DSP->body .= \"<select name='show_test_message'>\"\n\t\t\t\t\t\t. $DSP->input_select_option('y', \"Yes\", (($settings['enable'] == 'y') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_option('n', \"No\", (($settings['enable'] == 'n') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_footer();\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->table_c();\n\n\n\t\t// UPDATE SETTINGS\n\t\t$DSP->body .= $DSP->table_open(array('class' => 'tableBorder', 'border' => '0', 'style' => 'margin-top:18px; width:100%'));\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('tableHeading', '', '2');\n\t\t$DSP->body .= $LANG->line(\"check_for_updates_title\");\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('', '', '2');\n\t\t$DSP->body .= \"<div class='box' style='border-width:0 0 1px 0; margin:0; padding:10px 5px'><p>\" . $LANG->line('check_for_updates_info'). \"</p></div>\";\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->tr();\n\t\t$DSP->body .= $DSP->td('tableCellOne', '40%');\n\t\t$DSP->body .= $DSP->qdiv('defaultBold', $LANG->line(\"check_for_updates_label\"));\n\t\t$DSP->body .= $DSP->td_c();\n\n\n\t\t$DSP->body .= $DSP->td('tableCellOne');\n\t\t$DSP->body .= \"<select name='check_for_updates'>\"\n\t\t\t\t\t\t. $DSP->input_select_option('y', \"Yes\", (($settings['check_for_updates'] == 'y') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_option('n', \"No\", (($settings['check_for_updates'] == 'n') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_footer();\n\t\t$DSP->body .= $DSP->td_c();\n\t\t$DSP->body .= $DSP->tr_c();\n\n\t\t$DSP->body .= $DSP->table_c();\n\n\t\tif($IN->GBL('lg_admin') != 'y')\n\t\t{\n\t\t\t$DSP->body .= $DSP->table_c();\n\t\t\t$DSP->body .= \"<input type='hidden' value='\".$settings['show_donate'].\"' name='show_donate' />\";\n\t\t\t$DSP->body .= \"<input type='hidden' value='\".$settings['show_promos'].\"' name='show_promos' />\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$DSP->body .= $DSP->table_open(array('class' => 'tableBorder', 'border' => '0', 'style' => 'margin-top:18px; width:100%'));\n\t\t\t$DSP->body .= $DSP->tr()\n\t\t\t\t. $DSP->td('tableHeading', '', '2')\n\t\t\t\t. $LANG->line(\"lg_admin_title\")\n\t\t\t\t. $DSP->td_c()\n\t\t\t\t. $DSP->tr_c();\n\n\t\t\t$DSP->body .= $DSP->tr()\n\t\t\t\t. $DSP->td('tableCellOne', '40%')\n\t\t\t\t. $DSP->qdiv('defaultBold', $LANG->line(\"show_donate_label\"))\n\t\t\t\t. $DSP->td_c();\n\n\t\t\t$DSP->body .= $DSP->td('tableCellOne')\n\t\t\t\t. \"<select name='show_donate'>\"\n\t\t\t\t\t\t. $DSP->input_select_option('y', \"Yes\", (($settings['show_donate'] == 'y') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_option('n', \"No\", (($settings['show_donate'] == 'n') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_footer()\n\t\t\t\t. $DSP->td_c()\n\t\t\t\t. $DSP->tr_c();\n\n\t\t\t$DSP->body .= $DSP->tr()\n\t\t\t\t. $DSP->td('tableCellTwo', '40%')\n\t\t\t\t. $DSP->qdiv('defaultBold', $LANG->line(\"show_promos_label\"))\n\t\t\t\t. $DSP->td_c();\n\n\t\t\t$DSP->body .= $DSP->td('tableCellTwo')\n\t\t\t\t. \"<select name='show_promos'>\"\n\t\t\t\t\t\t. $DSP->input_select_option('y', \"Yes\", (($settings['show_promos'] == 'y') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_option('n', \"No\", (($settings['show_promos'] == 'n') ? 'y' : '' ))\n\t\t\t\t\t\t. $DSP->input_select_footer()\n\t\t\t\t. $DSP->td_c()\n\t\t\t\t. $DSP->tr_c();\n\n\t\t\t$DSP->body .= $DSP->table_c();\n\t\t}\n\n\t\t$DSP->body .= $DSP->qdiv('itemWrapperTop', $DSP->input_submit());\n\t\t$DSP->body .= $DSP->form_c();\n\t}", "title": "" }, { "docid": "935dfa174b89e7121b869d757dcd2551", "score": "0.48864084", "text": "function initSettingsPage() {\n if ( !$this->initSettingsPage ) return;\n $section_id = 'bsp-reset-' . strtolower($this->service) . '-cache';\n add_settings_section( $section_id, ucfirst($this->service), array($this, 'settingsSectionContent'), BSP_PLUGIN_SLUG );\n foreach ( $this->cache as $key => $cache ) {\n $field_id = $this->cacheOptionName . '-' . $key;\n add_settings_field( $field_id, 'Reset <code>' . $key . '</code> Cache?', array($this, 'settingsField'), BSP_PLUGIN_SLUG, $section_id, array( 'key' => $key, 'timestamp' => $cache['timestamp'], 'id' => $field_id ) );\n }\n register_setting( Bubs_Social_Plugin::$optionGroupName, $this->cacheOptionName, array($this, 'settingsResetCache') );\n }", "title": "" }, { "docid": "dea9f787139eae5a1c81b0db6df5b3a0", "score": "0.48864082", "text": "protected static function set_cookie_var()\n\t{\n\t\tif (self::$cookie_var !== false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tglobal $config;\n\t\tself::$cookie_var = (isset($config['cookie_name']) ? $config['cookie_name'] . '_' : '') . self::$mobile_var;\n\t}", "title": "" }, { "docid": "75e1aab97b4149c609d5383348b7ca54", "score": "0.48847738", "text": "function SPTK_showPage_Settings()\n{\n\t$page = new PageBuilder(true);\n\t$page->showPageHeader(__('Squeeze Page Toolkit for WordPress - Settings', 'sptk_for_wp'));\n\t\n\t\n\t// Check for cache cleaning.\n\tif (isset($_GET['clear_cache']) && 'true' == $_GET['clear_cache'])\n\t{\n\t\tSPTK_cache_clearCacheAllPages();\n\t\t$page->showMessage(__('Squeeze page cache has been cleared.', 'sptk_for_wp'));\n\t}\n\t\n\t\n\t\n\t$page->openPane('sptk_for_wp_settings', __('Your Settings', 'sptk_for_wp'));\n\t\n\t$settingsFields = array(\n\t\t'remote_api_key' => array(\n\t\t\t\t'label' \t=> __('Your Access Key', 'sptk_for_wp'),\n\t\t\t\t'required'\t=> true,\n\t\t\t\t'type' \t=> 'text',\n\t\t\t\t'cssclass'\t=> 'sptk_form_input_medium',\n\t\t\t\t'desc' \t=> '&bull; ' . __('Your access key for the <b>Squeeze Page Toolkit</b>, which will allow WordPress to fetch your squeeze pages. You can find this within in your Squeeze Page Toolkit account by clicking on <b>your name</b> and then -> <b>SPTK for WordPress</b>.', 'sptk_for_wp') . \n\t\t\t\t\t\t\t '<br/>&bull; ' . __('An example of your access key is: <code>1ba12bbb34c3a3cee4b28d7839006e35</code>', 'sptk_for_wp'), \n\t\t\t\t'validate'\t \t=> array(\n\t\t\t\t\t'type'\t\t=> 'string',\n\t\t\t\t\t'maxlen'\t=> 32,\n\t\t\t\t\t'minlen'\t=> 32,\n\t\t\t\t\t'regexp'\t=> '/^[A-Za-z0-9]+$/',\n\t\t\t\t\t'error'\t\t=> __('Please enter your 32 character access key, which contains only letters and numbers.', 'sptk_for_wp'),\n\t\t\t\t)\t\n\t\t\t), \t\t\n\t\t\t\n\t\t'homepage_squeeze' => array(\n\t\t\t\t'label' \t=> __('Use page for for your homepage', 'sptk_for_wp'),\n\t\t\t\t'required'\t=> false,\n\t\t\t\t'type' \t=> 'select',\n\t\t\t\t'cssclass'\t=> 'sptk_form_select',\n\t\t\t\t'desc' \t=> '&bull; ' . __('If you would like to use any of your pages in the <b>Squeeze Page Toolkit</b> to replace your current home page, you can select it here.', 'sptk_for_wp') . \n\t\t\t\t\t\t\t\t'<br/>&bull; ' . __('Or you can select <b>Use normal WordPress page</b> to disable using a toolkit page.', 'sptk_for_wp'), \n\t\t\t\t'data'\t\t=> SPTK_page_getListOfPagesForHomepageSelect($page),\t\n\t\t\t)\n\t\t\t\n\t);\n\t\n\t// ### Page Settings - Show the form\n\t$settings = new SettingsForm($settingsFields, SPTK_DATABASE_SETTINGS_KEY, 'sptk_form_settings');\n\t\n\t// Form event handlers - processes the saved settings in some way \n\t$settings->afterSaveFunction = 'SPTK_showPage_Settings_afterSave';\t\t\n\t\n\t$settings->show();\n\t\n\t\n\t// ### Cache Clean - Show the section to clear the page cache.\n\t$page->openPane('sptk_for_wp_settings_cache', __('Squeeze Page Cache', 'sptk_for_wp'));\n\tprintf('<p>%s</p>', __('To ensure your squeeze pages load as quickly as possible, they are cached on the same server as your WordPress website. If you need to clean out that cache for any reason (such as your pages are not refreshing), then just click on the button below.', 'sptk_for_wp'));\n\t\n\tprintf('<p><a href=\"%s\" class=\"button-primary\">%s</a></p>',\n\t\tadmin_url('edit.php?post_type=squeeze_page&page=SPTK_showPage_Settings&clear_cache=true'), \n\t\t__('Clear Squeeze Page Cache', 'sptk_for_wp')\n\t);\n\t \n\t\n\t$page->showPageFooter();\n}", "title": "" }, { "docid": "bc8c2fee3f2b1bb3cdb0042fb605dc42", "score": "0.4883288", "text": "public function disableCookieSupport()\n {\n $this->configCookiesDisabled = true;\n }", "title": "" }, { "docid": "1209a324b28eaf917e25d8014d3384ba", "score": "0.48789844", "text": "public function saveCookie(): void\n {\n $cookieData = [\n 'token' => $this->getToken(),\n 'exp' => $this->getExpTime()\n ];\n\n setcookie(\"authToken\", static::encodeToken($cookieData), $cookieData['exp'], \"/\", getenv(\"SITE_DOMAIN\"), getenv(\"APP_ENV\") === \"prod\", true);\n }", "title": "" } ]
3ecf2a4fbac19ad70951732d75d360f0
/ Fonction qui assemble les pairs solo en semble et qui cree les groupes et leur assigne un terrain
[ { "docid": "f1d9abe31a96038c35f877d6942d8126", "score": "0.562722", "text": "function creerTournoi($nbPairByGroup, $idTournament, $pluie, $dbh){\n // var_dump($nbPairByGroup);\n // var_dump($idTournament);\n // var_dump($pluie);\n // echo \"-----------------players \";\n $players = getSoloPlayers($idTournament, $dbh);\n // print_r(count($players));\n\n // echo \"-----------------pairs \";\n $pairs = makingPair($players);\n // print_r(count($pairs));\n\n // echo \"-----------------insert \";\n insertPairs(transformPairsToDb($pairs, $idTournament, $dbh) , $dbh);\n\n // echo \"-----------------cours : \";\n $cours = getAllCourts($idTournament, $pluie, $dbh);\n // print_r(count($cours));\n\n // echo \"-----------------pairs : \";\n $pairs = getPairs($idTournament, $dbh);\n // print_r(count($pairs));\n\n // echo \"-----------------groups : \";\n $nbGroup = 0; //n-1\n $group = [];\n while(!empty($pairs)){\n // echo \"[GROUP START NUM=\".$nbGroup.\"]\";\n // echo \"pairs = \".count($pairs);\n $group[$nbGroup]['pairs'] = getXPairByRank($pairs, array_shift($pairs), $nbPairByGroup);\n\n $group[$nbGroup]['leader'] = getLeaderOfGroup($group[$nbGroup]['pairs']);\n\n // echo \"COUNT___________\".count($group[$nbGroup]['pairs']).\"__________COUNT\";\n // var_dump($group[$nbGroup]['pairs']);\n //var_dump($group[$nbGroup]['leader']);\n // echo \"pairs = \".count($pairs);\n $key = array_search($group[$nbGroup]['pairs'][1], $pairs);\n unset($pairs[$key]);\n /*foreach ($group[$nbGroup]['pairs'] as $p) {\n $key = array_search($p, $pairs);\n unset($pairs[$key]);\n }*/\n // echo \"pairs = \".count($pairs);\n // echo \"[GROUP END NUM = \".$nbGroup.\"]\";\n $nbGroup++;\n }\n // var_dump(count($group));\n // die('GROUPS');\n // echo \"-----------------groups and cours : \";\n set_time_limit(0);\n foreach ($group as $k => $g) {\n $courtTmp = getNearCours($cours, $g['pairs'], $dbh);\n\n $key = array_search($courtTmp, $cours);\n unset($cours[$key]);\n\n $group[$k]['court_fk'] = $courtTmp;\n\n $groupTmp = [\n 'court_fk' => $courtTmp['idcourts'],\n 'tournament_fk' => $idTournament\n ];\n\n if(!is_null($g['leader'])){\n $groupTmp['leader'] = $g['leader'];\n }\n\n $idGroup = insertGroup($groupTmp, $dbh);\n\n $group[$k]['group_id'] = $idGroup;\n\n foreach ($g['pairs'] as $kPair => $valuePair) {\n addGroupFkPair($valuePair['idpairs'], $idGroup, $dbh);\n $group[$k]['pairs'][$kPair]['joueur1'] = getPlayerById($valuePair['user_j1_fk'],$dbh);\n $group[$k]['pairs'][$kPair]['joueur2'] = getPlayerById($valuePair['user_j2_fk'],$dbh);\n }\n\n }\n\n return $group;\n\n}", "title": "" } ]
[ { "docid": "a11d23b39890b857fc01d8720f775035", "score": "0.568452", "text": "function joinMaps()\n\t{\n\t\tglobal $structId,$chainId,$dbname,$con,$selMeths,$continuousMap,$splitDomMap,$finalMap;\n\t\t\n\t\tforeach ($continuousMap as $value) \n\t\t{\n\t\t\t$finalMap[] = $value;\n\t\t}\n\t\tforeach ($splitDomMap as $value) \n\t\t{\n\t\t\t$finalMap[] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "fd853c686c602aa41d3ffda8af975eb9", "score": "0.5360393", "text": "private function consolidate() {\n $restart = true;\n\n // Every time we modify segments, we rerun this loop\n while ($restart) {\n $restart = false;\n $size = count($this->segments);\n\n for ($i1=0; $i1<$size && !$restart; ++$i1) {\n for ($i2=$i1+1; $i2<$size && !$restart; ++$i2) {\n $p1 = $this->segments[$i1];\n $p2 = $this->segments[$i2];\n\n if ($p1->high+1 < $p2->low || $p2->high+1 < $p1->low) {\n // This case:\n // 111111 222222\n // and this case:\n // 222222 111111\n continue;\n }\n \n $restart = true;\n\n if ($p1->low <= $p2->low) {\n // This case:\n // 1111....\n // 2222....\n // and this case:\n // 1111....\n // 2222....\n if ($p1->high >= $p2->high) {\n // This case:\n // ....1111\n // ....2222\n // and this case:\n // ....1111\n // ....2222\n array_splice($this->segments,$i2,1); // Remove element with index $i2\n }\n else {\n // This case:\n // ....1111\n // ....2222\n array_splice($this->segments,$i2,1); // Must be removed before $i1\n array_splice($this->segments,$i1,1);\n $this->segments[] = new MonadPair($p1->low, $p2->high);\n }\n }\n else {\n // This case:\n // 1111....\n // 2222....\n if ($p2->high >= $p1->high) {\n // This case:\n // ....1111\n // ....2222\n // and this case:\n // ....1111\n // ....2222\n array_splice($this->segments,$i1,1); // Remove element with index $i1\n }\n else {\n // This case:\n // ....1111\n // ....2222\n array_splice($this->segments,$i2,1); // Must be removed before $i1\n array_splice($this->segments,$i1,1);\n $this->segments[] = new MonadPair($p2->low, $p1->high);\n }\n }\n }\n }\n }\n\n sort($this->segments);\n }", "title": "" }, { "docid": "2e635f94429523a2b6b6e2e59defccdf", "score": "0.52845025", "text": "public function pairs(): \\Ds\\Sequence {}", "title": "" }, { "docid": "b46165b00969c6aa725d50159933d46c", "score": "0.51685625", "text": "static function test_g4() {\n foreach ([\n ['W'=> 5, 'S'=> 47, 'E'=> 6, 'N'=> 48],\n ['W'=> 1, 'S'=> 47, 'E'=> 1.1, 'N'=> 47.1],\n [-0.1, 47, 0.1, 47.1],\n ] as $bbox) {\n echo \"<br>g4(bbox=\",json_encode($bbox),\")\\n\";\n foreach (Peano::g4($bbox) as $peano)\n echo \"peano=$peano, bbox=\",json_encode($peano->mbr()),\"\\n\";\n }\n }", "title": "" }, { "docid": "4f118f95e375948244b5c335e23e20d6", "score": "0.5149565", "text": "function make_relationships()\n {\n\n for($x_init = 0; $x_init < $this->max_x; $x_init++){\n for($y_init = 0; $y_init < $this->max_y; $y_init++){\n $this->cells[$x_init][$y_init]->set_relationships(\n $this->get_TLcell($x_init,$y_init),\n $this->get_TCcell($x_init,$y_init),\n $this->get_TRcell($x_init,$y_init),\n $this->get_CRcell($x_init,$y_init),\n $this->get_BRcell($x_init,$y_init),\n $this->get_BCcell($x_init,$y_init),\n $this->get_BLcell($x_init,$y_init),\n $this->get_CLcell($x_init,$y_init)\n );\n }\n }\n }", "title": "" }, { "docid": "ff6ae973bc4cf39a877ab49e5b59d0ce", "score": "0.510705", "text": "private function create_pairs() {\n\n//get only the artists mentioned 50 times or more\n$dup_array = $this->artists_above_50();\n$total_dups = count($dup_array);\n\n//Now let's take the master array and remove everything but the duplicates\nforeach ($this->master_list as $key => $value) {\n$this->master_list[$key] = array_intersect($value, $dup_array);\n}\n\n//now create all the possible pairs of the duplicates\n$counter = 0;\n\nfor ($i = 0; $i < $total_dups; $i++) {\nfor ($j = $i+1; $j < $total_dups; $j++) {\n\n$values = array($dup_array[$i], $dup_array[$j]);\n\n$this->pairs[$counter] = array(\n'count' => 0,\n'match' => $values\n);\n$counter++;\n}\n}\n\n}", "title": "" }, { "docid": "42c2a41861b68af3c6cf2b2958a3577f", "score": "0.5067138", "text": "function ponerComoHoja($array)\r\n {\r\n $n = count($array);\r\n for($i=0; $i<$n; $i++)\r\n {\r\n if($array[$i]['rgt'] - $array[$i]['lft'] == 1)\r\n {\r\n if($array[$i]['rgt'] - $array[$i]['lft'] == 1)\r\n {\r\n //$arrayEstructuras1 = $this->integrator->metadatos->DameEstructurasInternasSeguridad($array[$i]['idestructura'],true);\r\n // if(!count($arrayEstructuras1))\r\n $array[$i]['leaf'] = true;\r\n } \r\n }\r\n }\r\n return $array; \r\n }", "title": "" }, { "docid": "ff81a398164ba41c7c003c606116eea7", "score": "0.5014957", "text": "function get_sites_info(&$sites_info, &$sites_name, $left_pos,$searchegs, $up_string, $down_string, $main_string,$right_pos,$orientation)\n{\n\t\n\tglobal $GENOME_LENGTH;\n\t$sequence = $up_string.$main_string.$down_string;\n\tif($orientation==\"Clockwise\")\n\t{\n\t\t$start_end = ($left_pos - strlen($up_string)+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t}\n\telse {\n\t\t\n\t\t$start_end = ($right_pos + strlen($up_string)+$GENOME_LENGTH)%$GENOME_LENGTH;\t\n\t}\t\n\t\n//\tdb_set_active(\"mapsearch_db\");\n\t$query = db_query(\"Select name, sequence, seq, is_symmetrical FROM mapsearch_db.t_enzyme WHERE name in (\".$searchegs.\") ORDER by name ASC\");\n\n\t $i=0;\n\t $t = 0;\n\t \n While ($row = $query->fetchAssoc()) {\n \t\n \t$enzyme_name = $row['name'];\n\t$pattern_disply = $row['sequence'];\n\t$is_symmetrical = $row['is_symmetrical'];\n\t$pattern = trim($row['seq']);\n\t$sites_name[$i] = $enzyme_name;\n\t\n\t$detected = search_site($sequence, $pattern, $is_symmetrical);\n\t\n\n \tfor($k=0; $k<count($detected); $k++)\n \t{\n \t\tif($orientation==\"Clockwise\")\n\t\t{\n\t\t\t$sites_info[$t][\"left_end\"]=($detected[$k]['pos']+$start_end+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t$sites_info[$t][\"right_end\"]=($detected[$k]['pos']+$start_end+strlen($pattern)-1+$GENOME_LENGTH)%$GENOME_LENGTH;\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($detected[$k]['ori']==\"Clockwise\")\n\t\t\t{\n\t\t\t\t$sites_info[$t][\"ori\"]='Plus';\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$left_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t}\n\t\t\telse if($detected[$k]['ori']==\"Counterclockwise\") {\n\t\t\t\t$sites_info[$t][\"ori\"]='Minus';\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$left_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n//\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"right_end\"]-$left_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$sites_info[$t][\"ori\"]='Both';\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$left_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$sites_info[$t][\"right_end\"]=(-$detected[$k]['pos']+$start_end+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t$sites_info[$t][\"left_end\"]=(-$detected[$k]['pos']+$start_end-strlen($pattern)+1+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t\n\t\t\tif($detected[$k]['ori']==\"Clockwise\")\n\t\t\t{\n\t\t\t\t$sites_info[$t][\"ori\"]='Minus';\n//\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"right_end\"]-$right_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$right_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t}\n\t\t\telse if($detected[$k]['ori']==\"Counterclockwise\") {\n\t\t\t\t$sites_info[$t][\"ori\"]='Plus';\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$right_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$sites_info[$t][\"ori\"]='Both';\n\t\t\t\t$sites_info[$t][\"relative\"]=($sites_info[$t][\"left_end\"]-$right_pos+$GENOME_LENGTH)%$GENOME_LENGTH;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ($sites_info[$t][\"relative\"]>$GENOME_LENGTH/2)\n\t\t{\n\t\t\t$sites_info[$t][\"relative\"] = $sites_info[$t][\"relative\"]-$GENOME_LENGTH;\n\t\t}\n\t\t\n\t\t$sites_info[$t][\"name\"]=$enzyme_name;\n\t\t$sites_info[$t][\"seq\"]=$detected[$k]['seq'];\n \t\t$t++;\n \t\t\n \t}\n\t$i++;\n }\ndb_set_active(\"ecogene\");\n\t\n}", "title": "" }, { "docid": "61638bfbdacbd87be4012f0cae2879dd", "score": "0.4961853", "text": "protected function merge_fp_maps($num) {\n //create table of crossing\n $table = array();\n foreach ($this->map[$num] as $akey=>$aleaf) {\n foreach ($this->map[0] as $mkey=>$mleaf) {\n if ($akey!=dfa_preg_leaf_meta::ENDREG && $mkey!=dfa_preg_leaf_meta::ENDREG && $mkey!=$num) {\n $newleaf = preg_leaf_combo::get_cross($this->connection[0][$mkey]->pregnode, $this->connection[$num][$akey]->pregnode);\n $table[$akey][$mkey] = new fptab;\n $table[$akey][$mkey]->leaf = $this->from_preg_node($newleaf);\n }\n }\n }\n foreach ($this->map[$num] as $akey=>$aleaf) {\n $table[$akey][dfa_preg_leaf_meta::ENDREG] = false;\n }\n foreach ($this->map[0] as $mkey=>$mleaf) {\n if ($mkey!=$num) {\n $table[dfa_preg_leaf_meta::ENDREG][$mkey] = new fptab;\n $table[dfa_preg_leaf_meta::ENDREG][$mkey]->leaf = $this->connection[0][$mkey];\n }\n }\n $newleaf = new preg_leaf_meta;\n $newleaf->subtype = preg_leaf_meta::SUBTYPE_ENDREG;\n $newleaf = $this->from_preg_node($newleaf);\n $table[dfa_preg_leaf_meta::ENDREG][dfa_preg_leaf_meta::ENDREG] = new fptab;\n $table[dfa_preg_leaf_meta::ENDREG][dfa_preg_leaf_meta::ENDREG]->leaf = $newleaf;\n //forming ?passages?\n foreach ($table as $akey=>$str) {\n if ($akey!=dfa_preg_leaf_meta::ENDREG) {\n foreach ($str as $mkey=>$member) {\n if ($mkey!=dfa_preg_leaf_meta::ENDREG) {\n foreach ($this->map[$num][$akey] as $afollow) {\n foreach ($this->map[0][$mkey] as $mfollow) {\n if (($afollow==dfa_preg_leaf_meta::ENDREG || $mfollow!=dfa_preg_leaf_meta::ENDREG) &&\n ($akey!=dfa_preg_leaf_meta::ENDREG || $mkey!=dfa_preg_leaf_meta::ENDREG)) {\n if ($mfollow!=$num) {\n $table[$akey][$mkey]->aindex[] = $afollow;\n $table[$akey][$mkey]->mindex[] = $mfollow;\n }\n }\n }\n }\n }\n }\n } else {\n foreach ($str as $mkey=>$member) {\n if ($mkey!=dfa_preg_leaf_meta::ENDREG) {\n foreach ($this->map[0][$mkey] as $follow) {\n if ($follow!=$num) {\n $table[$akey][$mkey]->aindex[] = $akey;//meta endreg\n $table[$akey][$mkey]->mindex[] = $follow;//copying passage\n } else {\n foreach ($this->roots[$num]->firstpos as $afirpos) {\n foreach ($this->map[0][$num] as $mainnext) {\n if ($mainnext!=dfa_preg_leaf_meta::ENDREG || $afirpos==dfa_preg_leaf_meta::ENDREG) {\n $table[$akey][$mkey]->aindex[] = $afirpos;\n $table[$akey][$mkey]->mindex[] = $mainnext;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n //wave for deleting inaccessible postion\n //form start front\n $firsta = $afront = array();\n $firstm = $mfront = array();\n foreach ($this->roots[0]->firstpos as $firstpos) {\n if ($firstpos!=$num) {\n $firsta[] = $afront[] = dfa_preg_leaf_meta::ENDREG;\n $firstm[] = $mfront[] = $firstpos;\n $table[dfa_preg_leaf_meta::ENDREG][$firstpos]->inaccessible = false;\n } else {\n foreach ($this->roots[$num]->firstpos as $afirpos) {\n foreach ($this->map[0][$num] as $mainnext) {\n if ($mainnext!=dfa_preg_leaf_meta::ENDREG || $afirpos==dfa_preg_leaf_meta::ENDREG) {\n $firsta[] = $afront[] = $afirpos;\n $firstm[] = $mfront[] = $mainnext;\n $table[$afirpos][$mainnext]->inaccessible = false;\n }\n }\n }\n }\n }\n //wave\n do {\n $newafront = array();\n $newmfront = array();\n $newfirstposfortree = array();\n foreach ($afront as $key=>$val) {\n foreach ($table[$val][$mfront[$key]]->aindex as $newkey=>$apass) {\n if ($table[$apass][$table[$val][$mfront[$key]]->mindex[$newkey]]->inaccessible) {\n $newafront[] = $apass;\n $newmfront[] = $table[$val][$mfront[$key]]->mindex[$newkey];\n $table[$apass][$table[$val][$mfront[$key]]->mindex[$newkey]]->inaccessible = false;\n }\n }\n }\n $afront = $newafront;\n $mfront = $newmfront;\n } while (count($afront)!=0); \n //deleting\n foreach ($table as $akey=>$str) {\n foreach ($str as $mkey=>$member) {\n if ($member!==false && $member->inaccessible) {\n $table[$akey][$mkey] = false;\n }\n }\n }\n //formin fpmap from table\n //numerating\n $maxnum = 0;\n $this->connection[0] = array();\n foreach ($table as $akey=>$str) {\n foreach ($str as $mkey=>$member) {\n if ($member!==false) {\n if ($akey==dfa_preg_leaf_meta::ENDREG && $mkey==dfa_preg_leaf_meta::ENDREG) {\n $table[$akey][$mkey]->number = dfa_preg_leaf_meta::ENDREG;\n $this->connection[0][dfa_preg_leaf_meta::ENDREG] = $table[$akey][$mkey]->leaf;\n } else {\n $table[$akey][$mkey]->number = ++$maxnum;\n $this->connection[0][$maxnum] = $table[$akey][$mkey]->leaf;\n }\n //forming firstpos\n if (in_array($akey, $firsta) && in_array($mkey, $firstm) && !($table[$akey][$mkey]->leaf->pregnode->type==preg_node::TYPE_LEAF_CHARSET && $table[$akey][$mkey]->leaf->pregnode->charset == '')) {\n $newfirstposfortree[] = $table[$akey][$mkey]->number;\n }\n }\n }\n }\n $this->roots[0]->firstpos = $newfirstposfortree;\n //forming fpmap\n $this->map[0] = array();\n foreach ($table as $akey=>$str) {\n foreach ($str as $mkey=>$member) {\n if ($member!==false) {\n foreach ($member->aindex as $key=>$aind) {\n $this->map[0][$member->number][] = $table[$aind][$member->mindex[$key]]->number;\n }\n }\n }\n }\n //delete empty symbols\n foreach ($this->map[0] as $key=>$val) {\n if ($this->connection[0][$key]->pregnode->type==preg_node::TYPE_LEAF_CHARSET && $this->connection[0][$key]->pregnode->charset == '') {\n unset($this->map[0][$key]);\n unset($this->connection[0][$key]);\n }\n }\n foreach ($this->map[0] as $key=>$val) {\n foreach ($val as $key2=>$val2) {\n if (!array_key_exists($val2, $this->connection[0])) {\n unset ($this->map[0][$key][$key2]);\n }\n }\n }\n \n }", "title": "" }, { "docid": "f1c14354df025825a1d00c64b1136734", "score": "0.4940404", "text": "public function __construct()\n \n {\n\t\t$this->plateau = array();\n\t\tfor ($i=1;$i<=8;$i++){\n\t\t\t$this->plateau[$i]= array(\n\t\t\t\t\t0 => new Vide($i, 'a', $this),\n\t\t\t\t\t1 => new Vide($i, 'b', $this),\n\t\t\t\t\t2 => new Vide($i, 'c', $this),\n\t\t\t\t\t3 => new Vide($i, 'd', $this),\n\t\t\t\t\t4 => new Vide($i, 'e', $this),\n\t\t\t\t\t5 => new Vide($i, 'f', $this),\n\t\t\t\t\t6 => new Vide($i, 'g', $this),\n\t\t\t\t\t7 => new Vide($i, 'h', $this));\n\t\t}\n\t\t\n\t\t \n\t\t//puis on les pose sur le plateau grâce à leurs coordonnées \n\t\t$this->plateau [1][0] = new Tour('Blanc', 1, 'a', $this);\n\t\t$this->plateau [1][7] = new Tour('Blanc', 1, 'h', $this);\n\t\t$this->plateau [8][0] = new Tour('Noir', 8, 'a', $this);\n\t\t$this->plateau [8][7] = new Tour('Noir', 8, 'h', $this);\n\t\t\n\t\t$this->plateau [1][2] = new Fou('Blanc', 1, 'c', $this);\n\t\t$this->plateau [1][5] = new Fou('Blanc', 1, 'f', $this);\n\t\t$this->plateau [8][2] = new Fou('Noir', 8, 'c', $this);\n\t\t$this->plateau [8][5] = new Fou('Noir', 8, 'f', $this);\n\t\t\n\t\t\n\t\t$this->plateau [1][1] = new Cavalier('Blanc', 1, 'b', $this);\n\t\t$this->plateau [1][6] = new Cavalier('Blanc', 1, 'g', $this);\n\t\t$this->plateau [8][1] = new Cavalier('Noir', 8, 'b', $this);\n\t\t$this->plateau [8][6] = new Cavalier('Noir', 8, 'g', $this);\n\t\t\n\t\t$this->plateau [1][4] = new Reine('Blanc', 1, 'e', $this);\n\t\t$this->plateau [8][4] = new Reine('Noir', 8, 'e', $this);\n\t\t\n\t\t$this->plateau [1][3] = new Roi('Blanc', 1, 'd', $this);\n\t\t$this->plateau [8][3] = new Roi('Noir', 8, 'd', $this);\n\t\t\n\t\t$this->plateau [7][0] = new Pion('Noir', 7, 'a', $this);\n\t\t$this->plateau [7][1] = new Pion('Noir', 7, 'b', $this);\n\t\t$this->plateau [7][2] = new Pion('Noir', 7, 'c', $this);\n\t\t$this->plateau [7][3] = new Pion('Noir', 7, 'd', $this);\n\t\t$this->plateau [7][4] = new Pion('Noir', 7, 'e', $this);\n\t\t$this->plateau [7][5] = new Pion('Noir', 7, 'f', $this);\n\t\t$this->plateau [7][6] = new Pion('Noir', 7, 'g', $this);\n\t\t$this->plateau [7][7] = new Pion('Noir', 7, 'h', $this);\n\t\t\n\t\t$this->plateau [2][0] = new Pion('Blanc', 2, 'a', $this);\n\t\t$this->plateau [2][1] = new Pion('Blanc', 2, 'b', $this);\n\t\t$this->plateau [2][2] = new Pion('Blanc', 2, 'c', $this);\n\t\t$this->plateau [2][3] = new Pion('Blanc', 2, 'd', $this);\n\t\t$this->plateau [2][4] = new Pion('Blanc', 2, 'e', $this);\n\t\t$this->plateau [2][5] = new Pion('Blanc', 2, 'f', $this);\n\t\t$this->plateau [2][6] = new Pion('Blanc', 2, 'g', $this);\n\t\t$this->plateau [2][7] = new Pion('Blanc', 2, 'h', $this);\n }", "title": "" }, { "docid": "b5b8a64a35b7169d60381f0750471b5c", "score": "0.48971993", "text": "function placeWarships(){\n\n $LWarshipPlaced = FALSE;\n while(!$LWarshipPlaced){\n $x = rand(0,9);\n $y = rand(0,9);\n $this->LWarship = new LWarship($this->cells[$x][$y]);\n if($this->LWarship->test_layout()){\n $this->LWarship->layout_ship();\n $LWarshipPlaced = TRUE;\n }\n }\n\n $IWarshipPlaced = FALSE;\n while(!$IWarshipPlaced){\n $x = rand(0,9);\n $y = rand(0,9);\n $this->IWarship = new IWarship($this->cells[$x][$y]);\n if($this->IWarship->test_layout()){\n $this->IWarship->layout_ship();\n $IWarshipPlaced = TRUE;\n }\n }\n\n $DotWarshipAPlaced = FALSE;\n while(!$DotWarshipAPlaced){\n $x = rand(0,9);\n $y = rand(0,9);\n $this->DotWarshipA = new DotWarship($this->cells[$x][$y]);\n if($this->DotWarshipA->test_layout()){\n $this->DotWarshipA->layout_ship();\n $DotWarshipAPlaced = TRUE;\n }\n }\n\n $DotWarshipBPlaced = FALSE;\n while(!$DotWarshipBPlaced){\n $x = rand(0,9);\n $y = rand(0,9);\n $this->DotWarshipB = new DotWarship($this->cells[$x][$y]);\n if($this->DotWarshipB->test_layout()){\n $this->DotWarshipB->layout_ship();\n $DotWarshipBPlaced = TRUE;\n }\n }\n }", "title": "" }, { "docid": "727bd571fd64e0636f915c548dccb638", "score": "0.48953912", "text": "public function santri();", "title": "" }, { "docid": "66dc94899f7b3f9a24a2bdcabc45bc2f", "score": "0.48826197", "text": "public function possibleMatchOppositionLevels();", "title": "" }, { "docid": "d75114313494280a8768438d4463f23d", "score": "0.48740086", "text": "function populate_gene_pool()\n {\n $count = $this->count_genes() - 1;\n\n for($i = $count; $i < $this->gene_pool_size; $i++)\n {\n\n //$random_gene_key = array_rand($this->gene_pool);\n $gene1 = $this->get_random_gene(); //$this->gene_pool[$random_gene_key];\n $gene2 = $this->get_random_gene();\n\n\n $gene3 = $this->mate($gene1,$gene2);\n\n }\n }", "title": "" }, { "docid": "367857f0a11a69dfe6b089cc9bd71457", "score": "0.48518565", "text": "function solve_by($input, $xMovement, $yMovement) \n{\n // turn the map into a grid of arrays\n $rows = array_map('str_split', xplode_input($input));\n\n $trees = 0;\n $previousRow = 0;\n $previousIndex = 0;\n\n for ($i = 0; $i < count($rows); $i++) {\n $rowLen = count($rows[$i]);\n $x = $previousIndex + $xMovement;\n $y = $previousRow + $yMovement;\n \n if (isset($rows[$y])) { // if we've not reached the end of the map\n\n if (!isset($rows[$y][$x])) { // since map repeats horizontally, when we go over the right edge it's like starting again from the left\n $x = $x - $rowLen;\n }\n if ($rows[$y][$x] == '#') {\n $trees++;\n }\n $previousIndex = $x;\n $previousRow = $y;\n } \n }\n return $trees;\n}", "title": "" }, { "docid": "c8261a1279ed24c7aeedf9e3dc31ca2a", "score": "0.48385838", "text": "function setrangannuel(&$rangs, $seqs, &$moyclasse, &$moymax, &$moymin) {\r\n foreach ($seqs as $seq) {\r\n $moy = 0;\r\n $nb = 0;\r\n if (!empty($seq['MOYSEQ1'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ1']));\r\n $nb++;\r\n }\r\n if (!empty($seq['MOYSEQ2'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ2']));\r\n $nb++;\r\n }\r\n if (!empty($seq['MOYSEQ3'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ3']));\r\n $nb++;\r\n }\r\n if (!empty($seq['MOYSEQ4'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ4']));\r\n $nb++;\r\n }\r\n if (!empty($seq['MOYSEQ5'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ5']));\r\n $nb++;\r\n }\r\n if (!empty($seq['MOYSEQ6'])) {\r\n $moy = $moy + floatval(sprintf(\"%.2f\", $seq['MOYSEQ6']));\r\n $nb++;\r\n }\r\n $i = 0;\r\n foreach ($rangs as $rang) {\r\n if ($rang['IDELEVE'] === $seq['IDELEVE']) {\r\n $rangs[$i]['MOYGENERALE'] = floatval(sprintf(\"%.2f\", $moy / $nb));\r\n }\r\n $i++;\r\n }\r\n }\r\n usort($rangs, function($a, $b) {\r\n if ($a[\"MOYGENERALE\"] === $b[\"MOYGENERALE\"]) {\r\n return 0;\r\n } else {\r\n return $a[\"MOYGENERALE\"] < $b['MOYGENERALE'] ? 1 : -1;\r\n }\r\n });\r\n $i = 0;\r\n $prev = null;\r\n $summoy = 0;\r\n foreach ($rangs as $r) {\r\n if ($r['MOYGENERALE'] === $prev) {\r\n $rangs[$i][\"RANG\"] = $i;\r\n } else {\r\n $rangs[$i][\"RANG\"] = ($i + 1);\r\n }\r\n $i++;\r\n $prev = $r['MOYGENERALE'];\r\n $summoy += $r['MOYGENERALE'];\r\n }\r\n $moyclasse = $summoy / $i;\r\n $moymax = $rangs[0]['MOYGENERALE'];\r\n $moymin = $rangs[$i - 1][\"MOYGENERALE\"];\r\n}", "title": "" }, { "docid": "cad646f20b3cb5b2a6f98f64f0eb7a69", "score": "0.48198852", "text": "function combine_pieces($qpieces, $pieceConnector = 'and') {\r\n $count = count($qpieces);\r\n if (!$count) {\r\n return $qpieces;\r\n }\r\n if ($count == 1) {\r\n $compoundPiece = current($qpieces);\r\n } else {\r\n $compoundPiece = new_simple_qpiece('', '', '', '', '', '', '');\r\n $i = 0;\r\n foreach ($qpieces as $phrase) {\r\n foreach ($phrase as $key=>$val) {\r\n if ($key != 'piece_connector') {\r\n $compoundPiece[$key][$i] = $val[0]; \r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n $compoundPiece['piece_connector'] = $pieceConnector;\r\n return $compoundPiece;\r\n}", "title": "" }, { "docid": "50cbeca938d7a7afd86e3c0593259d58", "score": "0.4812895", "text": "public function constructGame()\n {\n for($i=0; $i<$this->size; $i++){\n $row = array();\n for($j=0; $j<$this->size; $j++){\n $row[] = \"\";\n }\n $this->game[] = $row;\n }\n\n //create the initial tiles\n $t1l = new SteampunkTile(\"valve-closed.png\");\n $t2l = new SteampunkTile(\"valve-closed.png\");\n $t1r1 = new SteampunkTile(\"gauge-top-0.png\");\n $t2r2 = new SteampunkTile(\"gauge-top-0.png\");\n $t1r = new SteampunkTile(\"gauge-0.png\");\n $t2r = new SteampunkTile(\"gauge-0.png\");\n\n //place tiles to initial position\n $mid = ($this->size / 2);\n $this->game[$mid-2.5][0] = $t1l;\n $this->game[$mid+2.5][0] = $t2l;\n $this->game[$mid-2.5][$this->size-1] = $t1r1;\n $this->game[$mid-2.5][1] = \"leak\";\n $this->game[$mid-1.5][$this->size-1] = $t1r;\n $this->game[$mid+2.5][1] = \"leak\";\n $this->game[$mid+0.5][$this->size-1] = $t2r2;\n $this->game[$mid+1.5][$this->size-1] = $t2r;\n\n //instantiate the players and attach tiles to players\n $this->player = new SteampunkPlayer();\n\n $t1l->setOwner(1);\n $t2l->setOwner(2);\n\n }", "title": "" }, { "docid": "a0f34a587394997c9168284cb1e1e218", "score": "0.47910774", "text": "private function setNeighbours(): void {\n\t\tforeach ($this->seats as $y => $row) {\n\t\t\tforeach ($row as $x => $occupied) {\n\t\t\t\t$neighbourCoordinates = $this->getNeighbourCoordinates($y, $x);\n\t\t\t\t//$this->inspect($y, $x, $neighbourCoordinates);\n\t\t\t\t//$c = fgetc($fp);\n\t\t\t\t//if ($c != \"\\n\") {\n\t\t\t\t//\texit;\n\t\t\t\t//}\n\t\t\t\t$this->neighbours[$y][$x] = $neighbourCoordinates;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9a6686790e8ee5dad6ec845b6c6352e3", "score": "0.4780253", "text": "public static function generate_map_bydeler()\n\t{\n\t\tforeach (game::$bydeler as $bydel)\n\t\t{\n\t\t\tif (!$bydel['active']) continue;\n\t\t\t\n\t\t\t$map = new bydeler_map();\n\t\t\t$map->bydel($bydel['id']);\n\t\t\t\n\t\t\t$data = $map->generate();\n\t\t\t$map->destroy();\n\t\t\tfile_put_contents(self::$map_dir.\"/bydel_\".$bydel['id'].\".png\", $data);\n\t\t}\n\t\t\n\t\t// forminsk det store kartet\n\t\t$map = new bydeler_map();\n\t\t$map->scale();\n\t\t$data = $map->generate();\n\t\t$map->destroy();\n\t\tfile_put_contents(self::$map_dir.\"/bydeler.png\", $data);\n\t}", "title": "" }, { "docid": "bb40883e66103898890f88d86aa93a2c", "score": "0.47717533", "text": "function Placement_bombes(&$tableau_information, $nb_cases_horizontales, $nb_cases_verticales, $premier_coup_x, $premier_coup_y, $nb_bombes)\n{\n for( $i=0 ; $i < $nb_bombes ; $i++)\n {\n $x = rand(1 , $nb_cases_horizontales);\n $y = rand(1, $nb_cases_verticales);\n\n if ($tableau_information[$x][$y] == -1)\n {\n $i--;\n }\n elseif( ($x == $premier_coup_x) && ($y == $premier_coup_y)) // A regarder avec tableau 0 ( rajouter +1 ?)\n {\n $i--;\n }\n else\n {\n $tableau_information[$x][$y] = -1;\n Incrementer_autour_bombe($tableau_information, $x , $y);\n }\n }\n}", "title": "" }, { "docid": "5a7713d2f464159cb2315d74e52afe49", "score": "0.47362593", "text": "public function buildIt(){\n\t\tfor($i=0;$i<40;$i++){\n\n\t\t\t$this->cardSet[$i] = new Creature(\"black\");\n\t\t}\n\t\tfor($i=40;$i<80;$i++){\n\n\t\t\t$this->cardSet[$i] = new Creature(\"white\");\n\t\t}\n\t\tfor($i=79;$i<120;$i++){\n\n\t\t\t$this->cardSet[$i] = new Creature(\"green\");\n\t\t}\n\t\tfor($i=119;$i<160;$i++){\n\n\t\t\t$this->cardSet[$i] = new Creature(\"red\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "06fb7ddd8d8a7721f444e62b2d185b2f", "score": "0.47271106", "text": "function transformPairsToDb($pairs, $idTournament, $db){\n $result = array();\n\n foreach ($pairs as $key => $value) {\n $tmp = array();\n $tmp['user_j1_fk'] = $value[0][0]['idusers'];\n $tmp['user_j2_fk'] = $value[1][0]['idusers'];\n $tmp['tournament_fk'] = $idTournament;\n $tmp['solo'] = 0;\n\n $leader1 = getLeaderByIdSoloPair($value[0][0]['idusers'],$idTournament, $db);\n $leader2 = getLeaderByIdSoloPair($value[1][0]['idusers'],$idTournament, $db);\n\n if(($leader1['leader'] == 1) || ($leader2['leader'] == 1)){\n $tmp['leader'] = 1;\n }else{\n echo \" FALSE \";\n $tmp['leader'] = 0;\n }\n\n $result[] = $tmp;\n }\n\n return $result;\n}", "title": "" }, { "docid": "15dc888c6f173b3594650532e28b6edc", "score": "0.4706205", "text": "function spawn($carte,$qg)\n{\n\tglobal $perso;\n\t$cases=my_fetch_array('SELECT carte_'.$carte.'.X,\n\t\tcarte_'.$carte.'.Y\n\t\tFROM `carte_'.$carte.'`\n\t\tINNER JOIN terrains\n\t\tON terrains.ID=carte_'.$carte.'.terrain\n\t\tINNER JOIN qgs\n\t\tON (qgs.camp='.$perso['armee'].'\n\t\tOR qgs.type=1) \n\t\tAND '.($qg?'qgs.ID='.$qg:'qgs.carte='.$carte).'\n\t\tLEFT OUTER JOIN `ponts`\n\t\tON ponts.X=carte_'.$carte.'.X\n\t\tAND ponts.Y=carte_'.$carte.'.Y\n\t\tAND ponts.map='.$carte.'\n\t\tLEFT OUTER JOIN `terrains` AS pont\n\t\tON terrains.ID=ponts.type\n\t\tLEFT OUTER JOIN `persos`\n\t\tON persos.X=carte_'.$carte.'.X\n\t\tAND persos.Y=carte_'.$carte.'.Y\n\t\tAND persos.map='.$carte.'\n\t\tLEFT OUTER JOIN `persos` AS bloqueur\n\t\tON bloqueur.armee!='.$perso['armee'].'\n\t\tAND bloqueur.map='.$carte.'\n\t\tAND SQRT(POW(qgs.X-bloqueur.X,2)+POW(qgs.Y-bloqueur.Y,2))<=qgs.blocage\n\t\tLEFT OUTER JOIN `qgs` AS bloqueur2\n\t\tON bloqueur2.X=carte_'.$carte.'.X\n\t\tAND bloqueur2.Y=carte_'.$carte.'.Y\n\t\tAND bloqueur2.carte='.$carte.'\n\t\tAND bloqueur2.ID!=qgs.ID\n\t\tWHERE persos.ID IS NULL\n\t\tAND bloqueur.ID IS NULL\n\t\tAND bloqueur2.ID IS NULL\n\t\tAND qgs.'.($qg?'tubage':'respawn').'=1\n\t\tAND SQRT(POW(qgs.X-carte_'.$carte.'.X,2)+POW(qgs.Y-carte_'.$carte.'.Y,2))<=qgs.utilisation\n\t\tAND !(carte_'.$carte.'.X=qgs.X AND carte_'.$carte.'.Y=qgs.Y)\n\t\tAND ((terrains.prix_'.$perso['type_armure'].'>0 AND ponts.type IS NULL)\n\t\tOR (pont.prix_'.$perso['type_armure'].'>0))\n\t\tORDER BY RAND()\n\t\tLIMIT 1');\n\tif($cases[0])\n\t{\n\t\treturn $cases[1];\n\t}\n\telse\n\t\treturn 0; \n}", "title": "" }, { "docid": "e141aac8518ccb8ee481dc3ea1e3f6ea", "score": "0.47040868", "text": "function crossover($fit_chromo1 , $fit_chromo2, $lcols)\r\n{\r\n$cross1= rand(0, $lcols-1);\r\n$cross2= rand(0, $lcols-1);\r\n\r\nif($cross1==$cross2)\r\n\twhile($cross1==$cross2)\r\n\t\t$cross2= rand(0,$lcols-1);\r\nif($cross2< $cross1)\r\n{\r\n\t$t= $cross1;\r\n\t$cross1= $cross2;\r\n\t$cross2= $t;\r\n}\r\n$swap_temp;\r\nfor($a=0; $a<=$cross1; $a++)\r\n{\r\n\t$swap_temp = $fit_chromo1[$a];\r\n\t$fit_chromo1[$a]= $fit_chromo2[$a];\r\n\t$fit_chromo2[$a]= $swap_temp;\r\n}\r\n\r\nfor($a= $cross2; $a<$lcols; $a++)\r\n{\r\n\t$swap_temp = $fit_chromo1[$a];\r\n\t$fit_chromo1[$a]= $fit_chromo2[$a];\r\n\t$fit_chromo2[$a]= $swap_temp;\r\n}\r\n}", "title": "" }, { "docid": "71252129fabbe74852a4e0fe934f4f26", "score": "0.46784374", "text": "function make_sectionated_set($name) {\n // It groups the levels by Pleasant / Painful / Death / Hell / Paradise / Reality\n $sections = load_sections_from_set($name);\n $sections = [\n \"快 Pleasant\" => join_array_of_arrays(array_slice($sections, 0, 10)),\n \"苦 Painful\" => join_array_of_arrays(array_slice($sections, 10, 10)),\n \"死 Death\" => join_array_of_arrays(array_slice($sections, 20, 10)),\n \"地獄 Hell\" => join_array_of_arrays(array_slice($sections, 30, 10)),\n \"天国 Paradise\" => join_array_of_arrays(array_slice($sections, 40, 10)),\n \"現実 Reality\" => join_array_of_arrays(array_slice($sections, 50, 10)),\n ];\n $new_name = str_replace(\"wanikani\",\"wanikani-sections\",$name);\n return output_sectioned_set_file($new_name, load_source_from_set($name), $sections);\n}", "title": "" }, { "docid": "aa3e28783da308972d55da7cf320f58a", "score": "0.46513826", "text": "function prototypeBase($bdd) {\n $rowmax = 3;\n\n for($row = 0; $row < $rowmax ; $row++) {\n echo '<tr>';\n $map1 = $bdd->query(\"SELECT * FROM structure WHERE id_map=3 AND w_posY=\".$row.\" ORDER BY w_posX ASC\");\n while ($map = $map1->fetch()) {\n $wall1 = $bdd->query(\"SELECT * FROM wall WHERE id=\".$map[\"id_wall\"]);\n $wall = $wall1->fetch();\n if($row == 1 && $map['w_posX'] == 1) {echo '<td col='.$map['w_posX'].' row='.$map['w_posY'].' class=\"perso\"><div id=\"sol\" class=\"'.$wall['sprite'].'\" style=\"background-image: url(../img/'.$wall[\"sprite\"].'.png); background-repeat: no-repeat;\"><div id=\"perso\">1</div></div></td>';}\n else {echo '<td col='.$map[\"w_posX\"].' row='.$map[\"w_posY\"].'><div id=\"sol\" class=\"'.$wall['sprite'].'\" style=\"background-image: url(../img/'.$wall['sprite'].'.png); background-repeat: no-repeat;\"></div></td>';}\n $wall1->closeCursor();\n }\n echo '<tr>';\n }\n $map1->closeCursor();\n}", "title": "" }, { "docid": "6595f46a42581c14a90bd346339c0689", "score": "0.46417582", "text": "protected function split_leafs($num) {\n foreach ($this->map[$num] as $prev => $arrnext) {\n foreach ($arrnext as $i => $first) {\n foreach ($arrnext as $j => $second) {\n if (self::is_leafs_part_match($this->connection[$num][$first], $this->connection[$num][$second]) && isset($this->map[$num][$first]) && isset($this->map[$num][$second])) {\n $arrres = $this->get_unequ_leafs($this->connection[$num][$first], $this->connection[$num][$second]);//get unique or equivalent leaf, but not partial equivalent with diff\n $firstnexts = $this->map[$num][$first];\n $secondnexts = $this->map[$num][$second];\n unset ($this->map[$num][$i]);\n unset ($this->map[$num][$j]);\n foreach ($arrres as $key => $newleaf) {\n $arrresnumbers[$key] = $this->save_new_leaf($num, $newleaf);\n }\n $this->map[$num][$arrresnumbers[0]] = $firstnexts;\n $this->map[$num][$arrresnumbers[1]] = $firstnexts;\n $this->map[$num][$arrresnumbers[2]] = $secondnexts;\n $this->map[$num][$arrresnumbers[3]] = $secondnexts;\n $this->replace_num_in_map($num, $first, $arrresnumbers[0], $arrresnumbers[1]);\n $this->replace_num_in_map($num, $second, $arrresnumbers[2], $arrresnumbers[3]);\n }\n }\n }\n }\n foreach ($this->map[$num] as $prev => $arrnext) {\n if (!is_array($arrnext))\n $this->map[$num][$prev] = array();\n }\n }", "title": "" }, { "docid": "0c08253ad085d51bba1f31eaa680e462", "score": "0.46230212", "text": "private function generateCombinations() {\n while(count($this->combinations) < $this->count) {\n if(count($this->combinations) < 1){\n $this->combinations[] = $this->generateCombination($this->data);\n }\n $combo = $this->generateCombination($this->data);\n if ($combo){\n $combo = $this->ensureUnique($combo);\n $this->combinations[] = $combo;\n } else {\n break;\n }\n\n }\n\n foreach($this->combinations as $key => $combination){\n $positions = implode(', ', array_column($combination, 'position'));\n $rbs_cnt = substr_count($positions, 'RB');\n $wrs_cnt = substr_count($positions, 'WR');\n\n uasort($combination, function ($i, $j) {\n $position_sort = ['QB' => 1, \"RB\" => 2, \"WR\" => 3, \"TE\" => 4, \"FLEX\" => 5, \"DST\" => 6];\n $a = $position_sort[$i['position']];\n $b = $position_sort[$j['position']];\n if ($a == $b) return 0;\n elseif ($a > $b) return 1;\n else return -1;\n });\n\n $tempNames = [];\n $comboNames = array_column($combination, 'name');\n $tempIds = [];\n $comboIds = array_column($combination, 'draft_kings_id');\n if ($wrs_cnt > 3 || $rbs_cnt > 2) {\n $tempNames[0] = $comboNames[0];\n $tempIds[0] = $comboIds[0];\n $tempNames[1] = $comboNames[1];\n $tempIds[1] = $comboIds[1];\n $tempNames[2] = $comboNames[2];\n $tempIds[2] = $comboIds[2];\n // bump them all down one\n $tempNames[3] = $comboNames[4];\n $tempIds[3] = $comboIds[4];\n $tempNames[4] = $comboNames[5];\n $tempIds[4] = $comboIds[5];\n $tempNames[5] = $comboNames[6];\n $tempIds[5] = $comboIds[6];\n $tempNames[6] = $comboNames[7];\n $tempIds[6] = $comboIds[7];\n // move $comboNames[3] into temp[7]\n $tempNames[7] = $comboNames[3];\n $tempIds[7] = $comboIds[3];\n $tempNames[8] = $comboNames[8];\n $tempIds[8] = $comboIds[8];\n } else {\n $tempNames = $comboNames;\n $tempIds = $comboIds;\n }\n\n $combo['names'] = implode(', ', $tempNames);\n $combo['ids'] = implode(', ', $tempIds);\n\n $combo['total'] = (int) array_sum(array_column($combination, 'salary'));\n $this->combinations[$key] = $combo;\n }\n return $this->combinations;\n }", "title": "" }, { "docid": "aa11aa87df32e358ad93ea652103499b", "score": "0.46175906", "text": "function spread(&$map, $inX, $inY)\n{\n output($map, false, $inX, $inY);\n\n $left = $right = false;\n\n $width = 0;\n while ($left === false || $right === false) {\n $width++;\n\n if ($left === false) {\n if ('.' === $map[$inY][$inX-$width] || '|' === $map[$inY][$inX-$width]) {\n if ('.' === $map[$inY+1][$inX-$width] || '|' === $map[$inY+1][$inX-$width]) {\n $left = true;\n $leftOverflow = $inX-$width;\n }\n } elseif ('#' === $map[$inY][$inX-$width]) {\n $left = true;\n $leftBorder = $inX-$width;\n }\n }\n\n if ($right === false) {\n if ('.' === $map[$inY][$inX+$width] || '|' === $map[$inY][$inX+$width]) {\n if ('.' === $map[$inY+1][$inX+$width] || '|' === $map[$inY+1][$inX+$width]) {\n $right = true;\n $rightOverflow = $inX+$width;\n }\n } elseif ('#' === $map[$inY][$inX+$width]) {\n $right = true;\n $rightBorder = $inX+$width;\n }\n }\n }\n\n // paint\n\n $filler = '|';\n if (isset($leftBorder, $rightBorder)) {\n $filler = '~';\n }\n\n if (isset($leftBorder)) {\n $fillLeft = $leftBorder + 1;\n } else {\n $fillLeft = $leftOverflow;\n }\n\n if (isset($rightBorder)) {\n $fillRight = $rightBorder - 1;\n } else {\n $fillRight = $rightOverflow;\n }\n\n for ($i = $fillLeft; $i <= $fillRight; $i++) {\n $map[$inY][$i] = $filler;\n }\n\n // move on\n\n if (isset($leftBorder, $rightBorder)) {\n spread($map, $inX, $inY-1);\n return;\n }\n\n if (isset($leftOverflow)) {\n trickleDown($map, $leftOverflow, $inY);\n }\n\n if (isset($rightOverflow)) {\n trickleDown($map, $rightOverflow, $inY);\n }\n}", "title": "" }, { "docid": "6ced6dcb53579e81e9932c78279166ec", "score": "0.46155438", "text": "private function distributeWinnings()\n {\n $this->chipPots()\n ->reverse()\n ->each(function (ChipPot $chipPot) {\n // if only 1 player participated to pot, he wins it no arguments\n if ($chipPot->players()->count() === 1) {\n $potTotal = $chipPot->chips()->total();\n\n $chipPot->players()->first()->chipStack()->add($potTotal);\n\n $this->chipPots()->remove($chipPot);\n\n return;\n }\n\n $activePlayers = $chipPot->players()->diff($this->foldedPlayers());\n\n $playerHands = $this->dealer()->hands()->findByPlayers($activePlayers);\n $evaluate = $this->dealer()->evaluateHands($this->dealer()->communityCards(), $playerHands);\n\n // if just 1, the player with that hand wins\n if ($evaluate->count() === 1) {\n $player = $evaluate->first()->hand()->player();\n $potTotal = $chipPot->chips()->total();\n\n $player->chipStack()->add($potTotal);\n\n $this->chipPots()->remove($chipPot);\n } else {\n // if > 1 hand is evaluated as highest, split the pot evenly between the players\n\n $potTotal = $chipPot->chips()->total();\n\n // split the pot between the number of players\n $splitTotal = Chips::fromAmount(($potTotal->amount() / $evaluate->count()));\n $evaluate->each(function (CardResults $result) use ($splitTotal) {\n $result->hand()->player()->chipStack()->add($splitTotal);\n });\n\n $this->chipPots()->remove($chipPot);\n }\n })\n ;\n }", "title": "" }, { "docid": "0525ad73efa4a0e84e67d95c6f5e56e1", "score": "0.4605926", "text": "private function convertGear()\n {\n $this->io->text('---> '. __METHOD__);\n\n // create set\n $set = new \\stdClass();\n $set->classId = $this->new->activeClassJob->classId;\n $set->jobId = $this->new->activeClassJob->jobId;\n $set->level = $this->new->activeClassJob->level;\n $set->attributes = $this->new->attributes;\n $set->gear = new \\stdClass();\n \n // convert attributes\n $new = [];\n foreach ($this->new->attributes as $i => $attribute) {\n // convert stupid shit because SE are inconsistent\n $attribute->name = ($attribute->name === 'Critical Hit Rate') ? 'Critical Hit' : $attribute->name;\n \n // convert\n $attribute->id = $this->getData('BaseParam', $attribute->name);\n unset($attribute->name);\n \n $new[$attribute->id] = $attribute->value;\n }\n \n $set->attributes = $new;\n \n // convert gear\n foreach ($this->new->gear as $gear) {\n $slot = $gear->slot;\n \n // todo - this must fail gracefully\n\n // item id\n $hash = Converter::hash($gear->name);\n $gear->id = $this->data['Equipment'][$hash];\n\n // check for dye\n if (isset($gear->dye) && $gear->dye) {\n $hash = Converter::hash($gear->dye->name);\n $gear->dye = $this->data['Dye'][$hash];\n }\n \n // check for mirage\n if (isset($gear->mirage) && $gear->mirage) {\n $hash = Converter::hash($gear->mirage->name);\n $gear->mirage = $this->data['Equipment'][$hash];\n }\n\n // check for materia\n if (isset($gear->materia) && $gear->materia) {\n foreach($gear->materia as $m => $materia) {\n $this->io->text('-----| materia: '. $materia->name);\n $hash = Converter::hash($materia->name);\n $gear->materia[$m] = $this->data['Materia'][$hash];\n }\n } else {\n $gear->materia = [];\n }\n \n // remove junk\n unset($gear->slot);\n unset($gear->name);\n unset($gear->category);\n\n $set->gear->{$slot} = $gear;\n }\n\n // if no previous gearset, start a new one\n if (!$this->gear) {\n $this->gear = new \\stdClass();\n }\n\n // add set to gear data\n $index = \"{$set->classId}_{$set->jobId}\";\n $this->gear->{$index} = $set;\n\n // remove stuff\n unset($this->new->gear);\n unset($this->new->attributes);\n }", "title": "" }, { "docid": "e0d40f3a88fd400b4351ce623ffe786e", "score": "0.459693", "text": "function getParishesMap($codMun)\n\t{\n\t\t$urlPharm = 'http://services.sapo.pt/Pharmacy/GetPharmaciesAtServiceByMunicipalityId?municipalityId='.$codMun;\n\t\t$xmlPharm = new SimpleXMLElement($urlPharm, NULL, TRUE);\n\t\tforeach ($xmlPharm->GetPharmaciesAtServiceByMunicipalityIdResult->Pharmacies->Pharmacy as $pharm)\n\t\t{\n\t\t\t\techo $pharm->Address->ParishId, ' :: ', $pharm->Address->Parish,'<br>';\n\t\t\t\t$s[intval($pharm->Address->ParishId)]=(string)$pharm->Address->Parish;\n\t\t}\n\t\t\treturn $s;\n\t}", "title": "" }, { "docid": "b91454f3ce384c6822e9c28a74ee80cc", "score": "0.45599133", "text": "function tour($joueur1, $joueur2, $pile)\r\n{\r\n //Vérifie si les joueurs ont les cartes pour jouer\r\n if ($joueur1->sizeofDeck() == 0) {\r\n echo \"Joueur 1 n'a plus de cartes \\n\";\r\n return;\r\n }\r\n if ($joueur2->sizeofDeck() == 0) {\r\n echo \"Joueur 2 n'a plus de cartes \\n\";\r\n return;\r\n }\r\n \r\n //Joue la carte du haut sur la pile\r\n $carte1 = $joueur1->getCarteDessus();\r\n $pile->ajoutCarteAuDessus($carte1);\r\n echo 'Joueur 1 joue '; $joueur1->printCard($carte1);\r\n\r\n $carte2 = $joueur2->getCarteDessus();\r\n $pile->ajoutCarteAuDessus($carte2);\r\n echo 'Joueur 2 joue '; $joueur2->printCard($carte2);\r\n \r\n //Mélange la pile pour la redistribution\r\n $pile->shuffleDeck(); \r\n \r\n //Compare les cartes et annonce le gagnant\r\n //Ajoute les cartes de la pile en-dessous du deck du gagnant\r\n //Si les cartes ont la même valeur, on repart pour un tour \r\n if ($carte1['index'] > $carte2['index']) {\r\n echo \"Joueur 1 gagne cette bataille \\n\";\r\n $joueur1->ajoutEnDessous($pile);\r\n } elseif ($carte2['index'] > $carte1['index']) {\r\n echo \"Joueur 2 gagne cette bataille \\n\";\r\n $joueur2->ajoutEnDessous($pile);\r\n } else {\r\n echo \"Egalité, on recommence \\n\";\r\n bataille ($joueur1, $joueur2, $pile);\r\n }\r\n \r\n return;\r\n}", "title": "" }, { "docid": "802da348e31428a184970f1c3784fbd3", "score": "0.45592964", "text": "public function run()\n {\n Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0001A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0001B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0002A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0002B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0003A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0003B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0004A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0005A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 1.0006A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 2.0007A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 2.0008A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 3.0009A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 3.0010A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 4.0011A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 4.0012A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 4.0013A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 5.0014A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 5.0014B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 5.0015A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 5.0015B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 6.0016A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 6.0016B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 6.0017A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 7.0018A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 7.0019A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 8.0020A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 8.0020B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 8.0021A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 9.0022A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 9.0023A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 10.0024A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 10.0025A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 11.0026A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 11.0027A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 11.0028A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 12.0029A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 12.0030A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 12.0031A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 13.0032A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 13.0033A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 14.0034A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 14.0034B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 15.0035A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 15.0036A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 15.0037A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 16.0038A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 16.0039A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 16.0040A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 16.0041A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 17.0042A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 17.0043A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 17.0044A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 18.0045A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 18.0046A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 18.0047A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 18.0048A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 18.0048B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 19.0049A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 20.0050A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 20.0050B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 20.0051A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0052A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0052B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0053A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 22.0054A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 22.0054B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 22.0055A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 22.0056A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 23.0057A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0057B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0058A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0058B');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0059A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0060A');\n// Area::build('5th District of Leyte.City of Baybay.Poblacion Zone 21.0061A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Altavista.0062A');\n// Area::build('5th District of Leyte.City of Baybay.Altavista.0062B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Ambacan.0063A');\n// Area::build('5th District of Leyte.City of Baybay.Ambacan.0064A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Amguhan.0065A');\n// Area::build('5th District of Leyte.City of Baybay.Amguhan.0065B');\n// Area::build('5th District of Leyte.City of Baybay.Amguhan.0066A');\n// Area::build('5th District of Leyte.City of Baybay.Amguhan.0067A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Ampihanon.0068A');\n// Area::build('5th District of Leyte.City of Baybay.Ampihanon.0068B');\n// Area::build('5th District of Leyte.City of Baybay.Ampihanon.0069A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Balao.0070A');\n// Area::build('5th District of Leyte.City of Baybay.Balao.0070B');\n// Area::build('5th District of Leyte.City of Baybay.Balao.0071A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Banahao.0072A');\n// Area::build('5th District of Leyte.City of Baybay.Banahao.0073A');\n// Area::build('5th District of Leyte.City of Baybay.Banahao.0074A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Biasong.0075A');\n// Area::build('5th District of Leyte.City of Baybay.Biasong.0075B');\n// Area::build('5th District of Leyte.City of Baybay.Biasong.0076A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Bidlinan.0077A');\n// Area::build('5th District of Leyte.City of Baybay.Bidlinan.0078A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0079A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0079B');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0080A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0081A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0082A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0083A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0084A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0085A');\n// Area::build('5th District of Leyte.City of Baybay.Bitanhuan.0086A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Bubon.0087A');\n// Area::build('5th District of Leyte.City of Baybay.Bubon.0088A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Buenavista.0089A');\n// Area::build('5th District of Leyte.City of Baybay.Buenavista.0090A');\n// Area::build('5th District of Leyte.City of Baybay.Buenavista.0091A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0092A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0093A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0094A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0095A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0096A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0097A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0098A');\n// Area::build('5th District of Leyte.City of Baybay.Bunga.0099A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Butigan.0100A');\n// Area::build('5th District of Leyte.City of Baybay.Butigan.0101A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0102A');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0102B');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0103A');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0103B');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0104A');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0104B');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0105A');\n// Area::build('5th District of Leyte.City of Baybay.Candadam.0105B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kan-ipa.0106A');\n// Area::build('5th District of Leyte.City of Baybay.Kan-ipa.0106B');\n// Area::build('5th District of Leyte.City of Baybay.Kan-ipa.0107A');\n// Area::build('5th District of Leyte.City of Baybay.Kan-ipa.0108A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0109A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0110A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0111A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0112A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0113A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0114A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0115A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0116A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0117A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0118A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0119A');\n// Area::build('5th District of Leyte.City of Baybay.Caridad.0120A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Ciabo.0121A');\n// Area::build('5th District of Leyte.City of Baybay.Ciabo.0122A');\n// Area::build('5th District of Leyte.City of Baybay.Ciabo.0123A');\n// Area::build('5th District of Leyte.City of Baybay.Ciabo.0124A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Cogon.0125A');\n// Area::build('5th District of Leyte.City of Baybay.Cogon.0125B');\n// Area::build('5th District of Leyte.City of Baybay.Cogon.0126A');\n// Area::build('5th District of Leyte.City of Baybay.Cogon.0127A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0128A');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0128B');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0129A');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0129B');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0130A');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0131A');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0132A');\n// Area::build('5th District of Leyte.City of Baybay.Ga-as.0133A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0134A');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0134B');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0135A');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0135B');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0136A');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0137A');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0138A');\n// Area::build('5th District of Leyte.City of Baybay.Gabas.0139A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0140A');\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0140B');\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0141A');\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0142A');\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0143A');\n// Area::build('5th District of Leyte.City of Baybay.Gakat.0144B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0145A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0145B');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0146A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0147A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0148A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0149A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0150A');\n// Area::build('5th District of Leyte.City of Baybay.Guadalupe.0151A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Gubang.0152A');\n// Area::build('5th District of Leyte.City of Baybay.Gubang.0153A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0154A');\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0154B');\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0155A');\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0155B');\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0156A');\n// Area::build('5th District of Leyte.City of Baybay.Hibunawan.0157A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Higuloan.0158A');\n// Area::build('5th District of Leyte.City of Baybay.Higuloan.0159A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0160A');\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0160B');\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0161A');\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0162A');\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0163A');\n// Area::build('5th District of Leyte.City of Baybay.Hilapnitan.0163B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0164A');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0164B');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0165A');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0166A');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0167A');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0168A');\n// Area::build('5th District of Leyte.City of Baybay.Hipusngo.0168B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Igang.0169A');\n// Area::build('5th District of Leyte.City of Baybay.Igang.0170A');\n// Area::build('5th District of Leyte.City of Baybay.Igang.0171A');\n// Area::build('5th District of Leyte.City of Baybay.Igang.0172A');\n// Area::build('5th District of Leyte.City of Baybay.Igang.0173A');\n// Area::build('5th District of Leyte.City of Baybay.Igang.0173B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Imelda.0174A');\n// Area::build('5th District of Leyte.City of Baybay.Imelda.0175A');\n// Area::build('5th District of Leyte.City of Baybay.Imelda.0175B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Jaena.0176A');\n// Area::build('5th District of Leyte.City of Baybay.Jaena.0176B');\n// Area::build('5th District of Leyte.City of Baybay.Jaena.0177A');\n// Area::build('5th District of Leyte.City of Baybay.Jaena.0178A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kabalasan.0179A');\n// Area::build('5th District of Leyte.City of Baybay.Kabalasan.0179B');\n// Area::build('5th District of Leyte.City of Baybay.Kabalasan.0180A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kabatuan.0181A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kabungaan.0182A');\n// Area::build('5th District of Leyte.City of Baybay.Kabungaan.0182B');\n// Area::build('5th District of Leyte.City of Baybay.Kabungaan.0183A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kagumay.0184A');\n// Area::build('5th District of Leyte.City of Baybay.Kagumay.0184B');\n// Area::build('5th District of Leyte.City of Baybay.Kagumay.0185A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kambonggan.0186A');\n// Area::build('5th District of Leyte.City of Baybay.Kambonggan.0187A');\n// Area::build('5th District of Leyte.City of Baybay.Kambonggan.0187B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kansungka.0188A');\n// Area::build('5th District of Leyte.City of Baybay.Kansungka.0189A');\n// Area::build('5th District of Leyte.City of Baybay.Kansungka.0190A');\n// Area::build('5th District of Leyte.City of Baybay.Kansungka.0190B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kantagnos.0191A');\n// Area::build('5th District of Leyte.City of Baybay.Kantagnos.0192A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0193A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0193B');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0194A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0195A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0196A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0197A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0198A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0198B');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0199A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0200A');\n// Area::build('5th District of Leyte.City of Baybay.Kilim.0201A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Lintaon.0202A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Maganhan.0203A');\n// Area::build('5th District of Leyte.City of Baybay.Maganhan.0203B');\n// Area::build('5th District of Leyte.City of Baybay.Maganhan.0204A');\n// Area::build('5th District of Leyte.City of Baybay.Maganhan.0205A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Mahayahay.0206A');\n// Area::build('5th District of Leyte.City of Baybay.Mahayahay.0206B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Mailhi.0207A');\n// Area::build('5th District of Leyte.City of Baybay.Mailhi.0208A');\n// Area::build('5th District of Leyte.City of Baybay.Mailhi.0209A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Maitum.0210A');\n// Area::build('5th District of Leyte.City of Baybay.Maitum.0210B');\n// Area::build('5th District of Leyte.City of Baybay.Maitum.0211A');\n// Area::build('5th District of Leyte.City of Baybay.Maitum.0212A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Makinhas.0213A');\n// Area::build('5th District of Leyte.City of Baybay.Makinhas.0213B');\n// Area::build('5th District of Leyte.City of Baybay.Makinhas.0214A');\n// Area::build('5th District of Leyte.City of Baybay.Makinhas.0215A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Mapgap.0216A');\n// Area::build('5th District of Leyte.City of Baybay.Mapgap.0217A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Marcos.0218A');\n// Area::build('5th District of Leyte.City of Baybay.Marcos.0218B');\n// Area::build('5th District of Leyte.City of Baybay.Marcos.0219A');\n// Area::build('5th District of Leyte.City of Baybay.Marcos.0220A');\n// Area::build('5th District of Leyte.City of Baybay.Marcos.0221A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Maslug.0222A');\n// Area::build('5th District of Leyte.City of Baybay.Maslug.0223A');\n// Area::build('5th District of Leyte.City of Baybay.Maslug.0224A');\n// Area::build('5th District of Leyte.City of Baybay.Maslug.0225A');\n// Area::build('5th District of Leyte.City of Baybay.Maslug.0226A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Matam-is.0227A');\n// Area::build('5th District of Leyte.City of Baybay.Matam-is.0227B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Maybog.0228A');\n// Area::build('5th District of Leyte.City of Baybay.Maybog.0228B');\n// Area::build('5th District of Leyte.City of Baybay.Maybog.0229A');\n// Area::build('5th District of Leyte.City of Baybay.Maybog.0230A');\n// Area::build('5th District of Leyte.City of Baybay.Maybog.0231A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Maypatag.0232A');\n// Area::build('5th District of Leyte.City of Baybay.Maypatag.0232B');\n// Area::build('5th District of Leyte.City of Baybay.Maypatag.0233A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Monterico.0234A');\n// Area::build('5th District of Leyte.City of Baybay.Monterico.0234B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Monte Verde.0235A');\n// Area::build('5th District of Leyte.City of Baybay.Monte Verde.0235B');\n//\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0236A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0236B');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0237A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0238A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0239A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0240A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0241A');\n// Area::build('5th District of Leyte.City of Baybay.Palhi.0242A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Pangasungan.0248A');\n// Area::build('5th District of Leyte.City of Baybay.Pangasungan.0249A');\n// Area::build('5th District of Leyte.City of Baybay.Pangasungan.0250A');\n// Area::build('5th District of Leyte.City of Baybay.Pangasungan.0251A');\n// Area::build('5th District of Leyte.City of Baybay.Pangasungan.0252A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Pansagan.0253A');\n// Area::build('5th District of Leyte.City of Baybay.Pansagan.0254A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Patag.0255A');\n// Area::build('5th District of Leyte.City of Baybay.Patag.0255B');\n// Area::build('5th District of Leyte.City of Baybay.Patag.0256A');\n// Area::build('5th District of Leyte.City of Baybay.Patag.0257A');\n// Area::build('5th District of Leyte.City of Baybay.Patag.0258A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0259A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0260A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0261A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0262A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0263A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0264A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0265A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0266A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0267A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0268A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0269A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0270A');\n// Area::build('5th District of Leyte.City of Baybay.Plaridel.0271A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0272A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0273A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0274A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0275A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0276A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0277A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0278A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0279A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0280A');\n// Area::build('5th District of Leyte.City of Baybay.Pomponan.0281A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Punta.0282A');\n// Area::build('5th District of Leyte.City of Baybay.Punta.0282B');\n// Area::build('5th District of Leyte.City of Baybay.Punta.0283A');\n// Area::build('5th District of Leyte.City of Baybay.Punta.0284A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Sabang.0286A');\n// Area::build('5th District of Leyte.City of Baybay.Sabang.0286B');\n// Area::build('5th District of Leyte.City of Baybay.Sabang.0287A');\n// Area::build('5th District of Leyte.City of Baybay.Sabang.0288A');\n// Area::build('5th District of Leyte.City of Baybay.Sabang.0289A');\n//\n// Area::build('5th District of Leyte.City of Baybay.San Agustin.0290A');\n// Area::build('5th District of Leyte.City of Baybay.San Agustin.0290B');\n// Area::build('5th District of Leyte.City of Baybay.San Agustin.0291A');\n// Area::build('5th District of Leyte.City of Baybay.San Agustin.0291B');\n// Area::build('5th District of Leyte.City of Baybay.San Agustin.0292A');\n//\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0293A');\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0293B');\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0294A');\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0294B');\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0295A');\n// Area::build('5th District of Leyte.City of Baybay.San Isidro.0296A');\n//\n// Area::build('5th District of Leyte.City of Baybay.San Juan.0297A');\n// Area::build('5th District of Leyte.City of Baybay.San Juan.0298A');\n// Area::build('5th District of Leyte.City of Baybay.San Juan.0299A');\n// Area::build('5th District of Leyte.City of Baybay.San Juan.0300A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Sapa.0301A');\n// Area::build('5th District of Leyte.City of Baybay.Sapa.0302A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0303A');\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0303B');\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0304A');\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0305A');\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0306A');\n// Area::build('5th District of Leyte.City of Baybay.Santa Cruz.0307A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0308A');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0308B');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0309A');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0309B');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0310A');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0311A');\n// Area::build('5th District of Leyte.City of Baybay.Santo Rosario.0312A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Villa Solidaridad.0313A');\n// Area::build('5th District of Leyte.City of Baybay.Villa Solidaridad.0313B');\n// Area::build('5th District of Leyte.City of Baybay.Villa Solidaridad.0314A');\n// Area::build('5th District of Leyte.City of Baybay.Villa Solidaridad.0315A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Villa Mag-aso.0316A');\n// Area::build('5th District of Leyte.City of Baybay.Villa Mag-aso.0317A');\n//\n// Area::build('5th District of Leyte.City of Baybay.Zacarito.0318A');\n// Area::build('5th District of Leyte.City of Baybay.Zacarito.0319A');\n\n optional(Area::where('name', '5th District of Leyte')->first())->update(['alias' => 'Kinto']);\n optional(Area::where('name', 'City of Baybay')->first())->update(['alias' => 'Baybay']);\n\n// optional(Area::where('name', 'Monte Verde')->first())->update(['alias' => 'Verde']);\n// optional(Area::where('name', 'San Isidro')->first())->update(['alias' => 'Isidro']);\n// optional(Area::where('name', 'San Juan')->first())->update(['alias' => 'Juan']);\n// optional(Area::where('name', 'Santa Cruz')->first())->update(['alias' => 'Cruz']);\n// optional(Area::where('name', 'Santo Rosario')->first())->update(['alias' => 'Rosario']);\n// optional(Area::where('name', 'Villa Solidaridad')->first())->update(['alias' => 'Solidaridad']);\n// optional(Area::where('name', 'Villa Mag-aso')->first())->update(['alias' => 'Magaso']);\n }", "title": "" }, { "docid": "33ff8f83f4cfba64593aa35581b728ab", "score": "0.45573568", "text": "function genereGrids($grids, $depth)\n {\n if ($depth == 1) {\n $gridsToReturn = array();\n $em = $this->getDoctrine()->getEntityManager();\n $repoGrid = $em->getRepository('GameBundle:Grid');\n $grid = $repoGrid->getHydratedGrid($grids->getId());\n\n foreach ($grid->getColonnes() as $colonne) {\n $slotToEdit = null;\n foreach ($colonne->getSlots() as $slot) {\n //Je récupère le dernier slot vide\n if ($slot->getPlayer() == null) {\n $slotToEdit = $slot;\n }\n }\n //Si la colonne n'est pas déjà remplie\n if (is_null($slotToEdit)) {\n //Je le set\n $slotToEdit->setPlayer($grid->getNextPlayer());\n //Je copie ma grille\n $newGrid = $grid;\n //J'enregistre ma nouvelle grille générée dans mon tableau a retourner\n array_push($gridsToReturn, $newGrid);\n //Je reset mon slot\n $slotToEdit->setPlayer(null);\n }\n }\n\n return $gridsToReturn;\n }\n\n $gridsToReturn = array();\n foreach ($grids as $grid) {\n array_push($gridsToReturn, $this->genereGrids($grid, $depth - 1));\n }\n\n return $gridsToReturn;\n }", "title": "" }, { "docid": "439a803b9c4b4eaa088ed1a7d28a0f54", "score": "0.45548406", "text": "function getGruppenFromLeistungen($arrLeistungen){\n\t\t$arrGruppen = array();\n\t\tforeach ($arrLeistungen as $objLeistung){\n\t\t\t$gruppe = $objLeistung->getSportart()->getSportartgruppe();\n\t\t\t$reihenfolge = $objLeistung->getSportart()->getReihenfolge();\n\t\n\t\t\t$arrLeistung = array();\n\t\t\t$arrLeistung['sportartname'] = $objLeistung->getSportart()->getName();\n\t\t\t$arrLeistung['ergebnisart'] = $objLeistung->getSportart()->getErgebnisart();\n\t\t\t$arrLeistung['leistungbronze'] = $objLeistung->getLeistungbronzeAsInt();\n\t\t\t$arrLeistung['leistungsilber'] = $objLeistung->getLeistungsilberAsInt();\n\t\t\t$arrLeistung['leistunggold'] = $objLeistung->getLeistunggoldAsInt();\n\t\t\t$arrLeistung['sportart'] = $objLeistung->getSportart()->getUid();\n\t\t\t$arrLeistung['leistung'] = $objLeistung->getUid();\n\t\t\t$arrLeistung['reihenfolge'] = $reihenfolge;\n\t\t\t$arrGruppen[$gruppe][] = $arrLeistung;\n\t\t}\n\t\t\n\t\tforeach($arrGruppen as $intGruppe => $arrGruppe){\n\t\t\tusort($arrGruppe, array('Tx_Blsvsa2013_Service_Ergebnisse', 'cmpReihenfolge'));\n\t\t\t$arrGruppen[$intGruppe] = array_values($arrGruppe);\n\t\t}\n\t\treturn $arrGruppen;\n\t}", "title": "" }, { "docid": "0ca83a9b5d41384c46071645d2890164", "score": "0.4545459", "text": "public function applyHints(): void\n {\n foreach ($this->worlds as $world) {\n if ($world->config('spoil.Hints') !== 'on') {\n $world->setText('sign_north_of_links_house', \"Randomizer v31\\n\\n> -veetorp\");\n continue;\n }\n\n $tiles = fy_shuffle([\n 'telepathic_tile_eastern_palace',\n 'telepathic_tile_tower_of_hera_floor_4',\n 'telepathic_tile_spectacle_rock',\n 'telepathic_tile_swamp_entrance',\n 'telepathic_tile_thieves_town_upstairs',\n 'telepathic_tile_misery_mire',\n 'telepathic_tile_palace_of_darkness',\n 'telepathic_tile_desert_bonk_torch_room',\n 'telepathic_tile_castle_tower',\n 'telepathic_tile_ice_large_room',\n 'telepathic_tile_turtle_rock',\n 'telepathic_tile_ice_entrace',\n 'telepathic_tile_ice_stalfos_knights_room',\n 'telepathic_tile_tower_of_hera_entrance',\n 'telepathic_tile_south_east_darkworld_cave',\n ]);\n $locations = fy_shuffle([\n \"Sahasrahla\",\n \"Mimic Cave\",\n \"Catfish\",\n \"Graveyard Ledge\",\n \"Purple Chest\",\n \"Tower of Hera - Big Key Chest\",\n \"Swamp Palace - Big Chest\",\n [\"Misery Mire - Big Key Chest\", \"Misery Mire - Compass Chest\"],\n [\"Swamp Palace - Big Key Chest\", \"Swamp Palace - West Chest\"],\n [\"Pyramid Fairy - Left\", \"Pyramid Fairy - Right\"],\n ]);\n\n if ($world->config('region.wildBigKeys', false)) {\n $gtbk_location = $world->getLocationsWithItem(Item::get('BigKeyA2', $world))->first();\n\n if ($gtbk_location) {\n $tile = array_pop($tiles);\n $gtbk_hint = $gtbk_location->getHint();\n\n Log::debug(\"$tile: $gtbk_hint\");\n $world->setText($tile, $gtbk_hint);\n }\n }\n\n $boots_location = $world->getLocationsWithItem(Item::get('PegasusBoots', $world))->first();\n if ($boots_location) {\n $tile = array_pop($tiles);\n $boots_hint = $boots_location->getHint();\n\n Log::debug(\"$tile: $boots_hint\");\n $world->setText($tile, $boots_hint);\n }\n\n $picks = range(0, count($locations) - 1);\n for ($i = 0; $i < 5; ++$i) {\n $picks = fy_shuffle($picks);\n $pick = $locations[array_pop($picks)];\n\n if (is_array($pick)) {\n $hint = $world->getLocations()->filter(function ($location) use ($pick) {\n return in_array($location->getName(), $pick);\n })->getHint();\n } else {\n $hint = $world->getLocation($pick)->getHint();\n }\n\n if (!$hint) {\n continue;\n }\n $tile = array_pop($tiles);\n\n Log::debug(\"$tile: $hint\");\n $world->setText($tile, $hint);\n }\n\n $hintables = array_filter($this->advancement_items, function ($item) use ($world) {\n return !$item instanceof Item\\Shield\n && !$item instanceof Item\\Key\n && !$item instanceof Item\\Map\n && !$item instanceof Item\\Compass\n && ($world->config('region.wildBigKeys', false) || !$item instanceof Item\\BigKey)\n && !$item instanceof Item\\Bottle\n && !$item instanceof Item\\Sword\n && !in_array($item->getRawName(), ['TenBombs', 'HalfMagic', 'BugCatchingNet', 'Powder', 'Mushroom']);\n });\n\n $hints = array_slice(fy_shuffle($hintables ?? []), 0, min(4, count($tiles)));\n\n $hints = array_filter(array_map(function ($item) use ($world) {\n return $world->getLocationsWithItem($item)->filter(function ($location) {\n return !$location instanceof Location\\Medallion\n && !$location instanceof Location\\Fountain\n && !$location instanceof Location\\Prize\n && !$location instanceof Location\\Trade;\n })->random();\n }, $hints));\n\n $locations_with_item = $world->getLocationsWithItem()->filter(function ($location) use ($world) {\n $item = $location->getItem();\n return !$location instanceof Location\\Medallion\n && !$location instanceof Location\\Fountain\n && !$location instanceof Location\\Prize\n && !$location instanceof Location\\Trade\n && !$item instanceof Item\\Key\n && !$item instanceof Item\\Map\n && !$item instanceof Item\\Compass\n && ($world->config('region.wildBigKeys', false) || !$item instanceof Item\\BigKey);\n });\n\n $hint_locations = $locations_with_item->randomCollection(get_random_int((int) (floor((count($tiles) - count($hints)) / 2) - 1), count($tiles) - count($hints) - 1))->merge($hints);\n\n foreach ($tiles as $tile) {\n $hint = $hint_locations->pop();\n $hint_text = ($hint ? $hint->getHint() : null) ?? Arr::first(fy_shuffle($this->joke_hints));\n\n Log::debug(str_replace(\"\\n\", \" \", \"$tile: $hint_text\"));\n $world->setText($tile, $hint_text);\n }\n }\n }", "title": "" }, { "docid": "cf3bc46f94b6a035e1f1f9f3dce16b7a", "score": "0.45413405", "text": "abstract public function multiSet(array $pairs);", "title": "" }, { "docid": "d66931b4e95c494e11d1e904d2cff144", "score": "0.45370102", "text": "function multiMerge() {\n\t\t$args = func_get_args();\n\t\t$first = array_shift( $args );\n\t\tif ( !isset( $args[0] ) ) {\n\t\t\treturn $first;\n\t\t}\n\t\tforeach ( $args as $arg ) {\n\t\t\tforeach ( $arg as $key1 => $value1 ) {\n\t\t\t\tif ( is_array( $value1 ) ) {\n\t\t\t\t\tif ( isset( $first[ $key1 ] ) ) {\n\t\t\t\t\t\tforeach ( $value1 as $key2 => $value2 ) {\n\n\t\t\t\t\t\t\tif ( is_array( $value2 ) ) {\n\t\t\t\t\t\t\t\tif ( isset( $first[ $key1 ][ $key2 ] ) ) {\n\n\t\t\t\t\t\t\t\t\tforeach ( $value2 as $key3 => $value3 ) {\n\n\t\t\t\t\t\t\t\t\t\tif ( is_array( $value3 ) ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( isset( $first[ $key1 ][ $key2 ][ $key3 ] ) ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $value3 as $key4 => $value4 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( is_array( $value4 ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( isset( $first[ $key1 ][ $key2 ][ $key3 ][ $key4 ] ) ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $value4 as $key5 => $value5 ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( is_array( $value5 ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( isset( $first[ $key1 ][ $key2 ][ $key3 ][ $key4 ][ $key5 ] ) ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\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$first[ $key1 ][ $key2 ][ $key3 ][ $key4 ][ $key5 ] = $value5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\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\tif ( is_numeric( $key5 ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( !in_array( $value5 , $first[ $key1 ][ $key2 ][ $key3 ][ $key4 ] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ][ $key3 ][ $key4 ][] = $value5;\n\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\tcontinue;\n\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$first[ $key1 ][ $key2 ][ $key3 ][ $key4 ][ $key5 ] = $value5;\n\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\tcontinue;\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\t\t\t\t\t$first[ $key1 ][ $key2 ][ $key3 ][ $key4 ] = $value4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\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\tif ( is_numeric( $key4 ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( !in_array( $value4 , $first[ $key1 ][ $key2 ][ $key3 ] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ][ $key3 ][] = $value4;\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\t\t\t\t\tcontinue;\n\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$first[ $key1 ][ $key2 ][ $key3 ][ $key4 ] = $value4;\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\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ][ $key3 ] = $value3;\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( is_numeric( $key3 ) ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( !in_array( $value3 , $first[ $key1 ][ $key2 ] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ][] = $value3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ][ $key3 ] = $value3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ] = $value2;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( is_numeric( $key2 ) ) {\n\t\t\t\t\t\t\t\tif ( !in_array( $value2 , $first[ $key1 ] ) ) {\n\t\t\t\t\t\t\t\t\t$first[ $key1 ][] = $value2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$first[ $key1 ][ $key2 ] = $value2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$first[ $key1 ] = $value1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( is_numeric( $key1 ) ) {\n\t\t\t\t\tif ( !in_array( $value1 , $first ) ) {\n\t\t\t\t\t\t$first[] = $value1;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$first[ $key1 ] = $value1;\n\t\t\t}\n\t\t}\n\n\t\treturn $first;\n\t}", "title": "" }, { "docid": "81fd039ee0ebecc877036a36e04a8064", "score": "0.45268402", "text": "function cartesian($input) {\n $input = array_filter($input);\n\n $result = array(array());\n\n foreach ($input as $key => $values) {\n $append = array();\n\n foreach($result as $product) {\n foreach($values as $item) {\n if($key == 0)\n $product['color'] = $item;\n if($key == 1)\n $product['design'] = $item;\n $append[] = $product;\n }\n }\n\n $result = $append;\n }\n\n return $result;\n}", "title": "" }, { "docid": "0f3f5aa9ee50913eb63b05ffdd861ac1", "score": "0.45232865", "text": "private function _setGridValues()\n {\n for($i = 0; $i < $this->gridRow; $i++) {\n for($j = 0; $j < $this->gridColumn; $j++) {\n // BEGIN set obstacle for grid\n if(\n ($i == 0 || $i == ($this->gridRow - 1)) \n && ($j >= 0 && $j < $this->gridColumn)\n ) {\n $this->coord[$i][$j] = \"#\";\n } else if(\n ($j == 0 || $j == ($this->gridColumn - 1)) \n && ($i >= 0 && $i < $this->gridRow)\n ) {\n $this->coord[$i][$j] = \"#\";\n } else if($i == 2 && ($j >= 2 && $j <= 4)) {\n $this->coord[$i][$j] = \"#\";\n } else if($i == 3 && ($j == 4 || $j == 6)) {\n $this->coord[$i][$j] = \"#\";\n } else if($i == 4 && $j == 2) {\n $this->coord[$i][$j] = \"#\";\n }\n // END set obstacle for grid \n\n // BEGIN set starting position\n else if($i == 4 && $j == 1) {\n $this->coord[$i][$j] = \"X\";\n\n $userPosition = new stdClass();\n $userPosition->row = $i;\n $userPosition->column = $j;\n $this->currUserPosition = $userPosition;\n }\n // END set starting position\n else {\n $this->coord[$i][$j] = \".\";\n \n // add coord to clearPathCoord\n $clearPath = new stdClass();\n $clearPath->row = $i;\n $clearPath->column = $j;\n $this->clearPathCoord[\"{$clearPath->row}::{$clearPath->column}\"] = $clearPath;\n }\n }\n }\n }", "title": "" }, { "docid": "9f9dee6a1ebe570e6377ec1f7f8cee77", "score": "0.4509305", "text": "public function run()\n {\n $gewogs = [\n [\n 'ཆོས་འཁོར།',\n 'ཆུ་སྨད།',\n 'སྟང་།',\n 'ཨུ་ར།'\n ],\n [\n 'བསམ་འཕེལ་གླིང་།',\n 'བྱག་ཕྱོགས།',\n 'སྱོང་སྒོར།',\n 'སྐྱབས་ཆ།',\n 'དར་ལ།',\n 'གདུང་ནག',\n 'དགེ་གླིང་།',\n 'འགྱེད་ཏ་ན།',\n 'ལྱོག་ཅི་ན།',\n 'སྨད་ཏ་ཁ།',\n 'ཕུན་ཚྱོགས་གླིང་།',\n 'ཕུན་ཚྱོགས་གླིང་ཁྲོམ།',\n ],\n [\n '་རྱོ་ན།',\n 'འབྲུག་རྒྱལ་སྒང་།',\n 'གེ་སར་གླིང་།',\n 'རྒ་ཤི།',\n 'དཀར་ནག',\n 'ཁེ་སྦིས་ས།',\n 'ལ་རྒྱབ།',\n 'བཀྲིས་གླིང་།',\n 'བཙན་མདའ་སྒང་།',\n 'བརྩེ་བཟའ།',\n 'ཚངས་ཁ།',\n 'མདེའུ་ར་ལི།',\n 'ལྷ་མྱོ་རྫིང་ཁ།',\n 'ནི་ཆུ་ལ།',\n 'དར་དཀར་ཁྲོམ།',\n ],\n [\n 'ཁ་སྨད།',\n 'ཁ་སྟྱོད།',\n 'ལ་ཡག',\n 'ལུང་ནག་ནང་།',\n ],\n [\n 'དགའ་སྐྱིད་གླིང་།',\n 'སྦྱིས།',\n 'དབུས་སུ།',\n 'ཀར་ཚྱོ།',\n 'ས་དམར།',\n 'གསང་སས།',\n 'ཧཱ་ཁྲོམ།' \n ],\n [\n 'བཙན་མཁར།',\n 'སྒང་ཟུར།',\n 'རྒྱ་ར།',\n 'མཁོ་མ།',\n 'ཀུར་སྟྱོད།',\n 'སྨན་སྦིས།',\n 'སྨིན་རྒྱས།',\n 'སྨད་ཚྱོ།',\n 'ཕ་གླིང་ཁྲོམ།',\n ],\n [\n 'ལྕགས་ས་མཁར།',\n 'བ་ལེམ།',\n 'ཆ་གླིང་།',\n 'འབྲས་སྤུང་།',\n 'དགྲ་མེད་རྩེ།',\n 'དགོངས་འདུས།',\n 'འགྱུར་མེད།',\n 'སྐྱེང་མཁར།',\n 'མྱོང་སྒར།',\n 'སྔ་ཚང་།',\n 'ས་གླིང་།',\n 'ཤེར་མུ་ཧཱུཾ།',\n 'སྲི་ལམ་སྦིས།',\n 'ཐང་རྱོང་།',\n 'རྩ་མང་།',\n 'ཙཀྐླིང་། ཙ་ཀ་གླིང་།',\n 'ན་རང་།',\n ],\n [\n 'ལུགས་གཉིས།',\n 'རྱོ་དཀར།',\n 'རྱོསཔྱོ་ཤར་རི།',\n 'རྱོ་སྟེང་།',\n 'ཧཱུཾ་རལ།',\n 'ལམ་གོང་།',\n 'ནག་རྒྱ།',\n 'ཤར་པ།',\n 'ཁྲོམ།',\n 'བཙན་མདྱོ།',\n 'ཝང་ཅང་།',\n ],\n [\n 'ཕྱི་མུང་།',\n 'ཅོང་ཤིང་།',\n 'གདུང་མིན།',\n 'མཁར།',\n 'ཤུ་མར།',\n 'གཡུ་རུང་།',\n 'བཟྱོ་འབེལ།',\n 'ཆོས་འཁོར་གླིང་།',\n 'བདེ་ཆེན་གླིང་།',\n 'ན་ནྱོང་།',\n 'ནྱོར་བུ་སྒང་།', \n ],\n [\n 'འཛྱོམས་སྨད་ས།',\n 'ཆུ་སྦུག',\n 'དགོན་ཤར་རི།',\n 'སྒུ་མ།',\n 'ཀར་སྦྱིས་ས།',\n 'གླིང་མུ་ཁ།',\n 'ཤེལ་རྔ་ནང་།',\n 'རྟ་ལྱོག',\n 'སྟྱོད་ཝང་།',\n 'བརཔ།',\n 'སྟྱོདཔ།',\n 'ཁུ་རུ་ཐང་ཁྲོམ།',\n ],\n [\n 'སྒོམ་དར།',\n 'གླང་ཆེན་ཕུག',\n 'ལའུ་རི།',\n 'དམར་རྩ་ལ།',\n 'ཨོ་རྱོང་།',\n 'པདྨ་ཐང་།',\n 'ཕུན་ཚྱོགས་ཐང་།',\n 'བསམ་རང་།',\n 'གསེར་ཐིག',\n 'བདེ་བ་ཐང་།',\n 'ཝང་ཕུ།',\n 'བསམགྲུབ་ལྗོངས་མཁར་ཁྲོམ།',\n ],\n [\n 'ནྱོར་རྒྱས་སྒང་།',\n 'པདྨ་གླིང་།',\n 'གསང་སྔགས་ཆོས་གླིང་།',\n 'ནྱོར་བུ་སྒང་།',\n 'ལྡན་ཆུ་ཁ།',\n 'རྱོ་ཕུ་ཅན།',\n 'དུམ་སྟྱོད།',\n 'འྱོད་གསལ་རྩེ།',\n 'རྣམ་རྒྱལ་ཆོས་གླིང་།',\n 'ཨུ་རྒྱན་རྩེ།',\n 'ཕུན་ཚྱོགས་དཔལ་རི།',\n 'བསམ་རྩེ།',\n 'བཀྲིས་ཆོས་གླིང་།',\n 'རྟ་ལྡིང་།',\n 'བརྟན་འབྲུ།',\n ],\n [\n 'འབུར།',\n 'ཆུ་གཟར་སྒང་།',\n 'བདེ་སྐྱིད་གླིང་།',\n 'རྱོ་བཱན།',\n 'དགེ་ལེགས་ཕུག',\n 'ཧིལ་ལེ།',\n 'འཇིགས་མེད་ཆོས་གླིང་།',\n 'ཤྱོམ་སྤང་ཁ།',\n 'གསེར་གཤྱོང་།',\n 'སེང་གེ།',\n 'སྟག་ལེགས།',\n 'ཨུམ་གླིང་།',\n 'དགེ་ལེགས་ཕུག་ཁྲོམ།',\n ],\n [\n 'ཅང་།',\n 'དར་དཀར་ལ།',\n 'དགེ་བསྙེན།',\n 'ཀ་ཝང་།',\n 'གླིང་བཞི།',\n 'སྨད་ཝང་།',\n 'ན་རྱོ།',\n 'སྱོས།',\n 'ཐིམ་ཁྲོམ།',\n ],\n [\n 'བར་མཚམས།',\n 'སྦིས་གདུང་།',\n 'བཀང་ལུང་།',\n 'རྐང་པར་ར།',\n 'ཁ་གླིང་།',\n 'ཀླུ་མང་།',\n 'མེ་རག',\n 'ཕྱོངས་མེད།',\n 'ད་དྷི།',\n 'སག་སྟེང་།',\n 'བསམ་མཁར།',\n 'གཤྱོང་ཕུ།',\n 'ཁྲིམས་ཤིང་།',\n 'ཨུ་མཛྱོ་རྱོང་།',\n 'ཡངས་གཉེར།',\n ],\n [\n 'འབུམ་སྡེ་གླིང་།',\n 'འཇམ་མཁར།',\n 'ཁམས་དྭངས།',\n 'རམ་སྦྱར།',\n 'སྟྱོད་ཚྱོ།',\n 'སྟྱོང་ཞང་།',\n 'ཡ་ལངས།',\n 'གཡང་རྩེ།',\n ],\n [\n 'བྲག་སྟེང་།',\n 'སྐོར་ཕུ།',\n 'གླང་མཐིལ།',\n 'ནུབ་སྦིས།',\n 'སྟང་སི་སྦིས།',\n ],\n [\n 'བར་གཤྱོང་།',\n 'བི་ཏི་ནི།',\n 'དུང་ལ་སྒང་།',\n 'སྒོ་གསར་གླིང་།',\n 'དཀྱིལ་འཁོར་ཐང་།',\n 'མཎྜལ་སྒང་།',\n 'པ་ཏ་ལ།',\n 'ཕུན་སྟེང་ཆུ།',\n 'རང་ཐང་གླིང་།',\n 'སེམས་རྱོང་།',\n 'མཚྱོ་གླིང་མཁར།',\n 'རྩི་རང་སྟྱོད།',\n ],\n [\n 'ཨ་ཐང་།',\n 'སྦྱེས་ནག',\n 'མདའ་དགའ།',\n 'དྭངས་ཆུ།',\n 'སྒང་སྟྱོད།',\n 'སྒ་སེང་ཚྱོ་གོངམ།',\n 'སྒ་སེང་ཚྱོ་འྱོགམ།',\n 'ཀ་གཞི།',\n 'ན་ཧིང་།',\n 'ཉི་ཤྱོ།',\n 'ཕངས་ཡུལ།',\n 'ཕྱོབ་སྦྱིས།',\n 'རུ་སྦིས་ས།',\n 'སས་ཕུ།',\n 'ཐེད་ཚྱོ།',\n 'བ་ཇོ་ཁྲོམ།',\n ],\n [\n 'བར་དྱོ།',\n 'འབྱྱོག་དཀར།',\n 'སྒོ་ཤིང་།',\n 'ནང་སྐོར།',\n 'ངང་ལ།',\n 'འཕངས་མཁར།',\n 'ཤིང་མཁར།',\n 'བཀྲོང་།',\n 'གཞལམ་སྒང་ཁྲོམ།',\n ]\n ];\n for ($i=0; $i < count($gewogs); $i++) { \n for ($j=0; $j < count($gewogs[$i]); $j++) { \n Gewog::create([\n 'name' => $gewogs[$i][$j],\n 'dzongkhag_id' => $i+1,\n ]);\n }\n }\n }", "title": "" }, { "docid": "fdaec1ec2431efde3cd9e2795bb9b92d", "score": "0.4508646", "text": "function itineraire ($ligne){\n $x = 0;\n $y = 0;\n $coordonnees = [];\n\n for ($i = 0 ; $i <= 300; $i++){\n if ($ligne[$i][0] == \"R\"){\n $num = intval(substr($ligne[$i],1));\n $x += $num;\n $coordonnees[] = [$x,$y];\n }\n elseif($ligne[$i][0] == \"L\"){\n $num = intval(substr($ligne[$i],1));\n $x -= $num;\n $coordonnees[] = [$x,$y];\n \n }\n elseif($ligne[$i][0] == \"U\"){\n $num = intval(substr($ligne[$i],1));\n $y += $num;\n $coordonnees[] = [$x,$y];\n \n }\n elseif($ligne[$i][0] == \"D\"){ \n $num = intval(substr($ligne[$i],1));\n $y -= $num;\n $coordonnees[] = [$x,$y];\n \n } \n }\n return $coordonnees;\n \n }", "title": "" }, { "docid": "e4ad4820e00cffa36128ddeb690565db", "score": "0.45077303", "text": "function create256tiles(){\r\n\r\n for($i = 0; $i < 4; $i++){\r\n for ($j = 0; $j < 4; $j++){\r\n\r\n $ij = \"images/\" . $i . $j . \".jpg\";\r\n\r\n if(file_exists($ij)){\r\n\r\n list($width, $height) = getimagesize($ij);\r\n\r\n $image_p = imagecreatetruecolor(800, 800);\r\n $image = imagecreatefromjpeg($ij);\r\n\r\n imagecopyresampled($image_p, $image, 0,0,0,0, 800, 800, $width, $height);\r\n\r\n imagejpeg($image_p, \"images/\" . $i . $j . \"temp.jpg\");\r\n imagedestroy($image_p);\r\n\r\n for ($n = 0; $n < 4; $n++){\r\n for ($m = 0; $m < 4; $m++){\r\n\r\n echo $i . $j . $n . $m;\r\n echo \"\\n\";\r\n\r\n $image_p = imagecreatetruecolor(200, 200);\r\n\r\n $image = imagecreatefromjpeg(\"images/\" . $i . $j . \"temp.jpg\");\r\n\r\n imagecopyresampled($image_p, $image, 0,0, $i*200 + $n*50, $j*200 + $m*50, 800, 800, 200, 200);\r\n\r\n // $image_p = imagecrop($image, ['x' => $i*200 + $n*50, 'y' => $j*200 + $m*50, 'width' => 50, 'height' => 50]);\r\n imagejpeg($image_p, 'test/'. $i . $n . $j . $m . '.jpg');\r\n\r\n imagedestroy($image_p);\r\n imagedestroy($image);\r\n\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n}\r\n}", "title": "" }, { "docid": "3e0efd4d689fb09220b8258c4f3c5c4a", "score": "0.4502689", "text": "function getMap($value) { switch ($value) { \ncase 0: $map=\"Lorencia\"; break;\ncase 1: $map=\"Dungeon\"; break;\ncase 2: $map=\"Devias\"; break;\ncase 3: $map=\"Noria\"; break;\ncase 4: $map=\"LostTower\"; break;\ncase 5: $map=\"Exile\"; break;\ncase 6: $map=\"Arena\"; break;\ncase 7: $map=\"Atlans\"; break;\ncase 8: $map=\"Tarkan\"; break;\ncase 9: $map=\"DevilSquare\"; break;\ncase 32: $map=\"DevilSquare\"; break;\ncase 10: $map=\"Icarus\"; break;\ncase 11: $map=\"BloodCastle1\"; break;\ncase 12: $map=\"BloodCastle2\"; break;\ncase 13: $map=\"BloodCastle3\"; break;\ncase 14: $map=\"BloodCastle4\"; break;\ncase 15: $map=\"BloodCastle5\"; break;\ncase 16: $map=\"BloodCastle6\"; break;\ncase 17: $map=\"BloodCastle7\"; break;\ncase 52: $map=\"BloodCastle8\"; break;\ncase 18: $map=\"ChaosCastle1\"; break;\ncase 19: $map=\"ChaosCastle2\"; break;\ncase 20: $map=\"ChaosCastle3\"; break;\ncase 21: $map=\"ChaosCastle4\"; break;\ncase 22: $map=\"ChaosCastle5\"; break;\ncase 23: $map=\"ChaosCastle6\"; break;\ncase 53: $map=\"ChaosCastle7\"; break;\ncase 24: $map=\"Kalima1\"; break;\ncase 25: $map=\"Kalima2\"; break;\ncase 26: $map=\"Kalima3\"; break;\ncase 27: $map=\"Kalima4\"; break;\ncase 28: $map=\"Kalima5\"; break;\ncase 29: $map=\"Kalima6\"; break;\ncase 36: $map=\"Kalima7\"; break;\ncase 30: $map=\"ValleyOfLoren\"; break;\ncase 31: $map=\"LandOfTrial\"; break;\ncase 40: $map=\"Silent\"; break;\ncase 33: $map=\"Aida\"; break;\ncase 34: $map=\"Crywolf\"; break;\ncase 57: $map=\"Raklion\"; break;\ncase 58: $map=\"Hatchery\"; break;\ncase 51: $map=\"Elbeland\"; break;\ncase 56: $map=\"Swamp\"; break;\ncase 37: $map=\"Kantru1\"; break;\ncase 38: $map=\"Kantru2\"; break;\ncase 45: $map=\"Illusion Temple\"; break;\ncase 39: $map=\"KantruTower\"; break;\ncase 41: $map=\"Barracks\"; break;\ncase 42: $map=\"Refuge\"; break;\ncase 63: $map=\"Vulcanus\"; break;\ncase 62: $map=\"Santa's Village\"; break;\ncase 64: $map=\"DuelArena\"; break;\ncase 79: $map=\"Loren Market\"; break;\ncase 69: $map=\"Varka\"; break;\ncase 80: $map=\"Kalrutan\"; break;\ncase 81: $map=\"Kalrutan\"; break;};\nreturn $map;\n}", "title": "" }, { "docid": "fc0469d8a79031cc3847c6b23aa54ba1", "score": "0.4502072", "text": "public function run()\n {\n $list1 = array('Agadir'=>'80000' , 'Drargua' => 80650, 'Aourir'=> 80750 , 'Tamri'=>80502,\n 'Tiqqi'=> 80324, 'Amskroud'=>80302, 'Imouzzer'=> 80303, 'Tadrart'=>80326,'Talborjt'=>80000,\n 'Taghazout'=>80022, 'Aqesri'=>80322, 'Idmine'=>80323, 'Aziar'=>80325);\n\n\n $list2 = array('Ait Amira'=>87052, 'Ouad Essafa'=>87223, 'Biougra'=>87200,\n 'Sidi Bibi'=>87274, 'Belfaa'=>87252, 'Inchaden'=>87272, 'Massa'=>87452,\n 'Imi Mqourn'=>87222,'Ait Milk'=>87273, 'Sidi Abdallah El Bouchouari'=>87126,\n 'Ait Ouadrim'=>87132,'Targua Ntouchka'=>87122,\n 'Ait Baha'=>87100,'Tanalt'=>87552,\n 'Ida Ougnidif'=>87402 );\n\n\n $list3 = array('Ait Melloul'=>86150, 'Inezgane'=>86350,\n 'Dcheira El Jihadia'=>86360, 'Lqliaa'=>86356, 'Temsia'=>86602, 'Oulad Dahou'=>86622);\n\n\n $list4 =array('Taroudannt'=>83000, 'Oulad Teima'=>83350,\n 'Aoulouz'=>83052, 'Oulad Berhil'=>83300,\n 'Issen'=>83374, 'Ait Iaaza'=>83200, 'Machraa El Ain'=>83024,\n 'Ait Igas'=>83222, 'Zaouia Sidi Tahar'=>83042,\n 'Iguidi'=>83173, 'IMILMAISS'=>83123, 'Toubkal'=>83175, 'Sidi Borja'=>83026,\n 'Lakhnafif'=>83423,'Agadir Melloul'=>83532, 'Toughmart'=>83333, 'Ouneine'=>83472,\n 'Assaki'=>83523, 'Tisrasse'=>83074);\n\n\n $list5 = array('Tata'=>84000, 'Tissint'=>84053, 'Foum Zguid'=>84150,\n 'Allougoum'=>84172, 'Akka'=>84050,\n 'Kasbat Sidi Abdellah Ben M\\'Barek'=>84100, 'Akka Ighane'=>84022, 'Tlite'=>84174,\n 'Tagmout'=>84025, 'Tizaghte'=>84075, 'Ibn Yacoub'=>84026);\n\n\n $list6=array('Tiznit'=> 85000,'Tnine Aglou'=>85004,'Reggada'=>85023,\n 'Arbaa Sahel'=>85002,'Tighmi'=>85102,'Arbaa Ait Ahmed'=>85123,'El Maader El Kabir'=>85022,\n 'Arbaa Rasmouka'=>85152,'Sidi Bouabdelli'=>85422,'Anzi'=>85103,\n 'Tafraout'=>85450,'Tafraout El Mouloud'=>85124);\n\n $list=array('1'=>$list1,'2'=>$list2,'3'=>$list3,'4'=>$list4,'5'=>$list5,'6'=>$list6);\n foreach ($list as $k => $data)\n foreach ($data as $item=>$zip)\n {\n $v = City::firstOrNew(['name' => $item,'zipcode'=>$zip,'subdivision_id' => $k]);\n if (!$v->exists) {\n $v->save();\n }\n }\n\n }", "title": "" }, { "docid": "d8742a8ace8b92f489410257a4ebdaf8", "score": "0.4499366", "text": "function get_labeled_sites_seq($sites_info,&$labeled_sites_seq,$pos_text,$label_text,$up_string, $down_string, $main_string, $addspace,$left_pos,$right_pos,$orientation,$join_pos,$sites_name_global,$sites_color_global)\n{\n\tglobal $GENOME_LENGTH;\n//\tglobal $sites_name_global;\n//\tglobal $sites_color_global;\n\t$labeled_sites_seq=\"<FONT style=\\\"background-color:white; font-family:'Courier New'; font-size:14px\\\" color=\\\"black\\\">\";\n//\t$pos_text=\"<FONT style=\\\"background-color:white; font-family:'Courier New'; font-size:14px\\\" color=\\\"black\\\">\";\n//\t$labeled_seq =\"<FONT style=\\\"background-color:white; font-family:'Courier New'; font-size:14px\\\" color=\\\"black\\\">\";\n\t\t$line_len =50;\n\t\t$sep_len = 10;\n\t$sites_left_end=array();$sites_right_end=array();$sites_color=array();$sites_name=array();\n\t\t\n\t$sites_info_num = count($sites_info);\n\t$i = 0;\n\tfor ($k=0; $k<$sites_info_num;$k++)\n\t\t{\n\t\t\t$sites_left_end[$k]=$sites_info[$k][\"left_end\"];\n\t\t\t$sites_right_end[$k]=$sites_info[$k][\"right_end\"];\n\t\t\t\n\t\t\tif(in_array($sites_info[$k][\"name\"],$sites_name_global))\n\t\t\t{\n\t\t\t\t$key = array_search($sites_info[$k][\"name\"],$sites_name_global);\t\t\t\t\n\t\t\t\t$sites_color[$k]=$sites_color_global[$key];\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sites_color[$k]= get_random_color();\n\t\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$sites_name[$k]=$sites_info[$k][\"name\"];\n\t\t\t\n\t\t}\n\n\t\n\t$stack = array();\n\t$stack_font = array();\n\t\n//\tdraw up string\t\t\n\t$up_str_len = strlen($up_string);\n\t$pad_num = 0; \t\n\t\n\t\n\tif(strlen($up_string)%$line_len!=0)\n\t{\n\t\t$pad_num = $line_len-strlen($up_string)%$line_len;\n\t\t$up_string = str_pad($up_string,strlen($up_string)+$line_len-strlen($up_string)%$line_len, \" \", STR_PAD_LEFT);\n\t}\n\t\n\t$str_len = strlen($up_string);\n\t\t\t\n\tfor ($i=0; $i<strlen($up_string);$i++)\n\t{\n\n\t\tif($i==0){\n\n\t\t\t$labeled_sites_seq = $labeled_sites_seq;\n\t\t}\n\n\n\t\tif (!($i % $line_len)==0 && ($i % $sep_len)==0) {\n\n\t\t\t$labeled_sites_seq = $labeled_sites_seq. \" \";\n\t\t}\n\t\t$abs_pos=0;\n\t\t$keys = array();\n\n\t\tif($i>$pad_num)\n\t\t{\n\n\t\t\tif($orientation==\"Clockwise\")\n\t\t\t{\n\t\t\t\t$abs_pos = intval(-$up_str_len)+intval(-$pad_num)+$left_pos+$i;\n\t\t\t\tif($abs_pos<1)\n\t\t\t\t{\n\t\t\t\t\t$abs_pos = $abs_pos + $GENOME_LENGTH;\n\t\t\t\t}\n\t\t\t\t$keys = array_keys($sites_left_end,$abs_pos);\n\t\t\t\t//\t\t\t\t\tif($keys)\n\t\t\t\t//\t\t\t\techo \"<br>in open\\$abs_pos \".$abs_pos.\"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$abs_pos = intval($up_str_len)+intval($pad_num) + $right_pos -$i;\n\t\t\t\tif($abs_pos > $GENOME_LENGTH)\n\t\t\t\t{\n\t\t\t\t\t$abs_pos = $abs_pos - $GENOME_LENGTH;\n\t\t\t\t}\n\n\t\t\t\t$keys = array_keys($sites_right_end,$abs_pos);\n\t\t\t}\n\n\t\t\tif(count($keys)>0){\n//\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, &$stack, &$stack_font, &$labeled_sites_seq);\n\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, $stack, $stack_font, $labeled_sites_seq);\n\n\t\t\t}\n\t\t}\n\t\t$labeled_sites_seq = $labeled_sites_seq. $up_string[$i];\n\t\tif($i>$pad_num)\n\t\t{\n\t\t\t$keys = array();\n\n\t\t\tif($orientation==\"Clockwise\")\n\t\t\t{\n\t\t\t\t$keys = array_keys($sites_right_end, $abs_pos);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$keys = array_keys($sites_left_end,$abs_pos);\n\t\t\t}\n\n\t\t\tif(count($keys)>0)\n\t\t\t{\n\t\t\t\tpop_font($keys, $stack, $stack_font, $labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n//\t\t\t\tpop_font($keys, &$stack, &$stack_font, &$labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n\n\t\t\t}\n\t\t}\n\n\t\tif (((($i+1) % ($line_len))==0) && ($i>0)) {\n\n\t\t\t$labeled_sites_seq = $labeled_sites_seq. \"\\n\";\n\t\t}\n\n\t}\n\n\tif($i>0)\n\t{\n\t\t$labeled_sites_seq = $labeled_sites_seq. \"\\n\";\n\t}\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n//main string here\n\t\t\t$main_str_len = strlen($main_string);\n\t\t\t\t\t\t\n\t\t\tfor ($i=0; $i<$main_str_len;$i++) {\n\n\t\t\t\tif (($i % $line_len)==0) { \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tif($i>0){\n\t\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. \"\\n\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (($i % $sep_len)==0) {\n\n\t\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. \" \";\n\t\t\t\t}\t\t\n\t\t\t\t$abs_pos=0;\n\t\t\t\t$keys = array();\t\t\t\t\n\t\t\t\tif($orientation==\"Clockwise\")\n\t\t\t\t{\n\t\t\t\t\t$abs_pos =$left_pos+$i;\n\t\t\t\t\tif($abs_pos > $GENOME_LENGTH)\n\t\t\t\t\t{\n\t\t\t\t\t\t$abs_pos = $abs_pos - $GENOME_LENGTH;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$keys = array_keys($sites_left_end, $abs_pos);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$abs_pos = $right_pos -$i;\n\t\t\t\t\t\n\t\t\t\t\tif($abs_pos<1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$abs_pos = $abs_pos + $GENOME_LENGTH;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$keys = array_keys($sites_right_end,$abs_pos);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(count($keys)>0)\n\t\t\t\t{\n//\t\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, &$stack, &$stack_font, &$labeled_sites_seq);\n\t\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, $stack, $stack_font, $labeled_sites_seq);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. $main_string[$i];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t$keys = array();\t\n\t\t\t\t\tif($orientation==\"Clockwise\")\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$keys = array_keys($sites_right_end,$abs_pos);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$keys = array_keys($sites_left_end,$abs_pos);\n\t\t\t\t\t}\n\n\t\t\t\tif(count($keys)>0)\n\t\t\t\t{\n\t\t\t\t\t pop_font($keys, $stack, $stack_font, $labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n//\t\t\t\t\t pop_font($keys, &$stack, &$stack_font, &$labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n//\t\t\tdraw the down string part for clock wise gene\n//\t\t\t or actually up string part counterclockwise gene \n//\t\t\t\n\t\t\t$down_str_len = strlen($down_string);\n\t\t\tif(strlen($down_string)%$line_len!=0)\n\t\t\t{\n\t\t\t\t$down_string = str_pad($down_string,strlen($down_string)+$line_len-strlen($down_string)%$line_len, \" \", STR_PAD_RIGHT);\n\t\t\t}\n\t\t\tif($down_str_len>0)\n\t\t\t{\n\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i=0; $i<strlen($down_string);$i++) {\n\n\t\t\t\tif (($i % $line_len)==0) {\n\n\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. \"\\n\";\n\n\t\t\t\t}\n\t\t\t\telseif (($i % $sep_len)==0 && $i<$down_str_len) {\n\n\t\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. \" \";\n\t\t\t\t}\n\t\t\t\tif($i<$down_str_len)\n\t\t\t\t{\n\t\t\t\t\t$abs_pos=0;\n\t\t\t\t\t$keys = array();\n\t\t\t\t\tif($orientation==\"Clockwise\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$abs_pos =$right_pos+$i+1;\n\t\t\t\t\t\tif($abs_pos > $GENOME_LENGTH)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$abs_pos = $abs_pos - $GENOME_LENGTH;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$keys = array_keys($sites_left_end, $abs_pos);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$abs_pos = $left_pos -$i-1;\n\n\t\t\t\t\t\tif($abs_pos<1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$abs_pos = $abs_pos + $GENOME_LENGTH;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t$keys = array_keys($sites_right_end, $abs_pos);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(count($keys)>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, $stack, $stack_font, $labeled_sites_seq);\n//\t\t\t\t\t\tpush_font($keys, $sites_color, $sites_name, $sites_left_end, $sites_right_end, &$stack, &$stack_font, &$labeled_sites_seq);\n\t\t\t\t\t}\n//\t\t\t\t}\n\n\t\t\t\t$labeled_sites_seq = $labeled_sites_seq. $down_string[$i];\n\t\t\t\t\n//\t\t\t\tif($i<$down_str_len)\n//\t\t\t\t{\n\t\t\t\t\t$keys = array();\n\t\t\t\t\tif($orientation==\"Clockwise\")\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$keys = array_keys($sites_right_end,$abs_pos);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$keys = array_keys($sites_left_end,$abs_pos);\n\t\t\t\t\t}\n\t\t\t\t\tif(count($keys)>0)\n\t\t\t\t\t{\n//\t\t\t\t\t\tpop_font($keys, &$stack, &$stack_font, &$labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n\t\t\t\t\t\tpop_font($keys, $stack, $stack_font, $labeled_sites_seq,$sites_name, $sites_left_end, $sites_right_end);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n}", "title": "" }, { "docid": "64a308534bdcd655da02cf1bf17d7b69", "score": "0.44965586", "text": "function puissance_plapla($id_planete, $pseudo) {\r\n\r\n\t@include(\"include/units.php\");\r\n\t@include(\"../include/units.php\");\r\n\t\r\n\t$reponse2 = mysql_query(\"SELECT race FROM sg_perso WHERE pseudo='$pseudo'\");\r\n\t$donnees2 = mysql_fetch_array($reponse2);\r\n\t$race = $donnees2['race'];\r\n\t\r\n\t\t//print_rr (${'vaisseaux_'.$race});\r\n\t\t//print_rr(${'liste_'.$race});\r\n\t\t$count = ${'liste_'.$race};\r\n\t\t\r\n\t\t\r\n\t\t$nb_spatial = count($count);\r\n\t\t\r\n\t\t$nb_terrestre = count(${'liste_terrestre_'.$race});\t\r\n\t\t\r\n\t\tfor ($i=0; $i<$nb_spatial; $i++) {\r\n\t\t\t$vaisseau_type = (${'liste_'.$race}[$i]);\r\n\t\t\t$puissance_unique_vaisseau_terrestre[] = ${'vaisseaux_'.$race}[$vaisseau_type][\"Puissance\"];\t\r\n\t\t\t$vaisseau_nombre_terrestre[$i] = \"0\";\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\tfor ($i=0; $i <$nb_terrestre; $i++) {\r\n\t\t\t$terrestre_type = (${'liste_terrestre_'.$race}[$i]);\r\n\t\t\t$puissance_unique_terrestre_terrestre[] = ${'terrestre_'.$race}[$terrestre_type][\"Puissance\"];\r\n\t\t\t$terrestre_nombre_terrestre[$i] = \"0\";\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t$reponse_sg_terrestre_units = mysql_query(\"SELECT * FROM sg_planete_units WHERE id_planete='$id_planete'\");\t\r\n\twhile($donnees_sg_terrestre_units = mysql_fetch_array($reponse_sg_terrestre_units)) {\r\n\t\t\tif ($donnees_sg_terrestre_units['unit'] == 'spatial') {\r\n\t\t\t\t$type_spatial_terrestre = $donnees_sg_terrestre_units['type'];\r\n\t\t\t\t$vaisseau_nombre_terrestre[$type_spatial_terrestre] = $donnees_sg_terrestre_units['nombre'];\r\n\t\t\t} else {\r\n\t\t\t\t$type_terrestre_terrestre = $donnees_sg_terrestre_units['type'];\r\n\t\t\t\t$terrestre_nombre_terrestre[$type_terrestre_terrestre] = $donnees_sg_terrestre_units['nombre'];\r\n\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t}\r\n\t$count1 = count($vaisseau_nombre_terrestre);\r\n\t$count2 = count($terrestre_nombre_terrestre);\r\n\t\r\n\t//print_rr($puissance_unique_terrestre);\r\n\t//print_rr ($vaisseau_nombre_terrestre);\r\n\t//print_rr ($terrestre_nombre_terrestre);\r\n\t\r\n\t$puissance_terrestre = \"0\";\r\n\tfor ($i=0; $i<$count1; $i++) {\r\n\t\t@$puissance_terrestre = $puissance_terrestre + $vaisseau_nombre_terrestre[$i] * $puissance_unique_vaisseau_terrestre[$i];\r\n\t}\r\n\tfor ($i=0; $i<$count2; $i++) {\r\n\t\t@$puissance_terrestre = $puissance_terrestre + $terrestre_nombre_terrestre[$i] * $puissance_unique_terrestre_terrestre[$i];\r\n\t}\r\n\treturn number_format($puissance_terrestre, 0, ',', ' ');\r\n\r\n}", "title": "" }, { "docid": "22cd6f224522859065a9598f0ae4e257", "score": "0.44837484", "text": "public function run()\n {\n $semesters = [\n ['name' => 'Spring\\'06', 'division' => 'Spring', 'year' => 2006],\n ['name' => 'Summer\\'06', 'division' => 'Summer', 'year' => 2006],\n ['name' => 'Fall\\'06', 'division' => 'Fall', 'year' => 2006],\n ['name' => 'Spring\\'07', 'division' => 'Spring', 'year' => 2007],\n ['name' => 'Summer\\'07', 'division' => 'Summer', 'year' => 2007],\n ['name' => 'Fall\\'07', 'division' => 'Fall', 'year' => 2007],\n ['name' => 'Spring\\'08', 'division' => 'Spring', 'year' => 2008],\n ['name' => 'Summer\\'08', 'division' => 'Summer', 'year' => 2008],\n ['name' => 'Fall\\'08', 'division' => 'Fall', 'year' => 2008],\n ['name' => 'Spring\\'09', 'division' => 'Spring', 'year' => 2009],\n ['name' => 'Summer\\'09', 'division' => 'Summer', 'year' => 2009],\n ['name' => 'Fall\\'09', 'division' => 'Fall', 'year' => 2009],\n ['name' => 'Spring\\'10', 'division' => 'Spring', 'year' => 2010],\n ['name' => 'Summer\\'10', 'division' => 'Summer', 'year' => 2010],\n ['name' => 'Fall\\'10', 'division' => 'Fall', 'year' => 2010],\n ['name' => 'Spring\\'11', 'division' => 'Spring', 'year' => 2011],\n ['name' => 'Summer\\'11', 'division' => 'Summer', 'year' => 2011],\n ['name' => 'Fall\\'11', 'division' => 'Fall', 'year' => 2011],\n ['name' => 'Spring\\'12', 'division' => 'Spring', 'year' => 2012],\n ['name' => 'Summer\\'12', 'division' => 'Summer', 'year' => 2012],\n ['name' => 'Fall\\'12', 'division' => 'Fall', 'year' => 2012],\n ['name' => 'Spring\\'13', 'division' => 'Spring', 'year' => 2013],\n ['name' => 'Summer\\'13', 'division' => 'Summer', 'year' => 2013],\n ['name' => 'Fall\\'13', 'division' => 'Fall', 'year' => 2013],\n ['name' => 'Spring\\'14', 'division' => 'Spring', 'year' => 2014],\n ['name' => 'Summer\\'14', 'division' => 'Summer', 'year' => 2014],\n ['name' => 'Fall\\'14', 'division' => 'Fall', 'year' => 2014],\n ['name' => 'Spring\\'15', 'division' => 'Spring', 'year' => 2015],\n ['name' => 'Summer\\'15', 'division' => 'Summer', 'year' => 2015],\n ['name' => 'Fall\\'15', 'division' => 'Fall', 'year' => 2015],\n ];\n foreach ($semesters as $key => $semester) {\n Semester::create($semester);\n }\n }", "title": "" }, { "docid": "fae58a511d66ffa57f947a17ed9e989a", "score": "0.44806474", "text": "private function processStep2(Array $args, Round $round, Array $masters = null) {\n $handshakes = $this->generateHandshakes($round->num_teams);\n if ($masters !== null) {\n $first = 1;\n foreach ($masters as $slave) {\n $last = $first + $slave->num_teams;\n for ($i = $first; $i < $last; $i++) {\n for ($j = $i + 1; $j < $last; $j++) {\n unset($handshakes[sprintf(\"%d-%d\", $i, $j)]);\n }\n }\n $first = $last;\n }\n }\n\n $num_races = count($handshakes);\n $map = DB::$V->reqMap($args, array('team1', 'team2'), $num_races, \"Invalid team order.\");\n $swp = DB::$V->incList($args, 'swap');\n $ord = DB::$V->incList($args, 'order', count($map['team1']));\n if (count($ord) > 0) {\n array_multisort($ord, SORT_NUMERIC, $map['team1'], $map['team2']);\n }\n\n $pairings = array();\n foreach ($map['team1'] as $i => $team1) {\n $team1 = DB::$V->reqInt($map['team1'], $i, 1, $round->num_teams + 1, \"Invalid first team index provided.\");\n $team2 = DB::$V->reqInt($map['team2'], $i, 1, $round->num_teams + 1, \"Invalid partner provided.\");\n if (in_array($i, $swp)) {\n $team3 = $team1;\n $team1 = $team2;\n $team2 = $team3;\n }\n if ($team1 == $team2)\n throw new SoterException(\"Teams cannot sail against themselves.\");\n $shake = sprintf(\"%d-%d\", $team1, $team2);\n $pair = array($team1, $team2);\n if ($team2 < $team1)\n $shake = sprintf(\"%d-%d\", $team2, $team1);\n if (!isset($handshakes[$shake]))\n throw new SoterException(\"Invalid team pairing provided.\");\n unset($handshakes[$shake]);\n $pairings[] = $pair;\n }\n\n if (count($pairings) < $num_races)\n throw new SoterException(\"Not all pairings have been accounted for.\");\n\n $round->setRaceOrder($pairings);\n return array();\n }", "title": "" }, { "docid": "168355c5c1afe6bacef1045d920026a3", "score": "0.4465555", "text": "public static function get_section_map()\n {\n $section_map = array\n (\n //------------------------------------------------------------------\n \"pub\" => array\n (\n 'section' => array(self::SECTION_PARTY, self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 90,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Gehe in die Kneipe\",\n \"can_visit\" => function() { return true; }\n ),\n \"bar\" => array\n (\n 'section' => array(self::SECTION_PARTY, self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 90,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Gehe in die Bar\",\n \"can_visit\" => function() { return true; }\n ),\n \"nightclub\" => array\n (\n 'section' => array(self::SECTION_PARTY),\n \"time\" => 180,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in den Club\",\n \"can_visit\" => function() { return date(\"H\") > 20 || date(\"H\") < 08; }\n ),\n \"stripclub\" => array\n (\n 'section' => array(self::SECTION_PARTY),\n \"time\" => 180,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in den Stripclub\",\n \"can_visit\" => function() { return true; }\n ),\n \"fuel\" => array\n (\n 'section' => array(self::SECTION_PARTY),\n \"time\" => 15,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 2,\n \"name_required\" => \"Tankstelle\",\n \"request\" => \"Betrete die Tankstelle\",\n \"can_visit\" => function() { return true; }\n ),\n //------------------------------------------------------------------\n \"cinema\" => array\n (\n 'section' => array(self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 120,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in das Kino\",\n \"can_visit\" => function() { return date(\"H\") >= 12 || date(\"H\") <= 02; }\n ),\n \"cafe\" => array\n (\n 'section' => array(self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 45,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => true,\n \"request\" => \"Gehe in das Café\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"biergarten\" => array\n (\n 'section' => array(self::SECTION_FUN, self::SECTION_MAHLZEIT),\n \"time\" => 90,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => true,\n \"request\" => \"Gehe in den Biergarten\",\n \"can_visit\" => function() { return (date(\"H\") >= 09 || date(\"H\") <= 01) && (date(\"n\") >= 5 && date(\"n\") <= 9); }\n ),\n \"ice_cream\" => array\n (\n 'section' => array(self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 15,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in die Eisdiele\",\n \"can_visit\" => function() { return date(\"H\") > 06; }\n ),\n \"park\" => array\n (\n 'section' => array(self::SECTION_FUN),\n \"time\" => 30,\n \"osm_key\" => \"leisure\",\n \"max_amount\" => 3,\n \"name_required\" => \"Park\",\n \"request\" => \"Gehe in den Park\",\n \"can_visit\" => function() { return true; }\n ),\n \"common\" => array\n (\n 'section' => array(self::SECTION_FUN),\n \"time\" => 30,\n \"osm_key\" => \"leisure\",\n \"max_amount\" => 3,\n \"name_required\" => \"Grünanlage\",\n \"request\" => \"Besuche die Grünanlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"zoo\" => array\n (\n 'section' => array(self::SECTION_FUN),\n \"time\" => 90,\n \"osm_key\" => \"tourism\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in den Zoo\",\n \"can_visit\" => function() { return date(\"H\") >= 08; }\n ),\n //------------------------------------------------------------------\n \"9pin\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Kegelanlage\",\n \"request\" => \"Spiele eine Runde in der Kegelanlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"10pin\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Bowlinganlage\",\n \"request\" => \"Spiele eine Runde in der Bowlinganlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"boules\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Bouleanlage\",\n \"request\" => \"Spiele eine Runde in der Bouleanlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"archery\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Besuche den Schießstand\",\n \"can_visit\" => function() { return true; }\n ),\n \"badminton\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Badmintonfeld\",\n \"request\" => \"Spiele eine Runde auf dem Badmintonfeld\",\n \"can_visit\" => function() { return true; }\n ),\n \"basketball\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Basketballplatz\",\n \"request\" => \"Spiele eine Runde auf dem Basketballplatz\",\n \"can_visit\" => function() { return true; }\n ),\n \"beachvolleyball\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Beachvolleyballfeld\",\n \"request\" => \"Spiele eine Runde auf dem Beachvolleyballfeld\",\n \"can_visit\" => function() { return true; }\n ),\n \"climbing\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Kletteranlage\",\n \"request\" => \"Besuche die Kletteranlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"golf\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 90,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Golfplatz\",\n \"request\" => \"Spiele eine Runde auf dem Golfplatz\",\n \"can_visit\" => function() { return true; }\n ),\n \"shooting\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Schießstand\",\n \"request\" => \"Besuche den Schießstand\",\n \"can_visit\" => function() { return true; }\n ),\n \"soccer\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 90,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Fußballplatz\",\n \"request\" => \"Spiele eine Runde auf dem Fußballplatz\",\n \"can_visit\" => function() { return true; }\n ),\n \"swimming\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 90,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Schwimmbad\",\n \"request\" => \"Besuche das Schwimmbad\",\n \"can_visit\" => function() { return true; }\n ),\n \"volleyball\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Volleyballfeld\",\n \"request\" => \"Spiele eine Runde auf dem Volleyballfeld\",\n \"can_visit\" => function() { return true; }\n ),\n \"tennis\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"sport\",\n \"max_amount\" => 3,\n \"name_required\" => \"Tennisplatz\",\n \"request\" => \"Spiele eine Runde auf dem Tennisplatz\",\n \"can_visit\" => function() { return true; }\n ),\n \"water_park\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 120,\n \"osm_key\" => \"leisure\",\n \"max_amount\" => 3,\n \"name_required\" => \"Wasserpark\",\n \"request\" => \"Besuche den Wasserpark\",\n \"can_visit\" => function() { return true; }\n ),\n \"miniature_golf\" => array\n (\n 'section' => array(self::SECTION_SPORT),\n \"time\" => 60,\n \"osm_key\" => \"leisure\",\n \"max_amount\" => 3,\n \"name_required\" => \"Minigolfanlage\",\n \"request\" => \"Spiele eine Runde auf der Minigolfanlage\",\n \"can_visit\" => function() { return true; }\n ),\n //------------------------------------------------------------------\n \"fountain\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING, self::SECTION_SIGHTSEEING),\n \"time\" => 15,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => \"Wasseranlage\",\n \"request\" => \"Besichtige die Wasseranlage\",\n \"can_visit\" => function() { return true; }\n ),\n \"marketplace\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe auf den Marktplatz\",\n \"can_visit\" => function() { return true; }\n ),\n \"place_of_worship\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Besichtige die Sehenswürdigkeit\",\n \"can_visit\" => function() { return true; }\n ),\n \"castle\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 90,\n \"osm_key\" => \"historic\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Besichtige die Burg\",\n \"can_visit\" => function() { return true; }\n ),\n \"memorial\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 15,\n \"osm_key\" => \"historic\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Besichtige die Sehenswürdigkeit\",\n \"can_visit\" => function() { return true; }\n ),\n \"monument\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 30,\n \"osm_key\" => \"historic\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Besichtige das Monument\",\n \"can_visit\" => function() { return true; }\n ),\n \"ruins\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 45,\n \"osm_key\" => \"historic\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Besichtige die Ruine\",\n \"can_visit\" => function() { return true; }\n ),\n \"attraction\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 30,\n \"osm_key\" => \"tourism\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Besichtige die Attraktion\",\n \"can_visit\" => function() { return true; }\n ),\n \"information\" => array\n (\n 'section' => array(self::SECTION_SIGHTSEEING),\n \"time\" => 15,\n \"osm_key\" => \"tourism\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Besuche die Touristeninformation\",\n \"can_visit\" => function() { return true; }\n ),\n //------------------------------------------------------------------\n \"bench\" => array\n (\n 'section' => array(self::SECTION_DATE),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 2,\n \"name_required\" => \"Sitzbank\",\n \"request\" => \"Setze dich auf die Bank\",\n \"can_visit\" => function() { return true; }\n ),\n \"shelter\" => array\n (\n 'section' => array(self::SECTION_FUN, self::SECTION_DATE),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => \"Unterstand\",\n \"request\" => \"Gehe zum Unterstand\",\n \"can_visit\" => function() { return true; }\n ),\n \"hunting_stand\" => array\n (\n 'section' => array(self::SECTION_DATE),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => \"Hochsitz\",\n \"request\" => \"Gehe auf den Hochsitz\",\n \"can_visit\" => function() { return true; }\n ),\n \"lighthouse\" => array\n (\n 'section' => array(self::SECTION_DATE),\n \"time\" => 30,\n \"osm_key\" => \"man_made\",\n \"max_amount\" => 3,\n \"name_required\" => \"Leuchtturm\",\n \"request\" => \"Gehe zu dem Leuchtturm\",\n \"can_visit\" => function() { return true; }\n ),\n \"beach\" => array\n (\n 'section' => array(self::SECTION_DATE),\n \"time\" => 30,\n \"osm_key\" => \"natural\",\n \"max_amount\" => 3,\n \"name_required\" => \"Strand\",\n \"request\" => \"Gehe an den Strand\",\n \"can_visit\" => function() { return true; }\n ),\n //------------------------------------------------------------------\n \"supermarket\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 45,\n \"osm_key\" => \"building\",\n \"max_amount\" => 6,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein im Supermarkt\",\n \"can_visit\" => function() { return true; }\n ),\n \"bakery\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 15,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kauf ein in der Bäckerei\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"beverages\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 30,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein im Getränkemarkt\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"butcher\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 15,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein beim Metzger\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"chemist\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 30,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein in der Drogerie\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"department_store\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 45,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein im Kaufhaus\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"greengrocer\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 15,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein im Gemüseladen\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n \"organic\" => array\n (\n 'section' => array(self::SECTION_EINKAUFEN),\n \"time\" => 15,\n \"osm_key\" => \"shop\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Kaufe ein im Bio-Laden\",\n \"can_visit\" => function() { return date(\"H\") >= 06; }\n ),\n //------------------------------------------------------------------\n \"fast_food\" => array\n (\n 'section' => array(self::SECTION_MAHLZEIT),\n \"time\" => 15,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => true,\n \"request\" => \"Esse etwas bei\",\n \"can_visit\" => function() { return true; }\n ),\n \"food_court\" => array\n (\n 'section' => array(self::SECTION_MAHLZEIT),\n \"time\" => 30,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => \"Räumlichkeit\",\n \"request\" => \"Gehe in die Räumlichkeit\",\n \"can_visit\" => function() { return true; }\n ),\n \"bbq\" => array\n (\n 'section' => array(self::SECTION_MAHLZEIT),\n \"time\" => 60,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => \"BBQ\",\n \"request\" => \"Gehe zum BBQ\",\n \"can_visit\" => function() { return true; }\n ),\n \"restaurant\" => array\n (\n 'section' => array(self::SECTION_MAHLZEIT),\n \"time\" => 60,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in das Restaurant\",\n \"can_visit\" => function() { return date(\"H\") >= 08; }\n ),\n //------------------------------------------------------------------\n \"theatre\" => array\n (\n 'section' => array(self::SECTION_KULTUR),\n \"time\" => 120,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 3,\n \"name_required\" => true,\n \"request\" => \"Gehe in das Theater\",\n \"can_visit\" => function() { return date(\"H\") >= 09 || date(\"H\") <= 01; }\n ),\n \"artwork\" => array\n (\n 'section' => array(self::SECTION_KULTUR),\n \"time\" => 45,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 9,\n \"name_required\" => true,\n \"request\" => \"Besichtige das Kunstwerk\",\n \"can_visit\" => function() { return true; }\n ),\n \"museum\" => array\n (\n 'section' => array(self::SECTION_KULTUR),\n \"time\" => 90,\n \"osm_key\" => \"amenity\",\n \"max_amount\" => 6,\n \"name_required\" => true,\n \"request\" => \"Besuche das Museum\",\n \"can_visit\" => function() { return date(\"H\") >= 08; }\n ),\n );\n\n return $section_map;\n }", "title": "" }, { "docid": "242f00c190d5a7645bf589210d4e9ede", "score": "0.44650277", "text": "private function buildNPCWithShops()\n {\n $this->console->writeln(\"Building NPC stores ...\");\n \n $ids = Redis::Cache()->get('ids_ENpcResident');\n foreach ($ids as $i => $id) {\n // grab npc\n $npc = Redis::Cache()->get(\"xiv_ENpcResident_{$id}\");\n if ($npc === null) {\n continue;\n }\n \n // if no gil shop, skip\n if (!isset($npc->GilShop) || empty($npc->GilShop)) {\n continue;\n }\n \n foreach ($npc->GilShop as $gs) {\n /**\n * Save gil shop data\n */\n $gilShopData = [\n 'NPC_ID' => $npc->ID,\n 'NPC_Name_en' => $npc->Name_en,\n 'NPC_Name_de' => $npc->Name_de,\n 'NPC_Name_fr' => $npc->Name_fr,\n 'NPC_Name_ja' => $npc->Name_ja,\n 'Shop_ID' => $gs->ID,\n 'Shop_Name_en' => $gs->Name_en,\n 'Shop_Name_de' => $gs->Name_de,\n 'Shop_Name_fr' => $gs->Name_fr,\n 'Shop_Name_ja' => $gs->Name_ja,\n 'Map' => $this->positions[$npc->ID] ?? null,\n ];\n \n Redis::Cache()->set(\"xiv_GilShopData_{$gs->ID}\", $gilShopData, RedisConstants::TIME_10_YEAR);\n \n // record all shops an item is in.\n foreach ($gs->Items as $item) {\n if (!isset($this->itemToShops[$item->ID])) {\n $this->itemToShops[$item->ID] = [];\n }\n \n if (in_array($item->ID, $this->itemToShops[$item->ID])) {\n continue;\n }\n \n $this->itemToShops[$item->ID][] = $gs->ID;\n }\n }\n \n unset($npc);\n }\n }", "title": "" }, { "docid": "9dccd49783fc46599bd3fc9cb95c3baf", "score": "0.44633693", "text": "function assignTropiesFromMatches() {\n $t8 = array();\n $t4 = array();\n $sec = \"\";\n $win = \"\";\n $quarter_finals = $this->finalrounds >= 3;\n if ($quarter_finals) {\n $quart_round = $this->mainrounds + $this->finalrounds - 2;\n $matches = $this->getRoundMatches($quart_round);\n foreach ($matches as $match) {\n $t8[] = $match->getLoser();\n }\n }\n $semi_finals = $this->finalrounds >= 2;\n if ($semi_finals) {\n $semi_round = $this->mainrounds + $this->finalrounds - 1;\n $matches = $this->getRoundMatches($semi_round);\n foreach ($matches as $match) {\n $t4[] = $match->getLoser();\n }\n }\n\n $finalmatches = $this->getRoundMatches($this->mainrounds + $this->finalrounds);\n $finalmatch = $finalmatches[0];\n $sec = $finalmatch->getLoser();\n $win = $finalmatch->getWinner();\n\n $this->setFinalists($win, $sec, $t4, $t8);\n }", "title": "" }, { "docid": "0bbe23a5a06823868272ad9feba27b5f", "score": "0.4459369", "text": "function createSoilSubArray() {\n\t\t\n\t\t$ret[\"pedon\"] = \"\";\n\t\t$ret[\"slsour\"] = \"\";\n\t\t$ret[\"sltx\"] = \"\";\n\t\t$ret[\"sldp\"] = \"\";\n\t\t$ret[\"sldesc\"] = \"\";\n\t\t$ret[\"ssite\"] = \"\";\n\t\t$ret[\"scount\"] = \"\";\n\t\t$ret[\"slat\"] = \"\";\n\t\t$ret[\"slong\"] = \"\";\n\t\t$ret[\"tacon\"] = \"\";\n\t\t$ret[\"scom\"] = \"\";\n\t\t$ret[\"salb\"] = \"\";\n\t\t$ret[\"u\"] = \"\";\n\t\t$ret[\"swcon\"] = \"\";\n\t\t$ret[\"cn2\"] = \"\";\n\t\t$ret[\"slnf\"] = \"\";\n\t\t$ret[\"slpf\"] = \"\";\n\t\t$ret[\"smhb\"] = \"\";\n\t\t$ret[\"smpx\"] = \"\";\n\t\t$ret[\"smke\"] = \"\";\n\t\t$ret[\"layer1\"] = array();\n\t\t$ret[\"layer2\"] = array();\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c1b4b597384dbc1cb2b3dcb5038eec85", "score": "0.44471157", "text": "function createGroups($oXXX, $sCSV){\n $nCount = 0;\n //our iterator for line \n $nLine = 0;\n //Our count for cell\n $nSize = 0;\n //our iterrator for cells\n $nCell = 0;\n \n //group name \n $sGrp = \"\";\n //Pärent name \n $sParent = \"\";\n\n //our group \n $oGrp = new Groups();\n //Previous group \n $oPrevious = new Groups();\n //previous Parent\n $oParent = new Groups();\n\n //array of already existing Groups\n $ary_Groups = null;\n\n //our CSV File\n $oCSV = new Potours_Data();\n\n //load the file \n $oCSV->loadCSV($sCSV, \";\");\n\n //lines and columns\n $nCount = $oCSV->getLineCount();\n //columns\n $nSize = $oCSV->getColumnCount();\n\n echo(\"<br/>\" . \"Nombre de colonnes : \" . $nSize . \"| Nombre de lignes : \" . $nCount ) ;\n\n //for all line\n while($nLine < $nCount){\n\n //new group !!!\n $oGrp = new Groups();\n\n //for each line \n $nCell = $nSize - 1;\n while($nCell > -1){\n //does we have a group name \n $sGrp = utf8_encode ($oCSV->getCell($nCell, $nLine, \"\"));\n //$sGrp = $oCSV->getCell($nCell, $nLine, \"\");\n if($sGrp != \"\"){\n\n //search in old grp made !!!\n $ary_Groups = GroupsgetAllInstanceWith($sGrp);\n\n //not already here \n if(count($ary_Groups) <= 0){\n\n //set all\n //$oGrp->setId_Noeuds_Parent(1);\n $oGrp->setId_Accreditations_Item(1);\n $oGrp->setId_Civilites(1);\n $oGrp->setId_Titres(1);\n $oGrp->setId_Contact_Types(4);\n $oGrp->setId_Creator(1);\n //set the name \n $oGrp->setNom($sGrp);\n $oGrp->setNomGroupe($sGrp);\n //create the Groups\n $oGrp->save(1);\n\n //get the parent name \n $sParent = utf8_encode ($oCSV->getCell($nCell - 1, $nLine, \"\"));\n //$sParent = $oCSV->getCell($nCell - 1, $nLine, \"\");\n //we got a parent \n if($sParent != \"\"){\n\n //is the parent the previous ?\n if($sParent == $oPrevious->getNomGroupe() ){\n //the parent is the previous\n $oGrp->setId_Noeuds_Parent(intval($oPrevious->getId_Items()));\n //previous became parent !!!\n $oParent = $oPrevious;\n }\n elseif( $sParent == $oParent->getNomGroupe() ){ //The parent is the parent !!!\n //the parent is the previous\n $oGrp->setId_Noeuds_Parent(intval($oParent->getId_Items()));\n }\n else{\n //own parent\n $oGrp->setId_Noeuds_Parent(intval($oGrp->getId_Items()));\n }\n //load previous !!!\n $oPrevious = $oGrp;\n }\n else{ //No parent\n //own parent\n $oGrp->setId_Noeuds_Parent(intval($oGrp->getId_Items()));\n }\n\n //own creator \n $oGrp->setId_Creator(intval($oGrp->getId_Items()));\n //set the group owner ... itself Yeah \\m/\n $oGrp->setId_groups_json( \"{{\\\"grp\\\":\\\"\" + intval($oGrp->getId_Items()) + \"\\\", \\\"until\\\":\\\"\\\"}}\");\n //$oGrp->setId_groups_owner(intval($oGrp->getId_Items()));\n\n //save it again !!!\n $oGrp->save($oGrp->getId_Items()); \n\n //created\n echo(\"<br/>\" . \"Group ajouté : \" . $oGrp->getNomGroupe() );\n }\n\n $nCell = -41;\n }\n\n //next\n $nCell--;\n }\n\n //Next\n $nLine++;\n }\n\n}", "title": "" }, { "docid": "2cf33bae141428e5dac195d78ad065c5", "score": "0.44364578", "text": "private function loadGroupes() {\n\t\tGLOBAL $mysqli;\n\n\t\t$resultsGroupes = $mysqli->query(\"SELECT `groupes` FROM `Liste-Cours-Profs` WHERE `prof`=$_SESSION[prof] AND `cours`=\".$this->id);\n\t\t$groupes = $resultsGroupes->fetch_assoc();\n\n\t\tif($groupes['groupes']=='tous') {\n\t\t\t$resultsGroupes->free();\n\t\t\t$resultsGroupes = $mysqli->query('SELECT DISTINCT `groupe` FROM `Liste-Cours-Etudiants` WHERE `cours`='.$this->id.' AND `groupe` IS NOT NULL');\n\t\t\t$groupes=Array();\n\t\t\twhile($groupe = $resultsGroupes->fetch_assoc()) {\n\t\t\t\t$groupes[]=$groupe['groupe'];\n\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$groupes = explode(',',$groupes['groupes']);\n\t\t}\n\t\t$resultsGroupes->free();\n\t\tsort($groupes);\n\t\t$this->groupes = $groupes;\n\t}", "title": "" }, { "docid": "b4ef7179c2bc19adfdd26ec6dea897ec", "score": "0.4428185", "text": "private function drawVille() {\n\t\t$zones = array();\n\t\t$query = \"SELECT nom_ville,\n\t\t\tx_min_ville, y_min_ville,\n\t\t\tx_max_ville, y_max_ville\n\t\t\tFROM \".DB_PREFIX.\"ville\";\n\t\t$res = mysql_query($query);\n\t\tif (mysql_num_rows($res) != 0) {\n\t\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t\t// on calcul les 4 points du polygone.\n\t\t\t\t$p1 = $this->positionToPixel(new Point($row['x_min_ville'], $row['y_max_ville']));\n\t\t\t\t$p2 = $this->positionToPixel(new Point($row['x_max_ville'], $row['y_max_ville']));\n\t\t\t\t$p3 = $this->positionToPixel(new Point($row['x_max_ville'], $row['y_min_ville']));\n\t\t\t\t$p4 = $this->positionToPixel(new Point($row['x_min_ville'], $row['y_min_ville']));\n\t\t\t\t$this->truncatePoint(&$p1);\n\t\t\t\t$this->truncatePoint(&$p2);\n\t\t\t\t$this->truncatePoint(&$p3);\n\t\t\t\t$this->truncatePoint(&$p4);\n\t\t\t\t// on ne dessine pas la ville si elle n'est pas \"dans le champ\"\n\t\t\t\tif ($p1->equals($p2) || $p2->equals($p3)) continue;\n\t\t\t\t// dessin du contour de la ville\n\t\t\t\timagepolygon($this->img,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$p1->x, $p1->y,\n\t\t\t\t\t\t$p2->x + $this->tile_size, $p2->y,\n\t\t\t\t\t\t$p3->x + $this->tile_size, $p3->y + $this->tile_size,\n\t\t\t\t\t\t$p4->x, $p4->y + $this->tile_size,\n\t\t\t\t\t),\n\t\t\t\t\t4, $this->colors['red']);\n\t\t\t\t\n\t\t\t\t$bbox = imagettfbbox($this->ttfont_size, 0, \"./DejaVuSans.ttf\", $row['nom_ville']);\n\t\t\t\t$name_width = $bbox[2] - $bbox[0];\n\t\t\t\t$name_height = $bbox[5] - $bbox[3];\n\t\t\t\t// dessin du nom\n\t\t\t\timagettftext($this->img, $this->ttfont_size, 0,\n\t\t\t\t\t$p1->x + (($p2->x + $this->tile_size - $p1->x) / 2) - ($name_width / 2),\n\t\t\t\t\t$p3->y - $name_height + $this->tile_size,\n\t\t\t\t\t$this->colors['black'], \"./DejaVuSans.ttf\", $row['nom_ville']);\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($res);\n\t}", "title": "" }, { "docid": "cbf6fe41fddeedb464a9a571ccf27b45", "score": "0.44257554", "text": "function create_image2()\n{\n\t$GBC = new GBsql();\n\t$GBC->GB_getSQLsetting();\n\t$GBSQL = \"SELECT * from locations \";\n\t$result = $GBC->_GBUser->query($GBSQL);\n\t$locs = $result->fetchAll();\n\t@list($level, $gold, $cash, $FarmSizeX, $FarmSizeY) = explode(';', fBGetDataStore('playerinfo'));\n\tif(($FarmSizeX == '') || ($FarmSizeY == '')){ $GB_place_items = \"No\"; return;}else{ $GB_place_items = \"OK\";}\n\t$maxX = $FarmSizeX * 4;\n\t$maxX = $maxX+3;\n\t$maxY = $FarmSizeY * 4;\n\t$maxY = $maxY+3; \n\t$im = @imagecreate($maxX, $maxY) or AddLog2(\"Cannot Initialize new GD image stream\");\n\t$background_color = imagecolorallocate($im, 255, 255, 255); // yellow\n\t$red = imagecolorallocate($im, 255, 0, 0); // red\n\t$green = imagecolorallocate($im, 0, 255, 0);\n\t$blue = imagecolorallocate($im, 0, 0, 255); // blue\n\t$white = imagecolorallocate($im, 255, 255, 255);\n\t$yellow = imagecolorallocate($im, 255, 255, 0);\n\t$black = imagecolorallocate($im, 0, 0, 0);\n\t$purple = ImageColorAllocate($im, 153, 51, 255 ); //purple\n\t$pink = ImageColorAllocate($im, 255, 0, 128 ); //pink\n\t$grey = ImageColorAllocate($im, 192, 192, 192 ); //grey\n\t$brown = ImageColorAllocate($im, 51, 0, 0);\n\t$loc = \"Animal\";\n\t$style = array($white, $white, $white, $blue, $blue, $blue);\n\tImageSetStyle($im, $style);\n\t$X1 = $GBC->GB_Setting[$loc.'X1']*4;\n\t$Y1 = $maxY - $GBC->GB_Setting[$loc.'Y1']*4;\n\t$X2 = $GBC->GB_Setting[$loc.'X2']*4;\n\t$Y2 = $maxY - $GBC->GB_Setting[$loc.'Y2']*4;\n\timagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, IMG_COLOR_STYLED);\n\t$loc = \"Tree\";\n\t$style = array($white, $white, $white, $yellow, $yellow, $yellow);\n\tImageSetStyle($im, $style);\n\t$X1 = $GBC->GB_Setting[$loc.'X1']*4;\n\t$Y1 = $maxY - $GBC->GB_Setting[$loc.'Y1']*4;\n\t$X2 = $GBC->GB_Setting[$loc.'X2']*4;\n\t$Y2 = $maxY - $GBC->GB_Setting[$loc.'Y2']*4;\n\timagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, IMG_COLOR_STYLED);\n\t$loc = \"Decoration\";\n\t$style = array($white, $white, $white, $black, $black, $black);\n\tImageSetStyle($im, $style);\n\t$X1 = $GBC->GB_Setting[$loc.'X1']*4;\n\t$Y1 = $maxY - $GBC->GB_Setting[$loc.'Y1']*4;\n\t$X2 = $GBC->GB_Setting[$loc.'X2']*4;\n\t$Y2 = $maxY - $GBC->GB_Setting[$loc.'Y2']*4;\n\timagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, IMG_COLOR_STYLED);\n\n\tforeach($locs as $loc)\n\t{\n\t\t$GB_fill = $red;\n\t\tif (strpos($loc['_what'], 'E') !== false) { $GB_fill = $green;}\n\t\tif (strpos($loc['_what'], 'Decoration') !== false) { $GB_fill = $black;}\n\t\tif (strpos($loc['_what'], 'Animal') !== false) { $GB_fill = $purple;}\n\t\tif (strpos($loc['_what'], 'Building') !== false) { $GB_fill = $pink;}\n\t\tif (strpos($loc['_what'], 'Plot') !== false) { $GB_fill = $brown;}\n\t\t$Map_PXI = $loc['_X']*4 ;\n\t\t$Map_PYI = $loc['_Y']*4 ;\n\t\t$Map_PYI = $maxY - $Map_PYI ;\n\t\timagefilledrectangle ($im, $Map_PXI, $Map_PYI , $Map_PXI+1, $Map_PYI+1, $GB_fill);\n\t}\n\n\t$GB_map_image = $_SESSION['userId'].\"_FarmMap3.png\";\n\timagepng($im, $GB_map_image);\n\timagedestroy($im);\n\n}", "title": "" }, { "docid": "f187c909afe9ad025e116dd126533265", "score": "0.44080243", "text": "function buildSpiderMap($group_id) {\r\n\r\n\t$points = getPoints(120, 350);\r\n\t$width = 80;\r\n\t$height = 60;\r\n\t\r\n\t$fullurl = \"http\" . ((!empty($_SERVER['HTTPS'])) ? \"s\" : \"\") . \"://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\r\n $baseurl = explode(\"?\", $fullurl); \r\n $page = (isset($_GET['page'])) ? 'page='.$_GET['page'].'&' : '';\r\n\t$group = 'group_id='.$group_id.'&';\r\n\t\r\n\t$categories = array(\"Changing & Learning\", \"Learning Relationships\", \"Strategic Awareness\", \"Resilience\", \"Creativity\", \"Meaning Making\", \"Critical Curiosity\");\r\n\r\n\t$i = 0;\r\n\tforeach ($points as $point) {\r\n\t\tlist($x_pos, $y_pos) = $point;\r\n\t\t$label = \"Click to edit image for \".$categories[$i];\r\n\t\t$url = $baseurl[0].'?'.$page.$group.'image_id='.$i;\r\n\t\t$map = $map.'<area shape=\"rect\" coords=\"'.($x_pos-($width/2)).', '.($y_pos-($height/2)).', '.($x_pos+($width/2)).', '.($y_pos+($height/2)).'\" alt=\"'.$label.'\" title=\"'.$label.'\" href=\"'.$url.'\" />';\r\n\t\t$i++;\r\n\t}\r\n\t\r\n\t$map = '<map name=\"spidermap\">'.$map.'</map>';\r\n\t\r\n\treturn $map;\t\r\n}", "title": "" }, { "docid": "4d554f360184bf41ed9c452f64219e0c", "score": "0.44010124", "text": "function creePlateauCarte($cheminVersPlateauCarte,$largeur,$hauteur,array $plateauxCarte) {\n\t \t/* 1) creation image vide */\n\t \t/* Suppression */\n\t \tif (unlink($cheminVersPlateauCarte)) {\n\t \t\t//rien faire\n\t \t}\n\t \t\n\t\t/* Creation */\n\t \t$imageVide = ImageCreateTrueColor($largeur, $hauteur)\tor die (\"Erreur pour cr&eacute;er l'image\");\n\t \tImageColorAllocate ($imageVide, 255, 0, 0);\n\t \timagejpeg($imageVide, $cheminVersPlateauCarte);\n\n\t\t/* 2) creation de l'image definitive */\n\t \t/* Dimension de l'image */\n\t \tlist($largeurImageDestination,$hauteurImageDestination) = getimagesize($cheminVersPlateauCarte);\n\t \t\n\t \t\n\t \t/* L'image vide pour la nouvelle destination */\n\t \t$im = ImageCreateTrueColor($largeurImageDestination, $hauteurImageDestination)\tor die (\"Erreur pour cr&eacute;er l'image\");\n\t \t\n\t \t/* lecture de l'image destination */\n $destination = imagecreatefromjpeg($cheminVersPlateauCarte);\n \n\t \t/* La couleur de fond*/\n\t \tImageColorAllocate ($im, 0, 0, 0);\n\t \t\n\t \t/* Placement des elements du plateau */\n\t \tforeach ($plateauxCarte AS $plateau) {\n\t \t\t$imgPlateau = searchFile(_DIR_IMGS_PLATEAUX_,$plateau['nom'].'.jpg');\n\t \t\tlist($largeurImageSource,$hauteurImageSource) = getimagesize($imgPlateau);\n\t \t\t$source = imagecreatefromjpeg($imgPlateau);\n\t \t\timagecopymerge(\t$destination,\t\t\t\t\t\t\t\t//image de sdestination\n\t \t\t\t\t\t\t$source,\t\t\t\t\t\t\t\t\t//image source (a integrer dans la destination)\n\t \t\t\t\t\t\t(($plateau['x'] - 1) * _TAILLE_CASE_X_),\t//X coin sup gauche \n\t \t\t\t\t\t\t(($plateau['y'] - 1) * _TAILLE_CASE_Y_),\t//Y coin sup gauche\n\t \t\t\t\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t//X depart dans la source\n\t \t\t\t\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t//Y depart dans la source\n\t \t\t\t\t\t\t$largeurImageSource,\t\t\t\t\t\t//largeur de la source\n\t \t\t\t\t\t\t$hauteurImageSource,\t\t\t\t\t\t//hauteur de la source\n\t \t\t\t\t\t\t100);\t\t\t\t\t\t\t\t\t\t// taux <=> transparence\n\t \t}\t \t\n\t \t\n\t \t/* L'enregistrement */ \n\t \timagejpeg($destination, $cheminVersPlateauCarte);\n\t }", "title": "" }, { "docid": "4f80eef8011c3f415f983a3c778f15d5", "score": "0.43996114", "text": "public function combineParts($parts)\n\t{\n\t\t$begin_parts = count($parts);\n\t\techo \" Merging Boundary from \".$begin_parts.\" parts...\";\n\t\tif (!count($parts)) {\n\t\t\treturn array();\n\t\t}\n\t\t$areas = array();\n\t\twhile(count($parts)){\n\t\t\t$arr = array_shift($parts);\n\t\t\twhile(count($parts)) {\n\t\t\t\t//find the part that continues here\n\t\t\t\t$last = $arr[count($arr)-1];\n\t\t\t\t$merge_idx = -1;\n\t\t\t\t$merge_reverse = false;\n\t\t\t\t$merge_distance = 1E9;\n\t\t\t\tfor ($i=0; $i<count($parts); $i++) {\n\t\t\t\t\t$pt = $parts[$i];\n\t\t\t\t\t//at beginning\n\t\t\t\t\tif (($d=point_distance($last, $pt[0])) < $merge_distance) {\n\t\t\t\t\t\t$merge_idx = $i;\n\t\t\t\t\t\t$merge_reverse = false;\n\t\t\t\t\t\t$merge_distance = $d;\n\t\t\t\t\t}\n\t\t\t\t\t//at end\n\t\t\t\t\tif (($d=point_distance($last, $pt[count($pt)-1])) < $merge_distance) {\n\t\t\t\t\t\t$merge_idx = $i;\n\t\t\t\t\t\t$merge_reverse = true;\n\t\t\t\t\t\t$merge_distance = $d;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($merge_idx >= 0 && $merge_distance < MERGE_LIMIT) {\n\t\t\t\t\t$newparts = array();\n\t\t\t\t\tfor ($i=0; $i<count($parts); $i++) {\n\t\t\t\t\t\tif ($i==$merge_idx) {\n\t\t\t\t\t\t\t$merge = $parts[$i];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$newparts[] = $parts[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$parts = $newparts;\n\t\t\t\t\tif ($merge_reverse) {\n\t\t\t\t\t\t$merge = array_reverse($merge);\n\t\t\t\t\t}\n\t\t\t\t\t$arr = array_merge($arr, $merge);\n\t\t\t\t} else {\n\t\t\t\t\t// nothing matching, start new area\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$areas[] = $arr;\n\t\t}\n\t\techo \" Created \".count($areas).\" areas. \\n\";\n\t\treturn $areas;\n\t}", "title": "" }, { "docid": "4f2e288edf07b9361894b06da59dc9d1", "score": "0.43979907", "text": "public function getRelateSAME_GROUP_NAME() {\n global $db, $lg;\n $obj = $this->obj;\n $num_older = 4;\n\n // 2 san pham nho gia hon\n $sql = \"select * from products where price <\". $obj['price'] .\" and cid_cua_groupcha=\". $obj['cid_cua_groupcha'] .\" and id<>\". $this->id . \" and active=1 and name_$lg<>'' and `cid`='\".$obj['cid'].\"' order by is_available desc,price desc limit $num_older\";\n $newer = $db->getAll($sql);\n // 2 san pham gia lon hon\n $sql = \"select * from products where price >=\". $obj['price'] .\" and cid_cua_groupcha=\". $obj['cid_cua_groupcha'] .\" and id<>\". $this->id . \" and active=1 and name_$lg<>'' and `cid`='\".$obj['cid'].\"' order by is_available desc,price desc limit $num_older\";\n $newer2 = $db->getAll($sql);\n\n // merge 4 san pham\n $newarr = array();\n $indexx=0;\n for($iazz=0;$iazz<count($newer);$iazz++)\n {\n if (!isset($newer2[0][\"id\"]))\n {\n // khong co san pham lon gia hon\n if ($iazz == 4) break;\n }else\n if ($iazz == 2) break;\n if (isset($newer[$iazz][\"id\"]))\n {\n $newarr[$indexx] = $newer[$iazz];\n $indexx++;\n }\n\n }\n for($iazz=0;$iazz<count($newer2);$iazz++)\n {\n if (!isset($newer[0][\"id\"]))\n {\n // khong co san pham nho gia hon\n if ($iazz == 4) break;\n }else\n if ($iazz == 2) break;\n\n if (isset($newer2[$iazz][\"id\"]))\n {\n $newarr[$indexx] = $newer2[$iazz];\n $indexx++;\n }\n\n }\n return $newarr;\n /*\n\n $sql = \"select * from products where cid_cua_groupcha=\". $obj['cid_cua_groupcha'] .\" and id<>\". $this->id . \" and active=1 and name_$lg<>'' and `cid`='\".$obj['cid'].\"' order by is_available desc limit $num_older\";\n $newer = $db->getAll($sql);\n\n if (isset($newer[0]['id'])) return $newer;\n\n if ($obj['group_name_vn'] != '')\n $sql = \"select * from products where cid_cua_groupcha=\". $obj['cid_cua_groupcha'] .\" id<>\". $this->id . \" and active=1 and name_$lg<>'' and `group_name_vn`<>'' and `group_name_vn`='\".$obj['group_name_vn'].\"' order by is_available desc limit $num_older\";\n \n \n // echo $sql;\n $newer = $db->getAll($sql);\n\n if (!isset($newer[0]['id']))\n {\n $sql = \"select * from products where cid_cua_groupcha=\". $obj['cid_cua_groupcha'] .\" id<>\". $this->id . \" and active=1 and name_$lg<>'' and `group_name_vn`<>'' and `cid`='\".$obj['cid'].\"' order by is_available desc limit $num_older\";\n //echo $sql;\n $newer = $db->getAll($sql);\n }\n return $newer;\n */\n\n }", "title": "" }, { "docid": "d4709ae464df27ab6fc6821b53304c3a", "score": "0.4395809", "text": "function fixwaysegs($inputway)\r\n{\r\n $outputway = $inputway;\r\n $numsegs = count($outputway->wayseg);\r\n //variables for debugging\r\n $fixedsegs = 0;\r\n $outputway->gaps = 0;\r\n\r\n $fix1 = 0;\r\n $fix2 = 0;\r\n $fix3 = 0;\r\n\r\n if($numsegs > 1)\r\n {\r\n $metaseg_count = 2;\r\n for($i=1; $i<$numsegs; $i++)\r\n {\r\n if(nodes_match(lastnode($outputway->wayseg[$i-1]), firstnode($outputway->wayseg[$i])))\r\n {\r\n //segs are already continuous, nothing to do!\r\n $metaseg_count++;\r\n }\r\n else if(nodes_match(lastnode($outputway->wayseg[$i-1]), lastnode($outputway->wayseg[$i])))\r\n {\r\n //current seg has to be reverted\r\n $outputway->wayseg[$i]->nodes = array_reverse($outputway->wayseg[$i]->nodes);\r\n $metaseg_count++;\r\n $fixedsegs++;\r\n $fix1++;\r\n }\r\n //if at the beginning of a meta-seg, we can still reverse the first seg\r\n else if($metaseg_count == 2)\r\n {\r\n if(nodes_match(firstnode($outputway->wayseg[$i-1]), firstnode($outputway->wayseg[$i])))\r\n {\r\n //reverse the direction of the first seg\r\n $outputway->wayseg[$i-1]->nodes = array_reverse($outputway->wayseg[$i-1]->nodes);\r\n $metaseg_count++;\r\n $fixedsegs++;\r\n $fix2++;\r\n }\r\n else if(nodes_match(firstnode($outputway->wayseg[$i-1]), lastnode($outputway->wayseg[$i])))\r\n {\r\n //reverse the direction of both segs\r\n $outputway->wayseg[$i-1]->nodes = array_reverse($outputway->wayseg[$i-1]->nodes);\r\n $outputway->wayseg[$i]->nodes = array_reverse($outputway->wayseg[$i]->nodes);\r\n $metaseg_count++; \r\n $fixedsegs+=2;\r\n $fix3++;\r\n }\r\n }\r\n else //we have found a gap -> reset metaseg\r\n {\r\n //error_log(\"gap \".($i-1).\"-\".$i);\r\n $i--;\r\n $metaseg_count = 2;\r\n $outputway->gaps++;\r\n }\r\n }\r\n }\r\n\r\n //print out some stats to log\r\n //error_log(\"fixed \".$fixedsegs.\"/\".$numsegs.\", found \".$gaps.\" gaps\");\r\n \r\n //add debugging info to resulting way\r\n $outputway->comment = $outputway->comment.\"\\nfixed \".$fixedsegs.\"/\".$numsegs.\"(\".$fix1.\"|\".$fix2.\"|\".$fix3.\")\".\", found \".$outputway->gaps.\" gaps\";\r\n\r\n //$outputway->name = $outputway->name.\"-fixed\";\r\n\r\n return $outputway;\r\n}", "title": "" }, { "docid": "1618d8e0332729ae02523aae1730460b", "score": "0.43930903", "text": "function shrink($erxork)\n {\n $sixbits = array_chunk($erxork, 6, false); // Now chunk the resulting E XOR K into 6 bits groups.\n //print_r($sixbits); // Test print, the E XOR K is split into 6 bit groups, gucci.\n \n // S box\n $sbox = array(32);// 32-bit S block\n $sbc = 0;\n \n // S1 block\n $s1r1 = array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7);\n $s1r2 = array(0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8);\n $s1r3 = array(4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0);\n $s1r4 = array(15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13);\n \n $s1 = array($s1r1, $s1r2, $s1r3, $s1r4);\n fourbits($sixbits[0], $s1, $sbox, $sbc);\n \n \n // S2 block\n $s2r1 = array(15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10);\n $s2r2 = array(3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5);\n $s2r3 = array(0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15);\n $s2r4 = array(13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9);\n \n $s2 = array($s2r1, $s2r2, $s2r3, $s2r4);\n fourbits($sixbits[1], $s2, $sbox, $sbc);\n \n // S3 block\n $s3r1 = array(10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8);\n $s3r2 = array(13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1);\n $s3r3 = array(13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7);\n $s3r4 = array(1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12);\n \n $s3 = array($s3r1, $s3r2, $s3r3, $s3r4);\n fourbits($sixbits[2], $s3, $sbox, $sbc);\n \n // S4 block\n $s4r1 = array(7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15);\n $s4r2 = array(13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9);\n $s4r3 = array(10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4);\n $s4r4 = array(3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14);\n \n $s4 = array($s4r1, $s4r2, $s4r3, $s4r4);\n fourbits($sixbits[3], $s4, $sbox, $sbc);\n \n // S5 block\n $s5r1 = array(2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9);\n $s5r2 = array(14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6);\n $s5r3 = array(4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 15, 6, 3, 0, 14);\n $s5r4 = array(11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3);\n \n $s5 = array($s5r1, $s5r2, $s5r3, $s5r4);\n fourbits($sixbits[4], $s5, $sbox, $sbc);\n \n // S6 block\n $s6r1 = array(12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11);\n $s6r2 = array(10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8);\n $s6r3 = array(9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6);\n $s6r4 = array(4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13);\n \n $s6 = array($s6r1, $s6r2, $s6r3, $s6r4);\n fourbits($sixbits[5], $s6, $sbox, $sbc);\n \n // S7 block\n $s7r1 = array(4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1);\n $s7r2 = array(13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6);\n $s7r3 = array(1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2);\n $s7r4 = array(6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12);\n \n $s7 = array($s7r1, $s7r2, $s7r3, $s7r4);\n fourbits($sixbits[6], $s7, $sbox, $sbc);\n \n // S8 block\n $s8r1 = array(13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0 ,12, 7);\n $s8r2 = array(1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2);\n $s8r3 = array(7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8);\n $s8r4 = array(2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11);\n \n $s8 = array($s8r1, $s8r2, $s8r3, $s8r4);\n fourbits($sixbits[7], $s8, $sbox, $sbc);\n \n $perm = array(16, 7, 20, 21,\n 29, 12, 28, 17,\n 1, 15, 23, 26,\n 5, 18, 31, 10,\n 2, 8, 24, 14,\n 32, 27, 3, 9,\n 19, 13, 30, 6,\n 22, 11, 4, 25);\n \n $psbox = array(32);\n \n for($i = 0; $i < 32; $i++)\n {\n $psbox[$i] = $sbox[$perm[$i]-1];\n }\n \n return $psbox;\n }", "title": "" }, { "docid": "1651cf14a0ef8e55997c092be5ccd7df", "score": "0.43919125", "text": "function easyMergeP_PandPG_P($matrixP_P, $matrixPG_P, $productPrices, $AllowedPricePercentage, $productId, $DuplicateProductNameSimilarity) {\n $mergedMatrix = array();\n $utility = new Utility();\n $matrixP_P = $utility->multipleKeyArrySort($matrixP_P, 'prob', true);\n $matrixPG_P = $utility->multipleKeyArrySort($matrixPG_P, 'prob', true);\n $count = 0;\n $current_group = array();\n $names = array();\n $maxAllowedPrice = key_exists($productId, $productPrices) ? $productPrices[$productId] * getAllowedPricePercentage($productPrices[$productId], $AllowedPricePercentage) / 100 : 999; // calculating allowed price\n foreach ($matrixPG_P as $rg) {\n//eleminating product having more price than allowed percent of target price\n $price = key_exists($rg['obj_id'], $productPrices) ? $productPrices[$rg['obj_id']] : 0;\n if ($price > $maxAllowedPrice || $price == $maxAllowedPrice)\n continue;\n//eleminating product having more price than allowed percent of target price end\n if (in_array($rg['group'], $current_group))\n continue;\n//for removing similar name\n $nameFound = false;\n foreach ($names as $name) {\n $sim = 0;\n similar_text($rg['obj_nm'], $name, $sim);\n if ($sim >= $DuplicateProductNameSimilarity)\n $nameFound = true;\n }\n if ($nameFound)\n continue;\n//end for removing similar name\n if ($rg['group'] != 0)\n $current_group[] = $rg['group'];\n $mergedMatrix[] = $rg;\n $names[] = $rg['obj_nm']; //for detect similar name, all names hold in array\n $count++;\n if ($count == 15)///changed it from 10 to 10\n break;\n if ($count == 3) {\n foreach ($matrixP_P as $rp) {\n//eleminating product having more price than allowed percent of target price\n $price = key_exists($rp['obj_id'], $productPrices) ? $productPrices[$rp['obj_id']] : 0;\n if ($price > $maxAllowedPrice || $price == $maxAllowedPrice)\n continue;\n//eleminating product having more price than allowed percent of target price end\n if (in_array($rp['group'], $current_group))\n continue;\n//for removing similar name\n $nameFound = false;\n foreach ($names as $name) {\n $sim = 0;\n similar_text($rp['obj_nm'], $name, $sim);\n if ($sim >= $DuplicateProductNameSimilarity)\n $nameFound = true;\n }\n if ($nameFound)\n continue;\n//end for removing similar name\n if ($rp['group'] != 0)\n $current_group[] = $rp['group'];\n $mergedMatrix[] = $rp;\n $names[] = $rp['obj_nm']; //for detect similar name, all names hold in array\n $count++;\n if ($count == 5)\n break;\n }//end of inner foreach\n }//end of if\n }\n return $mergedMatrix;\n}", "title": "" }, { "docid": "1bb435459b89d3b9730c74f0831d17ed", "score": "0.43876868", "text": "function clubsandcaucuses()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "02035e5215b3e12d0e4029c8dd4f06a7", "score": "0.43871033", "text": "private function drawTile() {\n\t\t// On parcours l'ensemble des pixels de gauche à droite et de haut en bas.\n\t\t// Pour chaque position en pixel (x,y), on récupère la position logique en tile.\n\t\t// Ensuite on intérroge la DB pour obtenir le type de tile à afficher.\n\t\t// On boucle, en incrémentant du zoom. Cela dit comme c'est excessivement couteux\n\t\t// on utilise un multiple du zoom (donc le dessin est moins précis)\n\t\t\n\t\t// On cherche les position minimun et maximum sur le repère \"position\",\n\t\t// puis on interroge la base de données avec des \"x between ... AND ...\"\n\t\t// afin de recuperer l'ensemble des points pour lesquels on a une info.\n\t\t// C'est incroyablement plus rapide que de lancer une requête par point logique :\n\t\t// il y a un facteur 100 (0.1s à 10s) !\n\t\t\n\t\t$tiles_list = $this->getTiles();\n\t\tforeach ($tiles_list as $name => $tile) {\n\t\t\tlist($x, $y) = explode(';', $name);\n\t\t\t$p_physique = $this->positionToPixel(new Point($x, $y));\n\t\t\t$color = '';\n\t\t\tswitch($tile['type']) {\n\t\t\t\tcase 'champ':\n\t\t\t\t\t$color = $this->colors['champ'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'palissade':\n\t\t\t\t\t$color = $this->colors['palissade'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'route':\n\t\t\t\t\t$color = $this->colors[strtolower($tile['type_route'])];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'environnement':\n\t\t\t\t\t$color = $this->colors[strtolower($tile['nom_systeme_environnement'])];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bosquet':\n\t\t\t\t\t$color = $this->colors[strtolower($tile['nom_systeme_type_bosquet'])];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$color = $this->colors['black'];\n\t\t\t}\n\t\t\timagefilledrectangle($this->img,\n\t\t\t\t$p_physique->x,\n\t\t\t\t$p_physique->y,\n\t\t\t\t$p_physique->x + $this->tile_size,\n\t\t\t\t$p_physique->y + $this->tile_size,\n\t\t\t\t$color);\n\t\t}\n\t}", "title": "" }, { "docid": "7fac3a69d6fd4d8b7cff4195a45486f8", "score": "0.43867216", "text": "function getPiecesBetween ($from, $to, $chesboard)\r\n\t{\r\n\t\t\r\n\t\t$setBetween = array();\r\n\t\r\n\t\tprint (\"<BR> pieces between pawn move: \");\r\n\t\tprint_r($setBetween);\r\n\t\tprint (\"<BR>\");\r\n\t\t\t\t\r\n\t\treturn $setBetween;\t\r\n\t}", "title": "" }, { "docid": "8799102119f808778853f723a0c05d48", "score": "0.438055", "text": "public function run()\n {\n\n $district = array(\n // Zone 1\n array('name' => '04D01', 'code' => '04D01', 'zone' => 1),\n array('name' => '04D02', 'code' => '04D02' , 'zone' => 1),\n array('name' => '04D03', 'code' => '04D03' , 'zone' => 1),\n array('name' => 'UNIDADES CANTON RIOVERDE', 'code' => '00' , 'zone' => 1),\n array('name' => 'UNIDADES CANTON ESMERALDAS', 'code' => '00' , 'zone' => 1),\n array('name' => '08D02', 'code' => '08D02' , 'zone' => 1),\n array('name' => '08D03', 'code' => '08D03' , 'zone' => 1),\n array('name' => '08D04', 'code' => '08D04' , 'zone' => 1),\n array('name' => '08D05', 'code' => '08D05' , 'zone' => 1),\n array('name' => '10D01', 'code' => '10D01' , 'zone' => 1),\n array('name' => '10D02', 'code' => '10D02' , 'zone' => 1),\n array('name' => '10D03', 'code' => '10D03' , 'zone' => 1),\n array('name' => '21D02', 'code' => '21D02' , 'zone' => 1),\n array('name' => '21D04', 'code' => '21D04' , 'zone' => 1),\n // Zone 2\n array('name' => '15D01', 'code' => '15D01' , 'zone' => 2),\n array('name' => '15D02', 'code' => '15D02' , 'zone' => 2),\n array('name' => '17D10', 'code' => '17D10' , 'zone' => 2),\n array('name' => '17D11', 'code' => '17D11' , 'zone' => 2),\n array('name' => '17D12', 'code' => '17D12' , 'zone' => 2),\n array('name' => '22D01', 'code' => '22D01' , 'zone' => 2),\n array('name' => '22D02', 'code' => '22D02' , 'zone' => 2),\n array('name' => '22D03', 'code' => '22D03' , 'zone' => 2),\n // Zone 3\n array('name' => '05D01', 'code' => '05D01' , 'zone' => 3),\n array('name' => '05D03', 'code' => '05D03' , 'zone' => 3),\n array('name' => '05D04', 'code' => '05D04' , 'zone' => 3),\n array('name' => '05D06', 'code' => '05D06' , 'zone' => 3),\n array('name' => '06D01', 'code' => '06D01' , 'zone' => 3),\n array('name' => '06D02', 'code' => '06D02' , 'zone' => 3),\n array('name' => '06D04', 'code' => '06D04' , 'zone' => 3),\n array('name' => '16D01', 'code' => '16D01' , 'zone' => 3),\n array('name' => '16D02', 'code' => '16D02' , 'zone' => 3),\n array('name' => '18D02', 'code' => '18D02' , 'zone' => 3),\n array('name' => '18D04', 'code' => '18D04' , 'zone' => 3),\n // Zona 4\n array('name' => 'CANTON PORTOVIEJO', 'code' => '00' , 'zone' => 4),\n array('name' => '13D02', 'code' => '13D02' , 'zone' => 4),\n array('name' => '13D03', 'code' => '13D03' , 'zone' => 4),\n array('name' => '13D04', 'code' => '13D04' , 'zone' => 4),\n array('name' => '13D05', 'code' => '13D05' , 'zone' => 4),\n array('name' => '13D06', 'code' => '13D06' , 'zone' => 4),\n array('name' => '13D07', 'code' => '13D07' , 'zone' => 4),\n array('name' => 'OFICINA TECNICA PICHINCHA', 'code' => '00' , 'zone' => 4),\n array('name' => '13D09', 'code' => '13D09' , 'zone' => 4),\n array('name' => 'OFICINA TECNICA PEDERNALES', 'code' => '00' , 'zone' => 4),\n array('name' => '13D11', 'code' => '13D11' , 'zone' => 4),\n array('name' => '13D12', 'code' => '13D12' , 'zone' => 4),\n array('name' => '23D01', 'code' => '23D01' , 'zone' => 4),\n array('name' => 'OFICINA TECNICA LOS ROSALES', 'code' => '00' , 'zone' => 4),\n array('name' => 'OFICINA TECNIOCA LA CONCORDIA', 'code' => '00' , 'zone' => 4),\n // Zona 5\n array('name' => '02D01', 'code' => '02D01' , 'zone' => 5),\n array('name' => '02D02', 'code' => '02D02' , 'zone' => 5),\n array('name' => '02D03', 'code' => '02D03' , 'zone' => 5),\n array('name' => '02D04', 'code' => '02D04' , 'zone' => 5),\n array('name' => '20D01', 'code' => '20D01' , 'zone' => 5),\n array('name' => '09D11', 'code' => '09D11' , 'zone' => 5),\n array('name' => '09D12', 'code' => '09D12' , 'zone' => 5),\n array('name' => '09D13', 'code' => '09D13' , 'zone' => 5),\n array('name' => '09D14', 'code' => '09D14' , 'zone' => 5),\n array('name' => '09D15', 'code' => '09D15' , 'zone' => 5),\n array('name' => '09D16', 'code' => '09D16' , 'zone' => 5),\n array('name' => '09D17', 'code' => '09D17' , 'zone' => 5),\n array('name' => '09D18', 'code' => '09D18' , 'zone' => 5),\n array('name' => '09D19', 'code' => '09D19' , 'zone' => 5),\n array('name' => '09D20', 'code' => '09D20' , 'zone' => 5),\n array('name' => '09D21', 'code' => '09D21' , 'zone' => 5),\n array('name' => '09D22', 'code' => '09D22' , 'zone' => 5),\n array('name' => '12D01', 'code' => '12D01' , 'zone' => 5),\n array('name' => '12D02', 'code' => '12D02' , 'zone' => 5),\n array('name' => '12D03', 'code' => '12D03' , 'zone' => 5),\n array('name' => '12D04', 'code' => '12D04' , 'zone' => 5),\n array('name' => '12D05', 'code' => '12D05' , 'zone' => 5),\n array('name' => '12D06', 'code' => '12D06' , 'zone' => 5),\n array('name' => '24D01', 'code' => '24D01' , 'zone' => 5),\n array('name' => '24D02', 'code' => '24D02' , 'zone' => 5),\n // Zona 6\n array('name' => '01D01', 'code' => '01D01' , 'zone' => 6),\n array('name' => '01D02', 'code' => '01D02' , 'zone' => 6),\n array('name' => '01D04', 'code' => '01D04' , 'zone' => 6),\n array('name' => '01D05', 'code' => '01D05' , 'zone' => 6),\n array('name' => '01D06', 'code' => '01D06' , 'zone' => 6),\n array('name' => '01D07', 'code' => '01D07' , 'zone' => 6),\n array('name' => '03D01', 'code' => '03D01' , 'zone' => 6),\n array('name' => '03D02', 'code' => '03D02' , 'zone' => 6),\n array('name' => '03D03', 'code' => '03D03' , 'zone' => 6),\n array('name' => '14D01', 'code' => '14D01' , 'zone' => 6),\n array('name' => '14D02', 'code' => '14D02' , 'zone' => 6),\n array('name' => '14D03', 'code' => '14D03' , 'zone' => 6),\n array('name' => '14D04', 'code' => '14D04' , 'zone' => 6),\n array('name' => '14D05', 'code' => '14D05' , 'zone' => 6),\n array('name' => '14DO06', 'code' => '14DO06' , 'zone' => 6),\n // zona 7\n array('name' => '07D01', 'code' => '07D01' , 'zone' => 7),\n array('name' => '07D02', 'code' => '07D02' , 'zone' => 7),\n array('name' => '07D03', 'code' => '07D03' , 'zone' => 7),\n array('name' => '07D04', 'code' => '07D04' , 'zone' => 7),\n array('name' => '07D05', 'code' => '07D05' , 'zone' => 7),\n array('name' => '07D06', 'code' => '07D06' , 'zone' => 7),\n array('name' => 'CANTON LOJA', 'code' => '00' , 'zone' => 7),\n array('name' => '11D02', 'code' => '11D02' , 'zone' => 7),\n array('name' => '11D03', 'code' => '11D03' , 'zone' => 7),\n array('name' => '11D04', 'code' => '11D04' , 'zone' => 7),\n array('name' => '11D05', 'code' => '11D05' , 'zone' => 7),\n array('name' => '11D06', 'code' => '11D06' , 'zone' => 7),\n array('name' => '11D07', 'code' => '11D07' , 'zone' => 7),\n array('name' => '11DO8', 'code' => '11DO8' , 'zone' => 7),\n array('name' => '11D09', 'code' => '11D09' , 'zone' => 7),\n array('name' => '19D01', 'code' => '19D01' , 'zone' => 7),\n array('name' => '19D03', 'code' => '19D03' , 'zone' => 7),\n array('name' => '19D04', 'code' => '19D04' , 'zone' => 7),\n // zona 8\n array('name' => '09D01', 'code' => '09D01' , 'zone' => 8),\n array('name' => '09D02', 'code' => '09D02' , 'zone' => 8),\n array('name' => '09D03', 'code' => '09D03' , 'zone' => 8),\n array('name' => '09D04', 'code' => '09D04' , 'zone' => 8),\n array('name' => '09D05', 'code' => '09D05' , 'zone' => 8),\n array('name' => '09D06', 'code' => '09D06' , 'zone' => 8),\n array('name' => '09D07', 'code' => '09D07' , 'zone' => 8),\n array('name' => '09D08', 'code' => '09D08' , 'zone' => 8),\n array('name' => '09D09', 'code' => '09D09' , 'zone' => 8),\n array('name' => '09D10', 'code' => '09D10' , 'zone' => 8),\n array('name' => '09D23', 'code' => '09D23' , 'zone' => 8),\n array('name' => '09D24', 'code' => '09D24' , 'zone' => 8),\n // Zona 9\n array('name' => 'ZONA 9', 'code' => 'ZONA 9' , 'zone' => 9),\n\n );\n\n foreach($district as $value){\n district::create([\n 'name' => $value['name'],\n 'code' => $value['code'],\n 'zones_id' => $value['zone'],\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ca7b70a75d5261b01df44e688df3d25b", "score": "0.43684047", "text": "function breakRegions($number) {\n\t\t$result = array();\n\t\t$newend = $this->start;\n\t\tfor($i = 0; $i < $number; $i++) {\n\t\t\t$newstart = $newend;\n\t\t\t$newend = $this->start + round($this->getLength() / $number * ($i + 1));\n\t\t\tif($newend > $this->end) {\n\t\t\t\t$newend = $this->end;\n\t\t\t}\n\t\t\t$result []= static::newFromCoordinates($this->chr, $newstart, $newend);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "db0993f560e9ed8cd32753880b755873", "score": "0.43649462", "text": "private function convertSkinToSquare(): void\n {\n\n\n if ($this->width === $this->height) {\n return;\n }\n\n $block_size = $this->getBlockSize();\n\n $leg = $this->getRightLeg();\n $arm = $this->getRightArm();\n\n\n $img = $this->createEmptyImg($this->width, $this->width);\n $leftArm = $this->createEmptyImg(4 * $block_size, 4 * $block_size);\n $leftLeg = $this->createEmptyImg(4 * $block_size, 4 * $block_size);\n\n $right = $leg->right;\n $front = $leg->front;\n $left = $leg->left;\n $back = $leg->back;\n $top = $leg->top;\n $bottom = $leg->bottom;\n\n imageflip($right, IMG_FLIP_HORIZONTAL);\n imageflip($front, IMG_FLIP_HORIZONTAL);\n imageflip($left, IMG_FLIP_HORIZONTAL);\n imageflip($back, IMG_FLIP_HORIZONTAL);\n imageflip($top, IMG_FLIP_HORIZONTAL);\n imageflip($bottom, IMG_FLIP_HORIZONTAL);\n\n\n imagecopyresampled($img, $this->skin, 0, 0, 0, 0, $this->width, $this->height, $this->width, $this->height);\n\n // Copy the right side of the leg\n imagecopyresampled($leftLeg, $left, 0 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the front side of the leg\n imagecopyresampled($leftLeg, $front, 1 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the left side of the leg\n imagecopyresampled($leftLeg, $right, 2 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the back side of the leg\n imagecopyresampled($leftLeg, $back, 3 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the top side of the leg\n imagecopyresampled($leftLeg, $top, 1 * $block_size, 0 * $block_size, 0, 0, 1 * $block_size, 1 * $block_size, 1 * $block_size, 1 * $block_size);\n\n // Copy the bottom side of the leg\n imagecopyresampled($leftLeg, $bottom, 2 * $block_size, 0 * $block_size, 0, 0, 1 * $block_size, 1 * $block_size, 1 * $block_size, 1 * $block_size);\n\n imagecopyresampled($img, $leftLeg, 4 * $block_size, 12 * $block_size, 0, 0, 4 * $block_size, 4 * $block_size, 4 * $block_size, 4 * $block_size);\n\n $right = $arm->right;\n $front = $arm->front;\n $left = $arm->left;\n $back = $arm->back;\n $top = $arm->top;\n $bottom = $arm->bottom;\n\n imageflip($right, IMG_FLIP_HORIZONTAL);\n imageflip($front, IMG_FLIP_HORIZONTAL);\n imageflip($left, IMG_FLIP_HORIZONTAL);\n imageflip($back, IMG_FLIP_HORIZONTAL);\n imageflip($top, IMG_FLIP_HORIZONTAL);\n imageflip($bottom, IMG_FLIP_HORIZONTAL);\n\n // Copy the right side of the arm\n imagecopyresampled($leftArm, $left, 0 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the front side of the arm\n imagecopyresampled($leftArm, $front, 1 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the left side of the arm\n imagecopyresampled($leftArm, $right, 2 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the back side of the arm\n imagecopyresampled($leftArm, $back, 3 * $block_size, 1 * $block_size, 0, 0, 1 * $block_size, 3 * $block_size, 1 * $block_size, 3 * $block_size);\n\n // Copy the top side of the arm\n imagecopyresampled($leftArm, $top, 1 * $block_size, 0 * $block_size, 0, 0, 1 * $block_size, 1 * $block_size, 1 * $block_size, 1 * $block_size);\n\n // Copy the bottom side of the arm\n imagecopyresampled($leftArm, $bottom, 2 * $block_size, 0 * $block_size, 0, 0, 1 * $block_size, 1 * $block_size, 1 * $block_size, 1 * $block_size);\n\n imagecopyresampled($img, $leftArm, 8 * $block_size, 12 * $block_size, 0, 0, 4 * $block_size, 4 * $block_size, 4 * $block_size, 4 * $block_size);\n\n imagesavealpha($img, true);\n\n $this->skin = $img;\n }", "title": "" }, { "docid": "073ebca1e875c80b34aa9cddacae5a8e", "score": "0.43620247", "text": "function toggle(& $mapPart1, & $mapPart2, $startX, $startY, $endX, $endY) {\n for ($x = $startX; $x <= $endX; $x++) {\n for ($y = $startY; $y <= $endY; $y++) {\n // Part 1\n $mapPart1[$x][$y] = ($mapPart1[$x][$y] == false) ? true : false;\n\n // Part 2\n $mapPart2[$x][$y] += 2;\n }\n }\n}", "title": "" }, { "docid": "d833598d89d3b65c3b532f1e1772af4d", "score": "0.43618014", "text": "protected function getStationRelations(array $mapped_values) {\n $db = Database::getConnection('default', 'default');\n $stop_id = $mapped_values['field_stop_id'];\n\n /******************************\n * Related Stops\n ******************************/\n $mapped_values['field_related_stops'] = [];\n $mapped_values['field_related_routes'] = [];\n\n $query = $db->select('gtfs_stops', 'gs');\n $query->fields('gs', ['stop_id']);\n $query->condition('gs.parent_station', $stop_id);\n $results = $query->execute()->fetchAll();\n\n if (!empty($results)) {\n foreach ($results as $res) {\n $mapped_values['field_related_stops'][] = $res->stop_id;\n }\n }\n\n /******************************\n * Related Routes\n ******************************/\n if (!empty($mapped_values['field_related_stops'])) {\n $query = $db->select('vta_stops_all', 'vsa');\n $query->fields('vsa', ['data']);\n $query->condition('vsa.id', $mapped_values['field_related_stops'], 'IN');\n $results = $query->execute()->fetchAll();\n\n $related_route_ids = [];\n if (!empty($results)) {\n foreach ($results as $res) {\n $related_route_ids = array_merge($related_route_ids, array_keys(unserialize($res->data)['routes']));\n }\n\n if (!empty($related_route_ids)) {\n $query = $db->select('node', 'n');\n $query->fields('n', ['nid']);\n $query->leftJoin('node__field_route_id', 'rid', 'n.nid = rid.entity_id');\n $query->condition('rid.bundle', 'route');\n $query->condition('rid.field_route_id_value', $related_route_ids, 'IN');\n $results = $query->execute()->fetchAll();\n\n if (!empty($results)) {\n foreach ($results as $res) {\n $mapped_values['field_related_routes'][] = $res->nid;\n }\n }\n }\n }\n }\n\n return $mapped_values;\n }", "title": "" }, { "docid": "1da3b5ca6a470727488096c12d3d70dc", "score": "0.4352704", "text": "public function generate()\n\t{\n\t\t//they don't count as not completed because you are re-generating\n\t\t$this->clearAssignments();\n\n\t\t//Get a pool of chores ordered by priority\n\t\t$this->pool = $this->household->chorePool();\n\n\t\tforeach($this->pool as $chore)\n\t\t\t$this->assign($chore);\n\t\t\n\t}", "title": "" }, { "docid": "2b5aab7d587fa583b85695e7891f2243", "score": "0.4351837", "text": "function reach($path,$answer,$ret){\r\n\tglobal $width, $height;\r\n\t$reach=array();\r\n\t$count=array();\r\n\t$change=0;\r\n\tforeach($path as $t){\r\n\t\t$n=$t[\"area\"];\r\n\t\t$factor=getshapes($n);\r\n\t\tforeach($factor as $sum){\r\n\t\t\tfor ($k = 0; $k < $n; $k++) {//for each pivot point\r\n\t\t\t\t$return=pivot2($sum,$k,$t[\"x\"],$t[\"y\"],$answer,$reach);\r\n\t\t\t\t$reach=$return[0];\r\n\t\t\t\tif($return[1]){\r\n\t\t\t\t\t$count[$t[\"x\"]][$t[\"y\"]]=$count[$t[\"x\"]][$t[\"y\"]]+1;//so that NULL+1=1\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t$answer1=array();\r\n\tfor ($m = 0; $m < count($path); $m++){\r\n\t\t$t=$path[$m];\r\n\t\t$bigesti=NULL;\r\n\t\t$bigestj=NULL;\r\n\t\t$smallesti=NULL;\r\n\t\t$smallestj=NULL;\r\n\t\tfor($i = 0; $i < $width+1; $i++){ //for each row\r\n\t\t\tfor($j = 0; $j < $height+1; $j++){ //for each collum\r\n\t\t\t\t//do this last, just in case joining two sections results in completion\r\n\t\t\t\tif($answer[$i][$j]===NULL){\r\n\t\t\t\t\t$countreach=count($reach[$i][$j]);\r\n\t\t\t\t\t$keys=array();\r\n\t\t\t\t\tif($countreach>0){\r\n\t\t\t\t\t\t$keys=array_keys($reach[$i][$j], array($t[\"x\"],$t[\"y\"]));//does a search\r\n\t\t\t\t\t\t$countkeys=count($keys);\r\n\t\t\t\t\t\tif($countkeys==$countreach){\r\n\t\t\t\t\t\t\tif($bigesti===NULL){\r\n\t\t\t\t\t\t\t\t$bigesti=$i;\r\n\t\t\t\t\t\t\t\t$smallesti=$i;\r\n\t\t\t\t\t\t\t\t$smallestj=$j;\r\n\t\t\t\t\t\t\t\t$bigestj=$j;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($j>$bigestj){\r\n\t\t\t\t\t\t\t\t$bigestj=$j;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($i>$bigesti){\r\n\t\t\t\t\t\t\t\t$bigesti=$i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($j<$smallestj){\r\n\t\t\t\t\t\t\t\t$smallestj=$j;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($count[$t[\"x\"]][$t[\"y\"]]==count($keys)&&$count[$t[\"x\"]][$t[\"y\"]]!=NULL){\r\n\t\t\t\t\t\t\t$answer[$i][$j]=array($t[\"x\"],$t[\"y\"]);\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}\r\n\t\t}\r\n\t\tif($bigestj!==NULL){\r\n\t\t\t$fill=fillme($bigestj,$bigesti,$smallestj,$smallesti,$answer,$t);\r\n\t\t\tif($fill[1]){\r\n\t\t\t\t$answer=$fill[0];\r\n\t\t\t\t$change=1;\r\n\t\t\t}\r\n\t\t\tif(((($bigesti+1)-$smallesti)*(($bigestj+1)-$smallestj))==$t[\"area\"]){\r\n\t\t\t\tarray_push($ret,array(array($smallesti,$smallestj),array($bigesti,$bigestj)));\r\n\t\t\t\tunset($path[$m]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tif($change==0){\r\n\t\treturn 0;\r\n\t}\r\n\t$path=array_values($path);\r\n\treturn array($path,$answer,$ret);\r\n}", "title": "" }, { "docid": "964ee6b122bc9ba213eb39de600c5ebb", "score": "0.4346516", "text": "function scan_bishop($board,$start_square_i,$start_square_j) {\n\t\t\n\t\t$moves = [];\n\t\tarray_push($moves,scan_diagonals($board,$start_square_i,$start_square_j));\n\t\treturn array_reduce($moves, 'array_merge', array());\n\t}", "title": "" }, { "docid": "98711de095a6802a28368cdd30da00bd", "score": "0.43449342", "text": "private function buildMapPositions()\n {\n $this->console->writeln(\"Building map positions ...\");\n \n $mapPositions = $this->em->getRepository(MapPosition::class)->findBy([\n 'Type' => 'NPC',\n ]);\n \n /** @var MapPosition $mp */\n foreach ($mapPositions as $mp) {\n $map = Redis::Cache()->get(\"xiv_Map_{$mp->getMapID()}\");\n \n $this->positions[$mp->getENpcResidentID()] = [\n 'Map' => $map,\n 'Position' => [\n 'X' => $mp->getPosX(),\n 'Y' => $mp->getPosY(),\n ],\n 'Pixels' => [\n 'X' => $mp->getPixelX(),\n 'Y' => $mp->getPixelY(),\n ],\n ];\n }\n \n unset($mapPositions);\n \n $this->console->writeln(\"Complete\");\n }", "title": "" }, { "docid": "7388937531a176216ca0bbb47efcf4cf", "score": "0.43448243", "text": "public function getMap($data) {\n\t\t/** reading variables */\n\t\t$this->offsetX = $data['offsetX'];\n\t\t$this->offsetY = $data['offsetY'];\n\t\t$this->mapname = $data['map'];\t\n\t\t/** setting variables **/\n\t\t$this->map = file('maps/' . $this->mapname . '/map.txt');\t\t\n\t\t$this->mapSizeX = strlen($this->map[0]);\n\t\t$this->mapSizeY = count($this->map);\n\t\tif(file_exists('maps/' . $this->mapname . '/river.txt')) {\n\t\t\t$this->rivers = file('maps/' . $this->mapname . '/river.txt');\n\t\t}\n\t\t//print_r($map[1][1]);\n\t\t\n\t\t/**\tSCREEN WALKTRHOUGH\n\t\t\tx,y - screen coords \n\t\t\tdx, dy - map coords **/\n\t\t\t\n\t\t/* foreach screen tile row */\n\t\tfor($y = - 1; $y <= conf('screenTilesY'); $y++) {\n\t\t\n\t\t\t/* map y = screen y + offset y */\n\t\t\t$dy = $y + $this->offsetY;\n\t\t\t/* if map y out of boundaries - this means snow */\n\t\t\tif($dy < 0 || $dy == $this->mapSizeY) {\n\t\t\t\tfor($x = -1; $x <= conf('screenTilesX'); $x++) {\n\t\t\t\t\t$this->tiles[$y][$x] = array( 'terrain' => 'snow');\n\t\t\t\t}\n\t\t\t} \t\t\t\n\t\t\telse \t\t\t\n\t\t\t{\t\n\t\t\t\t$row = $this->map[$dy];\n\t\t\t\tif(!isset($this->tiles[$y])) { $this->tiles[$y] = array(); }\n\t\t\t\t/* foreach screen tile cell */\n\t\t\t\tfor($x = - 1; $x <= conf('screenTilesX'); $x++) {\n\t\t\t\t\n\t\t\t\t\t/* map x = screen x + offset x */\n\t\t\t\t\t$dx = $x + $this->offsetX;\n\t\t\t\t\t/* if map x out of boundaries - pick up tile from another side of map \n\t\t\t\t\t\tTODO - if map flat - fill with water instead */\n\t\t\t\t\tif($dx < 0) $dx = $this->mapSizeX + $dx;\n\t\t\t\t\tif($dx >= $this->mapSizeX) $dx = $this->mapSizeX - $dx;\n\t\t\t\t\t\n\t\t\t\t\tif(!isset($this->tiles[$y][$x])) $this->tiles[$y][$x] = array();\n\t\t\t\t\t/* setting up terrain */\t\t\t\t\n\t\t\t\t\t$_terrain = $this->terrain[$row[$dx]];\n\t\t\t\t\tif(empty($_terrain)) $_terrain = 'water';\n\t\t\t\t\t/* if its upon surface (hills, mountains, forrest) - put in terrain2 layer */\n\t\t\t\t\tif(isset($this->terrain2[$_terrain])) {\n\t\t\t\t\t\t$this->tiles[$y][$x]['terrain2'] = $_terrain;\n\t\t\t\t\t\t$_terrain = $this->terrain2[$_terrain];\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$this->tiles[$y][$x]['terrain'] = $_terrain;\n\t\t\t\t\t/** adding coast **/\n\t\t\t\t\tif($_terrain == 'water') {\n\t\t\t\t\t\t$this->getCoast($dx, $dy);\n\t\t\t\t\t}\n\t\t\t\t\t/** adding river **/\n\t\t\t\t\tif($this->rivers[$dy][$dx] == 'r') {\n\t\t\t\t\t\tunset($this->tiles[$y][$x]['terrain2']);\n\t\t\t\t\t\t$this->tiles[$y][$x]['river'] = $this->getRiver($dx,$dy);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t/** parsing output **/\n\t\techo json_encode($this->tiles);\n\t}", "title": "" }, { "docid": "1f821da025c2f745122902f9fb0219e6", "score": "0.43269798", "text": "function calculer_jointure(&$boucle, $depart, $arrivee, $col='', $cond=false)\n{\n static $num=array();\n $res = calculer_chaine_jointures($boucle, $depart, $arrivee);\n if (!$res) return \"\";\n\n list($dnom,$ddesc) = $depart;\n $id_primary = $ddesc['key']['PRIMARY KEY'];\n\t$keys = preg_split('/,\\s*/', $id_primary);\n $id_table = \"\";\n $cpt = &$num[$boucle->descr['nom']][$boucle->id_boucle];\n foreach($res as $r) {\n list($d, $a, $j) = $r;\n $n = ++$cpt;\n $boucle->join[$n]= array(($id_table ? $id_table : $d), $j);\n $boucle->from[$id_table = \"L$n\"] = $a[0]; \n }\n\n // pas besoin de group by \n // (cf http://article.gmane.org/gmane.comp.web.spip.devel/30555)\n // si une seule jointure et sur une table avec primary key formee\n // de l'index principal et de l'index de jointure (non conditionnel! [6031])\n // et operateur d'egalite (http://trac.rezo.net/trac/spip/ticket/477)\n\n if ($pk = (count($boucle->from) == 1) && !$cond) {\n if ($pk = $a[1]['key']['PRIMARY KEY']) {\n\t$pk=preg_match(\"/^$id_primary, *$col$/\", $pk) OR\n\t preg_match(\"/^$col, *$id_primary$/\", $pk);\n }\n }\n // la clause Group by est en conflit avec ORDER BY, a completer\n\n if (!$pk)\n\tforeach($keys as $id_prim){\n\t\t$id_field = $dnom . '.' . $id_prim;\n\t\tif (!in_array($id_field, $boucle->group)) {\n\t\t\t$boucle->group[] = $id_field;\n\t\t\t// postgres exige que le champ pour GROUP soit dans le SELECT\n\t\t\tif (!in_array($id_field, $boucle->select))\n\t\t\t$boucle->select[] = $id_field;\n\t\t}\n\t}\n\n $boucle->modificateur['lien'] = true;\n return $n;\n}", "title": "" }, { "docid": "12799dc47410de2847943602f1a5c3be", "score": "0.43165195", "text": "public function generatePuzzle(){\n\t\t// Copy list of across and down words\n\t\t// $listAcross = $this->placedWordListAcross;\n\t\t// $listDown = $this->placedWordListDown;\n\n\t\t$wordList = $this->placedWords;\n\n\t\t// Sort the words by their placement on the grid\n\t\t// Words on higher rows and lowest columns take priority\n\t\t// $listAcross = $this->sortPlacedWords($listAcross);\n\t\t// $listDown = $this->sortPlacedWords($listDown);\n\t\t$wordList = $this->sortPlacedWords($wordList);\n\n\t\t// Start looping for each word going across and assign it a number\n\t\t// If that word's starting position also contains a word going down then assign the number also to the down word.\n\t\t// When assigning down words do not repeate a number already used for a down word assigned during across loop.\n\t\t$numberCount = 1;\n\n\n\t\tfor($i = 0, $size = count($wordList); $i < $size; $i++){\n\t\t\t$currentWord = $wordList[$i];\n\n\t\t\tif(isset($currentWord[5])){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif($i < (count($wordList)) - 1){\n\t\t\t\t$nextWord = $wordList[$i+1];\n\n\t\t\t\tif($currentWord[1] == $nextWord[1] && $currentWord[2] == $nextWord[2]){\n\t\t\t\t\t$wordList[$i+1][5] = $numberCount;\n\t\t\t\t\t$wordList[$i+1][6] = $this->getHintForPuzzleList($nextWord[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$wordList[$i][5] = $numberCount;\n\t\t\t$wordList[$i][6] = $this->getHintForPuzzleList($currentWord[0]);\n\t\t\t$numberCount++;\n\t\t}\n\t\t$this->puzzleNumbers = $wordList;\n\n\t\t/*\n\t\t$downNumbersUsed = [];\n\n\t\t// Assign a number to each word going across\n\t\tforeach($listAcross as &$wordPlacement){\n\n\t\t\t// Check to see if there's a word going down at start position\n\t\t\t$wordDown = $this->findAtLocation($listDown, $wordPlacement);\n\n\t\t\t// Assign the wordPlacement the puzzle number\n\t\t\t$wordPlacement[3] = $numberCount;\n\n\t\t\t// Create a puzzle record: puzzle number, row, column, direction, word, hint\n\t\t\t$puzzleNum = [];\n\t\t\t$puzzleNum[0] = $numberCount;\n\t\t\t$puzzleNum[1] = $wordPlacement[1];\n\t\t\t$puzzleNum[2] = $wordPlacement[2];\n\t\t\t$puzzleNum[3] = \"right\";\n\t\t\t$puzzleNum[4] = $wordPlacement[0];\n\t\t\t$puzzleNum[5] = $this->getHintForPuzzleList($wordPlacement[0]);\n\n\t\t\t// Add word to puzzle list\n\t\t\tarray_push($this->puzzleNumbers, $puzzleNum);\n\n\t\t\t// If a word also exists down then create another record, but with the down word details\n\t\t\tif($wordDown >= 0){\n\t\t\t\t$puzzleNum[4] = $listDown[$wordDown][0];\n\t\t\t\t$puzzleNum[3] = \"down\";\n\t\t\t\t$puzzleNum[5] = $this->getHintForPuzzleList($listDown[$wordDown][0]);\n\n\t\t\t\tarray_push($this->puzzleNumbers, $puzzleNum);\n\n\t\t\t\t// Set value so that word can be skipped during down loop\n\t\t\t\t$listDown[$wordDown][3] = $numberCount;\n\n\t\t\t\t// Add value to array that is used during down loop\n\t\t\t\tarray_push($downNumbersUsed, $numberCount);\n\t\t\t}\n\n\t\t\t$numberCount++;\n\t\t}\n\n\t\t// Loop for each word going down\n\t\tforeach($listDown as &$wordPlacement){\n\t\t\t// If word hasn't been numbered yet then number it\n\t\t\tif(!isset($wordPlacement[3])){\n\n\t\t\t\t// Increment the numberCount until a new down number is found\n\t\t\t\twhile(in_array($numberCount, $downNumbersUsed)){\n\t\t\t\t\t$numberCount++;\n\t\t\t\t}\n\n\t\t\t\t// Assign puzzle number to wordPlacement\n\t\t\t\t$wordPlacement[3] = $numberCount;\n\n\t\t\t\t// Create a puzzle record: puzzle number, row, column, direction, word, hint\n\t\t\t\t// TODO - Redo this ordering to make more sense\n\t\t\t\t$puzzleNum = [];\n\t\t\t\t$puzzleNum[0] = $numberCount;\n\t\t\t\t$puzzleNum[1] = $wordPlacement[1];\n\t\t\t\t$puzzleNum[2] = $wordPlacement[2];\n\t\t\t\t$puzzleNum[3] = \"down\";\n\t\t\t\t$puzzleNum[4] = $wordPlacement[0];\n\t\t\t\t$puzzleNum[5] = $this->getHintForPuzzleList($wordPlacement[0]);\n\n\t\t\t\tarray_push($this->puzzleNumbers, $puzzleNum);\n\n\t\t\t\t$numberCount++;\n\t\t\t}\n\t\t}*/\n\n\t\t// Sort puzzle words so they display in order by puzzle number\n\t\t//asort($this->puzzleNumbers);\n\n\t\t// Create the puzzle board based off assigned puzzle numbers\n\t\t$this->generatePuzzleBoard();\n\n\t\t// Set the puzzle words for fill in configuration - sorts words by length\n\t\t$this->setFillInPuzzle();\n\n\t\t// Reduce the grid size for empty grid rows/columns at the beginning/end of solution\n\t\t// Must be done last since placements rely on full grid\n\t\t$this->reduceGridSize();\n\n\t\t// Generate character list for Skeleton puzzle\n\t\t$this->generateSkeletonHints();\n\t}", "title": "" }, { "docid": "880089af6ca4662cf1a61e6ffdf501c4", "score": "0.43143123", "text": "function find_party_alignment(&$fight)\n {\n //Reset the ally and enemy lists.\n $this->allies=array();\n $this->enemies=array();\n\n //This is the simple cut-down version.\n //If you are not this party, then you are an enemy. (Each for self)\n foreach(array_keys($fight->parites) as $index)\n if($fight->parites[$index]===$this)\n $this->allies[]=$index;\n else\n $this->enemies[]=$index;\n }", "title": "" }, { "docid": "8134ba62215489d8cfc0c57b1ad02d8e", "score": "0.43138775", "text": "function move($board,$start_square_i,$start_square_j,$target_square_i,$target_square_j) {\n\t\t\n\t\t$mover = $board[$start_square_i][$start_square_j];\n\t\t$target = $board[$target_square_i][$target_square_j];\n\t\t$promote_pawn = [];\n\t\t\n\t\tif (is_null($target[\"piece\"])) {\n\t\t\t$capture = null;\n\t\t} else {\n\t\t\t$capture = $target[\"piece\"];\n\t\t}\n\t\t\n\t\t$board[$target_square_i][$target_square_j][\"piece\"] = $mover[\"piece\"];\n\t\t$board[$start_square_i][$start_square_j][\"piece\"][\"player\"] = null;\n\t\t$board[$start_square_i][$start_square_j][\"piece\"][\"piece\"] = null;\n\t\t\n\t\treturn [\n\t\t\t\"capture\"=>$capture,\n\t\t\t\"board\"=>$board\n\t\t];\n\t}", "title": "" }, { "docid": "95ba6fe303a3af65fd9a9c31f87cb181", "score": "0.43105608", "text": "public function getAvaibleNodesForMove(array $drons, $radius = 2)\n {\n $nodes = array(\n array('line' => 0, 'num' => 0),\n array('line' => 0, 'num' => 1),\n array('line' => 0, 'num' => 2),\n array('line' => 0, 'num' => 3),\n array('line' => 0, 'num' => 4),\n array('line' => 0, 'num' => 5),\n array('line' => 0, 'num' => 6),\n\n array('line' => 1, 'num' => 0),\n array('line' => 1, 'num' => 1),\n array('line' => 1, 'num' => 2),\n array('line' => 1, 'num' => 3),\n array('line' => 1, 'num' => 4),\n array('line' => 1, 'num' => 5),\n array('line' => 1, 'num' => 6),\n array('line' => 1, 'num' => 7),\n\n array('line' => 2, 'num' => 0),\n array('line' => 2, 'num' => 1),\n array('line' => 2, 'num' => 2),\n array('line' => 2, 'num' => 3),\n array('line' => 2, 'num' => 4),\n array('line' => 2, 'num' => 5),\n array('line' => 2, 'num' => 6),\n\n array('line' => 3, 'num' => 0),\n array('line' => 3, 'num' => 1),\n array('line' => 3, 'num' => 2),\n array('line' => 3, 'num' => 3),\n array('line' => 3, 'num' => 4),\n array('line' => 3, 'num' => 5),\n array('line' => 3, 'num' => 6),\n array('line' => 3, 'num' => 7),\n\n array('line' => 4, 'num' => 0),\n array('line' => 4, 'num' => 1),\n array('line' => 4, 'num' => 2),\n array('line' => 4, 'num' => 3),\n array('line' => 4, 'num' => 4),\n array('line' => 4, 'num' => 5),\n array('line' => 4, 'num' => 6),\n );\n\n $result = array();\n \n $k = $radius;\n $k1 = ($this->line % 2 === 0) ? $k : $k+1;\n $k2 = ($this->line % 2 === 0) ? $k+1 : $k;\n\n foreach ($nodes as $node){\n if(!$this->_slim->drons->anyStandsOnNode($drons, $node['line'], $node['num'])){\n continue;\n }\n\n for($i = 1; $i <= $k; $i++){\n if($node['line'] == $this->line){\n if($node['num'] > $this->num-($k+1) && $node['num'] < $this->num+($k+1) && $this->num != $node['num']){\n $result[] = $node;\n }\n }else if($node['line'] == $this->line+$i || $node['line'] == $this->line-$i){\n if(($node['line']%2 !== 0 && $node['num'] > $this->num-$k && $node['num'] < $this->num+$k2) ||\n ($node['line']%2 === 0 && $node['num'] > $this->num-$k1 && $node['num'] < $this->num+$k)){\n $result[] = $node;\n }\n }\n } \n\n\n }\n\n // print_r($result);\n return $result;\n }", "title": "" }, { "docid": "22a5dcc4f0e5026da82a959a1b4b29d5", "score": "0.43103117", "text": "function scan_pawn($board,$start_square_i,$start_square_j) {\n\t\t\n\t\t$moves = [];\n\t\t$piece = $board[$start_square_i][$start_square_j][\"piece\"];\n\t\tglobal $en_passant;\n\t\t//echo json_encode($en_passant).count($en_passant);\n\t\t\n\t\tif (count($en_passant)) {\n\t\t\tif ($en_passant[2] != $piece[\"player\"] & \n\t\t\t\tabs($start_square_j - $en_passant[1]) == 1 &\n\t\t\t\t$start_square_i == $en_passant[3]\n\t\t\t) {\n\t\t\t\tarray_push($moves,[\n\t\t\t\t\t\"status\"=>\"capture en passant\",\n\t\t\t\t\t\"capture\"=>[$en_passant[3],$en_passant[4]],\n\t\t\t\t\t\"target_i\"=>$en_passant[0],\"target_j\"=>$en_passant[1],\n\t\t\t\t\t\"start_i\"=>$start_square_i,\"start_j\"=>$start_square_j\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// account for blockage in skip move\n\t\tif ($piece[\"player\"] == \"W\") {\n\t\t\t\n\t\t\tarray_push($moves,scan_square_no_capture($board,$start_square_i+1,$start_square_j,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\tarray_push($moves,scan_square_capture_only($board,$start_square_i+1,$start_square_j+1,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\tarray_push($moves,scan_square_capture_only($board,$start_square_i+1,$start_square_j-1,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\t\n\t\t\tif ($start_square_i == 1 & is_null($board[$start_square_i+1][$start_square_j][\"piece\"][\"piece\"])) {\n\t\t\t\tarray_push($moves,scan_square_no_capture($board,$start_square_i+2,$start_square_j,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\t}\n\t\t} else {\n\t\t\tarray_push($moves,scan_square_no_capture($board,$start_square_i-1,$start_square_j,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\tarray_push($moves,scan_square_capture_only($board,$start_square_i-1,$start_square_j+1,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\tarray_push($moves,scan_square_capture_only($board,$start_square_i-1,$start_square_j-1,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\t\n\t\t\tif ($start_square_i == 6) {\n\t\t\t\tarray_push($moves,scan_square_no_capture($board,$start_square_i-2,$start_square_j,$piece[\"player\"],$start_square_i,$start_square_j));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $moves;\n\t}", "title": "" }, { "docid": "09b1b6953c2114587cb8543cc19e7ece", "score": "0.4308329", "text": "function world_EnPassantCapture($sele_pos, $dest_pos)\n{\n\tglobal $last_move;\n\t\n\t$dest_col = substr($dest_pos, 0, 1);\n\t$dest_row = substr($dest_pos, 1, 1);\n\t\n\tif (world_GetColor($sele_pos) == 'w')\n\t{\n\t\t$last_move[] = $dest_col.($dest_row - 1);\n\t\t$last_move[] = world_GetType($dest_col.($dest_row - 1));\n\t\tworld_SetNull($dest_col.($dest_row - 1));\n\t}\n\telse if (world_GetColor($sele_pos) == 'b')\n\t{\n\t\t$last_move[] = $dest_col.($dest_row + 1);\n\t\t$last_move[] = world_GetType($dest_col.($dest_row + 1));\n\t\tworld_SetNull($dest_col.($dest_row + 1));\n\t}\n}", "title": "" }, { "docid": "d50138d906c028653d7bbeed33a5b3d9", "score": "0.43081075", "text": "function game_winner($moves){\r\n global $ludo_blocks_blue;\r\n global $ludo_blocks_green;\r\n $turn = 1;\r\n $moves_array = str_split($moves);\r\n for($i = 0; $i < count($moves_array); $i++) {\r\n if($turn == 1) {\r\n for($k = 0; $k < count($ludo_blocks_green); $k++)\r\n {\r\n if($ludo_blocks_green[$k] == $moves[$i]) {\r\n $ludo_blocks_green[$k] = 0;\r\n //$i = $i + 1;\r\n break;\r\n \r\n } else if($ludo_blocks_green[$k] >= $moves[$i]) {\r\n $ludo_blocks_green[$k] -= $moves[$i];\r\n $turn = 0;\r\n break;\r\n \r\n } else if($ludo_blocks_green[$k] < $moves[$i]){\r\n $turn = 0;\r\n break; \r\n } \r\n }\r\n continue;\r\n } else if($turn == 0){\r\n if($ludo_blocks_blue[0] == $moves_array[$i] ) {\r\n $ludo_blocks_blue[0] = 0;\r\n //$i = $i + 1;\r\n } else {\r\n //echo $moves_array[$i];\r\n $turn = 1;\r\n continue;\r\n \r\n }\r\n }\r\n print_r($ludo_blocks_blue);\r\n echo \"<br>\";\r\n if(check_non_zero_number($ludo_blocks_blue) == false)\r\n {\r\n return \"Yogita Wins in \".($i+1).\" Moves\";\r\n } else if(check_non_zero_number($ludo_blocks_green) == false) {\r\n return \"Zubin Wins in \".($i+1).\" Moves\";\r\n } else {\r\n continue;\r\n }\r\n\r\n } \r\n}", "title": "" }, { "docid": "b07057505fa7252429142aa0848be9f2", "score": "0.43068662", "text": "abstract protected function getPositions();", "title": "" }, { "docid": "a2adfcfd379f8032f36840083cd5dd9a", "score": "0.43047142", "text": "protected function makeStrongestPaths () : void\n {\n foreach ($this->_selfElection->getCandidatesList() as $i => $i_value) :\n foreach ($this->_selfElection->getCandidatesList() as $j => $j_value) :\n if ($i !== $j) :\n if ( $this->_selfElection->getPairwise()[$i]['win'][$j] > $this->_selfElection->getPairwise()[$j]['win'][$i] ) :\n $this->_StrongestPaths[$i][$j] = $this->schulzeVariant($i,$j);\n else :\n $this->_StrongestPaths[$i][$j] = 0;\n endif;\n endif;\n endforeach;\n endforeach;\n\n foreach ($this->_selfElection->getCandidatesList() as $i => $i_value) :\n foreach ($this->_selfElection->getCandidatesList() as $j => $j_value) :\n if ($i !== $j) :\n foreach ($this->_selfElection->getCandidatesList() as $k => $k_value) :\n if ($i !== $k && $j !== $k) :\n $this->_StrongestPaths[$j][$k] =\n \\max( $this->_StrongestPaths[$j][$k],\n \\min($this->_StrongestPaths[$j][$i], $this->_StrongestPaths[$i][$k]) );\n endif;\n endforeach;\n endif;\n endforeach;\n endforeach;\n }", "title": "" }, { "docid": "483fc91dd725b120cb3d3a1ac144a2ff", "score": "0.4304689", "text": "protected function defineBlockGrid() {\n\t\t// 2up\n\t\t$list[] = 'hil.header_left';\n\t\t$list[] = 'hil.header_right';\n\t\t$list[] = 'hilt.header_left';\n\t\t$list[] = 'hilt.header_right';\n\t\t$list[] = 'hilt.header_top-image_left';\n\t\t$list[] = 'hilt.header_top-image_right';\n\t\t$list[] = 'hit.header_left';\n\t\t$list[] = 'hit.header_right';\n\t\t$list[] = 'hit.header_top-image_left';\n\t\t$list[] = 'hit.header_top-image_right';\n\t\t$list[] = 'ht.header_left';\n\t\t$list[] = 'ht.header_right';\n\t\t$list[] = 'ilt.image_left';\n\t\t$list[] = 'ilt.image_right';\n\t\t$list[] = 'it.image_left';\n\t\t$list[] = 'it.image_right';\n\t\t$this->blockGrid[2] = $list;\n\t}", "title": "" }, { "docid": "c81fb8b8ba91fc53c6eb50297aa1021a", "score": "0.43029606", "text": "public function nextGeneration() {\n \n //store our list of live cells\n $nextGen = array();\n \n //run through all the cells and figure out which ones are live\n foreach($this->cells as $keyM => $cells) {\n foreach ($cells as $keyN => $cell) {\n if ($this->cells[$keyM][$keyN]->isLive()) {\n $nextGen[] = array($keyM, $keyN);\n }\n }\n }\n \n return $nextGen;\n }", "title": "" }, { "docid": "493715d158c9ef47b5376510071219d2", "score": "0.4301583", "text": "public function run()\n {\n $faker = Faker::create('en_US');\n $districts = AdministrationUnit::where('parent_id', 1)->get()->toArray();\n\n for ($i = 0; $i < 1000; $i ++) {\n $partners = DB::table('users')->select('id')->where('role', 2)->get()->toArray();\n $partnerIds = [];\n foreach ($partners as $partner) {\n array_push($partnerIds, $partner->id);\n }\n\n $randPartnerIdx = array_rand($partnerIds);\n $randPartnerId = $partnerIds[$randPartnerIdx];\n\n $distIdx = array_rand($districts);\n $dist = $districts[$distIdx];\n $distId = $dist['id'];\n $wards = AdministrationUnit::where('parent_id', $distId)->get()->toArray();\n if (sizeof($wards) === 0) {\n $wardId = null;\n }\n else {\n $wardIdx = array_rand($wards);\n $ward = $wards[$wardIdx];\n $wardId = $ward['id'];\n }\n\n $tmpLat = 21.0072975;\n $tmpLng = 105.8015291;\n\n $addLat = rand(1000, 999999)/10000000;\n $addLng = rand(1000, 999999)/10000000;\n $lats = [$tmpLat + $addLat, $tmpLat - $addLat];\n $lngs = [$tmpLng + $addLng, $tmpLng - $addLng];\n $lat = $lats[rand(0,1)];\n $lng = $lngs[rand(0,1)];\n\n\n\n DB::table('garages')->insert([\n 'lat' => $lat,\n 'lng' => $lng,\n 'name' => 'Tiệm sửa xe ' . $faker->company,\n 'short_description' => $faker->catchPhrase,\n 'description' => $faker->paragraph,\n 'phone_number' => $faker->tollFreePhoneNumber,\n 'address' => $faker->address,\n 'website' => \"http://\" . str_random(10) . '.com.vn',\n 'province_id' => 1,\n 'district_id' => $distId,\n 'ward_id' => $wardId,\n 'user_id' => $randPartnerId,\n 'working_time' => 'from ' . rand(7,8) . 'AM to ' . rand(16, 22) . 'PM',\n 'rating' => 3.5,\n 'status' => 1,\n 'type' => rand(1,3),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "ff9d407555d5d4d8a97b0059c11a2ced", "score": "0.42974257", "text": "function compileDetectionData() {\n\n\t\t$groups = array();\n\n\n\t\t// global group priority\n\t\t// prioritized for fastest all-over identification\n\n\n\t\t// desktop_ie\n\t\t$group_patterns = $this->getGlobalPatterns(\"desktop_ie\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// desktop_ie9\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"desktop_ie9\");\n\n\t\t\t// desktop_ie10\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"desktop_ie10\");\n\n\t\t\t// desktop_ie11\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"desktop_ie11\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// desktop\n\t\t$group_patterns = $this->getGlobalPatterns(\"desktop\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// // desktop_edge\n\t\t\t// $segment_patterns[] = $this->getSegmentPatterns(\"desktop_edge\");\n\n\t\t\t// desktop\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"desktop\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// TV\n\t\t$group_patterns = $this->getGlobalPatterns(\"tv\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// tv\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"tv\");\n\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// desktop_light\n\t\t$group_patterns = $this->getGlobalPatterns(\"desktop_light\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// desktop_light\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"desktop_light\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// tablet\n\t\t$group_patterns = $this->getGlobalPatterns(\"tablet\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// tablet\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"tablet\");\n\n\t\t\t// tablet_light\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"tablet_light\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// smartphone\n\t\t$group_patterns = $this->getGlobalPatterns(\"smartphone\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// smartphone\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"smartphone\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// mobile\n\t\t$group_patterns = $this->getGlobalPatterns(\"mobile\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// mobile\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"mobile\");\n\n\t\t\t// mobile_light\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"mobile_light\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// seo\n\t\t$group_patterns = $this->getGlobalPatterns(\"seo\");\n\n\t\t\t// individual segment priority\n\t\t\t$segment_patterns = array();\n\n\t\t\t// seo\n\t\t\t$segment_patterns[] = $this->getSegmentPatterns(\"seo\");\n\n\t\t// add combined group info\n\t\t$groups[] = array(\"group_patterns\" => $group_patterns, \"segment_patterns\" => $this->cleanSegmentPatterns($segment_patterns));\n\n\n\n\t\t// fallback patterns\n\t\t$fallback_patterns = array();\n\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"desktop_ie9\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"desktop_ie10\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"desktop_ie11\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"desktop\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"tv\");\n\t\t// $fallback_patterns[] = $this->getFallbackPattern(\"desktop_ie_light\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"desktop_light\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"tablet\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"tablet_light\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"smartphone\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"mobile\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"mobile_light\");\n\t\t$fallback_patterns[] = $this->getFallbackPattern(\"seo\");\n\n\t\t$groups[] = array(\"group_patterns\" => array(), \"segment_patterns\" => $this->cleanSegmentPatterns($fallback_patterns));\n\n//\t\tprint_r($groups);\n\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "1f74a9a4e65786c34e1735483b85dda1", "score": "0.4294227", "text": "function portionnerLetableau()\n{\n\tglobal $x,$y,$z,$chaineARetouner,$laby;\n\tif($_SESSION['orientation']==1) /////////////////////////////////////// SUD\n\t{\n\t\t//Ligne de A à G\n\t\tif($y+3<=15) \n\t\t{\n\t\t\t$flagX = $x+3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+3][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($y+2<=15)\n\t\t{\n\t\t\t$flagX = $x+2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+2][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($y+1<=15)\n\t\t{\n\t\t\t$flagX = $x+1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+1][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y][$x+1].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y][$x-1];\n\t}\n\n\n\tif($_SESSION['orientation']==2) /////////////////////////////////////// NORD\n\t{\n\t\t//Ligne de A à G\n\t\tif($y-3>=0) \n\t\t{\n\t\t\t$flagX = $x-3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-3][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($y-2>=0)\n\t\t{\n\t\t\t$flagX = $x-2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-2][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($y-1>=0)\n\t\t{\n\t\t\t$flagX = $x-1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-1][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y][$x-1].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y][$x+1];\n\t}\n\n\n\tif($_SESSION['orientation']==3) /////////////////////////////////////// OUEST\n\t{\n\t\t//Ligne de A à G\n\t\tif($x-3>=0) \n\t\t{\n\t\t\t$flagY = $y+3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-3].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($x-2>=0)\n\t\t{\n\t\t\t$flagY = $y+2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-2].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($x-1>=0)\n\t\t{\n\t\t\t$flagY = $y+1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-1].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y+1][$x].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y-1][$x];\n\t}\n\n\tif($_SESSION['orientation']==4) /////////////////////////////////////// EST\n\t{\n\t\t//Ligne de A à G\n\t\tif($x+3<=15) \n\t\t{\n\t\t\t$flagY = $y-3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+3].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($x+2<=15)\n\t\t{\n\t\t\t$flagY = $y-2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+2].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($x+1<=15)\n\t\t{\n\t\t\t$flagY = $y-1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+1].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y-1][$x].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y+1][$x];\n\t}\n}", "title": "" }, { "docid": "36cbc715bcda1569d26163ddb07088ca", "score": "0.42895955", "text": "public function run()\n {\n $rooms = [\n ['name' => 'UB10103', 'building' => 1, 'floor' => 1, 'seats' => 40],\n ['name' => 'UB10102', 'building' => 1, 'floor' => 1, 'seats' => 40],\n ['name' => 'UB10101', 'building' => 1, 'floor' => 1, 'seats' => 40],\n ['name' => 'UB10201', 'building' => 1, 'floor' => 2, 'seats' => 40],\n ['name' => 'UB10202', 'building' => 1, 'floor' => 2, 'seats' => 40],\n ['name' => 'UB10203', 'building' => 1, 'floor' => 2, 'seats' => 40],\n ['name' => 'UB20301', 'building' => 2, 'floor' => 3, 'seats' => 40],\n ['name' => 'UB20302', 'building' => 2, 'floor' => 3, 'seats' => 40],\n ['name' => 'UB20303', 'building' => 2, 'floor' => 3, 'seats' => 40],\n ['name' => 'UB40701', 'building' => 4, 'floor' => 7, 'seats' => 40],\n ['name' => 'UB40702', 'building' => 4, 'floor' => 7, 'seats' => 40],\n ['name' => 'UB40703', 'building' => 4, 'floor' => 7, 'seats' => 40],\n ['name' => 'UB30501', 'building' => 3, 'floor' => 5, 'seats' => 40],\n ['name' => 'UB30502', 'building' => 3, 'floor' => 5, 'seats' => 40],\n ['name' => 'UB30503', 'building' => 3, 'floor' => 5, 'seats' => 40],\n ['name' => 'UB21310', 'building' => 2, 'floor' => 13, 'seats' => 40],\n ['name' => 'UB21311', 'building' => 2, 'floor' => 13, 'seats' => 40],\n ['name' => 'UB21312', 'building' => 2, 'floor' => 13, 'seats' => 40],\n ];\n foreach ($rooms as $key => $room) {\n Room::create($room);\n }\n }", "title": "" }, { "docid": "58d055ab7634b0a2f80295c22d17b267", "score": "0.4287721", "text": "protected function generateParameters() {\n \t$tmp = array(\n \t\t\t'index' => 0, // tracks which waypoint is current\n \t\t\t'waypoints' => array(\n \t\t\t\t\tarray('tag' => $this->rs['a_tag'], 'lat' => $this->rs['a_lat'], 'lng' => $this->rs['a_lng']),\n \t\t\t\t\tarray('tag' => $this->rs['b_tag'], 'lat' => $this->rs['b_lat'], 'lng' => $this->rs['b_lng']),\n \t\t\t\t\tarray('tag' => $this->rs['c_tag'], 'lat' => $this->rs['c_lat'], 'lng' => $this->rs['c_lng']),\n \t\t\t\t\tarray('tag' => $this->rs['l_tag'], 'a_rad' => $this->rs['a_rad'], 'b_rad' => $this->rs['b_rad'], 'c_rad' => $this->rs['c_rad'])\n \t\t\t),\n \t\t\t'msg_values' => array( // used to expand messages which will be sent to teams\n \t\t\t\t\t'ordinal' => \"first\",\n \t\t\t\t\t'lat' => $this->rs['a_lat'],\n \t\t\t\t\t'lng' => $this->rs['a_lng']\n \t\t\t)\n \t);\n \treturn $tmp;\n }", "title": "" }, { "docid": "e7c73112d4a44702de52905a21a1081b", "score": "0.42840618", "text": "protected function processL2()\n {\n for ($level = $this->maxlevel; $level > 0; --$level) {\n $ordered = array();\n $reversed = array();\n foreach ($this->chardata as $char) {\n if ($char['level'] >= $level) {\n if (($char['type'] == 'R') && (isset(UniMirror::$uni[$char['char']]))) {\n // L4. A character is depicted by a mirrored glyph if and only if\n // (a) the resolved directionality of that character is R, and\n // (b) the Bidi_Mirrored property value of that character is true.\n $char['char'] = UniMirror::$uni[$char['char']];\n }\n $reversed[] = $char;\n } else {\n if (!empty($reversed)) {\n $ordered = array_merge($ordered, array_reverse($reversed));\n $reversed = array();\n }\n $ordered[] = $char;\n }\n }\n if (!empty($reversed)) {\n $ordered = array_merge($ordered, array_reverse($reversed));\n }\n $this->chardata = $ordered;\n }\n }", "title": "" }, { "docid": "2c54ac57479cc110d21a32b991b2f142", "score": "0.42811838", "text": "private function initTiles()\n {\n for ($i = 0; $i < 7; $i++) {\n for ($j = 0; $j <= $i; $j++) {\n $tile = new Tile($j, $i);\n $this->tiles[] = $tile;\n }\n }\n\n shuffle($this->tiles);\n }", "title": "" }, { "docid": "b1b1afdc5572a9e36b9bedeca47a2a7c", "score": "0.4274843", "text": "public function mapInit($objs = null) //À compléter\n {\n \n $authenticationService = new AuthenticationService;\n\n $baseRepository = new BaseRepository;\n $mineRepository = new MineRepository;\n $userRepository = new UserRepository;\n $taskRepository = new TaskRepository;\n\n $bases = $baseRepository->getBases();\n $mines = $mineRepository->getMines();\n\n $objects = array_merge($bases, $mines);\n\n $buildingTasks = $taskRepository->getTasks('build');\n $moveTasks = $taskRepository->getTasks('move');\n $attackMoveTasks = $taskRepository->getTasks('attackMove');\n $attackTasks = $taskRepository->getTasks('attack');\n $usernames = $userRepository->getAllUsername();\n\n foreach ($buildingTasks as $task) {\n //var_dump($task->getStartTime());\n //var_dump($task);\n array_push($objects, [\n \"type\"=>$task->getSubject().\"InConst\",\n \"pos\"=>$task->getTargetPos(),\n \"player\"=>$usernames[$task->getAuthor()],\n \"playerId\"=>$task->getAuthor(),\n \"start\"=>$task->getStartTime(),\n \"time\"=>$task->getEndTime()\n ]);\n }\n \n foreach ($moveTasks as $task) {\n $arr = explode(',', $task->getSubject());\n $subjectType = $arr[0];\n array_push($objects, [\n \"type\"=>$subjectType,\n \"startPos\"=>$task->getStartPos(),\n \"pos\"=>$task->getTargetPos(),\n \"player\"=>$usernames[$task->getAuthor()],\n \"playerId\"=>$task->getAuthor(),\n \"posStart\"=>$task->getStartPos(),\n \"posEnd\"=>$task->getTargetPos(),\n \"start\"=>$task->getStartTime(),\n \"time\"=>$task->getEndTime()\n ]);\n }\n\n foreach ($attackMoveTasks as $task) {\n array_push($objects, [\n \"type\"=>\"soldier\",\n \"startPos\"=>$task->getStartPos(),\n \"pos\"=>$task->getTargetPos(),\n \"player\"=>$usernames[$task->getAuthor()],\n \"playerId\"=>$task->getAuthor(),\n \"posStart\"=>$task->getStartPos(),\n \"posEnd\"=>$task->getTargetPos(),\n \"start\"=>$task->getStartTime(),\n \"time\"=>$task->getEndTime()\n ]);\n }\n\n foreach ($attackTasks as $task) {\n array_push($objects, [\n \"type\"=>\"attack\",\n \"player\"=>$usernames[$task->getAuthor()],\n \"soldiers\"=>explode(\",\", $task->getSubject())[1],\n \"playerId\"=>$task->getAuthor(),\n \"targetType\"=>explode(\",\", $task->getTargetOrigin())[0],\n \"targetId\"=>explode(\",\", $task->getTargetOrigin())[1],\n \"pos\"=>$task->getTargetPos(),\n \"time\"=>$task->getEndTime()\n ]);\n }\n \n $result = '<script>var objectMapObj = [';\n $allUnits = $baseRepository->getAllUnits();\n $unitsUpgradesInConst = $taskRepository->getUnitsUpgradesInConst();\n $unitsInConst = $taskRepository->getAllUnitInConst();\n\n foreach ($objects as $object) { \n \n if ($object['type'] == \"base\" || $object['type'] == \"mine\") {\n $object[\"origin\"] = $object['type'].\",\".$object['id'];\n $content = [];\n $workers = $allUnits[$object['type']][$object[\"id\"]][\"workers\"];\n $soldiers = $allUnits[$object['type']][$object[\"id\"]][\"soldiers\"];\n if ($workers != 0) {\n $content[\"workers\"] = $workers;\n }\n if ($soldiers != 0) {\n $content[\"soldiers\"] = $soldiers;\n }\n \n if (isset($unitsInConst[\"worker\"])) {\n \n foreach ($unitsInConst[\"worker\"] as $worker) {\n\n if ($worker[0] == $object[\"origin\"]){\n if (!array_key_exists(\"workersInConst\",$content)) $content[\"workersInConst\"] = [];\n array_push($content[\"workersInConst\"], $worker[1]);\n }\n }\n }\n if (isset($unitsInConst[\"soldier\"])) {\n foreach ($unitsInConst[\"soldier\"] as $soldier) {\n if ($soldier[0] == $object[\"origin\"]){\n if (!array_key_exists(\"soldiersInConst\",$content)) $content[\"soldiersInConst\"] = [];\n array_push($content[\"soldiersInConst\"], $soldier[1]);\n }\n }\n } \n foreach ($unitsUpgradesInConst as $unit) {\n if ($unit[0][\"startOrigin\"] == $object[\"origin\"]) {\n if ($unit[0][\"subject\"] == \"workerSpace\") {\n if (!array_key_exists(\"workerSpaceInConst\",$content)) $content[\"workerSpaceInConst\"] = [];\n array_push($content[\"workerSpaceInConst\"], $unit[0][\"endTime\"]);\n } else if ($unit[0][\"subject\"] == \"soldierSpace\") {\n if (!array_key_exists(\"soldierSpaceInConst\",$content)) $content[\"soldierSpaceInConst\"] = [];\n array_push($content[\"soldierSpaceInConst\"], $unit[0][\"endTime\"]);\n }\n }\n }\n }\n \n if (isset($_SESSION['auth'])){\n if ($object[\"player\"] == $_SESSION['auth']){\n $owner = \"player\";\n } else {\n $owner = \"enemy\";\n }\n } else {\n $owner = \"neutral\";\n } \n $pos = json_decode($object[\"pos\"]);\n if ($pos === null){\n //var_dump($object); \n }\n if ($object['type'] == 'base') {\n $result .= '{\n \"type\": \"base\",\n \"x\": '.$pos[0].', \n \"y\": '.$pos[1].', \n \"id\": '.$object[\"id\"].', \n \"HP\": '.$object[\"HP\"].', \n \"owner\": \"'.$owner.'\", \n \"ownerName\": \"'.$object[\"player\"].'\", \n \"main\": '.$object[\"main\"].',\n \"content\": '.json_encode($content).',\n \"workerSpace\": '.$object[\"workerSpace\"].',\n \"soldierSpace\": '.$object[\"soldierSpace\"].'\n },';\n } else if ($object['type'] == 'mine') {\n if (!isset($object[\"metalNodes\"])){\n $object[\"metalNodes\"] = \"[]\";\n }\n $result .= '{\n \"type\": \"mine\",\n \"x\": '.$pos[0].', \n \"y\": '.$pos[1].', \n \"id\": '.$object[\"id\"].', \n \"HP\": '.$object[\"HP\"].', \n \"owner\": \"'.$owner.'\", \n \"ownerName\": \"'.$object[\"player\"].'\",\n \"content\": '.json_encode($content).',\n \"workers\": '.$object[\"workers\"].',\n \"soldiers\": '.$object[\"soldiers\"].',\n \"workerSpace\": '.$object[\"workerSpace\"].',\n \"soldierSpace\": '.$object[\"soldierSpace\"].',\n \"metalNodes\": '.$object[\"metalNodes\"].'\n },';\n } else if ($object['type'] == 'worker' || $object['type'] == 'soldier') {\n $result .= '{\n \"type\": \"'.$object['type'].'\",\n \"x\": '.$pos[0].', \n \"y\": '.$pos[1].', \n \"owner\": \"'.$owner.'\", \n \"ownerName\": \"'.$object[\"player\"].'\",\n \"start\": \"'.$object[\"start\"].'\",\n \"time\": \"'.$object[\"time\"].'\",\n \"posStart\": '.$object[\"posStart\"].',\n \"posEnd\": '.$object[\"posEnd\"].'\n },';\n\n } else if ($object['type'] == 'attack'){\n $result .= '{\n \"type\": \"'.$object['type'].'\",\n \"soldiers\": \"'.$object['soldiers'].'\",\n \"player\": \"'.$object[\"player\"].'\",\n \"playerId\": \"'.$object[\"playerId\"].'\",\n \"targetType\": \"'.$object[\"targetType\"].'\",\n \"targetId\": \"'.$object[\"targetId\"].'\",\n \"time\": \"'.$object[\"time\"].'\" \n },';\n } else {\n $result .= '{\n \"type\": \"'.$object['type'].'\",\n \"x\": '.$pos[0].', \n \"y\": '.$pos[1].', \n \"owner\": \"'.$owner.'\", \n \"ownerName\": \"'.$object[\"player\"].'\",\n \"start\": \"'.$object[\"start\"].'\",\n \"time\": \"'.$object[\"time\"].'\" \n },';\n }\n }\n if ($result !== \"<script>var objectMapObj = [\"){\n $result[strrpos($result, ',')] = ' ';\n }\n $result = $result . ']; console.log(objectMapObj);</script>';\n return $result;\n }", "title": "" }, { "docid": "6d68d41361c073d118818b5892bf864e", "score": "0.42743322", "text": "function grupporss() {\nglobal $admin, $bgcolor1, $bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons,$genere,$votog,$votol,$votoc,$circo, $id_cons,$id_cons_gen,$id_comune,$id_circ,$tipo_cons,$w,$l,$op,$siteistat,$flash,$circondt1 ;\n\n\t\t\n\n\t\n\t//if($genere=='4' || $tipo_cons>='10') $tab=\"ele_voti_lista\";\n\t if($genere=='4' || $votog) $tab=\"ele_voti_lista\";\n\t else $tab=\"ele_voti_gruppo\";\n\t\n \n \n\t$res = mysql_query(\"select * from \".$prefix.\"_$tab where id_cons='$id_cons' group by id_sez \",$dbi);\n\t\n\tif ($res) $numero=mysql_num_rows($res);else $numero=0;\n\t$res = mysql_query(\"select t2.* from \".$prefix.\"_ele_sezioni as t2, \".$prefix.\"_ele_sede as t1 where t2.id_cons='$id_cons' and t1.id_sede=t2.id_sede $circondt1\",$dbi);\n\tif ($res) $sezioni=mysql_num_rows($res);else $sezioni=0;\n\t\n\tif ($numero>0){\n\t\tif ($genere!=0){\n\t\t\t$restotv = mysql_query(\"select sum(voti) from \".$prefix.\"_$tab where id_cons='$id_cons' \", $dbi);\n\t\t\tlist($tot) = mysql_fetch_row($restotv);\n\t\t\t\n\t\t\t$i=0;\n\t\t\t// lista o gruppo\n\t\t\tif ($genere!=4){\n\t\t\t \n\t\t\t\tif ($votog){\n\t\t\t\t\n\t\t\t\t$res = mysql_query(\"select t1.id_gruppo, t1.num_gruppo, t1.descrizione, sum(t2.voti) as somma\n\t\t\t\tfrom \".$prefix.\"_ele_gruppo as t1,\n\t\t\t\t\".$prefix.\"_ele_voti_lista as t2,\n\t\t\t\t\".$prefix.\"_ele_lista as t3\n \t\t\twhere \tt1.id_cons='$id_cons'\n\t\t\t\tand t2.id_lista=t3.id_lista\n\t\t\t\tand t1.id_gruppo=t3.id_gruppo\n\t\t\t\tgroup by t1.id_gruppo\n\t\t\t\torder by somma desc\", $dbi);$cosa='id_gruppo';\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\n\t\t\t $res = mysql_query(\"select t1.id_gruppo, t1.num_gruppo, t1.descrizione, sum(t2.voti) as somma\n\t\t\t\tfrom \".$prefix.\"_ele_gruppo as t1\n \t\t\tleft join \".$prefix.\"_$tab as t2 on (t1.id_gruppo=t2.id_gruppo)\n\t\t\t\twhere \tt1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1\n\t\t\t\tgroup by t2.id_gruppo\n\t\t\t\torder by somma desc\", $dbi);$cosa='id_gruppo';\n\t\t\t }\n\t\t\t\n\t\t\t\n\t\t\t}else{\n\t\t\t\t$res = mysql_query(\"select t1.id_lista, t1.num_lista, t1.descrizione, sum(t2.voti) as somma\n\t\t\t\tfrom \".$prefix.\"_ele_lista as t1\n \t\tleft join \".$prefix.\"_$tab as t2 on (t1.id_lista=t2.id_lista)\n\t\t\t\twhere \tt1.id_cons='$id_cons' and t1.id_cons=t2.id_cons\n\t\t\t\tgroup by t2.id_lista\n\t\t\t\torder by somma desc\", $dbi);$cosa='id_lista';\n\t\t\t}\n\n\t\t\n\t\t\t\t\t\n\t\t\t\t$gruppinum=mysql_num_rows($res);\n\t\t\t\t$altrivoti=0;\n###### gestione percentuali\n\t\t\t\t$arperc=array();\n\t\t\t\t$arval=array();\n\t\t\t\t$arvaltot=0;\n\t\t\t\twhile (list($id,$num,$descrizione,$voti) = mysql_fetch_row($res)){\n\t\t\t\t$arval[$id]=$voti;\n\t\t\t\t$arvaltot+=$voti;\n\t\t\t\t}\n\t\t\t\t$arperc=arrayperc($arval,$arvaltot);\n\t\t\t\tmysql_data_seek($res,0);\n######\n\t\t\t\twhile (list($id,$num,$descrizione,$voti) = mysql_fetch_row($res)){\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// funz per il taglio corretto della frase 13 feb 2007\n\t\t\t\t\n\t\t\t\t$descrizione=substr($descrizione,0,20);\n\t\t\t\t$gruppo[$i]=ucwords(strtolower($descrizione));\n\t\t\t\t\n\t\t\t\t//if (strlen($descrizione)>25) $gruppo[$i].=\"...\";\n\t\t\t\tif ($tot!='' and $tot!='0')\n\t\t\t\t$pro[$i]=number_format($voti*100/$tot,3);\n\t\t\t\t$pro[$i]=number_format($arperc[$id],2); // arrotondamento\n\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\n\n\n\t\t\t\n\t\t \n\t\t\t$i++;\n\t\t}\n\t\t\n\n\n\t\t\n\t\t$titolo=\"\"._PERCE.\" \"._VOTIE.\"\";\n\t\t\n\t\t\n\t\t\n\n\t\t\n\t\t\n\n\t\treturn array($gruppo,$pro);\n \n \n\n\t }\n\n\t}\n}", "title": "" } ]
c5a07cb7202aea3a1cc4ec014ec7d8d7
Declare the list of permissions we've got set up to pass to the CMS' permissions code.
[ { "docid": "cc70d4142a5be28321682a21622c9eb7", "score": "0.0", "text": "public static function get_perms($nid, $args) {\n $perms = [];\n if (!empty($args['managerPermission']))\n $perms[] = $args['managerPermission'];\n return $perms;\n }", "title": "" } ]
[ { "docid": "c1e387bf5dd56a76cbfb13cf790ae1cd", "score": "0.7637479", "text": "public function definePermissions();", "title": "" }, { "docid": "47f4ccd5273552ebff5ea453a7c13d09", "score": "0.7626882", "text": "protected function initPermission() {\n\t\t$databaseAdapter = new Database();\n\t\t$aclMapper = new ACLMapper($databaseAdapter);\n\t\t$permissions = $aclMapper->getRolePermissions($this->role);\n\n\t\tforeach($permissions as $permission)\n\t\t{\n\t\t\tarray_push($this->permissions, $permission[\"perm_desc\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "342a765fd9a543b31beefcb3db5c826c", "score": "0.7439598", "text": "protected function _build_permissions() {\n // ALL, anonymous and authenticated are not roles, but to ease search\n // temporarily treat them as such.\n $fake_roles = $this->roles;\n $fake_roles[] = 'ALL';\n $fake_roles[] = $this->is_logged() ? ROLE_REGISTERED : ROLE_ANONYMOUS;\n \n $user_perms = array();\n foreach ($this->settings['permissions'] as $permission_name => $permission_affected_roles) {\n // The user has the permission if it is for all or\n // if the permission if for a role the user has.\n if (count(array_intersect($fake_roles, $permission_affected_roles)) ) {\n $user_perms[] = $permission_name;\n }\n }\n $this->permissions = $user_perms;\n }", "title": "" }, { "docid": "288141deea04235c29770b8a6d44236e", "score": "0.73009646", "text": "function getDefinedPermissions() {\n\t\treturn array(\n\t\t\t'read' => SyndLib::translate('Allows viewing the contents'),\n\t\t\t'write' => SyndLib::translate('Allows editing contents and options'),\n\t\t\t'admin' => SyndLib::translate('Allows changing permissions'),\n\t\t\t);\n\t}", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.71337223", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.71337223", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.71337223", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.71337223", "text": "public function permissions();", "title": "" }, { "docid": "c12cf64f29b47ae3244a8316ccafdca9", "score": "0.6973549", "text": "public function PermissionList ()\n\t\t{\n\t\t\t$oblarrPermissions = new dataArray ('PermissionList', 'Permission');\n\t\t\t\n\t\t\t// Test each Permission\n\t\t\tforeach ($GLOBALS['Permissions'] AS $intKey => $intValue)\n\t\t\t{\n\t\t\t\tif (HasPermission ($this->Pull ('Privileges')->getValue (), $intKey))\n\t\t\t\t{\n\t\t\t\t\t$oblarrPermissions->Push (new Permission ($intKey));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $oblarrPermissions;\n\t\t}", "title": "" }, { "docid": "1a6a60f5f2b56db4872bad63f33bc55e", "score": "0.6876416", "text": "public function listPermissions() {\n \n return array('none' => 'Do not share','friends' => 'My Friends', 'all' => 'Everybody');\n }", "title": "" }, { "docid": "ee21af0b78284d81d9fa96375db4d7ad", "score": "0.6865448", "text": "public function getPermissionsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "87d41ae1e41407c7be44d9dfe374dbd0", "score": "0.68600035", "text": "public function getPermissionsList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "97cdbbe12075457089f9a5dab635fca6", "score": "0.68387383", "text": "public function getPermissions()\r\n\t{\r\n\t\treturn $this->permissionlist;\r\n\t}", "title": "" }, { "docid": "3b29a65dea5af60ca1d6668b778cd760", "score": "0.6810548", "text": "public function permissions() {\n $permissions = [];\n // Generate permissions for each content type.\n $contentTypes = $this->entityManager\n ->getStorage('node_type')\n ->loadMultiple();\n\n foreach ($contentTypes as $contentType) {\n // $contentTypesList[$contentType->id()] = $contentType->label();\n $permissions['content_management_manage_' . $contentType->id()] = [\n 'title' => $this->t('Manage the @ct content', ['@ct' => $contentType->label()]),\n 'description' => $this->t('Allows a role to manage content of the type @ct, only give this permission to trusted roles', ['@ct' => $contentType->label()]),\n ];\n }\n return $permissions;\n }", "title": "" }, { "docid": "38d01fd2ff2da8077d66b591a296df78", "score": "0.679927", "text": "public static function assignPermissions()\n {\n $tutor = static::whereName('tutor')->first();\n $tutor->givePermission(Permission::whereName('publish-courses')->first());\n\n $admin = static::whereName('administrator')->first();\n foreach (array_keys(Permission::defaultPermissions()) as $key) {\n $admin->givePermission(Permission::whereName($key)->first());\n }\n }", "title": "" }, { "docid": "08f897ed63777cbc425423c8d0d20a9d", "score": "0.67698866", "text": "public function setUpPermission() {\n $this->appPermission[1][\"basic\"][] = '*';\n\n//permission for supervisor group id 2\n $this->appPermission[2][\"basic\"][] = 'members/edit';\n $this->appPermission[2][\"basic\"][] = 'members/add';\n $this->appPermission[2][\"basic\"][] = 'members/index';\n $this->appPermission[2][\"basic\"][] = 'members/select';\n $this->appPermission[2][\"basic\"][] = 'activitiesMembers/index';\n $this->appPermission[2][\"basic\"][] = 'reports';\n $this->appPermission[2][\"basic\"][] = 'users/login';\n $this->appPermission[2][\"basic\"][] = 'users/logout';\n }", "title": "" }, { "docid": "b70fc673919c06c9e82f7058d4fc6a8e", "score": "0.6760697", "text": "abstract protected function permissions();", "title": "" }, { "docid": "0eb083a31bac9e03ef3643d267abdb53", "score": "0.67585635", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'intertech.subscribe.some_permission' => [\n 'tab' => 'Subscribe',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "cb19516d00579a6c874576f4dd01af56", "score": "0.6756083", "text": "public function permissionList()\r\n {\r\n if($this->permissionList === null)\r\n {\r\n $this->permissionList = $this->request(\"permissionlist\")->toAssocArray(\"permname\");\r\n }\r\n\r\n return $this->permissionList;\r\n }", "title": "" }, { "docid": "a956d6d2a6171ea17764ebb10441d5ff", "score": "0.6743669", "text": "public static function permissionsRequired()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "47a5c72add389cb89834e13d21299677", "score": "0.67337996", "text": "public function permissions() {\n //return Permission::lists('permission_slug');\n }", "title": "" }, { "docid": "57e449eda591a85a0451ef0d9126d071", "score": "0.6732735", "text": "public function getPermissions()\n {\n return array();\n }", "title": "" }, { "docid": "6b230d6afa64393f7dc8f87fef7e8b7a", "score": "0.6725019", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'aniketmagadum.helpdesk.some_permission' => [\n 'tab' => 'aniketmagadum.helpdesk::lang.plugin.name',\n 'label' => 'aniketmagadum.helpdesk::lang.permissions.some_permission'\n ],\n ];\n }", "title": "" }, { "docid": "ad5bf1c65b7e063aeaee41bec54f88c7", "score": "0.6723583", "text": "public function registerPermissions()\n {\n return [\n 'planetadeleste.blogchimp.setting' => [\n 'tab' => 'planetadeleste.blogchimp::lang.plugin.name',\n 'label' => 'planetadeleste.blogchimp::lang.permissions.setting'\n ],\n 'planetadeleste.blogchimp.import' => [\n 'tab' => 'planetadeleste.blogchimp::lang.plugin.name',\n 'label' => 'planetadeleste.blogchimp::lang.permissions.import'\n ],\n ];\n }", "title": "" }, { "docid": "7212fd2fa174912efb1a0ac5e409f3d3", "score": "0.6713066", "text": "function getAllPermissions()\n\t{\t\n\t\treturn $this->getAll('permission');\n\t}", "title": "" }, { "docid": "0b858c216676639d018fe1e504b8b499", "score": "0.6671888", "text": "public function getAllPermissions();", "title": "" }, { "docid": "81512d43e1330a7c3f8af346256e0c92", "score": "0.6668258", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'smony.service.some_permission' => [\n 'tab' => 'service',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "6e39bd26256de7623f6c03601f7b5651", "score": "0.66615117", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n }", "title": "" }, { "docid": "085be5c61dbd58e52d6d29b283a6f090", "score": "0.66544783", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'devcatch.sslsupport.some_permission' => [\n 'tab' => 'SslSupport',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "93028d3efb0e7bea16cb363ac6987861", "score": "0.6631534", "text": "public function getPermissions()\n {\n return array\n (\n array(\"label\"=>\"Can add\", \"name\"=> $this->permissionPrefix . \"_can_add\"),\n array(\"label\"=>\"Can edit\", \"name\"=> $this->permissionPrefix . \"_can_edit\"),\n array(\"label\"=>\"Can delete\", \"name\"=> $this->permissionPrefix . \"_can_delete\"),\n array(\"label\"=>\"Can view\", \"name\"=> $this->permissionPrefix . \"_can_view\"),\n array(\"label\"=>\"Can export\", \"name\"=> $this->permissionPrefix . \"_can_export\"),\n array(\"label\"=>\"Can import\", \"name\"=> $this->permissionPrefix . \"_can_import\"),\n array(\"label\"=>\"Can view audit trail\", \"name\"=> $this->permissionPrefix . \"_can_audit\"),\n array(\"label\"=>\"Can view notes\", \"name\"=> $this->permissionPrefix . \"_can_view_notes\"),\n array(\"label\"=>\"Can create notes\", \"name\"=> $this->permissionPrefix . \"_can_create_notes\"),\n );\n }", "title": "" }, { "docid": "5be89afc8d5d905d0cd3305cb1c1a593", "score": "0.6599898", "text": "function agnosia_initialize_permissions_modules() {\r\n\r\n\tglobal $agnosia_permissions_modules;\r\n\r\n\t$agnosia_permissions_modules = array(\r\n\t\t'/inc/permissions/agnosia-advanced-post-and-pages-permissions.php',\r\n\t);\r\n\r\n}", "title": "" }, { "docid": "f9a9e6da8f21ac1428460cb44dffc74e", "score": "0.6597756", "text": "public function registerPermissions()\n {\n return [\n 'codalia.journal.manage_settings' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.manage_settings',\n\t\t'order' => 200\n\t ],\n 'codalia.journal.access_articles' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_articles',\n\t\t'order' => 201\n ],\n 'codalia.journal.access_categories' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_categories',\n\t\t'order' => 202\n ],\n 'codalia.journal.access_publish' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_publish'\n ],\n 'codalia.journal.access_delete' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_delete'\n ],\n 'codalia.journal.access_other_articles' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_other_articles'\n ],\n 'codalia.journal.access_check_in' => [\n 'tab' => 'codalia.journal::lang.journal.tab',\n 'label' => 'codalia.journal::lang.journal.access_check_in'\n ],\n ];\n }", "title": "" }, { "docid": "fbf1fe513c058e1785bf37702c5e3a20", "score": "0.657997", "text": "public function registerPermissions()\n {\n return [\n 'observatby.filesharingoncdn.some_permission' => [\n 'tab' => 'FileSharingOnCdn',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "6f5cbf273f990cae3e1a11b81c346722", "score": "0.6578886", "text": "public function registerPermissions()\n {\n return [\n 'castiron.forms.*' => [\n 'label' => 'Manage the Forms plugin and access Contacts list',\n 'tab' => 'Forms',\n ]\n ];\n }", "title": "" }, { "docid": "3c8c45db08587b9f41e75e9d1f35ad89", "score": "0.6577181", "text": "public function action_set_permissions() {\n\n\t\t$role_id = $this->request->param('id');\n\n\t\t$resources_array = array();\n\n\t\t//get all controllers from database (need it for view)\n\t\t$controllers = ORM::factory('Resources')->where('type_id', '=', 0)->find_all();\n\n\t\t$role = ORM::factory('Roles', $role_id);\n\n\t\tif(!$role->loaded()) die('Role doesn\\'t exist!');\n\n\t\t/*\n\t\t * Select all resources with type \"Code\" (type_id=2) - see config/resource_types.php\n\t\t */\n\t\t$code_pieces = ORM::factory('Resources')->where('type_id','=',2)\n\t\t->order_by('name', 'ASC')->find_all();\n\n\t\tif($this->request->method()=='POST') {\n\n\t\t\tDB::delete('engine_role_permissions')->where('role_id', '=', $role_id)->execute();\n\n\t\t\tif($this->request->post('resource')) {\n\n\t\t\t\tforeach($this->request->post('resource') as $resource_id => $value) {\n\n\t\t\t\t\tDB::insert('engine_role_permissions', array('role_id', 'resource_id'))\n\t\t\t\t\t\t->values(array($role_id, $resource_id))\n\t\t\t\t\t\t->execute();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$this->template->body = View::factory('content/settings/role_permissions')\n\t\t\t->bind('controllers', $controllers)\n\t\t\t->bind('role', $role)\n\t\t\t->bind('code_pieces', $code_pieces);\n\n\n\t}", "title": "" }, { "docid": "90610be8c7124b7be7c840bf61406ab9", "score": "0.6556163", "text": "public static function allPermissionsAllowed(): array\n {\n return array(\n 'type' => 'allow_all_permissions'\n );\n }", "title": "" }, { "docid": "32dbe3f0eddbb0ad7819b1c11f9992ac", "score": "0.65503675", "text": "public function definition()\n {\n $listPermission = [];\n\n $config = config('permission.list');\n if (!empty($config)) {\n foreach ($config as $key => $value) {\n foreach ($value as $k => $v) {\n $listPermission[] = [\n 'guard_name' => 'admin',\n 'name' => $v\n ];\n }\n }\n }\n\n return $listPermission;\n }", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.6549679", "text": "public function getPermissions();", "title": "" }, { "docid": "4595ba6b1ec6df19d680f60afb442265", "score": "0.6544438", "text": "function getPermissionsArray(){\n return array(\n \"newPost\" => 5,\n \"editPost\" => 5,\n \"newCampaign\" => 3,\n \"editCampaign\" => 3,\n \"newCategory\" => 3,\n \"editCategory\" => 3,\n \"newEvent\" => 2,\n \"editEvent\" => 2,\n \"contactDB\" => 2,\n );\n}", "title": "" }, { "docid": "2b4115e9a854c1ede3209c62f659dbc6", "score": "0.6530689", "text": "public function registerPermissions()\n {\n return []; // Remove this line to activate\n\n return [\n 'test.plugin.some_permission' => [\n 'tab' => 'Plugin',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "e049fad8de3c9f6f824a9bd2cdf0553a", "score": "0.65257204", "text": "public function registerPermissions()\n {\n return [\n 'waka.wcms.user.admin' => [\n 'tab' => 'Waka CMS',\n 'label' => 'Administrateur de WCMS',\n ],\n 'waka.wcms.user.manager' => [\n 'tab' => 'Waka CMS',\n 'label' => 'Manager de WCMS',\n ],\n 'waka.wcms.user' => [\n 'tab' => 'Waka CMS',\n 'label' => 'Utilisateur de WCMS',\n ],\n 'waka.wcms.reader' => [\n 'tab' => 'Waka CMS',\n 'label' => 'Peut lire mais pas modifier WCMS',\n ],\n ];\n }", "title": "" }, { "docid": "c0d57a4ef9d5afb873c11a76887aa169", "score": "0.65161324", "text": "public function registerPermissions()\n {\n return [\n 'cryptopolice.bitcointalk.some_permission' => [\n 'tab' => 'Bitcointalk',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "f6f3c9484c410db6c8c86cb9203a2565", "score": "0.6511956", "text": "public function registerPermissions()\n {\n return [\n 'toughdeveloper.imageresizer.access_settings' => [\n 'tab' => 'toughdeveloper.imageresizer::lang.permission.tab',\n 'label' => 'toughdeveloper.imageresizer::lang.permission.label'\n ]\n ];\n }", "title": "" }, { "docid": "eef6b24b8e4c8fb682e2e71a278c1384", "score": "0.6510758", "text": "function bam_admin_config_permissions(&$admin_permissions) {\n\tglobal $lang;\n\t$admin_permissions['bam_announcements_admin_permissions'] = $lang->bam_admin_permissions;\n}", "title": "" }, { "docid": "380c03448126e0251bbf2c962771eb3f", "score": "0.6501516", "text": "function fxt_permissions(&$permissionGroups, &$permissionList)\n{\n\tloadLanguage('BugTracker');\n\n\t// Permission groups...\n\t$permissionGroups['membergroup']['simple'] = array('fxt_simple');\n\t$permissionGroups['membergroup']['classic'] = array('fxt_classic');\n\n\t// And then the permissions themselves, in all their glory!\n\t$permissionList['membergroup']['bugtracker_view'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bugtracker_viewprivate'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_add'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_edit_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_edit_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_remove_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_remove_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_reply_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_reply_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_new_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_new_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_wip_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_wip_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_done_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_done_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_reject_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_reject_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_attention_any'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bt_mark_attention_own'] = array(false, 'fxt_classic', 'fxt_simple');\n\t/*$permissionList['membergroup']['bugtracker_view'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bugtracker_view'] = array(false, 'fxt_classic', 'fxt_simple');\n\t$permissionList['membergroup']['bugtracker_view'] = array(false, 'fxt_classic', 'fxt_simple');*/\n}", "title": "" }, { "docid": "eb00cdcfb8c5a212e8231594fe25596a", "score": "0.649352", "text": "public function registerPermissions()\n {\n return [\n 'rluders.cors.access_settings' => [\n 'tab' => 'rluders.cors::lang.plugin.name',\n 'label' => 'rluders.cors::lang.permissions.settings'\n ]\n ];\n }", "title": "" }, { "docid": "633b098865c3003a7e42f7ed83047b8b", "score": "0.6492602", "text": "public function action_list()\n\t{\n\t\t$this->title = __('Permissions');\n\n\t\t$view = View::factory('admin/permission/list')\n\t\t\t\t\t->set('permissions', ACL::all())\n\t\t\t\t\t->bind('errors', $errors)\n\t\t\t\t\t->bind('perms', $role_perms)\n\t\t\t\t\t->bind('roles', $roles)\n\t\t\t\t\t->bind('count', $total);\n\n\t\t$roles = ORM::factory('role')\n\t\t\t\t\t->order_by('name', 'ASC')\n\t\t\t\t\t->find_all();\n\n\t\t$total = $roles->count();\n\n\t\t$role_perms = DB::select()\n\t\t\t\t\t->from('permissions')\n\t\t\t\t\t->as_object()\n\t\t\t\t\t->execute();\n\n\t\t$errors = array();\n\t\t$this->response->body($view);\n\n\t\tif($this->valid_post('roles'))\n\t\t{\n\t\t\t$per_insert = DB::insert('permissions', array('rid', 'permission', 'module'));\n\n\t\t\tforeach ($_POST['roles'] as $id => $role)\n\t\t\t{\n\t\t\t\tforeach($role as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif( isset($val['name']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$per_insert->values(array($val['id'], $val['name'], $val['module']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDB::delete('permissions')->execute();\n\t\t\t\t$per_insert->execute();\n\n\t\t\t\tMessage::success(__('Permissions saved successfully!'));\n\t\t\t\t$this->request->redirect(Route::get('admin/permission')->uri());\n\t\t\t}\n\t\t\tcatch(Validate_Exception $e)\n\t\t\t{\n\t\t\t\t$errors = $e->array->errors('permissions');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a177a458fd733ff1dfe8d666d2bac639", "score": "0.6479035", "text": "public function setPermissions() {\n\t\t$viewReq = $this -> data['view_requirement'];\n\t\t$reqs = explode(\",\", $viewReq);\n\t\tforeach($reqs as $req) {\n\t\t\tif (Utils::startsWith($req, \"rights:\")) {\n\t\t\t\t$this -> viewRight = intval(substr($req, strrpos($req, ':') + 1));\n\t\t\t} elseif ($req == \"self\") {\n\t\t\t\t$this -> selfView = true;\n\t\t\t} elseif ($req == \"donator\") {\n\t\t\t\t$this -> donator = true;\n\t\t\t}\n\t\t}\n\t\t$postReq = $this -> data['post_requirement'];\n\t\t$reqs = explode(\",\", $postReq);\n\t\tforeach($reqs as $req) {\n\t\t\tif (Utils::startsWith($req, \"rights:\")) {\n\t\t\t\t$this -> postRight = intval(substr($req, strrpos($req, ':') + 1));\n\t\t\t} \n\t\t}\n\t}", "title": "" }, { "docid": "55673ab43fabc3dd43a353abdb6f71d5", "score": "0.64586604", "text": "protected function helperGetAllowedPermissions()\n {\n $permissions = parent::helperGetAllowedPermissions();\n\n foreach ($permissions as $val) {\n if ('admin' === $val) {\n $permissions['index'] = 'index';\n }\n if (preg_match('/^action\\-(.*)/', $val, $matches)) {\n $permissions['admin-ajax'] = 'admin-ajax';\n $permissions['action'][$matches[1]] = $matches[1];\n }\n }\n\n $permissions['action'] = isset($permissions['action']) ? $permissions['action'] : [];\n\n return $permissions;\n }", "title": "" }, { "docid": "081808fae2a106c7ca607d5103ee8652", "score": "0.6454756", "text": "public function all_permissions() {\n // Only build permissions once.\n if ($this->permissions === NULL) {\n $this->_build_permissions();\n }\n return $this->permissions;\n }", "title": "" }, { "docid": "fbc1633802772232514f3a14b454edc8", "score": "0.6450381", "text": "public function getPermissions()\n {\n // TODO: Implement getPermissions() method.\n }", "title": "" }, { "docid": "e500a6e613a2cd052277804e1118000f", "score": "0.6450024", "text": "public function create_used_permissions()\n {\n $all_used_permissions = ['view sellers report',\n 'view sellers by kilo report',\n 'view all customers report',\n 'view wholesale purchases report',\n 'suspend admin',\n 'unsuspend admin',\n 'edit admin',\n 'get control permissions',\n 'create used permissions',\n 'delete used permissions',\n 'edit category',\n 'edit subcategory',\n 'delete category',\n 'delete subcategory',\n 'edit store',\n 'edit seller',\n 'delete store',\n 'suspend seller',\n 'view store quantities',\n 'seller sold',\n 'view store purchases',\n 'seller kilo history',\n 'view store products movements',\n 'view store sellers',\n 'print store week',\n 'store ship order',\n 'edit customer', \n 'suspend customer',\n 'show customer orders',\n 'unsuspend customer',\n 'archive product',\n 'unarchive product',\n 'product discount',\n 'view product movements',\n 'edit product',\n 'change product quantity',\n 'change product price',\n 'view product history',\n 'view shiped orders',\n 'search with bill',\n 'view pos log',\n 'view panel log',\n 'add permission',\n // 'assign roles permissions',\n 'assign users roles',\n 'give admins roles',\n 'view quantities rate',\n 'add role',\n 'create store',\n 'view stores purchases',\n 'create seller',\n 'create client',\n 'view transactions',\n 'view specific seller',\n 'view product prices',\n 'view specific subcategory',\n 'view refunds',\n 'view specific product',\n 'view archived products',\n 'view all subcategories',\n 'add product',\n 'view all categories',\n 'create category',\n 'view all products',\n 'create subcategory',\n 'view all sellers',\n 'all admins',\n 'view all clients',\n 'view all stores',\n 'view all banners',\n 'create banner',\n 'edit banner',\n 'view banner details',\n 'delete banner',\n 'add admin', // ecommerce permissions \n 'view online refunds',\n 'pending purchases',\n 'in_progress purchases',\n 'delieverd purchases',\n 'show pending',\n // 'manage delieverd',\n 'cancelled purchases',\n 'purchase status',\n //'online discount',\n 'create discount',\n // 'show discount',\n // 'edit discount',\n // 'delete discount',\n 'index coupon',\n 'create coupon',\n 'show coupon',\n 'edit coupon',\n 'delete coupon',\n 'shipments',\n 'shipment create',\n 'shipment edit',\n 'shipment destroy',\n 'cancel pending purchases',\n 'restore cancelled purchases',\n 'view inprogress order details',\n 'view delivered order details',\n 'view cancelled order details',\n 'categories online', // online categories \n 'categories online create',\n 'categories online edit',\n 'categories online destroy',\n 'edit shipedorders details', // added shiped orders\n 'ship known order',\n 'edit shipedorders store',\n 'edit shipedorders number',\n 'edit shipedorders product',\n 'edit shipedorders quantity',\n 'settle stock', // added new\n 'refund stock',\n 'transfer order', \n 'view store refunds',\n 'view store settlements',\n 'view store transfers',\n 'edit refunds details', // new \n 'edit refunds product',\n 'edit refunds quantity',\n 'edit refunds store',\n 'edit refunds number',\n 'edit settles details', // new \n 'edit settles product',\n 'edit settles quantity',\n 'edit settles store',\n 'edit settles number',\n 'edit transfers details', // new \n 'edit transfers product',\n 'edit transfers quantity',\n 'edit transfers store',\n 'edit transfers number',\n 'add new stock refund', // for add button \n 'add new stock settle', \n 'add new stock transfer',\n 'view all tags', // for tags\n 'create tag',\n 'edit tag',\n 'delete tag', \n ];\n\n foreach ($all_used_permissions as $key => $perm) {\n $perm_found = Permission::where('name', $perm)->first();\n // return $perm_found;\n if ($perm_found) {\n continue;\n // return redirect()->back()->withMessage(__('translations.permission_already_exists'));\n }\n else{\n // Permission::create(['name' => $perm]);\n $permission = new Permission();\n $permission->name = $perm;\n $permission->save();\n }\n }\n return redirect()->back()->withMessage(__('translations.permissions_updated_successfully'));\n }", "title": "" }, { "docid": "606f75a679a3896482e4748726c7d871", "score": "0.6436274", "text": "public function permissions()\n\t{\n\t\t$this->api();\n\n\t\t$permissions\t= $this->api->get_permissions();\n\n\t\tforeach ( $this->data->get_possible_permissions() as $val )\n\t\t{\n\t\t\t$cond['fbc_allow_' . $val]\t= 'n';\n\n\t\t\tif ( ! empty( $permissions[$val] ) )\n\t\t\t{\n\t\t\t\t$cond['fbc_allow_' . $val]\t= 'y';\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tParse conditionals\n\t\t// --------------------------------------------\n\n\t\t$tagdata\t= ee()->functions->prep_conditionals( ee()->TMPL->tagdata, $cond );\n\n\t\treturn $tagdata;\n\t}", "title": "" }, { "docid": "f17ccff2c838c8b60d5dac1a0e8f64a2", "score": "0.64271146", "text": "public function getPermissionsArray();", "title": "" }, { "docid": "ae589b34d6317eeb2d84f695b7e63406", "score": "0.64253336", "text": "public function registerPermissions()\n {\n\n return [\n 'willwritingpartnership.diywill.some_permission' => [\n 'tab' => 'DIYWill',\n 'label' => 'Some permission'\n ],\n ];\n }", "title": "" }, { "docid": "87956cfdb48ee92a196f51b436b1a415", "score": "0.6407809", "text": "public function registerPermissions()\n {\n return [\n 'brenodouglas.shortcode.code' => [\n 'tab' => 'Shortcode',\n 'label' => 'Code'\n ],\n ];\n }", "title": "" }, { "docid": "7b06add0fa0057957d0c5002f1e14b0b", "score": "0.64047605", "text": "public function registerPermissions()\n {\n\n return [\n 'istheweb.iscorporate.access_employees' => [\n 'label' => 'istheweb.iscorporate::lang.employee.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_clients' => [\n 'label' => 'istheweb.iscorporate::lang.client.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_budgets' => [\n 'label' => 'istheweb.iscorporate::lang.budget.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_invoices' => [\n 'label' => 'istheweb.iscorporate::lang.invoice.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_providers' => [\n 'label' => 'istheweb.iscorporate::lang.provider.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_projects' => [\n 'label' => 'istheweb.iscorporate::lang.project.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.create_projects' => [\n 'label' => 'istheweb.iscorporate::lang.project.create_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.delete_projects' => [\n 'label' => 'istheweb.iscorporate::lang.project.delete_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_project_types' => [\n 'label' => 'istheweb.iscorporate::lang.project_type.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_options' => [\n 'label' => 'istheweb.iscorporate::lang.option.list_title',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name',\n ],\n 'istheweb.iscorporate.access_issues' => [\n 'label' => 'istheweb.iscorporate::lang.permissions.issues',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name'\n ],\n 'istheweb.iscorporate.access_other_issues' => [\n 'label' => 'istheweb.iscorporate::lang.permissions.other_issues',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name'\n ],\n 'istheweb.iscorporate.access_issue_types' => [\n 'label' => 'istheweb.iscorporate::lang.permissions.issue_types',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name'\n ],\n 'istheweb.iscorporate.access_issue_statuses' => [\n 'label' => 'istheweb.iscorporate::lang.permissions.issue_statuses',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name'\n ],\n 'istheweb.iscorporate.access_reports' => [\n 'label' => 'istheweb.iscorporate::lang.permissions.reports',\n 'tab' => 'istheweb.iscorporate::lang.plugin.name'\n ],\n ];\n }", "title": "" }, { "docid": "228059d0ec7814225b2c89f5359ea062", "score": "0.6404057", "text": "public function addPermissions(array $permissions);", "title": "" }, { "docid": "e377db33ae56a6dc29de244e0d5fde4b", "score": "0.6403365", "text": "function permission_ids()\n{\n return array(\n CAN_ADMINISTRATE => \"admin\",\n CAN_VIEWSTATISTICS => \"statistics\",\n CAN_TAKEOVER => \"takeover\",\n CAN_VIEWTHREADS => \"viewthreads\",\n CAN_MODIFYPROFILE => \"modifyprofile\",\n );\n}", "title": "" }, { "docid": "711c72ea4569d4b16a4a5256cc63b6eb", "score": "0.6391595", "text": "public function getAllPermissions()\n {\n \t$permissions = array();\n \tforeach($this->getAccessRoleSecurityAction() as $accessRoleSecurityAction){\n \t\t$permissions[$accessRoleSecurityAction['id_security_action']][$accessRoleSecurityAction['id_access_role']] = 1;\n \t}\n \treturn $permissions;\n }", "title": "" }, { "docid": "2ae0fe5e49e091883fd896640d4bc7b7", "score": "0.6368765", "text": "public function registerPermissions()\n {\n return [\n 'axmit.storage.settings_manage' => [\n 'tab' => 'Axmit Storage',\n 'label' => 'Manage data storage permissions',\n ],\n ];\n }", "title": "" }, { "docid": "add215f13013d957c3f9d463fc3369a8", "score": "0.6353002", "text": "public function assignPermissions()\n {\n $this->prepareAllForDb(\n $this->getUsersWithPermissions()\n );\n $this->populateDb();\n }", "title": "" }, { "docid": "e635069e457a4f65d8b9981b5d544bf9", "score": "0.6350489", "text": "public function getPermissionTypes()\r\n\t{\r\n\t\t// none here, everyone can see the Dashboard!\r\n\t\treturn array(\r\n\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "afccb0ffb2b38680f3de9541ec9bf764", "score": "0.63444114", "text": "public static function getAllPermissions()\n {\n return Database::getInstance()->fetchAll(\n 'SELECT typeid AS value, descr AS text FROM public.l_action\n ORDER BY descr ASC'\n );\n }", "title": "" }, { "docid": "8e4a09ed767ae3d75098363cd291dbb5", "score": "0.6335868", "text": "public function providePermissions()\n {\n $category = 'Comments (Admin)';\n return [\n \"MODELCOMMENT\" => array(\n 'name' => _t(ModelComment::class.'.MODELCOMMENT', \"Can comment on objects\"),\n 'category' => $category\n ),\n \"MODELCOMMENT_VIEW\" => array(\n 'name' => _t(ModelComment::class.'.MODELCOMMENT_VIEW', \"Can view comments on objects\"),\n 'category' => $category\n ),\n \"MODELCOMMENT_ADMIN\" => array(\n 'name' => _t(ModelComment::class.'.MODELCOMMENT_ADMIN', \"Can administer comments on objects (delete/edit others)\"),\n 'category' => $category\n ),\n ];\n }", "title": "" }, { "docid": "2554d02ced45dc28a1cbbf0c15ef5bca", "score": "0.6317685", "text": "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Admin'), [\n 'leads',\n 'projects',\n 'clients',\n 'offers',\n 'providers',\n 'vehicles',\n 'users',\n ])->description(__('Administrador tem acesso a todas as funcionalidades do sistema.'));\n\n Jetstream::role('instalador', __('Instalador'), [\n 'vehicles',\n ])->description(__('Instalador tem acesso somente a gestão de frota de veículos.'));\n \n Jetstream::role('recepcao', __('Recepção'), [\n 'leads',\n 'clients',\n ])->description(__('Recepção tem acesso somente a leads e clientes.'));\n \n Jetstream::role('comercial', __('Comercial'), [\n 'leads',\n 'clients',\n ])->description(__('Comercial tem acesso somente a leads e clientes.'));\n \n Jetstream::role('compras', __('Compras'), [\n 'offers',\n 'providers',\n ])->description(__('Compras tem acesso somente a cotações e fornecedores.'));\n }", "title": "" }, { "docid": "e98b77a2f11afda37330fdf4029fb3d2", "score": "0.6309722", "text": "function lists()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tcheck_access($this, 'view_permission_list');\n\t\t\n\t\t$data['list'] = $this->_permission->get_list();\n\t\t$this->load->view('permission/list_permissions', $data); \n\t}", "title": "" }, { "docid": "ca4cb0e163c51d15fc401d1ae7cd0bd4", "score": "0.630867", "text": "public function providePermissions()\n {\n return array(\n 'CMS_VIEW_DEVDOCS' => array(\n 'name' => 'View Site Documentation',\n 'category' => 'Documentation',\n )\n );\n }", "title": "" }, { "docid": "8f8b681df3b573e7ad855c77fb1af62a", "score": "0.63074356", "text": "function setPermissions(){\n\n $this->commentsPermss = $this->C->user->getCommentsPermss($this->uidRec);\n\n /* echo \"<b>ATcomments - setPermissions </b><br>\".\n ($this->commentsPermss ? 'Am permisiuni pe commenturi ' :'Nu am permisiuni pe aceste commenturi ')\n .$this->uidRec\n .' cu userul '.$this->uid.\"<br>\";*/\n\n }", "title": "" }, { "docid": "5a2403fab03b1a0093c0bfdea89554d7", "score": "0.6306573", "text": "public static function getPermissions() {\n $owner = ['view' => 'all', 'delete' => 'all', 'update' => 'all', 'create' => true];\n $reseller = ['view' => 'account', 'delete' => 'account', 'update' => 'account', 'create' => false];\n $user = ['view' => 'personal', 'delete' => 'personal', 'update' => 'personal', 'create' => true];\n\n return [\n 1 => $owner,\n 2 => $reseller,\n 3 => $user\n ];\n }", "title": "" }, { "docid": "b48c5c446df1a628b42d5e5b9862c840", "score": "0.62972665", "text": "public function permissions()\n {\n $sql='SELECT * FROM auth_permission;';\n $q=$this->db()->query($sql) or die(\"Error:\".print_r($this->db()->errorInfo(), true).\"<hr />$sql\");\n\n $dat=[];\n while ($r=$q->fetch(PDO::FETCH_ASSOC)) {\n $dat[]=$r;\n }\n\n return $dat;\n }", "title": "" }, { "docid": "2599d8d83214bf7c579f3e2c60ede617", "score": "0.6291114", "text": "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::permissions([\n 'create',\n 'read',\n 'update',\n 'delete',\n ]);\n }", "title": "" }, { "docid": "32801d3865c43e414ab583b06cd33859", "score": "0.62906045", "text": "public function getGlobalPermissions(): array\n {\n $acl = new Acl();\n $types = [\n Artist::class,\n Card::class,\n Change::class,\n Collection::class,\n Country::class,\n Dating::class,\n Institution::class,\n Tag::class,\n self::class,\n ];\n\n $permissions = ['create'];\n $result = [];\n\n $previousUser = self::getCurrent();\n self::setCurrent($this);\n foreach ($types as $type) {\n $instance = new $type();\n $sh = lcfirst(Utility::getShortClassName($instance));\n $result[$sh] = [];\n\n foreach ($permissions as $p) {\n $result[$sh][$p] = $acl->isCurrentUserAllowed($instance, $p);\n }\n }\n\n self::setCurrent($previousUser);\n\n return $result;\n }", "title": "" }, { "docid": "21c70ddfaadb7a016563474d723ff12f", "score": "0.62892044", "text": "public function rolePermissions()\n {\n // TODO: Implement rolePermissions() method.\n }", "title": "" }, { "docid": "a7adb29add21866b789a02e64785943b", "score": "0.6267912", "text": "function gare_permission() {\r\n return array( _AUTH_VIEW,\r\n\t\t_AUTH_CHANGE_LOW,\r\n\t\t_AUTH_CHANGE_HI,\r\n\t\t_AUTH_OWNER,\r\n\t\t_ROOT_OWNER);\r\n}", "title": "" }, { "docid": "fb50d5b107fe14d8a0277d66fd2f5a1d", "score": "0.62550616", "text": "protected function loadGlobalPermissions() {\n\t\t$this->globalPermissions = array(\n\t\t\t'canViewLibrary' => $this->group->getGroupOption('user.library.canViewLibrary'),\n\t\t\t'canEnterLibrary' => $this->group->getGroupOption('user.library.canEnterLibrary'),\n\t\t\t'canReadStory' => $this->group->getGroupOption('user.library.canReadStory'),\n\t\t\t'canReadOwnStory' => $this->group->getGroupOption('user.library.canReadOwnStory'),\n\t\t\t'canStartStory' => $this->group->getGroupOption('user.library.canStartStory'),\n\t\t\t'canReplyStory' => $this->group->getGroupOption('user.library.canReplyStory'),\n\t\t\t'canReplyOwnStory' => $this->group->getGroupOption('user.library.canReplyOwnStory'),\n\t\t\t'canStartStoryWithoutModeration' => $this->group->getGroupOption('user.library.canStartStoryWithoutModeration'),\n\t\t\t'canReplyStoryWithoutModeration' => $this->group->getGroupOption('user.library.canReplyStoryWithoutModeration'),\n\t\t\t'canRateStory' => $this->group->getGroupOption('user.library.canRateStory'),\n\t\t\t'canDeleteOwnChapter' => $this->group->getGroupOption('user.library.canDeleteOwnChapter'),\n\t\t\t'canEditOwnChapter' => $this->group->getGroupOption('user.library.canEditOwnChapter')\n\t\t);\n\t\t\n\t\tif (MODULE_STORY_MARKING_AS_DONE) {\n\t\t\t$this->globalPermissions['canMarkAsDoneOwnStory'] = $this->group->getGroupOption('user.library.canMarkAsDoneOwnStory');\n\t\t}\n\t\t\n\t\tif (MODULE_TAGGING) {\n\t\t\t$this->globalPermissions['canSetTags'] = $this->group->getGroupOption('user.library.canSetTags');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "241f8876d325c056512acee3762f4955", "score": "0.62545633", "text": "public function permissions(): array\n {\n $names = $this->getPermissionNames($this->config['permissions']);\n\n return $this->getDescriptions($names);\n }", "title": "" }, { "docid": "2c5c395f36dbf3c1a1672a5ace080068", "score": "0.6252729", "text": "public function setupPermissions()\n {\n $app = Application::getFacadeApplication();\n $u = $app->make(\\Concrete\\Core\\User\\User::class);\n if ($u->isSuperUser() || ($this->ignorePermissions)) {\n return; // super user always sees everything. no need to limit\n }\n\n $accessEntities = $u->getUserAccessEntityObjects();\n $peIDs = ['-1'];\n foreach ($accessEntities as $pae) {\n $peIDs[] = $pae->getAccessEntityID();\n }\n\n $owpae = PageOwnerPermissionAccessEntity::getOrCreate();\n // now we retrieve a list of permission duration object IDs that are attached view_page or view_page_version\n // against any of these access entity objects. We just get'em all.\n $db = $app->make(Connection::class);\n $activePDIDs = [];\n $vpPKID = $db->GetOne('select pkID from PermissionKeys where pkHandle = ?', [$this->viewPagePermissionKeyHandle]);\n /*\n $vpvPKID = $db->GetOne('select pkID from PermissionKeys where pkHandle = \\'view_page_versions\\'');\n $pdIDs = $db->GetCol(\"select distinct pdID from PagePermissionAssignments ppa inner join PermissionAccessList pa on ppa.paID = pa.paID where pkID in (?, ?) and pdID > 0\", array($vpPKID, $vpvPKID));\n */\n $pdIDs = $db->GetCol(\"select distinct pdID from PagePermissionAssignments ppa inner join PermissionAccessList pa on ppa.paID = pa.paID where pkID =? and pdID > 0\", [$vpPKID]);\n if (count($pdIDs) > 0) {\n // then we iterate through all of them and find any that are active RIGHT NOW\n foreach ($pdIDs as $pdID) {\n $pd = PermissionDuration::getByID($pdID);\n if ($pd->isActive()) {\n $activePDIDs[] = $pd->getPermissionDurationID();\n }\n }\n }\n $activePDIDs[] = 0;\n\n if ($this->includeAliases) {\n $cInheritPermissionsFromCID = 'if(p2.cID is null, p1.cInheritPermissionsFromCID, p2.cInheritPermissionsFromCID)';\n } else {\n $cInheritPermissionsFromCID = 'p1.cInheritPermissionsFromCID';\n }\n\n if ($this->displayOnlyApprovedPages) {\n $now = $app->make('date')->getOverridableNow();\n $nowSql = $db->quote($now);\n $cvIsApproved = \" and cv.cvIsApproved = 1 and (cv.cvPublishDate is null or cv.cvPublishDate <= {$nowSql}) and (cv.cvPublishEndDate is null or cv.cvPublishEndDate >= {$nowSql})\";\n } else {\n $cvIsApproved = '';\n }\n\n $uID = 0;\n if ($u->isRegistered()) {\n $uID = $u->getUserID();\n }\n\n /*\n $this->filter(false, \"((select count(cID) from PagePermissionAssignments ppa1 inner join PermissionAccessList pa1 on ppa1.paID = pa1.paID where ppa1.cID = {$cInheritPermissionsFromCID} and pa1.accessType = \" . PermissionKey::ACCESS_TYPE_INCLUDE . \" and pa1.pdID in (\" . implode(',', $activePDIDs) . \")\n and pa1.peID in (\" . implode(',', $peIDs) . \") and (if(pa1.peID = \" . $owpae->getAccessEntityID() . \" and p1.uID <>\" . $uID . \", false, true)) and (ppa1.pkID = \" . $vpPKID . $cvIsApproved . \" or ppa1.pkID = \" . $vpvPKID . \")) > 0\n or (p1.cPointerExternalLink !='' AND p1.cPointerExternalLink IS NOT NULL))\");\n $this->filter(false, \"((select count(cID) from PagePermissionAssignments ppaExclude inner join PermissionAccessList paExclude on ppaExclude.paID = paExclude.paID where ppaExclude.cID = {$cInheritPermissionsFromCID} and accessType = \" . PermissionKey::ACCESS_TYPE_EXCLUDE . \" and pdID in (\" . implode(',', $activePDIDs) . \")\n and paExclude.peID in (\" . implode(',', $peIDs) . \") and (if(paExclude.peID = \" . $owpae->getAccessEntityID() . \" and p1.uID <>\" . $uID . \", false, true)) and (ppaExclude.pkID = \" . $vpPKID . $cvIsApproved . \" or ppaExclude.pkID = \" . $vpvPKID . \")) = 0)\");\n */\n\n $this->filter(false, \"((select count(cID) from PagePermissionAssignments ppa1 inner join PermissionAccessList pa1 on ppa1.paID = pa1.paID where ppa1.cID = {$cInheritPermissionsFromCID} and pa1.accessType = \" . PermissionKey::ACCESS_TYPE_INCLUDE . \" and pa1.pdID in (\" . implode(',', $activePDIDs) . \")\n\t\t\tand pa1.peID in (\" . implode(',', $peIDs) . \") and (if(pa1.peID = \" . $owpae->getAccessEntityID() . \" and p1.uID <>\" . $uID . \", false, true)) and (ppa1.pkID = \" . $vpPKID . $cvIsApproved . \")) > 0\n\t\t\tor (p1.cPointerExternalLink !='' AND p1.cPointerExternalLink IS NOT NULL))\");\n $this->filter(false, \"((select count(cID) from PagePermissionAssignments ppaExclude inner join PermissionAccessList paExclude on ppaExclude.paID = paExclude.paID where ppaExclude.cID = {$cInheritPermissionsFromCID} and accessType = \" . PermissionKey::ACCESS_TYPE_EXCLUDE . \" and pdID in (\" . implode(',', $activePDIDs) . \")\n\t\t\tand paExclude.peID in (\" . implode(',', $peIDs) . \") and (if(paExclude.peID = \" . $owpae->getAccessEntityID() . \" and p1.uID <>\" . $uID . \", false, true)) and (ppaExclude.pkID = \" . $vpPKID . $cvIsApproved . \")) = 0)\");\n }", "title": "" }, { "docid": "6ed28fb3c5c9aea860c892318d66f2fa", "score": "0.62485576", "text": "static function getPermissions() {\n\t\tglobal $wgEnableEmail, $wgFbUserRightsFromGroup, $wgFbOpenGraph,\n\t\t\t\t$wgFbOpenGraphRegisteredActions;\n\t\t$scope = array();\n\t\tif ( !empty( $wgEnableEmail ) ) {\n\t\t\t$scope[] = 'email';\n\t\t}\n\t\tif ( !empty( $wgFbUserRightsFromGroup ) ) {\n\t\t\t$scope[] = 'user_groups';\n\t\t}\n\t\tif (!empty($wgFbOpenGraph) && !empty($wgFbOpenGraphRegisteredActions)) {\n\t\t\t$scope[] = 'publish_actions';\n\t\t}\n\t\treturn implode( '', $scope );\n\t}", "title": "" }, { "docid": "3ec2d3c72627df4e1799772dfe6c0a5f", "score": "0.6246573", "text": "public function getPerm() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "d694d25ee45937707c7c2061d9a1b6b2", "score": "0.6244142", "text": "function getPermissions()\r\n {\r\n return $this->permissions;\r\n }", "title": "" }, { "docid": "bef5dc365e8967ec8bea138ee21344ed", "score": "0.62376165", "text": "public function providePermissions()\n {\n $category = DogAdmin::menu_title();\n return [\n \"DOG_EDIT\" => array(\n 'name' => _t('Dog.VIEW', \"Create, edit and delete {title}\", array(\n 'title' => $this->i18n_plural_name()\n )),\n 'category' => $category\n ),\n \"DOG_VIEW\" => array(\n 'name' => _t('Dog.VIEW', \"Can view {title}\", array(\n 'title' => $this->i18n_plural_name()\n )),\n 'category' => $category\n )\n ];\n }", "title": "" }, { "docid": "a986eb357ef77905b61b9b60e9bbcc6d", "score": "0.62216043", "text": "function user_init () {\n global $user_permissions;\n \n foreach (module_list() as $module) {\n $func = $module . '_permissions';\n if (function_exists($func)) {\n $permissions = call_user_func($func);\n $user_permissions = array_merge($user_permissions, $permissions);\n }\n }\n}", "title": "" }, { "docid": "5c8bd16149767f23a2b657e44afc5043", "score": "0.6221187", "text": "function VIVNQ_Permissions(&$permissionGroups, &$permissionList, &$leftPermissionGroups, &$hiddenPermissions, &$relabelPermissions)\n{\n\tglobal $context;\n\n\t// Define the new permissions that we will use throughout the mod:\n\t$permissionList['board']['VIVNQ_use_visible'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_quote_visible'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_use_invisible'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_quote_invisible'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_use_noquote'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_quote_noquote'] = array(false, 'VIVNQ', 'VIVNQ');\n\t$permissionList['board']['VIVNQ_toggle_filter'] = array(false, 'VIVNQ', 'VIVNQ');\n\n\t// Define the illegal permissions that Guests cannot use:\n\t$context['non_guest_permissions'][] = 'VIVNQ_use_visible';\n\t$context['non_guest_permissions'][] = 'VIVNQ_quote_visible';\n\t$context['non_guest_permissions'][] = 'VIVNQ_use_invisible';\n\t$context['non_guest_permissions'][] = 'VIVNQ_quote_invisible';\n\t$context['non_guest_permissions'][] = 'VIVNQ_use_noquote';\n\t$context['non_guest_permissions'][] = 'VIVNQ_quote_noquote';\n\t$context['non_guest_permissions'][] = 'VIVNQ_toggle_filter';\n}", "title": "" }, { "docid": "0c3c110b92198fa49b8522adae412bc2", "score": "0.6215773", "text": "public function getPermissions()\n {\n return $this->getUser() ? $this->getUser()->get('Permissions') : array();\n }", "title": "" }, { "docid": "289bc7f7003bbf38d0d84e825650c376", "score": "0.6207818", "text": "function add_perms()\n\t{\n\t\tif ($this->perms !== FALSE && $this->role_id !== NULL)\n\t\t{\n\t\t\t$insert = \"INSERT INTO \".APP_SCHEMA.\".ROLE_PERM (PERM,ROLE_ID) VALUES (?, ?)\";\n\n\t\t\t$this->db2->set_sql($insert)->prepare();\n\t\t\t\n\t\t\tforeach ($this->perms as $perm)\n\t\t\t{\n\t\t\t\t$this->db2->set_params(array($perm, $this->role_id))->execute();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5b92abcdc1eb248e8b8023ff74debc83", "score": "0.62048596", "text": "public function userPermissions()\n {\n // TODO: Implement userPermissions() method.\n }", "title": "" }, { "docid": "91606f219448a563dea6b443f04b4d57", "score": "0.61781883", "text": "protected function configurePermissions()\n {\n Jetstream::role('admin', __('Location administrator'), [\n 'updateLocation',\n 'addLocationMember',\n 'updateLocationMember',\n 'removeLocationMember',\n 'addLocationAbsentType',\n 'manageTimeTracking',\n 'updateTimeTracking',\n 'manageAbsence',\n 'approveAbsence',\n 'filterAbsences',\n 'addDefaultRestingTime',\n 'viewAnyTimeTracking',\n 'filterTimeTracking',\n 'assignProjects',\n 'editLocations',\n 'switchReportEmployee',\n ])->description(__('Location administrators can perform updates on a location.'));\n\n Jetstream::role('employee', __('Employee'), [\n ])->description(__('Employees can create new working hours.'));\n }", "title": "" }, { "docid": "b53e338826e7d712637eabf34f07ea63", "score": "0.6177466", "text": "protected function listCurrentPermissions() {\n //Log::debug(\"-----: on listing permissions - \" . $this->module);\n $data = $this->basicPermissions();\n return $this->success(compact('data'));\n }", "title": "" }, { "docid": "05ed2e99cb6591783e8529a7dbe2ecdb", "score": "0.6173848", "text": "public function getAllPermissions()\r\n\t{\r\n\t\treturn $this->perms;\r\n\t}", "title": "" }, { "docid": "04dce7539fc834547fe7453f7b64b17c", "score": "0.61698866", "text": "protected function readPermissionSettings() {\n\t\t$sql = \"SHOW COLUMNS FROM sls\".SLS_N.\"_library_to_group\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\tif ($row['Field'] != 'libraryID' && $row['Field'] != 'groupID') {\n\t\t\t\t// check modules\n\t\t\t\tswitch ($row['Field']) {\n\t\t\t\t\tcase 'canMarkAsDoneOwnStory': \n\t\t\t\t\t\tif (!MODULE_STORY_MARKING_AS_DONE) continue 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'canSetTags':\n\t\t\t\t\t\tif (!MODULE_TAGGING) continue 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->permissionSettings[] = $row['Field'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "def5d4b4fed597c6d42b706056022278", "score": "0.6167458", "text": "public function getPermissions()\n {\n return [\n [\n 'group_alias' => 'qbo_integration.admin_main',\n 'name' => Language::_('QboIntegrationPlugin.permission.invoice_list', true),\n 'alias' => 'qbo_integration.invoice_list',\n 'action' => '*'\n ],\n ];\n \n }", "title": "" }, { "docid": "f0981620549580ac098c0ad51eb2faf2", "score": "0.6159667", "text": "public function getAllowedPermissionsValues()\n {\n return [0, 1];\n }", "title": "" }, { "docid": "12736020614792e213c89c4cab805e6e", "score": "0.61595404", "text": "public function rolesPermissions();", "title": "" }, { "docid": "d3226e4be164c395b3ddc8dad0b533b6", "score": "0.61494756", "text": "public function registerPermissions()\n {\n return [\n 'acme.blog.create_articles' => [\n 'tab' => 'Blog',\n 'label' => 'Create articles'\n ],\n 'acme.blog.update_articles' => [\n 'tab' => 'Blog',\n 'label' => 'Update articles'\n ],\n 'acme.blog.delete_articles' => [\n 'tab' => 'Blog',\n 'label' => 'Delete articles'\n ],\n ];\n }", "title": "" }, { "docid": "cb53a7cfede228e17cca99e29921f24d", "score": "0.61418664", "text": "public function providePermissions()\n {\n return [\n 'VIEW_RATING' => [\n 'name' => 'View Ratings',\n 'category' => 'Ratings'\n ],\n 'DELETE_RATING' => [\n 'name' => 'Delete Ratings',\n 'category' => 'Ratings'\n ]\n ];\n }", "title": "" }, { "docid": "2d6c3caabe7af534dc1fd053d53dd30f", "score": "0.61291224", "text": "public function set_permissions($var = array()){\n if(!check_numeric_array($var)) return;\n $this->required_permissions = array();\n if(is_array($var)){\n $this->required_permissions = array_merge($this->required_permissions, $var);\n } else{\n array_push( $this->required_permissions, $var);\n }\n }", "title": "" }, { "docid": "69f7c9ade77e6b06453c3d1979db145c", "score": "0.6119811", "text": "function CreateDefaultPermissions()\n\t{\n\t\t$checkCursor = \\Bitrix\\Voximplant\\Model\\RoleTable::getList(array('limit' => 1));\n\t\tif(!$checkCursor->fetch() && !\\Bitrix\\Main\\ModuleManager::isModuleInstalled('bitrix24'))\n\t\t{\n\t\t\t$defaultRoles = array(\n\t\t\t\t'admin' => array(\n\t\t\t\t\t'NAME' => GetMessage('VOXIMPLANT_ROLE_ADMIN'),\n\t\t\t\t\t'PERMISSIONS' => array(\n\t\t\t\t\t\t'CALL_DETAIL' => array(\n\t\t\t\t\t\t\t'VIEW' => 'X',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL' => array(\n\t\t\t\t\t\t\t'PERFORM' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL_RECORD' => array(\n\t\t\t\t\t\t\t'LISTEN' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'USER' => array(\n\t\t\t\t\t\t\t'MODIFY' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'SETTINGS' => array(\n\t\t\t\t\t\t\t'MODIFY' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'LINE' => array(\n\t\t\t\t\t\t\t'MODIFY' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'BALANCE' => array(\n\t\t\t\t\t\t\t'MODIFY' => 'X'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'chief' => array(\n\t\t\t\t\t'NAME' => GetMessage('VOXIMPLANT_ROLE_CHIEF'),\n\t\t\t\t\t'PERMISSIONS' => array(\n\t\t\t\t\t\t'CALL_DETAIL' => array(\n\t\t\t\t\t\t\t'VIEW' => 'X',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL' => array(\n\t\t\t\t\t\t\t'PERFORM' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL_RECORD' => array(\n\t\t\t\t\t\t\t'LISTEN' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'department_head' => array(\n\t\t\t\t\t'NAME' => GetMessage('VOXIMPLANT_ROLE_DEPARTMENT_HEAD'),\n\t\t\t\t\t'PERMISSIONS' => array(\n\t\t\t\t\t\t'CALL_DETAIL' => array(\n\t\t\t\t\t\t\t'VIEW' => 'D',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL' => array(\n\t\t\t\t\t\t\t'PERFORM' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL_RECORD' => array(\n\t\t\t\t\t\t\t'LISTEN' => 'D'\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'manager' => array(\n\t\t\t\t\t'NAME' => GetMessage('VOXIMPLANT_ROLE_MANAGER'),\n\t\t\t\t\t'PERMISSIONS' => array(\n\t\t\t\t\t\t'CALL_DETAIL' => array(\n\t\t\t\t\t\t\t'VIEW' => 'A',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL' => array(\n\t\t\t\t\t\t\t'PERFORM' => 'X'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'CALL_RECORD' => array(\n\t\t\t\t\t\t\t'LISTEN' => 'A'\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$roleIds = array();\n\t\t\tforeach ($defaultRoles as $roleCode => $role)\n\t\t\t{\n\t\t\t\t$addResult = \\Bitrix\\Voximplant\\Model\\RoleTable::add(array(\n\t\t\t\t\t'NAME' => $role['NAME'],\n\t\t\t\t));\n\n\t\t\t\t$roleId = $addResult->getId();\n\t\t\t\tif ($roleId)\n\t\t\t\t{\n\t\t\t\t\t$roleIds[$roleCode] = $roleId;\n\t\t\t\t\t\\Bitrix\\Voximplant\\Security\\RoleManager::setRolePermissions($roleId, $role['PERMISSIONS']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($roleIds['admin']))\n\t\t\t{\n\t\t\t\t\\Bitrix\\Voximplant\\Model\\RoleAccessTable::add(array(\n\t\t\t\t\t'ROLE_ID' => $roleIds['admin'],\n\t\t\t\t\t'ACCESS_CODE' => 'G1'\n\t\t\t\t));\n\t\t\t}\n\n\t\t\tif (isset($roleIds['manager']) && \\Bitrix\\Main\\Loader::includeModule('intranet'))\n\t\t\t{\n\t\t\t\t$departmentTree = CIntranetUtils::GetDeparmentsTree();\n\t\t\t\t$rootDepartment = (int)$departmentTree[0][0];\n\n\t\t\t\tif ($rootDepartment > 0)\n\t\t\t\t{\n\t\t\t\t\t\\Bitrix\\Voximplant\\Model\\RoleAccessTable::add(array(\n\t\t\t\t\t\t'ROLE_ID' => $roleIds['manager'],\n\t\t\t\t\t\t'ACCESS_CODE' => 'DR'.$rootDepartment\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ceec3387232a382a1e2c96c064266c64", "score": "0.6114127", "text": "public function getPermissions()\n {\n return 'browse_permissions';\n }", "title": "" }, { "docid": "6b10be6de4bae45b94d8c4db1e7b73c3", "score": "0.6113511", "text": "function setPermissions($permissions)\r\n {\r\n $this->permissions = $permissions;\r\n }", "title": "" }, { "docid": "4493f686fed3885f5b8c4bc287931b47", "score": "0.6106358", "text": "function __construct($permissions)\r\n {\r\n parent::__construct();\r\n $this->permissions = $permissions;\r\n }", "title": "" } ]
2328677ff8852b8679eb28a2d3a5f56c
Build a new Locator object with default options for CFDI validations. Sets allowed mimes to Xsd and register cfdv32.xsd and TimbreFiscalDigital.xsd from commonxsd/
[ { "docid": "a27229e94235fb6183532a8f0201b4de", "score": "0.6201866", "text": "public function newLocator($registerCommonXsd = true, $repository = '', $timeout = 20, $expire = 0)\n {\n $locator = new Locator($repository, $timeout, $expire);\n $locator->mimeAllow('application/xml');\n $locator->mimeAllow('text/plain');\n $locator->mimeAllow('text/xml');\n if ($registerCommonXsd) {\n $xsd = [\n 'cfdv32.xsd' => 'http://www.sat.gob.mx/cfd/3',\n 'TimbreFiscalDigital.xsd' => 'http://www.sat.gob.mx/TimbreFiscalDigital',\n ];\n if (false != $basepath = realpath(__DIR__ . \"/../../commonxsd\")) {\n foreach ($xsd as $file => $url) {\n $locator->register($url, $basepath.'/'.$file);\n }\n }\n }\n return $locator;\n }", "title": "" } ]
[ { "docid": "afdf35266a45f7f59545c19b65b69cbb", "score": "0.51132673", "text": "function __construct()\n\t\t{\n\t\t\t$CFDVersions = $GLOBALS['CFDVersions'];\n\t\t\t$CFDSetting = $GLOBALS['CFDSetting'];\n\t\t\t$this->Version = $this->VersionAssign($CFDSetting->XmlVersion, 0);\n\t\t\t$this->Emisor = new CFDPersona();\n\t\t\t$this->Receptor = new CFDPersona();\n\t\t\t$this->Conceptos = new CFDConceptos();\n\t\t\t$this->Impuestos = new CFDImpuestos();\n\t\t\t$this->UbicacionOpenSSL = $CFDSetting->OpenSSL;\n\t\t}", "title": "" }, { "docid": "9a19d68347526734cb4ed1b26851d035", "score": "0.49983346", "text": "public function __construct($path_to_wsdl = ''){\n\t\tif($path_to_wsdl==''){\n\t\t\t$path_to_wsdl=dirname(__FILE__).'/wsdl/AddressValidationService_v2.wsdl';\n\t\t}\n\t\tini_set('soap.wsdl_cache_enabled', '0');\n\t\t$this->client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information\n\t\t$this->request['TransactionDetail'] = array('CustomerTransactionId' => ' *** Address Validation Request v2 using PHP ***');\n\t\t$this->request['Version'] = array('ServiceId' => 'aval', 'Major' => '2', 'Intermediate' => '0', 'Minor' => '0');\n\t\t$this->request['RequestTimestamp'] = date('c');\n\t\t$this->request['Options'] = array('CheckResidentialStatus' => 1,\n\t\t\t\t\t\t\t\t\t 'MaximumNumberOfMatches' => 3,\n\t\t\t\t\t\t\t\t\t 'StreetAccuracy' => 'LOOSE',\n\t\t\t\t\t\t\t\t\t 'DirectionalAccuracy' => 'LOOSE',\n\t\t\t\t\t\t\t\t\t 'CompanyNameAccuracy' => 'LOOSE',\n\t\t\t\t\t\t\t\t\t 'ConvertToUpperCase' => 0,\n\t\t\t\t\t\t\t\t\t 'RecognizeAlternateCityNames' => 1,\n\t\t\t\t\t\t\t\t\t 'ReturnParsedElements' => 1);\n\t}", "title": "" }, { "docid": "e0b69f2c61f136e579ec1f36c67ca041", "score": "0.48359594", "text": "function __construct()\n\t\t{\n\t\t\t$CFDVersions = $GLOBALS['CFDVersions'];\n\t\t\t$this->TemporaryPath = dirname(__FILE__).DIRECTORY_SEPARATOR;\n\t\t\t$this->SSLPath = dirname(__FILE__).DIRECTORY_SEPARATOR.'SSL'.DIRECTORY_SEPARATOR;\n\t\t\t$this->OpenSSL = $this->SSLPath . 'openssl.exe';\n\t\t\tif(!file_exists($this->OpenSSL))\n\t\t\t{\n\t\t\t\t// Asume que se tiene acceso a openssl de forma global para entornos LINUX\n\t\t\t\t$this->OpenSSL = 'openssl';\n\t\t\t}\n\t\t\t$this->XmlVersion = $CFDVersions->Validate($CFDVersions->CFDi_32, $this->XmlVersion);\n\t\t}", "title": "" }, { "docid": "af1edb1cbbda957f57ec6a24da2cc9c5", "score": "0.48144487", "text": "function __construct()\n\t\t{\n\t\t\t// Se inicializan las clases necesarias.\n\t\t\t// It is initialized the necessary classes\n\t\t\t$this->DomicilioFiscal = new CFDDireccion;\n\t\t\t$this->ExpedidoEn = new CFDDireccion;\n\t\t\t$this->RegimenFiscal = new CFDRegimenFiscal;\n\t\t}", "title": "" }, { "docid": "4238cfa9f65cfb8eed00c5d363d48f21", "score": "0.47682947", "text": "protected function fillContactValidators(){\n $this->setValidator('firstname', new sfValidatorString());\n $this->setValidator('lastname', new sfValidatorString());\n $this->setValidator('companyname', new sfValidatorString());\n $this->setValidator('email', new sfValidatorEmail());\n $this->setValidator('address1', new sfValidatorString());\n $this->setValidator('address2', new sfValidatorString());\n $this->setValidator('city', new sfValidatorString());\n $this->setValidator('state', new sfValidatorString());\n $this->setValidator('postcode', new sfValidatorString());\n $this->setValidator('country', new sfValidatorI18nChoiceCountry());\n $this->setValidator('phonenumber', new sfValidatorString());\n $this->setValidator('generalemails', new sfValidatorBoolean());\n $this->setValidator('productemails', new sfValidatorBoolean());\n $this->setValidator('domainemails', new sfValidatorBoolean());\n $this->setValidator('invoiceemails', new sfValidatorBoolean());\n $this->setValidator('supportemails', new sfValidatorBoolean());\n }", "title": "" }, { "docid": "9ef5bc434bfaeb169897903cfe124e1f", "score": "0.4756055", "text": "function wsf_get_wsdl_dom($wsdl_dom, $wsdl_location, &$is_wsdl_11, &$wsdl_11_dom) {\n require_once('wsf_wsdl_consts.php');\n\n $xslt_wsdl_20_dom = new DOMDocument();\n $xslt_11_to_20_dom = new DOMDocument();\n\n $xslt_wsdl_20_dom->preserveWhiteSpace = FALSE;\n $xslt_11_to_20_dom->preserveWhiteSpace = FALSE;\n $xslt = new XSLTProcessor();\n \n if($wsdl_dom) {\n $child_list = $wsdl_dom->childNodes;\n foreach($child_list as $child) {\n if($child->nodeType != XML_ELEMENT_NODE) {\n continue;\n }\n if($child->localName == WSF_DEFINITION) {\n /* first element local name is definitions, so this is a\n version 1.1 WSDL */\n- $xslt_str = file_get_contents(WSF_WSDL1TO2_XSL_LOCATION, TRUE);\n\n $xslt_wsdl_20_dom->loadXML($xslt_str);\n \n $xslt->importStyleSheet($xslt_wsdl_20_dom);\n\n //clear out the wsdl imports\n $wsdl_dom = wsf_clear_wsdl_imports($wsdl_dom, $wsdl_location);\n $wsdl_dom = wsf_clear_xsd_imports($wsdl_dom, $wsdl_location);\n //$wsdl_dom->preserveWhiteSpace = FALSE;\n\n // we are serialized the dom to a string and convert it back as a string \n // to make sure we give xslt a fresh copy of dom tree\n $wsdl_str = $wsdl_dom->saveXML();\n $wsdl_dom->loadXML($wsdl_str);\n\n \n $xslt_11_to_20_str = $xslt->transformToXML($wsdl_dom);\n $xslt_11_to_20_dom->loadXML($xslt_11_to_20_str);\n\n $wsdl_11_dom = $wsdl_dom;\n\n $is_wsdl_11 = TRUE;\n return $xslt_11_to_20_dom;\n }\n else if ($child->localName == WSF_DESCRIPTION) {\n /* first element local name is description, so this is a\n version 2.0 WSDL */\n $is_wsdl_11 = FALSE;\n return $wsdl_dom;\n }\n else{\n /* echo \"Not a valid WSDL\"; */\n return NULL;\n }\n }\n }\n else\n {\n return NULL;\n }\n}", "title": "" }, { "docid": "41171407a253f77612d9c0869335c435", "score": "0.46512538", "text": "protected function makeSchema()\n {\n $dom = new \\DomDocument();\n $xmlString = file_get_contents($this->xmlSource);\n $dom->loadXML($xmlString);\n $dom->documentURI = $this->xmlSource;\n $dom->xinclude();\n $this->schema = (new SchemaParser)->parse(simplexml_import_dom($dom));\n }", "title": "" }, { "docid": "e10937d09961033e0feaa359147498b7", "score": "0.46102154", "text": "protected function importWSDL()\n {\n if ($this->cacheExists())\n {\n\n }\n else\n {\n $ch = curl_init($this->wsdlPath);\n curl_setopt_array($ch, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_SSL_VERIFYPEER => 0,\n CURLOPT_SSL_VERIFYHOST => 0,\n CURLOPT_HTTPHEADER => array(\n 'Accept: text/xml',\n 'Cache-Control: no-cache',\n 'Pragma: no-cache',\n ),\n ));\n\n if (is_string($this->authType) && $this->authType !== \"\")\n {\n if (stristr($this->authType, 'curlauth') !== false && defined(strtoupper($this->authType)))\n curl_setopt($ch, CURLOPT_HTTPAUTH, constant(strtoupper($this->authType)));\n else if (defined(\"CURLAUTH_\".strtoupper($this->authType)))\n curl_setopt($ch, CURLOPT_HTTPAUTH, constant(\"CURLAUTH_\".strtoupper($this->authType)));\n else\n throw new \\InvalidArgumentException('Unknown CURLAUTH value of \"'.strtoupper($this->authType).'\" requested');\n }\n\n if (is_string($this->user) && $this->user !== \"\" && is_string($this->password) && $this->password !== \"\")\n curl_setopt($ch, CURLOPT_USERPWD, \"{$this->user}:{$this->password}\");\n\n $response = curl_exec($ch);\n $error = curl_error($ch);\n $info = curl_getinfo($ch);\n curl_close($ch);\n\n if ($error !== false && $error !== \"\")\n throw new \\Exception('Error encountered when trying to load WSDL from \"'.$this->wsdlPath.'\": \"'.htmlspecialchars($error).'\"');\n\n $this->curlInfo = $info;\n\n try {\n $this->sxe = new \\SimpleXMLElement($response);\n $this->parseWSDL();\n }\n catch(\\Exception $e) {\n echo $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "93755df63ec888497426a3c064ee4cb5", "score": "0.4540669", "text": "protected function getFileLocatorService()\n {\n return $this->services['file_locator'] = new \\Symfony\\Component\\HttpKernel\\Config\\FileLocator(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel')) && false ?: '_'}, ($this->targetDirs[4].'\\\\app/Resources'), array(0 => ($this->targetDirs[4].'\\\\app')));\n }", "title": "" }, { "docid": "4df51777281a301cf2800c8b9a0f578f", "score": "0.45148638", "text": "function validate_local_info_xml($path)\n{\n // Enable user error handling\n libxml_use_internal_errors(true);\n\n $xml = new DOMDocument();\n\n $xml->load($path);\n\n $xsd = preg_replace('/\\.xml$/', '.xsd', $path);\n\n if (!$xml->schemaValidate($xsd)) {\n throw new Exception(libxml_display_errors());\n }\n\n return;\n}", "title": "" }, { "docid": "6f138923e8c70674f3144b2c8571a7e3", "score": "0.44978783", "text": "public function boot() {\n\t\t$this->app['validator']->extend('pdf', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/pdf' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/pdf' : false;\n\t\t\t}\n\t\t}, trans('validation.pdf'));\n\n\t\t// Office Validation //\n\t\t$this->app['validator']->extend('office', function ($attribute, $value, $parameters) {\n\t\t\t$office_mimes = ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'application/vnd.ms-powerpoint', 'application/vnd.ms-powerpoint.addin.macroenabled.12', 'application/vnd.ms-powerpoint.presentation.macroenabled.12', 'application/vnd.ms-powerpoint.slide.macroenabled.12', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'application/vnd.ms-powerpoint.template.macroenabled.12'];\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\tin_array($data->getMimetype(), $office_mimes) : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\tin_array($value->getMimetype(), $office_mimes) : false;\n\t\t\t}\n\t\t}, trans('validation.office'));\n\n\t\t$this->app['validator']->extend('docx', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' : false;\n\t\t\t}\n\t\t}, trans('validation.docx'));\n\n\t\t$this->app['validator']->extend('xls', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-excel' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-excel' : false;\n\t\t\t}\n\t\t}, trans('validation.xls'));\n\n\t\t$this->app['validator']->extend('xlsx', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' : false;\n\t\t\t}\n\t\t}, trans('validation.xlsx'));\n\n\t\t$this->app['validator']->extend('xltx', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' : false;\n\t\t\t}\n\t\t}, trans('validation.xltx'));\n\n\t\t$this->app['validator']->extend('ppt', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint' : false;\n\t\t\t}\n\t\t}, trans('validation.ppt'));\n\n\t\t$this->app['validator']->extend('ppam', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint.addin.macroenabled.12' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint.addin.macroenabled.12' : false;\n\t\t\t}\n\t\t}, trans('validation.ppam'));\n\n\t\t$this->app['validator']->extend('pptm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint.presentation.macroenabled.12' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint.presentation.macroenabled.12' : false;\n\t\t\t}\n\t\t}, trans('validation.pptm'));\n\n\t\t$this->app['validator']->extend('sldm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint.slide.macroenabled.12' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint.slide.macroenabled.12' : false;\n\t\t\t}\n\t\t}, trans('validation.sldm'));\n\n\t\t$this->app['validator']->extend('ppsm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' : false;\n\t\t\t}\n\t\t}, trans('validation.ppsm'));\n\n\t\t$this->app['validator']->extend('potm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'application/vnd.ms-powerpoint.template.macroenabled.12' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'application/vnd.ms-powerpoint.template.macroenabled.12' : false;\n\t\t\t}\n\t\t}, trans('validation.potm'));\n\t\t// Office Validation //\n\t\t// Audio Validation //\n\t\t$this->app['validator']->extend('mp3', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'audio/mpeg' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'audio/mpeg' : false;\n\t\t\t}\n\t\t}, trans('validation.mp3'));\n\n\t\t$this->app['validator']->extend('adp', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'audio/adpcm' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'audio/adpcm' : false;\n\t\t\t}\n\t\t}, trans('validation.adp'));\n\n\t\t$this->app['validator']->extend('ogg', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'audio/ogg' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'audio/ogg' : false;\n\t\t\t}\n\t\t}, trans('validation.ogg'));\n\n\t\t$this->app['validator']->extend('wav', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'audio/x-wav' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'audio/x-wav' : false;\n\t\t\t}\n\t\t}, trans('validation.wav'));\n\n\t\t$this->app['validator']->extend('xm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'audio/xm' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'audio/xm' : false;\n\t\t\t}\n\t\t}, trans('validation.xm'));\n\n\t\t$this->app['validator']->extend('audio', function ($attribute, $value, $parameters) {\n\t\t\t$audio_mimes = ['audio/xm', 'audio/x-wav', 'audio/ogg', 'audio/adpcm', 'audio/mpeg'];\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\tin_array($data->getMimetype(), $audio_mimes) : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\tin_array($value->getMimetype(), $audio_mimes) : false;\n\t\t\t}\n\t\t}, trans('validation.audio'));\n\n\t\t// Audio Validation //\n\t\t$this->app['validator']->extend('video', function ($attribute, $value, $parameters) {\n\t\t\t$video_mimes = ['video/mp4', 'video/3gpp', 'video/mpeg', 'video/quicktime', 'video/webm', 'video/x-matroska', 'video/x-ms-wmv', 'video/x-msvideo', 'video/video/x-ms-vob'];\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\tin_array($data->getMimetype(), $video_mimes) : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\tin_array($value->getMimetype(), $video_mimes) : false;\n\t\t\t}\n\t\t}, trans('validation.video'));\n\n\t\t$this->app['validator']->extend('mp4', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/mp4' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/mp4' : false;\n\t\t\t}\n\t\t}, trans('validation.mp4'));\n\n\t\t$this->app['validator']->extend('3gp', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/3gpp' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/3gpp' : false;\n\t\t\t}\n\t\t}, trans('validation.3gp'));\n\n\t\t$this->app['validator']->extend('mpeg', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/mpeg' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/mpeg' : false;\n\t\t\t}\n\t\t}, trans('validation.mpeg'));\n\n\t\t$this->app['validator']->extend('mov', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/quicktime' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/quicktime' : false;\n\t\t\t}\n\t\t}, trans('validation.mov'));\n\n\t\t$this->app['validator']->extend('webm', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/webm' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/webm' : false;\n\t\t\t}\n\t\t}, trans('validation.webm'));\n\n\t\t$this->app['validator']->extend('mkv', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/x-matroska' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/x-matroska' : false;\n\t\t\t}\n\t\t}, trans('validation.mkv'));\n\n\t\t$this->app['validator']->extend('wmv', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/x-ms-wmv' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/x-ms-wmv' : false;\n\t\t\t}\n\t\t}, trans('validation.wmv'));\n\n\t\t$this->app['validator']->extend('avi', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/x-msvideo' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/x-msvideo' : false;\n\t\t\t}\n\t\t}, trans('validation.avi'));\n\n\t\t$this->app['validator']->extend('vob', function ($attribute, $value, $parameters) {\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $data) {\n\t\t\t\t\treturn $data->isValid() ?\n\t\t\t\t\t$data->getMimetype() == 'video/video/x-ms-vob' : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn $value->isValid() ?\n\t\t\t\t$value->getMimetype() == 'video/video/x-ms-vob' : false;\n\t\t\t}\n\t\t}, trans('validation.vob'));\n\n\t}", "title": "" }, { "docid": "5534de9e3a52c0b172b718df05c53beb", "score": "0.4453523", "text": "public static function _register()\n {\n self::assignElements([\n 'ShippingInsuranceCost' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ShippingService' => [],\n 'ShippingServiceCost' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ShippingServiceAdditionalCost' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ShippingServicePriority' => ['type' => 'int'],\n 'ExpeditedService' => ['type' => 'bool'],\n 'ShippingTimeMin' => ['type' => 'int'],\n 'ShippingTimeMax' => ['type' => 'int'],\n 'FreeShipping' => ['type' => 'bool'],\n 'LocalPickup' => ['type' => 'bool'],\n 'ImportCharge' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ShippingPackageInfo' => ['type' => 'ShippingPackageInfoType', 'xmlns' => self::XMLNS, 'cardinality' => '0..*'],\n 'ShippingServiceCutOffTime' => [],\n 'LogisticPlanType' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "618007b7190077ba7eab46851c0a88c6", "score": "0.44512653", "text": "function wsf_attach_xsd_imports($wsdl_types_node, $wsdl_dom, $schema_node, $relative_url, &$already_added_xsds) {\n $schema_childs = $schema_node->childNodes;\n\n /* extracting out relative url details */\n $path_parts = pathinfo($relative_url);\n $relative_dir = $path_parts[\"dirname\"].\"/\";\n\n $import_node_array = array();\n\n foreach($schema_childs as $schema_child) {\n if($schema_child->nodeType != XML_ELEMENT_NODE) {\n continue;\n }\n if($schema_child->localName == \"import\" ||\n $schema_child->localName == \"include\") {\n\n $import_node = $schema_child;\n\n if($import_node->attributes && $import_node->attributes->getNamedItem(\"schemaLocation\")) {\n $imported_location = $import_node->attributes->getNamedItem(\"schemaLocation\")->value;\n\n if(strncmp($imported_location, \"http://\", 7) == 0 ||\n strncmp($imported_location, \"https://\", 8) == 0) {\n // then this is a absolute URL and doesn't need to derive again..\n }\n else {\n // derive the absolute url from relative url \n $tmp_relative_url = $relative_dir.$imported_location;\n $imported_location = wsf_normalize_url($tmp_relative_url);\n }\n if(!array_key_exists($imported_location, $already_added_xsds) ||\n $already_added_xsds[$imported_location] == NULL) {\n $already_added_xsds[$imported_location] = TRUE;\n ws_log_write(__FILE__, __LINE__, WSF_LOG_DEBUG, \"importing xsd: $imported_location from: $relative_url\");\n $imported_dom = new DOMDocument();\n $imported_content = file_get_contents($imported_location);\n if($imported_dom->loadXML($imported_content)) {\n $imported_root = $imported_dom->documentElement;\n if($imported_root && $imported_root->nodeType == XML_ELEMENT_NODE &&\n $imported_root->localName == \"schema\") {\n // do the same thing for the imported_schema\n wsf_attach_xsd_imports($wsdl_types_node, $wsdl_dom, $imported_root, $imported_location, $already_added_xsds);\n\n // append the schema to the first wsdl\n wsf_wsdl_append_node($wsdl_types_node, $imported_root, $wsdl_dom);\n // and remove the old node..\n $import_node_array[] = $import_node;\n \n }\n }\n }\n else {\n // still we remove the already imported node\n $import_node_array[] = $import_node;\n ws_log_write(__FILE__, __LINE__, WSF_LOG_DEBUG, \"xsd: $imported_location redeclared to import from: $relative_url\");\n }\n }\n }\n }\n foreach($import_node_array as $import_node) {\n $schema_node->removeChild($import_node);\n }\n}", "title": "" }, { "docid": "53eb148ecc6a665db6dbc1808e5bef7f", "score": "0.4446513", "text": "function __construct() {\n\t\t//username password, origin zip code etc.\n\t\t$this->CI = & get_instance ();\n\t\t$this->CI->lang->load ( 'fedex' );\n\t\t\n\t\t//$this->server = 'https://gatewaybeta.fedex.com/GatewayDC';\n\t\t\n\n\t\t//The WSDL is not included with the sample code.\n\t\t//Please include and reference in $path_to_wsdl variable.\n\t\t$this->path_to_wsdl = APPPATH . \"packages/shipping/fedex/libraries/RateService_v8.wsdl\";\n\t\t\n\t\t// Packaging types\n\t\t$this->package_types ['FEDEX_10KG_BOX'] = lang ( 'FEDEX_10KG_BOX' );\n\t\t$this->package_types ['FEDEX_25KG_BOX'] = lang ( 'FEDEX_25KG_BOX' );\n\t\t$this->package_types ['FEDEX_BOX'] = lang ( 'FEDEX_BOX' );\n\t\t$this->package_types ['FEDEX_ENVELOPE'] = lang ( 'FEDEX_ENVELOPE' );\n\t\t$this->package_types ['FEDEX_PAK'] = lang ( 'FEDEX_PAK' );\n\t\t$this->package_types ['FEDEX_TUBE'] = lang ( 'FEDEX_TUBE' );\n\t\t$this->package_types ['YOUR_PACKAGING'] = lang ( 'YOUR_PACKAGING' );\n\t\t\n\t\t// Available Services\n\t\t$this->service_list ['EUROPE_FIRST_INTERNATIONAL_PRIORITY'] = lang ( 'EUROPE_FIRST_INTERNATIONAL_PRIORITY' );\n\t\t$this->service_list ['FEDEX_1_DAY_FREIGHT'] = lang ( 'FEDEX_1_DAY_FREIGHT' );\n\t\t$this->service_list ['FEDEX_2_DAY'] = lang ( 'FEDEX_2_DAY' );\n\t\t$this->service_list ['FEDEX_2_DAY_FREIGHT'] = lang ( 'FEDEX_2_DAY_FREIGHT' );\n\t\t$this->service_list ['FEDEX_3_DAY_FREIGHT'] = lang ( 'FEDEX_3_DAY_FREIGHT' );\n\t\t$this->service_list ['FEDEX_EXPRESS_SAVER'] = lang ( 'FEDEX_EXPRESS_SAVER' );\n\t\t$this->service_list ['FEDEX_GROUND'] = lang ( 'FEDEX_GROUND' );\n\t\t$this->service_list ['FIRST_OVERNIGHT'] = lang ( 'FIRST_OVERNIGHT' );\n\t\t$this->service_list ['GROUND_HOME_DELIVERY'] = lang ( 'GROUND_HOME_DELIVERY' );\n\t\t$this->service_list ['INTERNATIONAL_ECONOMY'] = lang ( 'INTERNATIONAL_ECONOMY' );\n\t\t$this->service_list ['INTERNATIONAL_ECONOMY_FREIGHT'] = lang ( 'INTERNATIONAL_ECONOMY_FREIGHT' );\n\t\t$this->service_list ['INTERNATIONAL_FIRST'] = lang ( 'INTERNATIONAL_FIRST' );\n\t\t$this->service_list ['INTERNATIONAL_PRIORITY'] = lang ( 'INTERNATIONAL_PRIORITY' );\n\t\t$this->service_list ['INTERNATIONAL_PRIORITY_FREIGHT'] = lang ( 'INTERNATIONAL_PRIORITY_FREIGHT' );\n\t\t$this->service_list ['PRIORITY_OVERNIGHT'] = lang ( 'PRIORITY_OVERNIGHT' );\n\t\t$this->service_list ['SMART_POST'] = lang ( 'SMART_POST' );\n\t\t$this->service_list ['STANDARD_OVERNIGHT'] = lang ( 'STANDARD_OVERNIGHT' );\n\t\t$this->service_list ['FEDEX_FREIGHT'] = lang ( 'FEDEX_FREIGHT' );\n\t\t$this->service_list ['FEDEX_NATIONAL_FREIGHT'] = lang ( 'FEDEX_NATIONAL_FREIGHT' );\n\t\t$this->service_list ['INTERNATIONAL_GROUND'] = lang ( 'INTERNATIONAL_GROUND' );\n\t\n\t}", "title": "" }, { "docid": "fc5effa1804f821b48d4d9dae63e68da", "score": "0.44416022", "text": "protected function __construct()\n {\n parent::__construct(new BaseNamespaceClassLocator(AbstractEvent::COMMON_NS_SUFFIX, 'FF'));\n }", "title": "" }, { "docid": "c4c7c15bea9f3971f5c7244ab12e7b21", "score": "0.44325247", "text": "public function __construct()\n {\n $this->rules = require __DIR__ . '/../resources/formats.php';\n }", "title": "" }, { "docid": "d1ad9061db68a33dc51e2ba08807bbc3", "score": "0.44128647", "text": "public function validatorFactory();", "title": "" }, { "docid": "71090e99ebf55bbc5bc7128619ae8fb5", "score": "0.4395924", "text": "public function __construct()\n {\n $this->registerNamespace('gd',\n 'http://schemas.google.com/g/2005');\n $this->registerNamespace('openSearch',\n 'http://a9.com/-/spec/opensearchrss/1.0/', 1, 0);\n $this->registerNamespace('openSearch',\n 'http://a9.com/-/spec/opensearch/1.1/', 2, 0);\n $this->registerNamespace('rss',\n 'http://blogs.law.harvard.edu/tech/rss');\n\n parent::__construct();\n }", "title": "" }, { "docid": "f18343194119aef484f66569e6c12e59", "score": "0.4388226", "text": "function __construct($getWSDL = false, $debug = false, $params = null) \n\t{\n\t\t$tenantTokens = array();\n\t\t$config = false;\n\n\t\t$this->xmlLoc = 'ExactTargetWSDL.xml';\n\n\t\tif (file_exists(realpath(\"config.php\")))\n\t\t\t$config = include 'config.php';\n\n\t\tif ($config)\n\t\t{\n\t\t\t$this->wsdlLoc = $config['defaultwsdl'];\n\t\t\t$this->clientId = $config['clientid'];\n\t\t\t$this->clientSecret = $config['clientsecret'];\n\t\t\t$this->appsignature = $config['appsignature'];\n\t\t\t$this->baseAuthUrl = $config[\"baseAuthUrl\"];\n\t\t\tif (array_key_exists('baseSoapUrl', $config)) {\n\t\t\t\tif (!empty($config[\"baseSoapUrl\"])) {\n\t\t\t\t\t$this->baseSoapUrl = $config[\"baseSoapUrl\"];\n\t\t\t\t} else {\n\t\t\t\t\t$this->baseSoapUrl = $this->defaultBaseSoapUrl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('useOAuth2Authentication', $config)){$this->useOAuth2Authentication = $config['useOAuth2Authentication'];}\n\t\t\tif(array_key_exists(\"baseUrl\", $config))\n\t\t\t{\n\t\t\t\t$this->baseUrl = $config[\"baseUrl\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->isNullOrEmptyString($this->useOAuth2Authentication) || $this->useOAuth2Authentication === false) {\n\t\t\t\t\tthrow new Exception(\"baseUrl is null: Must be provided in config file when instantiating ET_Client\");\n\t\t\t\t}\n\t\t\t}\n if (array_key_exists('accountId', $config)){$this->accountId = $config['accountId'];}\n\n if (array_key_exists('applicationType', $config))\n {\n \t$this->applicationType = $config['applicationType'];\n }\n\t\t\tif (array_key_exists('redirectURI', $config))\n\t\t\t{\n\t\t\t\t$this->redirectURI = $config['redirectURI'];\n\t\t\t}\n\t\t\tif (array_key_exists('authorizationCode', $config))\n\t\t\t{\n\t\t\t\t$this->authorizationCode = $config['authorizationCode'];\n\t\t\t}\n\n if (array_key_exists('scope', $config)){$this->scope = $config['scope'];}\n\n\t\t\tif (array_key_exists('xmlloc', $config)){$this->xmlLoc = $config['xmlloc'];}\n\n\t\t\tif(array_key_exists('proxyhost', $config)){$this->proxyHost = $config['proxyhost'];}\n\t\t\tif (array_key_exists('proxyport', $config)){$this->proxyPort = $config['proxyport'];}\n\t\t\tif (array_key_exists('proxyusername', $config)){$this->proxyUserName = $config['proxyusername'];}\n\t\t\tif (array_key_exists('proxypassword', $config)){$this->proxyPassword = $config['proxypassword'];}\n\t\t\tif (array_key_exists('sslverifypeer', $config)){$this->sslVerifyPeer = $config['sslverifypeer'];}\n\t\t} \n\t\tif ($params) \n\t\t{\n\t\t\tif (array_key_exists('defaultwsdl', $params)){$this->wsdlLoc = $params['defaultwsdl'];}\n\t\t\telse {$this->wsdlLoc = \"https://webservice.exacttarget.com/etframework.wsdl\";}\n\t\t\tif (array_key_exists('clientid', $params)){$this->clientId = $params['clientid'];}\n\t\t\tif (array_key_exists('clientsecret', $params)){$this->clientSecret = $params['clientsecret'];}\n\t\t\tif (array_key_exists('appsignature', $params)){$this->appsignature = $params['appsignature'];}\n\t\t\tif (array_key_exists('xmlloc', $params)){$this->xmlLoc = $params['xmlloc'];}\n\n\t\t\tif (array_key_exists('proxyhost', $params)){$this->proxyHost = $params['proxyhost'];}\n\t\t\tif (array_key_exists('proxyport', $params)){$this->proxyPort = $params['proxyport'];}\n\t\t\tif (array_key_exists('proxyusername', $params)) {$this->proxyUserName = $params['proxyusername'];}\n\t\t\tif (array_key_exists('proxypassword', $params)) {$this->proxyPassword = $params['proxypassword'];}\n\t\t\tif (array_key_exists('sslverifypeer', $params)) {$this->sslVerifyPeer = $params['sslverifypeer'];}\n\t\t\tif (array_key_exists('baseUrl', $params))\n\t\t\t{\n\t\t\t\t$this->baseUrl = $params['baseUrl'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->baseUrl = \"https://www.exacttargetapis.com\";\n\t\t\t}\n\t\t\tif (array_key_exists('baseAuthUrl', $params))\n\t\t\t{\n\t\t\t\t$this->baseAuthUrl = $params['baseAuthUrl'];\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->baseAuthUrl = \"https://auth.exacttargetapis.com\";\n\t\t\t}\n\t\t\tif (array_key_exists('baseSoapUrl', $params))\n\t\t\t{\n\t\t\t\tif (!empty($params[\"baseSoapUrl\"])) {\n\t\t\t\t\t$this->baseSoapUrl = $params['baseSoapUrl'];\n\t\t\t\t} else {\n $this->baseSoapUrl = $this->defaultBaseSoapUrl;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (array_key_exists('useOAuth2Authentication', $params))\n\t\t\t{\n $this->useOAuth2Authentication = $params['useOAuth2Authentication'];\n\t\t\t}\n if (array_key_exists('accountId', $params))\n {\n $this->accountId = $params['accountId'];\n }\n if (array_key_exists('scope', $params))\n {\n $this->scope = $params['scope'];\n }\n\t\t\tif (array_key_exists('applicationType', $params))\n\t\t\t{\n\t\t\t\t$this->applicationType = $params['applicationType'];\n\t\t\t}\n\t\t\tif (array_key_exists('redirectURI', $params))\n\t\t\t{\n\t\t\t\t$this->redirectURI = $params['redirectURI'];\n\t\t\t}\n\t\t\tif (array_key_exists('authorizationCode', $params))\n\t\t\t{\n\t\t\t\t$this->authorizationCode = $params['authorizationCode'];\n\t\t\t}\n\t\t}\n\n\t\t$this->debugSOAP = $debug;\n\n\t\tif (empty($this->applicationType)){\n\t\t\t$this->applicationType = 'server';\n\t\t}\n\n\t\tif($this->applicationType == 'public' || $this->applicationType == 'web'){\n\t\t\tif (empty($this->redirectURI) || empty($this->authorizationCode)){\n\t\t\t\tthrow new Exception('redirectURI or authorizationCode is null: Must be provided in config file or passed when instantiating ET_Client');\n\t\t\t}\n\t\t}\n\n\t\tif($this->applicationType == 'public'){\n\t\t\tif (empty($this->clientId)){\n\t\t\t\tthrow new Exception('clientid is null: Must be provided in config file or passed when instantiating ET_Client');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (empty($this->clientId) || empty($this->clientSecret)) {\n\t\t\t\tthrow new Exception('clientid or clientsecret is null: Must be provided in config file or passed when instantiating ET_Client');\n\t\t\t}\n\t\t}\n\n\t\tif ($getWSDL){$this->CreateWSDL($this->wsdlLoc);}\n\t\t\n\t\tif ($params && array_key_exists('jwt', $params)){\n\t\t\tif (!property_exists($this,'appsignature') || is_null($this->appsignature)){\n\t\t\t\tthrow new Exception('Unable to utilize JWT for SSO without appsignature: Must be provided in config file or passed when instantiating ET_Client');\n\t\t\t}\n\t\t\t$decodedJWT = JWT::decode($params['jwt'], $this->appsignature);\n\t\t\t$dv = new DateInterval('PT'.$decodedJWT->request->user->expiresIn.'S');\n\t\t\t$newexpTime = new DateTime();\n\t\t\t$this->setAuthToken($this->tenantKey, $decodedJWT->request->user->oauthToken, $newexpTime->add($dv));\n\t\t\t$this->setInternalAuthToken($this->tenantKey, $decodedJWT->request->user->internalOauthToken);\n\t\t\t$this->setRefreshToken($this->tenantKey, $decodedJWT->request->user->refreshToken);\n\t\t\t$this->packageName = $decodedJWT->request->application->package;\n\t\t}\t\t\n\t\t$this->refreshToken();\n\n\t\tif ($this->baseSoapUrl) {\n $this->endpoint = $this->baseSoapUrl;\n\t\t} else {\n $cache = new ET_CacheService($this->clientId, $this->clientSecret);\n $cacheData = $cache->get();\n if (!is_null($cacheData) && $cacheData->url) {\n $this->endpoint = $cacheData->url;\n } else {\n try {\n $url = $this->baseUrl.\"/platform/v1/endpoints/soap\";\n $endpointResponse = ET_Util::restGet($url, $this, $this->getAuthToken($this->tenantKey));\n $endpointObject = json_decode($endpointResponse->body);\n if ($endpointObject && property_exists($endpointObject,\"url\")){\n $this->endpoint = $endpointObject->url;\n } else {\n $this->endpoint = $this->defaultBaseSoapUrl;\n }\n } catch (Exception $e) {\n $this->endpoint = $this->defaultBaseSoapUrl;\n }\n $cache->write($this->endpoint);\n }\n\t\t}\n\n $context = stream_context_create([\n 'ssl' => [\n 'verify_peer' => ET_Util::shouldVerifySslPeer($this->sslVerifyPeer)\n ]\n ]);\n\n $soapOptions = array(\n\t\t\t'stream_context' => $context\n );\n if (!empty($this->proxyHost)) {\n $soapOptions['proxy_host'] = $this->proxyHost;\n }\n if (!empty($this->proxyPort)) {\n $soapOptions['proxy_port'] = $this->proxyPort;\n }\n if (!empty($this->proxyUserName)) {\n $soapOptions['proxy_username'] = $this->proxyUserName;\n }\n if (!empty($this->proxyPassword)) {\n $soapOptions['proxy_password'] = $this->proxyPassword;\n }\n\t\tparent::__construct($this->xmlLoc, $soapOptions);\n\n\t\tparent::__setLocation($this->endpoint);\n\t}", "title": "" }, { "docid": "bec5278d089426cad10739ea230f7e20", "score": "0.43844053", "text": "function di_service_locator_file(string $path): ServiceLocatorInterface\n{\n return new FileServiceLocator($path);\n}", "title": "" }, { "docid": "67b7b3bdb629180428161e2076577d7a", "score": "0.4379947", "text": "function initConfigDigester() {\r\n\r\n\t\t// Do we have an existing instance?\r\n\t\tif($this->digester != NULL) {\r\n\t\t\treturn $this->digester;\r\n\t\t}\r\n\r\n\t\t// Create and return a new Digester instance\r\n\t\t$digester = new Digester();\r\n\t\t#$this->log->setLog('isDebugEnabled', 1); // see also: Digester constructor\r\n\r\n\t\t// Setup Digester behavour\r\n\t\t#$digester->setProperty('log', $this->log);\t\t\t\t// ref\r\n\t\t#$digester->setProperty('saxLog', $this->saxLog);\t\t// ref\r\n\t\t#$digester->setProperty('namespaceAware', 'False'); // NS not yet supported\r\n\t\t$digester->setValidating($this->validating);\r\n\t\t#$digester->setUseContextClassLoader(True);\t// !!!\r\n\r\n\t\t// XML parser case folding - False leaves case unchanged\r\n\t\t$digester->parserSetOption(XML_OPTION_CASE_FOLDING, $this->parserCaseFolding);\r\n\t\t\r\n\t\t// Set of config rules. See: WEB-INF/classes/phpmvc/config/ConfigRuleSet.php\r\n\t\t$digester->addRuleSet(new ConfigRuleSet());\t\r\n\t\t// Set of DTD locations\r\n\t\t#foreach($this->registrations as $registration) {\r\n\t\t#\t// refer Struts source\r\n\t\t#\t// ...\r\n\t\t#}\r\n\r\n\t\t$this->digester = $digester;\r\n\r\n\t}", "title": "" }, { "docid": "4bf611ebebc277e8123cd86f55ad207e", "score": "0.4369006", "text": "protected function getSchema() {\r\n\t\t// determine schema by looking for xsi:schemaLocation\r\n\t\t$this->schema = $this->document->documentElement->getAttributeNS($this->document->documentElement->lookupNamespaceURI('xsi'), 'schemaLocation');\r\n\t\t\r\n\t\t// no valid schema found or it's lacking a valid namespace\r\n\t\tif (strpos($this->schema, ' ') === false) {\r\n\t\t\tthrow new SystemException(\"XML document '\".$this->path.\"' does not provide a valid schema.\");\r\n\t\t}\r\n\t\t\r\n\t\t// build file path upon namespace and filename\r\n\t\t$tmp = explode(' ', $this->schema);\r\n\t\t$this->schema = WCF_DIR.'xsd/'.StringUtil::substring(sha1($tmp[0]), 0, 8) . '_' . basename($tmp[1]);\r\n\t\t\r\n\t\tif (!file_exists($this->schema) || !is_readable($this->schema)) {\r\n\t\t\tthrow new SystemException(\"Could not read XML schema definition located at '\".$this->schema.\"'.\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dabc7ea45f6543aef9bf80260bd74e89", "score": "0.4348627", "text": "public function __construct()\n\t{\n\t\t$this->mime_type = new MimeType();\n\n\t\t$whitelist = ee()->config->loadFile('mimes');\n\n\t\t$this->mime_type->addMimeTypes($whitelist);\n\n\t\t// Add any mime types from the config\n\t\t$extra_mimes = ee()->config->item('mime_whitelist_additions');\n\t\tif ($extra_mimes !== FALSE)\n\t\t{\n\t\t\tif (is_array($extra_mimes))\n\t\t\t{\n\t\t\t\t$this->mime_type->addMimeTypes($extra_mimes);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->mime_type->addMimeTypes(explode('|', $extra_mimes));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b87a97f0d81a521d6af94f1ca3b7088", "score": "0.429949", "text": "public function __construct($resource)\n {\n parent::__construct($resource);\n\n $this->validator = new CardanoAddress();\n }", "title": "" }, { "docid": "e548a17efb4b692de9d423ff3f4f8922", "score": "0.42973658", "text": "public function __construct()\n {\n $this->services = new ServicesList();\n $this->services = $this->services->getServices();\n $this->marc21Mapping = Marc21Mapping::$marc21Mapping;\n }", "title": "" }, { "docid": "7adb4a6445946f6392229f9cbafee553", "score": "0.42920882", "text": "public function validate()\n {\n if ($this->modified)\n {\n // create document\n $this->create();\n }\n\n $doc = new DomDocument;\n\n // find xml schema\n $xmlschema = Kohana::find_file('views', 'schema', 'xsd');\n\n // Load the xml document\n $doc->loadXML($this->wsdl->asXML());\n\n // Validate the XML file against the schema\n return $doc->schemaValidate($xmlschema);\n }", "title": "" }, { "docid": "1d41cca2d308a95f738166e1dc5b071b", "score": "0.42849538", "text": "public function testGetExternalSchemasScd(): void\n {\n $tagIncludeParser = self::partnerInstanceParserScd();\n\n $tagIncludeParser->parse();\n\n $schemaContainer = new SchemaContainer($tagIncludeParser->getGenerator());\n\n $schema1Path = realpath(__DIR__.'/../../resources/docdatapayments/1_3.1.xsd');\n $schema1 = new Schema($tagIncludeParser->getGenerator(), $schema1Path, file_get_contents($schema1Path));\n $schemaContainer->add($schema1);\n\n $schema2Path = realpath(__DIR__.'/../../resources/docdatapayments/1_3.2.xsd');\n $schema2 = new Schema($tagIncludeParser->getGenerator(), $schema2Path, file_get_contents($schema2Path));\n $schemaContainer->add($schema2);\n\n $this->assertCount($schemaContainer->count(), $tagIncludeParser->getGenerator()->getWsdl()->getContent()->getExternalSchemas());\n }", "title": "" }, { "docid": "d2831844747e3d429997ffbf209c91d4", "score": "0.42823103", "text": "public function validate() {\r\n\t\t// determine schema\r\n\t\t$this->getSchema();\r\n\t\t\r\n\t\t// validate document against schema\r\n\t\t$this->document->schemaValidate($this->schema);\r\n\t\t\r\n\t\t// check for errors occured in libxml\r\n\t\t$errors = $this->pollErrors();\r\n\t\tif (count($errors)) {\r\n\t\t\t$this->throwException(\"XML document '\".$this->path.\"' violates XML schema definition.\", $errors);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6584f261db86b7da4e739c7d131a6003", "score": "0.42815977", "text": "abstract protected function initADTDefinition();", "title": "" }, { "docid": "597ec92c4adb0fa297c808ff25e1573b", "score": "0.42743626", "text": "function validationFactory($class_file, $conf = array()) {\n\t\t\n\t\treturn owa_coreAPI::validationFactory($class_file, $conf);\t\t\n\t}", "title": "" }, { "docid": "878c942b2a10185f8a91426549caaad4", "score": "0.427423", "text": "public function __construct() {\n\t\t$stylesheet_url = preg_replace( '/(^http[s]?:)/', '', $this->get_xsl_url() );\n\t\t$this->stylesheet = '<?xml-stylesheet type=\"text/xsl\" href=\"' . esc_url( $stylesheet_url ) . '\"?>';\n\t\t$this->charset = get_bloginfo( 'charset' );\n\t\t$this->output_charset = $this->charset;\n\t\t$this->timezone = new WPSEO_Sitemap_Timezone();\n\n\t\tif (\n\t\t\t'UTF-8' !== $this->charset\n\t\t\t&& function_exists( 'mb_list_encodings' )\n\t\t\t&& in_array( $this->charset, mb_list_encodings(), true )\n\t\t) {\n\t\t\t$this->output_charset = 'UTF-8';\n\t\t}\n\n\t\t$this->needs_conversion = $this->output_charset !== $this->charset;\n\t}", "title": "" }, { "docid": "c9ec46da58b63bd1e35a25fd0581100a", "score": "0.42671973", "text": "public function initWeathergccamarine()\n {\n //https://weather.gc.ca/marine/forecast_e.html?mapID=02&siteID=07010\n\n $this->allowed_lightstations_resource =\n \"weathergccamarine/weathergccamarine.php\";\n $lightstations_endpoints = [];\n if (\n file_exists(\n $this->resource_path . $this->allowed_lightstations_resource\n )\n ) {\n $allowed_lightstations = require $this->resource_path .\n $this->allowed_lightstations_resource;\n }\n }", "title": "" }, { "docid": "c3d292d47f408da9edca75d0cdcdc114", "score": "0.42590362", "text": "public function providerCfdiToCadenaOrigen(): array\n {\n return [\n ['cfdi32-real.xml', 'cfdi32-real-cadenaorigen.txt', CfdiDefaultLocations::XSLT_32],\n ['cfdi33-real.xml', 'cfdi33-real-cadenaorigen.txt', CfdiDefaultLocations::XSLT_33],\n ];\n }", "title": "" }, { "docid": "00ad7e3f9babe0ee4bcd80a318f24797", "score": "0.42570746", "text": "public function init() {\n $this->_validator = new Validator($this, $this->getRules());\n }", "title": "" }, { "docid": "2832fc6b9e433ba2f593628196550305", "score": "0.42535606", "text": "public function __construct()\n {\n parent::__construct();\n $this->securityScanner = XmlScanner::getInstance($this);\n }", "title": "" }, { "docid": "f0eadbbbd0f31277b98ec5010780aa81", "score": "0.42521492", "text": "public function __construct() {\n\t\t$this->loadMimeTypes();\n\t\t$this->loadImageTypes();\n\t}", "title": "" }, { "docid": "641b597ffaef6abe9417357a4892a1cb", "score": "0.42498007", "text": "public function __construct($_personInfo = NULL,$_fileDt = NULL,$_filingState = NULL,$_filingNum = NULL,$_origDtFiled = NULL,$_origNum = NULL,$_collateralDesc = NULL,$_filingCount = NULL,$_documentCount = NULL)\n {\n MicrobiltWsdlClass::__construct(array('PersonInfo'=>$_personInfo,'FileDt'=>$_fileDt,'FilingState'=>$_filingState,'FilingNum'=>$_filingNum,'OrigDtFiled'=>$_origDtFiled,'OrigNum'=>$_origNum,'CollateralDesc'=>$_collateralDesc,'FilingCount'=>$_filingCount,'DocumentCount'=>$_documentCount),false);\n }", "title": "" }, { "docid": "27710546e2065080fa40af14a948b12c", "score": "0.424678", "text": "public function __construct(ConfigFactoryInterface $config_factory, PathValidatorInterface $path_validator, RendererInterface $renderer) {\n parent::__construct($config_factory);\n $this->pathValidator = $path_validator;\n $this->renderer = $renderer;\n }", "title": "" }, { "docid": "e1eb152b8a6ad0f42950202f8801271c", "score": "0.42301956", "text": "function ___construct()\n {\n\n $this->setupNamespaces();\n\n //report template directory\n $this->templateDir = SITE_PATH.\"/config/openoffice/templates/asterisk-billing\";\n \n //setup our temp directory\n $this->tmpDir = TMP_DIR.\"/\".USER_LOGIN.\"/reports\";\n recurmkdir($this->tmpDir);\n\n //load the content.xml file into DOM\n $this->content = new DOMDocument();\n $this->content->preserveWhitespace = true;\n $this->content->formatOutput = true;\n $this->content->substituteEntities = true;\n $this->content->load($this->templateDir.\"/content.xml\");\n $this->ce = $this->content->documentElement;\n \n //get the main place for storing content\n $b = $this->ce->getElementsByTagNameNS($this->officeNS,\"text\");\n $this->body = $b->item(0);\n\n $b = $this->ce->getElementsByTagNameNS($this->officeNS,\"automatic-styles\");\n $this->automaticstyles = $b->item(0);\n\n //our file manifest\n $this->manifest = new DOMDocument();\n $this->manifest->preserveWhitespace = true;\n $this->manifest->formatOutput = true;\n $this->manifest->substituteEntities = true;\n $this->manifest->load($this->templateDir.\"/META-INF/manifest.xml\");\n $this->me = $this->manifest->documentElement;\n\n //keep track of how many tables we have made\n $this->tableCount = 0;\n\n //keep track of images added\n $this->images = array();\n\n //load the styles.xml file into DOM\n $this->styles = new DOMDocument();\n $this->styles->preserveWhitespace = true;\n $this->styles->formatOutput = true;\n $this->styles->substituteEntities = true;\n $this->styles->load($this->templateDir.\"/styles.xml\");\n $this->se = $this->styles->documentElement;\n\n //get the main place for storing content\n $b = $this->se->getElementsByTagNameNS($this->styleNS,\"master-page\");\n $this->masterpage = $b->item(0);\n\n\n }", "title": "" }, { "docid": "c462ca540488196312330a0a54510aa8", "score": "0.42244232", "text": "private function init() {\n\t\t$this->request = $_REQUEST[$this->designator];\n\n\t\ttslib_eidtools::connectDB();\n\t\t$GLOBALS['TSFE']->fe_user = tslib_eidtools::initFeUser();\n\n\t\t$this->cObj = t3lib_div::makeInstance('tslib_cObj');\n\t\t$this->cObj->data['uid'] = (int) $this->request['pluginid'];\n\n\t\t$fieldInfos = str_replace(array($this->designator . '[check][', ']'), '', htmlspecialchars($this->request['name']));\n\t\tlist($table, $uid) = explode('[', $fieldInfos);\n\n\t\t$this->settings = array(\n\t\t\t'fe_user' => (int) $GLOBALS['TSFE']->fe_user->user['uid'],\n\t\t\t'record_id' => (int) $uid,\n\t\t\t'record_table' => $table,\n\t\t\t'plugin_id' => (int) $this->request['pluginid'],\n\t\t);\n\n\t\tif ($this->debug) {\n\t\t\t$GLOBALS['TYPO3_DB']->debugOutput = 1;\n\t\t}\n\t}", "title": "" }, { "docid": "6742c129467d53d50094e5ce7669937a", "score": "0.4222857", "text": "public function setupValidation() {\n $this->validateCatalog('webbilleder',0, 4294967296-1);\n $this->validateCatalog('samlingsbilleder', 4294967296, 8589934592-1);\n $this->validateCatalog('billedarkivet', 8589934592, 12884901888-1);\n $this->validateCatalog('online master arkiv', 12884901888, 17179869184-1);\n }", "title": "" }, { "docid": "4d2afa889f92c5fa483446e59a0d9fa5", "score": "0.422208", "text": "protected function createCDFI($data)\n {\n try {\n $path = storage_path('app/public/csd_sat/cer');\n $pathkey = storage_path('app/public/csd_sat/key');\n \n $fileCer = Auth::user()->bussine->certificate;\n $fileKey = Auth::user()->bussine->key_private;\n \n $certificate = new \\CfdiUtils\\Certificado\\Certificado($path.'/'.$fileCer);\n \n /** Preparando los datos para la creacion del XML */\n $cfdiRelations = $this->preparedCfdiRelation($data);\n $concepts = $this->preparedingConcepts($data);\n $attributesHeader = $this->preparedingHead($data);\n $emitor = $this->preparedingEmitor();\n $receptor = $this->preparedingReceptor($data);\n \n $creator = new \\CfdiUtils\\CfdiCreator33($attributesHeader, $certificate);\n \n $comprobante = $creator->comprobante();\n\n if(!empty($cfdiRelations)){\n $comprobante->addCfdiRelacionados([\n 'TipoRelacion' => $cfdiRelations[0]['TipoRelacion']\n ]);\n\n foreach($cfdiRelations as $item){ \n $comprobante->addCfdiRelacionado([\n 'UUID' => $item['UUID']\n ]);\n }\n }\n\n $comprobante->addEmisor($emitor);\n $comprobante->addReceptor($receptor);\n \n /** Crear Conceptos con sus respectivos Impuestos */\n $impuestosCfdi = [];\n $impuestosTrasladados = [];\n $impuestosRetenidos = [];\n foreach ($concepts as $concept) {\n $conceptos = $comprobante->addConcepto([\n 'ClaveProdServ' => $concept['ClaveProdServ'],\n 'Cantidad' => $concept['Cantidad'],\n 'ClaveUnidad' => $concept['ClaveUnidad'],\n //'Unidad' => $concept['Unidad'],\n 'Descripcion' => $concept['Descripcion'],\n 'ValorUnitario' => $concept['ValorUnitario'],\n 'Importe' => $concept['Importe'],\n 'Descuento' => $concept['Descuento'],\n ]);\n\n if (isset($concept['Impuestos']) && count($concept['Impuestos']) > 0) {\n foreach($concept['Impuestos'] as $tax) {\n if($tax['Type'] == 'traslado') {\n\n $addTraslado = [\n 'Base' => $tax['Base'],\n 'Impuesto' => $tax['Impuesto'],\n 'TipoFactor' => $tax['TipoFactor']\n ];\n if($tax['TipoFactor'] != 'Exento'){\n $addTraslado['TasaOCuota'] = $tax['TasaOCuota'];\n $addTraslado['Importe'] = $tax['Importe'];\n }\n\n $conceptos->addTraslado($addTraslado);\n\n $searchTax = array_search($tax['Impuesto'], array_column($impuestosTrasladados, 'Impuesto'));\n $searchTypeOFactor = array_search($tax['TipoFactor'], array_column($impuestosTrasladados, 'TipoFactor'));\n $searchTasaOCuota = array_search($tax['TasaOCuota'], array_column($impuestosTrasladados, 'TasaOCuota'));\n\n if($searchTax !== false \n && $searchTypeOFactor !== false \n && $searchTasaOCuota !== false\n && $searchTax == $searchTypeOFactor\n && $searchTax == $searchTasaOCuota\n && $searchTypeOFactor == $searchTasaOCuota\n ){\n $index = $searchTax;\n $impuestosTrasladados[$index]['Importe'] = bcdiv($impuestosTrasladados[$index]['Importe'] + $tax['Importe'], '1', 2);\n }else{\n if($tax['TipoFactor'] != 'Exento'){\n $addTraslado = [\n 'Impuesto' => $tax['Impuesto'],\n 'TipoFactor' => $tax['TipoFactor']\n ];\n \n $addTraslado['TasaOCuota'] = $tax['TasaOCuota'];\n $addTraslado['Importe'] = bcdiv($tax['Importe'], '1', 2);\n \n array_push($impuestosTrasladados, $addTraslado);\n }\n }\n\n unset($addTraslado);\n }else{\n $conceptos->addRetencion([\n 'Base' => $tax['Base'],\n 'Impuesto' => $tax['Impuesto'],\n 'TipoFactor' => $tax['TipoFactor'],\n 'TasaOCuota' => $tax['TasaOCuota'],\n 'Importe' => $tax['Importe'],\n ]);\n\n $searchTax = array_search($tax['Impuesto'], array_column($impuestosRetenidos, 'Impuesto'));\n\n if($searchTax !== false){\n $index = $searchTax;\n $impuestosRetenidos[$index]['Importe'] = bcdiv($impuestosRetenidos[$index]['Importe'] + $tax['Importe'], '1', 2);\n }else{\n array_push($impuestosRetenidos, [\n 'Impuesto' => $tax['Impuesto'],\n 'Importe' => bcdiv($tax['Importe'], '1', 2)\n ]);\n }\n }\n }\n } \n }\n\n /** Crear Impuestos en el comprobante */\n if (count($impuestosTrasladados) > 0 || count($impuestosRetenidos) > 0) {\n if($this->SUM_TOTAL_TAXES_TRASLADADOS != 0){\n $impuestosCfdi['TotalImpuestosTrasladados'] = $this->SUM_TOTAL_TAXES_TRASLADADOS;\n }\n if($this->SUM_TOTAL_TAXES_RETENIDOS != 0){\n $impuestosCfdi['TotalImpuestosRetenidos'] = $this->SUM_TOTAL_TAXES_RETENIDOS;\n }\n\n $comprobante->addImpuestos($impuestosCfdi);\n if (count($impuestosTrasladados) > 0) {\n foreach ($impuestosTrasladados as $result) {\n $comprobante->multiTraslado($result);\n }\n }\n\n if (count($impuestosRetenidos) > 0) {\n foreach ($impuestosRetenidos as $result) {\n $comprobante->multiRetencion($result);\n }\n }\n } \n\n $filePem = Storage::disk('key')->get($fileKey.'.pem');\n $creator->addSello($filePem, Auth::user()->bussine->password);\n \n $asserts = $creator->validate();\n if ($asserts->hasErrors()) {\n $err = [];\n foreach ($asserts->errors() as $error) {\n $err[] = [\n $error->getCode(),\n $error->getStatus(),\n $error->getTitle(),\n $error->getExplanation(),\n ];\n } \n }\n \n /** Nombre de archivo no timbrado */\n $fileName = time() . '_' . Auth::user()->bussine->rfc . '_UNSIGNED.xml'; \n Storage::disk('xml')->put($fileName ,$creator->asXml()); \n return $fileName; \n } catch (\\Throwable $err) {\n return false;\n } \n\n }", "title": "" }, { "docid": "cad748f1402ba38f688116202c3291dd", "score": "0.42184", "text": "public static function getFileLocator(): FileLocator\n {\n $resourcesFolder = static::getResourcesFolder();\n return new FileLocator([\n $resourcesFolder,\n $resourcesFolder . '/routing',\n $resourcesFolder . '/config',\n ]);\n }", "title": "" }, { "docid": "b980502c5c56f64c58c9af35cabf976c", "score": "0.42134798", "text": "function __construct(&$xmlArr)\n {\n $this->readMetadata($xmlArr);\n $this->inheritParentObj();\n $this->formHelper = new FormHelper($this);\n }", "title": "" }, { "docid": "5e570b6fa5095080bb41a737dd759c0e", "score": "0.42093393", "text": "private function getSchema() {\n // Get XSD contents\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, self::FB2B_XSD_PATH);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_COOKIEFILE, '');\n $res = curl_exec($ch);\n curl_close($ch);\n unset($ch);\n\n // Save to disk\n $path = self::OUTPUT_DIR . \"/faceb2b.xsd\";\n file_put_contents($path, $res);\n\n return $path;\n }", "title": "" }, { "docid": "bcddd6f2db4a162f819db21f5b9dae58", "score": "0.4209126", "text": "public static function _register()\n {\n self::assignElements([\n 'CalculatedShippingAmountForEntireOrder' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'CalculatedShippingChargeOption' => ['type' => 'CalculatedShippingChargeOptionCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'CalculatedShippingRateOption' => ['type' => 'CalculatedShippingRateOptionCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'InsuranceOption' => ['type' => 'InsuranceOptionCodeType', 'enum' => true, 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "94bee6864a6f245e98560ea6a95a5fdd", "score": "0.42060164", "text": "public function initDirectorio() {\n $this->wsdl = \"services/serviceDirectorio.asmx?WSDL\";\n }", "title": "" }, { "docid": "13a1ad65affd43ddaa5d3ce7de0b2225", "score": "0.4205048", "text": "public function __construct($request = null)\n {\n\n if (!$request)\n return null;\n\n if ($element = $request->param('element', Validator::CKEY))\n $this->element = $element;\n\n if ($refMask = $request->param('ref_mask', Validator::CKEY))\n $this->refMask = $refMask;\n\n if ($refField = $request->param('ref_field', Validator::CKEY))\n $this->refField = $refField;\n\n if ($refId = $request->param('ref_id', Validator::CKEY))\n $this->refId = $refId;\n\n }", "title": "" }, { "docid": "edcbcdfe7f701e1dadcb5d2ad2ba788e", "score": "0.42049548", "text": "public function __construct(array $address_Data = array(), array $usage_Data = array(), $number_of_Days = null, array $days_of_the_Week_Reference = array(), \\WorkdayWsdl\\\\StructType\\Address_ReferenceObjectType $address_Reference = null, $address_ID = null, $address_Format_Type = null, $delete = null, $effective_Date = null)\n {\n $this\n ->setAddress_Data($address_Data)\n ->setUsage_Data($usage_Data)\n ->setNumber_of_Days($number_of_Days)\n ->setDays_of_the_Week_Reference($days_of_the_Week_Reference)\n ->setAddress_Reference($address_Reference)\n ->setAddress_ID($address_ID)\n ->setAddress_Format_Type($address_Format_Type)\n ->setDelete($delete)\n ->setEffective_Date($effective_Date);\n }", "title": "" }, { "docid": "0f944b7ce9a516cddc1010cd8e0d8f41", "score": "0.4201288", "text": "protected function initOptionalExtractPaths()\n {\n $this->optionalExtractionPaths = [\n 'charges' => 'x:Charges',\n 'discount' => 'x:Discount',\n 'extendedPrice' => 'x:ExtendedPrice',\n 'lineTotal' => 'x:LineTotal',\n 'lineTotalWithoutTax' => 'x:LineTotalWithoutTax',\n 'pricingQty' => 'x:PricingQty',\n 'shippingCharges' => 'x:ShippingCharges',\n 'shippingDiscount' => 'x:ShippingDiscount',\n 'shippingTotal' => 'x:ShippingTotal',\n 'tax' => 'x:Tax',\n 'unitPrice' => 'x:UnitPrice',\n 'minLineStatus' => 'x:MinLineStatus',\n 'minLineStatusDescription' => 'x:MinLineStatus/@description',\n 'maxLineStatus' => 'x:MaxLineStatus',\n 'maxLineStatusDescription' => 'x:MaxLineStatus/@description',\n ];\n return $this;\n }", "title": "" }, { "docid": "f287484fbdd588fcd896821797cf4925", "score": "0.41982135", "text": "function &factory($version)\n {\n if (!in_array($version{0}, array('1', '2'))) {\n $a = false;\n return $a;\n }\n\n include_once 'PEAR/PackageFile/v' . $version{0} . '.php';\n $version = $version{0};\n $class = $this->getClassPrefix() . $version;\n $a = new $class;\n return $a;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from its toArray() method\n *\n * WARNING: no validation is performed, the array is assumed to be valid,\n * always parse from xml if you want validation.\n * @param array $arr\n * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2\n * @uses factory() to construct the returned object.\n */\n function &fromArray($arr)\n {\n if (isset($arr['xsdversion'])) {\n $obj = &$this->factory($arr['xsdversion']);\n if ($this->_logger) {\n $obj->setLogger($this->_logger);\n }\n\n $obj->setConfig($this->_config);\n $obj->fromArray($arr);\n return $obj;\n }\n\n if (isset($arr['package']['attribs']['version'])) {\n $obj = &$this->factory($arr['package']['attribs']['version']);\n } else {\n $obj = &$this->factory('1.0');\n }\n\n if ($this->_logger) {\n $obj->setLogger($this->_logger);\n }\n\n $obj->setConfig($this->_config);\n $obj->fromArray($arr);\n return $obj;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from an XML string.\n * @access public\n * @param string $data contents of package.xml file\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @param string $file full path to the package.xml file (and the files\n * it references)\n * @param string $archive optional name of the archive that the XML was\n * extracted from, if any\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses parserFactory() to construct a parser to load the package.\n */\n function &fromXmlString($data, $state, $file, $archive = false)\n {\n if (preg_match('/<package[^>]+version=[\\'\"]([0-9]+\\.[0-9]+)[\\'\"]/', $data, $packageversion)) {\n if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) {\n return PEAR::raiseError('package.xml version \"' . $packageversion[1] .\n '\" is not supported, only 1.0, 2.0, and 2.1 are supported.');\n }\n\n $object = &$this->parserFactory($packageversion[1]);\n if ($this->_logger) {\n $object->setLogger($this->_logger);\n }\n\n $object->setConfig($this->_config);\n $pf = $object->parse($data, $file, $archive);\n if (PEAR::isError($pf)) {\n return $pf;\n }\n\n if ($this->_rawReturn) {\n return $pf;\n }\n\n if (!$pf->validate($state)) {;\n if ($this->_config->get('verbose') > 0\n && $this->_logger && $pf->getValidationWarnings(false)\n ) {\n foreach ($pf->getValidationWarnings(false) as $warning) {\n $this->_logger->log(0, 'ERROR: ' . $warning['message']);\n }\n }\n\n $a = PEAR::raiseError('Parsing of package.xml from file \"' . $file . '\" failed',\n 2, null, null, $pf->getValidationWarnings());\n return $a;\n }\n\n if ($this->_logger && $pf->getValidationWarnings(false)) {\n foreach ($pf->getValidationWarnings() as $warning) {\n $this->_logger->log(0, 'WARNING: ' . $warning['message']);\n }\n }\n\n if (method_exists($pf, 'flattenFilelist')) {\n $pf->flattenFilelist(); // for v2\n }\n\n return $pf;\n } elseif (preg_match('/<package[^>]+version=[\\'\"]([^\"\\']+)[\\'\"]/', $data, $packageversion)) {\n $a = PEAR::raiseError('package.xml file \"' . $file .\n '\" has unsupported package.xml <package> version \"' . $packageversion[1] . '\"');\n return $a;\n } else {\n if (!class_exists('PEAR_ErrorStack')) {\n require_once 'PEAR/ErrorStack.php';\n }\n\n PEAR_ErrorStack::staticPush('PEAR_PackageFile',\n PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION,\n 'warning', array('xml' => $data), 'package.xml \"' . $file .\n '\" has no package.xml <package> version');\n $object = &$this->parserFactory('1.0');\n $object->setConfig($this->_config);\n $pf = $object->parse($data, $file, $archive);\n if (PEAR::isError($pf)) {\n return $pf;\n }\n\n if ($this->_rawReturn) {\n return $pf;\n }\n\n if (!$pf->validate($state)) {\n $a = PEAR::raiseError('Parsing of package.xml from file \"' . $file . '\" failed',\n 2, null, null, $pf->getValidationWarnings());\n return $a;\n }\n\n if ($this->_logger && $pf->getValidationWarnings(false)) {\n foreach ($pf->getValidationWarnings() as $warning) {\n $this->_logger->log(0, 'WARNING: ' . $warning['message']);\n }\n }\n\n if (method_exists($pf, 'flattenFilelist')) {\n $pf->flattenFilelist(); // for v2\n }\n\n return $pf;\n }\n }\n\n /**\n * Register a temporary file or directory. When the destructor is\n * executed, all registered temporary files and directories are\n * removed.\n *\n * @param string $file name of file or directory\n * @return void\n */\n function addTempFile($file)\n {\n $GLOBALS['_PEAR_Common_tempfiles'][] = $file;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a compressed Tar or Tgz file.\n * @access public\n * @param string contents of package.xml file\n * @param int package state (one of PEAR_VALIDATE_* constants)\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @using Archive_Tar to extract the files\n * @using fromPackageFile() to load the package after the package.xml\n * file is extracted.\n */\n function &fromTgzFile($file, $state)\n {\n if (!class_exists('Archive_Tar')) {\n require_once 'Archive/Tar.php';\n }\n\n $tar = new Archive_Tar($file);\n if ($this->_debug <= 1) {\n $tar->pushErrorHandling(PEAR_ERROR_RETURN);\n }\n\n $content = $tar->listContent();\n if ($this->_debug <= 1) {\n $tar->popErrorHandling();\n }\n\n if (!is_array($content)) {\n if (is_string($file) && strlen($file < 255) &&\n (!file_exists($file) || !@is_file($file))) {\n $ret = PEAR::raiseError(\"could not open file \\\"$file\\\"\");\n return $ret;\n }\n\n $file = realpath($file);\n $ret = PEAR::raiseError(\"Could not get contents of package \\\"$file\\\"\".\n '. Invalid tgz file.');\n return $ret;\n }\n\n if (!count($content) && !@is_file($file)) {\n $ret = PEAR::raiseError(\"could not open file \\\"$file\\\"\");\n return $ret;\n }\n\n $xml = null;\n $origfile = $file;\n foreach ($content as $file) {\n $name = $file['filename'];\n if ($name == 'package2.xml') { // allow a .tgz to distribute both versions\n $xml = $name;\n break;\n }\n\n if ($name == 'package.xml') {\n $xml = $name;\n break;\n } elseif (preg_match('/package.xml$/', $name, $match)) {\n $xml = $name;\n break;\n }\n }\n\n $tmpdir = System::mktemp('-t \"' . $this->_config->get('temp_dir') . '\" -d pear');\n if ($tmpdir === false) {\n $ret = PEAR::raiseError(\"there was a problem with getting the configured temp directory\");\n return $ret;\n }\n\n PEAR_PackageFile::addTempFile($tmpdir);\n\n $this->_extractErrors();\n PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));\n\n if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {\n $extra = implode(\"\\n\", $this->_extractErrors());\n if ($extra) {\n $extra = ' ' . $extra;\n }\n\n PEAR::staticPopErrorHandling();\n $ret = PEAR::raiseError('could not extract the package.xml file from \"' .\n $origfile . '\"' . $extra);\n return $ret;\n }\n\n PEAR::staticPopErrorHandling();\n $ret = &PEAR_PackageFile::fromPackageFile(\"$tmpdir/$xml\", $state, $origfile);\n return $ret;\n }\n\n /**\n * helper callback for extracting Archive_Tar errors\n *\n * @param PEAR_Error|null $err\n * @return array\n * @access private\n */\n function _extractErrors($err = null)\n {\n static $errors = array();\n if ($err === null) {\n $e = $errors;\n $errors = array();\n return $e;\n }\n $errors[] = $err->getMessage();\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a package.xml file.\n *\n * @access public\n * @param string $descfile name of package xml file\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @param string|false $archive name of the archive this package.xml came\n * from, if any\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses PEAR_PackageFile::fromXmlString to create the oject after the\n * XML is loaded from the package.xml file.\n */\n function &fromPackageFile($descfile, $state, $archive = false)\n {\n $fp = false;\n if (is_string($descfile) && strlen($descfile) < 255 &&\n (\n !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile)\n || (!$fp = @fopen($descfile, 'r'))\n )\n ) {\n $a = PEAR::raiseError(\"Unable to open $descfile\");\n return $a;\n }\n\n // read the whole thing so we only get one cdata callback\n // for each block of cdata\n fclose($fp);\n $data = file_get_contents($descfile);\n $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive);\n return $ret;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file.\n *\n * This method is able to extract information about a package from a .tgz\n * archive or from a XML package definition file.\n *\n * @access public\n * @param string $info file name\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses fromPackageFile() if the file appears to be XML\n * @uses fromTgzFile() to load all non-XML files\n */\n function &fromAnyFile($info, $state)\n {\n if (is_dir($info)) {\n $dir_name = realpath($info);\n if (file_exists($dir_name . '/package.xml')) {\n $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state);\n } elseif (file_exists($dir_name . '/package2.xml')) {\n $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state);\n } else {\n $info = PEAR::raiseError(\"No package definition found in '$info' directory\");\n }\n\n return $info;\n }\n\n $fp = false;\n if (is_string($info) && strlen($info) < 255 &&\n (file_exists($info) || ($fp = @fopen($info, 'r')))\n ) {\n\n if ($fp) {\n fclose($fp);\n }\n\n $tmp = substr($info, -4);\n if ($tmp == '.xml') {\n $info = &PEAR_PackageFile::fromPackageFile($info, $state);\n } elseif ($tmp == '.tar' || $tmp == '.tgz') {\n $info = &PEAR_PackageFile::fromTgzFile($info, $state);\n } else {\n $fp = fopen($info, 'r');\n $test = fread($fp, 5);\n fclose($fp);\n if ($test == '<?xml') {\n $info = &PEAR_PackageFile::fromPackageFile($info, $state);\n } else {\n $info = &PEAR_PackageFile::fromTgzFile($info, $state);\n }\n }\n\n return $info;\n }\n\n $info = PEAR::raiseError(\"Cannot open '$info' for parsing\");\n return $info;\n }\n}\n����������������������������������PEAR-1.10.5/PEAR/Packager.php�����������������������������������������������������������������������0000664�0001750�0001750�00000017037�13124445427�015172 �0����������������������������������������������������������������������������������������������������ustar �ashnazg�������������������������ashnazg����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php\n/**\n * PEAR_Packager for generating releases\n *\n * PHP versions 4 and 5\n *\n * @category pear\n * @package PEAR\n * @author Stig Bakken <[email protected]>\n * @author Tomas V. V. Cox <[email protected]>\n * @author Greg Beaver <[email protected]>\n * @copyright 1997-2009 The Authors\n * @license http://opensource.org/licenses/bsd-license.php New BSD License\n * @link http://pear.php.net/package/PEAR\n * @since File available since Release 0.1\n */\n\n/**\n * base class\n */\nrequire_once 'PEAR/Common.php';\nrequire_once 'PEAR/PackageFile.php';\nrequire_once 'System.php';\n\n/**\n * Administration class used to make a PEAR release tarball.\n *\n * @category pear\n * @package PEAR\n * @author Greg Beaver <[email protected]>\n * @copyright 1997-2009 The Authors\n * @license http://opensource.org/licenses/bsd-license.php New BSD License\n * @version Release: 1.10.5\n * @link http://pear.php.net/package/PEAR\n * @since Class available since Release 0.1\n */\nclass PEAR_Packager extends PEAR_Common\n{\n /**\n * @var PEAR_Registry\n */\n var $_registry;\n\n function package($pkgfile = null, $compress = true, $pkg2 = null)\n {\n // {{{ validate supplied package.xml file\n if (empty($pkgfile)) {\n $pkgfile = 'package.xml';\n }\n\n PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);\n $pkg = new PEAR_PackageFile($this->config, $this->debug);\n $pf = &$pkg->fromPackageFile($pkgfile, PEAR_VALIDATE_NORMAL);\n $main = &$pf;\n PEAR::staticPopErrorHandling();\n if (PEAR::isError($pf)) {\n if (is_array($pf->getUserInfo())) {\n foreach ($pf->getUserInfo() as $error) {\n $this->log(0, 'Error: ' . $error['message']);\n }\n }\n\n $this->log(0, $pf->getMessage());\n return $this->raiseError(\"Cannot package, errors in package file\");\n }\n\n foreach ($pf->getValidationWarnings() as $warning) {\n $this->log(1, 'Warning: ' . $warning['message']);\n }\n\n // }}}\n if ($pkg2) {\n $this->log(0, 'Attempting to process the second package file');\n PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);\n $pf2 = &$pkg->fromPackageFile($pkg2, PEAR_VALIDATE_NORMAL);\n PEAR::staticPopErrorHandling();\n if (PEAR::isError($pf2)) {\n if (is_array($pf2->getUserInfo())) {\n foreach ($pf2->getUserInfo() as $error) {\n $this->log(0, 'Error: ' . $error['message']);\n }\n }\n $this->log(0, $pf2->getMessage());\n return $this->raiseError(\"Cannot package, errors in second package file\");\n }\n\n foreach ($pf2->getValidationWarnings() as $warning) {\n $this->log(1, 'Warning: ' . $warning['message']);\n }\n\n if ($pf2->getPackagexmlVersion() == '2.0' ||\n $pf2->getPackagexmlVersion() == '2.1'\n ) {\n $main = &$pf2;\n $other = &$pf;\n } else {\n $main = &$pf;\n $other = &$pf2;\n }\n\n if ($main->getPackagexmlVersion() != '2.0' &&\n $main->getPackagexmlVersion() != '2.1') {\n return PEAR::raiseError('Error: cannot package two package.xml version 1.0, can ' .\n 'only package together a package.xml 1.0 and package.xml 2.0');\n }\n\n if ($other->getPackagexmlVersion() != '1.0') {\n return PEAR::raiseError('Error: cannot package two package.xml version 2.0, can ' .\n 'only package together a package.xml 1.0 and package.xml 2.0');\n }\n }\n\n $main->setLogger($this);\n if (!$main->validate(PEAR_VALIDATE_PACKAGING)) {\n foreach ($main->getValidationWarnings() as $warning) {\n $this->log(0, 'Error: ' . $warning['message']);\n }\n return $this->raiseError(\"Cannot package, errors in package\");\n }\n\n foreach ($main->getValidationWarnings() as $warning) {\n $this->log(1, 'Warning: ' . $warning['message']);\n }\n\n if ($pkg2) {\n $other->setLogger($this);\n $a = false;\n if (!$other->validate(PEAR_VALIDATE_NORMAL) || $a = !$main->isEquivalent($other)) {\n foreach ($other->getValidationWarnings() as $warning) {\n $this->log(0, 'Error: ' . $warning['message']);\n }\n\n foreach ($main->getValidationWarnings() as $warning) {\n $this->log(0, 'Error: ' . $warning['message']);\n }\n\n if ($a) {\n return $this->raiseError('The two package.xml files are not equivalent!');\n }\n\n return $this->raiseError(\"Cannot package, errors in package\");\n }\n\n foreach ($other->getValidationWarnings() as $warning) {\n $this->log(1, 'Warning: ' . $warning['message']);\n }\n\n $gen = &$main->getDefaultGenerator();\n $tgzfile = $gen->toTgz2($this, $other, $compress);\n if (PEAR::isError($tgzfile)) {\n return $tgzfile;\n }\n\n $dest_package = basename($tgzfile);\n $pkgdir = dirname($pkgfile);\n\n // TAR the Package -------------------------------------------\n $this->log(1, \"Package $dest_package done\");\n if (file_exists(\"$pkgdir/CVS/Root\")) {\n $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion());\n $cvstag = \"RELEASE_$cvsversion\";\n $this->log(1, 'Tag the released code with \"pear cvstag ' .\n $main->getPackageFile() . '\"');\n $this->log(1, \"(or set the CVS tag $cvstag by hand)\");\n } elseif (file_exists(\"$pkgdir/.svn\")) {\n $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion());\n $svntag = $pf->getName() . \"-$svnversion\";\n $this->log(1, 'Tag the released code with \"pear svntag ' .\n $main->getPackageFile() . '\"');\n $this->log(1, \"(or set the SVN tag $svntag by hand)\");\n }\n } else { // this branch is executed for single packagefile packaging\n $gen = &$pf->getDefaultGenerator();\n $tgzfile = $gen->toTgz($this, $compress);\n if (PEAR::isError($tgzfile)) {\n $this->log(0, $tgzfile->getMessage());\n return $this->raiseError(\"Cannot package, errors in package\");\n }\n\n $dest_package = basename($tgzfile);\n $pkgdir = dirname($pkgfile);\n\n // TAR the Package -------------------------------------------\n $this->log(1, \"Package $dest_package done\");\n if (file_exists(\"$pkgdir/CVS/Root\")) {\n $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion());\n $cvstag = \"RELEASE_$cvsversion\";\n $this->log(1, \"Tag the released code with `pear cvstag $pkgfile'\");\n $this->log(1, \"(or set the CVS tag $cvstag by hand)\");\n } elseif (file_exists(\"$pkgdir/.svn\")) {\n $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion());\n $svntag = $pf->getName() . \"-$svnversion\";\n $this->log(1, \"Tag the released code with `pear svntag $pkgfile'\");\n $this->log(1, \"(or set the SVN tag $svntag by hand)\");\n }\n }\n\n return $dest_package;\n }\n}�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PEAR-1.10.5/PEAR/Proxy.php��������������������������������������������������������������������������0000664�0001750�0001750�00000012561�13124445427�014573 �0����������������������������������������������������������������������������������������������������ustar �ashnazg�������������������������ashnazg����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php\n/**\n * PEAR_Proxy\n *\n * HTTP Proxy handling \n *\n * @category pear\n * @package PEAR\n * @author Nico Boehr \n * @copyright 1997-2009 The Authors\n * @license http://opensource.org/licenses/bsd-license.php New BSD License\n * @link http://pear.php.net/package/PEAR\n */\n\nclass PEAR_Proxy\n{\n var $config = null;\n\n /**\n * @access private\n */\n var $proxy_host;\n /**\n * @access private\n */\n var $proxy_port;\n /**\n * @access private\n */\n var $proxy_user;\n /**\n * @access private\n */\n var $proxy_pass;\n /**\n * @access private\n */\n var $proxy_schema;\n\n function __construct($config = null)\n {\n $this->config = $config;\n $this->_parseProxyInfo();\n }\n\n /**\n * @access private\n */\n function _parseProxyInfo()\n {\n $this->proxy_host = $this->proxy_port = $this->proxy_user = $this->proxy_pass = '';\n if ($this->config->get('http_proxy')&&\n $proxy = parse_url($this->config->get('http_proxy'))\n ) {\n $this->proxy_host = isset($proxy['host']) ? $proxy['host'] : null;\n\n $this->proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;\n $this->proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;\n $this->proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;\n $this->proxy_schema = (isset($proxy['scheme']) && $proxy['scheme'] == 'https') ? 'https' : 'http';\n }\n }\n\n /**\n * @access private\n */\n function _httpConnect($fp, $host, $port)\n {\n fwrite($fp, \"CONNECT $host:$port HTTP/1.1\\r\\n\");\n fwrite($fp, \"Host: $host:$port\\r\\n\\r\\n\");\n\n while ($line = trim(fgets($fp, 1024))) {\n if (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {\n $code = (int)$matches[1];\n\n /* as per RFC 2817 */\n if ($code < 200 || $code >= 300) {\n return PEAR::raiseError(\"Establishing a CONNECT tunnel through proxy failed with response code $code\");\n }\n }\n }\n\n // connection was successful -- establish SSL through\n // the tunnel\n $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;\n\n if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {\n $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;\n $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;\n }\n\n // set the correct hostname for working hostname\n // verification\n stream_context_set_option($fp, 'ssl', 'peer_name', $host);\n\n // blocking socket needed for\n // stream_socket_enable_crypto()\n // see\n // <http://php.net/manual/en/function.stream-socket-enable-crypto.php>\n stream_set_blocking ($fp, true);\n $crypto_res = stream_socket_enable_crypto($fp, true, $crypto_method);\n if (!$crypto_res) {\n return PEAR::raiseError(\"Could not establish SSL connection through proxy $proxy_host:$proxy_port: $crypto_res\");\n }\n\n return true;\n }\n\n /**\n * get the authorization information for the proxy, encoded to be\n * passed in the Proxy-Authentication HTTP header.\n * @return null|string the encoded authentication information if a\n * proxy and authentication is configured, null \n * otherwise.\n */\n function getProxyAuth()\n {\n if ($this->isProxyConfigured() && $this->proxy_user != '') {\n return base64_encode($this->proxy_user . ':' . $this->proxy_pass);\n }\n return null;\n }\n\n function getProxyUser()\n {\n return $this->proxy_user;\n }\n\n /**\n * Check if we are configured to use a proxy.\n *\n * @return boolean true if we are configured to use a proxy, false\n * otherwise.\n * @access public\n */\n function isProxyConfigured()\n {\n return $this->proxy_host != '';\n }\n\n /**\n * Open a socket to a remote server, possibly involving a HTTP\n * proxy.\n *\n * If an HTTP proxy has been configured (http_proxy PEAR_Config\n * setting), the proxy will be used.\n *\n * @param string $host the host to connect to\n * @param string $port the port to connect to\n * @param boolean $secure if true, establish a secure connection\n * using TLS.\n * @access public\n */\n function openSocket($host, $port, $secure = false)\n {\n if ($this->isProxyConfigured()) {\n $fp = @fsockopen(\n $this->proxy_host, $this->proxy_port, \n $errno, $errstr, 15\n );\n\n if (!$fp) {\n return PEAR::raiseError(\"Connection to `$proxy_host:$proxy_port' failed: $errstr\", -9276);\n }\n\n /* HTTPS is to be used and we have a proxy, use CONNECT verb */\n if ($secure) {\n $res = $this->_httpConnect($fp, $host, $port);\n\n if (PEAR::isError($res)) {\n return $res;\n }\n }\n } else {\n if ($secure) {\n $host = 'ssl://' . $host;\n }\n\n $fp = @fsockopen($host, $port, $errno, $errstr);\n if (!$fp) {\n return PEAR::raiseError(\"Connection to `$host:$port' failed: $errstr\", $errno);\n }\n }\n\n return $fp;\n }\n}", "title": "" }, { "docid": "a7a7731ea3dae9b6074c6cf081abb7c8", "score": "0.41856954", "text": "public static function _register()\n {\n self::assignElements([\n 'UUID' => [],\n 'downloadJobRecurringFilter' => ['type' => 'DownloadJobRecurringFilter', 'xmlns' => self::XMLNS],\n 'frequencyInMinutes' => ['type' => 'int'],\n 'downloadJobType' => [],\n 'monthlyRecurrence' => ['type' => 'MonthlyRecurrence', 'xmlns' => self::XMLNS],\n 'weeklyRecurrence' => ['type' => 'WeeklyRecurrence', 'xmlns' => self::XMLNS],\n 'dailyRecurrence' => ['type' => 'DailyRecurrence', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "291627a1020177cdff34983f7655ebc5", "score": "0.41811055", "text": "protected function getRouting_FileLocatorService()\n {\n return $this->services['routing.file_locator'] = new \\Symfony\\Component\\HttpKernel\\Config\\FileLocator($this->get('kernel'));\n }", "title": "" }, { "docid": "5c701821cf588139b41fd03ac2a673e3", "score": "0.4166094", "text": "protected function initialize()\n\t{\n\t\tparent::initialize();\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, \"DECIMAL\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, \"MEDIUMTEXT\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, \"DATETIME\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, \"BLOB\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, \"MEDIUMBLOB\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, \"LONGBLOB\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, \"LONGBLOB\"));\n\t\t$this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, \"LONGTEXT\"));\n\t}", "title": "" }, { "docid": "ebed6c1bcfe0004b51f1f0c6c38cba18", "score": "0.41627777", "text": "public function build()\n {\n $prevState = libxml_use_internal_errors(true);\n\n try {\n $doc = $this->buildDocument();\n\n if (!empty($this->schema) && !$doc->schemaValidate($this->schema)) {\n throw ReportDefinitionException::schemaValidation(libxml_get_errors());\n }\n\n if (false === $xml = $doc->saveXML()) {\n throw ReportDefinitionException::compileError(libxml_get_errors());\n }\n\n return $xml;\n } finally {\n libxml_clear_errors();\n libxml_use_internal_errors($prevState);\n }\n }", "title": "" }, { "docid": "5aaee33ce86d1dbcf098f52440a3cc7a", "score": "0.4156125", "text": "protected function init()\n\t\t{\n\t\t\t/**\n\t\t\t * @since 4.3\n\t\t\t * @param array $defs\n\t\t\t * @param string $context\n\t\t\t * @return array\t\t\t\tdef_ext => array ( weight, style )\n\t\t\t */\n\t\t\t$this->google_fonts_def = apply_filters( 'avf_google_fonts_style_definitions',\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'hairline'\t\t\t=> array( 100, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'hairlineitalic'\t=> array( 100, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'thin'\t\t\t\t=> array( 100, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'thinitalic'\t\t=> array( 100, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'extralight'\t\t=> array( 200, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'extralightitalic'\t=> array( 200, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'light'\t\t\t\t=> array( 300, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'lightitalic'\t\t=> array( 300, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'regular'\t\t\t=> array( 400, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'italic'\t\t\t=> array( 400, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'medium'\t\t\t=> array( 500, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'mediumitalic'\t\t=> array( 500, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'semibold'\t\t\t=> array( 600, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'semibolditalic'\t=> array( 600, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'bold'\t\t\t\t=> array( 700, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'bolditalic'\t\t=> array( 700, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'extrabold'\t\t\t=> array( 800, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'extrabolditalic'\t=> array( 800, 'italic' ),\n\t\t\t\t\t\t\t\t\t\t\t'black'\t\t\t\t=> array( 900, 'normal' ),\n\t\t\t\t\t\t\t\t\t\t\t'blackitalic'\t\t=> array( 900, 'italic' )\n\n\t\t\t\t\t\t\t\t\t), 'AviaTypeFonts' );\n\n\n\t\t\t/**\n\t\t\t * Allowed file ext to include (add css formats also !!!)\n\t\t\t *\n\t\t\t * @since 4.3\n\t\t\t * @param array $defs\n\t\t\t * @param string $context\n\t\t\t * @return array\n\t\t\t */\n\t\t\t$ext = array( 'ttf', 'eot', 'woff', 'woff2', 'svg' );\n\t\t\t$this->file_ext = apply_filters( 'avf_font_manager_file_ext', array_merge( $this->file_ext, $ext ), 'AviaTypeFonts' );\n\n\n\t\t\t/**\n\t\t\t * Filter available formats and define the order\n\t\t\t *\n\t\t\t * @since 4.3\n\t\t\t * @since 5.1.2\t\t\t\torder of ext defines the order of CSS output of urls\n\t\t\t * @param array $defs\n\t\t\t * @param string $context\n\t\t\t * @return array\t\t\t\tarray ( file_ext => format_string )\n\t\t\t */\n\t\t\t$this->css_formats = apply_filters( 'avf_font_manager_file_formats',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'woff2'\t=> \"format('woff2')\",\n\t\t\t\t\t\t\t\t'woff'\t=> \"format('woff')\",\n\t\t\t\t\t\t\t\t'ttf'\t=> \"format('truetype')\",\n\t\t\t\t\t\t\t\t'svg'\t=> \"format('svg')\",\n\t\t\t\t\t\t\t\t'eot'\t=> \"format('embedded-opentype')\"\n\t\t\t\t\t\t\t), 'AviaTypeFonts' );\n\n\t\t\t/**\n\t\t\t * Contains all infos for fonts and their filename - not necessary,\n\t\t\t * but overwrites the default name conventions when exist\n\t\t\t *\n\t\t\t * @since 4.3\n\t\t\t * @param array $defs\n\t\t\t * @param string $context\n\t\t\t * @return array\n\t\t\t */\n\t\t\t$this->include_files[] = 'metadata.pb';\n\t\t\t$this->include_files = apply_filters( 'avf_font_manager_include_files', $this->include_files, 'AviaTypeFonts' );\n\n\t\t\t$this->multiple_fonts = true;\n\t\t\t$this->font_option_key = 'avia_custom_type_fonts';\n\n\t\t}", "title": "" }, { "docid": "35c97458b3bddcfa24d9bfb60ed550cb", "score": "0.41487092", "text": "public static function staticInit() {\n self::$logger = Logger::getLogger(__CLASS__);\n \n self::$defaultPlanningOptions = array(\n 'displayExtRef' => 0,\n );\n\n self::$defaultPlanningOptionsDesc = array(\n 'displayExtRef' => 'Display ExtRef instead of mantis_id',\n );\n }", "title": "" }, { "docid": "0ce4bc9a03807f58d9ccae7521921d37", "score": "0.4146198", "text": "function init()\n\t{\n\t\t$this->defineAttribute('startFrom',\t\tfalse, \tNULL,\tCOMPONENT_TYPE_STRING);\n\t\t$this->defineAttribute('maxDepth',\t\tfalse, \tfalse,\tCOMPONENT_TYPE_STRING);\n\t\t$this->defineAttribute('pageType',\t\tfalse, \t'',\tCOMPONENT_TYPE_STRING);\n\t\t$this->defineAttribute('value',\t\tfalse, \t'',\tCOMPONENT_TYPE_STRING);\n\n\t\t// call the superclass for validate the attributes\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "e2a5380c7a7ebceaae16f38196ddb816", "score": "0.41435862", "text": "function __construct()\n\t\t{\n\t\t\t$this->Retenciones = new CFDRetenciones();\n\t\t\t$this->Traslados = new CFDTraslados();\n\t\t}", "title": "" }, { "docid": "5413acf52c0cc7cf4c695f899a3541c5", "score": "0.4141778", "text": "public function getXsdValidationBasePath()\n {\n return null;\n }", "title": "" }, { "docid": "5413acf52c0cc7cf4c695f899a3541c5", "score": "0.4141778", "text": "public function getXsdValidationBasePath()\n {\n return null;\n }", "title": "" }, { "docid": "faf794a44facbc86b0362f42ce62df2e", "score": "0.4141617", "text": "public function init()\n {\n parent::init();\n if (!($this->form && $this->model && $this->fromAttr && $this->toAttr)) {\n throw new InvalidConfigException(\"The 'form', 'model', 'fromAttr' and 'toAttr' properties are required.\");\n }\n if (!isset($this->fromOptions['id'])) {\n $this->fromOptions['id'] = Html::getInputId($this->model, $this->fromAttr);\n }\n if (!isset($this->toOptions['id'])) {\n $this->toOptions['id'] = Html::getInputId($this->model, $this->toAttr);\n }\n if (!isset($this->pickerConfig['dateFormat'])) {\n $this->pickerConfig['dateFormat'] = 'yyyy-MM-dd';\n }\n }", "title": "" }, { "docid": "ae6123a7c574f2b91995c29a7d6d6bcc", "score": "0.41338784", "text": "public function __construct()\n {\n //------------------------------------------------------------------\n // Validation Types\n //------------------------------------------------------------------\n $this->validation_types = [\n 'is_empty',\n 'is_empty_or_zero',\n 'is_not_empty',\n 'is_not_empty_or_zero',\n 'is_numeric',\n 'is_not_numeric',\n 'is_date',\n 'fields_match',\n 'fields_not_match',\n 'fail',\n 'custom',\n 'function'\n ];\n\n //------------------------------------------------------------------\n // Reset\n //------------------------------------------------------------------\n $this->ResetAll();\n }", "title": "" }, { "docid": "fd0812349097031b629269fe3d35e37c", "score": "0.41283807", "text": "private function loadValidationRules(): void {\n Validator::extend('swagger_default', function(string $attribute, $value, array $parameters, Validator $validator) {\n return true;\n });\n Validator::extend('swagger_min', function(string $attribute, $value, array $parameters, Validator $validator) {\n [$min, $fail] = $this->parseParameters($parameters);\n $valueType = $this->getTypeFromString((string) $value);\n settype($min, $valueType);\n if ($fail) {\n return $value >= $min;\n }\n return true;\n });\n Validator::extend('swagger_max', function(string $attribute, $value, array $parameters, Validator $validator) {\n [$max, $fail] = $this->parseParameters($parameters);\n $valueType = $this->getTypeFromString((string) $value);\n settype($max, $valueType);\n if ($fail) {\n return $value <= $max;\n }\n return true;\n });\n }", "title": "" }, { "docid": "0320fcfca7e92321753ec44d06e30236", "score": "0.412021", "text": "public function __construct()\n {\n $this->mapping_builder_factory = new MappingBuilderFactory();\n\n // factory to manage types\n $this->type_factory = new TypeFactory();\n }", "title": "" }, { "docid": "bf2047dd06eca5c12d5a19a8a51a2587", "score": "0.41175264", "text": "protected function configure() {\n\n $this->xmlconfig = array(\n \"policyid\" => array(\"xpath\" => \"@PolicyId\"),\n \"description\" => array(\"xpath\" => \"x:Description\"),\n // pid for the object that this policy applies to\n \"pid\" => array(\"xpath\" => \"x:Target/x:Resources/x:Resource/x:ResourceMatch/x:AttributeValue[following-sibling::x:ResourceAttributeDesignator[@AttributeId='urn:fedora:names:fedora:2.1:resource:object:pid']]\"),\n \"rules\" => array(\"xpath\" => \"x:Rule\", \"is_series\" => true, \"class_name\" => \"PolicyRule\"),\n );\n\n // specific etd rules that need to be accessible by name/type\n $etdrules = array(\"fedoraAdmin\", \"view\", \"draft\", \"published\", \"deny_most\");\n foreach ($etdrules as $ruleid) {\n $this->xmlconfig[$ruleid] = array(\"xpath\" => \"x:Rule[@RuleId='$ruleid']\", \"class_name\" => \"PolicyRule\");\n }\n\n }", "title": "" }, { "docid": "c0ec7eccdf929823f5932e559d6773fb", "score": "0.41110572", "text": "protected function getFileLocatorService()\n {\n return $this->services['file_locator'] = new \\Symfony\\Component\\HttpKernel\\Config\\FileLocator($this->get('kernel'));\n }", "title": "" }, { "docid": "ce6141eedd56f71cd13f7dcb8c15cef4", "score": "0.4107578", "text": "public function newSchemaValidator(Locator $locator = null)\n {\n if (null === $locator) {\n $locator = $this->newLocator();\n }\n $schemavalidator = new SchemaValidator($locator);\n return $schemavalidator;\n }", "title": "" }, { "docid": "9a3c4e9b8cc20124697c39622c6de41b", "score": "0.41073877", "text": "public function __construct(DOMDocument $xml)\n {\n $this->xpath = new DOMXPath($xml);\n $this->xpath->registerNamespace('s', self::SETTINGS_LOADER_XMLNS);\n }", "title": "" }, { "docid": "d19ca758d94c781e87511657ce618608", "score": "0.4106819", "text": "public function __construct(){\n\t\tif (isset($_GET['showErrors'])){\n\t\t\t$this->acceptReports = true;\n\t\t\t$this->displayErrors = true;\n\t\t}\n\t\telseif (sysConfig::get('ERROR_REPORTING_METHOD') == 'Display'){\n\t\t\t$this->acceptReports = true;\n\t\t\t$this->displayErrors = true;\n\t\t}\n\t\telseif (sysConfig::get('ERROR_REPORTING_METHOD') == 'Log'){\n\t\t\t$this->acceptReports = true;\n\t\t}\n\t\telseif (sysConfig::get('ERROR_REPORTING_METHOD') == 'Email'){\n\t\t\t$this->acceptReports = true;\n\t\t}\n\t}", "title": "" }, { "docid": "7221a7b75a6201687480df5162bf7abc", "score": "0.41064635", "text": "public function __construct()\n\t{\n\t\t$this->validators = new \\ArrayObject();\n\t}", "title": "" }, { "docid": "0627686505048578a41136dfbf75b59e", "score": "0.41049287", "text": "function __construct($factory_config = array())\n {\n $this->mf = new A2E_Models_Factory($factory_config);\n $this->parser = ARC2::getSPARQLParser();\n $this->targetModel = $this->mf->ef();\n }", "title": "" }, { "docid": "dc013d1a922caedfacdd9c70e9b22bf1", "score": "0.40935728", "text": "public function init() {\n extract($this->data);\n\n // Make data accessible\n $this->compParams = [\n\t\t\t'position' \t=> $position,\n\t\t\t'spacing' \t=> $spacing\n\t\t];\n\n // Builds class\n $this->buildFabClass();\n }", "title": "" }, { "docid": "a02e5e942851e093e58704525499c59b", "score": "0.4089418", "text": "public function testInitReturnsFormFactory()\n {\n $this->resource->setOptions(array(true));\n $factory = $this->resource->init();\n $this->assertInstanceOf('Mol_Form_Factory', $factory);\n }", "title": "" }, { "docid": "c7cc25076575ff7a66ea46ce28eeb280", "score": "0.40818873", "text": "public function init()\n {\n require_once(\\yii::$app->basePath . \"/../vendor/setasign/fpdf/fpdf.php\");\n require_once(\\yii::$app->basePath . \"/../vendor/setasign/fpdi/fpdi.php\");\n require_once(\\yii::$app->basePath . \"/../vendor/setasign/fpdi_pdf-parser/pdf_parser.php\");\n require_once(\\yii::$app->basePath . \"/../vendor/setasign/setapdf-signer/library/SetaPDF/Autoload.php\");\n \n\n return parent::init(); \n }", "title": "" }, { "docid": "dbcf543ed79a4e8ef6234c5a65ed4477", "score": "0.4080068", "text": "public function __construct(Filesystem $files, SchemaParser $schemaParser)\n {\n parent::__construct($files);\n\n $this->schemaParser = $schemaParser;\n }", "title": "" }, { "docid": "50508791de268e9c51bc92721b253614", "score": "0.40796894", "text": "public function definition()\n {\n global $CFG;\n \n $mform = $this->_form; // Don't forget the underscore!\n \n if(!empty($this->_customdata)) {\n $fid = $this->_customdata['fid']; // this contains the data of this form\n }\n \n if(!empty($fid)) {\n $mform->addElement('hidden','fid',$fid );\n $mform->setType('fid', PARAM_INT);\n }\n \n $label = get_string('formalcheck', 'local_stbehaviour');\n $mform->addElement('header', 'general', $label);\n \n $mform->addElement('text', 'rulename', get_string('rulename','local_stbehaviour'));\n\t\t$mform->addRule('rulename', get_string('err_lettersonly','local_stbehaviour'), 'required', null, 'client');\n\t\t$mform->setType('rulename', PARAM_TEXT);\n \n $mform->addElement('select', 'ruletype', get_string('ruletype','local_stbehaviour'), array('1'=>1, '2'=>2,'3'=>3, '4'=>4,'5'=>5), $attributes=array());\n\t\t\n\t\t$mform->addElement('text', 'compvalue', get_string('compvalue','local_stbehaviour'));\n\t\t$mform->addRule('compvalue', get_string('err_alphanumeric','local_stbehaviour'), 'required', null, 'client');\n $mform->setType('compvalue', PARAM_TEXT); \n\t\t\n\t\t$mform->addElement('text', 'points', get_string('points','local_stbehaviour'));\n\t\t$mform->addRule('points', get_string('err_numeric','local_stbehaviour'), 'required', null, 'client');\n\t\t$mform->addRule('points', get_string('numeric','local_stbehaviour'), 'numeric', null, 'client');\n $mform->setType('points', PARAM_INT); \n\t\t\n $label = get_string('description', 'local_stbehaviour');\n $mform->addElement('editor', 'description', $label, null);\n $mform->setType('description', PARAM_TEXT);\n \n $this->add_action_buttons();\n \n }", "title": "" }, { "docid": "c5d2a0819b6fbaa367b55ea91fc04fda", "score": "0.40752235", "text": "public function resolveFiles()\n\t{\n\t\t// Step 1.: fetch all files.\n\t\t$this->collectFiles();\n\n\t\t// TODO: check if downloading is allowed and send file to browser then\n\t\t// see https://github.com/MetaModels/attribute_file/issues/6\n\t\tif ((!$this->getShowImages()) && ($strFile = \\Input::getInstance()->get('file')) && in_array($strFile, $this->foundFiles))\n\t\t{\n\t\t\tMetaModelController::getInstance()->sendFileToBrowser($strFile);\n\t\t}\n\n\t\t// Step 2.: Fetch all meta data for the found files.\n\t\tif (version_compare(VERSION, '3', '<'))\n\t\t{\n\t\t\t$this->parseMetaFilesPre3();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->parseMetaFiles();\n\t\t}\n\n\t\t// Step 3.: fetch additional information like modification time etc. and prepare the output buffer.\n\t\t$this->fetchAdditionalData();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d45749692e84473b409975080a16f7ff", "score": "0.40733004", "text": "public function __construct(RegFinance $rf, $pdf_path, $x)\n {\n $this->rf = $rf;\n $this->event = Event::find($this->rf->eventID);\n $this->org = Org::find($this->event->orgID);\n $this->loc = Location::find($this->event->locationID);\n $this->tkt = Ticket::find($this->rf->ticketID);\n $this->array = $x;\n $this->attachment = $pdf_path;\n }", "title": "" }, { "docid": "b037ed3d70325b739687be2c7ce570a4", "score": "0.40722823", "text": "function registerSchemas()\n {\n $this->SCHEMA = $this->ENVIRONMENT->createSchema($this->SCHEMA->getValue(), $this->HYPERSCHEMA, \"http://json-schema.org/draft-00/schema#\");\n $this->HYPERSCHEMA = $this->ENVIRONMENT->createSchema($this->HYPERSCHEMA->getValue(), $this->HYPERSCHEMA, \"http://json-schema.org/draft-00/hyper-schema#\");\n $this->LINKS = $this->ENVIRONMENT->createSchema($this->LINKS->getValue(), $this->HYPERSCHEMA, \"http://json-schema.org/draft-00/links#\");\n \n //\n // draft-01\n //\n $SCHEMA_01_JSON = parent::getSchemaArray();\n $SCHEMA_01_JSON['$schema'] = \"http://json-schema.org/draft-01/hyper-schema#\";\n $SCHEMA_01_JSON['id'] = \"http://json-schema.org/draft-01/schema#\";\n \n $HYPERSCHEMA_01_JSON = parent::getHyperSchemaArray();\n $HYPERSCHEMA_01_JSON['$schema'] = \"http://json-schema.org/draft-01/hyper-schema#\";\n $HYPERSCHEMA_01_JSON['id'] = \"http://json-schema.org/draft-01/hyper-schema#\";\n \n $LINKS_01_JSON = parent::getLinksArray();\n $LINKS_01_JSON['$schema'] = \"http://json-schema.org/draft-00/hyper-schema#\";\n $LINKS_01_JSON['id'] = \"http://json-schema.org/draft-00/links#\";\n \n $this->ENVIRONMENT->setOption(\"defaultSchemaURI\", \"http://json-schema.org/draft-01/schema#\"); //update later\n \n $this->SCHEMA = $this->ENVIRONMENT->createSchema($SCHEMA_01_JSON, true, \"http://json-schema.org/draft-01/schema#\");\n $this->HYPERSCHEMA = $this->ENVIRONMENT->createSchema(JSV::inherits($this->SCHEMA,\n $this->ENVIRONMENT->createSchema($HYPERSCHEMA_01_JSON,\n true,\n \"http://json-schema.org/draft-01/hyper-schema#\"),\n true), true, \"http://json-schema.org/draft-01/hyper-schema#\");\n \n $this->ENVIRONMENT->setOption(\"defaultSchemaURI\", \"http://json-schema.org/draft-01/hyper-schema#\");\n \n $this->LINKS = $this->ENVIRONMENT->createSchema($LINKS_01_JSON, $this->HYPERSCHEMA, \"http://json-schema.org/draft-01/links#\");\n \n //We need to reinitialize these 3 schemas as they all reference each other\n $this->SCHEMA = $this->ENVIRONMENT->createSchema($this->SCHEMA->getValue(), $this->HYPERSCHEMA, \"http://json-schema.org/draft-01/schema#\");\n $this->HYPERSCHEMA = $this->ENVIRONMENT->createSchema($this->HYPERSCHEMA->getValue(), $this->HYPERSCHEMA,\n \"http://json-schema.org/draft-01/hyper-schema#\");\n $this->LINKS = $this->ENVIRONMENT->createSchema($this->LINKS->getValue(), $this->HYPERSCHEMA, \"http://json-schema.org/draft-01/links#\");\n }", "title": "" }, { "docid": "38cd0450c4a7f915dc24bef6dcc9eea2", "score": "0.40711865", "text": "public function __construct(){\n //libxml_use_internal_errors(true);\n }", "title": "" }, { "docid": "165f3a597bedc1b98c270cb972634499", "score": "0.4069082", "text": "protected function fillServerValidators()\n {\n // TODO: Add RegEx validator for hostname\n $this->setValidator('hostname', new sfValidatorString(['required' => true]));\n $this->setValidator('ns1prefix', new sfValidatorString(['required' => true]));\n $this->setValidator('ns2prefix', new sfValidatorString(['required' => true]));\n $currentPassword = $this->getObject()->getParamValue('rootpw');\n $this->setValidator('rootpw', new sfValidatorString(['required' => !$currentPassword]));\n }", "title": "" }, { "docid": "1fd619a15eb939d20b0b25b43ab5aa9a", "score": "0.4067556", "text": "function __construct() {\n\t\tif (self::$config === false) {\n\t\t\tself::$config = new FileSystem_File(\n\t\t\t\tROOT_BACK.MODELS_DIRECTORY.DS.'DateParser'.DS,\n\t\t\t\t'settings.xml'\n\t\t\t);\n\t\t\tself::$config->open('read','settings');\n\t\t}\n\t}", "title": "" }, { "docid": "6492c03ad74e993c776e6486a117d50c", "score": "0.40634492", "text": "function wpcf_fields_url() {\n return array(\n 'id' => 'wpcf-url',\n 'title' => 'URL',\n 'description' => 'URL',\n 'validate' => array(\n 'required' => array(\n 'form-settings' => include( dirname( __FILE__ ) . '/patterns/validate/form-settings/required.php' )\n ),\n 'url' => array(\n 'form-settings' => include( dirname( __FILE__ ) . '/patterns/validate/form-settings/url.php' )\n ),\n ),\n 'inherited_field_type' => 'textfield',\n 'font-awesome' => 'globe',\n );\n}", "title": "" }, { "docid": "3415df072d7e9782f997097431296078", "score": "0.4059412", "text": "public function __construct(?string $baseShape = null, ?bool $includeMimeContent = null, ?string $bodyType = null, ?string $uniqueBodyType = null, ?string $normalizedBodyType = null, ?bool $filterHtmlContent = null, ?bool $convertHtmlCodePageToUTF8 = null, ?string $inlineImageUrlTemplate = null, ?bool $blockExternalImages = null, ?bool $addBlankTargetToLinks = null, ?int $maximumBodySize = null, ?\\StructType\\EwsNonEmptyArrayOfPathsToElementType $additionalProperties = null)\n {\n $this\n ->setBaseShape($baseShape)\n ->setIncludeMimeContent($includeMimeContent)\n ->setBodyType($bodyType)\n ->setUniqueBodyType($uniqueBodyType)\n ->setNormalizedBodyType($normalizedBodyType)\n ->setFilterHtmlContent($filterHtmlContent)\n ->setConvertHtmlCodePageToUTF8($convertHtmlCodePageToUTF8)\n ->setInlineImageUrlTemplate($inlineImageUrlTemplate)\n ->setBlockExternalImages($blockExternalImages)\n ->setAddBlankTargetToLinks($addBlankTargetToLinks)\n ->setMaximumBodySize($maximumBodySize)\n ->setAdditionalProperties($additionalProperties);\n }", "title": "" }, { "docid": "33a69cbdfd80d44431a170f14235aaf1", "score": "0.40573967", "text": "public function init()\n {\n parent::init();\n try {\n $this->_registerElements();\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "a652fa25e97ee9e37f018372cc6e576f", "score": "0.40555853", "text": "function &factory($version)\n {\n if (!in_array($version{0}, array('1', '2'))) {\n $a = false;\n return $a;\n }\n\n include_once 'phar://go-pear.phar/' . 'PEAR/PackageFile/v' . $version{0} . '.php';\n $version = $version{0};\n $class = $this->getClassPrefix() . $version;\n $a = new $class;\n return $a;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from its toArray() method\n *\n * WARNING: no validation is performed, the array is assumed to be valid,\n * always parse from xml if you want validation.\n * @param array $arr\n * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2\n * @uses factory() to construct the returned object.\n */\n function &fromArray($arr)\n {\n if (isset($arr['xsdversion'])) {\n $obj = &$this->factory($arr['xsdversion']);\n if ($this->_logger) {\n $obj->setLogger($this->_logger);\n }\n\n $obj->setConfig($this->_config);\n $obj->fromArray($arr);\n return $obj;\n }\n\n if (isset($arr['package']['attribs']['version'])) {\n $obj = &$this->factory($arr['package']['attribs']['version']);\n } else {\n $obj = &$this->factory('1.0');\n }\n\n if ($this->_logger) {\n $obj->setLogger($this->_logger);\n }\n\n $obj->setConfig($this->_config);\n $obj->fromArray($arr);\n return $obj;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from an XML string.\n * @access public\n * @param string $data contents of package.xml file\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @param string $file full path to the package.xml file (and the files\n * it references)\n * @param string $archive optional name of the archive that the XML was\n * extracted from, if any\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses parserFactory() to construct a parser to load the package.\n */\n function &fromXmlString($data, $state, $file, $archive = false)\n {\n if (preg_match('/<package[^>]+version=[\\'\"]([0-9]+\\.[0-9]+)[\\'\"]/', $data, $packageversion)) {\n if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) {\n return PEAR::raiseError('package.xml version \"' . $packageversion[1] .\n '\" is not supported, only 1.0, 2.0, and 2.1 are supported.');\n }\n\n $object = &$this->parserFactory($packageversion[1]);\n if ($this->_logger) {\n $object->setLogger($this->_logger);\n }\n\n $object->setConfig($this->_config);\n $pf = $object->parse($data, $file, $archive);\n if (PEAR::isError($pf)) {\n return $pf;\n }\n\n if ($this->_rawReturn) {\n return $pf;\n }\n\n if (!$pf->validate($state)) {;\n if ($this->_config->get('verbose') > 0\n && $this->_logger && $pf->getValidationWarnings(false)\n ) {\n foreach ($pf->getValidationWarnings(false) as $warning) {\n $this->_logger->log(0, 'ERROR: ' . $warning['message']);\n }\n }\n\n $a = PEAR::raiseError('Parsing of package.xml from file \"' . $file . '\" failed',\n 2, null, null, $pf->getValidationWarnings());\n return $a;\n }\n\n if ($this->_logger && $pf->getValidationWarnings(false)) {\n foreach ($pf->getValidationWarnings() as $warning) {\n $this->_logger->log(0, 'WARNING: ' . $warning['message']);\n }\n }\n\n if (method_exists($pf, 'flattenFilelist')) {\n $pf->flattenFilelist(); // for v2\n }\n\n return $pf;\n } elseif (preg_match('/<package[^>]+version=[\\'\"]([^\"\\']+)[\\'\"]/', $data, $packageversion)) {\n $a = PEAR::raiseError('package.xml file \"' . $file .\n '\" has unsupported package.xml <package> version \"' . $packageversion[1] . '\"');\n return $a;\n } else {\n if (!class_exists('PEAR_ErrorStack')) {\n require_once 'phar://go-pear.phar/' . 'PEAR/ErrorStack.php';\n }\n\n PEAR_ErrorStack::staticPush('PEAR_PackageFile',\n PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION,\n 'warning', array('xml' => $data), 'package.xml \"' . $file .\n '\" has no package.xml <package> version');\n $object = &$this->parserFactory('1.0');\n $object->setConfig($this->_config);\n $pf = $object->parse($data, $file, $archive);\n if (PEAR::isError($pf)) {\n return $pf;\n }\n\n if ($this->_rawReturn) {\n return $pf;\n }\n\n if (!$pf->validate($state)) {\n $a = PEAR::raiseError('Parsing of package.xml from file \"' . $file . '\" failed',\n 2, null, null, $pf->getValidationWarnings());\n return $a;\n }\n\n if ($this->_logger && $pf->getValidationWarnings(false)) {\n foreach ($pf->getValidationWarnings() as $warning) {\n $this->_logger->log(0, 'WARNING: ' . $warning['message']);\n }\n }\n\n if (method_exists($pf, 'flattenFilelist')) {\n $pf->flattenFilelist(); // for v2\n }\n\n return $pf;\n }\n }\n\n /**\n * Register a temporary file or directory. When the destructor is\n * executed, all registered temporary files and directories are\n * removed.\n *\n * @param string $file name of file or directory\n * @return void\n */\n function addTempFile($file)\n {\n $GLOBALS['_PEAR_Common_tempfiles'][] = $file;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a compressed Tar or Tgz file.\n * @access public\n * @param string contents of package.xml file\n * @param int package state (one of PEAR_VALIDATE_* constants)\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @using Archive_Tar to extract the files\n * @using fromPackageFile() to load the package after the package.xml\n * file is extracted.\n */\n function &fromTgzFile($file, $state)\n {\n if (!class_exists('Archive_Tar')) {\n require_once 'phar://go-pear.phar/' . 'Archive/Tar.php';\n }\n\n $tar = new Archive_Tar($file);\n if ($this->_debug <= 1) {\n $tar->pushErrorHandling(PEAR_ERROR_RETURN);\n }\n\n $content = $tar->listContent();\n if ($this->_debug <= 1) {\n $tar->popErrorHandling();\n }\n\n if (!is_array($content)) {\n if (is_string($file) && strlen($file < 255) &&\n (!file_exists($file) || !@is_file($file))) {\n $ret = PEAR::raiseError(\"could not open file \\\"$file\\\"\");\n return $ret;\n }\n\n $file = realpath($file);\n $ret = PEAR::raiseError(\"Could not get contents of package \\\"$file\\\"\".\n '. Invalid tgz file.');\n return $ret;\n }\n\n if (!count($content) && !@is_file($file)) {\n $ret = PEAR::raiseError(\"could not open file \\\"$file\\\"\");\n return $ret;\n }\n\n $xml = null;\n $origfile = $file;\n foreach ($content as $file) {\n $name = $file['filename'];\n if ($name == 'package2.xml') { // allow a .tgz to distribute both versions\n $xml = $name;\n break;\n }\n\n if ($name == 'package.xml') {\n $xml = $name;\n break;\n } elseif (preg_match('/package.xml$/', $name, $match)) {\n $xml = $name;\n break;\n }\n }\n\n $tmpdir = System::mktemp('-t \"' . $this->_config->get('temp_dir') . '\" -d pear');\n if ($tmpdir === false) {\n $ret = PEAR::raiseError(\"there was a problem with getting the configured temp directory\");\n return $ret;\n }\n\n PEAR_PackageFile::addTempFile($tmpdir);\n\n $this->_extractErrors();\n PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));\n\n if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {\n $extra = implode(\"\\n\", $this->_extractErrors());\n if ($extra) {\n $extra = ' ' . $extra;\n }\n\n PEAR::staticPopErrorHandling();\n $ret = PEAR::raiseError('could not extract the package.xml file from \"' .\n $origfile . '\"' . $extra);\n return $ret;\n }\n\n PEAR::staticPopErrorHandling();\n $ret = &PEAR_PackageFile::fromPackageFile(\"$tmpdir/$xml\", $state, $origfile);\n return $ret;\n }\n\n /**\n * helper callback for extracting Archive_Tar errors\n *\n * @param PEAR_Error|null $err\n * @return array\n * @access private\n */\n function _extractErrors($err = null)\n {\n static $errors = array();\n if ($err === null) {\n $e = $errors;\n $errors = array();\n return $e;\n }\n $errors[] = $err->getMessage();\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a package.xml file.\n *\n * @access public\n * @param string $descfile name of package xml file\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @param string|false $archive name of the archive this package.xml came\n * from, if any\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses PEAR_PackageFile::fromXmlString to create the oject after the\n * XML is loaded from the package.xml file.\n */\n function &fromPackageFile($descfile, $state, $archive = false)\n {\n $fp = false;\n if (is_string($descfile) && strlen($descfile) < 255 &&\n (\n !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile)\n || (!$fp = @fopen($descfile, 'r'))\n )\n ) {\n $a = PEAR::raiseError(\"Unable to open $descfile\");\n return $a;\n }\n\n // read the whole thing so we only get one cdata callback\n // for each block of cdata\n fclose($fp);\n $data = file_get_contents($descfile);\n $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive);\n return $ret;\n }\n\n /**\n * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file.\n *\n * This method is able to extract information about a package from a .tgz\n * archive or from a XML package definition file.\n *\n * @access public\n * @param string $info file name\n * @param int $state package state (one of PEAR_VALIDATE_* constants)\n * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2\n * @uses fromPackageFile() if the file appears to be XML\n * @uses fromTgzFile() to load all non-XML files\n */\n function &fromAnyFile($info, $state)\n {\n if (is_dir($info)) {\n $dir_name = realpath($info);\n if (file_exists($dir_name . '/package.xml')) {\n $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state);\n } elseif (file_exists($dir_name . '/package2.xml')) {\n $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state);\n } else {\n $info = PEAR::raiseError(\"No package definition found in '$info' directory\");\n }\n\n return $info;\n }\n\n $fp = false;\n if (is_string($info) && strlen($info) < 255 &&\n (file_exists($info) || ($fp = @fopen($info, 'r')))\n ) {\n\n if ($fp) {\n fclose($fp);\n }\n\n $tmp = substr($info, -4);\n if ($tmp == '.xml') {\n $info = &PEAR_PackageFile::fromPackageFile($info, $state);\n } elseif ($tmp == '.tar' || $tmp == '.tgz') {\n $info = &PEAR_PackageFile::fromTgzFile($info, $state);\n } else {\n $fp = fopen($info, 'r');\n $test = fread($fp, 5);\n fclose($fp);\n if ($test == '<?xml') {\n $info = &PEAR_PackageFile::fromPackageFile($info, $state);\n } else {\n $info = &PEAR_PackageFile::fromTgzFile($info, $state);\n }\n }\n\n return $info;\n }\n\n $info = PEAR::raiseError(\"Cannot open '$info' for parsing\");\n return $info;\n }\n}", "title": "" }, { "docid": "8722ab81add7488c85740315fa85c2a7", "score": "0.40504727", "text": "public function loadXml($string)\n {\n\n //print_r($string);\n\n //$xml = new \\SimpleXMLElement($string, null, null, 'cfdi', true);\n $xml = simplexml_load_string($string, null, null, 'cfdi', true);\n\n $this->setLugarExpedicion($xml->attributes()->LugarExpedicion);\n $this->setFolio($xml->attributes()->folio);\n $this->setFecha(new \\DateTime($xml->attributes()->fecha));\n $this->setFormaPago($xml->attributes()->formaDePago);\n $this->setTipoComprobante($xml->attributes()->tipoDeComprobante);\n $this->setNumeroCertificado($xml->attributes()->noCertificado);\n $this->setSubTotal($xml->attributes()->subTotal);\n $this->setTotal($xml->attributes()->total);\n\n // Emisor\n\n $this->setEmisorRfc((string) $xml->children('cfdi', true)->Emisor->attributes()->rfc);\n $this->setEmisorNombre((string) $xml->children('cfdi', true)->Emisor->attributes()->nombre);\n $this->setEmisorCalle((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->calle);\n $this->setEmisorNumExterior((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->noExterior);\n $this->setEmisorColonia((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->colonia);\n $this->setEmisorMunicipio((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->municipio);\n $this->setEmisorEstado((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->estado);\n $this->setEmisorPais((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->pais);\n $this->setEmisorCp((string) $xml->children('cfdi', true)->Emisor->DomicilioFiscal->attributes()->codigoPostal);\n\n // Receptor\n\n $this->setReceptorRfc((string) $xml->children('cfdi', true)->Receptor->attributes()->rfc);\n $this->setReceptorNombre((string) $xml->children('cfdi', true)->Receptor->attributes()->nombre);\n $this->setReceptorCalle((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->calle);\n $this->setReceptorNumExterior((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->noExterior);\n $this->setReceptorColonia((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->colonia);\n $this->setReceptorMunicipio((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->municipio);\n $this->setReceptorEstado((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->estado);\n $this->setReceptorPais((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->pais);\n $this->setReceptorCp((string) $xml->children('cfdi', true)->Receptor->Domicilio->attributes()->codigoPostal);\n\n // Conceptos\n /*\n <cfdi:Conceptos><cfdi:Concepto cantidad=\"63.00\" unidad=\"PZ\" descripcion=\"10001 GARRAFON BONAFONT 20L\" valorUnitario=\"18.00\" importe=\"1134.00\"/>\n </cfdi:Conceptos>\n */\n\n // Impuestos\n // Condiciona los Impuestos\n\n\n if(count($xml->children('cfdi', true)->Impuestos->attributes())) {\n\n $this->setTotalImpuestoTrasladado($xml->children('cfdi', true)->Impuestos->attributes()->totalImpuestosTrasladados);\n $this->setImpuesto($xml->children('cfdi', true)->Impuestos->Traslados->Traslado->attributes()->impuesto);\n $this->setTasa($xml->children('cfdi', true)->Impuestos->Traslados->Traslado->attributes()->tasa);\n $this->setImporte($xml->children('cfdi', true)->Impuestos->Traslados->Traslado->attributes()->importe);\n\n }\n else {\n\n $this->setTotalImpuestoTrasladado(0);\n $this->setImpuesto(0);\n $this->setTasa(0);\n $this->setImporte(0);\n\n }\n\n\n // Complementos\n\n $this->setUuid($xml->children('cfdi', true)->Complemento->children('tfd', true)->TimbreFiscalDigital->attributes()->UUID);\n $this->setFechaTimbrado(new \\DateTime($xml->children('cfdi', true)->Complemento->children('tfd', true)->TimbreFiscalDigital->attributes()->FechaTimbrado));\n\n }", "title": "" }, { "docid": "b14812be43be4b137b37c07bcd5ce83a", "score": "0.40503", "text": "public function __construct($source, $http_timeout=NULL, $fix_entities_encoding=NULL)\n\t{\n\t\tif (is_bool($http_timeout)) {\n\t\t\t$fix_entities_encoding = $http_timeout;\n\t\t\t$http_timeout = NULL;\n\t\t}\n\n\t\t// Prevent spitting out errors to we can throw exceptions\n\t\t$old_setting = libxml_use_internal_errors(TRUE);\n\n\t\t$exception_message = NULL;\n\t\ttry {\n\t\t\tif ($source instanceof fFile && $fix_entities_encoding) {\n\t\t\t\t$source = $source->read();\n\t\t\t}\n\n\t\t\tif ($source instanceof DOMElement) {\n\t\t\t\t$this->__dom = $source;\n\t\t\t\t$xml = TRUE;\n\n\t\t\t} elseif ($source instanceof fFile) {\n\t\t\t\t$xml = simplexml_load_file($source->getPath());\n\n\t\t\t// This handles URLs specially by adding a reasonable timeout\n\t\t\t} elseif (preg_match('#^(?P<protocol>http(s)?)://#', $source, $matches)) {\n\n\t\t\t\tif ($http_timeout === NULL) {\n\t\t\t\t\t$http_timeout = ini_get('default_socket_timeout');\n\t\t\t\t}\n\n\t\t\t\t// We use the appropriate protocol here so PHP can supress IIS https:// warnings\n\t\t\t\t$context = stream_context_create(array(\n\t\t\t\t\t$matches['protocol'] => array('timeout' => $http_timeout)\n\t\t\t\t));\n\n\t\t\t\t// If the URL is not loaded in time, this supresses the file_get_contents() warning\n\t\t\t\tfCore::startErrorCapture(E_WARNING);\n\t\t\t\t$xml = file_get_contents($source, 0, $context);\n\t\t\t\tfCore::stopErrorCapture();\n\n\t\t\t\tif (!$xml) {\n\t\t\t\t\tthrow new fExpectedException('The URL specified, %s, could not be loaded', $source);\n\t\t\t\t}\n\n\t\t\t\tif ($fix_entities_encoding) {\n\t\t\t\t\t$xml = $this->fixEntitiesEncoding($xml);\n\t\t\t\t}\n\n\t\t\t\t$xml = new SimpleXMLElement($xml);\n\n\t\t\t} else {\n\t\t\t\t$is_path = $source && !preg_match('#^\\s*<#', $source);\n\n\t\t\t\tif ($fix_entities_encoding) {\n\t\t\t\t\tif ($is_path) {\n\t\t\t\t\t\t$source = file_get_contents($source);\n\t\t\t\t\t\t$is_path = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\t$source = $this->fixEntitiesEncoding($source);\n\t\t\t\t}\n\n\t\t\t\t$xml = new SimpleXMLElement($source, 0, $is_path);\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\t$exception_message = $e->getMessage();\n\t\t\t$xml = FALSE;\n\t\t}\n\n\t\t// We want it to be clear when XML parsing issues occur\n\t\tif ($xml === FALSE) {\n\t\t\t$errors = libxml_get_errors();\n\t\t\tforeach ($errors as $error) {\n\t\t\t\t$exception_message .= \"\\n\" . rtrim($error->message);\n\t\t\t}\n\t\t\t// If internal errors were off before, turn them back off\n\t\t\tif (!$old_setting) {\n\t\t\t\tlibxml_use_internal_errors(FALSE);\n\t\t\t}\n\t\t\tthrow new fValidationException(str_replace('%', '%%', $exception_message));\n\t\t}\n\n\t\tif (!$old_setting) {\n\t\t\tlibxml_use_internal_errors(FALSE);\n\t\t}\n\n\t\tif (!$this->__dom) {\n\t\t\t$this->__dom = dom_import_simplexml($xml);\n\t\t}\n\n\t\tif ($this->__dom->namespaceURI && $this->__dom->prefix == '') {\n\t\t\t$this->addCustomPrefix('__', $this->__dom->namespaceURI);\n\t\t}\n\t}", "title": "" }, { "docid": "9d1536adb0a9cc46fcfde44b195a6e56", "score": "0.40493613", "text": "protected function validateSchema($schemafilepath)\n\t {\n\t\t$domdocument = new SerializableDOMDocument();\n\t\t$rootelement = $domdocument->createElement(\"rootelement\");\n\t\t$domdocument->appendChild($rootelement);\n\n\t\t$this->_registerSchemaMappings();\n\n\t\t$this->prepareForXMLerrors();\n\t\tset_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext)\n\t\t {\n\t\t\tunset($errno);\n\t\t\tunset($errfile);\n\t\t\tunset($errline);\n\t\t\tunset($errcontext);\n\t\t\tif (preg_match(\"/DOMDocument::schemaValidate\\(\\): Invalid Schema/\", $errstr) > 0)\n\t\t\t {\n\t\t\t\t$exceptiontext = _(\"Invalid schema was provided\");\n\t\t\t\tif ($this->getXMLerrors() !== false)\n\t\t\t\t {\n\t\t\t\t\t$exceptiontext .= _(\", encountered errors:\") . \" \" . $this->getXMLerrors();\n\t\t\t\t }\n\n\t\t\t\t$this->clearXMLerrors();\n\t\t\t\trestore_error_handler();\n\t\t\t\tthrow new Exception($exceptiontext, EXCEPTION_INVALID_SCHEMA);\n\t\t\t }\n\t\t }, E_WARNING);\n\n\t\t$domdocument->schemaValidate($schemafilepath);\n\t\trestore_error_handler();\n\n\t\t$this->clearXMLerrors();\n\t }", "title": "" }, { "docid": "785d6c925bb1089625e0b4750de6a167", "score": "0.40464994", "text": "public function __construct()\r\n {\r\n $this->validations = [\r\n ];\r\n\r\n //set live validations on field\r\n $this->liveValidations = [\r\n ];\r\n\r\n //set field info\r\n $this->fieldInfo = [\r\n 'help' => '',\r\n ];\r\n\r\n //set presentation view\r\n $this->setPresentation('custom.sizes');\r\n\r\n //init sizes\r\n $this->_sizeData = $this->getSizesData();\r\n }", "title": "" }, { "docid": "eb508b13ab84bad18375486a872fa358", "score": "0.40457058", "text": "private function __construct()\n {\n foreach ($this->helper as $hlp) {\n if(file_exists(HELPER.$hlp.'php')) {\n require_once HELPER.$hlp.'php';\n }\n }\n \n foreach($this->entity as $hlp) {\n if(file_exists(ENTITY.ucfirst($hlp).'php')) {\n require_once ENTITY.ucfirst($hlp).'php';\n }\n }\n \n foreach ($this->classe as $hlp) {\n if(file_exists(CLASSE.ucfirst($hlp).'php')) {\n require_once CLASSE.ucfirst($hlp).'php';\n }\n }\n \n foreach($this->manager as $hlp) {\n if(file_exists(MANAGER.ucfirst($hlp).'php')) {\n require_once MANAGER.ucfirst($hlp).'php';\n }\n }\n $this->register();\n }", "title": "" }, { "docid": "a7a54643d21b1c964123812703bd445d", "score": "0.40411654", "text": "public function __construct() {\n\n $this->plugin_name = 'mihdan-noexternallinks';\n\t\t$this->version = '4.2.2';\n $this->options_prefix = 'mihdan_noexternallinks_';\n\n $upload_dir = wp_upload_dir();\n $custom_parser = $upload_dir['basedir'] . '/custom-parser.php';\n\n $this->custom_parser = false;\n if ( file_exists( $custom_parser ) ) {\n $this->custom_parser = $custom_parser;\n }\n\n\t\t$this->load_dependencies();\n $this->compatibility_check();\n $this->install();\n $this->upgrade();\n\t\t$this->set_locale();\n $this->set_options();\n $this->initiate();\n\t\t$this->define_admin_hooks();\n\t\t$this->define_public_hooks();\n\n\t}", "title": "" }, { "docid": "2af7e930700d52aa490693fae3ae7232", "score": "0.40368813", "text": "function __construct()\n {\n $this->fileManager = new FileManager();\n $this->pdf = new DocumentPDF('P', 'mm', 'A4', true, 'UTF-8', false);\n return;\n }", "title": "" }, { "docid": "0f074b61e59a0c5c2d1062efa3288f15", "score": "0.4036562", "text": "private function __construct()\n\t{\n\t\tforeach ($_FILES as &$file) {\n\t\t\t$file['path'] = $file['tmp_name'];\n\t\t}\n\n\t\t$this->request = $this->requestParams = new Map (array_merge ($_REQUEST, $_FILES));\n\t\t$this->server = $this->serverParams = new Map ($_SERVER);\n\t\t$this->cookies = new Map ($_COOKIE);\n\n\t\t$this->registeredServices = new Map();\n\t\t$this->input = new Map([ 'contentType' => Text::toLowerCase(Text::trim(Text::split(\";\", $this->server->CONTENT_TYPE)->get(0))), 'size' => $this->server->CONTENT_LENGTH, 'path' => 'php://input' ]);\n\n\t\tswitch ($this->input->contentType)\n\t\t{\n\t\t\tcase 'application/x-www-form-urlencoded':\n\t\t\tcase 'multipart/form-data':\n\t\t\t\tbreak;\n\n\t\t\tcase 'application/json':\n\t\t\t\t$value = file_get_contents($this->input->path);\n\t\t\t\t$this->input->data = !$value ? new Map() : ($value[0] == '[' ? Arry::fromNativeArray(json_decode($value, true)) : ($value[0] == '{' ? Map::fromNativeArray(json_decode($value, true)) : json_decode($value, true)));\n\t\t\t\tbreak;\n\n\t\t\tcase 'text':\n\t\t\t\t$this->input->data = file_get_contents($this->input->path);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "102decb91ef28b1addae15ea71f743c8", "score": "0.40338546", "text": "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n $validator->sometimes('media_id', 'required|integer', function ($input) {\n return\n $input['type'] == AppDocument::TYPE_DOWNLOAD\n || $input['type'] == AppDocument::TYPE_SIGNATURE;\n });\n\n $validator->sometimes('media_id', 'media:application/pdf', function ($input) {\n return $input['type'] == AppDocument::TYPE_SIGNATURE;\n });\n\n $validator->sometimes('metadata.registrator', 'required', function ($input) {\n return $input['type'] == AppDocument::TYPE_SIGNATURE;\n });\n\n return $validator;\n }", "title": "" }, { "docid": "10b92b602f644f35243618ca29c1d940", "score": "0.40318802", "text": "function __construct(){\n\t\t\t$this->InformacionAduanera = new CFDInformacionAduanera();\n\t\t\t$this->CuentaPredial = new CFDCuentaPredial();\n\t\t}", "title": "" }, { "docid": "d124a4a0c0aeafe5c9d907e3b202631e", "score": "0.40312526", "text": "public function construct() {\r\n\t\tparent::construct();\r\n\t\t\r\n\t\t$this->addDateFields(array(\"dateapproved\",\"startdate\",\"invoicedate\",\"enddate\"));\r\n\t\t\r\n\t\t# set the custom error messages\r\n \t$this->addCustomErrorMessages(array(\r\n \t\t\t\t\t\t\t\t\t\"servicetypeid.notblank\" => $this->translate->_(\"voucher_servicetypeid_error\"),\r\n \t\t\t\t\t\t\t\t\t\"hours.notblank\" => $this->translate->_(\"voucher_hours_error\")\r\n \t \t\t\t\t\t\t));\r\n\t}", "title": "" }, { "docid": "0e9cb6760e1e19cdd1ed631549f46cff", "score": "0.40302077", "text": "public function __construct(\\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\CRS $cRSConfig = null, \\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\TaxesAndFeesCharter $charter = null, $currencyCode = null, $customerReferenceNo = null, $languageCode = null, $recordset = null, $returnQSurcharge = null, \\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\Vayant $vayantConfig = null, \\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\TaxesAndFeesWeb $webFare = null)\n {\n $this\n ->setCRSConfig($cRSConfig)\n ->setCharter($charter)\n ->setCurrencyCode($currencyCode)\n ->setCustomerReferenceNo($customerReferenceNo)\n ->setLanguageCode($languageCode)\n ->setRecordset($recordset)\n ->setReturnQSurcharge($returnQSurcharge)\n ->setVayantConfig($vayantConfig)\n ->setWebFare($webFare);\n }", "title": "" }, { "docid": "c89cdbfd95ac5b0e64b38a56b30db06d", "score": "0.40300253", "text": "private function __construct()\n {\n $this->nsMapping = [];\n $this->fileMapping = [];\n $this->overrideDirs = [];\n }", "title": "" } ]
b403ea503ea974e7613cf7162bee1cab
Returns the node at relPath relative to this node. If relPath contains a path element that refers to a node with samename sibling nodes without explicitly including an index using the arraystyle notation ([x]), then the index [1] is assumed (indexing of same name siblings begins at 1, not 0, in order to preserve compatibility with XPath). Within the scope of a single Session object, if a Node object has been acquired, any subsequent call of getNode reacquiring the same node must return a Node object reflecting the same state as the earlier Node object. Whether this object is actually the same Node instance, or simply one wrapping the same state, is up to the implementation.
[ { "docid": "27d842a3bc361dd59308426f2b7eb471", "score": "0.7161496", "text": "public function getNode($relPath);", "title": "" } ]
[ { "docid": "bd180a64fe3a3fa1b6f914e9e6b80a90", "score": "0.5489902", "text": "public function getNode($path) {\n\t\t$absolutePath = $this->nodeService->normalizePath($path, $this->getPath());\n\t\t$node = $this->context->getFirstLevelNodeCache()->getByPath($absolutePath);\n\t\tif ($node !== FALSE) {\n\t\t\treturn $node;\n\t\t}\n\t\t$node = $this->nodeDataRepository->findOneByPathInContext($absolutePath, $this->context);\n\t\t$this->context->getFirstLevelNodeCache()->setByPath($absolutePath, $node);\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "8deb4fd03409a23b36ac303e354e0b49", "score": "0.54423946", "text": "public function getNode()\n {\n return clone $this->baseNode;\n }", "title": "" }, { "docid": "f5f1462136e30a05e7e289b9471cd474", "score": "0.528264", "text": "public function getRel(){\n\t\t$rel = $this->get('rel');\n\t\tif(empty($rel)){\n\t\t\t$rel = self::DEFAULT_REL;\n\t\t}\n\t\treturn $rel;\n\t}", "title": "" }, { "docid": "b4736752b9ef89620dc99f2e9c883cfc", "score": "0.51615685", "text": "public function getRel()\n {\n return $this->_rel;\n }", "title": "" }, { "docid": "8b385b6ef389a2ded1080981356389ed", "score": "0.5134699", "text": "public function getRel() {\r\n if (null != $this->rel) {\r\n return $this->rel;\r\n }\r\n $_ve = $this->getValueExpression(\"rel\");\r\n if ($_ve != null) {\r\n return $_ve->getValue($this->getFacesContext()->getELContext());\r\n } else {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "44050633db013fb5513865e3d56f2c4e", "score": "0.5075735", "text": "public function hasNode($relPath);", "title": "" }, { "docid": "6382026da94ee1671cbc852bc41891ba", "score": "0.5058083", "text": "public function getRelatedNode()\n {\n return $this->query->getQuery()->modelAsNode($this->related->nodeLabel());\n }", "title": "" }, { "docid": "adb2344173ca4624191607b5bdcbbecc", "score": "0.50407696", "text": "public function setRel($value)\n {\n $this->_rel = $value;\n return $this;\n }", "title": "" }, { "docid": "a9036bfd28a36b94a8e2878e6ef4cd0b", "score": "0.50316864", "text": "public function getNode()\n {\n return $this->_node;\n }", "title": "" }, { "docid": "0065d6b03571f74f97f8451f985716ef", "score": "0.501651", "text": "public function getNode() {\n\t\treturn $this->_node;\n\t}", "title": "" }, { "docid": "57a34adba26e90681f569012c50f926e", "score": "0.4998184", "text": "function get_node() {\n // shallow clone.\n return clone $this;\n }", "title": "" }, { "docid": "1b5b7c27705a844abb000f8bf4cd407b", "score": "0.49930093", "text": "public function getNode()\n {\n return $this->node;\n }", "title": "" }, { "docid": "1b5b7c27705a844abb000f8bf4cd407b", "score": "0.49930093", "text": "public function getNode()\n {\n return $this->node;\n }", "title": "" }, { "docid": "1b5b7c27705a844abb000f8bf4cd407b", "score": "0.49930093", "text": "public function getNode()\n {\n return $this->node;\n }", "title": "" }, { "docid": "1b5b7c27705a844abb000f8bf4cd407b", "score": "0.49930093", "text": "public function getNode()\n {\n return $this->node;\n }", "title": "" }, { "docid": "1b5b7c27705a844abb000f8bf4cd407b", "score": "0.49930093", "text": "public function getNode()\n {\n return $this->node;\n }", "title": "" }, { "docid": "eae88d35656830f7102a2f0234038be3", "score": "0.49862728", "text": "public function getNode() {\n return $this->node;\n }", "title": "" }, { "docid": "4561b7fd3c58505da9d9378a815bcc04", "score": "0.49588212", "text": "public function getNode($path = null)\n {\n if (!$this->getXml() instanceof Element) {\n return false;\n } elseif ($path === null) {\n return $this->getXml();\n } else {\n return $this->getXml()->descend($path);\n }\n }", "title": "" }, { "docid": "4a91bae4e293044a6316a80b3088b511", "score": "0.49508184", "text": "public function getNode($path = null)\n {\n if (!$this->getXml() instanceof Element) {\n return false;\n } elseif ($path === null) {\n return $this->getXml();\n } else {\n return $this->getXml()->xpath($path);\n }\n }", "title": "" }, { "docid": "d7ff1eeae1e702d1d11d8741f0999b15", "score": "0.48927104", "text": "public function getParent() {\n\t\tif ($this->getPath() === '/') {\n\t\t\treturn NULL;\n\t\t}\n\n\t\t$parentPath = $this->getParentPath();\n\t\t$node = $this->context->getFirstLevelNodeCache()->getByPath($parentPath);\n\t\tif ($node !== FALSE) {\n\t\t\treturn $node;\n\t\t}\n\t\t$node = $this->nodeDataRepository->findOneByPathInContext($parentPath, $this->context);\n\t\t$this->context->getFirstLevelNodeCache()->setByPath($parentPath, $node);\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "57cd9c77ed19449f4aab957ea9111353", "score": "0.48912206", "text": "public function getNode()\n {\n if (is_null($this->node)) {\n $this->node = $this->extract();\n }\n\n return $this->node;\n }", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.4736351", "text": "public function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.4736351", "text": "public function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.4736351", "text": "public function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.4736351", "text": "public function getNode();", "title": "" }, { "docid": "b05327b591472aa0b4e636ab2112e619", "score": "0.4736351", "text": "public function getNode();", "title": "" }, { "docid": "5d6d0fd2b55daf1c7ac79f36da1f0445", "score": "0.47310573", "text": "public function getNode($path)\n {\n $list = $this->getNodes($path);\n return (count($list) > 0 ? $list[0] : null);\n }", "title": "" }, { "docid": "087872915c44f0d44067925d66bd5001", "score": "0.47276476", "text": "public function getNodeByPath($path) {\n $path = $this->normalizePath($path);\n if (empty($this->objectsByPath[$path])) {\n $this->objectsByPath[$path] = jackalope_Factory::get(\n 'Node',\n array(\n $this->transport->getItem($path),\n $path,\n $this->session,\n $this\n )\n );\n }\n return $this->objectsByPath[$path];\n }", "title": "" }, { "docid": "622c025f39969aee8882c7c1fb99c15f", "score": "0.4723043", "text": "public function getFeedLink($rel = null)\n {\n if ($rel == null) {\n return $this->_feedLink;\n } else {\n foreach ($this->_feedLink as $feedLink) {\n if ($feedLink->rel == $rel) {\n return $feedLink;\n }\n }\n return null;\n }\n }", "title": "" }, { "docid": "529a0f4a7d339df59cd2b83da66a2b55", "score": "0.470212", "text": "public function getNode(): \\PhpParser\\Node;", "title": "" }, { "docid": "147cb6b8216101ccfdaeac849b9782c7", "score": "0.46874893", "text": "public function setRel(string $rel) {\n $this->attributes()->set('rel', $rel);\n return $this;\n }", "title": "" }, { "docid": "76fe1c788015dac09af765dadbd1110b", "score": "0.46588784", "text": "public function getRel(): string {\n return $this->attributes()->getValue('rel');\n }", "title": "" }, { "docid": "dfaa77c8a9bf4e5752025ebf9a20bab2", "score": "0.46578467", "text": "public function getRelId()\n {\n return $this->rel_id;\n }", "title": "" }, { "docid": "1bfdf195e55d5849e79287875fc1ac3b", "score": "0.46235093", "text": "public function getRightSibling(): ?Node\n {\n return $this->scoped()->siblings()\n ->where($this->getLeftColumnName(), '>', $this->getLeft())\n ->orderBy($this->getOrderColumnName(), 'asc')\n ->first();\n }", "title": "" }, { "docid": "7c83946026c5c16c540adafc331adf18", "score": "0.461265", "text": "public function getNodePath()\n {\n }", "title": "" }, { "docid": "b6ef8ceb713d42ba7130c4de2eddeca0", "score": "0.46118957", "text": "private function get_node() {\n\n\t\t$function = \"\\wpmoly\\utils\\\\{$this->attributes['type']}\\get\";\n\t\tif ( ! function_exists( $function ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->attributes['title'] ) ) {\n\t\t\t$this->node = $function( $this->attributes['id'] );\n\t\t\treturn $this->node;\n\t\t}\n\n\t\tif ( in_array( $this->attributes['type'], array( 'movie' ) ) ) {\n\t\t\t$object = get_page_by_title( $this->attributes['title'], OBJECT, $this->attributes['type'] );\n\t\t\tif ( empty( $object->ID ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$object_id = $object->ID;\n\t\t} elseif ( in_array( $this->attributes['type'], array( 'actor', 'collection', 'genre' ) ) ) {\n\t\t\t$object = get_term_by( 'name', $this->attributes['title'], $this->attributes['type'] );\n\t\t\tif ( empty( $object->term_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$object_id = $object->term_id;\n\t\t}\n\n\t\tif ( is_null( $object_id ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->node = $function( $object_id );\n\n\t\treturn $this->node;\n\t}", "title": "" }, { "docid": "1dbb6e3811c921966bd7367693eb249c", "score": "0.4564462", "text": "public function getProperty($relPath);", "title": "" }, { "docid": "f3290f3e4204d183bc64951793dc0640", "score": "0.4550444", "text": "public function getNode() : Node {\n return new Stmt\\Namespace_($this->name, $this->stmts, $this->attributes);\n }", "title": "" }, { "docid": "f9bee4374b7f3e19e9d85f56e4dc59a5", "score": "0.45312363", "text": "protected function getNode(): NodeElement\n {\n return $this->pageNode;\n }", "title": "" }, { "docid": "bfa3fae0a85ac25b6dd2089b65b3a1a9", "score": "0.4505663", "text": "public function rel(string $rootPath) : PhoreUri\n {\n if ( ! startsWith($this->uri, \"/\"))\n return new PhoreUri($this->uri);\n if ( ! startsWith($this->uri, $rootPath))\n throw new \\InvalidArgumentException(\"Path '$this->uri' is not a subpath of '$rootPath'\");\n $newUri = substr($this->uri, strlen($rootPath));\n if (startsWith($newUri, \"/\"))\n $newUri = substr($newUri, 1);\n return new PhoreUri($newUri);\n }", "title": "" }, { "docid": "e921bb8bef8f1b3397d92f2067878209", "score": "0.45035756", "text": "public function getNode($path)\n {\n $nodes = $this->getNodes($path);\n if ($nodes && ($nodes->length > 0)) {\n return $nodes->item(0);\n }\n\n return null;\n }", "title": "" }, { "docid": "2e6609febea5e7b2ab01019a4382310d", "score": "0.44997", "text": "public function addNode($relPath, $primaryNodeTypeName = null);", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "25202d789970ee6e4e7a537263ce47cb", "score": "0.44940633", "text": "public function getNode(): \\PhpParser\\Node {}", "title": "" }, { "docid": "c5ec34a40d0e972158bc0cc1603c651e", "score": "0.4493095", "text": "public function getPath() {\n return 'node/' . $this->getEntityId();\n }", "title": "" }, { "docid": "8924c5fc3af1a39056504095767feb8f", "score": "0.4485665", "text": "protected function getNode() : Node\\FunctionLike\n {\n assert($this->node !== null);\n\n return $this->node;\n }", "title": "" }, { "docid": "fbcb2d363a1c344aed2779751a308a8b", "score": "0.4479564", "text": "public function getNode(): ?DOMNode;", "title": "" }, { "docid": "58bc340dc27396dd8bed36bfc4a2712b", "score": "0.44788358", "text": "public static function retrieveNextSibling(NodeObject $node, PropelPDO $con = null);", "title": "" }, { "docid": "f919794ab9cfa187a29f1542b2744f56", "score": "0.44707817", "text": "private function getPath($node){\n return new Path($node);\n }", "title": "" }, { "docid": "ad74d725ec2e666eb0ac5be4872688fd", "score": "0.44411287", "text": "public function getMaterialisedPath($node);", "title": "" }, { "docid": "305139258ec8efe119150b5f2e0ad052", "score": "0.4437633", "text": "protected function relation(): Relation\n {\n if ($this->relation) {\n return $this->relation;\n }\n\n return $this->relation = $this->schema->relationship($this->fieldName);\n }", "title": "" }, { "docid": "4ae359c57ac5cd49df57cfcabec9d825", "score": "0.44237122", "text": "public function getRelationship()\n {\n if (array_key_exists(\"relationship\", $this->_propDict)) {\n if (is_a($this->_propDict[\"relationship\"], \"\\Beta\\Microsoft\\Graph\\Model\\ContactRelationship\") || is_null($this->_propDict[\"relationship\"])) {\n return $this->_propDict[\"relationship\"];\n } else {\n $this->_propDict[\"relationship\"] = new ContactRelationship($this->_propDict[\"relationship\"]);\n return $this->_propDict[\"relationship\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "bf5b5084cbcdd95afceec20f0d337a1d", "score": "0.4400366", "text": "function _checkNode($path, $alias, $parentId = null) {\n\t\t$node = $this->Aco->node($path);\n\t\tif (!$node) {\n\t\t\t$this->Aco->create(array('parent_id' => $parentId, 'model' => null, 'alias' => $alias));\n\t\t\t$node = $this->Aco->save();\n\t\t\t$node['Aco']['id'] = $this->Aco->id;\n\t\t\t$this->out(sprintf(__('Created Aco node: %s', true), $path));\n\t\t} else {\n\t\t\t$node = $node[0];\n\t\t}\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "1af46554382894e86400c2be398af8b0", "score": "0.43911645", "text": "public function first() {\n if(isset($this->elements[0])) {\n return $this->elements[0];\n }\n return new PathNode(\"\");\n }", "title": "" }, { "docid": "2b27bd78b1c49664c44047ef4638e777", "score": "0.43870798", "text": "public function getRelationship()\n {\n return $this->relationship;\n }", "title": "" }, { "docid": "6437008b24605063600775d363ab9d01", "score": "0.43638185", "text": "public function getNode($name) {\n\t\t/* @var $child LogNode */\n\t\tif ($name == null || $name == '') {\n\t\t\treturn $this->root;\n\t\t}\n\t\t$node = $this->root;\n\t\t$strlen = strlen($name);\n\t\twhile ( $strlen > 0 ) {\n\t\t\t$ix = strpos( $name, \"\\\\\" );\n\t\t\t$head = '';\n\t\t\tif ($ix !== false && $ix > 0) {\n\t\t\t\t$head = substr( $name, 0, $ix );\n\t\t\t\t$name = substr( $name, $ix + 1 );\n\t\t\t\t$strlen = strlen($name);\n\t\t\t} else {\n\t\t\t\t$head = $name;\n\t\t\t\t$name = '';\n\t\t\t\t$strlen = 0;\n\t\t\t}\n\t\t\tif ($node->getChildren() == null) {\n\t\t\t\t$node->setChildren( new HashMap('<string, \\KM\\Util\\Logging\\LogManager\\LogNode>') );\n\t\t\t}\n\t\t\t$child = $node->getChildren()->get( $head );\n\t\t\tif ($child == null) {\n\t\t\t\t$child = new LogNode( $node, $this );\n\t\t\t\t$node->getChildren()->put( $head, $child );\n\t\t\t}\n\t\t\t$node = $child;\n\t\t}\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "3826ed71988ca4651f1841610a6c5759", "score": "0.43629724", "text": "public function getNodeForPath($path) {\n\n $realPath = $this->getRealPath($path);\n if (!file_exists($realPath)) { \n throw new DAV\\Exception\\NotFound('File at location ' . $realPath . ' not found');\n }\n if (is_dir($realPath)) {\n return new DAV\\FS\\Directory($realPath);\n } else {\n return new DAV\\FS\\File($realPath);\n }\n\n }", "title": "" }, { "docid": "7e0d9257ea5d892d54436d56862c1d3e", "score": "0.4361429", "text": "public function getLeftSibling(): ?Node\n {\n return $this->scoped()->siblings()\n ->where($this->getLeftColumnName(), '<', $this->getLeft())\n ->orderBy($this->getOrderColumnName(), 'desc')\n ->first();\n }", "title": "" }, { "docid": "40acc18d45b0662f5d20d6adeaad7c0a", "score": "0.43408275", "text": "public function getCorrespondingNodePath($workspaceName);", "title": "" }, { "docid": "fd15e72a7affd707b3bdf4674e2bb859", "score": "0.433291", "text": "public function GetNextNode($bIncludeHidden = false)\n {\n $oParent = $this->GetParentNode();\n\n $oNode = false;\n if (!is_null($oParent)) {\n $oNodeList = $oParent->GetChildren($bIncludeHidden);\n $oNodeList->GoToStart();\n $bNextLoopIsRequiredNode = false;\n while ($oNode = $oNodeList->Next()) {\n if ($bNextLoopIsRequiredNode) {\n break;\n }\n if ($oNode->id == $this->id) {\n $bNextLoopIsRequiredNode = true;\n }\n }\n }\n if (!$oNode) {\n $oNode = null;\n }\n\n return $oNode;\n }", "title": "" }, { "docid": "9c5cccd612cd8f686e9aa264969461fb", "score": "0.43200275", "text": "public function getRelativeStorage($storageName, $relativePath = ''){\r\n\t\tself::getStorage($storageName)->setParent($this)->setRelativePath($relativePath);\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "746ad37d74dd127de6a6c0b2b3121bc0", "score": "0.43126008", "text": "public function GetRelNoFollow ()\n\t{\n\t\treturn $this->_relnofollow;\n\t}", "title": "" }, { "docid": "f804546c7067dcc8cf54980d66fe12b1", "score": "0.43123335", "text": "public function getNode($name);", "title": "" }, { "docid": "642784788d1179f181d4e145e68a7a11", "score": "0.43034405", "text": "public function get($nodeName)\n {\n return $this->nodes->get($nodeName);\n }", "title": "" }, { "docid": "3ba4b1c3e2bb3916cc2e07baf9f18cda", "score": "0.4300371", "text": "public function nextNode(string $nodeName): ?Node;", "title": "" }, { "docid": "ff659fd8afae5cb9c8973062d505dbec", "score": "0.4295177", "text": "static public function getNodeByName($nodeName)\n {\n if(isset(self::$_mapNodeName[$nodeName])) {\n return self::getNode(self::$_mapNodeName[$nodeName]);\n }\n \n return null;\n }", "title": "" }, { "docid": "0bd44f0aa8182cfbfcabb486f56568c1", "score": "0.42892048", "text": "public function getCurrentSiteNode()\n {\n if ($this->currentSite !== null && $this->currentSiteNode === null) {\n $siteNodePath = NodePaths::addNodePathSegment(SiteService::SITES_ROOT_PATH, $this->currentSite->getNodeName());\n $this->currentSiteNode = $this->getNode($siteNodePath);\n if (!($this->currentSiteNode instanceof NodeInterface)) {\n $this->systemLogger->log(sprintf('Warning: %s::getCurrentSiteNode() couldn\\'t load the site node for path \"%s\" in workspace \"%s\". This is probably due to a missing baseworkspace for the workspace of the current user.', __CLASS__, $siteNodePath, $this->workspaceName), LOG_WARNING);\n }\n }\n return $this->currentSiteNode;\n }", "title": "" }, { "docid": "60d723cf73d2ac8ceb31f2086be0deb5", "score": "0.4288338", "text": "public function getPath() {\n\t\treturn $this->nodeData->getPath();\n\t}", "title": "" }, { "docid": "b3771156315e8b16384b987482ab251c", "score": "0.42721337", "text": "public static function node_for_path($arr, $path) {\n\t\t$path = explode('.', $path);\n\t\t$node = $arr;\n\t\t$first = NO;\n\t\tforeach($path as $key) {\n\t\t\tif(!$first) {\n\t\t\t\t$node = $node[$key];\n\t\t\t\t$first = YES;\n\t\t\t} else {\n\t\t\t\t$node = $node[0][$key];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "b7319bce14ce55daed50762b7ecdc2ae", "score": "0.42592612", "text": "public function setRel($rel) {\r\n $this->rel = $rel;\r\n $this->handleAttribute(\"rel\", $rel);\r\n }", "title": "" }, { "docid": "1ba53add5b85ea80824c8968c71c9936", "score": "0.42578462", "text": "public function getSingleNode($label = null)\n {\n $nodes = (null === $label) ? $this->getNodes() : $this->getNodesByLabel($label);\n $single = current($nodes);\n\n return $single;\n }", "title": "" }, { "docid": "f3d36f76f07f55e0f7ca28743706891f", "score": "0.42513433", "text": "public function setRelId($rel_id)\n {\n $this->rel_id = $rel_id;\n\n return $this;\n }", "title": "" }, { "docid": "77f8c9b8c077113f77c77776881fa003", "score": "0.42417124", "text": "public function getNode($name)\n {\n if (is_array($name)) {\n $parts = $name;\n $name = array_shift($parts);\n }\n elseif (strpos($name, '.') !== false) {\n $parts = explode('.', $name);\n $name = array_shift($parts);\n }\n if (!isset($this->children[$name])) {\n return null;\n }\n if (isset($parts) && count($parts)) {\n return $this->children[$name]->getNode($parts);\n }\n return $this->children[$name];\n }", "title": "" }, { "docid": "357bb4114556b4abed9f63b57ae00fdb", "score": "0.4240986", "text": "public static function getPath(NodeObject $node, PropelPDO $con = null);", "title": "" }, { "docid": "99b0a8c2d435afdf13107e0010aa545b", "score": "0.4238016", "text": "public function getParentNode()\n {\n return $this->query->getQuery()->modelAsNode($this->parent->nodeLabel());\n }", "title": "" }, { "docid": "d4f771f5ab5d091db4cdaa340a982c15", "score": "0.42181528", "text": "public function get($node_path, $default_value = null)\n {\n $xml = $this;\n list($nodes, $attribute) = self::parsePath($node_path);\n\n foreach ($nodes as $node_name) {\n if (!isset($xml->{$node_name})) {\n return $default_value;\n }\n\n $xml = $xml->{$node_name};\n }\n\n if ($attribute) {\n return isset($xml[$attribute]) ? $xml[$attribute] : $default_value;\n }\n\n return $xml;\n }", "title": "" }, { "docid": "455889a717572d2645951253f5f1ca43", "score": "0.4214066", "text": "public function getRelationship(string $name) : Relationships\\Relationship\n {\n if (isset($this->relationships[$name])) {\n return $this->relationships[$name];\n } else {\n throw new Exceptions\\UknownRelationshipException(\"The $name relationship hasn't been defined on the \" . get_class($this) . \" mapper.\", 1);\n }\n }", "title": "" }, { "docid": "76f87c6d75e90aa7edbfc52759c9544f", "score": "0.421105", "text": "public function nextSibling()\n {\n if ($this->parent) {\n $myIndex = $this->parent->nodes->indexOf($this);\n\n if ($myIndex < ($this->parent->nodes->getNodeCount() - 1)) {\n return $this->parent->nodes->nodeAt($myIndex + 1);\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "937467d83914161ddf48d071cbf08dcb", "score": "0.42045963", "text": "static public function getNodeManager()\n {\n if (!self::$_nodeManager instanceof Core_Model_NodeManager) {\n self::$_nodeManager = self::newNodeManager();\n }\n\n return self::$_nodeManager;\n }", "title": "" }, { "docid": "954b94885f48ea28af2695ca67549808", "score": "0.42023003", "text": "public function getDOMNode()\n {\n return $this->_node;\n }", "title": "" }, { "docid": "b3b4d3c5f924777cac3ab544e3f593f7", "score": "0.41992503", "text": "public static function retrieveSiblings(NodeObject $node, PropelPDO $con = null);", "title": "" }, { "docid": "0522f43bac61ffc572325542c5b06b3d", "score": "0.41909254", "text": "public function withRel($rel)\n {\n $rels = $this->rels;\n $rels[$rel] = true;\n\n return new static($this->href, array_keys($rels), $this->attrs);\n }", "title": "" }, { "docid": "8e186caae1ebb12486dff86c004de63b", "score": "0.41878116", "text": "public function get(Node $n)\r\n {\r\n $class = get_class($n);\r\n if (isset($n->id))\r\n {\r\n $id = $class::validateId($n->id);\r\n $n = new $class();\r\n $n->id = $id;\r\n } else {\r\n $n->id = $class::NEW_ID;\r\n $n->validate();\r\n $n->id = NULL;\r\n }\r\n try\r\n {\r\n $ret = $this->dp->get($n);\r\n }\r\n catch (\\Exception $e)\r\n {\r\n throw new Exception('Get failed for '.basename($class), Exception::SERVICE_DP, $e);\r\n }\r\n if ($ret === FALSE)\r\n {\r\n throw new Exception(basename($class).' id \"'.$n->id.'\" does not exist.', Exception::SERVICE_DNE);\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "50f3b463c1c5b63574ad4fd7f9ddcbaa", "score": "0.4182993", "text": "private function getNodeByExecutingXPathQuery($xPathQuery) {\n //$this->logger->info(\"Getting nodes with xPath query: \\n\" . $xPathQuery);\n \n $returnNode = NULL;\n\t//$this->logger->info($this->xmlFilePath);\n//\t$this->reloadXMLFile();\n try {\n $returnNode = $this->xmlFile->xpath($xPathQuery);\n } catch (Exception $e) {\n //$this->logger->fatal(\"Could not return node with xpath query: \\n\" . $e->getMessage());\n }\n//$this->logger->info(\"Got the node!\");\n return $returnNode;\n }", "title": "" }, { "docid": "8dbc17052ce61324e4db18eaa1861de7", "score": "0.4165571", "text": "public function getCurrentNode();", "title": "" }, { "docid": "69d0121f79a1db30e84d44ccbdc4a4be", "score": "0.4165497", "text": "protected function getPath()\n\t{\n\t\tif (!$this->node->hasId()) {\n\t\t\tthrow new Exception('No node id specified');\n\t\t}\n\n\t\tif ($this->returnType != Traversal::ReturnTypeNode\n\t\t\t&& $this->returnType != Traversal::ReturnTypeRelationship\n\t\t\t&& $this->returnType != Traversal::ReturnTypePath\n\t\t\t&& $this->returnType != Traversal::ReturnTypeFullPath) {\n\t\t\tthrow new Exception('No return type specified for traversal');\n\t\t}\n\n\t\treturn '/node/'.$this->node->getId().'/traverse/'.$this->returnType;\n\t}", "title": "" }, { "docid": "c35e58fae7670d0ec8be2a3d394b3a38", "score": "0.41636938", "text": "public function getNode($path)\n {\n $path = trim($path, ' /');\n \n $value = Mage::getConfig()->getNode(\n $path,\n $this->getScope(),\n $this->getScopeCode()\n );\n \n return $value ? (string)$value : null;\n }", "title": "" }, { "docid": "6ab43dd6e147d4e19d9429dd315a9bbd", "score": "0.41627625", "text": "public function getFoundNode() {}", "title": "" }, { "docid": "06c00b746c26fe899f7e544d32dac5c5", "score": "0.41609007", "text": "function get_path($node) {\n\n // lazy connection: touch the database only when the data is required for the first time and not at object instantiation\n $this->_init();\n\n $parents = array();\n\n // if node exists in the lookup array\n if (isset($this->lookup[$node])) {\n\n // iterate through all the nodes in the lookup array\n foreach ($this->lookup as $id => $properties)\n\n // if\n if (\n\n // node is a parent node\n $properties[$this->properties['left_column']] < $this->lookup[$node][$this->properties['left_column']] &&\n\n $properties[$this->properties['right_column']] > $this->lookup[$node][$this->properties['right_column']]\n\n )\n\n // save the parent node's information\n $parents[$properties[$this->properties['id_column']]] = $properties;\n\n }\n\n // add also the node given as argument\n $parents[$node] = $this->lookup[$node];\n\n // return the path to the node\n return $parents;\n\n }", "title": "" }, { "docid": "0f53b0dc343ce8717613941d5f099796", "score": "0.4160272", "text": "public function nodePathAvailableForNode($nodePath, NodeInterface $node);", "title": "" }, { "docid": "dcf07e69bcd47aa1c5206d6c2cd0ce01", "score": "0.4144427", "text": "function getNode($nodeID, $version = null)\n {\n return $this->_getObject('node', $nodeID, $version);\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f926d67103b49c3b708938347c012581", "score": "0.7038754", "text": "public function updateResource($resourceId, $record);", "title": "" }, { "docid": "de2d52f9def3aad6f8d87d580d39c262", "score": "0.6888798", "text": "public function update() {\n\t\t$this->storage->updateStorage();\n\t}", "title": "" }, { "docid": "24dae383ef96f6cd3c2ae0eb901b0e6e", "score": "0.6533836", "text": "public function update_storage()\n {\n }", "title": "" }, { "docid": "4036e5a75462edf3f0d824f080ae7c19", "score": "0.6514445", "text": "public function update(StorageRequest $request, Storage $storage)\n {\n $campos = $request->validated();\n\n $storage = $this->storageRepository->update($campos, $storage);\n\n return $this->showOne(new StorageResource($storage), 200);\n }", "title": "" }, { "docid": "4a53e7dd3c2aa1884a6b78cfa1931df7", "score": "0.6363001", "text": "public function updateFromResource(\n $resourceResource,\n $exerciseResource\n );", "title": "" }, { "docid": "a37451d53b2edd450cd43846406cd904", "score": "0.6323939", "text": "public function updated(Resource $resource)\n {\n $this->deleteCacheDepartments();\n }", "title": "" }, { "docid": "1d3b0af7b4ec814b473b06c1a2a208fd", "score": "0.613845", "text": "public function update(UpdateRequest $request, Resource $resource)\n {\n $resource->update($request->only('name', 'type','resource_starts','resource_ends','exclude_weekends'));\n\n return redirect(route('resources.show', $resource->id))->withSuccess('Updated successfully!');\n }", "title": "" }, { "docid": "4e3b6ab51e63f6ffae63a329de90b240", "score": "0.6119389", "text": "abstract public function updateResource($resource, ResourceNode $node, Workspace $workspace, User $user, SyncInfo $wsInfo, $path, $syncDate);", "title": "" }, { "docid": "4f4808380f22218aaf7fbea02c9916cb", "score": "0.6091119", "text": "public function update(Request $request, $resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n $this->validate($request, [\n 'title' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'slug' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'model' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'namespace' => 'required|max:255',\n 'order_column' => 'required|integer',\n 'order_direction' => 'required|in:asc,desc'\n ]);\n\n $resource->update($request->all());\n\n return redirect()->back()->with('success', 'Resource updated');\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "109ed515c823d7a78d782a8290a576d2", "score": "0.5969382", "text": "public function update($resourceId)\n {\n $exception = new Exception(\"CRUD0103\", __METHOD__);\n $exception->setHttpStatus(\"501\", \"Not yet implemented\");\n throw $exception;\n }", "title": "" }, { "docid": "74defa123e70820a991135800b36505a", "score": "0.5949209", "text": "static public function update () {\n\n $METHOD = Request::getMethod();\n $PATH = Request::getPath();\n\n Log::debug('--- Matched / with PUT method ---');\n\n $DATA = new EditableJSON(REST_DATA_FILE);\n\n $DATA->setValue(Request::getInput());\n\n Log::info(\"$METHOD $PATH: Changed resource completely\");\n\n return $DATA;\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "aa3074b4db1abeb89a38b5e15dee9e7c", "score": "0.5897436", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\treturn $this->upload($path, $resource, $config);\r\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac66e1d66c388debefca8f97ea91a2b7", "score": "0.5842868", "text": "public function putUpdate()\n {\n $this->postUpdate();\n }", "title": "" }, { "docid": "f9e2fce00b6006820375e4adc0b03778", "score": "0.5839037", "text": "public function update($id, Request $request)\n {\n //\n $this->validate($request, ['storage_type' => 'required|in:Local HDD,Network HDD,Local SSD,Network SSD']);\n\n $st = StorageType::findOrFail($id);\n $st->storage_type = $request->storage_type;\n\n return redirect()->route('storagetypes.index');\n }", "title": "" }, { "docid": "58d5142b37ce0114e53d3fe56c2f6c03", "score": "0.5809738", "text": "protected function storeVersion(PuliResource $resource)\n {\n if (null !== $this->changeStream) {\n $this->changeStream->append($resource);\n }\n }", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "9515a7f9c7d4d49fd0e91b13594a00d6", "score": "0.5671085", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'question'=>'required',\n 'description'=>'required',\n \n ]);\n $frequently=Frequently::where('id',$id)->first();\n $old_image=$request->old_image;\n $path=$old_image;\n if($request->hasFile('thumbnail')){\n if($path!=null&&file_exists(\"/storage/$path\")){\n unlink('storage/'.$path);\n }\n $path=$request->file('thumbnail')->store('Frequentlys');\n }\n $frequently->question=$request->question;\n $frequently->description=$request->description;\n $frequently->photo=$path;\n $frequently->save();\n return redirect()->route('listFrequently');\n }", "title": "" }, { "docid": "9ddd9520efc51e699e82bfa708a3c5e5", "score": "0.56641686", "text": "public function update($path, $cachedData);", "title": "" }, { "docid": "b3535d5367a1c20a3d356e026d81c210", "score": "0.56451815", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n if($request->hasFile('avatar')){\n $imagen = $request->file('avatar')->store('public');\n $resultado = str_replace(\"public\", \"storage\", $imagen);\n $product->imagen = $resultado;\n }\n $product->nombre = $request->get('nombre');\n $product->codigoBarra = $request->codigoBarra;\n $product->cantidad = $request->cantidad ;\n $product->categoria = $request->categoria ;\n $product->descripcion = $request->descripcion ;\n $product->costo = $request->costo ;\n $product->precio = $request->precio;\n $product->save();\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "3538e1075fd6fc7f2d59249215667663", "score": "0.5642799", "text": "public function update(Request $request, $id)\n {\n $id = $request->input('Id');\n $editPoll = $this->bucket->get(\"poll::\" . $id)->value;\n if (!(is_object($editPoll))) {\n $editPoll = json_decode($editPoll);\n }\n $created_at = $request->input('CreatedAt');\n $question = $request->input('Question');\n $status = $request->input('Status');\n $tags = $request->input('Tags');\n $tags_new = explode(\",\", $tags);\n $options = $editPoll->options;\n\n if ($file = $request->file('ImageName')) {\n unlink(\"imgs/\" . $request->input('PreviousImage'));\n $member_image = $file->getClientOriginalName();\n $file->move('imgs', $member_image);\n } else {\n $member_image = $request->input('PreviousImage');\n }\n\n $this->bucket->replace(\"poll::\" . $id, ['Id' => $id, 'created_at' => $created_at, 'options' => $options,\n 'question' => $question, \"status\" => $status, \"tags\" => $tags_new, 'ImageName' => $member_image]);\n return redirect(\"polls\");\n }", "title": "" }, { "docid": "e5e1cb25ba53fcc2b79ddb3fe3b7304a", "score": "0.56392527", "text": "public function update($object)\n {\n $this->persistenceManager->update($object);\n }", "title": "" }, { "docid": "9d32dd86baa4f1169783965d8d08b640", "score": "0.56374604", "text": "public function testResourcesCanBeUpdated()\n {\n $admin = factory(User::class)->states('admin')->create();\n $resource = factory(Resource::class)->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "e4d9cc7693ad36b031389e0564fbaf8b", "score": "0.5624323", "text": "public function update(StoreEditEngagement $request, $id)\n {\n $engagement = Engagement::find($id);\n\n $engagement->titre = $request->titre;\n $engagement->contenu = $request->contenu;\n \n if ($request->image != null)\n {\n Storage::disk('imgEngagement')->delete($engagement->image);\n \n \n $image = [\n \"name\" => $request->image,\n \"disk\" => \"imgEngagement\",\n \"w\" => 1000,\n \"h\" => 1000\n ];\n \n $engagement->image = $this->imageResize->imageStore($image);\n }\n $engagement->save();\n return redirect()->route('engagements.index',['engagement'=> $engagement->id]);\n }", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.56211615", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "02b2a8f5c6ceb76c08e4a6597e2c8da0", "score": "0.5618807", "text": "public function updateProduct(): void\n {\n $product = $this->fetchProduct($this->product->product_name, $this->product->product_nr);\n if (!$product) {\n $this->product->last_scan = now();\n $this->product->save();\n\n return;\n }\n\n $this->product->product_url = $product['details']['url'];\n $this->product->stock_status = $product['details']['stock'];\n $this->product->last_scan = now();\n\n $inStock = $this->store->productHasStock($product['node']);\n if ($inStock) {\n $this->product->notifyInStock();\n $this->product->found = 1;\n }\n\n $this->product->save();\n }", "title": "" }, { "docid": "1c49f93e51c7bc32222ecde454e3f4ab", "score": "0.56150794", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n\n $request->validate([\n 'description' => 'required|string',\n 'name' => 'required|string',\n 'price' => 'required|numeric',\n 'type' => 'required', Rule::in(['drink', 'dish']),\n ]);\n\n if($request->file('file')){\n $request->validate([\n 'file' => 'image'\n ]);\n if($item->photo_url != null){\n Storage::delete('public/items/'.$item->photo_url);\n }\n $item->photo_url = basename($request->file('file')->store('public/items'));\n }\n\n \n $item->description = $request['description'];\n $item->name = $request['name'];\n $item->price = $request['price'];\n $item->type = $request['type'];\n $item->save();\n return new ItemResource($item);\n }", "title": "" }, { "docid": "b6ca8c191b9b71b8ef7393647dcd5cd6", "score": "0.5610084", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if (!$product) return response()->json(['message' => 'Product not found.'], 404);\n\n $validator = Validator::make($request->all(), [\n 'name' => 'min:3|max:100',\n 'description' => 'min:5',\n 'price' => 'integer',\n 'quantity' => 'integer',\n 'image' => 'image|mimes:jpg,jpeg,svg,png'\n ]);\n\n $newPath = \"\";\n if ($request->hasFile('image')) {\n Storage::delete('products/' . $product->image);\n $newPath = $request->file('image')->store('public/products');\n }\n\n if ($validator->fails()) {\n return response()->json($validator->errors(), 422);\n }\n\n $product->name = $request->get('name', $product->name);\n $product->description = $request->get('description', $product->description);\n $product->price = $request->get('price', $product->price);\n $product->quantity = $request->get('quantity', $product->quantity);\n $product->image = $request->get($newPath, $product->image);\n\n $product->save();\n return new ProductResource($product);\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "111aff7dc652d737e04484d721049c98", "score": "0.5595379", "text": "public function setResource($resource) { $this->resource = $resource; }", "title": "" }, { "docid": "751d0245849a838786b28b82bde8a4c7", "score": "0.5594406", "text": "public function updateStream($path, $resource, Config $config) {\n echo \"updateStream\";exit;\n }", "title": "" }, { "docid": "2ce24d19906aa703a63656bcd981224d", "score": "0.5592051", "text": "public function update(Request $request, $id)\n {\n $article=Article::findOrFail($id);\n $article->stock=$request->input('stock');\n if($article->save()) {\n return new ArticleResource($article);\n }\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5582592", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "23b36aabfd1baef1df2a84b64db8a004", "score": "0.5563429", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n\n //validation\n $request->validate($this->Validation());\n\n $product = Product::find($id);\n\n $data['slug'] = Str::slug($data['name'], '-');\n\n if (!empty($data['image'])) {\n // RIMUOVERE VECCHIA IMG\n if (!empty($product->image)) {\n Storage::disk('public')->delete($product->image);\n }\n $data['image'] = Storage::disk('public')->put('images', $data['image']);\n }\n\n $updated = $product->update($data);\n\n if($updated){\n return redirect()->route('products.show', $product->slug);\n } else {\n return redirect()->route('homepage');\n } \n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "04c0feb8d31bb9e3b0c25e72f6a0c700", "score": "0.55594426", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path, $resource, $config);\n }", "title": "" }, { "docid": "29033c29e8cd8e769333ca2adef8fc91", "score": "0.5559027", "text": "public function update(Request $request, $id)\n {\n $single=Slider_image::findorfail($id);\n $image = $single->image;\n\n if ($request->file() != null){\n\n Storage::delete('upload/slider_image/'.$image);\n\n $upload = $request->file('image1');\n\n\n $file_name = time().'_'.$upload->getClientOriginalExtension();\n\n $path = $upload->storeAs('upload/slider_image',$file_name);\n\n $single->update([\n 'image'=>$file_name,\n 'slider_target'=>$request->slider_target\n ]);\n }else{\n\n $single->update([\n 'image'=>$request->img,\n 'slider_target'=>$request->slider_target\n ]);\n }\n\n\n return redirect('admin/SliderItem');\n }", "title": "" }, { "docid": "23b13183e49a64c42b369b76ee72ff0a", "score": "0.5546373", "text": "public function put($resource, $arOptions)\n {\n // TODO: Implement put() method.\n if (false) {\n $this->utilSetHttpStatus(200, \"OK\");\n } else {\n $this->utilSetHttpStatus(404, \"Not found\");\n }\n }", "title": "" }, { "docid": "a08f6b774130b5c3d30282ec86fc268e", "score": "0.55422", "text": "public function update(Request $request)\n {\n DB::table('cruds')->where('id',$request->id)->update([\n 'name'=>$request->name,\n 'price'=>$request->price,\n 'image'=>$request->file('image')->store('media'),\n 'description'=>$request->description,\n ]);\n return redirect('index/show');\n\n\n }", "title": "" }, { "docid": "47dd85ccb548e5327aa6f0cd02b5fef8", "score": "0.5540378", "text": "public function update(Request $request, $id) //Atualizar um dado inteiro, usando o Put\n {\n //\n }", "title": "" }, { "docid": "cd6123bf3edfbe468d12565bcc198dd6", "score": "0.5539982", "text": "public function update($data, $id, $withTrashed = false);", "title": "" }, { "docid": "6f5dfe25ea3a353e2c34d4da9909c65a", "score": "0.553297", "text": "public function update(Request $request, $model, $id)\n {\n $class = 'App\\\\' . ucfirst($model);\n $resource = $class::find($id);\n if(empty($resource)){\n return response([\n \"error\" => \"Resource not found\"\n ], 404);\n }\n $update = [];\n $fillable_attributes = $resource->getFillable();\n foreach($fillable_attributes as $attribute){\n if(strpos($attribute, 's3_url')){\n if(!empty($request->file($attribute))){\n $url = AmazonS3Helper::UploadtoS3(file_get_contents($request->file($attribute)), 'framework/' . $model . '/' . $request->file($attribute)->hashName(),'image/' . $request->file($attribute)->extension());\n $update[$attribute] = $url;\n }\n }else{\n $update[$attribute] = $request->$attribute;\n }\n }\n $resource->update($update);\n return response([\n \"data\" => $resource\n ], 200);\n }", "title": "" }, { "docid": "91fa0e4ea0a8c7896101b28b83ae1ab3", "score": "0.55280733", "text": "public function update(Request $request)\n {\n //\n $producto = Product::findOrFail($request->id_producto);\n $producto->category_id = $request->id;\n $producto->nombre = $request->nombre;\n $producto->precio = $request->precio;\n $producto->descripcion = $request->descripcion;\n $producto->stock = 0;\n $producto->estado = '1';\n $imagen = $request->file('imagen');\n \n $imagenes = 'storage/app/products/'.$producto->imagen;\n \n // Guardar imagen\n if($imagen){\n Storage::delete($imagenes);\n $image_path_name = time().$imagen->getClientOriginalName();\n Storage::disk('products')->put($image_path_name, File::get($imagen));\n $producto->imagen = $image_path_name;\n }\n $producto->save();\n return Redirect::to(\"admin/producto\");\n }", "title": "" }, { "docid": "a89f939420a4ce0f66a76f1e13ccde13", "score": "0.5525219", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n\n $data=$request->only(['title','description','published_at','price','category_id','content']);\n if ($request->hasFile('image')){\n //check if new image\n $image=$request->image->store('products');\n //upload it\n Storage::delete($product->image);\n //delete old one\n\n $data['image']=$image;\n }\n $product->update($data);\n\n\n session()->flash('success','Product updated successfully');\n\n return redirect(route('products.index'));\n }", "title": "" }, { "docid": "d8af827654eda9b47beb831dca58018e", "score": "0.5523829", "text": "public function put($resource, $id, $data = array())\n {\n $token = $this->getToken();\n if (empty($token)) {\n $token = $this->requestToken();\n }\n $data['token'] = $token;\n $ret = $this->getClient()->put(\"{$resource}/{$id}\", $data);\n //$ret = $this->getClient()->put(\"{$resource}/{$id}?token=\" . $token, $data);\n if (empty($ret)) {\n throw new Exception('Quartic Api returned empty result.');\n }\n if (!isset($ret['body']['status']) || strtolower($ret['body']['status']) != 'ok') {\n $this->getHelper()->log(var_export(\"{$resource}/{$id}\", true));\n $this->getHelper()->log(var_export($data, true));\n $this->getHelper()->log(var_export($ret, true));\n if (isset($ret['body']['data']['error_code'])) {\n throw new Exception('Quartic Api returned error: ' . $ret['body']['data']['error_message']);\n } else {\n throw new Exception('Quartic Api returned error: ' . print_r($ret['body'], true));\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "c49ab96374b0772bd28cd7ae8c2d6bfe", "score": "0.55207497", "text": "public function update(Request $request, $id)\n {\n //Actualizamos Datos en la DB\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $product->image = $request->file('image')->store('public/img/product/body');\n }\n $product->update($request->all());\n //Redireccionar al index\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "429de32ce0a6f737ded9b4f0b77dc398", "score": "0.55156404", "text": "public function update(ProductEditRequest $request, $id)\n {\n //\n $url = $request->input('url');\n try {\n $product = Product::findOrFail($id);\n\n // if ($file = $request->file('image')) { // since its a one to many relationship\n // foreach ($product->images as $image) {\n // if (file_exists($old_file = public_path().'/images/product/'.$image->name)) { // no need to unlink since product can have many images\n // unlink($old_file); // unlink the old image\n // }\n // }\n\n // $name = 'product_'.$id.'_'.time().'.'.$file->getClientOriginalExtension();\n // $file->move('images/product', $name);\n // $product->images()->create(['product_id' => $product->id, 'name' => $name]);\n // }\n\n $product->name = $request->input('name');\n $product->category_id = $request->input('category_id');\n $product->stock = $request->input('stock');\n $product->price = $request->input('price');\n $product->status = $request->input('status');\n $product->description = $request->input('description');\n $result = $product->push();\n\n if ($result) {\n Session::flash('message', 'Update Success');\n } else {\n Session::flash('message', 'Update Failed');\n }\n } catch (\\Exception $e) {\n // do task when error\n Session::flash('error', 'Failed '.$e->getMessage());\n }\n return redirect($url);\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "ca50926bc80f12da80aa1ee555d0ab40", "score": "0.55123925", "text": "public function update(){\n Lore::app()->getPersistence()->getRepository($this->metadata()->getRepositoryName())->update($this);\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "a6dd9080de61feef7df50e26b70511c5", "score": "0.5509228", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [ \n 'name' => 'required|string|max:255',\n 'logo' => 'sometimes|mimes:jpeg,bmp,png,jpg'\n ]);\n\n if ($validator->fails()) {\n $message = 'Validation Error.';\n $status = 400;\n\n $response = [\n 'status' => $status,\n 'success' => false,\n 'message' => $message,\n 'data' => $validator->errors(),\n ];\n\n return response()->json($response, 400);\n }\n else\n {\n $brand = Brand::find($id);\n\n if (is_null($brand)) {\n\n $status = 400;\n $message = 'Brand not found.';\n\n $response = [\n 'status' => $status,\n 'success' => false,\n 'message' => $message,\n ];\n\n return response()->json($response, 404);\n\n }\n else{\n\n $name = $request->name;\n $photo = $request->logo;\n\n // File Upoload\n if ($request->hasFile('photo')) {\n $imageName = time().'.'.$photo->extension(); \n \n $photo->move(public_path('images/brand'), $imageName);\n\n $filepath = 'images/brand/'.$imageName;\n\n $oldphoto = $brand->logo;\n\n if(\\File::exists(public_path($oldphoto))){\n \\File::delete(public_path($oldphoto));\n }\n }\n else{\n $filepath = $brand->logo;\n\n }\n\n // Data insert\n $brand->name = $name;\n $brand->logo = $filepath;\n $brand->save();\n \n\n $status = 200;\n $result = new BrandResource($brand);\n $message = 'Brand updated successfully.';\n\n $response = [\n 'status' => $status,\n 'success' => true,\n 'message' => $message,\n 'data' => $result,\n ];\n\n return response()->json($response, 200);\n }\n }\n }", "title": "" }, { "docid": "fd275acf4c99e35a1942adcba55b5168", "score": "0.5507853", "text": "public function update(Request $request, $id)\n {\n $data = Slider::find($id);\n $data->short_title = $request->short_title;\n $data->long_title = $request->long_title;\n $data->updated_by = Auth::user()->id;\n if ($request->file('image')) {\n $file = $request->file('image');\n @unlink(public_path('/upload/slider_image/'.$data->image));\n $filename =date('YmdHi').$file->getClientOriginalName();\n $file->move(public_path('/upload/slider_image'),$filename);\n $data['image']= $filename;\n }\n $data->save();\n return redirect()->route('view-slider')->with('success','Data updated successfully!');\n }", "title": "" }, { "docid": "5764299e1bb6a4a7925c46ed1072ca62", "score": "0.5499601", "text": "public function put($uri = null, $data = array(), $request = array());", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "048d9fb1be8f80b9c6a16e67a98faaff", "score": "0.5493909", "text": "public function update(StoreInventory $request, $id)\n {\n // Grab the inventory item so we can update it\n $inventory = Inventory::findOrFail($id);\n\n $inventory->fill($request->validated());\n \n return (new InventoryResource($inventory))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "09d3177310ace6bf104fcfebfdca9181", "score": "0.54922557", "text": "public function update($data)\n {\n return $this->client->put($this->fullPath(), null, $data);\n }", "title": "" }, { "docid": "85e1d4766b8ee562913fc2a3fc7a60db", "score": "0.54890925", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate(request(),[\n 'photo' => 'required|image|max:2048'\n ]);\n\n $photo = request()->file('photo')->store('public');\n \n\n Photo::update([\n 'url' => Storage::url($photo),\n 'activity_id'=> $activity->id,\n ]);\n\n }", "title": "" }, { "docid": "dea8abf6fe11ceeaef21c557a4920a01", "score": "0.5488609", "text": "public function update(Request $request, $id)\n {$product = Product::FindOrFail($id);\n $product->name = $request->name;\n $product->price = $request->price;\n $product->old_price= $request->old_price;\n $product->description = $request->description;\n $product->sub_category_id = $request->sub_category;\n if ($request->hasFile('picture')) {\n $picName = \"GRO\".uniqid().time().'.'.$request->picture->getClientOriginalExtension();\n $request->picture->move(public_path().'/uploads/', $picName);\n $product->picture='uploads/'.$picName;\n }\n $product->save();\n flash('Product updated successfully');\n return redirect('/');\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "2aeec2d1db1eb88cf92a885873ec7eed", "score": "0.54836845", "text": "public function update(Request $request, Executive $executive)\n {\n $this->validateRequestUpdate();\n $this->checkAndDeleteOldImage($executive);\n $executive->update($this->validateRequestUpdate());\n $this->storeImage($executive);\n return redirect(route('executive.index'));\n }", "title": "" }, { "docid": "4dd2aec8bd2e4b5b1bffb4aec68a91da", "score": "0.54823583", "text": "public function update(Request $request, Role_resource $role_resource)\n {\n //\n }", "title": "" }, { "docid": "4ba6c1fe9ed4a5352f8497193c138598", "score": "0.5481853", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->update($request->except('files'));\n\n if ($request->hasFile('files')) {\n $resource->addMultipleMediaFromRequest(['files'])\n ->each(function ($file) {\n $file->toMediaCollection();\n });\n }\n\n $response = [\n 'resource' => $resource->load('media'),\n 'msg' => 'Resource updated successfully.'\n ];\n\n return response($response, 200);\n }", "title": "" }, { "docid": "70932022b6ff9363043b59bcdecbdea9", "score": "0.5480141", "text": "public function update(Request $request, $id)\n {\n //$idTag=Tag::findOrFail($id);\n $this->authorize('update'/* ,$idTag */);\n $tag = new TagResource(Tag::findOrFail($id));\n $tag->update($request->all());\n return response($tag, 200);\n }", "title": "" }, { "docid": "61dacb3f91f0a855850458a18f5e4183", "score": "0.5479231", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n if($this->repo->update($input, $id)){\n return $this->respondOK(\"resource updated\");\n }else{\n return $this->errorNotFound('resource not updated');\n }\n }", "title": "" }, { "docid": "154f3dfd07c1b3de458996ea6d67633a", "score": "0.5475994", "text": "protected function httpPut() {\n\n // First we'll do a check to see if the resource already exists\n try {\n $info = $this->tree->getNodeInfo($this->getRequestUri(),0); \n \n // Checking potential locks\n if (!$this->validateLock()) throw new Sabre_DAV_LockedException('The resource you tried to edit is locked');\n\n // We got this far, this means the node already exists.\n // This also means we should check for the If-None-Match header\n if ($this->httpRequest->getHeader('If-None-Match')) {\n\n throw new Sabre_DAV_PreconditionFailedException('The resource already exists, and an If-None-Match header was supplied');\n\n }\n \n // If the node is a collection, we'll deny it\n if ($info[0]['type'] == self::NODE_DIRECTORY) throw new Sabre_DAV_ConflictException('PUTs on directories are not allowed'); \n\n $this->tree->put($this->getRequestUri(),$this->httpRequest->getBody());\n $this->httpResponse->sendStatus(200);\n\n } catch (Sabre_DAV_FileNotFoundException $e) {\n\n // If we got here, the resource didn't exist yet.\n\n // Validating the lock on the parent collection\n $parent = dirname($this->getRequestUri());\n if (!$this->validateLock($parent)) throw new Sabre_DAV_LockedException('You\\'re creating a new file, but the parent collection is currently locked');\n\n // This means the resource doesn't exist yet, and we're creating a new one\n $this->tree->createFile($this->getRequestUri(),$this->httpRequest->getBody());\n $this->httpResponse->sendStatus(201);\n\n }\n\n }", "title": "" }, { "docid": "3a87aca1ec17bb66ec8a99811ab99ab3", "score": "0.5472414", "text": "public function updateProduct(Request $request, $id)\n {\n \n // Update Product\n //return(Product::where('product_id','=',$id)->first());\n\n $Product =Product::where('product_id','=',$id)->first();\n $Product->product_name = $request->product_name; \n $Product->product_description = $request->product_description;\n $Product->product_qty = $request->product_qty;\n $Product->product_status = $request->product_status;\n $Product->save();\n\n $url=\"http://127.0.0.1:8000/storage/\";\n $file=$request->file('product_img');\n $extension=$file->extension();\n $path=$request->file('product_img')->storeAs('Product', $Product->product_id.'.'.$extension);\n \n Product::where('product_id','=',$Product->product_id)->update([\n 'product_img' => $url.$path\n ]);\n \n // return($Product);\n \n if($Product){\n return response()->json($data=[\n 'status'=>'success',\n 'message'=>'Upadte product Successfull',\n 'product' => $Product\n \n ], 200);\n }\n else{\n return response()->json($data=[\n 'status'=>'failed',\n 'message'=>'something went wrong'\n ],203);\n } \n }", "title": "" }, { "docid": "333db29e9caf217f39a61608ae6c94ca", "score": "0.54632384", "text": "public function update(Request $request, $id)\n {\n // Validation des données du formulaire\n $this->validate($request, [\n 'name' => 'required|min:5|max:100',\n 'description' => 'required',\n 'price' => 'required|numeric',\n 'picture' => 'image:max:3000',\n 'status' => 'required|in:published,unpublished',\n 'sales' => 'required|in:onSales,standard',\n 'reference' => 'required|alpha_num|min:16|max:16',\n 'category_id' => 'required|integer',\n 'sizes' => 'required'\n ]);\n\n $product = Product::find($id);\n \n $datas = $request->all();\n\n $file = $request->file('picture');\n if(!empty($file)){ // si l'utilisateur ne change pas son image\n $imageName = $request->picture->hashName(); //hashage du nom de l'image à enregistrer\n $datas['picture'] = $imageName;\n\n $categoryId = $datas['category_id'];\n $img = $request->file('picture');\n $img->move(public_path('/img/'.$categoryId),$datas['picture']);// insertion de l'image dans le dossier de catégorie choisie\n }else{\n if($product->category_id != $datas['category_id']){ // si l'utilisateur change de catégorie\n $newCategoryId = $datas['category_id'];\n $oldPath = public_path('/img/'.$product->category_id.'/'.$product->picture);\n $newPath = public_path('/img/'.$newCategoryId.'/'.$product->picture);\n File::move($oldPath,$newPath);// insertion de l'image dans le dossier de catégorie choisie\n }\n \n }\n\n \n $product->update($datas);\n $product->size()->sync($request->sizes);\n\n //Redirection vers la page admin des produits\n return redirect()->route('product.index')->with('message', 'Le produit a bien été mise à jour');\n }", "title": "" }, { "docid": "0e4d84200a41553d02c2dd28fc577124", "score": "0.54631126", "text": "public function updateObject($objectPath,$content) { }", "title": "" }, { "docid": "5dfe400f13e0d453a75d37d2c1296a55", "score": "0.545993", "text": "public function update(Request $request, $id)\n {\n try{\n DB::beginTransaction();\n $data = [\n 'name' => $request->slide_name,\n 'description' => $request->desc_slide\n ];\n\n if($request->hasFile('image_slide')){\n $imageSlide = $this->storageTraitUpload($request,'image_slide','slide');\n $data['image'] = $imageSlide['file_path'];\n }\n $this->slide->find($id)->update($data);\n DB::commit();\n return redirect()->route('admin.slide.index');\n }catch(Exception $exception){\n DB::rollBack();\n Log::error('message'.$exception->getMessage().'line'.$exception->getLine());\n }\n }", "title": "" }, { "docid": "a6b372ff8f044bee76bd1ac8500ec932", "score": "0.5457891", "text": "public function testUpdate()\n {\n Document::exists() || Document::factory()->create();\n $document = Document::latest('id')->first();\n\n $documentType = DocumentType::factory()->create();\n $student = Student::factory()->create();\n $debrief = Debrief::factory()->create();\n\n $data = [\n 'filename' => $document->filename,\n 'relative_path' => $document->relative_path,\n 'disk' => $document->disk,\n 'extension' => $document->extension,\n 'document_type' => $documentType->getKey(),\n 'student' => $student->getKey(),\n 'debrief' => $debrief->getKey()\n ];\n\n $response = $this->actingAs($this->adminUser)->putJson('/api/documents/' . $document->getKey(), $data);\n if ($response->exception) {\n dd($response->exception);\n }\n\n $document = $document->fresh();\n\n $expectedResponseContent = (new DocumentResource($document))->toArray(request());\n\n $response->assertOk()\n ->assertJson([\n 'data' => $expectedResponseContent\n ]);\n\n // $this->actingAs($this->unauthorizedUser)->putJson('/api/documents/' . $tutor->getKey(), $data)\n // ->assertForbidden();\n }", "title": "" }, { "docid": "ed8de68c7d88f1904a744dc02701808c", "score": "0.54521495", "text": "public function update(Request $request, $id)\n {\n //\n //highlight sidebar\n $this->setActiveParent();\n\n $validator = $this->custom_validation($request, 'update');\n\n $products = Product::findOrFail($id);\n\n //check if $validator is true && record is found\n if( $validator === true && $products ){\n\n \n //begin transaction\n $transaction = DB::transaction(function() use($request, $products) {\n\n $request['fk_updatedby'] = Auth::id();\n\n //to be remove from storage\n $oldfilename = $products->pictx; \n\n //dd($request->all());\n\n $products->update($request->all());\n\n //check if user removed the logo\n if( $request->removepictx && $request->removepictx == 'on' ){\n \n AppStorage::remove($oldfilename);\n\n //update DB for correct filename @pictx\n $products->update([\n 'pictx'=> null\n ]);\n\n }//END check if user removed the logo\n\n\n //if request uploaded picture\n if( $request->pictx ){\n\n AppStorage::remove($oldfilename);\n \n //update DB for correct filename @pictx\n $products->update([\n 'pictx'=> AppStorage::store('products', $request->pictx)\n ]);\n\n }//END check if request uploaded picture\n\n\n\n session()->flash('success', \"$request->name has been updated!\");\n\n //return redirect(\"/products/edit/$products->pk_products\");\n return redirect()->back();\n\n\n\n });//END transaction\n\n return $transaction;\n \n\n\n \n }else{\n\n //null = current request\n $form_fields = DynamicForm::form_fields('update', $products, null, Product::form_fields() );\n\n $this->setPrerequisites();\n $categories = $this->categories;\n $supplier = $this->supplier;\n\n return view('products.edit', compact('form_fields', 'products', 'categories', 'supplier'))->withErrors($validator); \n //return redirect()->back()->withInput()->withErrors($validator);\n\n\n\n\n }\n\n\n\n\n\n }", "title": "" }, { "docid": "88a70023be7208ea677c3d6e556c61fb", "score": "0.5448917", "text": "public function update(Request $request, $id)\n {\n //\n \n \n $requestData = $request->all();\n \n $file = $request->file('foto');\n if($request->hasFile('foto')){\n \n $requestData['foto']=$file->openFile()->fread($file->getSize());\n /*\n \n $requestData = $request->all();\n \n if ($request->hasFile('foto')) {\n $requestData['foto'] = $request->file('foto')\n ->store('uploads', 'public');\n \n*/\n }\n\n $perfilestudiante = PerfilEstudiante::findOrFail($id);\n $perfilestudiante->update($requestData);\n\n $redireccion='perfil-estudiante/'.$id.'/edit';\n return redirect($redireccion)->with('flash_message', 'PerfilEstudiante updated!')->with('menu','usuario_docente');\n }", "title": "" }, { "docid": "6c0c4f37dc5881fde1e7b8d7f270ec97", "score": "0.544714", "text": "public function update($id) {\n\n }", "title": "" }, { "docid": "d9c8b0075dcc91c0089aaf5fd99a7f55", "score": "0.54461193", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'service_name'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n // $attachment=$request->old_attachment;\n // if($request->hasFile('attachment')){\n // if($attachment!=null){\n // // unlink('storage/'.$request->old_attachment);\n // }\n // $attachment=$request->file('attachment')->store('Attachment');\n // }\n $data=[\n 'service_name'=>$request->service_name,\n // 'attachment'=>$attachment,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Service::where('id',$id)->update($data);\n return redirect()->route('listService');\n }", "title": "" }, { "docid": "33f614d65ce49db36128bb80e0048cd2", "score": "0.54417664", "text": "public function update() { if (is_null($this->id))\n trigger_error(\"Reference::update(): Attempt to update a Reference object that does not have its ID property set.\", E_USER_ERROR);\n\n // Update the Article\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE reference SET RefFile=:refFile UploaderID=:uploaderID Source=:source WHERE ReferenceID = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":refFile\", $this->refFile, PDO::PARAM_STR);\n $st->bindValue(\":uploaderID\", $this->uploaderID, PDO::PARAM_INT);\n $st->bindValue(\":source\", $this->source, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "181ee26d73bd3c1143b1d276e6b7bb91", "score": "0.54384834", "text": "public function update(Request $request, $id)\n {\n $store = Store::where('id',$id)->first();\n $store->name = $request->name;\n $store->address = $request->address;\n $store->phone = $request->Phone;\n $store->opening = $request->opening;\n if($request->has('image')){\n unlink(public_path('back/images/store/'.$store->image));\n $imageName = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('back/images/store'), $imageName);\n $store->image = $imageName;\n }\n $store->save();\n return redirect()->back()->with('success','Store has been updated successfully!');\n }", "title": "" }, { "docid": "70c454fe61b8abc6777a08b358712c67", "score": "0.54292583", "text": "public function update($id){\n \n }", "title": "" }, { "docid": "0ae71e0ed59055b44c4c0b240eb670ae", "score": "0.5427381", "text": "public function update($id)\n\t{\n\t\t$manager = App::make(\\BackupManager\\Manager::class);\n\t\t$manager->makeRestore()->run('local', 'storage_path('.$id.')');\n\t}", "title": "" }, { "docid": "ee62ec950231813104ded30d5cdda483", "score": "0.5426956", "text": "public function update(StoreParameter $request, $id)\n {\n $data = $request->all();\n $parameter = Parameter::find($id);\n $this->checkAndUploadImage($request, 'image', 'posters', $parameter);\n $parameter->update($data);\n Session::flash('message', 'Успешно изменено');\n return redirect()->route('parameters.index');\n }", "title": "" }, { "docid": "e7a9ed5515a2a2ec06d6aca33efe6caf", "score": "0.5416989", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::query()->findOrFail($id);\n if($product->photo !== null){\n File::delete($product->photo->file);\n }\n\n\n if ($file = $request->file('photo_id')) {\n $name = Time() . $file->getClientOriginalName();\n $file->move('images', $name);\n $photo = Photo::create(['file' => $name]);\n $input['photo_id'] = $photo->id;\n }\n $product->update($request->all());\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "b50ec68239e495a6eac6681b6be2bd10", "score": "0.54154384", "text": "public function put($resource, $data, array $parameters = array())\n {\n // Pass the request on\n return $this->sendData($resource, $data, $parameters, \"PUT\");\n }", "title": "" }, { "docid": "55601806ef2a9d7e3f71d62851e418fc", "score": "0.54153293", "text": "public function updateById($data, $id);", "title": "" }, { "docid": "bc24b326261d7a5dcbc2c4576e30536b", "score": "0.5414857", "text": "public function update(Request $request, $id)\n {\n $single=Brand::findorfail($id);\n $image = $single->image;\n\n\n if ($request->file() != null){\n\n Storage::delete('upload/brands/'.$image);\n\n $upload = $request->file('image');\n\n\n $upload = $request->file('image');\n\n\n $file_name = 'brand_image_'.time().'.'.$upload->getClientOriginalExtension();\n\n $path = $upload->storeAs('upload/brands/',$file_name);\n $single->update([\n 'name'=>$request->name,\n 'image'=>$file_name\n ]);\n }else{\n\n $single->update([\n 'name'=>$request->name,\n 'image'=>$request->img_name\n ]);\n }\n\n\n return redirect('admin/brands');\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.54146737", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "10ffb6f2bcc02987225b2f72d4364775", "score": "0.5405863", "text": "function update($id, $data);", "title": "" } ]
e0b2ba883bc73d99c87b06045fbb9611
Get the width of this Block.
[ { "docid": "c40f40519d8504c687705d8ca695f25c", "score": "0.6633048", "text": "public function getWidth() : int\n {\n $highest_column = $this->internal_worksheet->getHighestColumn();\n return Coordinate::columnIndexFromString($highest_column);\n }", "title": "" } ]
[ { "docid": "850454ebee0fdd97c5d1b4c1263e9de2", "score": "0.8196938", "text": "public function getWidth() {\n return $this->_width;\n }", "title": "" }, { "docid": "850454ebee0fdd97c5d1b4c1263e9de2", "score": "0.8196938", "text": "public function getWidth() {\n return $this->_width;\n }", "title": "" }, { "docid": "f66c31b0dbe3728a2026aa89a9c393d6", "score": "0.8185961", "text": "public function getWidth() {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "7a8ca293b29d74225c8dc860e96396bf", "score": "0.8175688", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "dcba36bc456a2c7f0014670fd7bcc3dc", "score": "0.8156462", "text": "public function getWidth() {\n\t\treturn $this->width;\n\t}", "title": "" }, { "docid": "b99dbc15d9f2870b6048d30e85f59c6e", "score": "0.8143909", "text": "public function getWidth()\r\n {\r\n return $this->width;\r\n }", "title": "" }, { "docid": "4585430b6b4b40cf8aa26e76751d6cd2", "score": "0.8139577", "text": "public function getWidth() {\r\n return $this->width;\r\n }", "title": "" }, { "docid": "4585430b6b4b40cf8aa26e76751d6cd2", "score": "0.8139577", "text": "public function getWidth() {\r\n return $this->width;\r\n }", "title": "" }, { "docid": "5f835e41769cdd1f35dbac138b13eec8", "score": "0.8125859", "text": "public function getWidth()\r\n\t{\r\n\t\treturn $this->width;\r\n\t}", "title": "" }, { "docid": "95e9fa48b79285bda2f753c9589dd539", "score": "0.8108228", "text": "public function getWidth()\n\t{\n\t\treturn $this->width;\n\t}", "title": "" }, { "docid": "ac9d6fe95104a9c47af9699721cd7199", "score": "0.81076735", "text": "public function get_width() {\n\t\treturn $this->width;\n\t}", "title": "" }, { "docid": "b65a9b0525d3dff3ee82ff42b5762d6b", "score": "0.8106719", "text": "public function getWidth()\n {\n return $this->get('width');\n }", "title": "" }, { "docid": "56a5e9cf2459f4eeb59bf7b8bafd8b9f", "score": "0.81062824", "text": "public function getWidth()\n {\n return $this->_width;\n }", "title": "" }, { "docid": "7a33f8f008017b8429d40bcbf0eaafd1", "score": "0.80557466", "text": "public function getWidth()\n {\n return $this->width;\n }", "title": "" }, { "docid": "a653077c6032d326ba4dfe6eebc504d1", "score": "0.8051948", "text": "public function getWidth() {\n return $this->width;\n }", "title": "" }, { "docid": "e35c4add27485f4e58c439042ce5b2a7", "score": "0.8036657", "text": "public function get_width()\n {\n // Return the width value\n return $this->_width;\n }", "title": "" }, { "docid": "0123dae607e991f29384a8caa8f2ddb9", "score": "0.80236113", "text": "public function width()\n {\n return $this->width;\n }", "title": "" }, { "docid": "28599b70b2028865f145be18f9a3d7a2", "score": "0.8012846", "text": "public function get_width() {\n\t\treturn (int) $this->width;\n\t}", "title": "" }, { "docid": "1a8fd8f116c5ed071d51e53f791a67c0", "score": "0.7962846", "text": "public function width() { return $this->_m_width; }", "title": "" }, { "docid": "09407a716004cef0ed357a5ae85934ca", "score": "0.7961376", "text": "public function getWidth() : int\n {\n return $this->width;\n }", "title": "" }, { "docid": "b3c0e76c2e30614c3cfd99e0496e0146", "score": "0.79111", "text": "public function getWidth() {\r\n\t\treturn $this->getAtributo(\"width\");\r\n\t}", "title": "" }, { "docid": "8eb01a403e43e5949da0b0304454aee4", "score": "0.7877313", "text": "public function getWidth(): int\n {\n return $this->width;\n }", "title": "" }, { "docid": "67a656427082cbc558191f3ca9e5eaf7", "score": "0.7876259", "text": "public function getWidth() {\n return $this->metaData['width'];\n }", "title": "" }, { "docid": "96b2c60f24864bafbadb8f6cf6f42d6f", "score": "0.78627217", "text": "public function getWidth(){\n\t\treturn $this->width;\n\t}", "title": "" }, { "docid": "8c610133f54666c50652c01a95eda080", "score": "0.770862", "text": "public function getWidth()\n {\n return $this->_getInfo(0);\n }", "title": "" }, { "docid": "e5c62884d46be7f84b13ad4dbbf419b3", "score": "0.76758504", "text": "public function getWidth(): int\n {\n return $this->model->width;\n }", "title": "" }, { "docid": "a87686d8f7d6f76c52343c6828c0ad62", "score": "0.7656355", "text": "public function getWidth() {\n\t return $this->getValue(self::FIELD_WIDTH);\n\t}", "title": "" }, { "docid": "c4466e73556bdf2d023faa560dbc4d32", "score": "0.762194", "text": "public function getWidth(): float\n {\n return $this->width;\n }", "title": "" }, { "docid": "b9bcd22b40db305f21f1c164faa7a507", "score": "0.7589496", "text": "public function getWidth() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"width\");\n\t}", "title": "" }, { "docid": "b9bcd22b40db305f21f1c164faa7a507", "score": "0.7589496", "text": "public function getWidth() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"width\");\n\t}", "title": "" }, { "docid": "b9bcd22b40db305f21f1c164faa7a507", "score": "0.7589496", "text": "public function getWidth() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"width\");\n\t}", "title": "" }, { "docid": "d84b21913149b496e83dba0b75798e82", "score": "0.75705737", "text": "public function width()\n {\n return $this->meta['width'];\n }", "title": "" }, { "docid": "b8480360991531b85530944f1e60869a", "score": "0.7529427", "text": "public function get_width()\n\t{\n\t\tif ( $this->test() ){\n\t\t\tif ( isset($this->w) ){\n\t\t\t\treturn $this->w;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "b8480360991531b85530944f1e60869a", "score": "0.7529427", "text": "public function get_width()\n\t{\n\t\tif ( $this->test() ){\n\t\t\tif ( isset($this->w) ){\n\t\t\t\treturn $this->w;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "8ed7becf03d28b6970b7252251941c4b", "score": "0.7500463", "text": "public function getWidth()\n {\n $value = $this->get(self::WIDTH);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "8ed7becf03d28b6970b7252251941c4b", "score": "0.7500463", "text": "public function getWidth()\n {\n $value = $this->get(self::WIDTH);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "df37169affaaecfe93d74de43daf99da", "score": "0.7459566", "text": "function width()\n {\n $this->_debug(\"Get Width\");\n return abs($this->_right - $this->_left) + 1;\n }", "title": "" }, { "docid": "e04d1815bf6967d4059629b10a6f5ba2", "score": "0.7414081", "text": "public function getWidth()\n {\n return $this->_db->prepareStringToOut($this->_width);\n }", "title": "" }, { "docid": "255913ef43af926e28b3525498a7c17d", "score": "0.7395609", "text": "public function width()\n {\n return array_get($this->dimensions(), 0);\n }", "title": "" }, { "docid": "e5ab4a0660ec237df97064af1fd24943", "score": "0.73002195", "text": "public function getWidth() {\n return $this->boardWidth;\n }", "title": "" }, { "docid": "355674cb55453b4f2eb6cfa035108ec0", "score": "0.7244429", "text": "public function width() {\n if ( $this->isImage() ) {\n return $this->image_dimensions['width'];\n }\n }", "title": "" }, { "docid": "f02dd23870436d819bd3c79b3c62ee63", "score": "0.7116755", "text": "public static function getWidth()\n {\n return self::$imgWidth;\n }", "title": "" }, { "docid": "b7635f4bbee297ef7df2c0e930986d56", "score": "0.70342904", "text": "public function width() {\n return $urx - $llx;\n }", "title": "" }, { "docid": "1cfc83a8e4a157ac00d0b7f6c0fff719", "score": "0.70147336", "text": "public function width()\n {\n return imagesx($this->data);\n }", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.6995449", "text": "public function getWidth();", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.6995449", "text": "public function getWidth();", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.6995449", "text": "public function getWidth();", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.6995449", "text": "public function getWidth();", "title": "" }, { "docid": "2c4696c1a1af64677f68fde394374047", "score": "0.6946234", "text": "public function getWidth() : int;", "title": "" }, { "docid": "2c4696c1a1af64677f68fde394374047", "score": "0.6946234", "text": "public function getWidth() : int;", "title": "" }, { "docid": "5f1f3c03abf303ac584d3560f947ed18", "score": "0.6936662", "text": "public function getWidth(): int;", "title": "" }, { "docid": "5f1f3c03abf303ac584d3560f947ed18", "score": "0.6936662", "text": "public function getWidth(): int;", "title": "" }, { "docid": "5f1f3c03abf303ac584d3560f947ed18", "score": "0.6936662", "text": "public function getWidth(): int;", "title": "" }, { "docid": "b6153d49dcce669cf4771e442a3104b5", "score": "0.69226396", "text": "public function getPixelWidth()\n {\n return $this->pixel_width;\n }", "title": "" }, { "docid": "d8da03dc4c164625436c06d5ea116dfa", "score": "0.6919579", "text": "public function getWidth() {\n return (int) imagesx($this->image);\n }", "title": "" }, { "docid": "9a0699a00c1d69a63078b51b6bc7d2f7", "score": "0.69177216", "text": "public function getPixelWidthValue()\n {\n $wrapper = $this->getPixelWidth();\n return is_null($wrapper) ? null : $wrapper->getValue();\n }", "title": "" }, { "docid": "2da2b0e81703edf2da7afbb5fcd0c045", "score": "0.69136065", "text": "function getWidgetWidth() {\n return $this->getData('width');\n }", "title": "" }, { "docid": "c809d94a60ec72763a3aaa4160017246", "score": "0.690971", "text": "public function getWidth ();", "title": "" }, { "docid": "50041101bb29986c51b6b9efaa1df847", "score": "0.6896487", "text": "public function getDimensionWidth()\n {\n return $this->dimensionWidth;\n }", "title": "" }, { "docid": "0722b9338f27c6e573a42a7b75ce2d73", "score": "0.6895057", "text": "function get_width() {\n\t\treturn imagesx($this->image);\n\t}", "title": "" }, { "docid": "93509b5fdad917370e459bb71b25bd31", "score": "0.6866957", "text": "public function width() : int\n {\n \tif ($this->is_image())\n \t{\n \t if ($this->_width < 0)\n \t {\n \t $res = getimagesize($this->_file);\n \t $this->_width = $res[0];\n \t $this->_height = $res[1];\n \t }\n \t return $this->_width;\n \t}\n \treturn $this->_width;\n }", "title": "" }, { "docid": "dbef844fcf61c271c1d2cc01e1fac2f7", "score": "0.6862009", "text": "public function getImageWidth()\n {\n return $this->imageWidth;\n }", "title": "" }, { "docid": "8c67b907e70944fedbd1dc42379d7371", "score": "0.6820692", "text": "public function getWidthPixels()\n {\n return isset($this->width_pixels) ? $this->width_pixels : null;\n }", "title": "" }, { "docid": "671d829938350c2e39c0491b7aaebdfc", "score": "0.6812945", "text": "public function getWidth() {\n\t\treturn imagesx($this->_originalImage);\n\t}", "title": "" }, { "docid": "4e4d19901c794ecf63b65b513763194d", "score": "0.68016535", "text": "public function getImageWidth()\n {\n return $this->_image_width;\n }", "title": "" }, { "docid": "5eb971d3c5377a31ab20bb3979511523", "score": "0.6795046", "text": "public function getScaledWidth() {\n return $this->scaledWidth;\n }", "title": "" }, { "docid": "ad7bae8f749a3ba0eea3d794a9449c37", "score": "0.67357486", "text": "public function total_width()\n\t\t{\n return $this->width() * $this->quantity;\n\t\t}", "title": "" }, { "docid": "34ba63a7e45506f0217814fcd2921867", "score": "0.67219913", "text": "public function getAvailableWidth(): int\n {\n return $this->getWidth() - $this->getLeftMargin() - $this->getRightMargin();\n }", "title": "" }, { "docid": "9c3cee1c2f87bb5c2d7a162a93531cb2", "score": "0.6696836", "text": "function getWidth() {\n \n return imagesx($this->image);\n }", "title": "" }, { "docid": "6a1111f62d8d3d0d45e6fe2cc7776497", "score": "0.6660751", "text": "public function getWidth(): ?int\n {\n return $this->width;\n }", "title": "" }, { "docid": "74c00fd8928a14a5700ba83ee17d58f9", "score": "0.6653296", "text": "public function setWidth($var)\n {\n GPBUtil::checkInt32($var);\n $this->width = $var;\n\n return $this;\n }", "title": "" }, { "docid": "74c00fd8928a14a5700ba83ee17d58f9", "score": "0.6653296", "text": "public function setWidth($var)\n {\n GPBUtil::checkInt32($var);\n $this->width = $var;\n\n return $this;\n }", "title": "" }, { "docid": "a0045502419ca45771be46c2792b90b4", "score": "0.6653124", "text": "function getWidth():DynamicValue\n {\n return $this->width;\n }", "title": "" }, { "docid": "23e409dc46344ef474cc935e161679a1", "score": "0.6542983", "text": "function &width()\n {\n if ( file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\n {\n $size = getimagesize( $this->filePath( true ) );\n return $size[0];\n }\n else\n return 120;\n }", "title": "" }, { "docid": "95d75e1bcd3d246d4881f223ff79ec12", "score": "0.65186137", "text": "public function getWidthPixelsUnwrapped()\n {\n return $this->readWrapperValue(\"width_pixels\");\n }", "title": "" }, { "docid": "013741754a9db0b5c349bff982a6e33e", "score": "0.65091705", "text": "public function getPageWidth()\n {\n return $this->_pageWidth;\n }", "title": "" }, { "docid": "4bc50fd92a12ad01d5684e1fd082eca1", "score": "0.6480436", "text": "public function getLabelWidth() {\n\t\treturn $this->labelWidth;\n\t}", "title": "" }, { "docid": "6ca02bf3defb3a927bb8b92de5c81969", "score": "0.64666766", "text": "public function getPreviewPixelWidthValue()\n {\n $wrapper = $this->getPreviewPixelWidth();\n return is_null($wrapper) ? null : $wrapper->getValue();\n }", "title": "" }, { "docid": "e043488840d2f4d00768dbe9df486e23", "score": "0.6465562", "text": "public function width($width = 0)\n {\n return $this->_attribute('width', intval($width));\n }", "title": "" }, { "docid": "b71548e47f6c20712609cb0082ca52c6", "score": "0.64337385", "text": "public function cropWidth()\n {\n return $this->meta['crop_width'];\n }", "title": "" }, { "docid": "324d780193312763795e56c5a8ba3d34", "score": "0.6420632", "text": "public function maxWidth()\n {\n return $this->maxWidth;\n }", "title": "" }, { "docid": "5f935e56b613f8d00491361ac5dd151a", "score": "0.6353243", "text": "public function getOriginalWidth()\n {\n $this->getImageType();\n return $this->_imageSrcWidth;\n }", "title": "" }, { "docid": "f2b260385c46bd3eef40355fa36b86ed", "score": "0.6329849", "text": "public function getWidth(): ?float\n {\n return $this->width;\n }", "title": "" }, { "docid": "33d5dcbb240d8056d8eaadce61f7919c", "score": "0.63265294", "text": "public function getWidth(): ?int;", "title": "" }, { "docid": "6c22f454c38938371a3d10a78c7ad9bd", "score": "0.6269887", "text": "public function getWidth(): ?int {\n $val = $this->getBackingStore()->get('width');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'width'\");\n }", "title": "" }, { "docid": "1248c59af70c56412f575ea724d6dbeb", "score": "0.62555534", "text": "public function getContentWidth() {\n\t\treturn $GLOBALS['content_width'];\n\t}", "title": "" } ]
90cfbe8c5cc92f168f797931c5e112a6
Get an array of objects from database
[ { "docid": "cd734df241ae5c4fa7c9032312ff5fc6", "score": "0.0", "text": "public static function getAll()\n {\n $db = Database::connect();\n $sql = \"select * from tbl_beitrag\";\n $stmt = $db->prepare($sql);\n $stmt->execute(array());\n $data = $stmt->fetchAll();\n Database::disconnect();\n $tmp = [];\n\n if ($data == null) {\n\n return null;\n\n }else{\n\n foreach ($data as $pst){\n\n $tmp[]= new Post($pst['bID'], $pst['bTitel'], $pst['bInhalt'], $pst['bBesitzer'], $pst['bTimeCreated']);\n }\n return $tmp;\n }\n\n\n }", "title": "" } ]
[ { "docid": "0a900a96be07db07c8ed8748f4b46f0e", "score": "0.77909285", "text": "public function findAll(){\n $resultat = $this->bdd->query(' SELECT * FROM ' . $this->tableName);\n $rows = $resultat->fetchAll(\\PDO::FETCH_ASSOC);\n $objectsArray = [];\n foreach($rows as $row){\n $objectsArray[$row['id']] = $this->buildObject($row);\n }\n return $objectsArray;\n \n }", "title": "" }, { "docid": "01fcee8d0633d5d599fc6d8b2d3a3834", "score": "0.7447587", "text": "function query()\n {\n $objects=array();\n \n $this->_query = $this->genereteSelect();\n \n $result = self::$_mysqli->query($this->_query);\n \n if($result) \n {\n /* fetch object array */\n while($object = $result->fetch_object($this->object_of)) \n {\n $objects[]=$object;\n } \n /* free result set */\n $result->close();\n }\n \n unset($result);\n \n $this->reset();\n \n return $objects;\n }", "title": "" }, { "docid": "b65a5eccb016cff40a799cfc8ef529d9", "score": "0.7441598", "text": "public static function select()\n {\n $sql = sprintf('SELECT * FROM %s', self::TABLE_NAME);\n\t\n $result = ConnectionManager::getInstance()->getConnection()->query($sql);\n\t\n $objects = array();\n while ($row = $result->fetchRow(MDB2_FETCHMODE_ASSOC))\n {\n $objects[] = parent::populateObject(__CLASS__, $row);\n }\n\n return $objects;\n }", "title": "" }, { "docid": "0d473f3f5b0a3a8aadfad8024467aa07", "score": "0.73910886", "text": "public function getAll(){\n\t\t$query=$this->db->query(\"SELECT * FROM $this->table ORDER BY id DESC\");\t\n\t\t\t\n\t\t//DEVOLVEMOS EL RESULTADO EN FORMA DE UN ARRAY DE OBJETOS\n\t\twhile($row=$query->fetch_object()){\n\t\t\t$resultSet[] = $row;\n }\n return $resultSet;\n }", "title": "" }, { "docid": "caca425d2228241a2d4ec5a4e90336f9", "score": "0.73016083", "text": "public function fetchAll()\n {\n $result = $this->statement->fetchAll(\\PDO::FETCH_ASSOC);\n $rows = array();\n\n if ($this->model !== null) {\n foreach ($result as $row) {\n $model = $this->model;\n $rows[] = new $model($row, false);\n }\n } else {\n foreach ($result as $row) {\n $rows[] = $row;\n }\n }\n\n return $rows;\n }", "title": "" }, { "docid": "ec64257431fd5247aaa581f7754589c9", "score": "0.72599286", "text": "public function GetAll(){\r\n $retval = array();\r\n $cpt = 0;\r\n\r\n //Ouverture de connexion \r\n //$this->dbh = $this::GetDbAccess();\r\n //Préparation de la query\r\n $sth = $this->dbh->prepare(call_user_func($this->NameSpaceObjectDb.$this->QueryProvider.\"::SelectAllQuery\") );\r\n //Exécution de la query\r\n $sth->execute();\r\n //Récupération des lignes\r\n $result = $sth->fetchAll();\r\n foreach($result as $row){ \r\n //Ajout à la collection après le mapping\r\n $obj = $this->NameSpaceObjectDb.$this->ObjectType;\r\n $objectItem = new $obj;\r\n call_user_func($this->NameSpaceObjectDb.$this->MappingProvider.\"::MapFromRow\",$row,$objectItem);\t\t\r\n $retval[$cpt++]=$objectItem;\r\n }\r\n return $retval;\r\n }", "title": "" }, { "docid": "ff6ba692d35ad9bf43a8c396dd38531b", "score": "0.72173905", "text": "public function fetchObject(){ \n $all = array();\n\twhile (($tmp[] = mysql_fetch_object($this->result)) == true) {$all = $tmp;}\n\treturn $all; \n }", "title": "" }, { "docid": "38df61881d2571b233731554a04141c3", "score": "0.7161203", "text": "public function get(){\n\t\t\t$this->query();\n\t\t\tself::$data = self::$res->fetchAll(PDO::FETCH_OBJ);\n\t\t\treturn self::$data;\n\t\t}", "title": "" }, { "docid": "d988b5eaf2721f6b95dc2e47b6825c8f", "score": "0.7157196", "text": "public function getAll()\n {\n $stmt = $this->query(\"SELECT * FROM $this->table\");\n\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "e8adb75bdf1bbd563266e5eb81204c49", "score": "0.7125984", "text": "public static function getAll ()\n\t{\n\t\t$db = self::_getDbTable(self::$_dbTable);\n\n\t\t$select = $db->select();\n\t\t\n\t\t$select->setIntegrityCheck(false);\n\n\t\t$resultSet = $db->fetchAll($select);\n\n\t\treturn self::_createArrayFromResultSet($resultSet, array(__CLASS__, '_initItem'));\n\t}", "title": "" }, { "docid": "e84099c7f4765fc375d6b0b56ec02a00", "score": "0.71196216", "text": "public function getObjects($sql) {\n $data = $this->getRows($sql);\n return $this->arrayToObject($data);\n }", "title": "" }, { "docid": "84792d4a3ad7ebdc75823888c2d591f7", "score": "0.7104567", "text": "public function fetchObjectAll()\n\t{\n\t\treturn $this->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "9f23ab46369c5cdb115c10a4e197a7f2", "score": "0.7098533", "text": "public function all()\n\t{\n\t\treturn $this->get()->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "c07f7944748648d48b8ac4943ecff789", "score": "0.70938027", "text": "public function fetchAll()\n {\n $sql = \"SELECT id, author_id, title, isbn, date_published FROM book ORDER BY date_published, title\";\n\n $statement = $this->dbAdapter->prepare($sql);\n\n $data = [];\n if ($statement->execute()) {\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n\n $rows = $statement->fetchAll();\n foreach ($rows as $row) {\n $data[] = new Book($row);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "c6af53a704198a35eecb5d4edb741223", "score": "0.7046994", "text": "public function getObjects(): array;", "title": "" }, { "docid": "df6dd7cb18208bbe514da4a547be358b", "score": "0.70282924", "text": "function getMultipleObjectsInArray($sql){\n require 'connect.php';\n\n $dados = mysqli_query($connect, $sql);\n $array = array();\n\n while($resultado = mysqli_fetch_assoc($dados)){\n array_push($array, $resultado);\n }\n\n return $array;\n}", "title": "" }, { "docid": "2f2823963b01939beae829f7552b0e69", "score": "0.7017235", "text": "public function retrieveAll();", "title": "" }, { "docid": "3fc6ba9481c9d28115c13a67e5d66340", "score": "0.7016796", "text": "public function getRecipesFromDB(): array\n {\n $statement = \"SELECT `title`, `link`, `imageURL`, `ingredients` FROM `recipes`;\";\n $query = $this->db->prepare($statement);\n $query->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, \"GRUB\\Recipe\\RecipeEntity\");\n $query->execute();\n $recipesOut = $query->fetchAll();\n\n return $recipesOut;\n }", "title": "" }, { "docid": "6d6fb5850c77ed77e7991549af909ade", "score": "0.7015677", "text": "public function getListado(){\n \t$sql=\"select * from $this->tabla \";\n \t$resultados=array();\n\n $resultado =$this->db->query($sql) \n or die (\"Fallo en la consulta\");\n\n while ( $fila = $resultado->fetch_object() )\n {\n \n $objeto= new $this->modelo($fila);\n $resultados[]=$objeto;\n } \n return $resultados; \n }", "title": "" }, { "docid": "5221b4f540e2733f3edb44859af297b4", "score": "0.69988495", "text": "public function getAll(){\n\t\treturn $this->db->fetchAll();\n\t}", "title": "" }, { "docid": "be349e65299136a94b417422607a7a58", "score": "0.69795626", "text": "public function getAll() {\r\n\t\t//$db = $this->getDefaultAdapter();\r\n\t\t//return $db->query($sql);\r\n\t\t$rows = $this->fetchAll()->toArray();\r\n\t\treturn $rows;\r\n\t}", "title": "" }, { "docid": "7427a53e5c4e338926a84f9fddc99533", "score": "0.6974528", "text": "public static function all() : array\n {\n\n $results = static::get_database_access()->get_all(self::get_table());\n\n $records = self::instances_from_array($results);\n\n return $records;\n }", "title": "" }, { "docid": "fee52db2380ca8868360c9e68a1abc7d", "score": "0.69559455", "text": "public function findAll()\n\t{\n $sql = \"SELECT * \n FROM objects\n ORDER BY name\";\n\n $dbh = Db::getDbh();\n\n $stmt = $dbh->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll(\\PDO::FETCH_CLASS, '\\Model\\Entity\\Object');\n\n return $results;\n\t}", "title": "" }, { "docid": "0de445142dba9620f7d5a9ab7c2e2e0b", "score": "0.6948505", "text": "public static function find_by_sql($sql = \"\"){\n \n $result_set = self::$database -> query($sql);\n $object_array = array();\n\n // while ($row = $result_set->fetch_row()) {\n while ($row = mysqli_fetch_array($result_set)){\n\n \n $object_array[] = static::instantiate($row);\n \n }\n return $object_array;\n\n }", "title": "" }, { "docid": "bce181a0ad83b990964735b808ad1719", "score": "0.6946468", "text": "public static function all()\n {\n self::dbConnect();\n\n $stmt = self::$dbc->prepare(\"SELECT * FROM users\");\n $stmt->execute();\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $instance = null;\n $array = [];\n if ($result) {\n foreach ($result as $key => $value) {\n $instance = new static($value);\n $array[] = $instance;\n }\n }\n return $array;\n }", "title": "" }, { "docid": "4784464bf69fe728d5db7ff6cb0930db", "score": "0.694014", "text": "public function findAll() {\n $sql = \"select * from book order by book_id\";\n $result = $this->db->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $books = array();\n foreach ($result as $row) {\n $bookId = $row['book_id'];\n $books[$bookId] = $this->buildBook($row);\n }\n return $books;\n }", "title": "" }, { "docid": "2577344dd975d103b99f68032d7c2e3e", "score": "0.69293106", "text": "public function readAll()\n {\n $query = \"SELECT * FROM user order by id\";\n $response = self::$bdd->prepare($query);\n $response->execute();\n\n $allusers = $response->fetchAll();\n\n $objects = $this->arrayToObject($allusers, 'user');\n return $objects;\n }", "title": "" }, { "docid": "ef38f2d3cff20312c4d351faf3380b0f", "score": "0.69276017", "text": "public function get()\n {\n $stmt = $this->db->prepare(\"SELECT * FROM $this->table\");\n $stmt->execute();\n $stmt = $stmt->get_result();\n\n return $this->toArray($stmt);\n }", "title": "" }, { "docid": "693bc8ed6aa51ebb048ffd0f6ee33e1d", "score": "0.6927107", "text": "public function fetchAll(): array;", "title": "" }, { "docid": "e27a9bb6d0c2046ca0c5cfb13860d87a", "score": "0.69124967", "text": "public static function getAll()\n {\n $db = new DatabaseManager();\n $connection = $db->getDbh();\n\n $sql = 'SELECT * FROM jobs';\n $statement = $connection->prepare($sql);\n $statement->setFetchMode(\\PDO::FETCH_CLASS, __CLASS__);\n $statement->execute();\n\n $objects = $statement->fetchAll();\n return $objects;\n }", "title": "" }, { "docid": "94ec9ce00124954b4d7a0ac8c4060617", "score": "0.68952817", "text": "public function FetchAll()\n {\n return $this->QUERY->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "9bc7bd5796e8efedfb4c74b9b1611235", "score": "0.6895152", "text": "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM PartsData';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theClient = new PartsData($row);\n array_push($arr, $theClient);\n }\n return $arr;\n }", "title": "" }, { "docid": "f252f432c6756373946b3e892316620b", "score": "0.6894512", "text": "public function fetchAll(){\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "94f5c0d14efc0d83917e86afe6e3f33f", "score": "0.6893152", "text": "public function get()\n {\n $sql = 'SELECT * FROM ' .$this->tableName;\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll();\n \n }", "title": "" }, { "docid": "f7186a3bb4630e7ff0728bf7c8b873fd", "score": "0.6883406", "text": "public static function query_and_instantiate_results($sql, $array=[]){\n $sth = static::prepare_and_execute_sql($sql, $array);\n $sth->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, get_called_class(), $array);\n $objects_array = [];\n foreach($sth as $row){\n $objects_array[] = $row;\n }\n return $objects_array;\n }", "title": "" }, { "docid": "79cdb03638d53c1067a6e1e6b6f732ec", "score": "0.68823206", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new OperationData());\n\n\t}", "title": "" }, { "docid": "e6101ca5ec266fb37753084cb2b4a094", "score": "0.68813205", "text": "public function get()\n {\n $query = $this->pdo->prepare(\n \"SELECT \" . ($this->select ? $this->select : '*') . \" FROM {$this->table} {$this->where}\"\n );\n $query->execute();\n if (class_exists($this->class)) {\n return $query->fetchAll(\n PDO::FETCH_CLASS, $this->class\n );\n }\n return $query->fetchAll(\n PDO::FETCH_OBJ\n );\n\n }", "title": "" }, { "docid": "1b6a142eba0bf7e147f8d06a853bb61e", "score": "0.687849", "text": "public function resultset() {\n $this->execute();\n return $this->stmt->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "e8457a722513a778f461b3b8456c1800", "score": "0.687055", "text": "public function get_objects()\n\t{\n if ( $r = call_user_func_array([$this, 'query'], func_get_args()) ){\n return $r->get_objects();\n\t\t}\n return [];\n\t}", "title": "" }, { "docid": "f18ffa6a6a0b09bac153d837366dcf55", "score": "0.68671435", "text": "public function get(): array {\n\t\t$statement = $this->pdo->prepare($this->query);\n\n\t\t$statement->execute();\n\n\t\tif ($result = $statement->fetchAll(PDO::FETCH_CLASS)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn [];\n\t}", "title": "" }, { "docid": "ebfb61670017feae38cbc0c58713b081", "score": "0.6835471", "text": "public static function getAll():array{\r\n $consulta= \"SELECT * FROM coleccion\";\r\n return DB::selectAll($consulta, self::class);\r\n }", "title": "" }, { "docid": "f9ff436af38160ceebfce836e2bbc806", "score": "0.68285936", "text": "public function readAll(){\n $query = \"SELECT * FROM catastro.inmuebles;\";\n $statement = $this->cdb->prepare($query);\n $statement->execute();\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\n return $rows;\n }", "title": "" }, { "docid": "ea8ad405b8db19789fff2c1629bdd9f8", "score": "0.6814634", "text": "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $rows = $this->getDb()->fetchAll($sql);\n // Convert array list to object list\n $books = array();\n foreach ($rows as $row) {\n $book = new Book($row);\n $books[] = $book;\n }\n return $books;\n }", "title": "" }, { "docid": "9460589c991088ba59866a3bb0ddbbd6", "score": "0.68091273", "text": "public function getAllData()\n {\n $sql = \"SELECT * FROM info\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "ad5004f8c88e4adec34f28c951359829", "score": "0.6808661", "text": "public function all()\n {\n $qResult = $this->prepareExecute(\"SELECT * FROM {$this->table()} AS t\");\n $result = [];\n\n foreach ($qResult as $item) {\n $result[] = $this->newModel($item);\n }\n\n return $result;\n }", "title": "" }, { "docid": "596bcd52eb0b3ab71c02c18908ff568b", "score": "0.6802473", "text": "public static function get_all($sql){\r\n\t\t\tglobal $db;\r\n\t\t\t$result = mysqli_query($db,$sql);\r\n\t\t\t$arr = array();\r\n\t\t\twhile($rows = mysqli_fetch_object($result))\r\n\t\t\t\t$arr[] = $rows;\r\n\t\t\t\treturn $arr;\r\n\t\t}", "title": "" }, { "docid": "0131e0d4b2d31ed745211b9a492d0d68", "score": "0.67967325", "text": "public function getArray() {\n\t\t\n\t\t$this->exec();\n\n\t\tif($this->Query['limit'] == 1) return (array) $this->object;\n\t\telse return $this->list_objects;\n\t}", "title": "" }, { "docid": "a05d8620c66d02dfd338696091f3a067", "score": "0.6795262", "text": "public function getAll(){\n $sql = \"SELECT * FROM $this->table\";\n $stm = DB::prepare($sql);\n $stm->execute();\n return $stm->fetchAll();\n }", "title": "" }, { "docid": "2437f5aac2ec8a340a1b20cdee346ef9", "score": "0.67896754", "text": "public function allObj($sql,$param = array()){\n \n $result = $this->query($sql,$param);\n \n return $result->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.6780794", "text": "public function getObjects();", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.6780794", "text": "public function getObjects();", "title": "" }, { "docid": "c98ad3238fc2d408b4a3fab1fc13770b", "score": "0.67756295", "text": "public function toObject()\n\t\t{\n\t\t\t$data = array();\n\n\t\t\tif ($this->query) {\n\t\t\t\t// mysqli_fetch_object - Mengembalikan baris saat ini dari hasil yang ditetapkan sebagai objek\n\t\t\t\twhile ($record = mysqli_fetch_object($this->query)) {\n\t\t\t\t\tarray_push($data, $record);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "5a60651161afa504df29c638a4bcc555", "score": "0.67712975", "text": "public function get() : array {\n return $this->getCollection()->get();\n }", "title": "" }, { "docid": "b742c8dd4a5683dc97ff667543f28471", "score": "0.67657405", "text": "public function GetAll() {\n $return = array();\n while ($this->FetchInto($row)) {\n $return[] = $row;\n }\n return $return;\n }", "title": "" }, { "docid": "43048f60993c14537ac607db628f85d1", "score": "0.67646754", "text": "function all(){\n global $conn;\n $table=get_class($this);\n $stmt=$conn->prepare(\"SELECT * FROM $table\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "f012ceb25ac272119fde9700e6e04fd1", "score": "0.67646474", "text": "public function fetchAll(){\n $this->_checkIfTableParameterDefined();\n $sql = \"SELECT * FROM `\".$this->_tableName.\"`\";\n /*@var $statement \\PDOStatement*/\n $statement = $this->query($sql);\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n $result = $this->_prepareDataSetForJsonify($result);\n return $result;\n }", "title": "" }, { "docid": "8a824d1051cef7d66c4b6bfc17be622f", "score": "0.67609763", "text": "public function retrivePosts() {\n $fetchedData = array();\n $sql = \"SELECT * FROM posts\";\n $result = $this->connection->prepare($sql);\n $result->execute();\n $row = $result->fetchAll(\\PDO::FETCH_OBJ);\n return $row;\n }", "title": "" }, { "docid": "a6263a8424b7c91c9fec312f4bc50fe2", "score": "0.67546535", "text": "public function fetch() : array\n {\n // La limit (ici 10) doit provenir d'une variable d'env.\n\n return $this->em->getRepository(Article::class)->findBy(\n array(),\n array('createdAt' => 'DESC'),\n $this->limit\n );\n }", "title": "" }, { "docid": "599f40b9cde26f99800e20ff6c46607a", "score": "0.67473125", "text": "public function resultSet()\r\n {\r\n $this->execute();\r\n return $this->stmt->fetchAll(\\PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "da97e750688fe3f47d51750e0c2d8ea3", "score": "0.673077", "text": "public function getProducts(){\n\t\t$query = parent::select(\"SELECT `products`.`id`, `products`.`name` FROM `products` ORDER BY `products`.`name` ASC\");\n\t\t$n = 0;\n\t\t$ob = array();\n\t\twhile($obj = parent::fetch_obj($query)){\n\t\t\t$ob['products'][$n] = $obj;\n\t\t\t$n++;\n\t\t}\n\t\treturn $ob;\n\t}", "title": "" }, { "docid": "368cbe7bfb2764ebc43e58e48e395bdf", "score": "0.6724854", "text": "public static function getObjects($db, $object){\n $class = get_class($object);\n $table = $class::$definition[\"table\"];\n return $db->query(\"SELECT * FROM $table\")->fetchAll();\n }", "title": "" }, { "docid": "cdb574a8d2a894dda041c581debf41f5", "score": "0.6715278", "text": "public static function FetchAll(){\r\n\t\t$usersArray = array();\r\n\t\t$query = new Query();\r\n\t\t$query->createSelect(array('*'), 'users');\r\n\t\t$arrayArraysUser = $query->execute(true);\r\n\t\tif(!empty($arrayArraysUser)){\r\n\t\t\tforeach($arrayArraysUser as $arrayUser){\r\n\t\t\t\tarray_push($usersArray, self::CreateObjectFromArray($arrayUser));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usersArray;\r\n\t}", "title": "" }, { "docid": "a978294227376138636b9b91b233d6ee", "score": "0.6713172", "text": "public function getAll(): array {\r\n $query = \"SELECT * FROM productos\";\r\n $stmt = $this->db->prepare($query);\r\n $stmt->execute();\r\n\r\n $stmt->setFetchMode(PDO::FETCH_CLASS, Producto::class);\r\n\r\n $output=[];\r\n while($product = $stmt->fetch()) {\r\n\r\n $output[] = $product;\r\n }\r\n return $output;\r\n }", "title": "" }, { "docid": "e445824f5af17513de2ddb1c1a80af31", "score": "0.67093635", "text": "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n return $data;\n }", "title": "" }, { "docid": "68e4842acff434120336075be4d811c4", "score": "0.67017305", "text": "function findAll() {\n global $bdd;\n\n $request = $bdd->prepare('SELECT * FROM articles');\n $request->execute();\n $articlesArray = [];\n\n while($donnees = $request->fetch()) {\n $article = new Article($donnees);\n $articlesArray[] = $article;\n }\n\n return $articlesArray;\n}", "title": "" }, { "docid": "6ab2cf99e59891a50e53845f37d3a6ec", "score": "0.66860545", "text": "protected function get_objects() {\n\t\t$query = $this->get_query( false, $this->get_limit() );\n\n\t\t$posts = $this->wpdb->get_results( $query );\n\n\t\treturn \\array_map(\n\t\t\tstatic function ( $post ) {\n\t\t\t\treturn (object) [\n\t\t\t\t\t'id' => (int) $post->ID,\n\t\t\t\t\t'type' => 'post',\n\t\t\t\t\t'content' => $post->post_content,\n\t\t\t\t];\n\t\t\t},\n\t\t\t$posts\n\t\t);\n\t}", "title": "" }, { "docid": "7815dbcd39b6c44dc7445b3402e7f1af", "score": "0.6683152", "text": "public function resultSet(){\n $this->exec();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "420d5971d8e712ce038549bbf9389f48", "score": "0.6675898", "text": "public function getAll1()\n {\n $items = array();\n $query = \"SELECT * FROM {$this->TableName} ORDER BY thk_decimal DESC\";\n $result = $this->db_connection->query($query);\n\n error_log(\"Generated Query is: $query\");\n \n if (!$result) {\n throw new Exception(\"Database error: {$this->db_connection->error}\", 500);\n }\n \n while ($item = $result->fetch_object($this->ModelName)) {\n $items[] = $item;\n }\n\n return $items;\n }", "title": "" }, { "docid": "b6b109b741fbff02e4ec1e0d3ce56918", "score": "0.6675016", "text": "public function findAll() {\n $sql = \"select * from arduino order by numero asc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $arduinos = array();\n foreach ($result as $row) {\n $arduinoId = $row['id'];\n $arduinos[$arduinoId] = $this->buildDomainObject($row);\n }\n return $arduinos;\n }", "title": "" }, { "docid": "e13e96032ee4f060d3db017fb01377c2", "score": "0.66700995", "text": "public static function find_by_sql($sql=\"\"){\n\t\tglobal $database;\n\t\t$result_set = $database->query($sql);\n\t\t$object_array = array();\n\t\twhile($row=$database->fetch_array($result_set)){\n\t\t\t$object_array[] = self::instantiate($row);\n\t\t}\n\t\treturn $object_array;\n\t}", "title": "" }, { "docid": "8452543568107751eb49322ebf5ac79f", "score": "0.66689175", "text": "public function getAll() {\n $sql = \"SELECT gebruikersnaam, wachtwoord FROM gebruikers\";\n\n $dbh = new PDO(DBConfig::$DB_CONNSTRING, DBConfig::$DB_USERNAME, DBConfig::$DB_PASSWORD);\n \n $resultSet = $dbh->query($sql);\n var_dump($resultSet);\n\n $lijst = array();\n foreach ($resultSet as $rij) {\n $u = new User($rij[\"gebruikersnaam\"], $rij[\"wachtwoord\"]); \n array_push($lijst, $u);\n }\n var_dump($lijst); \n $dbh = null;\n return $lijst;\n }", "title": "" }, { "docid": "2a938b4f890fb8ecf6198c412167e9db", "score": "0.66675514", "text": "public function list()\n {\n $tableName = $this->tableName();\n\n $statement = $this->getConnection()->prepare(\"SELECT * FROM \" . $tableName);\n\n $statement->execute(['id' => $id]);\n\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "b2a1d38df2719eb5acdeb4d54b798e09", "score": "0.6665159", "text": "public function fetchAll()\n\t{\n\t\t$select = $this->select();\n\t\t$data = $select->toArray();\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "175ff0cc2a86440f751604bd89342b8c", "score": "0.6651339", "text": "public function getAllResults(){\n\n $sqlQuery = (\"SELECT * FROM result\");\n\n $stmt = $this->_handler->prepare($sqlQuery);\n $stmt->execute();\n $res = $stmt->fetchAll(PDO::FETCH_OBJ);\n $results = [];\n foreach ($res as $result){\n array_push(\n $results, \n new Result(\n $result->id, \n $result->title, \n $result->content, \n $result->category));\n }\n return $results;\n }", "title": "" }, { "docid": "3de70faf86a7db69305705d43df9fada", "score": "0.6649199", "text": "public function findAll()\n {\n return $this->adapter\n ->query( 'SELECT * FROM ' . $this->table )\n ->fetchAll( self::FETCH_OBJ );\n }", "title": "" }, { "docid": "74e695929a113e607fb36867a9cb626f", "score": "0.6640228", "text": "function getJuegos(){\n $query = $this->db->prepare('SELECT * FROM juego ORDER BY nombre ASC');\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "1259374438288c365332592a2497b6d8", "score": "0.6632967", "text": "public function getPagos() {\n $sql = \"SELECT * FROM pagos\";\n $stmt = $this->db->query($sql);\n $results = [];\n while ($row = $stmt->fetch()) {\n $results[] = new PagosEntity($row);\n }\n return $results;\n }", "title": "" }, { "docid": "74c7935eddf7967b693e67a8de901183", "score": "0.6630264", "text": "public function getAll()\n {\n return $this->fetchAll();\n }", "title": "" }, { "docid": "fc8158c900eaeed66747d7bb91f505b4", "score": "0.66289175", "text": "public function fetch() : ? array {\n $sql = $this->prepareSql();\n\n try {\n $db = new DbConnection();\n $db = $db->connect();\n $statement = $db->prepare($sql);\n $statement->execute();\n $rows = $statement->fetchAll();\n\n $data = [];\n if ($rows) {\n foreach($rows as $row) {\n $data[] = new class($row) {\n public function __construct(array $row) {\n foreach ($row as $key => $value) {\n $this->$key = $value;\n }\n }\n };\n }\n }\n $db = null;\n return $data;\n } catch (PDOException $e) {\n $e->getMessage();\n }\n return null;\n }", "title": "" }, { "docid": "a4a13e81ceb39da5a75dab25f30fef56", "score": "0.66166407", "text": "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n\n // 2. Prepare the query\n $sql = 'SELECT * FROM turbineDeployed';\n $statement = $db->prepare($sql);\n\n // 3. Run the query\n $success = $statement->execute();\n\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theTurbineDeployed = new TurbineDeployed($row);\n array_push($arr, $theTurbineDeployed);\n }\n\n return $arr;\n }", "title": "" }, { "docid": "6ba0b4cfe79870125fefe4e6c741e2a5", "score": "0.66136545", "text": "function getList() {\n return $this->db->get($this->table)->result_array();\n }", "title": "" }, { "docid": "cf0c9a582c4d536a8c4ce72abf70137f", "score": "0.66096973", "text": "public static function getAll()\n {\n $db = DB::conn();\n $rows = $db->rows('SELECT * FROM user ORDER BY created DESC');\n\n $users = array();\n foreach ($rows as $row) {\n $users[] = new self($row);\n }\n return $users;\n }", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.6604415", "text": "public function fetchAll();", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.6604415", "text": "public function fetchAll();", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.6604415", "text": "public function fetchAll();", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.6604415", "text": "public function fetchAll();", "title": "" }, { "docid": "550983268657b21526aa3e51d4a9d7a9", "score": "0.66027683", "text": "public function getAll()\n {\n $sql = 'SELECT * FROM '.$this->table;\n $items = [];\n $query = $this->connection->query($sql);\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n\n // return response\n if(!empty($result)){\n foreach($result as $key => $val){\n array_push($items, $val);\n }\n return $items;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "2edbeeb6d8e142f295e0516469bf4d01", "score": "0.65988326", "text": "public function fetchAll() {\r\n\t\t$cursos = array();\r\n\t\t$response = $this->query->select(array(\"*\"),array($this->tabla),\"true\");\r\n\t\tforeach($response as $r) {\r\n\t\t\t$curso = new Curso();\r\n\t\t\t$curso->setId($r[$this->campos[0]]);\r\n\t\t\t$curso->setNivel(htmlspecialchars($r[$this->campos[1]]));\r\n\t\t\t$curso->setNombre(htmlspecialchars($r[$this->campos[2]]));\r\n\t\t\tarray_push($cursos,$curso);\r\n\t\t}\r\n\t\treturn $cursos;\r\n\t}", "title": "" }, { "docid": "4a6c5a66163904dd31b48bf0b3e269d9", "score": "0.6598784", "text": "public function find_many() {\n $rows = $this->_run();\n return array_map(array($this, '_create_instance_from_row'), $rows);\n }", "title": "" }, { "docid": "35a0bceea6dec4016d9dd5f0124e2c1f", "score": "0.65902185", "text": "public function get_all() {\n return $this->db->get($this->_table)->result();\n }", "title": "" }, { "docid": "f4f08474db69d71c1b0092e37168d863", "score": "0.6587603", "text": "public function fetchArray(){\n \n return mysql_fetch_array($this->Resource);\n\n }", "title": "" }, { "docid": "4c736d40fcebe5460dd48c8b8b4b94a5", "score": "0.65855044", "text": "public function fetchAll() {\n $identifier = $this->getIdentifier();\n $select = $this->db->createQueryBuilder()->select('*')->from($identifier, 'r');\n return $this->getResult($select);\n }", "title": "" }, { "docid": "1fff26e0943fae0c38c23354d82a4bb9", "score": "0.6579106", "text": "public function resultSet() {\n\t\t$this->execute(); // calling the execute function. The one we created above\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "8779442a51a5b6ce79833dbb0b1acde8", "score": "0.6572977", "text": "function GetUsers() : array\n{\n \n $db = new Database;\n $db = $db->dbConnect();\n\n $sql = \"SELECT * FROM user\";\n $adminGetUsers = $db->query($sql);\n $adminGetUsers = $adminGetUsers->fetchAll();\n\n return $adminGetUsers;\n}", "title": "" }, { "docid": "64cb073bd612b6f00e961e47a0078486", "score": "0.65707654", "text": "public function fetchArray() {\n return $this->execute()->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "85a3ce3d2b4e95728fca1853d021e755", "score": "0.6567172", "text": "function getAll(): array {\n return $this->db->getModelArray(TvShow::class, 'select * from tvshow');\n }", "title": "" }, { "docid": "e00f99aa1139ed29ccb7f759dfb21e67", "score": "0.6558427", "text": "public function fetchAll()\n\t{\n\t\t$result = array();\n\t\t$allEntries = $this->dbConnector->fetch('entries', null, 'date');\n\t\tforeach ($allEntries as $entry)\n\t\t{\n\t\t\t$result[] = $this->mapArrayToEntity($entry);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "552faabcd0733ade71762b18c8bb3060", "score": "0.6556441", "text": "public function get_all()\n\t{\n\t\treturn $this->db->get($this->_table)->result();\n\t}", "title": "" }, { "docid": "0515ecef66e1801fcb677d9a6365983e", "score": "0.6554543", "text": "private function arrDatosObj($result){\n $array = array();\n $classObj = get_class($this);\n if ($result)\n { \n while ($myRows = mysqli_fetch_object($result)){ \n $array[$myRows->galeriaModeloId] = $myRows;\n }\n mysqli_free_result($result); // Free result set \n }\n return $array;\n }", "title": "" }, { "docid": "0746f38e4653ad355fc953e995032260", "score": "0.65516776", "text": "public function getAll()\n\t{\n\t\t$sql = new Sql($this->dbAdapter);\n\t\t$select = $sql->select();\n\t\t$select\n\t\t\t->columns(array('id', 'ruta','idRecords'))\n\t\t\t->from(array('c' => $this->table));\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\n\t\t//print_r($selectString); exit;\n\t\t$execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\n\t\t$result = $execute->toArray();\n\t\t//echo \"<pre>\"; print_r($result); exit;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d76c2405b7080395c17deac9645412d3", "score": "0.6551465", "text": "function SelectAll($object) {\n $count=0;\n $fields='';\n $con=$this->open();\n $query=\"SELECT * FROM `$object`\";\n $result=mysqli_query($con, $query);\n if ($result) {\n $count=mysqli_num_rows($result);\n\n if ($count >= 1) {\n //$object[]=array();\n while ($rows=$result->fetch_object()) {\n $objects[]=$rows;\n }\n $this->close($con);\n return $objects;\n }\n }\n }", "title": "" } ]
be0f325aeb553d92afb64cc3747f1f48
Get the table creation SQL queries.
[ { "docid": "2b598b398884c405427c3af1173fadcf", "score": "0.67700094", "text": "public function getCreates()\n {\n if ($this->tablesCreate === null) {\n return [];\n }\n\n $platform = $this->connection->getDatabasePlatform();\n $flags = AbstractPlatform::CREATE_INDEXES | AbstractPlatform::CREATE_FOREIGNKEYS;\n $queries = [];\n\n foreach ($this->tablesCreate as $tableName => $table) {\n $queries[$tableName] = $platform->getCreateTableSQL($table, $flags);\n }\n\n return $queries;\n }", "title": "" } ]
[ { "docid": "8fe898873c6504a9d203eec1342496b8", "score": "0.7870033", "text": "static public function getTablesCreateSql()\n\t{\n\t\treturn Piwik_Db_Schema::getInstance()->getTablesCreateSql();\n\t}", "title": "" }, { "docid": "7648d8c632033c3d7886df8e0842ce3d", "score": "0.76732534", "text": "public function getCreateTableSql() {\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `$this->name` (\\n\";\n\t\t$s=Array();\n\t\tforeach ($this->columns as $key => $column) {\n\t\t\t$s[] = $column->getSql();\n\t\t}\n\t\tif($this->primaryKey) {\n\t\t\t$s[] = \"PRIMARY KEY (`\".$this->primaryKey.\"`)\";\n\t\t}\n\t\tforeach ($this->keys as $key) {\n\t\t\t$s[] = $key->getSql();\n\t\t}\n\t\treturn $sql.implode(\",\\n\", $s).\"\\n)\";\n\t}", "title": "" }, { "docid": "bc2c90a132794ee2dbb32cefc044b174", "score": "0.7566107", "text": "public function getQueries()\n {\n $sql = array();\n\n foreach ($this->createNamespaceQueries as $schemaSql) {\n $sql = array_merge($sql, (array) $schemaSql);\n }\n\n foreach ($this->createTableQueries as $schemaSql) {\n $sql = array_merge($sql, (array) $schemaSql);\n }\n\n foreach ($this->createSequenceQueries as $schemaSql) {\n $sql = array_merge($sql, (array) $schemaSql);\n }\n\n foreach ($this->createFkConstraintQueries as $schemaSql) {\n $sql = array_merge($sql, (array) $schemaSql);\n }\n\n return $sql;\n }", "title": "" }, { "docid": "9346aa8ec4b49aa680d16a86523016d2", "score": "0.75576735", "text": "public static function getTableCreateQuery()\n {\n return \"CREATE TABLE `\".self::$sTableName.\"` (\n `OXID` INT(32) NOT NULL AUTO_INCREMENT COLLATE 'latin1_general_ci',\n `TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `ORDERID` VARCHAR(32) NOT NULL,\n `STOREID` VARCHAR(32) NOT NULL,\n `REQUESTTYPE` VARCHAR(32) NOT NULL DEFAULT '',\n `RESPONSESTATUS` VARCHAR(32) NOT NULL DEFAULT '',\n `REQUEST` TEXT NOT NULL,\n `RESPONSE` TEXT NOT NULL,\n PRIMARY KEY (OXID)\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT COLLATE='utf8_general_ci';\";\n }", "title": "" }, { "docid": "e2ba39e5459d8c750cd90024ed1104c1", "score": "0.733805", "text": "protected function createSql(): array\n {\n $sql = \"CREATE TABLE `{$this->createTable}` (\";\n $sql .= implode(', ', $this->createFields);\n $sql .= ')';\n\n if (array_key_exists('mysql_engine', $this->createTableParams)) {\n $sql .= \" ENGINE={$this->createTableParams['mysql_engine']}\";\n }\n\n if (array_key_exists('charset', $this->createTableParams)) {\n $sql .= \" DEFAULT CHARSET={$this->createTableParams['charset']}\";\n }\n\n return [\n 'sql' => $sql,\n 'types' => [],\n 'params' => []\n ];\n }", "title": "" }, { "docid": "29590b5a9da4c138aa6c27996a897dfc", "score": "0.7280211", "text": "public function getDatabaseCreationQueries(): array\n {\n $db = $this->getDb();\n $tables = $this->getDatabaseStructure();\n $queries = [\n 'table' => [],\n 'keys' => [],\n 'constraints' => [],\n ];\n // Creating queries for tables, keys and constraint creation\n foreach (array_keys($queries) as $type) {\n $fn = 'getCreate'.ucwords($type);\n foreach ($tables as $table => $structure) {\n if ($tmp = $db->{$fn}($table, $structure)) {\n $queries[$type][$table] = $tmp;\n }\n }\n }\n\n return $queries;\n }", "title": "" }, { "docid": "00425d11615fe14f8c9838d6934c2065", "score": "0.7133667", "text": "public function getCreateStatement()\n\t{\n\t\t$create = \"\";\n\n\t\tif($this->show_drop) {\n\t\t\t$create .= \"DROP TABLE IF EXISTS `$this->name`;\\n\";\n\t\t}\n\n\t\t$create .= \"CREATE TABLE `$this->name` (\\n\";\n\n\t\t//columns\n\t\t$cols = array();\n\t\tforeach($this->columns as $column_name => $column) {\n\t\t\t$cols[] = \" \" . $column->getColumnDefinition();\n\t\t}\n\t\t$create .= implode(\",\\n\", $cols);\n\t\t$keys = array();\n\n\t\t//pri key\n\t\tif(count($this->primary_key) > 0) {\n\t\t\t$keys[] = \" PRIMARY KEY (\" . implode(\", \", $this->primary_key) . \")\";\n\t\t}\n\n\t\t//keys\n\t\tforeach($this->keys as $key_name => $columns) {\n\t\t\t$keys[] = \" KEY $key_name (\" . implode(\", \", $columns) . \")\";\n\t\t}\n\n\t\t//unique keys\n\t\tforeach($this->unique_keys as $key_name => $columns) {\n\t\t\t$keys[] = \" UNIQUE KEY $key_name (\" . implode(\", \", $columns) . \")\";\n\t\t}\n\n\t\t//foreign keys\n\t\tforeach($this->constraints as $constraint_name => $constraint) {\n\t\t\tif($constraint instanceof ForeignKey) {\n\t\t\t\t$keys[] = \" CONSTRAINT $constraint_name FOREIGN KEY \" . $constraint->getKeyDefinition();\n\t\t\t}\n\t\t}\n\t\tif(count($keys) > 0) {\n\t\t\t$create .= \",\\n\" . implode(\",\\n\", $keys);\n\t\t}\n\n\t\t$create .= \"\\n) ENGINE=$this->engine DEFAULT CHARSET=$this->default_charset;\\n\";\n\n\t\treturn $create;\n\t}", "title": "" }, { "docid": "08cb25f951f517d2b9fec73409b944c9", "score": "0.70297986", "text": "static public function getTableCreateSql( $tableName )\n\t{\n\t\treturn Piwik_Db_Schema::getInstance()->getTableCreateSql($tableName);\n\t}", "title": "" }, { "docid": "cea28e7526492340e0e36b96f3204274", "score": "0.70016557", "text": "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n id int(11) NOT NULL AUTO_INCREMENT, \n teamingid int(11) NOT NULL, \n name varchar(200) NOT NULL, \n PRIMARY KEY (id), \n INDEX (teamingid));\n\nSQL;\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "a850832f7fb6bb7936a855419722c753", "score": "0.691852", "text": "public function getCreateSQL() {\n\t\t$attrs = join(' ', $this->_attrs);\n\t\treturn \"`{$this->_name}` {$this->_type} {$attrs}\";\n\t}", "title": "" }, { "docid": "f95678baa69d697e03827b1b1ccc5f8f", "score": "0.69038224", "text": "public function createSQL() {\n\n $query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n teamid int(11) NOT NULL,\n raterid int(11) NOT NULL, \n rateeid int(11) NOT NULL, \n metadata mediumtext NOT NULL, \n PRIMARY KEY (raterid, \n rateeid, \n teamid));\nSQL;\n\n return $query;\n }", "title": "" }, { "docid": "58441c8f1be0eef0284d584df5ba3e4a", "score": "0.6822071", "text": "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n id int(11) NOT NULL AUTO_INCREMENT, \n `tag` varchar(30) NOT NULL, \n name varchar(200) NOT NULL, \n semester char(4) NOT NULL, \n section char(4) NOT NULL, \n `public` int(1) NOT NULL, \n metadata mediumtext, \n PRIMARY KEY (id), \n INDEX (`tag`));\n\nSQL;\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "be6350863e36b80dae3838dae8e92460", "score": "0.67986673", "text": "public function createQuery()\n\t{\n\t\t$columns = [];\n\t\t$fields = $this->getFields();\n\t\tforeach ($fields as $field => $dc) {\n//\t\t\tdebug($field);\n\t\t\t$f = new TableField();\n\t\t\t$f->field = $field;\n\t\t\t$f->comment = $dc->getDescription();\n\t\t\t$f->type = $f->fromPHP($dc->get('var')) ?: 'varchar';\n\t\t\tif (class_exists($f->type)) {\n\t\t\t\t$re = new ReflectionClass($f->type);\n\t\t\t\t$id = $re->getProperty('id');\n\t\t\t\t$dc2 = new DocCommentParser($id->getDocComment());\n\n\t\t\t\t$type = new $f->type;\n\n\t\t\t\t$f->type = $dc2->get('var')\n\t\t\t\t\t? first(trimExplode(' ', $dc2->get('var')))\n\t\t\t\t\t: 'varchar';\n\t\t\t\t$f->references = $type->table . '(' . $type->idField . ')';\n\t\t\t}\n\t\t\t$columns[] = $f;\n\t\t}\n\t\t$at = new AlterTable();\n\t\t$handler = $at->handler;\n\t\treturn $handler->getCreateQuery($this->table, $columns);\n\t}", "title": "" }, { "docid": "eb5e7f88a5f91bd4bf0704e6081e24f7", "score": "0.67374116", "text": "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n id int(11) NOT NULL AUTO_INCREMENT, \n `tag` varchar(32) NOT NULL, \n name varchar(100) NOT NULL, \n teamingid int(11), \n semester char(4) NOT NULL, \n section char(4) NOT NULL, \n assigntag varchar(30), \n PRIMARY KEY (id), \n INDEX (`tag`));\n\nSQL;\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "0ee52b75dc484a2776cd7179ecc9b957", "score": "0.6665647", "text": "public function get_sql()\n {\n }", "title": "" }, { "docid": "0ee52b75dc484a2776cd7179ecc9b957", "score": "0.6665096", "text": "public function get_sql()\n {\n }", "title": "" }, { "docid": "059a7fff4298e5c82c4e7a8fa9ef51e2", "score": "0.6664226", "text": "protected function getSql()\n {\n return [];\n }", "title": "" }, { "docid": "a1664dc66b9c17c9e76a0c193bef91f3", "score": "0.66090935", "text": "public function getSql($generator)\n {\n // get sql from each column\n // get sql table closing statement\n // get sql from each index\n // MySQL is only one of three that supports creating index during create table,\n // other two use CREATE INDEX statement\n }", "title": "" }, { "docid": "ec813611b912907b256cc8e90645303e", "score": "0.65716785", "text": "public function get_sql() {}", "title": "" }, { "docid": "5e2602f9835839e9da7e8fe21faf9cd3", "score": "0.657058", "text": "private static function get_columns_sql()\n {\n $columns = '';\n\n foreach (self::get_columns() as $name => $type) :\n $columns .= $name . ' ' . $type . ', ';\n endforeach;\n\n // Append created_at column.\n $columns .= 'created_at DATETIME DEFAULT CURRENT_TIMESTAMP, ';\n $columns .= 'updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP, ';\n\n // Append primary key definition.\n $columns .= 'PRIMARY KEY (' . self::get_primary_key() . ')';\n\n return $columns;\n }", "title": "" }, { "docid": "80fe0f670317a390e48d1c0b1bf4cacb", "score": "0.6533381", "text": "public function getSql(): string\n {\n $this->build();\n\n return $this->sql;\n }", "title": "" }, { "docid": "f164c6fe8e4f0e32e3503e19a4414846", "score": "0.65020895", "text": "private function createTable()\n {//{{{\n if ($this->createSql) {\n foreach (explode(';', $this->createSql) as $sql) {\n $sth = self::$pdo->prepare($sql);\n $sth->execute();\n }\n }\n }", "title": "" }, { "docid": "4e38875fa099cee1df8b554464d1e50f", "score": "0.6492134", "text": "function getCreateCommand($table_prefix = null) {\n $column_definitions = array();\n foreach($this->columns as $column) {\n $column_definitions[] = ' ' . $column->prepareDefinition();\n } // if\n \n $index_definitions = array();\n foreach($this->indices as $index) {\n $index_definitions[] = ' ' . $index->prepareDefinition();\n } // if\n \n $options = array();\n \n foreach($this->getOptions() as $k => $v) {\n $options[] = \"$k=$v\";\n } // foreach\n \n $table_name = DB::escapeTableName(\"{$table_prefix}{$this->name}\");\n \n $command = \"CREATE TABLE $table_name (\\n\";\n $command .= implode(\",\\n\", $column_definitions);\n if(is_foreachable($index_definitions)) {\n $command .= \",\\n\" . implode(\",\\n\", $index_definitions);\n } // if\n $command .= \"\\n) \" . implode(' ', $options) . ';';\n \n return $command;\n }", "title": "" }, { "docid": "08d3a3f4a5b6503ac289769787479597", "score": "0.6485326", "text": "protected function makeTableSQL() {\n if($this->table && $this->schema) {\n $this->sql .= ' ' . $this->schema . '.' . $this->table;\n } else if($this->table) {\n $this->sql .= ' ' . $this->table;\n } else if($this->model) {\n $this->setTable($this->model->table());\n $this->setSchema($this->model->schema());\n $this->makeTableSQL();\n } else {\n Logger::error('no given table name!');\n }\n }", "title": "" }, { "docid": "1a31b913e30bf690bd271c657956bd09", "score": "0.64830506", "text": "public abstract function schema_sql();", "title": "" }, { "docid": "e194a5fe1340b2427149d6f7f10ecdf2", "score": "0.64505625", "text": "public function getSql()\n\t{\n\t\treturn\n\t\t\t'SELECT '\n\t\t\t. $this->getColumnExpressions()\n\t\t\t. $this->getFromClause()\n\t\t\t. $this->getJoinExpressions()\n\t\t\t. $this->getWhereExpression()\n\t\t\t. $this->getGroupByClause()\n\t\t\t. $this->getHavingExpression()\n\t\t\t. $this->getOrderExpressions()\n\t\t\t. $this->getLimitExpression()\n\t\t;\n\t}", "title": "" }, { "docid": "3da276db035a5e046e1ad414ec28a3ee", "score": "0.6436568", "text": "private function getNotificationTablesSql()\n {\n $schemaConfig = new SchemaConfig();\n $schemaConfig->setDefaultTableOptions(array('engine'=>'MyISAM'));\n\n $schema = new Schema(array(), array(), $schemaConfig);\n\n if (!$this->dbcheck->tableExists('tl_nc_gateway')) {\n $table = $schema->createTable('tl_nc_gateway');\n $table->addColumn('id', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'autoincrement'=>true));\n $table->addColumn('tstamp', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('type', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>32));\n $table->addColumn('title', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->setPrimaryKey(array('id'));\n }\n\n if (!$this->dbcheck->tableExists('tl_nc_notification')) {\n $table = $schema->createTable('tl_nc_notification');\n $table->addColumn('id', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'autoincrement'=>true));\n $table->addColumn('tstamp', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('type', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>32));\n $table->addColumn('title', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->setPrimaryKey(array('id'));\n }\n\n if (!$this->dbcheck->tableExists('tl_nc_message')) {\n $table = $schema->createTable('tl_nc_message');\n $table->addColumn('id', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'autoincrement'=>true));\n $table->addColumn('pid', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('tstamp', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('title', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('gateway', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('gateway_type', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>32));\n $table->addColumn('email_priority', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('email_template', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('published', Type::STRING, array('fixed'=>true, 'notnull'=>true, 'default'=>'', 'length'=>1));\n $table->setPrimaryKey(array('id'));\n }\n\n if (!$this->dbcheck->tableExists('tl_nc_language')) {\n $table = $schema->createTable('tl_nc_language');\n $table->addColumn('id', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'autoincrement'=>true));\n $table->addColumn('pid', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('tstamp', Type::INTEGER, array('unsigned'=>true, 'notnull'=>true, 'default'=>0));\n $table->addColumn('gateway_type', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>32));\n $table->addColumn('language', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>5));\n $table->addColumn('fallback', Type::STRING, array('fixed'=>true, 'notnull'=>true, 'default'=>'', 'length'=>1));\n $table->addColumn('recipients', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('email_sender_name', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('email_sender_address', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('email_recipient_cc', Type::TEXT, array('length'=>65535));\n $table->addColumn('email_recipient_bcc', Type::TEXT, array('length'=>65535));\n $table->addColumn('email_subject', Type::STRING, array('notnull'=>true, 'default'=>''));\n $table->addColumn('email_text', Type::TEXT, array('length'=>65535));\n $table->addColumn('email_html', Type::TEXT, array('length'=>65535));\n $table->addColumn('email_mode', Type::STRING, array('notnull'=>true, 'default'=>'', 'length'=>16));\n $table->setPrimaryKey(array('id'));\n }\n\n return $schema->toSql($this->db->getDatabasePlatform());\n }", "title": "" }, { "docid": "9041a7bdb3112935e275ca0284ba3ded", "score": "0.642958", "text": "abstract public function getSQL();", "title": "" }, { "docid": "b86db053a84c67369dccac0e4b89e8ad", "score": "0.64135844", "text": "public function generate_schema() {\n\t\t$schema = \"CREATE TABLE `\".$this->name.\"` (\\n\";\n\t\t\n\t\tfor($i = 0; $i < count($this->details); $i++) {\n\t\t\t\n\t\t\tif(!isset($this->details[$i]['options'])) {\n\t\t\t\t$this->details[$i]['options'] = array();\n\t\t\t}\n\t\t\t\n\t\t\t$schema .= \"`\".$this->details[$i]['name'].\"` \";\n\t\t\t$schema .= $this->type($this->details[$i]);\n\t\t\t$schema .= $this->options($this->details[$i]['options']);\n\t\t\t$schema .= \",\\n\";\n\t\t}\n\t\t\n\t\t$schema .= $this->table_keys();\n\t\t$schema .= ')';\n\t\t$schema .= $this->engine();\n\t\t\n\t\treturn $schema;\n\t}", "title": "" }, { "docid": "494c58497f8eab157aa009d14425372f", "score": "0.6407157", "text": "public function getSql()\n {\n $sql = [];\n foreach ($this->queries as $query) {\n if (count($query->bindings) > 0) {\n $query->sql = preg_replace(\n array_fill(0, count($query->bindings), '/\\?/'),\n array_map(function ($item) {\n return is_numeric($item) ? $item : \"'\" . $item . \"'\";\n }, $query->bindings),\n $query->sql, 1);\n }\n $sql[] = $query;\n }\n return $sql;\n }", "title": "" }, { "docid": "9ebc73af4732c512b4922c4dc92bb00a", "score": "0.64052314", "text": "public function Query()\n {\n return \"`\" . $this->table . \"`\";\n }", "title": "" }, { "docid": "2c078ec23f4a109e9e954852f9946454", "score": "0.6366998", "text": "function SQL()\n\t{\n\t\tif ( !isset( $this -> sql ) )\n\t\t{\n\t\t\t$database = new Database();\n\t\t\t$this -> sql = new QueryBuilder( $database, $this -> table );\n\t\t}\n\t\treturn $this -> sql;\n\t}", "title": "" }, { "docid": "d705962f6d4c5cef8e7a1026a256a4c1", "score": "0.63600886", "text": "public function getSQLStatement();", "title": "" }, { "docid": "4ec674757fc59c3abe179159cfe82c16", "score": "0.6360041", "text": "function generate_sql()\n\t{\n\t\tlog_debug(\"sql_query\", \"Executing generate_sql()\");\n\n\t\t$this->string = \"SELECT \";\n\n\n\t\t// add all select fields\n\t\t$num_values = count($this->sql_structure[\"fields\"]);\n\n\t\tfor ($i=0; $i < $num_values; $i++)\n\t\t{\n\t\t\t$fieldname = $this->sql_structure[\"fields\"][$i];\n\n\t\t\tif (isset($this->sql_structure[\"field_dbnames\"][$fieldname]))\n\t\t\t{\n\t\t\t\t$this->string .= $this->sql_structure[\"field_dbnames\"][$fieldname] .\" as \";\n\t\t\t}\n\t\t\t\n\t\t\t$this->string .= $fieldname;\n\t\t\t\n\n\t\t\tif ($i < ($num_values - 1))\n\t\t\t{\n\t\t\t\t$this->string .= \", \";\n\t\t\t}\n\t\t}\n\n\t\t$this->string .= \" \";\n\n\n\t\t// add database query\n\t\t$this->string .= \"FROM `\". $this->sql_structure[\"tablename\"] .\"` \";\n\n\t\t// add all joins\n\t\tif (isset($this->sql_structure[\"joins\"]))\n\t\t{\n\t\t\tforeach ($this->sql_structure[\"joins\"] as $sql_join)\n\t\t\t{\n\t\t\t\t$this->string .= $sql_join .\" \";\n\t\t\t}\n\t\t}\n\n\n\t\t// add WHERE queries\n\t\tif (isset($this->sql_structure[\"where\"]))\n\t\t{\n\t\t\t$this->string .= \"WHERE \";\n\t\t\n\t\t\t$num_values = count($this->sql_structure[\"where\"]);\n\t\n\t\t\tfor ($i=0; $i < $num_values; $i++)\n\t\t\t{\n\t\t\t\t$this->string .= $this->sql_structure[\"where\"][$i] . \" \";\n\n\t\t\t\tif ($i < ($num_values - 1))\n\t\t\t\t{\n\t\t\t\t\t$this->string .= \"AND \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add groupby rules\n\t\tif (isset($this->sql_structure[\"groupby\"]))\n\t\t{\n\t\t\t$this->string .= \"GROUP BY \";\n\t\t\t\n\t\t\t$num_values = count($this->sql_structure[\"groupby\"]);\n\t\n\t\t\tfor ($i=0; $i < $num_values; $i++)\n\t\t\t{\n\t\t\t\t$this->string .= $this->sql_structure[\"groupby\"][$i] . \" \";\n\n\t\t\t\tif ($i < ($num_values - 1))\n\t\t\t\t{\n\t\t\t\t\t$this->string .= \", \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// add orderby rules\n\t\tif (isset($this->sql_structure[\"orderby\"]))\n\t\t{\n\t\t\t$this->string .= \"ORDER BY \";\n\t\t\n\t\t\n\t\t\t// run through all the order by fields\n\t\t\t$num_values = count($this->sql_structure[\"orderby\"]);\n\n\t\t\tfor ($i=0; $i < $num_values; $i++)\n\t\t\t{\n\t\t\t\t// fieldname\n\t\t\t\t$this->string .= $this->sql_structure[\"orderby\"][$i][\"fieldname\"];\n\t\t\t\n\t\t\t\t// sort method\n\t\t\t\tif ($this->sql_structure[\"orderby\"][$i][\"type\"] == \"asc\")\n\t\t\t\t{\n\t\t\t\t\t$this->string .= \" ASC \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->string .= \" DESC \";\n\t\t\t\t}\n\n\t\t\t\t// add joiner\n\t\t\t\tif ($i < ($num_values - 1))\n\t\t\t\t{\n\t\t\t\t\t$this->string .= \", \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\n\t\t// add limit (if any)\n\t\tif (isset($this->sql_structure[\"limit\"]))\n\t\t{\n\t\t\t$this->string .= \" LIMIT \". $this->sql_structure[\"limit\"];\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "565d3fb457b18c5766de7124914ee794", "score": "0.6335954", "text": "public function GetSQL()\r\n {\r\n $fieldList = $this->GetFieldListClase();\r\n\r\n $afterSelectSql = $this->GetCommandImp()->GetAfterSelectSQL($this);\r\n if ($afterSelectSql != '')\r\n $afterSelectSql = ' ' . $afterSelectSql;\r\n\r\n $result = \"SELECT$afterSelectSql $fieldList FROM \" . $this->GetCommandImp()->QuoteTableIndetifier($this->sourceTable) .\r\n ((isset($this->sourceTableAlias) && $this->sourceTableAlias != '') ? ' ' . $this->sourceTableAlias : '');\r\n \r\n StringUtils::AddStr($result, $this->GetJoinsClause(), ' ');\r\n StringUtils::AddStr($result, $this->GetFieldFilterCondition(), ' WHERE ');\r\n StringUtils::AddStr($result, $this->GetOrderByClause(), ' ');\r\n StringUtils::AddStr($result, $this->GetLimitClause(), ' ');\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "daa3d97d938e4a9e32d6f3b3c98a2a5d", "score": "0.6334266", "text": "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPessoa()->getModel()->getTableName().\" empresa ON ( ca_contrato.id_empresa = empresa.id ) \n JOIN \".$this->_getPessoa()->getModel()->getTableName().\" cliente ON ( ca_contrato.id_cliente = cliente.id ) \"; \n return $sql;\n }", "title": "" }, { "docid": "52b484e17697c0ba6d3f216ccf7fda7a", "score": "0.63328475", "text": "public function getQuery() {\n\t\t$sql = trim(\t\n\t\t\t$this->getQueryMethod('insertInto') . \n\t\t\t$this->getQueryMethod('columns') .\n\t\t\t$this->getQueryMethod('values')\n\t\t) . ' ';\n\n\t\tif($this->get('comment') && $this->wire('config')->debug) {\n\t\t\t// NOTE: PDO thinks ? and :str param identifiers in /* comments */ are real params\n\t\t\t// so we str_replace them out of the comment, and only support comments in debug mode\n\t\t\t$comment = str_replace(array('*/', '?', ':'), '', $this->comment); \n\t\t\t$sql .= \"/* $comment */\";\n\t\t}\n\t\treturn $sql; \n\t}", "title": "" }, { "docid": "614892af57290025a554b12137e8825e", "score": "0.6309752", "text": "public function createQuery() {\n\n // Determine Query Type and create SQL Query\n switch($this->queryType) {\n case \"select\":\n // Create select query\n $this->createSelectQuery();\n break;\n case \"insert\":\n // Create insert query\n $this->createInsertQuery();\n break;\n case \"update\":\n // Create update query\n $this->createUpdateQuery();\n break;\n case \"delete\":\n // Create delete query\n $this->createDeleteQuery();\n break;\n case \"truncate\":\n // Create truncate query\n $this->createTruncateQuery();\n break;\n default:\n // Create Error > Undefined query type\n break;\n }\n\n }", "title": "" }, { "docid": "5b9edb599f85af4bc3b2b9ee21c900c5", "score": "0.6289245", "text": "public function getTablesQuery();", "title": "" }, { "docid": "950aacd5205eb102aea79f5dd4d7369c", "score": "0.6279199", "text": "public function getStatmentSql()\n {\n $sql = 'SELECT '; \n \n\n if (isset($this->params['select']) && $this->params['select'] && is_array($this->params['select'])) {\n $sql .= $this->getSelectSql($this->params['select']);\n } else {\n $sql .= '*';\n }\n \n $sql .= ' FROM ' . $this->tableName;\n \n\n if (isset($this->params['left join']) && $this->params['left join']) {\n $sql .= $this->getLeftJoinSql($this->params['left join']);\n }\n\n if (isset($this->params['where']) && $this->params['where']) {\n $sql .= $this->getWhereConnditionSql($this->params['where']);\n }\n\n if (isset($this->params['group']) && $this->params['group']) {\n $sql .= $this->getGroupBy($this->params['group']);\n }\n\n if (isset($this->params['order']) && $this->params['order']) {\n $sql .= $this->getOrderSql($this->params['order']);\n }\n\n if (isset($this->params['limit']) && $this->params['limit']){\n $sql .= $this->getLimitSql();\n }\n\n if (isset($this->params['offset']) && $this->params['offset']){\n $sql .= $this->getLimitSql();\n }\n\n return $sql;\n }", "title": "" }, { "docid": "d5a0a97defe9f10db446b981b3c4ab09", "score": "0.62785643", "text": "protected function getDeclaringSql($tableName)\n {\n $rows = $this->fetchAll(\"SELECT * FROM sqlite_master WHERE `type` = 'table'\");\n\n $sql = '';\n foreach ($rows as $table) {\n if ($table['tbl_name'] === $tableName) {\n $sql = $table['sql'];\n }\n }\n\n $columnsInfo = $this->getTableInfo($tableName);\n\n foreach ($columnsInfo as $column) {\n $columnName = $column['name'];\n $columnNamePattern = \"\\\"$columnName\\\"|`$columnName`|\\\\[$columnName\\\\]|$columnName\";\n $columnNamePattern = \"#([\\(,]+\\\\s*)($columnNamePattern)(\\\\s)#iU\";\n\n $sql = preg_replace($columnNamePattern, \"$1`$columnName`$3\", $sql);\n }\n\n $tableNamePattern = \"\\\"$tableName\\\"|`$tableName`|\\\\[$tableName\\\\]|$tableName\";\n $tableNamePattern = \"#^(CREATE TABLE)\\s*($tableNamePattern)\\s*(\\()#Ui\";\n\n $sql = preg_replace($tableNamePattern, \"$1 `$tableName` $3\", $sql, 1);\n\n return $sql;\n }", "title": "" }, { "docid": "ccf2f5bed92436b154655c6bf421ffd7", "score": "0.62758946", "text": "public function getSql() : string;", "title": "" }, { "docid": "49a71bfa14dafc24310ea88407ba60cf", "score": "0.62621284", "text": "public function getSQL()\n {\n }", "title": "" }, { "docid": "f7e14bb39c7f5b2d0bab2ed16bbcdab7", "score": "0.626133", "text": "public function getSQLCreate()\n {\n return \"CONSTRAINT `{$this->getName()}` PRIMARY KEY (\" . $this->getColumnsListToSQL() . ')';\n }", "title": "" }, { "docid": "881a9cd3c8f58b000be025dba1d584a8", "score": "0.62556094", "text": "private function getColumns($tableName)\n\t{\n\t\t$sql = 'SHOW CREATE TABLE '.$tableName;\n\t\t$cmd = Yii::app()->db->createCommand($sql);\n\t\t$table = $cmd->queryRow();\n\n\t\t$create_query = $table['Create Table'] . '~';\n\n\t\t$create_query = preg_replace('/^CREATE TABLE/', 'CREATE TABLE IF NOT EXISTS', $create_query);\n\t\t//$create_query = preg_replace('/AUTO_INCREMENT\\s*=\\s*([0-9])+/', '', $create_query);\n\t\tif ( $this->fp)\n\t\t{\n\t\t\t$this->writeComment('TABLE `'. addslashes ($tableName) .'`');\n\t\t\t$final = 'DROP TABLE IF EXISTS `' .addslashes($tableName) . '`~'.PHP_EOL. $create_query .PHP_EOL.PHP_EOL;\n\t\t\tfwrite ( $this->fp, $final );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->tables[$tableName]['create'] = $create_query;\n\t\t\treturn $create_query;\n\t\t}\n\t}", "title": "" }, { "docid": "a3308c506538528899af259a752a6b7f", "score": "0.62536615", "text": "public function sql(): array\n {\n if ($this->createTable !== null) {\n return $this->createSql();\n }\n\n $types = [];\n $params = [];\n $sql = '';\n\n if (is_array($this->select)) {\n $sql .= 'SELECT ';\n if (count($this->select) > 0) {\n $sql .= '`' . implode('`,`', $this->select) . '`';\n } else {\n $sql .= '*';\n }\n\n $sql .= ' FROM `' . $this->table . '`';\n } elseif (is_array($this->insert)) {\n $sql .= 'INSERT INTO `' . $this->table . '`';\n $sql .= ' (`' . implode('`,`', array_keys($this->insert)) . '`)';\n $sql .= ' VALUES (';\n\n $values = '';\n\n foreach ($this->insert as $field => $value) {\n $values .= $values === '' ? '?' : ',?';\n\n $types[] = 's';\n $params[] = $value;\n }\n\n $sql .= $values . ')';\n } elseif ($this->update) {\n $sql .= 'UPDATE `' . $this->table . '` SET ';\n\n $set = '';\n foreach ($this->set as $field => $value) {\n $set .= $set === '' ? '`' . $field . '`=?' : ',`' . $field . '`=?';\n\n $types[] = 's';\n $params[] = $value;\n }\n\n $sql .= $set;\n }\n\n if ((is_array($this->select) || $this->update) && (is_array($this->where) && count($this->where) > 0)) {\n $where = '';\n foreach ($this->where as $field => $value) {\n $where .= $where === '' ? ' WHERE ' : ' AND ';\n $where .= '`' . $field . '`=?';\n\n $types[] = 's';\n $params[] = $value;\n }\n\n $sql .= $where;\n }\n\n if (is_array($this->select) && $this->limit !== null) {\n $sql .= \" LIMIT {$this->limit}\";\n }\n\n return [\n 'sql' => $sql,\n 'types' => $types,\n 'params' => $params\n ];\n }", "title": "" }, { "docid": "396fdf5ee3060d623437aeec292c00dc", "score": "0.62528926", "text": "public function createTable() \n {\n if(strlen((string) $this->table_in) == 0) throw new BuildQueryException('É preciso informar o nome da tabela', 8457);\n if(count((array) $this->campos_ddl) == 0) throw new BuildQueryException('É preciso informar os campos que serão adicionados', 8458);\n\n $marcador = $this->getMarcador();\n \n $string = \"CREATE TABLE $marcador\". $this->table_in .\"$marcador (\".PHP_EOL;\n \n if(count((array) $this->foreign_key) > 0) {\n $this->campos_ddl[] = implode(', ', $this->foreign_key);\n }\n\n $string .= implode(', '.PHP_EOL, $this->campos_ddl);\n\n $string .= ')';\n\n if($this->driver == 'mysql') {\n if(strlen((string) $this->engineMysql) > 0) $string .= PHP_EOL.$this->engineMysql;\n if(strlen((string) $this->characterMysql) > 0) $string .= PHP_EOL.$this->characterMysql;\n if(strlen((string) $this->collateMysql) > 0) $string .= PHP_EOL.$this->collateMysql;\n }\n\n $string .= ';';\n\n $this->iniciarTransacao();\n\n $retornar = $this->execSql($string);\n\n $this->commit();\n\n return $retornar;\n }", "title": "" }, { "docid": "16b4d9e1a5989f28a7a7aef599e1fb1c", "score": "0.62486327", "text": "abstract function getSQL();", "title": "" }, { "docid": "8af5f481aa612b252a9b3a0fdf7f56c1", "score": "0.6248421", "text": "public function compileGetAllTables()\n {\n return 'SHOW TABLES';\n }", "title": "" }, { "docid": "2ee75535b3229a3db4e6a11f0254fafb", "score": "0.62245375", "text": "function get_generated_query()\n {\n // Add extras column\n if ($this->object->is_select_statement() && stripos($this->object->_select_clause, 'count(') === FALSE) {\n $table_name = $this->object->get_table_name();\n $primary_key = \"{$table_name}.{$this->object->get_primary_key_column()}\";\n if (stripos($this->object->_select_clause, 'DISTINCT') === FALSE) {\n $this->object->_select_clause = str_replace('SELECT', 'SELECT DISTINCT', $this->object->_select_clause);\n }\n $this->object->group_by($primary_key);\n $sql = $this->call_parent('get_generated_query');\n // Sections may be omitted by wrapping them in mysql/C style comments\n if (stripos($sql, '/*NGG_NO_EXTRAS_TABLE*/') !== FALSE) {\n $parts = explode('/*NGG_NO_EXTRAS_TABLE*/', $sql);\n foreach ($parts as $ndx => $row) {\n if ($ndx % 2 != 0) {\n continue;\n }\n $parts[$ndx] = $this->_regex_replace($row);\n }\n $sql = implode('', $parts);\n } else {\n $sql = $this->_regex_replace($sql);\n }\n } else {\n $sql = $this->call_parent('get_generated_query');\n }\n return $sql;\n }", "title": "" }, { "docid": "390f6416df47b655987c94367cf40daa", "score": "0.6215796", "text": "public function sql()\n {\n $this->builder = $this->modelFQCN::query();\n\n $this->filterPass();\n $this->sortPass();\n\n return $this->builder->toSql();\n }", "title": "" }, { "docid": "482596f3702bab0b8649d093c2806480", "score": "0.6180699", "text": "public function getSelectQuery(){\n\t\treturn \"SELECT \" . Logs::getColumns() . \"\\r\\n\" . \"FROM \" . Logs::getTable() . \"\\r\\n\" . \"WHERE \" . Logs::getConditions();\n\t}", "title": "" }, { "docid": "4947955b250c34de88f21d36a73cc37e", "score": "0.61683595", "text": "private function getColumnCreationStatements($isCreateTable = true)\n {\n $sqlStatement = \"\";\n list(\n $fieldCount,\n $fieldPrimary,\n $fieldIndex,\n $fieldUnique,\n $fieldFullText,\n $fieldSpatial\n ) = $this->getIndexedColumns();\n $definitions = $this->buildColumnCreationStatement(\n $fieldCount,\n $isCreateTable\n );\n\n // Builds the PRIMARY KEY statements\n $primaryKeyStatements = $this->buildIndexStatements(\n isset($fieldPrimary[0]) ? $fieldPrimary[0] : [],\n \" PRIMARY KEY \",\n $isCreateTable\n );\n $definitions = array_merge($definitions, $primaryKeyStatements);\n\n // Builds the INDEX statements\n $definitions = $this->mergeIndexStatements(\n $definitions,\n $isCreateTable,\n $fieldIndex,\n \"INDEX\"\n );\n\n // Builds the UNIQUE statements\n $definitions = $this->mergeIndexStatements(\n $definitions,\n $isCreateTable,\n $fieldUnique,\n \"UNIQUE\"\n );\n\n // Builds the FULLTEXT statements\n $definitions = $this->mergeIndexStatements(\n $definitions,\n $isCreateTable,\n $fieldFullText,\n \"FULLTEXT\"\n );\n\n // Builds the SPATIAL statements\n $definitions = $this->mergeIndexStatements(\n $definitions,\n $isCreateTable,\n $fieldSpatial,\n \"SPATIAL\"\n );\n\n if (count($definitions)) {\n $sqlStatement = implode(', ', $definitions);\n }\n $sqlStatement = preg_replace('@, $@', '', $sqlStatement);\n\n return $sqlStatement;\n }", "title": "" }, { "docid": "a040c0345c61782ccd9c3bc163ef8d3e", "score": "0.61499083", "text": "public function getSqlString() {\n\t\t$clause = 'INSERT ' \n\t\t\t. $this->buildInto() \n\t\t\t. $this->buildTable() \n\t\t\t. $this->buildFields() \n\t\t\t. $this->buildValues() \n\t\t\t. $this->buildDuplicate() ;\n\t\t\n\t\treturn $clause ;\n\t}", "title": "" }, { "docid": "49b8e17b38942c158354781ac35a9a00", "score": "0.6140599", "text": "public function getSql(): string\n {\n return $this->sql;\n }", "title": "" }, { "docid": "8123832756095f87807854a027b53e15", "score": "0.61401695", "text": "public function getSql() {\n return $this->sql;\n }", "title": "" }, { "docid": "cb6f23852332aff72918bfb43af43581", "score": "0.6138268", "text": "public function _get_sql() {\n\t\treturn $this->sql;\n\t}", "title": "" }, { "docid": "e33cc7ca0fef60faa4c46e9c850f25e7", "score": "0.61317027", "text": "private function build_sql() {\n\n\t}", "title": "" }, { "docid": "f9d9fc1110694ed404fc89410f9ad174", "score": "0.61310756", "text": "abstract public function getSqlDefinition();", "title": "" }, { "docid": "013edb9e1a4b85f9b647a5cef0748a75", "score": "0.61222106", "text": "public function getTableSqlSchema($tableName)\n {\n $charset = $this->db->get_charset_collate();\n\n return \"CREATE TABLE $tableName (\n id int(10) NOT NULL AUTO_INCREMENT,\n code INTEGER(6),\n symb VARCHAR(6),\n rate VARCHAR(12),\n diff VARCHAR(12),\n date VARCHAR(12),\n created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (id)\n ) $charset ;\";\n }", "title": "" }, { "docid": "785f34468e4f0f9ca7f0359749427305", "score": "0.6122033", "text": "public function getSqlTables()\n {\n $databaseName = Config::get('database.connections')[Config::get('database.default')]['database'];\n\n // Get all tables in the database ordered by their name\n $tables = new Utility_Collection(\n DB::select(\n DB::raw('\n SELECT table_name, engine\n FROM information_schema.tables\n WHERE table_type = \\'BASE TABLE\\'\n AND table_schema=\\''. $databaseName .'\\'\n ORDER BY table_name ASC'\n )\n )\n );\n $tables = $tables->table_name;\n\n $this->setViewData('tables', $tables);\n }", "title": "" }, { "docid": "dc85b80c25bd0d655c24d068d2dafb39", "score": "0.61197627", "text": "public function generateSqlQuery()\n {\n $res = 'SELECT ';\n $numItems = count($this->aliases);\n $i = 0;\n foreach($this->aliases as $column => $alias) {\n $res .= $column . ' as ' . $alias;\n if(++$i !== $numItems) {\n $res .= ',';\n }\n }\n $res .= ' FROM ' . $this->db . '.' . $this->table;\n $res .= ' WHERE ' . $this->key . ' > ' . $this->last;\n $res .= ' AND (' . $this->generatePreScanClause() . ')';\n $res .= ' ORDER BY ' . $this->key;\n if ($this->limit > 0) {\n $res .= ' LIMIT ' . $this->limit;\n }\n $res .= ';';\n return $res;\n }", "title": "" }, { "docid": "497477b463ab0f080a6b6e40bbef21d0", "score": "0.60986406", "text": "public function getSql()/*# : string */;", "title": "" }, { "docid": "9158c804aa66b91cd3f4c293ef64a65f", "score": "0.6093952", "text": "public function sql()\n {\n $this->buildJoins();\n $this->buildFilters();\n $this->buildSelect();\n\n return parent::sql();\n }", "title": "" }, { "docid": "f30ea4e69f7e8cabcd146bf1e9fef3f9", "score": "0.6085129", "text": "protected function prepareDBManagerStatement()\n {\n # Before creating statement, let's find wheather table already\n # exist or not. setting mode to alter or create helps us making\n # 'create' or 'alter' statement.\n $mode = $this->getDBMode();\n $alterMode = $this->isDBAlterMode();\n\n # Processing each config detail to prepare statement.\n $this->processDBConfig($mode, $alterMode);\n\n # This is CREATE OR ALTER TABLE {NAME} statement.\n $statement = strtoupper($mode) . ' TABLE ' .\n $this->quote($this->getDBTable()) . ' ';\n\n $dbJoinedStatement = $this->getDBJoinedStatement();\n\n if (empty($dbJoinedStatement)) {\n return '';\n }\n\n # Create mode requires small brace enclosing to statement.\n if ($alterMode === FALSE) {\n return $statement .= '(' . PHP_EOL .\n $dbJoinedStatement . ')';\n }\n\n return $statement . PHP_EOL . $dbJoinedStatement;\n }", "title": "" }, { "docid": "08e4792a7264623f1eed1bde3410a3e4", "score": "0.608402", "text": "protected function getCreateTableSql($table)\n {\n $row = $this->db->createCommand('SHOW CREATE TABLE ' . $this->quoteTableName($table->fullName))\n ->queryOne();\n if (isset($row['Create Table'])) {\n $sql = $row['Create Table'];\n } else {\n $row = array_values($row);\n $sql = $row[1];\n }\n \n return $sql;\n }", "title": "" }, { "docid": "99e8512f6b9f41b6c6ffc10ac5f15abb", "score": "0.6066036", "text": "function getSQLCreateTable($o)\n {\n }", "title": "" }, { "docid": "48cb1caf7e23796d08e8ed1322e06095", "score": "0.60572153", "text": "public function getStatement()\n {\n return trim(\n sprintf(\n $this->_insert,\n $this->_sql->getTableName(),\n $this->getColumns(),\n $this->getValues()\n )\n );\n }", "title": "" }, { "docid": "8f8317da9a0625a35194a45dfd04a6fe", "score": "0.6047213", "text": "public function getInsertQuery(){\n\t\treturn \"INSERT INTO \" . \"xxx.Logs\" . \" (\" . Logs::getInsertColumns() . \")\" . \"\\r\\n\" . \"VALUES(\" . Logs::getValues() . \" )\";\n\t}", "title": "" }, { "docid": "71429e089d9f755620e395933a8e6b3e", "score": "0.603905", "text": "public function getSQL() {\n return $this->sql;\n }", "title": "" }, { "docid": "48b7b562fb29d57a84fcce60b9e82b74", "score": "0.60293776", "text": "public function getStatement()\n {\n return \"DROP TABLE `{$this->_sql->tableName}`\";\n }", "title": "" }, { "docid": "1a7aeb653a80e647386d6000666e294e", "score": "0.6025998", "text": "final public function getSqlIndex()\n {\n $t = array();;\n $id = $this->fromid;\n if (static::$sqlindex) $sqlindex = array_merge(static::$sqlindex, Doc::$sqlindex);\n else $sqlindex = Doc::$sqlindex;\n foreach ($sqlindex as $k => $v) {\n \n if (!empty($v[\"unique\"])) $unique = \"unique\";\n else $unique = \"\";\n if (!empty($v[\"using\"])) {\n \n if ($v[\"using\"][0] == \"@\") {\n $v[\"using\"] = getParam(substr($v[\"using\"], 1));\n }\n $t[] = sprintf(\"CREATE $unique INDEX %s$id on doc$id using %s(%s);\\n\", $k, $v[\"using\"], $v[\"on\"]);\n } else {\n $t[] = sprintf(\"CREATE $unique INDEX %s$id on doc$id(%s);\\n\", $k, $v[\"on\"]);\n }\n }\n return $t;\n }", "title": "" }, { "docid": "a4d1dcba33713f0c04356a44c4d63c0d", "score": "0.60148555", "text": "public function getCreateSql(ObjectType $type, string $name) : string;", "title": "" }, { "docid": "84a4af71678b92068adf2d293556ba92", "score": "0.6013317", "text": "public function buildTables()\r\n\t{\r\n\t\t$sql = \"SELECT\r\n\t\tTABLE_SCHEMA AS \\\"schema\\\",\r\n\t\tTABLE_NAME AS \\\"name\\\"\r\n\t\tFROM information_schema.TABLES\r\n\t\tWHERE\r\n\t\tTABLE_TYPE = 'BASE TABLE' AND\r\n\t\tTABLE_SCHEMA = '{{schema}}' \";\r\n\r\n\t\t// Busca em todos os schemas fornecidos\r\n\t\t$sql = $this->unifySchema($sql). \" ORDER BY \\\"schema\\\", \\\"name\\\"\";\r\n\r\n\t\treturn DB::select($sql);\r\n\t}", "title": "" }, { "docid": "cf0a41090b3489b2c7438b26fa2870f5", "score": "0.59481174", "text": "public function getPreparedSql();", "title": "" }, { "docid": "632b3a7caabf6a24700622e650baaef2", "score": "0.5919633", "text": "public function getUpSQL()\n {\n return array (\n 'propel' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n 'blog' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n );\n }", "title": "" }, { "docid": "ee8218e62d206fab5714b65fda33c885", "score": "0.5917874", "text": "function getSQL () {\n\t\treturn $this -> sql;\n\t}", "title": "" }, { "docid": "e9b4025dbaadaee9197f00029573177e", "score": "0.5901444", "text": "public function createInsertQuery() {\n\n /*\n * ---------- INSERT QUERY PROTOTYPE ----------\n * INSERT INTO table (columns, ...) OK\n * JOINS table ON column1 = column2 OK\n * VALUES (values, ...) OK\n */\n\n $query = \"INSERT INTO \";\n\n $table = $this->queryCommands->table;\n $query .= $table . \" \";\n\n $insert = $this->queryCommands->insert;\n $columns = [];\n $values = [];\n foreach($insert[0] as $row) {\n foreach($row as $column => $val) {\n $columns[] = $column;\n $values[] = $val;\n }\n }\n\n $columns = \"(`\" . implode(\"`, `\", $columns) . \"`) \";\n $i = 0;\n $binds = [];\n foreach($values as $value) {\n $binds[] = \":insert\" . $i;\n $this->queryBinds[\":insert\" . $i] = $value;\n $i++;\n }\n\n $values = \"(\" . implode(\", \", $binds) . \") \";\n\n $query .= $columns;\n\n $joins = $this->createJoins();\n $query .= $joins;\n\n $query .= \"VALUES \" . $values;\n $this->resultQuery = trim($query);\n\n }", "title": "" }, { "docid": "46c5cc129daef3e24ff3012d5c9d4b3a", "score": "0.58998615", "text": "public function query() {\n return $this->sql;\n }", "title": "" }, { "docid": "37fe2b19263177253a7cf6b2a629eb12", "score": "0.58950156", "text": "private function getSaveDefinition()\r\n\t{\r\n\t\t$sql = '';\r\n\t\t$comma = '';\r\n\t\tif($this->TABLE_NAME !== @$this->originalAttributes['TABLE_NAME'] && !$this->getIsNewRecord())\r\n\t\t{\r\n\t\t\t//@todo(mburtscher): Privileges are not copied automatically!!!\r\n\t\t\t$sql .= \"\\n\\t\" . 'RENAME ' . self::$db->quoteTableName($this->TABLE_NAME);\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->TABLE_COLLATION !== @$this->originalAttributes['TABLE_COLLATION'])\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'CHARACTER SET ' . Collation::getCharacterSet($this->TABLE_COLLATION) . ' COLLATE ' . $this->TABLE_COLLATION;\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->comment !== @$this->originalAttributes['comment'])\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'COMMENT ' . self::$db->quoteValue($this->comment);\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->ENGINE !== @$this->originalAttributes['ENGINE'])\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'ENGINE ' . $this->ENGINE;\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->optionChecksum !== $this->originalOptionChecksum)\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'CHECKSUM ' . $this->optionChecksum;\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->optionPackKeys !== $this->originalOptionPackKeys)\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'PACK_KEYS ' . $this->optionPackKeys;\r\n\t\t\t$comma = ',';\r\n\t\t}\r\n\t\tif($this->optionDelayKeyWrite !== $this->originalOptionDelayKeyWrite)\r\n\t\t{\r\n\t\t\t$sql .= $comma . \"\\n\\t\" . 'DELAY_KEY_WRITE ' . $this->optionDelayKeyWrite;\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "40058f582fa536dc48c6f8d362982fa2", "score": "0.5893116", "text": "public function toSql();", "title": "" }, { "docid": "40058f582fa536dc48c6f8d362982fa2", "score": "0.5893116", "text": "public function toSql();", "title": "" }, { "docid": "3fbae21b8eb070345676401e72be2aa8", "score": "0.5877985", "text": "public static function toSql()\n {\n return \\Illuminate\\Database\\Query\\Builder::toSql();\n }", "title": "" }, { "docid": "f94bc2287b02daeb81d4ccf0b26769b1", "score": "0.5874514", "text": "public function getSyntax()\n\t\t{\n\t\t\tif ('select' === $this->queryType) {\n\t\t\t\tif ($this->tableJoinSyntax) {\n\t\t\t\t\t$sql = 'SELECT ' . implode(', ', $this->columns) . ' FROM ';\n\t\t\t\t\t$sql .= (\\is_string($this->tableJoinSyntax)) ? $this->tableJoinSyntax : $this->tableJoinSyntax->getStatement($this->parameters);\n\t\t\t\t\tif ($this->whereSyntax) {\n\t\t\t\t\t\t$syntax = $this->getWhereSyntax($this->whereSyntax);\n\t\t\t\t\t\tif ($syntax) {\n\t\t\t\t\t\t\t$sql .= ' WHERE ' . $syntax;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\\count($this->groupby)) {\n\t\t\t\t\t\t$sql .= ' GROUP BY ' . implode(', ', $this->groupby);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->havingSyntax) {\n\t\t\t\t\t\t$syntax = $this->getWhereSyntax($this->havingSyntax);\n\t\t\t\t\t\tif ($syntax) {\n\t\t\t\t\t\t\t$sql .= ' HAVING ' . $syntax;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\\count($this->orderby)) {\n\t\t\t\t\t\t$sql .= ' ORDER BY ' . implode(', ', $this->orderby);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->fetchLength > 0) {\n\t\t\t\t\t\t$sql .= ' LIMIT ' . $this->startRecord . ', ' . $this->fetchLength;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sql = $this->sql;\n\t\t\t\tif (('select' === $this->queryType || 'delete' === $this->queryType || 'update' === $this->queryType) && $this->whereSyntax) {\n\t\t\t\t\t$syntax = $this->getWhereSyntax($this->whereSyntax);\n\t\t\t\t\tif ($syntax) {\n\t\t\t\t\t\t$sql .= ' WHERE ' . $syntax;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->replaceParameter($sql);\n\t\t}", "title": "" }, { "docid": "ce5d532c04000ada9fd42b2cac471d9a", "score": "0.5871485", "text": "protected function generateSql() {\r\n\t\t$this->sql = 'UPDATE '.$this->tables;\r\n\t\t//loop through columns and values\r\n\t\tif(sizeof($this->values)) {\r\n\t\t\t$set = null;\r\n\t\t\tforeach($this->values as $key => $val) {\r\n\t\t\t\tif($set !== null ) {\r\n\t\t\t\t\t$set .= ', ';\r\n\t\t\t\t}\r\n\t\t\t\t$set .= \"$key = $val\";\r\n\t\t\t}\r\n\t\t\t$this->sql .= ' SET ' .$set;\r\n\t\t}\r\n\t\t//add where criteria\r\n\t\tif(isset($this->where)) {\r\n\t\t\t$this->sql .= ' WHERE ' . $this->where;\r\n\t\t}\r\n\t\t//add limit criteria\r\n\t\tif(isset($this->limit)) {\r\n\t\t\t$this->sql .= $this->limit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a3390ebeae665de89b5048525c2ef1ee", "score": "0.5860955", "text": "function init_queries($tableslc) {\n\t\t\t$tablename = qa_db_add_table_prefix('userscores');\n\t\t\t\n\t\t\tif(!in_array($tablename, $tableslc)) {\n\t\t\t\treturn 'CREATE TABLE IF NOT EXISTS `'.$tablename.'` (\n\t\t\t\t `date` date NOT NULL,\n\t\t\t\t `userid` int(10) unsigned NOT NULL,\n\t\t\t\t `points` int(11) NOT NULL DEFAULT \"0\",\n\t\t\t\t KEY `userid` (`userid`),\n\t\t\t\t KEY `date` (`date`)\n\t\t\t\t)';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "acbf779980335113ba156f4f1763cd90", "score": "0.5855127", "text": "private function get_sql() {\n\t\treturn \"(\".$this->get(false).\")\";\n\t}", "title": "" }, { "docid": "f44e6a29528212bb057bb8a5ba20c3de", "score": "0.58528775", "text": "public function getSql() {\n\t\treturn $this->sqlCmd;\n\t}", "title": "" }, { "docid": "990ece8dfb541f2efd41bcffdfdfa0f9", "score": "0.5850309", "text": "public function get_update_sql()\n {\n }", "title": "" }, { "docid": "2e6e33ffb78e9a0c95d9411c0ef43e22", "score": "0.5845676", "text": "protected function getDatabaseQueries()\n\t{\n\t\t$queries = array();\n\n\t\tforeach ($this->queries as $query)\n\t\t\t$queries[] = array(\n\t\t\t\t'query' => $this->createRunnableQuery($query['query'], $query['bindings'], $query['connection']),\n\t\t\t\t'duration' => $query['time'],\n\t\t\t\t'connection' => $query['connection']\n\t\t\t);\n\n\t\treturn $queries;\n\t}", "title": "" }, { "docid": "674313ca6a38a1ddbe57efbf3b1015c9", "score": "0.58394027", "text": "public function getPreDumpSql() : array;", "title": "" }, { "docid": "b8befd72d424512f05c0be138f5d164a", "score": "0.5838246", "text": "private function getQueries()\n {\n return $queries = DB::getQueryLog();\n\n $formattedQueries = [];\n foreach ($queries as $query) {\n $prep = $query['query'];\n\n foreach ($query['bindings'] as $binding) {\n $prep = preg_replace(\"#\\?#\", $binding, $prep, 1);\n }\n\n $formattedQueries[] = $prep;\n }\n\n return $formattedQueries;\n }", "title": "" }, { "docid": "d0f760715be0ea2983547c056c9189ad", "score": "0.5837131", "text": "public function GetSQL()\r\n {\r\n if ($this->HasCondition() || $this->HasJoins() || $this->HasOrdering())\r\n {\r\n $fieldList = $this->GetFieldListClase(); \r\n\r\n $result = 'SELECT '.$fieldList.' FROM (' . $this->sql . ') ' . self::CustomSelectSubqueryAlias;\r\n\r\n StringUtils::AddStr($result, $this->GetJoinsClause(), StringUtils::Space);\r\n StringUtils::AddStr($result, $this->GetFieldFilterCondition(), ' WHERE ');\r\n StringUtils::AddStr($result, $this->GetOrderByClause(), StringUtils::Space);\r\n }\r\n else\r\n $result = $this->sql;\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "e3a76f581091d2f0eb5370bf40ef477a", "score": "0.5825669", "text": "public function getSql()\n {\n if(!$this->hasBindings())\n throw new SqlStatemantException('InsertStatemant','There are no bindings ready for inserting into database');\n\n $sql = 'UPDATE '. $this->clauses['table']. ' SET ';\n $sql .= $this->getColumnsAndPlaceholders();\n $sql .= $this->clauses['wheres']->getSql();\n\n return $sql;\n }", "title": "" }, { "docid": "b2f28caa0880c41159f6814428d35f48", "score": "0.58133763", "text": "public function getListSql()\n {\n $filter = $this->UseSessionForListSql ? $this->getSessionWhere() : \"\";\n AddFilter($filter, $this->CurrentFilter);\n $filter = $this->applyUserIDFilters($filter);\n $this->recordsetSelecting($filter);\n $select = $this->getSqlSelect();\n $from = $this->getSqlFrom();\n $sort = $this->UseSessionForListSql ? $this->getSessionOrderBy() : \"\";\n $this->Sort = $sort;\n return $this->buildSelectSql(\n $select,\n $from,\n $this->getSqlWhere(),\n $this->getSqlGroupBy(),\n $this->getSqlHaving(),\n $this->getSqlOrderBy(),\n $filter,\n $sort\n );\n }", "title": "" }, { "docid": "b2f28caa0880c41159f6814428d35f48", "score": "0.58133763", "text": "public function getListSql()\n {\n $filter = $this->UseSessionForListSql ? $this->getSessionWhere() : \"\";\n AddFilter($filter, $this->CurrentFilter);\n $filter = $this->applyUserIDFilters($filter);\n $this->recordsetSelecting($filter);\n $select = $this->getSqlSelect();\n $from = $this->getSqlFrom();\n $sort = $this->UseSessionForListSql ? $this->getSessionOrderBy() : \"\";\n $this->Sort = $sort;\n return $this->buildSelectSql(\n $select,\n $from,\n $this->getSqlWhere(),\n $this->getSqlGroupBy(),\n $this->getSqlHaving(),\n $this->getSqlOrderBy(),\n $filter,\n $sort\n );\n }", "title": "" }, { "docid": "0f4e744a5a60885dccaab298883d3106", "score": "0.58108217", "text": "function sql(){\n\t\t\treturn $this->select.$this->from.$this->join.$this->where.\"\\n\";\n\t\t}", "title": "" }, { "docid": "1baaccae3ae34364b852fb5d84350ad2", "score": "0.5809945", "text": "public static function create()\n {\n $result = static::get_database_access()->create_table(self::get_table_with_prefix(), self::get_columns_sql());\n\n return $result;\n }", "title": "" }, { "docid": "8546e6312177f0fbeb134ed8b06dc875", "score": "0.5802015", "text": "public function getDropTableSqlSchema()\n {\n $tableName = $this->getTableName();\n\n return \"DROP TABLE IF EXISTS $tableName ;\";\n }", "title": "" }, { "docid": "0c5b68085612a8684222cd1d9c6e0cd7", "score": "0.5799181", "text": "final public function __toString()\n {\n $constraints = array();\n $primaryKeys = array();\n $columns = $this->getColumns($constraints, $primaryKeys);\n $pk = $this->getPrimaryKeyClause($primaryKeys);\n $fields = array_merge($columns, $pk, $constraints);\n\n $strValue = 'CREATE TABLE ' . $this->tableName . ' (';\n $strValue .= join(',', array_map(\n function ($item) {\n return (string) $item;\n },\n $fields\n ));\n $strValue .= ')';\n\n return $strValue;\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "0c6f676ddaa106ac426d413a15dc9710", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n\n $sliders = new Slider();\n $sliders->name = $request->name;\n $sliders->sub_title = $request->sub_title;\n $sliders->description = $request->description;\n $sliders->position = $request->position;\n $sliders->status = $request->status;\n\n //for image\n if ($request->img) {\n $image1 = imageupload($request->img, 'upload');\n $sliders->img = $image1;\n }\n\n $sliders->save();\n return redirect(route('slider.index'))->with('success','Slider Added successfully!');\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\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 }", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
dcb4911afc56086902cd31c6e2c3bbfd
Checks if register() registers the stream.
[ { "docid": "a6271065a65cb363f10fa7548a6d02f6", "score": "0.67852044", "text": "public function testRegisterRegistersStream()\n {\n $streams = stream_get_wrappers();\n $this->assertContains(AspectPHP_Stream::NAME, $streams);\n }", "title": "" } ]
[ { "docid": "e24e833ec942bbcc218f96d36bb72fea", "score": "0.74766797", "text": "public function testIsRegisteredReturnsTrueIfStreamIsAlreadyRegistered()\n {\n $this->assertTrue(AspectPHP_Stream::isRegistered());\n }", "title": "" }, { "docid": "4a30ae51956cdc297f6cb0115975befc", "score": "0.73109096", "text": "public function testIsRegisteredReturnsFalseIfStreamIsNotRegistered()\n {\n AspectPHP_Stream::unregister();\n $this->assertFalse(AspectPHP_Stream::isRegistered());\n }", "title": "" }, { "docid": "5262062a2af8474c9dc3c2187d164135", "score": "0.6933814", "text": "public function testRegisterDoesNothingIfStreamIsAlreadyRegistered()\n {\n $this->setExpectedException(null);\n AspectPHP_Stream::register();\n }", "title": "" }, { "docid": "1cacb5dbb64d5eb60b29f5f7ef5c9c0e", "score": "0.6437575", "text": "public function detectStreamWrapper($register = false, &$streams=null)\n {\n $plugin = AJXP_PluginsService::findPlugin(\"access\", $this->accessType);\n if(!$plugin) return(false);\n $streamData = $plugin->detectStreamWrapper($register);\n if (!$register && $streamData !== false && is_array($streams)) {\n $streams[$this->accessType] = $this->accessType;\n }\n if($streamData !== false) $this->streamData = $streamData;\n return ($streamData !== false);\n }", "title": "" }, { "docid": "d8970bc9e7cc75b39f49e9d07a6d993b", "score": "0.6292495", "text": "public static function register(): void\n {\n if (!in_array(self::FILTERNAME, stream_get_filters(), true)) {\n stream_filter_register(self::FILTERNAME, self::class);\n }\n }", "title": "" }, { "docid": "e820e09ba4e37a6c0f541449028c34db", "score": "0.6213443", "text": "public function register(): void {\n if (!\\in_array(static::NAME, stream_get_filters(), true)) {\n $isRegistered = stream_filter_register(static::NAME, static::class);\n if (!$isRegistered) {\n throw new \\RuntimeException(sprintf('Failed registering stream filter \"%s\" on stream \"%s\"', static::class, static::NAME));\n }\n }\n }", "title": "" }, { "docid": "0c17fcccfa3ed96f769050c74580c87f", "score": "0.6130013", "text": "function osc_is_register_page() {\n return osc_is_current_page(\"register\", \"register\");\n }", "title": "" }, { "docid": "e2dd74577d725ab84669ed3c8a5a7837", "score": "0.61237866", "text": "public function isOlsxRegistering(): bool\n {\n return OlsxInterface::REGISTERING === $this->olsxStatus;\n }", "title": "" }, { "docid": "0ee29f198a2e0fff0e6cac9020adc589", "score": "0.6022028", "text": "public function testUnregisterDoesNothingIfStreamIsNotRegistered()\n {\n $this->setExpectedException(null);\n AspectPHP_Stream::unregister();\n AspectPHP_Stream::unregister();\n }", "title": "" }, { "docid": "80b4087f4693ed19506bcdcf0161f78c", "score": "0.6018339", "text": "public function register()\n {\n // Nothing is registered at this time\n }", "title": "" }, { "docid": "34a35cc80216bdbe91c02f08f1b366cd", "score": "0.59156257", "text": "function is_registered($name) {\n if ($this->registered_objects[$name] == true)\n return true;\n return false;\n }", "title": "" }, { "docid": "a50bfbd9072337bc0f70188cf0f1d5c6", "score": "0.58053446", "text": "public function is_registered(): bool {\n\t\treturn $this->registered;\n\t}", "title": "" }, { "docid": "9c34c3e309de68fedd7b9f088f659649", "score": "0.5752467", "text": "protected function isInValidStream(): bool\n {\n return $this->stream === null;\n }", "title": "" }, { "docid": "31166a95f1defa31d38a6008b2f72b64", "score": "0.5724382", "text": "public function is_registered($name)\n {\n }", "title": "" }, { "docid": "31166a95f1defa31d38a6008b2f72b64", "score": "0.5724382", "text": "public function is_registered($name)\n {\n }", "title": "" }, { "docid": "269f0f7a53df7ed959ccaeb4e5780b62", "score": "0.5707048", "text": "public static function shouldRegisterObserver(): bool\n {\n if (! static::$recordingEnabled) {\n return false;\n }\n\n return Context::isValid(Resolve::context());\n }", "title": "" }, { "docid": "c1f60e77e3c50f595f4b1e8403336584", "score": "0.57066804", "text": "public function isRegistered()\n\t{\n\t\treturn $this->registered;\n\t}", "title": "" }, { "docid": "e8319def76cb79372b8ed5c8022d8a59", "score": "0.5631641", "text": "protected static function register() {}", "title": "" }, { "docid": "2d55f7afb7c12b4309e84ec923c245a5", "score": "0.563114", "text": "public function register()\n\t{\n\t\t// @noop\n\t}", "title": "" }, { "docid": "48890e235757234873f42e124fe7d42b", "score": "0.56161064", "text": "protected function registered()\n {\n //\n }", "title": "" }, { "docid": "6900f4e2a5e2e357579ffbfeaa6ba861", "score": "0.5612322", "text": "public function isRegistered()\n {\n return $this->registered;\n }", "title": "" }, { "docid": "8d90bfa39d22b52ae437fa2cf25def29", "score": "0.5596829", "text": "public function register(): bool\n {\n\n $serverInfo = new ServerInfo();\n $serverInfo->setServerName(self::$rpcClientConfig->getServerName());\n $serverInfo->setAddress(new Ipv4Address([\n 'ip' => self::$rpcClientConfig->getListen(),\n 'port' => self::$rpcClientConfig->getPort()\n ]));\n $d = $serverInfo->toArray();\n $d['address'] = $serverInfo->getAddress()->toArray();\n $data = new RequestDataMsg([\n 'eventName' => 'register',\n 'data' => $d\n ]);\n $res = $this->sendRequest($data);\n if ($res->getResult() == 1) {\n echo self::$rpcClientConfig->getServerName() . '------------------------注册成功';\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9c864a1a31a86535112f97dadf14f245", "score": "0.5556285", "text": "abstract function is_registered( $ignore_anonymous_state = false );", "title": "" }, { "docid": "d44a7bbdf69b0cc1512367718b699cef", "score": "0.5554691", "text": "public function isRegistered(){\n return isset($this->data['id']);\n }", "title": "" }, { "docid": "4561a2e4a03916bcc51278c39b7a9056", "score": "0.5551483", "text": "public static function register();", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.5543743", "text": "public function register(): void;", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.5543743", "text": "public function register(): void;", "title": "" }, { "docid": "5cd34f13c1153b025507e1e8e79d0b0e", "score": "0.5534716", "text": "public function _register()\n {\n }", "title": "" }, { "docid": "54b6d67a66721c5b00ea0b0b0c083b7c", "score": "0.5523405", "text": "static public function isRegistered($name)\n {\n return isset(self::$_registry[$name]);\n }", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55195683", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55195683", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55195683", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55195683", "text": "abstract public function register();", "title": "" }, { "docid": "3d41ce7a87fb92651b560230978ea8c0", "score": "0.5512158", "text": "function isRegistered($event) {\n return Event::isRegistered($event);\n }", "title": "" }, { "docid": "9d81061c48ceb231216fa617633c959d", "score": "0.54912376", "text": "public function testUnregisterRemovesRegisteredStream()\n {\n AspectPHP_Stream::unregister();\n $streams = stream_get_wrappers();\n $this->assertNotContains(AspectPHP_Stream::NAME, $streams);\n }", "title": "" }, { "docid": "5a1f20816f51af8c8f9dcc5470aad0a3", "score": "0.5467113", "text": "public function register() {\n\t\tif ( ! apply_filters( 'jetpack_just_in_time_msgs', false ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tadd_action( 'current_screen', array( $this, 'prepare_jitms' ) );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d7c2770d85d59ef0ebd42717fa22040c", "score": "0.54662097", "text": "public function register()\n\t{\n\t\t// Do nothing\n\t}", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.5458374", "text": "public function register();", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.54191446", "text": "public function register() {}", "title": "" }, { "docid": "fc9a7986f1abbf0e0b35449a7ac3731a", "score": "0.53890985", "text": "public function testPharStreamWrapperRegistration() {\n if (!in_array('phar', stream_get_wrappers(), TRUE)) {\n $this->markTestSkipped('There is no phar stream wrapper registered. PHP is probably compiled without phar support.');\n }\n // Ensure that phar is not treated as a valid scheme.\n $stream_wrapper_manager = $this->container->get('stream_wrapper_manager');\n $this->assertFalse($stream_wrapper_manager->getViaScheme('phar'));\n\n // Ensure that calling register again and unregister do not create errors\n // due to the PharStreamWrapperManager singleton.\n $stream_wrapper_manager->register();\n $this->assertContains('public', stream_get_wrappers());\n $this->assertContains('phar', stream_get_wrappers());\n $stream_wrapper_manager->unregister();\n $this->assertNotContains('public', stream_get_wrappers());\n // This will have reverted to the builtin phar stream wrapper.\n $this->assertContains('phar', stream_get_wrappers());\n $stream_wrapper_manager->register();\n $this->assertContains('public', stream_get_wrappers());\n $this->assertContains('phar', stream_get_wrappers());\n }", "title": "" }, { "docid": "54ddee8b617617c8ba53df6689faac0b", "score": "0.53800106", "text": "public function register()\n {\n // Do nothing...\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.536662", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "9dad83c8c51f7b795d6c375b4ec93d90", "score": "0.536102", "text": "public function hasNamedStream()\n { \n // Note: Calling this method will initialize _allNamedStreams \n // and _hasNamedStreams flag to a boolean value\n // from null depending on the current state of _allNamedStreams \n // array, so method should be called only after adding all \n // named streams\n if (is_null($this->_hasNamedStreams)) {\n $this->getAllNamedStreams();\n $this->_hasNamedStreams = !empty($this->_allNamedStreams);\n }\n \n return $this->_hasNamedStreams;\n }", "title": "" }, { "docid": "8bf709bca5b73f17d5c49f779c6392d1", "score": "0.5357124", "text": "abstract function register(): void;", "title": "" }, { "docid": "e8ab0f886b40179cd64af1bbd8d89c2f", "score": "0.53537565", "text": "public function test_register(): void {\n\t\t$this->instance->register();\n\n\t\t$this->assertEquals( 10, has_filter( 'body_class', [ $this->instance, 'add_core_theme_classes' ] ) );\n\t\t$this->assertEquals( 10, has_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] ) );\n\t}", "title": "" }, { "docid": "932caa520f9bdee596a5a39be90e7c21", "score": "0.53523374", "text": "public function register(){}", "title": "" }, { "docid": "c36a964dba1255a4ac110b76fbb9fb9d", "score": "0.53512055", "text": "public function is_registered($pattern_name)\n {\n }", "title": "" }, { "docid": "d5c867443aa82cb264132a915caa0c18", "score": "0.5335326", "text": "public static function register()\n {\n }", "title": "" }, { "docid": "f0faea42c9d8fa1df0c14a732541bb49", "score": "0.5331274", "text": "public function register()\n {\n if (! $this->registered) {\n $this->prependToLoaderStack();\n\n $this->registered = true;\n }\n }", "title": "" }, { "docid": "3957b31511be6d1a9f9bc53395cbfe38", "score": "0.5325211", "text": "static public function register() {\n\t\tstatic $registered = false;\n\n\t\t// only register once!\n\t\tif ( $registered ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// who's calling?\n\t\t$class_name = get_called_class();\n\n\t\tadd_action( 'widgets_init', function() use ( $class_name ) {\n\t\t\tregister_widget( $class_name );\n\t\t} );\n\t\tadd_action( 'admin_footer', [ __CLASS__, 'forms_js' ] );\n\n\t\t$registered = true;\n\t}", "title": "" }, { "docid": "e9be0454c85686c9dc0f6b161c6e7dc9", "score": "0.53138024", "text": "function register()\n\t{\n\t}", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5311576", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5311576", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5311576", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5311576", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5311576", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "1fc6ed43b61078dd1a32fb3570934aba", "score": "0.52841353", "text": "abstract protected function doesSupportStreamWrapper();", "title": "" }, { "docid": "6c42f960058228332cc5e451fa7337c3", "score": "0.5280099", "text": "public function standardSingletonIsRegistered() {}", "title": "" }, { "docid": "de298c19603122ecfc42d36d60d63d4c", "score": "0.52764076", "text": "public function isRegistered(QueueInterface $queue);", "title": "" }, { "docid": "1380de5aa87a7285dd37da486ab63b59", "score": "0.5267807", "text": "public function register()\n {\n /**\n * Manual session start so we can get the Legacy session info\n */\n if (!isset($_SESSION)) {\n @session_start();\n }\n }", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.5252043", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.5252043", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.5252043", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "a62ceab0b6cfa2971ff364b01969295b", "score": "0.5228229", "text": "public function hasStream(StreamName $streamName): bool;", "title": "" }, { "docid": "8c8f3f62b2deaab9642a891f950db4c5", "score": "0.5225513", "text": "public function provideRegisterLink(): ?bool;", "title": "" }, { "docid": "ff77a90f8a207dd434b817bbf9d367cc", "score": "0.5217416", "text": "protected function shouldRegisterThisProcessWithResourcesCleaner(): bool\n {\n return self::isStatusCheck();\n }", "title": "" }, { "docid": "536dfe087179ea76b2590ef4a0ce8666", "score": "0.52089053", "text": "public function tryRegister($login, $password) : bool {\n return $this->playerDao->register($login, $password);\n }", "title": "" }, { "docid": "c2d59bc338bef06a6e2eb061289b483b", "score": "0.5206927", "text": "public function register(): void\n {\n\n }", "title": "" }, { "docid": "c2d59bc338bef06a6e2eb061289b483b", "score": "0.5206927", "text": "public function register(): void\n {\n\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5199282", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "3b02145368b95156c02d9a422aeef852", "score": "0.5196743", "text": "function checkRegister($data_label = \"\")\n\t{\n\t\tif(\"\" == $data_label)\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(shm_has_var($data_label))\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "0570a2675645f4080568941fee13455b", "score": "0.5195101", "text": "public function register()\n\t{\n //\n\t}", "title": "" }, { "docid": "0570a2675645f4080568941fee13455b", "score": "0.5195101", "text": "public function register()\n\t{\n //\n\t}", "title": "" }, { "docid": "a31a6733814f803221a2ab2d6406fd95", "score": "0.51918256", "text": "protected function registerIsXml()\n {\n Request::macro('isXml', function () {\n return Str::contains(strtolower($this->getContentType() ?? ''), 'xml');\n });\n }", "title": "" }, { "docid": "dc2dead069cca799b64ae72a50f48e2b", "score": "0.51889986", "text": "public function allowsExistingStreamOpening()\n {\n return $this->base != 'x';\n }", "title": "" }, { "docid": "929e66cf9bdd3445e52cd82660edbea5", "score": "0.5187998", "text": "public function registering();", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.51802653", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" } ]
d7b84dd9eeebafd60e56a5d7ac144a50
Get status view filter HTML
[ { "docid": "9c4022270db3e48b40ae9b82bb3c2a45", "score": "0.6994456", "text": "function get_status_view_filters_html($show, $urlargs, $hostattr, $serviceattr, $hoststatustypes, $servicestatustypes, $url = \"\")\n{\n if (empty($url)) {\n $theurl = get_current_page();\n } else {\n $theurl = $url;\n }\n\n $output = '';\n\n // No filter is being used...\n if ($hostattr == 0 && ($hoststatustypes == 0 || $hoststatustypes == HOSTSTATE_ANY) && $serviceattr == 0 && ($servicestatustypes == 0 || $servicestatustypes == SERVICESTATE_ANY)) {\n return '';\n }\n\n if ($show == \"openproblems\" || $show == \"serviceproblems\") {\n $show = \"services\";\n } else if ($show == \"hostproblems\") {\n $show = \"hosts\";\n }\n\n $theurl .= \"?show=\" . $show;\n foreach ($urlargs as $var => $val) {\n if ($var == \"show\" || $var == \"hostattr\" || $var == \"serviceattr\" || $var == \"hoststatustypes\" || $var == \"servicestatustypes\") {\n continue;\n }\n $theurl .= \"&\" . $var . \"=\" . $val;\n }\n\n $output .= '<img src=\"' . theme_image(\"filter.png\") . '\"> ' . _('Filters') . ':';\n $filters = \"\";\n\n if ($hostattr != 0 || ($hoststatustypes != 0 && $hoststatustypes != HOSTSTATE_ANY)) {\n $filters .= \" <b>\" . _('Host') . \"</b>=\";\n $filterstrs = array();\n\n if (($hoststatustypes & HOSTSTATE_UP))\n $filterstrs[] = _(\"Up\");\n if (($hoststatustypes & HOSTSTATE_DOWN))\n $filterstrs[] = _(\"Down\");\n if (($hoststatustypes & HOSTSTATE_UNREACHABLE))\n $filterstrs[] = _(\"Unreachable\");\n if (($hostattr & HOSTSTATUSATTR_ACKNOWLEDGED))\n $filterstrs[] = _(\"Acknowledged\");\n if (($hostattr & HOSTSTATUSATTR_NOTACKNOWLEDGED))\n $filterstrs[] = _(\"Not Acknowledged\");\n if (($hostattr & HOSTSTATUSATTR_INDOWNTIME))\n $filterstrs[] = _(\"In Downtime\");\n if (($hostattr & HOSTSTATUSATTR_NOTINDOWNTIME))\n $filterstrs[] = _(\"Not In Downtime\");\n if (($hostattr & HOSTSTATUSATTR_ISFLAPPING))\n $filterstrs[] = _(\"Flapping\");\n if (($hostattr & HOSTSTATUSATTR_ISNOTFLAPPING))\n $filterstrs[] = _(\"Not Flapping\");\n if (($hostattr & HOSTSTATUSATTR_CHECKSENABLED))\n $filterstrs[] = _(\"Checks Enabled\");\n if (($hostattr & HOSTSTATUSATTR_CHECKSDISABLED))\n $filterstrs[] = _(\"Checks Disabled\");\n if (($hostattr & HOSTSTATUSATTR_NOTIFICATIONSENABLED))\n $filterstrs[] = _(\"Notifications Enabled\");\n if (($hostattr & HOSTSTATUSATTR_NOTIFICATIONSDISABLED))\n $filterstrs[] = _(\"Notifications Disabled\");\n if (($hostattr & HOSTSTATUSATTR_HARDSTATE))\n $filterstrs[] = _(\"Hard State\");\n if (($hostattr & HOSTSTATUSATTR_SOFTSTATE))\n $filterstrs[] = _(\"Soft State\");\n\n if (($hostattr & HOSTSTATUSATTR_EVENTHANDLERDISABLED))\n $filterstrs[] = _(\"Event Handler Disabled\");\n if (($hostattr & HOSTSTATUSATTR_EVENTHANDLERENABLED))\n $filterstrs[] = _(\"Event Handler Enabled\");\n if (($hostattr & HOSTSTATUSATTR_FLAPDETECTIONDISABLED))\n $filterstrs[] = _(\"Flap Detection Disabled\");\n if (($hostattr & HOSTSTATUSATTR_FLAPDETECTIONENABLED))\n $filterstrs[] = _(\"Flap Detection Enabled\");\n if (($hostattr & HOSTSTATUSATTR_PASSIVECHECKSDISABLED))\n $filterstrs[] = _(\"Passive Checks Disabled\");\n if (($hostattr & HOSTSTATUSATTR_PASSIVECHECKSENABLED))\n $filterstrs[] = _(\"Passive Checks Enabled\");\n if (($hostattr & HOSTSTATUSATTR_PASSIVECHECK))\n $filterstrs[] = _(\"Passive Check\");\n if (($hostattr & HOSTSTATUSATTR_ACTIVECHECK))\n $filterstrs[] = _(\"Active Check\");\n if (($hostattr & HOSTSTATUSATTR_HARDSTATE))\n $filterstrs[] = _(\"Hard State\");\n if (($hostattr & HOSTSTATUSATTR_SOFTSTATE))\n $filterstrs[] = _(\"Soft State\");\n\n $x = 0;\n foreach ($filterstrs as $f) {\n if ($x > 0)\n $filters .= \",\";\n $filters .= $f;\n $x++;\n }\n }\n\n if ($serviceattr != 0 || ($servicestatustypes != 0 && $servicestatustypes != SERVICESTATE_ANY)) {\n $filters .= \" <b>\" . _('Service') . \"</b>=\";\n $filterstrs = array();\n\n if (($servicestatustypes & SERVICESTATE_OK))\n $filterstrs[] = _(\"Ok\");\n if (($servicestatustypes & SERVICESTATE_WARNING))\n $filterstrs[] = _(\"Warning\");\n if (($servicestatustypes & SERVICESTATE_UNKNOWN))\n $filterstrs[] = _(\"Unknown\");\n if (($servicestatustypes & SERVICESTATE_CRITICAL))\n $filterstrs[] = _(\"Critical\");\n if (($serviceattr & SERVICESTATUSATTR_ACKNOWLEDGED))\n $filterstrs[] = _(\"Acknowledged\");\n if (($serviceattr & SERVICESTATUSATTR_NOTACKNOWLEDGED))\n $filterstrs[] = _(\"Not Acknowledged\");\n if (($serviceattr & SERVICESTATUSATTR_INDOWNTIME))\n $filterstrs[] = _(\"In Downtime\");\n if (($serviceattr & SERVICESTATUSATTR_NOTINDOWNTIME))\n $filterstrs[] = _(\"Not In Downtime\");\n if (($serviceattr & SERVICESTATUSATTR_ISFLAPPING))\n $filterstrs[] = _(\"Flapping\");\n if (($serviceattr & SERVICESTATUSATTR_ISNOTFLAPPING))\n $filterstrs[] = _(\"Not Flapping\");\n if (($serviceattr & SERVICESTATUSATTR_CHECKSENABLED))\n $filterstrs[] = _(\"Checks Enabled\");\n if (($serviceattr & SERVICESTATUSATTR_CHECKSDISABLED))\n $filterstrs[] = _(\"Checks Disabled\");\n if (($serviceattr & SERVICESTATUSATTR_NOTIFICATIONSENABLED))\n $filterstrs[] = _(\"Notifications Enabled\");\n if (($serviceattr & SERVICESTATUSATTR_NOTIFICATIONSDISABLED))\n $filterstrs[] = _(\"Notifications Disabled\");\n if (($serviceattr & SERVICESTATUSATTR_HARDSTATE))\n $filterstrs[] = _(\"Hard State\");\n if (($serviceattr & SERVICESTATUSATTR_SOFTSTATE))\n $filterstrs[] = _(\"Soft State\");\n\n if (($serviceattr & SERVICESTATUSATTR_EVENTHANDLERDISABLED))\n $filterstrs[] = _(\"Event Handler Disabled\");\n if (($serviceattr & SERVICESTATUSATTR_EVENTHANDLERENABLED))\n $filterstrs[] = _(\"Event Handler Enabled\");\n if (($serviceattr & SERVICESTATUSATTR_FLAPDETECTIONDISABLED))\n $filterstrs[] = _(\"Flap Detection Disabled\");\n if (($serviceattr & SERVICESTATUSATTR_FLAPDETECTIONENABLED))\n $filterstrs[] = _(\"Flap Detection Enabled\");\n if (($serviceattr & SERVICESTATUSATTR_PASSIVECHECKSDISABLED))\n $filterstrs[] = _(\"Passive Checks Disabled\");\n if (($serviceattr & SERVICESTATUSATTR_PASSIVECHECKSENABLED))\n $filterstrs[] = _(\"Passive Checks Enabled\");\n if (($serviceattr & SERVICESTATUSATTR_PASSIVECHECK))\n $filterstrs[] = _(\"Passive Check\");\n if (($serviceattr & SERVICESTATUSATTR_ACTIVECHECK))\n $filterstrs[] = _(\"Active Check\");\n if (($serviceattr & SERVICESTATUSATTR_HARDSTATE))\n $filterstrs[] = _(\"Hard State\");\n if (($serviceattr & SERVICESTATUSATTR_SOFTSTATE))\n $filterstrs[] = _(\"Soft State\");\n\n $x = 0;\n foreach ($filterstrs as $f) {\n if ($x > 0)\n $filters .= \",\";\n $filters .= $f;\n $x++;\n }\n }\n\n $output .= $filters;\n $output .= \" <a href='\" . $theurl . \"'><img src='\" . theme_image(\"clearfilter.png\") . \"' class='tt-bind' data-placement='right' alt='\" . _(\"Clear Filter\") . \"' title='\" . _(\"Clear Filter\") . \"'></a>\";\n\n return $output;\n}", "title": "" } ]
[ { "docid": "1ff18da87710bc0c0dc031118a0327fe", "score": "0.68226534", "text": "function getTableFilterHTML()\n\t{\n\t\t$html = $this->render();\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "81bd6a84c4ca7276df1cf11181323b0d", "score": "0.6705532", "text": "protected function display_filter_by_status() {\n\n\t\t$status_list_items = array();\n\t\t$request_status = $this->get_request_status();\n\n\t\t// Helper to set 'all' filter when not set on status counts passed in\n\t\tif ( ! isset( $this->status_counts['all'] ) ) {\n\t\t\t$this->status_counts = array( 'all' => array_sum( $this->status_counts ) ) + $this->status_counts;\n\t\t}\n\n\t\tforeach ( $this->status_counts as $status_name => $count ) {\n\n\t\t\tif ( 0 === $count ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $status_name === $request_status || ( empty( $request_status ) && 'all' === $status_name ) ) {\n\t\t\t\t$status_list_item = '<li class=\"%1$s\"><strong>%3$s</strong> (%4$d)</li>';\n\t\t\t} else {\n\t\t\t\t$status_list_item = '<li class=\"%1$s\"><a href=\"%2$s\">%3$s</a> (%4$d)</li>';\n\t\t\t}\n\n\t\t\t$status_filter_url = ( 'all' === $status_name ) ? remove_query_arg( 'status' ) : add_query_arg( 'status', $status_name );\n\t\t\t$status_list_items[] = sprintf( $status_list_item, esc_attr( $status_name ), esc_url( $status_filter_url ), esc_html( ucfirst( $status_name ) ), absint( $count ) );\n\t\t}\n\n\t\tif ( $status_list_items ) {\n\t\t\techo '<ul class=\"subsubsub\">';\n\t\t\techo implode( \" | \\n\", $status_list_items );\n\t\t\techo '</ul>';\n\t\t}\n\t}", "title": "" }, { "docid": "9d5b631401d30f718962b0444c427f71", "score": "0.6640263", "text": "function getFilterHTML() {\n\t\treturn parent::getFilterHTML() . '<div style=\"height: 20px;\"></div>' .\n\t\t$this->getAccessControlHTML() .\n\n\t\t(($GLOBALS['we_doc']->ContentType==\"folder\") ? ('<div style=\"height: 20px;\"></div>' . $this->getFolderApplyHTML()) : \"\");\n\t}", "title": "" }, { "docid": "c5c4b2719a1f10a45ea7d7a4401cc39c", "score": "0.65801555", "text": "protected function display_filter_by_status() {\n\t\t$this->status_counts = $this->store->action_counts();\n\t\tparent::display_filter_by_status();\n\t}", "title": "" }, { "docid": "adf8fd124a46c03db479d5197aa52fa1", "score": "0.64707726", "text": "public function render()\n {\n\n $this->setUp();\n \n $html = '';\n $html .= $this->renderFilterArea();\n \n return $html;\n \n }", "title": "" }, { "docid": "952da0970f036d1198198bd4822a0b2b", "score": "0.644075", "text": "private function getFilterButton()\n {\n try {\n $rss = new RSSFeed();\n $rss->setMaxEntries(1);\n \n $html = new HTML();\n\n // Initialize the auto update class\n $autoUpdate = new phpidsAutoupdate($this->_phpidsLibPath, $this->_translationClassName);\n \n // Open the div element, get the update state and close the div\n $result = \"<div id=\\\"FilterUpdate\\\">\\n\"\n .$autoUpdate->showVersionStatus('onclick=\"updateFilter();\"')\n .\"</div>\\n\";\n\n } catch (Exception $e) {\n $this->logError($e);\n }\n\n return $result;\n }", "title": "" }, { "docid": "71fd8ba654edfdf7b3f833a5279529a5", "score": "0.6428313", "text": "function getStatusFilter()\n {\n return $this->__statusfilter ;\n }", "title": "" }, { "docid": "3daa239d155589f79e68edad5026e0ee", "score": "0.6293559", "text": "function viewuserFilter()\n {\n return array(\"status='active'\");\n }", "title": "" }, { "docid": "b754bf9ee41387cd2dd8c482abe54b13", "score": "0.62894064", "text": "private function statusFilter($selected)\n {\n\n // Remove drafts from the default status list.\n $info = array(\n 1=>array('id'=>1,'title'=>'Draft','color'=>'#f0ad4e','opacity'=>'0.5','zindex'=>'101','class'=>'warning'),\n 2=>array('id'=>2,'title'=>'Under Review','color'=>'#f0ad4e','opacity'=>'0.5','zindex'=>'101','zindex'=>'102','class'=>'warning'),\n 3=>array('id'=>3,'title'=>'Revision Requested','color'=>'#d9534f','opacity'=>'0.05','zindex'=>'103','class'=>'danger'),\n 4=>array('id'=>4,'title'=>'Approved','color'=>'#5cb85c','opacity'=>'0.75','zindex'=>'109','class'=>'success'),\n 5=>array('id'=>5,'title'=>'Archived','color'=>'#525252','opacity'=>'0.75','zindex'=>'105','class'=>'inverse')\n );\n\n unset($info[1]);\n\n $html = label_filter(array('object'=>$this->datatable,'column'=>7,'function_name'=>'FilterSt',\n 'wrapper_class'=>'filter_status','selector'=>'status','title'=>'Statuses',\n 'selected'=>array(2, 3),'info_array'=>$info));\n\n return $html;\n }", "title": "" }, { "docid": "8bdf8ba3611f216b81d974a41e41f6d5", "score": "0.62279004", "text": "public function showStatus()\n {\n switch ($this->status) {\n case 0:\n return '<span class=\"badge badge-secondary\">Not Posted</span>';\n case 1:\n return '<span class=\"badge badge-success\">Posted</span>';\n case 2:\n return '<span class=\"badge badge-danger\">Hidden</span>';\n }\n }", "title": "" }, { "docid": "f087499fcf7c744df7ce0827c5f84c4f", "score": "0.6127744", "text": "public function render()\n {\n return view('components.account.filters');\n }", "title": "" }, { "docid": "c827c590f8e468e1a3c299f8021d0031", "score": "0.6119778", "text": "function _commander_front_get_prompt_status_html($html) {\n// strip_tags($status)\n return '<div id=\"commander-prompt-status\">' . $html . '</div>';\n}", "title": "" }, { "docid": "312054de516fbe86a8ea17c6013e3d33", "score": "0.6091581", "text": "public function renderFilterArea()\n {\n\n $buttonBuilder = WgtButtonBuilder::getDefault();\n $html = '<div class=\"right inner\" >'.$buttonBuilder->buildButtons($this->filters).'</div>';\n \n return $html;\n \n }", "title": "" }, { "docid": "78f7af65e28072204c505392560f5c2e", "score": "0.6010189", "text": "public function filterListAction()\n {\n return $this->render(\n 'SuluResourceBundle:Template:filter.list.html.twig'\n );\n }", "title": "" }, { "docid": "1e90acb1b5fc0dc8fee7c84fe27c3c2b", "score": "0.59765697", "text": "public function render() {\n\t\t$status = parent::getStatus();\n\n\t\t$meta = [\n\t\t\t'status' => $status >= 200 && $status < 300 ? 'ok' : 'failure',\n\t\t\t'statuscode' => $this->getOCSStatus(),\n\t\t\t'message' => $status >= 200 && $status < 300 ? 'OK' : $this->statusMessage,\n\t\t];\n\n\t\tif ($this->itemsCount !== null) {\n\t\t\t$meta['totalitems'] = $this->itemsCount;\n\t\t}\n\t\tif ($this->itemsPerPage !== null) {\n\t\t\t$meta['itemsperpage'] = $this->itemsPerPage;\n\t\t}\n\n\t\treturn $this->renderResult($meta);\n\t}", "title": "" }, { "docid": "351c9582c6ad190cd07c407000c21fa4", "score": "0.5965605", "text": "public function renderFilters();", "title": "" }, { "docid": "ff7c11d38f77099efc483b1926a32c17", "score": "0.5964867", "text": "public function HTMLFilter() {\n\t\treturn 'text/html';\n\t}", "title": "" }, { "docid": "a64c5c86dc2e964b9610dd89e820984b", "score": "0.5955959", "text": "public function status() {\n\t\treturn $this->zap->request($this->zap->base . 'ajaxSpider/view/status/')->{'status'};\n\t}", "title": "" }, { "docid": "1b19b91ba565b1c23bc32be0438287a2", "score": "0.59418404", "text": "function _show_filter () {\n\t\t$replace = array(\n\t\t\t'save_action'\t=> './?object=forum&action='.$_GET['action'].'&id='.$_GET['id']._add_get(array('page')),\n\t\t);\n\t\t// Process boxes\n\t\tforeach ((array)$this->_boxes as $item_name => $v) {\n\t\t\t$replace[$item_name.'_box'] = $this->_box($item_name, $_SESSION[$this->_filter_name][$item_name]);\n\t\t}\n\t\treturn tpl()->parse('forum'.'/online_users/filter', $replace);\n\t}", "title": "" }, { "docid": "2d1d1bdb8d6a9c2ac694f141c0ee6145", "score": "0.592802", "text": "public function render() {\n $STATUS_COLOR = [\n \"WAITING_FOR_CHIEF\" => \"is-warning\",\n \"WAITING_FOR_STAFF\" => \"is-light\",\n \"FINISHED\" => \"is-success\",\n ];\n $STATUS_FRIENDLY = [\n \"WAITING_FOR_CHIEF\" => \"En attente du chef de projet\",\n \"WAITING_FOR_STAFF\" => \"En attente du staff\",\n \"FINISHED\" => \"Fini\",\n ];\n return view('components.task-notation-status', ['status' => $this->status, 'color' => $STATUS_COLOR[$this->status], 'friendly' => $STATUS_FRIENDLY[$this->status]]);\n }", "title": "" }, { "docid": "cc5179d9743b462a36a437832e32175b", "score": "0.5834369", "text": "private function _get_status_bar()\r\n\t{\r\n \t$from = $this->current_start ? $this->current_start+1 : '1';\r\n \tif($from + $this->limit <= $this->total_rows)\r\n \t{\r\n \t $to = $from + $this->limit - 1;\r\n \t}\r\n \telse \r\n \t{\r\n \t $to = $this->total_rows;\r\n \t}\r\n\t\tif($this->total_rows == 0)\r\n\t\t{\r\n\t\t\t$from = $to = 0;\r\n\t\t}\r\n \t$txt = str_replace('<FROM>',$from,PAGINATION_SHOWING);\r\n \t$txt = str_replace('<TO>',$to,$txt);\r\n \t$txt = str_replace('<TOTAL>',$this->total_rows,$txt);\r\n \t$status = '<div class=\"pagination_showing\">'.$txt.'</div>';\r\n \treturn $status;\r\n\t}", "title": "" }, { "docid": "da44415e56d2346b4ed97ae2529807a9", "score": "0.5829141", "text": "function GetStatusHTML($input)\n\t{\n\t\t$output = \"\";\n\t\tswitch($input)\n\t\t{\n\t\t\tcase \"Cancelled\":\n\t\t\t\t$output = \"<label class='label label-danger statusLabelCancelledTrue'><i class='glyphicon glyphicon-exclamation-sign'></i>&nbsp;Event Cancelled!</label>\";\n\t\t\tbreak;\n\t\t\tcase \"Moved\":\n\t\t\t\t$output = \"<label class='label label-danger statusLabelMovedTrue'><i class='glyphicon glyphicon-transfer'></i>&nbsp;Event Moved!</label>\";\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$output = \"\";\n\t\t\tbreak;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "6d1dbd4f50a9aaa0907f43d1ca324f3d", "score": "0.58172846", "text": "protected function RenderStatus() {\n\t$out =\n\t $this->IsRelease()?'RELEASE':'HOLD'\n\t .' '\n\t .($this->Status_DoHoldRestock()?'<span state=active>+':'<span state=inactive>-')\n\t .'RSTK</span> '\n\t .($this->Status_DoHoldCharge()?'<span state=active>+':'<span state=inactive>-')\n\t .'CHG</span> '\n\t .($this->Status_DoContact()?'<span state=active>+':'<span state=inactive>-')\n\t .'CONT</span> '\n\t .($this->Status_DoExamine()?'<span state=active>+':'<span state=inactive>-')\n\t .'EXAM</span> '\n\t .' &rarr; '\n\t ;\n \n\t// then the human-readable description (which can be more confusing sometimes):\n\tif ($this->IsActive()) {\n\t $out .=\n\t ($this->Status_DoHoldRestock()?'[hold restock]':NULL)\n\t .($this->Status_DoHoldCharge()?'[hold charge]':NULL)\n\t .($this->Status_DoContact()?'[do contact]':NULL)\n\t .($this->Status_DoExamine()?'[do examine]':NULL)\n\t ;\n\t} else {\n\t $out .= '(all released)';\n\t}\n\treturn $out;\n }", "title": "" }, { "docid": "7b01ebd03e69c82498cb31fb9bae9dbc", "score": "0.58014315", "text": "function filters_approved()\n\t{\n\t\t$this->load->view('system/sha/filters_approved');\n\t}", "title": "" }, { "docid": "e8ceebbe3cdba8b951ced7057d6b1ef7", "score": "0.57997566", "text": "public function StatusLabel()\n {\n $html = DBHTMLText::create();\n\n if (strpos($this->Status, FlowStatus::COMPLETED) !== false) {\n $html->setValue('<span style=\"color: #449d44;\">' . $this->Status . '</span>');\n } elseif (strpos($this->Status, FlowStatus::FAILED) !== false) {\n $html->setValue('<span style=\"color: #ff0000;\">' . $this->Status . '</span>');\n } else {\n $html->setValue('<span style=\"color: #ec971f;\">' . $this->Status . '</span>');\n }\n\n return $html;\n }", "title": "" }, { "docid": "c55a6c253e02120688fe5d30f105f6b6", "score": "0.57593286", "text": "public function statusBadgeHtml()\n {\n switch ($this->status) {\n case 0:\n return array('html' => '<i class=\"far fa-clock\"></i>&nbsp;Pending', 'class' => 'orange white-text');\n break;\n case 1:\n return array('html' => '<i class=\"fas fa-check\"></i>&nbsp;Accepted', 'class' => 'green white-text');\n break;\n case 2:\n return array('html' => '<i class=\"fas fa-times\"></i>&nbsp;Rejected', 'class' => 'red white-text');\n break;\n case 3:\n return array('html' => '<i class=\"fas fa-times\"></i>&nbsp;Withdrawn', 'class' => 'grey white-text');\n break;\n case 4:\n return array('html' => 'Deleted', 'class' => 'grey white-text');\n break;\n default:\n return $this->status;\n }\n }", "title": "" }, { "docid": "8ecf03edf15e372414c90bc34e56fc4e", "score": "0.57507277", "text": "public function render()\n {\n return view('components.filters.search');\n }", "title": "" }, { "docid": "b4b6cfb9e23d1bec816deeb1a7238324", "score": "0.57316077", "text": "public function lblStatus()\n {\n return view('viewers.work-order.labels.status', ['workOrder' => $this->entity])->render();\n }", "title": "" }, { "docid": "7e58738f27ae569f772736e5038a5624", "score": "0.5717914", "text": "function getStatusFilterValue()\n {\n return $this->__statusfiltervalue ;\n }", "title": "" }, { "docid": "e03e1bfb8ca09b6fb0f868e9200a0f2a", "score": "0.5700149", "text": "protected function renderFilterCellContent()\n {\n return '<a class=\"clear-filters\" href=\"#\"><i class=\"fa fa-refresh\"></i></a>';\n }", "title": "" }, { "docid": "25cf42409a2036fc0ac9261474559b84", "score": "0.56899536", "text": "public function getfilterdata(){\n\t\t$status = $this->input->post('status');\n\t\t$data['result'] = $this->dashboard_model->getfilterdata($status);\t\t\n\t\treturn $this->load->view('users/resultdata',$data);\n\t}", "title": "" }, { "docid": "f87985ea36a97015887134ba43ea99e5", "score": "0.56569797", "text": "function status(){\n\t\t$crud = new grocery_CRUD();\n\n\t\t//$crud->set_theme('datatables');\n\t\t$crud->set_table('status');\n\t\t$output = $crud->render();\n\t\t$this->_blog_output($output);\n\n\t}", "title": "" }, { "docid": "2e4c1701956559f53ec49929a134bf58", "score": "0.5648913", "text": "public static function traceHtml($filter=false)\n {\n echo nl2br(self::traceInternal($filter));\n }", "title": "" }, { "docid": "80a7311bef3351bed790b99378fe7d88", "score": "0.5636255", "text": "function vh_get_auto_clean_last_status_render($status) {\r\n if (!$status) {\r\n return '-';\r\n }\r\n\r\n if ($status == 'wp error') {\r\n return '<span style=\"color: red;\">清洗失败</span>';\r\n }\r\n\r\n if ($status['code'] >= 300) {\r\n return '<span style=\"color: red;\">清洗失败(' . $status['message'] . ')</span>';\r\n } else {\r\n return '<span style=\"color: green;\">清洗成功</span>';\r\n }\r\n}", "title": "" }, { "docid": "9d86fe7317b6bb3eb2b5037afaf06cf8", "score": "0.56079334", "text": "public function getFilters(): array\n {\n return [\n new \\Twig_SimpleFilter('formatAlbumStatus', [$this, 'formatAlbumStatusFilter'], ['pre_escape' => 'html', 'is_safe' => ['html']])\n ]; \n }", "title": "" }, { "docid": "7fb8fba3d415ac031704b3430264701b", "score": "0.5579713", "text": "public function status_filter( $which ) {\n $id = 'wpuf_user_approve_filter-' . $which;\n\n $filter_button = submit_button( __( 'Filter Users by Status', 'wpuf-user-approve' ), 'button', 'wpuf-status-query-submit', false, array( 'id' => 'wpuf-status-query-submit' ) );\n $filtered_status = $this->selected_status();\n ?>\n\n <label class=\"screen-reader-text\" for=\"<?php echo $id ?>\"><?php _e( 'View all users', 'wpuf-user-approve' ); ?></label>\n <select id=\"<?php echo $id ?>\" name=\"<?php echo $id ?>\" style=\"float: none; margin: 0 0 0 15px;\">\n <option value=\"\"><?php _e( 'View all users', 'new-user-approve' ); ?></option>\n <?php foreach ( $this->get_valid_statuses() as $status ) : ?>\n <option value=\"<?php echo esc_attr( $status ); ?>\"<?php selected( $status, $filtered_status ); ?>><?php echo esc_html( ucfirst( $status ) ); ?></option>\n <?php endforeach; ?>\n </select>\n\n <style>\n #wpuf-status-query-submit {\n float: right;\n margin: 0 0 0 5px;\n }\n </style>\n <?php\n }", "title": "" }, { "docid": "33e817aa5ba2db5932659d0fd41ca4c2", "score": "0.55600464", "text": "function getFolderApplyHTML() {\n\t\t$we_button = new we_button();\n\t\t$_ok_button = $we_button->create_button(\"ok\", \"javascript:if (_EditorFrame.getEditorIsHot()) { \" . we_message_reporting::getShowMessageCall($GLOBALS['l_customerFilter']['apply_filter_isHot'], WE_MESSAGE_INFO) . \" } else { we_cmd('copyWeDocumentCustomerFilter', '\" . $GLOBALS['we_doc']->ID . \"', '\" . $GLOBALS['we_doc']->Table . \"');}\");\n\n\t\treturn \"\n\t\t\t<div class=\\\"weMultiIconBoxHeadline paddingVertical\\\">\" . $GLOBALS['l_customerFilter']['apply_filter'] . \"</div>\n\t\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td>\" . htmlAlertAttentionBox($GLOBALS['l_customerFilter']['apply_filter_info'],2,432,false) . \"</td>\n\t\t\t\t<td style=\\\"padding-left:17px;\\\">\" . $_ok_button . \"</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\";\n\n\t}", "title": "" }, { "docid": "6041f8e7f5cfd5de277434e3d69555ec", "score": "0.55326635", "text": "public function getStatusText()\n {\n return 'entity.resource.field.status.' . $this->status;\n }", "title": "" }, { "docid": "c266dbf6543ac5b2ccb82b9b526ce1f4", "score": "0.55228525", "text": "public function formatAlbumStatusFilter(string $status): string\n {\n $class = $this->getAlbumStatusClass($status);\n $translation = $this->translator->trans('status.' . $status, [], 'albums');\n \n return '<span class=\"' . $class . '\">' . $translation . '</span>';\n }", "title": "" }, { "docid": "f44ffd02d035ebc4308165fa01c89312", "score": "0.551689", "text": "static function filterServiceStatus($a,$b,$c,$d)\n {\n $img =\"\";\n if(isset($d['0'])){\n switch($d[0]){\n case 'Restart' : $img = ('images/status_restarting.png'); break;\n case 'Stop' : $img = ('images/lists/off.png'); break;\n case 'Start' : $img = ('images/lists/on.png'); break;\n }\n }\n if(!empty($img)){\n return('<img src=\\''.$img.'\\'>');\n }\n return(\"&nbsp;\"); \n }", "title": "" }, { "docid": "95181fdf279a6e62083d5f067e0fa160", "score": "0.5510166", "text": "public function htmlCartStatus()\n\t{\n\t\treturn $this->includeLayout('view/cart/status.html', array('Cart' => Cart::getCart()));\n\t}", "title": "" }, { "docid": "21dafcca92ee8e7ac41d24119589b40a", "score": "0.55002683", "text": "function OutputStatus($STATUS) {\r\n if ($STATUS == 0) {\r\n return '<div class=\"offline\">Offline</div>';\r\n } elseif ($STATUS == 1) {\r\n return '<div class=\"online\">Online</div>';\r\n } else {\r\n return '<div class=\"degraded\">Degraded</div>';\r\n }\r\n }", "title": "" }, { "docid": "b47dc88abf9d65af02512caafe40f735", "score": "0.54872465", "text": "public function render() {\n parent::render();\n\n $oLogEntry = oxNew( \"fcpotransactionstatus\" );\n\n $sOxid = oxConfig::getParameter( \"oxid\");\n if ( $sOxid != \"-1\" && isset( $sOxid)) {\n // load object\n $oLogEntry->load( $sOxid);\n $this->_aViewData[\"edit\"] = $oLogEntry;\n }\n\n $this->_aViewData['sHelpURL'] = 'http://www.payone.de';\n\n return $this->_sThisTemplate;\n }", "title": "" }, { "docid": "9ffdd41dfc9502c996c0f4d2fe6d214b", "score": "0.54849917", "text": "protected function renderFilterCellContent()\n\t{\n\t\treturn Html::a('<span class=\"glyphicon glyphicon-refresh\"></span>', ['/' . \\Yii::$app->request->pathInfo], [\n\t\t\t'title' => Yii::t('admin', 'Reset filter'),\n\t\t\t'data-toggle' => 'tooltip',\n\t\t\t'class' => 'btn btn-flat btn-block btn-primary resetFilter',\n\t\t]);\n\t}", "title": "" }, { "docid": "7511b1d78288dceb8917a3d5c3c0b48b", "score": "0.5472075", "text": "public function get_views()\r\n {\r\n $current_url = $this->get_current_url();\r\n $current_url = remove_query_arg('percentage', $current_url);\r\n\r\n $status_links = array(\r\n \"all\" => __(\"<a href='\" . $current_url . \"'>All</a>\"),\r\n \"cat-a\" => __(\"<a href='\" . esc_url(add_query_arg(['percentage' => '10'], $current_url)) . \"'>Category A</a>\"),\r\n \"cat-b\" => __(\"<a href='\" . esc_url(add_query_arg(['percentage' => '20'], $current_url)) . \"'>Category B</a>\"),\r\n \"cat-c\" => __(\"<a href='\" . esc_url(add_query_arg(['percentage' => '30'], $current_url)) . \"'>Category C</a>\"),\r\n );\r\n\r\n return $status_links;\r\n }", "title": "" }, { "docid": "00adf1571df231ec8c4f1c8fc110c88a", "score": "0.54717666", "text": "function display( $p_filter_value ) {\n //require_api( 'logging_api.php' );\n //log_event(LOG_FILTERING, \"display( $p_filter_value )\");\n\n $query = \"SELECT name, reference FROM `codev_command_table` WHERE id = \" . db_param() ;\n $result = db_query($query, array( $p_filter_value));\n $row = db_fetch_array( $result );\n $display = /* $row['reference'] . \" :: \" . */ $row['name'];\n\n return $display;\n }", "title": "" }, { "docid": "bb5e32361c7d0b01ae9719840051383a", "score": "0.5417031", "text": "public function displayHistoryStatus()\n\t{\n\t\t$historyStatuses = json_decode($this->status_history, true);\n\t\t$displayHistoryStatus = \"\";//Str status history\n\t\tif(is_array($historyStatuses) || is_object($historyStatuses)){\n\t\t\t$historyStatuses = (array) $historyStatuses;\n\t\t\t$statusOptions = $this->statusOptions();\n\t\t\tforeach($statusOptions as $key=>$label){\n\t\t\t\tif(isset($historyStatuses[$key])){\n\t\t\t\t\t$displayHistoryStatus .= date(\"d/m/Y, H:i\", strtotime($historyStatuses[$key])).\" => \".$label.\"<br/>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $displayHistoryStatus;\n\t}", "title": "" }, { "docid": "6cc23bbdcbe408e467a62c760f2baa1b", "score": "0.54031897", "text": "public function searchResultHtml()\n\t{\n\t\treturn \\IPS\\Theme::i()->getTemplate( 'search', 'core', 'front' )->contentReview( $this );\n\t}", "title": "" }, { "docid": "0449ad94c45d4c97112eccfc4ae23e23", "score": "0.5395849", "text": "public function orderStatusDescription(){\n\t \n\t $html = $this->statusColor();\n\t if($this->status =='ACTIVE' || $this->status =='HOLD'|| $this->status =='RTF') {\n\t\t $html .= '<br><span>Start: </span>'\n\t\t\t\t . date('d-M-Y', strtotime($this->lastStatusChange()->created))\n\t\t\t\t . '<br>Due&nbsp;:&nbsp;'.date('d-M-Y', strtotime($this->date_due));\n\t\t}\n\n\t\treturn $html;\n }", "title": "" }, { "docid": "03bfcb9b82c0e0f4a8d07273759bc8c6", "score": "0.53860116", "text": "public function getStatusText(): string;", "title": "" }, { "docid": "29b34d530d679b1fae9eb6ec6a5a685e", "score": "0.5374118", "text": "function statusListItem($controller, $currentStatus, $status){\n \n $active = $currentStatus == 'all' ? 'class=\"active\"' : '';\n $url = base_url().$controller;\n $statusReturn = '<ul class=\"an-filter-status\"><li '.$active.'><a href=\"'.$url.'\">All</a></li>';\n \n if($status){\n foreach($status as $value){\n $active = $currentStatus == $value ? 'class=\"active\"' : '';\n $url = base_url().$controller.'/'.$value;\n $statusReturn .= '<li '.$active.'><a href=\"'.$url.'\">'.$value.'</a></li>'; \n }\n }\n\n $statusReturn .= '</ul>';\n\n return $statusReturn;\n\n}", "title": "" }, { "docid": "7d780097320609caf974fcad224438a0", "score": "0.5368644", "text": "protected function renderFilterCellContent(): string\n {\n $items = D3lDefinitionDictionary::getList($this->sysCompanyId, $this->modelClass);\n\n if($this->filterNotAssignedLabel){\n $list = $items;\n foreach($list as $listKey => $listLabel){\n $items['!' . $listKey] = '! ' . $listLabel;\n }\n }\n return D3LabelList::getAsDropdown($items, $this->filterListboxOptions, $this->model);\n }", "title": "" }, { "docid": "c23a746e08fb25aadd76f00a00bc3d5c", "score": "0.53645265", "text": "function xicore_ajax_get_host_status_misc_html($args = null)\n{\n $hostname = grab_array_var($args, \"hostname\", \"\");\n $host_id = grab_array_var($args, \"host_id\", -1);\n\n if (!is_authorized_for_host(0, $hostname)) {\n return _(\"You are not authorized to access this feature. Contact your system administrator for more information, or to obtain access to this feature.\");\n }\n\n $auth_command = is_authorized_for_host_command(0, $hostname);\n\n // Get host status\n $args = array(\n \"cmd\" => \"gethoststatus\",\n \"host_id\" => $host_id\n );\n $xml = get_xml_host_status($args);\n\n $output = '';\n if ($xml) {\n $notes = strval($xml->hoststatus->notes);\n\n if (!empty($notes)) {\n $output = '<div class=\"status-misc-top\">' . encode_form_val($notes) . '</div>';\n }\n\n // Notes URL icon/link HTML\n if (!empty($xml->hoststatus->notes_url)) {\n $url = str_replace('&amp;', '&', encode_form_val(xicore_replace_macros($xml->hoststatus->notes_url, $xml->hoststatus)));\n $output .= '<div class=\"status-misc\"><a href=\"' . $url . '\" target=\"_new\"><img src=\"'.theme_image('page_white_go.png').'\"></a> <a href=\"' . $url . '\" target=\"_new\">' . _('Notes URL') . '</a></div>';\n }\n\n // Action URL icon/link HTML\n if (!empty($xml->hoststatus->action_url)) {\n $url = str_replace('&amp;', '&', encode_form_val(xicore_replace_macros($xml->hoststatus->action_url, $xml->hoststatus)));\n $output .= '<div class=\"status-misc\"><a href=\"' . $url . '\" target=\"_new\"><img src=\"'.theme_image('resultset_next.png').'\"></a> <a href=\"' . $url . '\" target=\"_new\">' . _('Actions URL') . '</a></div>';\n }\n }\n\n if (empty($output)) {\n $output = '<div class=\"status-misc-top\">' . _('No notes or misc info') . '</div>';\n }\n\n return $output;\n}", "title": "" }, { "docid": "c4821b51bbf240dad620ffe51b4e7870", "score": "0.5361195", "text": "function abp01_get_status_text($text, $status) {\n\t$cssClass = 'abp01-status-neutral';\n\tswitch ($status) {\n\t\tcase ABP01_STATUS_OK:\n\t\t\t$cssClass = 'abp01-status-ok';\n\t\tbreak;\n\t\tcase ABP01_STATUS_ERR:\n\t\t\t$cssClass = 'abp01-status-err';\n\t\tbreak;\n\t\tcase ABP01_STATUS_WARN:\n\t\t\t$cssClass = 'abp01-status-warn';\n\t\tbreak;\n\t}\n\n\treturn '<span class=\"abp01-status-text ' . $cssClass . '\">' . $text . '</span>';\n}", "title": "" }, { "docid": "376a9f58a14d9caad456e390d0e8a085", "score": "0.5357115", "text": "public function statusColor() {\n\t\t\n\t\t// define the status colours\n\t\t$status_colour_map = array(\n\t\t\t'PENDING' => 'blue',\n\t\t\t'ACTIVE' => 'green',\n\t\t\t'RTF' => 'magenta',\n\t\t\t'HOLD' => 'orange',\n\t\t\t'CANCELLED' => 'red',\n\t\t);\n\t\t\n\t\t$status = $this->status();\n\t\t$colour = isset($status_colour_map[$status]) ? $status_colour_map[$status] : 'black';\n\t\t$html = \"Order <span style=\\\"color:{$colour}\\\">{$status}</span>\";\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "8addf647fdfe72c5332b4c24b143eceb", "score": "0.53500724", "text": "public function statusAction()\n {\n \t$event = Mage::getModel('eximbay/event')\n \t\t\t->setEventData($this->getRequest()->getParams());\n \t\n \tMage::log($this->getRequest()->getParams(), null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n \t\n \t$message = $event->processStatusEvent();\n \t$this->getResponse()->setBody($message);\n }", "title": "" }, { "docid": "f50f50a3fcacfc302cf9e2f291d683cc", "score": "0.53444463", "text": "public function getNameViews()\n {\n $CI = &get_instance();\n $template = $CI->config->item('rpt_template') . \"filters/\";\n foreach($this->functionTypes as $filter => $value){\n $this->viewFilsters[$filter] = $template . $filter;\n }\n return $this->viewFilsters;\n }", "title": "" }, { "docid": "81d76e210679428604a2e02f2e02b466", "score": "0.53414214", "text": "public function index_get_html(){\r\n \t$view=(empty($_GET['v'])?'index':$_GET['v']);\r\n\t\t$this->logic = new \\Culture\\Logic\\IndexLogic ();\r\n\t\t$res = $this->logic->get_class ();\r\n\t\tif (is_array ( $res )) {\r\n\r\n\t\t\t$cate['status'] = 1;\r\n\t\t\t$cate['data'] = $res;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$cate['status'] = 0;\r\n\t\t\t$cate['msg'] = $this->logic->getError ();\r\n\r\n\t\t}\r\n\t\t$this->assign('cate',json_encode($cate));\r\n\t\t$this->display($view);\r\n }", "title": "" }, { "docid": "28385d118f1fbd23876caebae9274548", "score": "0.5340232", "text": "public function getTitle()\n {\n // return $this->data->{'status'}==\"PUBLISHED\"?'Pending':'Publish';\n return 'VIEW';\n }", "title": "" }, { "docid": "a46c3b44166ed8a087fbbd8dd4d6d291", "score": "0.533988", "text": "function showStatus($val)\n {\n if ($val == \"Y\")\n {\n $out = \"<font color=darkgreen>Active</font>\";\n }\n else\n {\n $out = \"<font color=red>Inactive</font>\";\n }\n return $out;\n }", "title": "" }, { "docid": "4098c8dbabe4a4789d4e4234de9dad58", "score": "0.5338195", "text": "function getStatusText() {\n \t$text = '--';\n \tif(!isEmptyString($this->getStatus())){\n \t\t$values = getStatusValues();\n \t\t$text = $values[$this->getStatus()];\n \t}\n \treturn $text;\n }", "title": "" }, { "docid": "66b1650e43ae868f0c7ecb1c18b6812f", "score": "0.5331265", "text": "public function getStatusText()\n {\n return self::STATUSES[$this->status];\n }", "title": "" }, { "docid": "4c7f5a6be62ed355e86d2b03b6db4876", "score": "0.53298825", "text": "public function showFiltersAction()\n\t{\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$filters = $user->getFilters();\n\t\t$fR = 0;\n\t\t$oR = 0;\n\t\t$aMax = 0;\n\t\t$aMin = 0;\n\t\t$sex = 0;\n\t\tif(isset($filters))\n\t\t{\n\t\t\t$isSet = true;\n\t\t\t$fR = $filters->getFriendRadius();\n\t\t\t$oR = $filters->getOtherRadius();\n\t\t\t$aMax = $filters->getAgeMax();\n\t\t\t$aMin = $filters->getAgeMin();\n\t\t\t$setSex = $filters->getFilterSex();\n\t\t\tif(isset($setSex))\n\t\t\t{\n\t\t\t\tif($setSex == 0)\n\t\t\t\t\t$sex = \"muž\";\n\t\t\t\telse if($setSex == 1)\n\t\t\t\t\t$sex = \"žena\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$sex = \"neuvedeno\";\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$isSet = false;\n\t\t}\n\t\treturn $this->render('ZSIZizenBundle:User:showFilters.html.twig',array('isSet' => $isSet, 'fR' => $fR, 'oR' => $oR, 'aMax' => $aMax, 'aMin' => $aMin, 'sex' => $sex));\t\t\t\n\t}", "title": "" }, { "docid": "db25b87eca1ca0b758fd89a6b0193585", "score": "0.5322359", "text": "public function get_status();", "title": "" }, { "docid": "c12f42554cb520393f61761b5b08e209", "score": "0.5322356", "text": "public function listStatus() {\n \n return array('inactive' => 'Inactive',\n 'active' => 'Active',\n // 'deleted' => 'Deleted', Don't show this to the user\n 'banned' => 'Banned');\n }", "title": "" }, { "docid": "c52821c90a640063c7ef8904b1d649fc", "score": "0.5319513", "text": "public function getCustomHTML()\n {\n return implode(\"\\n\", $this->custom_html_views);\n }", "title": "" }, { "docid": "ecd32655eb56f134c7f1bbfc53290bd7", "score": "0.53167385", "text": "function xicore_ajax_get_host_status_state_summary_html($args = null)\n{\n $hostname = grab_array_var($args, \"hostname\", \"\");\n $host_id = grab_array_var($args, \"host_id\", -1);\n $hide_details = grab_array_var($args, \"hide_details\", get_option(\"hide_object_details\", 0));\n\n if (!is_authorized_for_host(0, $hostname)) {\n return _(\"You are not authorized to access this feature. Contact your Nagios XI administrator for more information, or to obtain access to this feature.\");\n }\n\n // Get host status\n $args = array(\n \"cmd\" => \"gethoststatus\",\n \"host_id\" => $host_id\n );\n $xml = get_xml_host_status($args);\n\n $output = '';\n if ($xml == null) {\n $output .= \"No data\";\n } else {\n\n $img = theme_image(\"nagios_unknown_large.png\");\n $imgalt = _(\"Unknown\");\n\n $current_state = intval($xml->hoststatus->current_state);\n $has_been_checked = intval($xml->hoststatus->has_been_checked);\n $status_text = $xml->hoststatus->status_text;\n $status_text_long = strval($xml->hoststatus->status_text_long);\n $status_text_long = str_replace(\"\\\\n\", \"<br />\", $status_text_long);\n $status_text_long = str_replace(\"\\n\", \"<br />\", $status_text_long);\n\n if (get_option('allow_status_html') == true) {\n $status_text = html_entity_decode($status_text);\n $status_text_long = html_entity_decode($status_text_long);\n }\n\n switch ($current_state) {\n case 0:\n $img = theme_image(\"nagios_ok_large.png\");\n $statestr = _(\"Up\");\n $imgalt = $statestr;\n break;\n case 1:\n $img = theme_image(\"nagios_critical_large.png\");\n $statestr = _(\"Down\");\n $imgalt = $statestr;\n break;\n case 2:\n $img = theme_image(\"nagios_critical_large.png\");\n $statestr = _(\"Unreachable\");\n $imgalt = $statestr;\n break;\n default:\n break;\n }\n if ($has_been_checked == 0) {\n $img = theme_image(\"nagios_pending_large.png\");\n $statestr = _(\"Pending\");\n $imgalt = $statestr;\n $status_text = _(\"Host check is pending...\");\n }\n\n $output .= '<div class=\"well\"><div class=\"hoststatusdetailinfo summary-status\">';\n $imgwidth = \"24\";\n $state_icon = \"<img src='\" . $img . \"' alt='\" . $imgalt . \"' title='\" . $imgalt . \"' width='\" . $imgwidth . \"'>\";\n $output .= '<div class=\"hoststatusdetailinfoimg\">' . $state_icon . '</div><div class=\"hoststatusdetailinfotext\">' . $status_text . '</div>';\n\n if (!empty($status_text_long)) {\n $hide = '';\n if ($hide_details) {\n if (isset($_SESSION['show_details'])) {\n $output .= '<div style=\"position: absolute; top: -25px; right: 5px;\"><a class=\"show-details\">'._(\"Hide details\").'</a> <i class=\"fa fa-chevron-down\"></i></div>';\n } else {\n $hide = ' hide';\n $output .= '<div style=\"position: absolute; top: -25px; right: 5px;\"><a class=\"show-details\">'._(\"Show details\").'</a> <i class=\"fa fa-chevron-up\"></i></div>';\n }\n }\n $output .= '<div class=\"hoststatusdetailinfotextlong longtext' . $hide . '\">' . $status_text_long . '</div>';\n }\n\n $output .= '</div></div>';\n }\n\n return $output;\n}", "title": "" }, { "docid": "905ad7b15c310f00d48e14a64c6b625f", "score": "0.5315928", "text": "function printFilterValue( $filter, $value ) {\n\t\t$value = str_replace( '_', ' ', $value );\n\t\t// if it's boolean, display something nicer than \"0\" or \"1\"\n\t\tif ( $value === ' other' ) {\n\t\t\treturn Html::element( 'span', array( 'style' => 'font-style: italic;' ), wfMessage( 'htmlform-selectorother-other' )->text() );\n\t\t} elseif ( $value === ' none' ) {\n\t\t\treturn Html::element( 'span', array( 'style' => 'font-style: italic;' ), wfMessage( 'powersearch-togglenone' )->text() );\n\t\t} elseif ( $filter->fieldDescription->mType === 'Boolean' ) {\n\t\t\t// Use existing MW messages for \"Yes\" and \"No\".\n\t\t\tif ( $value == true ) {\n\t\t\t\treturn wfMessage( 'htmlform-yes' )->text();\n\t\t\t} else {\n\t\t\t\treturn wfMessage( 'htmlform-no' )->text();\n\t\t\t}\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}", "title": "" }, { "docid": "3c1ab4d6d148b0dea1f511f5f9ee0459", "score": "0.53158605", "text": "public function getFilters() : string\n {\n return $this->filters;\n }", "title": "" }, { "docid": "dc7464102c2f3903bbbd3fe1deef08f1", "score": "0.53152364", "text": "function column_status( $item )\n\t{\n\t\t$form = '';\n\t\t\n\t\t$form .= '<form class=\"connections-synch-form\">';\n\t\t\n\t\t$form .= '<input type=\"hidden\" name=\"post-id\" value=\"'.$item['post-id'].'\" />';\n\t\t$form .= '<input type=\"hidden\" name=\"url\" value=\"'.$item['url'].'\" />';\n\t\t\n\t\t$form .= '<div class=\"check-status\"></div>';\n\t\t$form .= '<div class=\"synch-status\"></div>';\n\t\t\n\t\t$form .= '</form>';\n\t\t\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "39d6aa5adb65169d32e1eea6300bff97", "score": "0.5310372", "text": "public function overviewAction(Request $request)\n {\n $filterForm = $this->createForm(new ProjectStatusFilterType());\n $filterForm->handleRequest($request);\n\n $filter = $this->get('jumph_project.project_status_filter');\n\n return $this->render(\"JumphProjectBundle:ProjectStatus:overview.html.twig\", array(\n 'filterForm' => $filterForm->createView(),\n 'projectStatuses' => $filter->getPaginatedResults(\n $filterForm,\n $request->query->get('page', 1),\n 15\n )\n ));\n }", "title": "" }, { "docid": "350869c2197e484c0d65e9decbc992f3", "score": "0.52982515", "text": "public function statusForm()\n {\n\n $html = \"<button class=\\\"btn btn-sm btn\\\"></button>\";\n \n return $html;\n }", "title": "" }, { "docid": "cd420020b9921988bc92e31b641bacb6", "score": "0.52918947", "text": "public function getStatusText()\n {\n return (!empty($this->getStatusTexts()[$this->status])) ? $this->getStatusTexts()[$this->status] : '';\n }", "title": "" }, { "docid": "986a2d65facece0d12396421ee2f4165", "score": "0.52891123", "text": "function view_visitors($status)\n\t{\n\t\t$data['title'] = 'Visitors';\n\t\t$data['data'] = $this->main_model->get_visitors($status);\n\t\t$this->load->view('header/header',$data);\n\t\t$this->load->view('content/inner/visitors',$data);\n\t\t$this->load->view('footer/footer');\n\t}", "title": "" }, { "docid": "9ee7838493f48786aab08bed60918926", "score": "0.52816933", "text": "private function getFilters()\n {\n return '->getFilterChain()' . PHP_EOL . '->attach(new StringTrim())' . PHP_EOL . '->attach(new StripTags());';\n }", "title": "" }, { "docid": "ff4dba3cde7d471d0560d590ba703900", "score": "0.52784806", "text": "function check_ma_status_span_display($id){\n// view_audit_findings_blade\n\n\t$f1 = form_001_audit_report::findOrFail($id);\n\n\tif ($f1->for_management_action == 'i' && $f1->receiver == 1 || $f1->for_management_action == 1 && $f1->receiver == 2) {\n\t\t$result = \"none\";\n\t}else{\n\t\t$result = \"inline-block\";\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "4f62923e924c2d8be9a46da10025647d", "score": "0.52451736", "text": "function showfilter()\n\t{\n\t\t$data = $this->tabel->readfilter();\n\t\t$data[\"hslquery\"] = $this->tabel->getfilteredrec($data);\n\n\t\t$data[\"title\"] = \"Input Filter Untuk Active Record\";\n\t\t$data[\"scriptaksi\"] = \"activerecord/active_record/showfilter\";\n\n\t\t$this->load->view(\"activerecord/filter_form\", $data);\n\t}", "title": "" }, { "docid": "752685d1b7d096d1737b6bef0d23e9d5", "score": "0.5241665", "text": "public function index()\n {\n if (\\request()->ajax()) {\n $statuses = Status::withTrashed()->orderBy('type', 'asc');\n return DataTables::eloquent($statuses)\n ->addIndexColumn()\n ->editColumn('name', function (Status $status){\n return \"<label class='label \".$status->background_color.\" label-roundless'>$status->name</label>\";\n })\n ->editColumn('status', function (Status $status) {\n return view('admin.statuses.status', compact('status'))->render();\n })\n ->addColumn('actions', function (Status $status) {\n return view('admin.statuses.actions', compact('status'))->render();\n })\n ->rawColumns(['name', 'status', 'actions'])\n ->toJson();\n }\n\n return view($this->view);\n }", "title": "" }, { "docid": "e952b41cc63bc9847e77ef6e65ef9285", "score": "0.52399844", "text": "public function status($value) {\n\t\tif ($value == 1) {\n\t\t\t$icon = 'ok';\n\t\t\t$class = 'green';\n\t\t} else {\n\t\t\t$icon = 'remove';\n\t\t\t$class = 'red';\n\t\t}\n\t\tif (method_exists($this->Html, 'icon')) {\n\t\t\treturn $this->Html->icon($icon, compact('class'));\n\t\t} else {\n\t\t\tif (empty($this->_View->CroogoHtml)) {\n\t\t\t\t$this->_View->Helpers->load('Croogo.CroogoHtml');\n\t\t\t}\n\t\t\treturn $this->_View->CroogoHtml->icon($icon, compact('class'));\n\t\t}\n\t}", "title": "" }, { "docid": "5fc1029a263456454efdc3b1945f71bf", "score": "0.5237206", "text": "public function render_html() {\n\t\t$data = $this->compile_report_data( $this->get_data() );\n\t\t$start_date = $this->start_date;\n\t\t$end_date = $this->end_date;\n\t\t$status = $this->status;\n\n\t\t$active_camps = $data['active_camps'];\n\t\t$inactive_camps = $data['inactive_camps'];\n\t\t$statuses = WordCamp_Loader::get_post_statuses();\n\n\t\tif ( ! empty( $this->error->get_error_messages() ) ) {\n\t\t\t?>\n\t\t\t<div class=\"notice notice-error\">\n\t\t\t\t<?php foreach ( $this->error->get_error_messages() as $message ) : ?>\n\t\t\t\t\t<?php echo wpautop( wp_kses_post( $message ) ); ?>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</div>\n\t\t<?php\n\t\t} else {\n\t\t\tinclude Reports\\get_views_dir_path() . 'html/wordcamp-status.php';\n\t\t}\n\t}", "title": "" }, { "docid": "a40216676c22c548fd16de5fc8247d23", "score": "0.52368414", "text": "public function index()\n\t{\n\t\t$statuses = $this->status->all()->sortBy(function($status)\n\t\t\t{\n\t\t\t\treturn $status->status_type;\n\t\t\t});\n\t\treturn View::make('backend.statuses.index', compact('statuses'));\n\t}", "title": "" }, { "docid": "11a6d37d58089b2d92c1544f93586a77", "score": "0.5235354", "text": "protected function outputStatus() {\n $this->statusCode = $this->httpUtils::STATUS_NOT_MODIFIED;\n $this->statusString = $this->httpUtils->statusStringFromCode($this->statusCode);\n parent::outputStatus();\n }", "title": "" }, { "docid": "abf0db923fe245ec85516fabbbab648c", "score": "0.52330714", "text": "public function getStatusAttribute() {\n if($this->isDeleted()) {\n print '<span class=\"label label-danger\">Deleted</span>';\n }\n else {\n print '<span class=\"label label-success\">Active</span>';\n }\n }", "title": "" }, { "docid": "8514a41d744b4f9e08b0fdacc7629779", "score": "0.5227946", "text": "public function get_status_text()\n {\n return $this->_status_text;\n }", "title": "" }, { "docid": "8e1459433aec76508118e24159647132", "score": "0.5226016", "text": "public function urlToFilters(): string\n {\n return Router::urlToFilters($this->catalogId(), $this->modelId(), $this->filterState());\n }", "title": "" }, { "docid": "1f35324b8c6fd64ef815d7a81de4da34", "score": "0.52193826", "text": "public function getStatus(){\n return $this->getParameter('status');\n }", "title": "" }, { "docid": "9698e2d5be0c50daabe400902607495a", "score": "0.52187604", "text": "public function ajax_filter()\n\t{\n\t\t$channel = $this->input->post('f_channel');\n\t\t// $status = $this->input->post('f_status');\n\n\t\t$post_data = array();\n\n/*\n\t\tif ($status == 'live')\n\t\t{\n\t\t\t$post_data['schedule_on >='] = now();\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t$post_data['schedule_on <'] = now();\n\t\t}\n*/\n\t\tif ($channel != 0)\n\t\t{\n\t\t\t$post_data['channel_id'] = $channel;\n\t\t}\n\n\t\t$results = $this->video_m->search($post_data);\n\n\t\t//set the layout to false and load the view\n\t\t$this->template\n\t\t\t\t->set_layout(FALSE)\n\t\t\t\t->set('videos', $results)\n\t\t\t\t->build('admin/index');\n\t}", "title": "" }, { "docid": "fc04b09ee12bb8e774ab987c8161e743", "score": "0.5212895", "text": "function xicore_ajax_get_host_status_detailed_info_html($args = null)\n{\n $hostname = grab_array_var($args, \"hostname\", \"\");\n $host_id = grab_array_var($args, \"host_id\", -1);\n $display = grab_array_var($args, \"display\", \"simple\");\n\n if (!is_authorized_for_host(0, $hostname)) {\n return _(\"You are not authorized to access this feature. Contact your Nagios XI administrator for more information, or to obtain access to this feature.\");\n }\n\n // Get host status\n $args = array(\n \"cmd\" => \"gethoststatus\",\n \"host_id\" => $host_id\n );\n $xml = get_xml_host_status($args);\n\n $output = '';\n if ($xml) {\n\n $current_state = intval($xml->hoststatus->current_state);\n $has_been_checked = intval($xml->hoststatus->has_been_checked);\n\n switch ($current_state) {\n case 0:\n $statestr = _(\"Up\");\n $statecolor = 'fa-ok';\n break;\n case 1:\n $statestr = _(\"Down\");\n $statecolor = 'fa-critical';\n break;\n case 2:\n $statestr = _(\"Unreachable\");\n $statecolor = 'fa-unknown';\n break;\n default:\n break;\n }\n\n if ($has_been_checked == 0) {\n $statestr = _(\"Pending\");\n $statecolor = 'fa-pending';\n }\n\n if ($display == \"advanced\") {\n $title = _(\"Advanced Status Details\");\n } else {\n $title = _(\"Status Details\");\n }\n\n $output .= '\n <div style=\"float: left; margin-right: 25px;\">\n <div class=\"infotable_title\">' . $title . '</div>\n <table class=\"infotable table table-condensed table-striped table-bordered\" style=\"width: 400px;\">\n <thead>\n </thead>\n <tbody>\n ';\n\n $output .= '<tr><td style=\"width: 140px;\">' . _('Host State') . ':</td><td><i class=\"fa fa-circle ' . $statecolor . '\"></i> ' . $statestr . '</td></tr>';\n\n $last_state_change_time = strtotime($xml->hoststatus->last_state_change);\n if ($last_state_change_time == 0) {\n $statedurationstr = \"N/A\";\n } else {\n $statedurationstr = get_duration_string(time() - $last_state_change_time);\n }\n $output .= '<tr><td>' . _('Duration') . ':</td><td>' . $statedurationstr . '</td></tr>';\n\n $state_type = intval($xml->hoststatus->state_type);\n if ($display == \"advanced\") {\n if ($state_type == STATETYPE_HARD) {\n $statetypestr = _(\"Hard\");\n } else {\n $statetypestr = _(\"Soft\");\n }\n $output .= '<tr><td>' . _('State Type') . ':</td><td>' . $statetypestr . '</td></tr>';\n $output .= '<tr><td>' . _('Current Check') . ':</td><td>' . $xml->hoststatus->current_check_attempt . ' of ' . $xml->hoststatus->max_check_attempts . '</td></tr>';\n } else {\n if ($state_type == STATETYPE_SOFT) {\n $output .= '<tr><td>' . _('Host Stability') . ':</td><td>Changing</td></tr>';\n $output .= '<tr><td>' . _('Current Check') . ':</td><td>' . $xml->hoststatus->current_check_attempt . ' of ' . $xml->hoststatus->max_check_attempts . '</td></tr>';\n } else {\n $output .= '<tr><td>' . _('Host Stability') . ':</td><td>' . _('Unchanging (stable)') . '</td></tr>';\n }\n }\n\n $lastcheck = get_datetime_string_from_datetime($xml->hoststatus->last_check, \"\", DT_SHORT_DATE_TIME, DF_AUTO, \"Never\");\n $output .= '<tr><td>' . _('Last Check') . ':</td><td>' . $lastcheck . '</td></tr>';\n\n $nextcheck = get_datetime_string_from_datetime($xml->hoststatus->next_check, \"\", DT_SHORT_DATE_TIME, DF_AUTO, \"Not scheduled\");\n $output .= '<tr><td>' . _('Next Check') . ':</td><td>' . $nextcheck . '</td></tr>';\n\n if ($display == \"advanced\") {\n\n $laststatechange = get_datetime_string_from_datetime($xml->hoststatus->last_state_change, \"\", DT_SHORT_DATE_TIME, DF_AUTO, \"Never\");\n $output .= '<tr><td nowrap>' . _('Last State Change') . ':</td><td>' . $laststatechange . '</td></tr>';\n\n $lastnotification = get_datetime_string_from_datetime($xml->hoststatus->last_notification, \"\", DT_SHORT_DATE_TIME, DF_AUTO, \"Never\");\n $output .= '<tr><td>' . _('Last Notification') . ':</td><td>' . $lastnotification . '</td></tr>';\n\n if ($xml->hoststatus->check_type == ACTIVE_CHECK) {\n $checktype = _(\"Active\");\n } else {\n $checktype = _(\"Passive\");\n }\n\n $output .= '<tr><td valign=\"top\" nowrap>' . _('Check Type') . ':</td><td>' . $checktype . '</td></tr>';\n $output .= '<tr><td valign=\"top\" nowrap>' . _('Check Latency') . ':</td><td>' . $xml->hoststatus->latency . ' ' . _('seconds') . '</td></tr>';\n $output .= '<tr><td valign=\"top\" nowrap>' . _('Execution Time') . ':</td><td>' . $xml->hoststatus->execution_time . ' ' . _('seconds') . '</td></tr>';\n $output .= '<tr><td valign=\"top\" nowrap>' . _('State Change') . ':</td><td>' . $xml->hoststatus->percent_state_change . '%</td></tr>';\n $output .= '<tr><td valign=\"top\" nowrap>' . _('Performance Data') . ':</td><td>' . $xml->hoststatus->performance_data . '</td></tr>';\n }\n\n $notesoutput = \"\";\n\n // Acknowledge problems\n if (intval($xml->hoststatus->problem_acknowledged) == 1) {\n $attr_text = _(\"Host problem has been acknowledged\");\n $attr_icon = theme_image(\"ack.png\");\n $attr_icon_alt = $attr_text;\n $notesoutput .= '<li><div class=\"hoststatusdetailattrimg\"><img src=\"' . $attr_icon . '\" alt=\"' . $attr_icon_alt . '\" title=\"' . $attr_icon_alt . '\"></div><div class=\"hoststatusdetailattrtext\">' . $attr_text . '</div></li>';\n }\n\n // Scheduled downtime\n if (intval($xml->hoststatus->scheduled_downtime_depth) > 0) {\n $attr_text = _(\"Host is in scheduled downtime\");\n $attr_icon = theme_image(\"downtime.png\");\n $attr_icon_alt = $attr_text;\n $notesoutput .= '<li><div class=\"hoststatusdetailattrimg\"><img src=\"' . $attr_icon . '\" alt=\"' . $attr_icon_alt . '\" title=\"' . $attr_icon_alt . '\"></div><div class=\"hoststatusdetailattrtext\">' . $attr_text . '</div></li>';\n }\n\n // Is flapping\n if (intval($xml->hoststatus->is_flapping) == 1) {\n $attr_text = _(\"Host is flapping between states\");\n $attr_icon = theme_image(\"flapping.png\");\n $attr_icon_alt = $attr_text;\n $notesoutput .= '<li><div class=\"hoststatusdetailattrimg\"><img src=\"' . $attr_icon . '\" alt=\"' . $attr_icon_alt . '\" title=\"' . $attr_icon_alt . '\"></div><div class=hoststatusdetailattrtext\">' . $attr_text . '</div></li>';\n }\n\n // Notificaitons\n if (intval($xml->hoststatus->notifications_enabled) == 0) {\n $attr_text = _(\"Host notifications are disabled\");\n $attr_icon = theme_image(\"nonotifications.png\");\n $attr_icon_alt = $attr_text;\n $notesoutput .= '<li><div class=\"hoststatusdetailattrimg\"><img src=\"' . $attr_icon . '\" alt=\"' . $attr_icon_alt . '\" title=\"' . $attr_icon_alt . '\"></div><div class=\"hoststatusdetailattrtext\">' . $attr_text . '</div></li>';\n }\n\n if (!empty($notesoutput)) {\n $output .= '<tr><td valign=\"top\">' . _('Host Notes') . ':</td><td><ul class=\"hoststatusdetailnotes\">';\n $output .= $notesoutput;\n $output .= '</ul></td></tr>';\n }\n\n $output .= '\n </tbody>\n </table>\n </div>\n ';\n }\n\n return $output;\n}", "title": "" }, { "docid": "850a776afa71297bcb1d03cc2147d0a9", "score": "0.5211309", "text": "public function status(): string\n {\n if ($this->cachedStatus === false) {\n if (empty($this->visible_at)) {\n $this->cachedStatus = self::STATUS_DRAFT;\n } elseif ($this->visible_at->isFuture()) {\n $this->cachedStatus = self::STATUS_SCHEDULED;\n } elseif (empty($this->published_at) || $this->published_at->isFuture()) {\n $this->cachedStatus = self::STATUS_VOTING;\n } else {\n $this->cachedStatus = self::STATUS_PUBLISHED;\n }\n }\n\n return $this->cachedStatus;\n }", "title": "" }, { "docid": "77050aac4025c9efdfa6e01f3f03930d", "score": "0.52100724", "text": "public function index()\n {\n $data = Status::all();\n\n return view('admin.art_component.status', compact('data'));\n }", "title": "" }, { "docid": "d17875ed332088780bd4f776cb04e437", "score": "0.5207239", "text": "protected function renderAppStatus(AppInterface $app): array {\n $field = $this->entityTypeManager->getViewBuilder($this->entityTypeId)->viewField($app->get('status'), 'default');\n $field['#label_display'] = 'hidden';\n return $field;\n }", "title": "" }, { "docid": "c673f5c03db646373199474d8885f1fb", "score": "0.52044886", "text": "public function getXMLFilter(): string\n {\n return Utils::xmlFilter($this->xml);\n }", "title": "" }, { "docid": "58770ef6a81b097aa227ba014085cdaa", "score": "0.5199726", "text": "public function showOptionStatus() {\n\t\t\tif (Auth::validToken($this->db,$this->token)){\n\t\t\t\t$sql = \"SELECT a.StatusID,a.Status\n\t\t\t\t\tFROM core_status a\n\t\t\t\t\tWHERE a.StatusID = '1' OR a.StatusID = '42'\n\t\t\t\t\tORDER BY a.Status ASC\";\n\t\t\t\t\n\t\t\t\t$stmt = $this->db->prepare($sql);\t\t\n\t\t\t\t$stmt->bindParam(':token', $this->token, PDO::PARAM_STR);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \t if ($stmt->rowCount() > 0){\n \t \t\t \t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$data = [\n\t\t\t \t 'results' => $results, \n \t \t\t 'status' => 'success', \n\t\t\t \t 'code' => 'RS501',\n \t\t \t'message' => CustomHandlers::getreSlimMessage('RS501',$this->lang)\n\t\t\t\t\t\t];\n\t\t\t } else {\n \t\t\t $data = [\n \t\t \t'status' => 'error',\n\t\t \t\t 'code' => 'RS601',\n \t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601',$this->lang)\n\t\t\t\t\t\t];\n\t \t } \t \t\n\t\t\t\t} else {\n\t\t\t\t\t$data = [\n \t \t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n\t \t\t 'message' => CustomHandlers::getreSlimMessage('RS202',$this->lang)\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$data = [\n\t \t\t\t'status' => 'error',\n\t\t\t\t\t'code' => 'RS401',\n \t \t'message' => CustomHandlers::getreSlimMessage('RS401',$this->lang)\n\t\t\t\t];\n\t\t\t}\t\t\n \n\t\t\treturn JSON::safeEncode($data,true);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "07e34380eb95323748e488cb6216bbf4", "score": "0.5198773", "text": "public function index() {\n\t\t$form_model = $this->options();\n\n\t\t$perf_data = array();\n\t\t$display_explanation = \"\";\n\t\t$display_text = \"\";\n\t\t$content_from = $form_model->get_value('content_from', 'filter');\n\t\t$link = '';\n\t\t$linkprovider = LinkProvider::factory();\n\t\t$state = 'info';\n\t\tif($content_from == 'filter') {\n\t\t\t// filters\n\t\t\t$main_set = $this->get_set_by_filter_id($form_model->get_value('main_filter_id', -200));\n\t\t\t$selection_set = $this->get_set_by_filter_id($form_model->get_value('selection_filter_id', -150));\n\t\t\tif($selection_set->get_table() !== $main_set->get_table()) {\n\t\t\t\t$msg = sprintf(\n\t\t\t\t\t\"Your main filter is placed on the table '%s', but your selection filter is not. You need to filter on the same table.\",\n\t\t\t\t\t$main_set->get_table()\n\t\t\t\t);\n\t\t\t\treturn $this->error($msg);\n\t\t\t}\n\t\t\t$query = $main_set->intersect($selection_set)->get_query();\n\t\t\t$link = listview::querylink($query);\n\t\t\t$pool = $main_set->class_pool();\n\t\t\t$all_set = $pool::all();\n\t\t\t$counts = $main_set->stats(array(\n\t\t\t\t'all' => $all_set,\n\t\t\t\t'selection' => $selection_set\n\t\t\t));\n\n\t\t\t\tswitch($form_model->get_value('display_type', 'number_of_total')) {\n\t\t\t\tcase 'percent':\n\t\t\t\t\t$display_text = sprintf(\"%0.1f%%\", 100.0 * $counts['selection'] / $counts['all']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'number_only':\n\t\t\t\t\t$display_text = sprintf(\"%d\", $counts['selection']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'number_of_total':\n\t\t\t\tdefault:\n\t\t\t\t\t$display_text = sprintf('%d / %d', $counts['selection'], $counts['all']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$threshold_value = $counts['selection'];\n\n\t\t\t\tif ($form_model->get_value('threshold_onoff')) {\n\t\t\t\t\t$threshold_types = array();\n\t\t\t\t\t$threshold_types['less_than'] = function ($val, $stat) {\n\t\t\t\t\t\treturn $stat['all'] == 0?100.0 * $stat['selection'] < $val:100.0 * $stat['selection'] / $stat['all'] < $val;\n\t\t\t\t\t};\n\t\t\t\t\t$threshold_types['greater_than'] = function ($val, $stat) {\n\t\t\t\t\t\treturn $stat['all'] == 0?100.0 * $stat['selection'] > $val:100.0 * $stat['selection'] / $stat['all'] > $val;\n\t\t\t\t\t};\n\t\t\t\t\t$threshold_callback = $threshold_types[$form_model->get_value('threshold_type', 'less_than')];\n\t\t\t\t\tif (call_user_func_array($threshold_callback, array(\n\t\t\t\t\t\t$form_model->get_value('threshold_crit', 90.0),\n\t\t\t\t\t\t$counts))) {\n\t\t\t\t\t\t$state = 'critical';\n\t\t\t\t\t} elseif (call_user_func_array($threshold_callback, array(\n\t\t\t\t\t\t$form_model->get_value('threshold_warn', 95.0),\n\t\t\t\t\t\t$counts))) {\n\t\t\t\t\t\t$state = 'warning';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$state = 'ok';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\trequire 'view.php';\n\t\t} elseif(in_array($content_from, array('host', 'service'), true)) {\n\t\t\t$perf_data_src = $form_model->get_value($content_from.'_performance_data_source');\n\t\t\t$object = $form_model->get_value($content_from);\n\t\t\tif(!$object) {\n\t\t\t\t$display_explanation = 'No perfdata for these settings';\n\t\t\t\trequire 'view.php';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif($content_from === 'host') {\n\t\t\t\t$link = $linkprovider->get_url('extinfo', 'details', array(\n\t\t\t\t\t'host' => $object->get_name()\n\t\t\t\t));\n\t\t\t} elseif($content_from === 'service') {\n\t\t\t\t$link = $linkprovider->get_url('extinfo', 'details', array(\n\t\t\t\t\t'host' => $object->get_host()->get_name(),\n\t\t\t\t\t'service' => $object->get_description()\n\t\t\t\t));\n\t\t\t}\n\t\t\t$perf_data = $object->get_perf_data();\n\t\t\tif(!isset($perf_data[$perf_data_src]) || !isset($perf_data[$perf_data_src]['value'])) {\n\t\t\t\t$display_explanation = 'No perfdata for these settings';\n\t\t\t\trequire 'view.php';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$perf_data = $perf_data[$perf_data_src];\n\t\t\tif($form_model->get_value('threshold_onoff') && isset($perf_data['warn'], $perf_data['crit'])) {\n\t\t\t\tif(performance_data::match_threshold($perf_data['crit'], $perf_data['value'])) {\n\t\t\t\t\t$state = 'critical';\n\t\t\t\t} else if(performance_data::match_threshold($perf_data['warn'], $perf_data['value'])) {\n\t\t\t\t\t$state = 'warning';\n\t\t\t\t} else {\n\t\t\t\t\t$state = 'ok';\n\t\t\t\t}\n\t\t\t}\n\t\t\trequire 'view.php';\n\t\t}\n\t}", "title": "" }, { "docid": "963570fc66a233eff7d46c20e87a047a", "score": "0.5195344", "text": "private function getOutput($status)\n {\n if ($status === KoalityFormatter_Result::STATUS_PASS) {\n return 'All Shopware 5 health metrics passed.';\n } else {\n return 'Some Shopware 5 health metrics failed: ';\n }\n }", "title": "" }, { "docid": "905132126fab292a7d9e0491b8f4cc50", "score": "0.51945984", "text": "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction([\n 'width' => '12%',\n 'printable' => false,\n 'exportable' => false,\n 'searchable' => false\n ])\n ->processing(true)\n ->paging(true)\n ->lengthMenu([[50, 100,500, -1], [50, 100,500, 'All']])\n ->parameters($this->getBuilderParameters())\n ->scrollX(true);\n }", "title": "" }, { "docid": "4a0af0ffde079c0a4e9dfffdac41caca", "score": "0.51941067", "text": "private function nic_output($status) {\n\n $script = 'try {'.(($this->input->server('REQUEST_METHOD') == 'POST') ? 'top.' : '').'nicUploadButton.statusCb('.json_encode($status).');} catch(e) { alert(e.message); }';\n \n if($this->input->server('REQUEST_METHOD') == 'POST') {\n\n return '<script>'.$script.'</script>';\n\n } else {\n\n return $script;\n\n }\n\n }", "title": "" }, { "docid": "a6aae767da3a3568b9a41d32964b883a", "score": "0.51887727", "text": "public function getStatusText() {\n $statusText = \"\";\n switch ($this->security_status) {\n case self::STATUS_CONTROL_CHECKED:\n $statusText = self::STATUS_CONTROL_CHECKED_TEXT;\n break;\n case self::STATUS_CONTROL_NORMAL:\n $statusText = self::STATUS_CONTROL_NORMAL_TEXT;\n break;\n case self::STATUS_CONTROL_SWITCHED_OFF:\n $statusText = self::STATUS_CONTROL_SWITCHED_OFF_TEXT;\n break;\n default :\n break;\n }\n return $statusText;\n }", "title": "" }, { "docid": "912b8d642b9e825169b2431dec708813", "score": "0.51877266", "text": "protected static function statusField()\n {\n return 'status';\n }", "title": "" }, { "docid": "72bb7367b5eb2b451545edfc1cfba50a", "score": "0.51875395", "text": "public function get_status() {\n\t\t$optin_label = '';\n\n\t\tswitch ( $this->get() ) {\n\t\t\tcase self::STATUS_ACTIVE:\n\t\t\t\t$optin_label = __( 'Active', 'stellarwp-telemetry-starter' );\n\t\t\t\tbreak;\n\t\t\tcase self::STATUS_INACTIVE:\n\t\t\t\t$optin_label = __( 'Inactive', 'stellarwp-telemetry-starter' );\n\t\t\t\tbreak;\n\t\t\tcase self::STATUS_MIXED:\n\t\t\t\t$optin_label = __( 'Mixed', 'stellarwp-telemetry-starter' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/**\n\t\t * Filters the opt-in status label.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $optin-Label\n\t\t */\n\t\treturn apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'optin_status_label', $optin_label );\n\t}", "title": "" } ]
2f88a7c6986290faa2adcc8d1d1b6798
/ Vehicle inventory image uploads Model Add image information to the database table
[ { "docid": "78b966cf9e957353c02c84793409b907", "score": "0.0", "text": "function storeImages($imgPath, $invId, $imgName, $imgPrimary)\n{\n $db = phpmotorsConnect();\n $sql = 'INSERT INTO images (invId, imgPath, imgName, imgPrimary) VALUES (:invId, :imgPath, :imgName, :imgPrimary)';\n $stmt = $db->prepare($sql);\n // Store the full size image information\n $stmt->bindValue(':invId', $invId, PDO::PARAM_INT);\n $stmt->bindValue(':imgPath', $imgPath, PDO::PARAM_STR);\n $stmt->bindValue(':imgName', $imgName, PDO::PARAM_STR);\n $stmt->bindValue(':imgPrimary', $imgPrimary, PDO::PARAM_INT);\n $stmt->execute();\n\n // Make and store the thumbnail image information\n // Change name in path\n $imgPath = makeThumbnailName($imgPath);\n // Change name in file name\n $imgName = makeThumbnailName($imgName);\n $stmt->bindValue(':invId', $invId, PDO::PARAM_INT);\n $stmt->bindValue(':imgPath', $imgPath, PDO::PARAM_STR);\n $stmt->bindValue(':imgName', $imgName, PDO::PARAM_STR);\n $stmt->bindValue(':imgPrimary', $imgPrimary, PDO::PARAM_INT);\n $stmt->execute();\n\n $rowsChanged = $stmt->rowCount();\n $stmt->closeCursor();\n return $rowsChanged;\n}", "title": "" } ]
[ { "docid": "1e7bdeaf93d3ba69e8d20c2aed2e88a5", "score": "0.66313154", "text": "public function fn_uploadimages()\n {\n $request = request()->all();\n $str_file_name = store_file('uplaod-images', $request['image']);\n /* Store the image name in upload image table for registry*/\n try {\n $response = ImageModel::create([\n 'file_name' => $str_file_name\n ]);\n $arr_image_details = ['img_name' =>$response->file_name, 'id'=>$response->id, \"image_path\" => asset('storage/uplaod-images/'.$str_file_name) ];\n \n return $arr_image_details;\n } catch (PDOException $e) {\n return 0;\n }\n }", "title": "" }, { "docid": "2a3a8fe2d8b98611bf7dece103693d52", "score": "0.6572324", "text": "public function upload_vehicle_images(){\n\t\t\t\n\t\t\tif(!empty($this->input->post('vehicle_id'))){\n\t\t\t\t\n\t\t\t\t//escaping the post values\n\t\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\t\t\n\t\t\t\t$id = html_escape($this->input->post('vehicle_id'));\n\t\t\t\t\n\t\t\t\t$vehicle_id = preg_replace('#[^0-9]#i', '', $id); // filter everything but numbers\n\t\t\t\t\n\t\t\t\t$count_vehicle_images = $this->Vehicles->count_vehicle_images($vehicle_id);\t\n\t\t\t\tif($count_vehicle_images < 1){\n\t\t\t\t\t$count_vehicle_images = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check if files attached\n\t\t\t\t$upload = false;\n\n\t\t\t\t//Cross Site Scripting prevention filter \n\t\t\t\t$file_clean = false;\n\t\t\t\tforeach($_FILES[\"vehicle_images\"][\"error\"] as $key => $value){\n\t\t\t\t\tif($value == 0){\n\t\t\t\t\t\t$upload = true;\n\t\t\t\t\t\t$file_clean = $this->Files->file_xss_clean($_FILES['vehicle_images']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//!empty($_FILES['vehicle_images']['name']) && $count_vehicle_images <= 5\n\t\t\t\tif($upload && $file_clean && $count_vehicle_images <= 5){\n\t\t\t\t\t\n\t\t\t\t\t$append = 0;\n\t\t\t\t\t$name_array = array();\n\t\t\t\t\t$error_array = array();\n\t\t\t\t\t$upload_count = '';\n\t\t\t\t\t\n\t\t\t\t\t$count = count($_FILES['vehicle_images']['size']);\t\n\t\t\t\t\t//$vehicle_id = $this->input->post('vehicle_id');\n\t\t\t\t\t\n\t\t\t\t\t//$existing_images_count = $this->db->where('product_id', $product_id)->get('product_images')->num_rows();\n\t\t\t\t\t//$existing_images_count = $this->db->where('portfolio_id', $portfolio_id)->count_all('portfolio_images');\n\t\t\t\t\t$allowed_uploads = 5;\n\t\t\t\t\t$existing_images_count = 0;\n\t\t\t\t\t$existing_images_count = $this->Vehicles->count_vehicle_images($vehicle_id);\n\t\t\t\t\t\n\t\t\t\t\tif($existing_images_count < 1){\n\t\t\t\t\t\t$existing_images_count = 0;\n\t\t\t\t\t\t$allowed_uploads = 5;\n\t\t\t\t\t\t$append = 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$append = $existing_images_count + 1;\n\t\t\t\t\t\t$allowed_uploads = 5 - $existing_images_count;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//$upload = false;\n\t\t\t\t\tforeach($_FILES as $key=>$value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//$s=0; $s<=$count-1; $s++\n\t\t\t\t\t\tfor($s=0; $s<=$count-1; $s++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_FILES['vehicle_images']['name']=$value['name'][$s];\n\t\t\t\t\t\t\t$_FILES['vehicle_images']['type'] = $value['type'][$s];\n\t\t\t\t\t\t\t$_FILES['vehicle_images']['tmp_name'] = $value['tmp_name'][$s];\n\t\t\t\t\t\t\t$_FILES['vehicle_images']['error'] = $value['error'][$s];\n\t\t\t\t\t\t\t$_FILES['vehicle_images']['size'] = $value['size'][$s]; \t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//ensure only files with input are processed\n\t\t\t\t\t\t\tif ($_FILES['vehicle_images']['size'] > 0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$config['upload_path'] = './uploads/vehicles/'.$vehicle_id.'/';\n\t\t\t\t\t\t\t\t$config['allowed_types'] = 'gif|jpg|jpeg|png';\n\t\t\t\t\t\t\t\t$config['max_size'] = 2048000;\n\t\t\t\t\t\t\t\t$config['max_width'] = 3048;\n\t\t\t\t\t\t\t\t$config['max_height'] = 2048;\n\t\t\t\t\t\t\t\t//$ext = $append + $s;\n\t\t\t\t\t\t\t\t//count images stored\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//get file extension\n\t\t\t\t\t\t\t\t$file = $_FILES['vehicle_images']['name'];\n\t\t\t\t\t\t\t\t//$ext = $this->Files->getFileExtension($file);\n\t\t\t\t\t\t\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$append = $append + $s;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$config['file_name'] = $vehicle_id.'_'.$append.'.'.$ext;\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$this->load->library('upload', $config);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($this->upload->do_upload('vehicle_images')){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$upload_data = $this->upload->data();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$file_name = '';\n\t\t\t\t\t\t\t\t\tif (isset($upload_data['file_name'])){\n\t\t\t\t\t\t\t\t\t\t$file_name = $upload_data['file_name'];\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\t$db_data = array(\n\t\t\t\t\t\t\t\t\t\t'vehicle_id' => $vehicle_id,\n\t\t\t\t\t\t\t\t\t\t'image_name'=> $file_name,\n\t\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'), \n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t$this->db->insert('vehicle_images',$db_data);\n\n\t\t\t\t\t\t\t\t\tif($s == 0 && $count_vehicle_images == 0){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$image_data = array(\n\t\t\t\t\t\t\t\t\t\t\t'vehicle_image' => $file_name,\t\t\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t$this->Vehicles->update_vehicle($image_data,$vehicle_id);\n\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}else{\n\t\t\t\t\t\t\t\t\tif($this->upload->display_errors()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$error_array[] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$this->upload->display_errors().'</div>';\n\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//$append++;\n\t\t\t\t\t}\t\n\t\t\t\t\t$errors= implode(',', $error_array);\n\t\t\t\t\tif($errors != ''){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//$this->session->set_flashdata('image_added', '<script type=\"text/javascript\" language=\"javascript\">setTimeout(function() { $(\".custom-alert-box\").fadeOut(\"slow\"); }, 5000);</script><div class=\"custom-alert-box text-center\"><i class=\"fa fa-check-circle\"></i> Image errors!</div>');\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$errors.'</div>';\n\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//get main image\n\t\t\t\t\t\t$main_img = '';\n\t\t\t\t\t\t$vehicles = $this->db->select('*')->from('vehicles')->where('id',$vehicle_id)->get()->row();\n\t\t\t\t\t\tif($vehicles){\n\t\t\t\t\t\t\t$main_img = $vehicles->vehicle_image;\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$vehicle_images = $this->Vehicles->get_vehicle_images($vehicle_id);\n\t\t\t\t\t\t$count_vehicle = $this->Vehicles->count_vehicle_images($vehicle_id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//start gallery edit group\n\t\t\t\t\t\t$image_group = '<div class=\"\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($vehicle_images)){\n\t\t\t\t\t\t\t//item count initialised\n\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\t//gallery edit row\n\t\t\t\t\t\t\t$image_group .= '<div class=\"row\">';\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\tforeach($vehicle_images as $images){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//gallery edit group\n\t\t\t\t\t\t\t\t$image_group .= '<div class=\"col-sm-3 nopadding\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//gallery edit group\n\t\t\t\t\t\t\t\t$image_group .= '<div class=\"image-group\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$image_group .= '<img src=\"'.base_url().'uploads/vehicles/'.$vehicle_id.'/'.$images->image_name.'\" id=\"'.$images->image_name.'\" class=\"img-responsive\" />';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//image path\n\t\t\t\t\t\t\t\t$path = 'uploads/vehicles/'.$vehicle_id.'/'.$images->image_name;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($main_img == $images->image_name){\n\t\t\t\t\t\t\t\t\t$image_group .= '<span class=\"text-primary\"><strong>Main</strong></span>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$image_group .= '<span class=\"pull-right\"><a href=\"#\" class=\"remove_image\" onclick=\"deleteVehicleImage(this,'.$vehicle_id.','.$images->id.',\\''.$path.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-trash-o\"></i> Remove</span></a></span>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$image_group .= '<a href=\"#\" class=\"remove_image\" onclick=\"deleteVehicleImage(this,'.$vehicle_id.','.$images->id.',\\''.$path.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-trash-o\"></i> Remove</span></a>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$image_group .= '<span class=\"pull-right\"><a href=\"#\" class=\"main_image\" onclick=\"mainVehicleImage(this,'.$vehicle_id.',\\''.$images->image_name.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-picture-o\"></i> Make Main</span></a></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$image_group .= '</div>';\n\t\t\t\t\t\t\t\t$image_group .= '</div>';\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\tif($i % 4 == 0){\n\t\t\t\t\t\t\t\t\t$image_group .= '</div><br/><div class=\"row\">';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//$image_group .= '<div style=\"clear:both;\"></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\t//end gallery edit group\n\t\t\t\t\t\t$image_group .= '</div>';\n\t\t\t\t\t\t$data['image_group'] = $image_group;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//count and display the number of images stored\n\t\t\t\t\t\t$images_count = $this->Vehicles->count_vehicle_images($vehicle_id);\n\t\t\t\t\t\tif($images_count == '' || $images_count == null){\n\t\t\t\t\t\t\t$images_count = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['images_count'] = $images_count;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$email = $this->session->userdata('email');\n\t\t\t\t\t\t$user_array = $this->Users->get_user($email);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$fullname = '';\n\t\t\t\t\t\tif($user_array){\n\t\t\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t\t\t$fullname = $user->first_name.' '.$user->last_name;\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\t\n\t\t\t\t\t\t//update activities table\n\t\t\t\t\t\t$description = 'added vehicle images';\n\t\t\t\t\t\n\t\t\t\t\t\t$activity = array(\t\t\t\n\t\t\t\t\t\t\t'name' => $fullname,\n\t\t\t\t\t\t\t'username' => $email,\n\t\t\t\t\t\t\t'description' => $description,\n\t\t\t\t\t\t\t'keyword' => 'Image',\n\t\t\t\t\t\t\t'activity_time' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Site_activities->insert_activity($activity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//$this->session->set_flashdata('image_added', '<script type=\"text/javascript\" language=\"javascript\">setTimeout(function() { $(\".custom-alert-box\").fadeOut(\"slow\"); }, 5000);</script><div class=\"custom-alert-box text-center\"><i class=\"fa fa-check-circle\"></i> Image(s) added!</div>');\n\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> Image(s) added!</div>';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$error = '';\n\t\t\t\t\tif(empty($_FILES['vehicle_images']['name'])){\n\t\t\t\t\t\t$error = 'Please select a valid image!';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$error = 'You have exceeded the number of allowed images. You must delete an existing image before you can add another!';\n\t\t\t\t\t}\n\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$error.'</div>';\n\t\t\t\t}\n\t\t\t}/*else{\n\t\t\t\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>Please select a valid image!</div>';\n\t\t\t}*/\n\t\n\t\t\t// Encode the data into JSON\n\t\t\t$this->output->set_content_type('application/json');\n\t\t\t$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t$this->output->set_output($data);\n\t\t\t//echo json_encode($data);\t\t\t\n\t\t}", "title": "" }, { "docid": "ede1c69f40dad3bfb93d621d5277a87e", "score": "0.6556672", "text": "public function add_image() {\n\t\t$this->use_layout=false;\n\t\t$this->page = new $this->model_class(Request::get('id'));\n\t\t$file = new WildfireFile(Request::post('id'));\n\t\t$this->page->images = $file;\n\t\t$this->image = $file;\n\t}", "title": "" }, { "docid": "e1a5cf3f67a843a095cba7233d7cbb03", "score": "0.6402148", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'product' => 'required',\n 'productvariantsku' => 'required',\n 'title' => 'required|max:255',\n 'description' => 'required|max:255',\n 'image' => 'required',\n //'status' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect(route('admin.product.variant.image.create'))\n ->withInput()\n ->withErrors($validator);\n }\n\n $product_variant_id = $request->productvariantsku;\n\n $productvariantimage = new ProductVariantImage;\n \n $productvariantimage->product_id = $request->product;\n $productvariantimage->product_variant_id = $product_variant_id;\n\n $productvariant = ProductVariant::findOrFail($product_variant_id);\n\n $productvariantimage->product_sku = $productvariant->sku;\n\n $productvariantimage->title = $request->title;\n $productvariantimage->description = $request->description;\n\n //$productvariantimage->product_variant_image_status_id = $request->status;\n\n if( $request->hasFile('image') && $request->file('image')->isValid() ) {\n\n $file = $request->file('image');\n //getting timestamp\n $timestamp = str_replace([' ', ':'], '-', Carbon::now()->toDateTimeString());\n \n $name = $timestamp. '-' .$file->getClientOriginalName();\n \n $productvariantimage->filepath = $name;\n\n $file->move(public_path().'/storage/', $name);\n }\n\n $productvariantimage->save();\n\n return redirect(route('admin.product.variant.image.index'));\n }", "title": "" }, { "docid": "59c55393509f161dd3eba38ad80f7a04", "score": "0.63949764", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'name'=>'required',\n 'category'=>'required',\n 'description'=>'required',\n 'price'=>'required',\n 'images'=>'image'\n ]);\n\n $item= new Item();\n\n if (Item::where('name', '=', Input::get('name'))->exists()) {\n return redirect()->route('item.index')->with('existsMsg','you cannot add this item retry again please');\n }\n else{\n $item->category_id= $request->category;\n $item->name= $request->name;\n $item->description= $request->description;\n $item->price= $request->price;\n\n if($request->hasFile('featured_image')) {\n //add the new photo\n $image = $request->file('featured_image');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('images/' . $fileName);\n\n Image::make($image)->resize(100, 200)->save($location);\n $item->images=$fileName;\n }\n\n $item->save();\n return redirect()->route('item.index')->with('successMsg','Item successfully saved');\n }\n }", "title": "" }, { "docid": "90937567024a1f4453fc0ac9cb158c3a", "score": "0.63917756", "text": "public function uploadImage(Request $request)\n {\n if ($request->hasFile('image')) {\n foreach ($request->image as $image) {\n $filename = substr(number_format(time() * rand(), 0, '', ''), 0, 10) . '.' . $image->getClientOriginalExtension();\n $img = Image::make($image);\n Storage::disk('spaces')->put('uploads/' . $filename, $img->stream(), 'public');\n\n $img = new TreatmentImage;\n $img->patient_treatment_id = $request->treatment_id;\n $img->filename = $filename;\n $img->save();\n }\n }\n return back();\n }", "title": "" }, { "docid": "189c5e86f734b713d62626016e8b5ff4", "score": "0.6389228", "text": "public function store(Request $request)\n { \n $item = new Item;\n\n $item->name = $request->name;\n $item->description = $request->description; \n\n switch($request->type){\n case 'Ingredient':\n $type = 1;\n break;\n\n case 'Accessory':\n $type = 2;\n break;\n\n case 'Side Dish':\n $type = 3;\n break; \n\n default:\n $type = 2;\n break; \n }\n\n $item->type = $type; \n $item->price = $request->price; \n $item->save();\n\n //file upload options\n $destination = public_path().'/images/uploads/item/';\n $base_code = 'item-'.$item->id;\n\n //update id specific columns\n $item->itemCode = $base_code;\n\n $item->save(); \n\n //file optreations\n if($request->file('thumbnail')!=null){\n\n $file_thumnail = $request->file('thumbnail');\n $item->thumbnail = $base_code . '-thumbnail.'. $file_thumnail->getClientOriginalExtension();\n\n $item->save(); \n\n $file_thumnail->move(\n $destination , \n $base_code . '-thumbnail.' . $file_thumnail->getClientOriginalExtension()\n );\n\n }\n \n return redirect()->route('item.index');\n }", "title": "" }, { "docid": "8501419dace6609b7e6d7acd52395544", "score": "0.6385514", "text": "public function imageUploadPost()\n {\n if(request('edit_hidden') != null) {\n\n $imageName = DB::table('appliance_inside_category')->where('id',request('edit_hidden'))->first()->imagen;\n\n if ($imageName == '') {\n $imageName = 'image-not-found.png';\n }\n\n if (request()->image != null) {\n $imageName = time() . '.' . request()->image->getClientOriginalExtension();\n request()->image->move(public_path('assets/images/appliances'), $imageName);\n }\n\n $sumarizedData = [\n 'id' => request('edit_hidden'),\n 'id_appliance_inside' => request('product_edit'),\n 'name' => request('appliance_inside_category_edit'),\n 'price' => request('price2_edit'),\n 'retail_price' => request('price2_retail_edit'),\n 'description' => request('description_edit'),\n 'imagen' => $imageName,\n 'weight' => request('weight_edit')\n ];\n\n DB::table('appliance_inside_category')->where('id',request('edit_hidden'))->update($sumarizedData);\n } else {\n $maxId = DB::table('appliance_inside_category')->select(\\Illuminate\\Support\\Facades\\DB::raw('MAX(id) as id'))->first();\n $maxId = $maxId->id + 1;\n\n $imageName = 'image-not-found.png';\n\n if (request()->image != null) {\n $imageName = time() . '.' . request()->image->getClientOriginalExtension();\n request()->image->move(public_path('assets/images/appliances'), $imageName);\n }\n\n $sumarizedData = [\n 'id' => $maxId,\n 'id_appliance_inside' => request('product_new'),\n 'name' => request('appliance_inside_category_new'),\n 'price' => request('price2_new'),\n 'retail_price' => request('price2_retail_new'),\n 'description' => request('description_new'),\n 'imagen' => $imageName,\n 'weight' => request('weight_new')\n ];\n\n DB::table('appliance_inside_category')->insert($sumarizedData);\n\n request()->validate([\n 'image' => 'required|file|mimes:jpg,png,jpeg,gif,bmp,pdf,xls,xlsx,doc,docx,txt,zip,rar,7z',\n ]);\n\n return back()\n ->with('success', 'You have successfully upload file.')\n ->with('image', $imageName);\n }\n\n CRUDBooster::redirect(CRUDBooster::adminPath(\"products\"),trans(\"\"));\n }", "title": "" }, { "docid": "3fb8c3ffc43a52fcb53cceb46fbead0c", "score": "0.636853", "text": "public function stage_images()\n {\n try {\n //init\n $input = Input::all();\n $current = date('Y-m-d H:i:s');\n //remove\n if(isset($input) && isset($input['action']) && $input['action']==-1)\n {\n $image = Image::find($input['id']);\n if($image)\n {\n DB::table('stage_image_ticket_type')->where('image_id',$image->id)->delete();\n $image->delete_image_file();\n $image->delete();\n return ['success'=>true,'action'=>-1];\n }\n return ['success'=>false,'msg'=>'There was an error deleting the image.<br>The server could not retrieve the data.'];\n }\n //save\n else if(isset($input) && isset($input['action']) && $input['action']==1)\n {\n $exists = DB::table('stage_image_ticket_type')->where('stage_id',$input['stage_id'])->where('ticket_type',$input['ticket_type'])->count();\n if($exists<1)\n {\n $image = new Image;\n $image->created = $current;\n if(preg_match('/media\\/preview/',$input['url']))\n $image->set_url($input['url']);\n $image->image_type = $input['image_type'];\n $image->caption = (!empty(strip_tags($input['caption'])))? strip_tags($input['caption']) : null;\n $image->save();\n if($image)\n {\n DB::table('stage_image_ticket_type')->insert(['ticket_type'=>$input['ticket_type'],'stage_id'=>$input['stage_id'],'image_id'=>$image->id]);\n $stage_images = DB::table('images')\n ->join('stage_image_ticket_type', 'stage_image_ticket_type.image_id', '=' ,'images.id')\n ->join('stages', 'stages.id', '=' ,'stage_image_ticket_type.stage_id')\n ->join('venues', 'venues.id', '=' ,'stages.venue_id')\n ->select(DB::raw('images.*,stage_image_ticket_type.*,stages.name'))->where('images.id','=',$image->id)->distinct()->first();\n $stage_images->url = Image::view_image($stage_images->url);\n return ['success'=>true,'action'=>1,'stage_images'=>$stage_images];\n }\n return ['success'=>false,'msg'=>'There was an error adding the image.<br>The server could not retrieve the data.'];\n }\n return ['success'=>false,'msg'=>'There was an error adding the image.<br>There is already a ticket type image for that stage.'];\n }\n else\n return ['success'=>false,'msg'=>'Invalid Option.'];\n } catch (Exception $ex) {\n throw new Exception('Error VenueImages Index: '.$ex->getMessage());\n }\n }", "title": "" }, { "docid": "419a64fa23870e0a89916b07cacd1f3e", "score": "0.63587195", "text": "public function imageUploadPost()\n\n {\n\n request()->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n\n ]);\n\n \n\n $imageName = time().'.'.request()->image->getClientOriginalExtension();\n $loc = request()->location;\n $des = request()->description;\n $upldTime=date('Y-m-d H:i:s');\n $id = \\Auth::user()->id;\n \n\n request()->image->move(public_path('images'), $imageName);\n\n DB::insert('insert into sightings (user_id, image, location, description, created_at, rank) values (?, ?, ?, ?, ?, ?)', [$id, $imageName, $loc, $des, $upldTime, 5]);\n\t\tRankController::updateUsrRank();\n \n\n return back()\n\n ->with('success','You have successfully uploaded your sighting.')\n\n ->with('image',$imageName);\n\n }", "title": "" }, { "docid": "e6017706dd1cac80e6b66071252d5af4", "score": "0.6337224", "text": "public function store(Request $request)\n {\n $vehicle = new Vehicle();\n $vehicle->brand = $request->brand;\n $vehicle->model = $request->model;\n $vehicle->engine = $request->engine;\n $vehicle->power = $request->power;\n $vehicle->milage = $request->milage;\n $vehicle->smec = $request->smec;\n $vehicle->ignition = $request->ignition;\n $vehicle->transmission = $request->transmission;\n $vehicle->price = $request->price;\n $vehicle->description = $request->description;\n\n //save the file\n // $path = Storage::putFile('photos/vehicles', $request->file('image'));\n // $path = $request->file('image')->store('public/photos/vehicles');\n $image = $request->file('image');\n \n $thumb_name = $vehicle->brand . $vehicle->model . \"thumb.jpg\";\n $image_name = $vehicle->brand . $vehicle->model . \".jpg\";\n \n $vehicle->thumb = $thumb_name;\n $vehicle->image = $image_name;\n\n $this->storeImages($image, $thumb_name, $image_name);\n\n // dd($thumb);\n\n $vehicle->save();\n\n return redirect()->route('vehicles.create');\n }", "title": "" }, { "docid": "0bee4e51b73dc1321ccd682b74cacdfa", "score": "0.6280701", "text": "public function postAdd(Request $request){\n if($request->hasFile('fImages')){\n // get file:\n $file = $request->file('fImages');\n\n //get file name:\n $fileName = $file->getClientOriginalName('myFile');\n\n //move file:\n $file->move('public/images', $fileName);\n\n //Add another information:\n $addProduct = new Product();\n $addProduct->name = $request->txtName;\n $addProduct->alias = $request->txtName;\n $addProduct->price = $request->txtPrice;\n $addProduct->intro = $request->txtIntro;\n $addProduct->content = $request->txtContent;\n $addProduct->image = $fileName;\n $addProduct->keywords = $request->txtKeywords;\n $addProduct->description = $request->txtDescription;\n $addProduct->user_id = $_SESSION['currentUser']->id;\n $addProduct->cate_id = $request->slt;\n $addProduct->save();\n $productId = $addProduct->id;\n if ($request->hasFile('fDetailImages')) {\n // echo \"<pre>\";\n // print_r($request->file('fDetailImages'));\n // echo \"</pre>\";\n $detailImages = $request->file('fDetailImages');\n foreach ($detailImages as $detailImage) {\n $uploadDetailImage = new ProductImage();\n if (isset($detailImage)) {\n $uploadDetailImage->images = $detailImage->getClientOriginalName();\n $uploadDetailImage->product_id = $productId;\n $detailImage->move('public/images/detailImg', $detailImage->getClientOriginalName());\n $uploadDetailImage->save();\n }\n }\n }\n }\n return redirect()->route('getProductList');\n }", "title": "" }, { "docid": "43bd698af91b3aa28914c5b2a5fa2006", "score": "0.62672687", "text": "public function actionUpload()\n\t{\n\t\tif(isset($_POST['ProductImage'])){\n\t\t\t$id = $_POST['model_id'];\n\t\t\tif(isset($_FILES['ProductImage']['name']['image']) && !empty($_FILES['ProductImage']['name']['image']))\n\t\t\t{\n\t\t\t\t$field = 'image';\n\t\t\t}else if(isset($_FILES['ProductImage']['name']['image2']) && !empty($_FILES['ProductImage']['name']['image2']))\n\t\t\t{\n\t\t\t\t$field = 'image2';\n\t\t\t}else if(isset($_FILES['ProductImage']['name']['image3']) && !empty($_FILES['ProductImage']['name']['image3']))\n\t\t\t{\n\t\t\t\t$field = 'image3';\n\t\t\t}else if(isset($_FILES['ProductImage']['name']['image4']) && !empty($_FILES['ProductImage']['name']['image4']))\n\t\t\t{\n\t\t\t\t$field = 'image4';\n\t\t\t}\n\t\t\t$directory = array_keys(Yii::app()->params['shop']['images']);\n\t\t\t$media_path = Yii::app()->params['shop_path'];\n\t\t\t//get file type and check avaiable\n\t\t\t\n\t\t\t$file = $_FILES['ProductImage']['name'][$field];\n\t\t\t$file = utf8_decode($file);\n\t\t\t$file = preg_replace(\"/[^a-zA-Z0-9_.\\-\\[\\]]/i\", \"\", strtr($file, \"()áàâãäéèêëíìîïóòôõöúùûüçÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ% \", \"[]aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC__\"));\n\t\t\t$file = strtolower($file);\n\t\t\t$filepath = pathinfo($file);\n\t\t\t$file_type_avaiable = $_POST['fileext'];\n\t\t\t$ext_file = $filepath['extension'];\n\t\t\t//check file type is avaiable?\n\t\t\t\t$fileTypes = str_replace('*.','',$file_type_avaiable);\n\t\t\t\t$fileTypes = str_replace(';','|',$fileTypes);\n\t\t\t\t$typesArray = @split('\\|',$fileTypes);\n\t\t\t\n\t\t\tif (!in_array($ext_file,$typesArray)) { \n\t\t\t\techo 'error_file_type';\n\t\t\t\tYii::app()->end();\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$myPicture=CUploadedFile::getInstanceByName(\"ProductImage[$field]\");\n\t\t\t\t\n\t\t\t\t$image_name = Common::EncryptClientId($id).time().'_'.$field.'.'.$ext_file;\n\t\t\t\t\n\t\t\t\t$dir_full = $media_path.'/full';\n\t\t\t\tif(is_dir($dir_full)==false) mkdir($dir_full);\n\t\t\t\t\n\t\t\t\tif($myPicture->saveAs($dir_full.'/'.$image_name)){\n\t\t\t\t\t//update to db\n\t\t\t\t\t//$model = new Products($id);\n\t\t\t\t\t$model = $this->loadModel($id, 'Products');\n\t\t\t\t\t//echo 'error_file_upload';echo $model->image;die('dcm');\n\t\t\t\t\tif($model->$field!=''){\n\t\t\t\t\t\tforeach ($directory as $dir){\n\t\t\t\t\t\t\t@unlink($media_path.'/full/'.$model->$field);\n\t\t\t\t\t\t\tif(is_file($media_path.'/'.$dir.'/'.$model->$field)){\n\t\t\t\t\t\t\t\t@unlink($media_path.'/'.$dir.'/'.$model->$field);\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\t//resize\n\t\t\t\t\tforeach ($directory as $dir){\n\t\t\t\t\t\t$image = Yii::app()->image->load($dir_full.'/'.$image_name);\n\t\t\t\t\t\t//$image->resize($_POST['size_x'], $_POST['size_y']);\n\t\t\t\t\t\t$width = Yii::app()->params['shop']['images'][$dir]['width'];\n\t\t\t\t\t\t$sub_dir = $media_path.'/'.$dir;\n\t\t\t\t\t\tif(is_dir($sub_dir)==false) {\n\t\t\t\t\t\t\tmkdir($sub_dir); chmod($sub_dir, 0777);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$image->resize($width, NULL);\n\t\t\t\t\t\t$image->save($sub_dir.'/'.$image_name);\n\t\t\t\t\t}\n\t\t\t\t\t$model->$field = $image_name;\n\t\t\t\t\t$model->save();\n\t\t\t\t\techo Yii::app()->params['shop_url'].'/'.$directory[0].'/'.$image_name;\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t echo 'error_file_upload';\n\t\t\t\t Yii::app()->end();\n\t\t\t\t}\n\t\t\t}\n\t \t}\n\t \tYii::app()->end();\n\t}", "title": "" }, { "docid": "974e7a84f1202ed743c06db883a22b04", "score": "0.62610507", "text": "public function store(Request $request)\n {\n //\n $inputs = $request->all();\n $validator = Validator::make($inputs,Item::createRules());\n if($validator->fails()){\n return redirect()->back()->withErrors($validator);\n }\n $inputs['user_id'] = \\Auth::user()->id;\n $images = [];\n $item = Item::create($inputs);\n\n if($request->hasFile('images'))\n $images = array();\n foreach($request->file('images') as $file)\n {\n $filename = $file->getClientOriginalName();\n $path = public_path('uploads/temp'.$filename);\n Image::make($file->getRealPath())->resize(600,500)->save($path);\n Cloudder::upload($path,null,array('use_filename'=>true,'version'=>true));\n $result = Cloudder::getResult();\n $item_image = new ItemImage();\n $item_image->public_id = $result['public_id'];\n $item_image->url = $result['url'];\n array_push($images,$item_image);\n unlink($path);\n }\n if(!empty($images))\n $item->images()->saveMany($images);\n $this->setFlashMessage(\"You added a new item\",1);\n return redirect('/');\n }", "title": "" }, { "docid": "b38b547f124292c4740ec3dc198b6d38", "score": "0.6224645", "text": "public function add_photo(Request $request){\n \n $deviceType = $request->deviceType;\n $deviceID = $request->deviceID;\n $userToken = $request->userToken;\n \n $access = $this->ApiCommonHelper->check_valid_version($request->v_code, $request->apikey);\n\n if($access == 1){\n\n // creating Hash for Image.\n if((!empty($request->user_id)) && (!empty($request->product_id)) && (!empty($request->type)) && (!empty($request->title)) && (!empty($request->description)) && (!empty($request->file('media')))){\n\n $userid = $request->user_id;\n $product_id = $request->product_id;\n $type = $request->type;\n $media = $request->media;\n $title = $request->title;\n $description = $request->description;\n $app_timestamp = $request->app_timestamp;\n $privacy = $request->privacy;\n $gps = (!empty($request->gps))? $request->gps : '';\n\n $file = $request->file('media');\n\n $destinationPath = public_path().'/images/'.$userid.'/'.$product_id;\n\n $ext = $file->guessClientExtension(); \n $fullname = $file->getClientOriginalName(); \n $hash_code = hash('sha256', $fullname . strval(time()));\n $hashname = $hash_code.'.'.$ext; \n\n if($file->move($destinationPath, $hashname)){\n\n $models = new Media;\n $models->user_id = $userid;\n $models->product_id = $product_id;\n $models->category = $type;\n $models->title = $title;\n $models->description = $description;\n $models->media_type = $ext;\n $models->file = $hashname;\n $models->privacy = $privacy;\n $models->hash_code = $hash_code;\n $models->app_timestamp = $app_timestamp;\n $models->gps = $gps;\n\n if($models->save()){\n \n //To update status of upload_tep_status\n \n $check_required_status = Media::where(array('product_id'=>$product_id,'user_id'=>$userid))->get();\n $required = array(10,11,12,13);\n $uploaded = array();\n foreach($check_required_status as $status)\n {\n $uploaded[] = $status->category;\n } \n \n $aa = array_values(array_intersect($required,$uploaded));\n sort($required);\n sort($aa);\n if($required==$aa)\n { \n $pro = DB::table('products')->where('id',$product_id)->first();\n $string = $pro->upload_step_status;\n $step_status= explode(',', $string);\n if(in_array(2, $step_status))\n {\n //nothing happen\n }else{\n $final_string = $string.\",2\";\n $aa = explode(',',$final_string);\n sort($aa);\n $final_string = implode (\",\", $aa);\n DB::table('products')->where('id',$product_id)->update(array('upload_step_status'=>$final_string));\n }\n }\n \n\n $this->res['successBool'] = true;\n $this->res['successCode'] = \"200\";\n $this->res['responseType'] = \"add_media\";\n $this->res['response']['message'] = 'Media File Uploaded Successfully..';\n $this->res['response']['data'] = array('media_id'=>$models->id,'user_id' => $userid, 'product_id' => $product_id, 'category' => $type, 'title' => $title, 'description' => $description, 'media_type' => $ext, 'file' => url('/public').'/images/'.$userid.'/'.$product_id.'/'.$hashname, 'hash_code' => $hash_code,'app_timestamp'=>$app_timestamp, 'gps'=>$gps);\n\n\n }else{\n\n $this->res['successBool'] = false;\n $this->res['ErrorObj']['ErrorCode'] = \"105\";\n $this->res['ErrorObj']['ErrorMsg'] = 'Some thing went wrong in Query..'; \n\n }\n }else{\n\n $this->res['successBool'] = false;\n $this->res['ErrorObj']['ErrorCode'] = \"105\";\n $this->res['ErrorObj']['ErrorMsg'] = 'Media Files are not correct.';\n\n }\n\n }else{\n\n $this->res['successBool'] = false;\n $this->res['ErrorObj']['ErrorCode'] = \"105\";\n $this->res['ErrorObj']['ErrorMsg'] = 'Some Required fields are missing..'; \n\n }\n\n }else{\n\n $this->res['successBool'] = false;\n $this->res['ErrorObj']['ErrorCode'] = \"105\";\n $this->res['ErrorObj']['ErrorMsg'] = $access;\n\n } \n\n $this->ApiCommonHelper->error_log('', $this->res);\n header('access-control-allow-credentials: true');\n header('content-type: application/json');\n return response()->json($this->res);\n \n }", "title": "" }, { "docid": "2a592b1a9b09f9a2b1bc21511a031eb0", "score": "0.6213224", "text": "public function postUpload($product_id)\n {\n try {\n $input = Input::all();\n $rules = array(\n // 'file' => 'image|max:3000',\n );\n $validation = Validator::make($input, $rules);\n if ($validation->fails()) {\n return Response::make($validation->errors->first(), 400);\n }\n $file = Input::file('file');\n $id = $product_id;\n $destinationPath = 'uploads/products/';\n $ext = $file->guessClientExtension();\n $fullname = $file->getClientOriginalName();\n $hashname = date('H.i.s') . '-' . md5($fullname) . '.' . $ext;\n $picture = Image::make($file->getRealPath());\n $picture->fit(530, 440)->save(public_path($destinationPath . $hashname));\n $picture->fit(250, 175)->save(public_path('uploads/product_thumbnails/' . $hashname));\n \n $models = new ProductPictures;\n $models->filename = $destinationPath . $hashname;\n $models->product_id = $id;\n $models->main_pic = 0;\n $models->thumbnail_location = 'uploads/product_thumbnails/' . $hashname;\n $models->save();\n \n return Response::json(array('status' => 'success', 'picture' => $models), 200);\n } catch (Exception $ex) {\n return Response::json(array('status' => 'error', 'error' => $ex->getMessage(), 'line' => $ex->getLine()), 500);\n }\n }", "title": "" }, { "docid": "d4da1cd3b60046bec2dfb755352a15c5", "score": "0.6195031", "text": "public function update_vehicle(){\n\t\t\t\n\t\t\t$file_uploaded = false;\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\t\n\t\t\t$id = html_escape($this->input->post('vehicleID'));\n\t\t\t\n\t\t\t$vehicle_id = preg_replace('#[^0-9]#i', '', $id); // filter everything but numbers\n\t\t\t\n\t\t\t//isset($_FILES[\"vehicle_image\"])\n\t\t\t\t\n\t\t\tif(!empty($_FILES['vehicle_image']['name'])){\n\n\t\t\t\t$path = './uploads/vehicles/'.$vehicle_id.'/';\n\t\t\t\t\n\t\t\t\tif(!is_dir($path)){\n\t\t\t\t\tmkdir($path,0777);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$config['upload_path'] = $path;\n\t\t\t\t$config['allowed_types'] = 'gif|jpg|jpeg|png';\n\t\t\t\t$config['max_size'] = 2048000;\n\t\t\t\t$config['max_width'] = 3048;\n\t\t\t\t$config['max_height'] = 2048;\n\t\t\t\t\n\t\t\t\t$file = $_FILES['vehicle_image']['name'];\n\t\t\t\t//$ext = $this->Files->getFileExtension($file);\n\t\t\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\t\t\t\t\t\t\n\t\t\t\t//$config['file_name'] = $vehicle_id.'.jpg';\n\t\t\t\t$config['file_name'] = $vehicle_id.'.'.$ext;\n\t\t\t\t\n\t\t\t\t$this->load->library('upload', $config);\t\n\n\t\t\t\t$this->upload->overwrite = true;\n\t\t\t\t\n\t\t\t\t$file_uploaded = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t$this->load->library('form_validation');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('vehicle_type','Type','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_make','Make','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_model','Model','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('year_of_manufacture','Year of Manufacture','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_odometer','Odometer','trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_lot_number','Lot Number','trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_vin','Vin','trim|xss_clean');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('vehicle_colour','Colour','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_price','Price','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_location_city','Location City','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_location_country','Location Country','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('vehicle_description','Description','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('sale_status','Sale Status','required|trim|xss_clean');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('discount','Discount','trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('price_after_discount','Discount Price','trim|xss_clean');\n\t\t\t\n\t\t\t\n\t\t\t$this->form_validation->set_message('required', '%s cannot be blank!');\n\t\t\t\t\n\t\t\tif ($this->form_validation->run()){\n\t\t\t\t\n\t\t\t\t$email = $this->session->userdata('email');\n\t\t\t\t\n\t\t\t\t//get vehicle from db\n\t\t\t\t$vehicle_array = $this->Vehicles->get_vehicles_by_id($vehicle_id);\n\t\t\t\t\n\t\t\t\t//initialise file name\n\t\t\t\t$new_vehicle_image = '';\n\t\t\t\t\n\t\t\t\t//check for any uploaded file\n\t\t\t\tif($file_uploaded){\n\t\t\t\t\t\n\t\t\t\t\tif($this->upload->do_upload('vehicle_image')){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$upload_data = $this->upload->data();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//$file_name = '';\n\t\t\t\t\t\tif (isset($upload_data['file_name'])){\n\t\t\t\t\t\t\t$new_vehicle_image = $upload_data['file_name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//$new_vehicle_image = $file_name;\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//failure to upload, store errors\n\t\t\t\t\t\tif($this->upload->display_errors()){\n\t\t\t\t\t\t\t$data['upload_error'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$this->upload->display_errors().'</div>';\n\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//no new uploads\n\t\t\t\t}else{\n\t\t\t\t\tforeach($vehicle_array as $vehicle){\n\t\t\t\t\t\t$new_vehicle_image = $vehicle->vehicle_image;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$make_array = $this->Vehicle_makes->get_make_by_id($this->input->post('vehicle_make'));\n\t\t\t\t\n\t\t\t\t$vehicle_make = '';\n\t\t\t\tif($make_array){\n\t\t\t\t\tforeach($make_array as $make){\n\t\t\t\t\t\t$vehicle_make = $make->title;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$update = array(\n\t\t\t\t\t'vehicle_image' => $new_vehicle_image,\n\t\t\t\t\t'vehicle_type' => $this->input->post('vehicle_type'),\n\t\t\t\t\t'vehicle_make' => ucwords($vehicle_make),\n\t\t\t\t\t'vehicle_model' => $this->input->post('vehicle_model'),\n\t\t\t\t\t'year_of_manufacture' => $this->input->post('year_of_manufacture'),\n\t\t\t\t\t'vehicle_odometer' => $this->input->post('vehicle_odometer'),\n\t\t\t\t\t'vehicle_lot_number' => $this->input->post('vehicle_lot_number'),\n\t\t\t\t\t'vehicle_vin' => $this->input->post('vehicle_vin'),\n\t\t\t\t\t'vehicle_colour' => $this->input->post('vehicle_colour'),\n\t\t\t\t\t'vehicle_price' => $this->input->post('vehicle_price'),\n\t\t\t\t\t'vehicle_location_city' => $this->input->post('vehicle_location_city'),\n\t\t\t\t\t'vehicle_location_country' => $this->input->post('vehicle_location_country'),\n\t\t\t\t\t'vehicle_description' => $this->input->post('vehicle_description'),\n\t\t\t\t\t'sale_status' => $this->input->post('sale_status'),\n\t\t\t\t\t'trader_email' => $email,\t\n\t\t\t\t\t'discount' => $this->input->post('discount'),\n\t\t\t\t\t'price_after_discount' => $this->input->post('price_after_discount'),\n\t\t\t\t\t'last_updated' => date('Y-m-d H:i:s'),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif ($this->Vehicles->update_vehicle($update, $vehicle_id)){\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$user_array = $this->Users->get_user($email);\n\t\t\t\t\t\n\t\t\t\t\t$fullname = '';\n\t\t\t\t\tif($user_array){\n\t\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t\t$fullname = $user->first_name.' '.$user->last_name;\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//CHECK IF ALERT NOTIFICATION IS ON\n\t\t\t\t\tif($this->Email_alerts->alert_on($email)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//SEND EMAIL NOTIFICATION\n\t\t\t\t\t\t$vehicle_title = ucwords($vehicle_make.' '.$this->input->post('vehicle_model'));\n\t\t\t\t\t\t$year = $this->input->post('year_of_manufacture');\n\t\t\t\t\t\t$colour = $this->input->post('vehicle_colour');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$to = $email;\n\t\t\t\t\t\t$subject = 'Updated Listing - '.$year.' '.$vehicle_title ;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$link = base_url('account/vehicles');\n\t\t\t\t\t\t\n\t\t\t\t\t\t//compose email message\n\t\t\t\t\t\t$message = \"<p>You have successfully updated your listing.</p>\";\n\t\t\t\t\t\t$message .= '<p>Item: '.$year.' '.$vehicle_title.' - '.$colour.' .</p>';\n\t\t\t\t\t\t$message .= '<p><a title=\"Vehicles\" href=\"'.base_url('account/vehicles').'\" class=\"link\">View and manage your listings here</a></p>';\n\n\t\t\t\t\t\t$this->Messages->send_email_alert($to, $subject, $fullname, $message);\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//update activities table\n\t\t\t\t\t$description = 'updated <i>'.$vehicle_title.'</i>';\n\t\t\t\t\n\t\t\t\t\t$activity = array(\t\t\t\n\t\t\t\t\t\t'name' => $fullname,\n\t\t\t\t\t\t'username' => $email,\n\t\t\t\t\t\t'description' => $description,\n\t\t\t\t\t\t'keyword' => 'Vehicle',\n\t\t\t\t\t\t'activity_time' => date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t$this->Site_activities->insert_activity($activity);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> '.$vehicle_title.' updated!</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"text-center\" role=\"alert\">'.validation_errors().'</div>';\n\t\t\t}\n\t\t\t// Encode the data into JSON\n\t\t\t//$this->output->set_content_type('application/json');\n\t\t\t//$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t//$this->output->set_output($data);\n\t\t\techo json_encode($data);\t\t\t\n\t\t}", "title": "" }, { "docid": "e9b8b4bc3e21cb7334603bdc0484feaf", "score": "0.6174635", "text": "public function actionUpload_image_variant($id=0)\n\t{\t\t\t\n\t\t$app = Yii::app();\n\t\t$current_datetime = date('Y-m-d H:i:s');\n\t\t$current_id_user = $app->user->getId();\t\n\t\t$id = (int)$id;\n\n\t\t$criteria=new CDbCriteria; \n\t\t$criteria->condition='id=:id'; \n\t\t$criteria->params=array(':id'=>$id); \t\t\n\t\t\n\t\tif (!Tbl_ProductImageVariant::model()->count($criteria)) {\n\t\t\tthrow new CException(Yii::t('global','ERROR_INVALID_ID'));\t\n\t\t}\t\t\t\t\t\t\t\n\t\t\n\t\t// if id is not set\n\t\tif (!empty($_FILES)) {\n\t\t\t$tempFile = $_FILES['Filedata']['tmp_name'];\n\t\t\t$targetPath = $app->params['product_images_base_path'];\n\t\t\t$targetFile = $_FILES['Filedata']['name'];\n\t\t\t$ext = strtolower(trim(pathinfo($targetFile, PATHINFO_EXTENSION)));\n\t\t\t$force_crop = 0;\n\t\t\t$allowed_ext = array(\n\t\t\t\t'gif',\n\t\t\t\t'jpeg',\n\t\t\t\t'jpg',\n\t\t\t\t'png',\n\t\t\t);\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (empty($ext) || !in_array($ext, $allowed_ext)) {\n\t\t\t\techo Yii::t('global','ERROR_ALLOWED_IMAGES');\t\t\t\t\n\t\t\t\texit;\n\t\t\t} else {\t\n\t\t\t\t// get current product image cover\n\t\t\t\t$criteria=new CDbCriteria; \n\t\t\t\t$criteria->condition='id_product_image_variant=:id_product_image_variant AND cover=1'; \n\t\t\t\t$criteria->params=array(':id_product_image_variant'=>$id); \t\n\t\t\t\t\t\n\t\t\t\t$cover = Tbl_ProductImageVariantImage::model()->count($criteria);\n\t\t\t\t\n\t\t\t\t$criteria->condition='id_product_image_variant=:id_product_image_variant'; \n\t\t\t\t$criteria->order='sort_order DESC';\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t// insert new image\n\t\t\t\t$product_image = new Tbl_ProductImageVariantImage;\n\t\t\t\t$product_image->id_product_image_variant = $id;\n\t\t\t\t$product_image->sort_order = (Tbl_ProductImageVariantImage::model()->find($criteria)->sort_order)+1;\t\n\t\t\t\t$product_image->cover = $cover ? 0:1;\t\n\t\t\t\t$product_image->id_user_created = $current_id_user;\n\t\t\t\t$product_image->id_user_modified = $current_id_user;\t\t\t\t\n\t\t\t\t$product_image->date_created = $current_datetime;\n\t\t\t\tif (!$product_image->save()) {\n\t\t\t\t\techo Yii::t('controllers/ProductsController','ERROR_SAVING');\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$id_image = $product_image->id;\n\t\t\t\t\n\t\t\t\t// original file renamed\n\t\t\t\t$original = md5($targetFile.time()).'.'.$ext;\t\n\t\t\t\t$filename = md5($original).'.jpg';\t\t\t\t\n\t\t\t\n\t\t\t\t$image = new SimpleImage();\n\t\t\t\tif (!$image->load($tempFile)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// save original\n\t\t\t\tif (!$image->save($targetPath.'original/'.$original)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_SAVE_ORIGINAL_FAILED');\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$width = $image->getWidth();\n\t\t\t\t$height = $image->getHeight();\n\t\t\t\t\n\t\t\t\tif (!$width || !$height) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// vs\n\t\t\t\tswitch ($app->params['images_orientation']) {\n\t\t\t\t\tcase 'portrait':\n\t\t\t\t\t\t$default_zoom_width = $app->params['portrait_zoom_width'];\n\t\t\t\t\t\t$default_zoom_height = $app->params['portrait_zoom_height'];\n\t\t\n\t\t\t\t\t\t$default_cover_width = $app->params['portrait_cover_width'];\n\t\t\t\t\t\t$default_cover_height = $app->params['portrait_cover_height'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$default_listing_width = $app->params['portrait_listing_width'];\n\t\t\t\t\t\t$default_listing_height = $app->params['portrait_listing_height'];\n\t\t\n\t\t\t\t\t\t$default_suggest_width = $app->params['portrait_suggest_width'];\n\t\t\t\t\t\t$default_suggest_height = $app->params['portrait_suggest_height'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$default_thumb_width = $app->params['portrait_thumb_width'];\n\t\t\t\t\t\t$default_thumb_height = $app->params['portrait_thumb_height'];\n\t\t\t\t\t\n\t\t\t\t\t\t// if our image size is smaller than our min 800x600\n\t\t\t\t\t\tif ($width < $default_width || $height < $default_heigh) { \n\t\t\t\t\t\t\t// delete\n\t\t\t\t\t\t\t$product_image->delete();\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo Yii::t('global', 'ERROR_MIN_IMAGE_RESOLUTION', array('{width}'=>$default_zoom_width,'{height}'=>$default_zoom_height));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\texit;\n\t\t\t\t\t\t// ratio is not correct, force crop\n\t\t\t\t\t\t} else if (($width/$height) != 0.75) {\n\t\t\t\t\t\t\t$force_crop = 1;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'landscape':\n\t\t\t\t\t\t$default_zoom_width = $app->params['landscape_zoom_width'];\n\t\t\t\t\t\t$default_zoom_height = $app->params['landscape_zoom_height'];\n\t\t\n\t\t\t\t\t\t$default_cover_width = $app->params['landscape_cover_width'];\n\t\t\t\t\t\t$default_cover_height = $app->params['landscape_cover_height'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$default_listing_width = $app->params['landscape_listing_width'];\n\t\t\t\t\t\t$default_listing_height = $app->params['landscape_listing_height'];\n\t\t\n\t\t\t\t\t\t$default_suggest_width = $app->params['landscape_suggest_width'];\n\t\t\t\t\t\t$default_suggest_height = $app->params['landscape_suggest_height'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$default_thumb_width = $app->params['landscape_thumb_width'];\n\t\t\t\t\t\t$default_thumb_height = $app->params['landscape_thumb_height'];\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t// if our image size is smaller than our min 800x600\n\t\t\t\t\t\t/*if ($width < $default_zoom_width || $height < $default_zoom_height) { \n\t\t\t\t\t\t\t// delete\n\t\t\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo Yii::t('global', 'ERROR_MIN_IMAGE_RESOLUTION', array('{width}'=>$default_zoom_width,'{height}'=>$default_zoom_height));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\texit;\n\t\t\t\t\t\t// ratio is not correct, force crop\n\t\t\t\t\t\t} else*/ if (($height/$width) != 0.75) {\n\t\t\t\t\t\t\t$force_crop = 1;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t// save image ZOOM\n\t\t\t\tif ($width > $default_zoom_width && !$image->resizeToWidth($default_zoom_width)) {\n\t\t\t\t//if (!$image->resize($default_zoom_width,$default_zoom_height)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_ZOOM_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\n\t\t\t\t} else if (!$image->save($targetPath.'zoom/'.$filename)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_SAVE_ZOOM_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// save image COVER\n\t\t\t\tif ($width > $default_cover_width && !$image->resizeToWidth($default_cover_width)) {\n\t\t\t\t//if (!$image->resize($default_cover_width,$default_cover_height)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_COVER_FAILED');\t\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else if (!$image->save($targetPath.'cover/'.$filename)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_SAVE_COVER_FAILED');\t\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// save image LISTING\n\t\t\t\tif ($width > $height && !$image->resizeToWidth($default_listing_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_LISTING_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t} else if ($height > $width && !$image->resizeToHeight($default_listing_height)) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_LISTING_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\n\t\t\t\t} else if ($width == $height && $default_listing_width < $default_listing_height && !$image->resizeToWidth($default_listing_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_LISTING_FAILED');\t\t\t\t\n\t\t\t\t\texit;\n\t\t\t\t} else if ($width == $height && $default_listing_width > $default_listing_height && !$image->resizeToHeight($default_listing_height)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_LISTING_FAILED');\t\t\t\t\n\t\t\t\t\texit;\n\t\t\t\t} else if (!$image->save($targetPath.'listing/'.$filename)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_LISTING_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// save image SUGGEST\n\t\t\t\tif ($width > $height && !$image->resizeToWidth($default_suggest_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_SUGGEST_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t} else if ($height > $width && !$image->resizeToHeight($default_suggest_height)) {\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// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_SUGGEST_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\n\t\t\t\t} else if ($width == $height && $default_suggest_width < $default_suggest_height && !$image->resizeToWidth($default_suggest_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_SUGGEST_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\n\t\t\t\t} else if ($width == $height && $default_suggest_width > $default_suggest_height && !$image->resizeToHeight($default_suggest_height)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_SUGGEST_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\n\t\t\t\t} else if (!$image->save($targetPath.'suggest/'.$filename)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_SUGGEST_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// save image THUMB\n\t\t\t\tif ($width > $height && !$image->resizeToWidth($default_thumb_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_THUMB_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\n\t\t\t\t} else if ($height > $width && !$image->resizeToHeight($default_thumb_height)) {\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\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_THUMB_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t} else if ($width == $height && $default_thumb_width < $default_thumb_height && !$image->resizeToWidth($default_thumb_width)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_THUMB_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\n\t\t\t\t} else if ($width == $height && $default_thumb_width > $default_thumb_height && !$image->resizeToHeight($default_thumb_height)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_THUMB_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\n\t\t\t\t} else if (!$image->save($targetPath.'thumb/'.$filename)) {\n\t\t\t\t\t// delete\n\t\t\t\t\t$product_image->delete();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_THUMB_FAILED');\t\t\t\t\n\t\t\t\t\texit;\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// free up memory\n\t\t\t\t$image->destroy();\n\t\t\t\t\n\t\t\t\t// update image \n\t\t\t\t$product_image->force_crop = $force_crop;\n\t\t\t\t$product_image->original = $original;\n\t\t\t\t$product_image->filename = $filename;\n\t\t\t\t$product_image->save();\n\n\t\t\t\techo 'true';\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo Yii::t('global','ERROR_UPLOAD_IMAGE_FAILED');\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "0f29f5a266535fbb6d759ca7ce9bcb3c", "score": "0.6174601", "text": "public function store(Request $request)\n {\n\n $item = new Item();\n\n $item->name = $request->name;\n $item->description = $request->description;\n $item->initial_price = $request->initial_price;\n $item->market_price = $request->market_price;\n $item->end_date_time = Carbon::parse($request->end_date_time);\n $item->category_id = $request->categories;\n\n\n $image_file = $request->file('image');\n $filename = $request->user_id . '_' . $image_file->getClientOriginalName();\n\n if($image_file){\n Storage::disk('local')->put($filename, File::get($image_file));\n }\n\n $item->image_name = $filename;\n\n $item->save();\n\n return redirect('/items');\n\n }", "title": "" }, { "docid": "7774f87ed2ea5f0dff085f41604aeeca", "score": "0.6172321", "text": "public function upload()\n {\n // Grava a imagem original no servidor\n move_uploaded_file($this->getTmpName(), $this->getOriginalImagePath());\n\n // Atualiza o path da imagem\n $this->getImage()->setFileName($this->getOriginalImagePath());\n $this->getImage()->save();\n\n // Apaga todos os tamanhos de imagens\n $condition = sprintf(\"image_id = %s\", $this->getImage()->getId());\n ImageSize::deleteAll($condition); \n\n // Resize e crop dos tipos de imagens\n $this->resizeAndCropImageTypes();\n }", "title": "" }, { "docid": "5a5c54923d7c3f057cf943c7eb9addba", "score": "0.61723065", "text": "public function StoreImage(Request $request)\n {\n\n $image = $request->file('image');\n\n\n //to add multiple image you have to run foreach loop\n\n foreach($image as $multi_img)\n {\n $name_gen = hexdec(uniqid()).'.'.$multi_img ->getClientOriginalExtension();\n Image::make($multi_img )->resize(300,300)->save('image/multi/'.$name_gen );\n\n $last_img ='image/multi/'.$name_gen;\n\n\n //end upload image\n\n\n MultiPic::insert([\n\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n }//end of the foreach\n\n\n\n return redirect()->back()->with('success','brand Inserted successfully');\n }", "title": "" }, { "docid": "83691bf4eddd3b920b4e8bbaca524cc3", "score": "0.61521125", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'description' => 'required',\n 'price' => 'required',\n 'beds' => 'required',\n 'cover_image' => 'image|nullable|max:1999',\n \n ]);\n\n $motorhome = new Motorhome;\n $motorhome->description = $request->input('description') ;\n $motorhome->user_id =auth()->user()->id; \n $motorhome->model_id= $request->input('model');\n $motorhome->beds= $request->input('beds');\n $motorhome->price= $request->input('price');\n $motorhome->save();\n\n if($request->hasFile('photos'))\n {\n $allowedfileExtension=['pdf','jpg','png','docx'];\n $files = $request->file('photos');\n foreach($files as $file)\n {\n $filename = $file->getClientOriginalName();\n $extension = $file->getClientOriginalExtension();\n $check=in_array($extension,$allowedfileExtension);\n //dd($check);\n if($check)\n {\n //$items = Item::create($request->all());\n foreach ($request->photos as $photo) \n {\n $filename = $photo->store('public/cover_images');\n $insert = new Photo;\n $insert->motorhome_id = $motorhome->id;\n $insert->url = substr($filename, 6);\n $insert->save();\n }\n return redirect('/motorhomes')->with('success', 'Motorhome added');\n }\n else\n {\n return redirect()->back()->with('error', 'Please only upload png or jpg images');\n }\n }\n }\n else{\n $fileNameToStore='noimage.jpg';\n }\n \n \n return redirect('/motorhomes')->with('success','Motorhome Added');\n\n }", "title": "" }, { "docid": "52f40a8ef38661f8ae23edbd8a421fed", "score": "0.6149678", "text": "public function insert_image()\n {\n if($_FILES[\"txt_image\"])\n {\n print_r($_FILES);\n $tmpname = $_FILES[\"txt_image\"][\"tmp_name\"];\n $originalname = $_FILES[\"txt_image\"][\"name\"];\n $size = ($_FILES[\"txt_image\"][\"size\"]/ 5242880) . \"MB<br>\";\n $type = $_FILES[\"txt_image\"][\"type\"];\n $image = $_FILES[\"txt_image\"][\"name\"];\n move_uploaded_file($_FILES[\"txt_image\"][\"tmp_name\"],\"images/\".$_FILES[\"txt_image\"][\"name\"]);\n }\n $upload = DB::getInstance()->insert('images',array(\n 'image_name' => $this->$tmpname,\n 'image' => $this->$image\n ));\n if($upload)\n {\n echo 'suceess';\n }\n else\n {\n echo 'error';\n }\n\n }", "title": "" }, { "docid": "9e4e3d59aab84c44d0a2c12d316a33b9", "score": "0.6145229", "text": "public function store(Request $request)\n {\n $item = new TravelTour;\n\n if($file=$request->file('logo')){ \n \n $handle = new UploadClass($file);\n if ($handle->uploaded) {\n $handle->image_resize = true;\n $handle->image_ratio_y = true;\n $handle->image_x = 900;\n $handle->process('images/traveltours');\n if ($handle->processed) {\n $massage = 'image resized';\n $name=$handle->file_dst_name;\n $handle->clean();\n } else {\n $massage = 'error : ' . $handle->error;\n }\n } \n $item->logo = $name;\n }\n \n if($gallary=$request->file('file')){\n\n foreach($gallary as $singleimg){\n \n $handle = new UploadClass($singleimg);\n if ($handle->uploaded) {\n $handle->image_resize = true;\n $handle->image_ratio_y = true;\n $handle->image_x = 900;\n $handle->process('images/traveltours');\n if ($handle->processed) {\n $massage = 'image resized';\n $g_name[]=$handle->file_dst_name;\n $handle->clean();\n } else {\n $massage = 'error : ' . $handle->error;\n }\n }\n }\n\n $imgs = implode(\"|\",$g_name);\n $item->images = $imgs;\n \n }\n \n $item->name = $request->name;\n $item->slug = str_slug($request->name);\n $item->category = $request->category;\n $item->slug_category = str_slug($request->category);\n $item->details = $request->details;\n\n $item->save();\n\n flash('Successfully Added')->success();\n\n return redirect()->route('traveltours.show', str_slug($request->slug_category));\n }", "title": "" }, { "docid": "d52cb78734aa847b19f8c9f8d81ad0b0", "score": "0.6126023", "text": "public function image() {\n\t\tif (Input::hasFile('image') && Input::has('field_id')) {\n\t\t\treturn json_encode(self::saveImage(\n\t\t\t\tInput::get('field_id'), \n\t\t\t\tfile_get_contents(Input::file('image')),\n\t\t\t\tInput::file('image')->getClientOriginalName()\n\t\t\t));\n\n\t\t} elseif (!Input::hasFile('image')) {\n\t\t\treturn 'no image';\n\t\t} elseif (!Input::hasFile('field_id')) {\n\t\t\treturn 'no field_id';\n\t\t} else {\n\t\t\treturn 'neither image nor field_id';\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "8fe2e823c11cd7abea88aa690c8488e3", "score": "0.61227393", "text": "public function upload_images($id){\n\t\t\t \n\t\t\t\t$this->load->module(\"function_images\");\n\n $item_id = $id;\n \n\t\t\t\t// aps12\n //$this->load->module(\"function_users\");\n //$user_info = $this->function_users->get_user_fields(array(\"user_name\",\"user_id\"));\n $user_info = unserialize($this->native_session->get(\"user_info\"));\n\t\t\t\t\n\t\t\t\t$loc = base_url() .\"uploads/\". $user_info[\"user_name\"] . \"-\" . $user_info[\"user_id\"] . \"/watches-\" . $item_id .\"/\"; \n \n $i_folder = $this->get_item_fields(\"item_folder\",$item_id);\n $path = $i_folder .\"/\";\n \n $valid_formats = array(\"jpg\", \"png\", \"gif\", \"bmp\", \"jpeg\", \"JPG\", \"PNG\", \"GIF\", \"BMP\", \"JPEG\");\n \n if(count($_FILES) > 0)\n\t\t {\n\t\t\t\t\t$name = $_FILES['photoimg_add']['name'];\n\t\t\t\t\t$size = $_FILES['photoimg_add']['size'];\n\t\t\t\t\t$ID = $user_info['user_id'];\n\t\t\t\t\t\n\t\t\t\t\tif(strlen($name))\n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tlist($txt, $ext) = explode(\".\", $name);\n $img_part = explode(\".\", $name);\n $img_part_len = count($img_part) - 1;\n $txt = $img_part[0];\n $ext = $img_part[$img_part_len];\n\t\t\t\t\t\t\tif(in_array($ext,$valid_formats))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($size<(1024*1024))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$actual_image_name = time().substr(str_replace(\" \", \"_\", $txt), 5);\n $actual_image_name = preg_replace(\"/[^A-Z0-9a-z\\w ]/u\", '', $actual_image_name);\n $actual_image_name .= \".\".$ext;\n\t\t\t\t\t\t \t $tmp = $_FILES['photoimg_add']['tmp_name'];\n if(move_uploaded_file($tmp, $path.$actual_image_name))\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t$name_part = explode(\".\",$actual_image_name);\n $args = array(\"item_images\" => $loc . $actual_image_name); \n $images = $this->function_items->store_images($item_id,$args);\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\t\t\t\t\t$this->function_images->create_thumbnail($path.$actual_image_name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->function_images->resize_large($path.$actual_image_name, $name_part[0] .\"_large.\" . $name_part[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->display_images($images,$item_id,$i_folder);\n \t }\n\t\t\t\t\t\t\t else \n\t\t\t\t\t\t\t\t\t \t\t exit(\"Upload Error: Uploading failed! Please try again.\");\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else\n exit(\"Upload Error: Image file size max 1 MB!\");\t\t\t\t\t\n\t\t\t\t\t }\n\t\t\t\t\telse\n exit(\"Upload Error: Invalid file format!\");\t\t\t\t\t\n\t\t\t\t}\n\t\t\t else\n\t\t\t exit(\"Upload Error: Please select image..!\");\n\t\t\t } \n }", "title": "" }, { "docid": "4423625ed2cb791bd4810bec67fa9332", "score": "0.61223924", "text": "function PostAddProduct(Request $request)\n {\n $image = $request->file('image');\n $filename = time().'.'. $image->getClientOriginalExtension();\n\n $path = \"storage/CatalogPics/\".$filename;\n $pathToDb = \"/storage/CatalogPics/\".$filename;\n\n Image::make($image->getRealPath())->fit('400','280')->save($path);\n\n $name = $request->input('name');\n $description = $request->input('description');\n $price = $request->input('price');\n $image = $pathToDb;\n $category = $request->input('category');\n catalog::create([\n 'name'=>$name,\n 'description'=>$description,\n 'price'=>$price,\n 'image'=>$image,\n 'category'=>$category,\n ]);\n return redirect()->route('shopList');\n }", "title": "" }, { "docid": "1f39477b6f08ce193a924bca3a997f50", "score": "0.61162704", "text": "public function store(Request $request)\n {\n \n $item = new Item;\n $item->name = $request->name;\n $item->description = $request->description;\n $item->collection_id = $request->collection_id;\n // dd($item);\n $item->save();\n\n if ($item->image) {\n \n Item::storeImageItem($request, $item->id);\n }\n\n\n //return redirect()->back();\n }", "title": "" }, { "docid": "eb0c675ca17a1255dbbb72fbed70b7b2", "score": "0.61154944", "text": "public static function save_product_info($request)\n {\n $image = $request->file('product_image');\n $imageName = $image->getClientOriginalName();\n $directory ='public/product_image/';\n $img = Image::make($image)->resize(200, 200)->save($directory.$imageName);\n $productImage = new ProductImage();\n $productImage->product_id = $request->product_id;\n $productImage->featured_image = $request->featured_image;\n $productImage->product_image = $directory.$imageName;\n $productImage->save();\n }", "title": "" }, { "docid": "03e6aeaa24e52ecfa50ea36549dc1b2e", "score": "0.61122227", "text": "public function store(Request $req)\n {\n $req->validate([\n 'imageFile' => 'required',\n 'cover' => 'required|image|mimes:jpeg,png,jpg,gif,svg',\n 'imageFile.*' => 'mimes:jpeg,jpg,png,gif|max:2048'\n ]);\n if($req->hasfile('imageFile')) {\n foreach($req->file('imageFile') as $file)\n {\n $name = $file->getClientOriginalName();\n $file->move(public_path().'/uploads/', $name); \n $imgData[] = $name; \n }\n $activity = new activities;\n $activity->title = $req->title;\n $activity->date = $req->date;\n $activity->address = $req->address;\n $activity->ville = $req->ville;\n $imageName = time().'.'.$req->cover->extension(); \n $activity->cover = $imageName;\n $req->cover->move(public_path('images'), $imageName);\n $activity->save();\n $activity = activities::latest('created_at')->first();\n $fileModal = new pictures();\n $fileModal->name = json_encode($imgData);\n $fileModal->image_path = json_encode($imgData);\n $fileModal->activity_id = $activity->id; \n $fileModal->save();\n return back()->with('success', 'File has successfully uploaded!');\n }\n }", "title": "" }, { "docid": "b6e423af15295dcc677bb9f383787866", "score": "0.6109949", "text": "public function uploadImage()\n {\n $validatedImage = request()->validate([\n 'recipe_image' => ['nullable', 'image', 'max:500']\n ]);\n\n // Todo: check if already an image exists\n // If yes: delete it\n\n return \"storage/app/\" . request()->file('recipe_image')->storeAs('recipe_images', $this->str_replace_umlaute(request('name')));\n }", "title": "" }, { "docid": "1934741ffaa24fce7a7b9a4bc06767cb", "score": "0.61076915", "text": "public function update(Request $request, $travelTour)\n {\n $item = TravelTour::findOrFail($travelTour);\n\n if($file=$request->file('logo')){ \n \n $handle = new UploadClass($file);\n if ($handle->uploaded) {\n $handle->image_resize = true;\n $handle->image_ratio_y = true;\n $handle->image_x = 900;\n $handle->process('images/traveltours');\n if ($handle->processed) {\n \\File::delete('images/traveltours/'. $item->logo);\n $massage = 'image resized';\n $name=$handle->file_dst_name;\n $handle->clean();\n } else {\n $massage = 'error : ' . $handle->error;\n }\n } \n $item->logo = $name;\n }\n \n if($gallary=$request->file('file')){\n\n foreach($gallary as $singleimg){\n \n $handle = new UploadClass($singleimg);\n if ($handle->uploaded) {\n $handle->image_resize = true;\n $handle->image_ratio_y = true;\n $handle->image_x = 900;\n $handle->process('images/traveltours');\n if ($handle->processed) {\n $massage = 'image resized';\n $g_name[]=$handle->file_dst_name;\n $handle->clean();\n } else {\n $massage = 'error : ' . $handle->error;\n }\n }\n }\n\n if (!$item->images) {\n $imgs = implode(\"|\",$g_name);\n } else {\n $imgs = $item->images .'|'. implode(\"|\",$g_name);\n }\n\n $item->images = $imgs;\n \n }\n \n $item->name = $request->name;\n $item->slug = str_slug($request->name);\n $item->category = $request->category;\n $item->slug_category = str_slug($request->category);\n $item->details = $request->details;\n\n $item->save();\n\n flash('Successfully Update')->success();\n\n return redirect()->route('traveltours.show', str_slug($request->category));\n }", "title": "" }, { "docid": "61dd364fe37d8659bbe21e2a1dc195ad", "score": "0.6106997", "text": "public function storePlate(Request $request, $id){\n\n $validated = $request -> validate([\n 'name' => 'required|min:3|max:255',\n 'description' => 'required|min:3',\n 'image' => 'nullable|image|mimes:jpeg,png,jpg|max:2048',\n 'price' => 'required|between:0.01,99.99', \n 'visible' => 'required|boolean', \n\n ]);\n\n $restaurant = Restaurant::findOrFail($id);\n $plate = Plate::make($validated);\n $plate -> restaurant() -> associate($restaurant);\n \n if($request->file('image') != null){\n $img=$request->file('image');\n $imgExt = $img -> getClientOriginalExtension();\n $imgNewName = time() . '_plateImage.' . $imgExt;\n $folder = '/restaurant-plates/';\n $imgFile=$img->storeAs($folder,$imgNewName,'public'); \n $plate->image=$imgNewName;\n }\n else{\n $plate->image = 'default-plate.png';\n }\n $plate -> save();\n\n return redirect() -> route('plateList',encrypt($restaurant->id));\n }", "title": "" }, { "docid": "7c2a3bcfc2e207911789bc63f55041b6", "score": "0.61031026", "text": "public function admin_add_image($id) {\r\n $this->viewPath = 'shared';\r\n $this->layout = 'ajax';\r\n $data = $this->Files->uploadSave($this->params['form']['imageFile'], $id, 'Product');\r\n $this->set(compact('data'));\r\n }", "title": "" }, { "docid": "4e04d1fac3a3b58713cf584726fd1f6f", "score": "0.6100539", "text": "public function store(Request $request)\n {\n $item = new Item;\n $pictureInfo = $request->file('item_image');\n\n $picName = $pictureInfo->getClientOriginalName();\n\n $folder = \"itemImages/\";\n\n $pictureInfo->move($folder,$picName);\n\n $picUrl = $folder.$picName;\n if(Item::where('item_image', '=', $picUrl)->exists())\n {\n return redirect('/additems');\n }\n\n\n $item ->item_name=$request->item_name;\n $item ->item_type=$request->item_type;\n $item ->price=$request->price;\n $item ->item_description=$request->item_description; \n \n $item->item_image=$picUrl;\n\n $item->save();\n return redirect()->to('/additems')->with('success','New Item Added.');\n }", "title": "" }, { "docid": "2cd7fdb24b77a68670e8e817695a4a86", "score": "0.60985583", "text": "public function imageuploadAction() {\n $this->_helper->layout()->disableLayout();\n\n $product_id = (int) $this->getRequest()->getParam(\"product_id\");\n $photography_note = $this->getRequest()->getParam(\"photography_note\");\n\n\n\n if ($product_id) {\n\n $upload = new Zend_File_Transfer_Adapter_Http();\n\n if ($upload->isUploaded()) {\n\n $db = $this->_photographyMapper->getDbTable()->getDefaultAdapter();\n $db->beginTransaction();\n //pokud se nekde vyskytne chyba, provedu rollback a data nebudou ulozena, pokud vse probehne dobre, provedu commit\n try {\n\n $productId = \"product_\" . $product_id;\n\n $formatDirProduct = \"%s/%s\";\n $dirProduct = sprintf($formatDirProduct, IMAGE_UPLOAD_PATH, $productId);\n\n\n $formatPath = '%s/%s/%s';\n $dirOriginal = sprintf($formatPath, IMAGE_UPLOAD_PATH, $productId, \"original\");\n $dirList = sprintf($formatPath, IMAGE_UPLOAD_PATH, $productId, \"list\");\n $dirThumb = sprintf($formatPath, IMAGE_UPLOAD_PATH, $productId, \"thumb\");\n\n\n //ukladam fotky do slozek podle id produktu, pokud slozka neexistuje, tak ji vytvorim\n if (!is_dir($dirProduct)) {\n mkdir($dirProduct);\n }\n\n if (!is_dir($dirOriginal)) {\n mkdir($dirOriginal);\n }\n\n if (!is_dir($dirList)) {\n mkdir($dirList);\n }\n\n if (!is_dir($dirThumb)) {\n mkdir($dirThumb);\n }\n\n\n $upload->setDestination($dirOriginal);\n\n $baseName = new Zend_Filter_BaseName();\n $fileName = $baseName->filter($upload->getFileName());\n\n $filter = new Zend_Filter_Word_SeparatorToDash($searchSeparator = ' ');\n $img = $filter->filter(time() . \"_\" . $fileName);\n\n\n $img_path = $upload->getDestination() . \"/\" . $img;\n\n $upload->addFilter('Rename', $img_path);\n\n $upload->receive();\n\n $img_thumb_path = $dirThumb . \"/\" . $img;\n $img_list_path = $dirList . \"/\" . $img;\n\n $resize = new Filter_File_Resize_Adapter_Gd();\n $resize->resize(100, 100, true, $upload->getFileName(), $img_thumb_path);\n $resize->resize(350, 300, true, $upload->getFileName(), $img_list_path);\n\n $photography = new Admin_Model_Photography();\n $photography->setPhotography_path($img);\n $photography->setPhotography_product_id($product_id);\n $photography->setPhotography_note($photography_note);\n\n $this->_photographyMapper->save($photography);\n $lastPhotographyId = $this->_photographyMapper->getDbTable()->getDefaultAdapter()->lastInsertId();\n\n //kontrola, jestli uz je u produktu nastavena hlavni fotka, pokud ne, tak nastavim\n $photographyIsMain = $this->_photographyMapper->checkPhotographyIsMain($product_id);\n if ($photographyIsMain <= 0) {\n $this->_photographyMapper->setPhotographyMain($lastPhotographyId, $product_id);\n }\n\n $this->view->product_id = $product_id;\n\n $db->commit();\n\n $this->_helper->viewRenderer->setNoRender(true);\n echo true;\n $this->_flashMessenger->addMessage(array('info' => 'Fotografie byla úspěšně vložena.'));\n } catch (Exception $e) {\n\n// $this->_flashMessenger->addMessage(array('error' => 'Při ukládání varianty nastala chyba!<br />' . $e->getMessage()));\n //dojde-li k chybe, provedu rollback, data nebudou ulozena do db\n $db->rollBack();\n }\n\n// $photos = $this->_photographyMapper->getPhotosByProductId($product_id);\n//\n//\n// $form = new Admin_Form_ImageUploadForm();\n//\n// foreach ($photos as $photo) {\n// $form->addPhotographySubForm($photo->getPhotography_id(), $photo->toArray());\n// }\n// $form->startForm();\n//\n// $this->view->form_photography = $form;\n } else {\n $this->_helper->viewRenderer->setNoRender(TRUE);\n }\n }\n }", "title": "" }, { "docid": "90297850ae9d68c4c27f409c0c78adeb", "score": "0.6092076", "text": "public function store(Request $request)\n {\n if( $request->hasFile('image')){\n $file_name = $request->file('image')->getClientOriginalName();\n $file_size = $request->file('image')->getSize();\n $file_url = $request->file('image')->getRealPath();\n $file_type = $request->file('image')->getMimeType();\n $filePath = public_path('/uploads/');\n $request->file('image')->move($filePath, $file_name);\n $item = new Image();\n $item->name = $file_name;\n $item->size = $file_size;\n $item->url = $file_url;\n $item->type = $file_type;\n $item->product_id = 5;\n $item->save();\n Session::flash('success','Upload Image Successfully !!');\n }\n return redirect('upload');\n }", "title": "" }, { "docid": "dd70768c2ad82a2ea96b25ad55adacfa", "score": "0.6091705", "text": "public function addP(Request $request)\n {\n $this->validate($request,[\n 'Name' => 'required|min:5',\n 'TypeId' => 'exists:types,id',\n 'Stock' => 'required|numeric|min:0|not_in:0',\n 'Price' => 'required|numeric|min:0|not_in:0',\n 'Description' => 'required|min:15',\n 'Image' => 'nullable|mimes:jpeg,gif,png,jpg'\n ]);\n \n $img = $request['Image'];\n $f_name = $img->getClientOriginalName();\n \n DB::table('items')->insert([\n ['type_id' => $request->TypeId, 'name' =>$request->Name , 'image' => \"images/\".$f_name, 'stock' => $request->Stock, 'price' => $request->Price, 'description' => $request->Description]\n ]);\n\n $img->move('images', $f_name);\n\n return redirect()->action([viewController::class, 'mainview']);\n }", "title": "" }, { "docid": "b6003d2d92d5305a7597939a4b9aa1d3", "score": "0.6087601", "text": "public function store() {\n //\n $validate = Validator::make(Input::all(), Images::$upload_rules);\n if ($validate->fails()) {\n return Redirect::to('images/create')\n ->withErrors($validate)\n ->withInput();\n } else {\n //if validation success, upload the image to the database and process it\n $image = Input::file('image');\n\n //This is the original uploaded client name of the image\n $filename = $image->getClientOriginalName();\n $filename = pathinfo($filename, PATHINFO_FILENAME);\n\n //randomize filename\n $fullname = Str::slug(Str::random(8) . $filename) . '.' . $image->getClientOriginalExtension();\n\n\n\n //check if image was inputted\n if ($image) {\n //image will be uploaded, add column first to the database\n $insert = new Images;\n $insert->title = Input::get('title');\n $insert->image = $fullname;\n $insert->save();\n $id = $insert->id;\n\n //create directory for uploaded images\n $directory = public_path() . '/uploads/' . $id . '/';\n $existDir = File::isDirectory($directory);\n if (!$existDir) {\n File::makeDirectory($directory, 0775, true);\n }\n //upload the image first to the upload folder identified by $id\n $image->move($directory, $fullname);\n $thumb = 'thumb_' . $fullname;\n\n //these parameters are related to the image processing class using intervention\n Image::make($directory . $fullname)\n ->resize(200, null, function($constraint){\n $constraint->aspectRatio();\n })\n ->save($directory . $thumb);\n\n return Redirect::to('images/show/' . $insert->id)\n ->with('success', 'Your image is uploaded successfuly!');\n } else {\n //image cannot be uploaded\n return Redirect::to('/')\n ->withInput()\n ->with('error', 'Sorry the image could not be uploaded, please try again later');\n }\n\n //$image = new Image;\n $image->title = Input::get('title');\n }\n }", "title": "" }, { "docid": "781d7667fdd71d215a371a15d540aa16", "score": "0.6083622", "text": "public function store(Request $request)\n {\n $request->validate([\n 'code' => 'required|string|unique:mst_kpr_asset,code,1,is_deleted|min:8',\n 'name' => 'required|string|unique:mst_kpr_asset,name,1,is_deleted|min:8',\n 'regencies_id' => 'required',\n 'price' => 'required',\n 'tenor' => 'required',\n 'installment' => 'required',\n 'description' => 'required',\n 'term_cond' => 'required',\n 'status' => 'required',\n 'image.*' => 'string',\n ]);\n\n // dd(str_replace(\",\",\"\", $request->price));\n $userId = Auth::user()->id;\n $data = [\n 'code' => $request->code,\n 'name' => $request->name,\n 'location' => $request->regencies_id,\n 'price' => str_replace(\",\",\"\", $request->price),\n 'tenor' => $request->tenor,\n 'installment' => str_replace(\",\",\"\", $request->installment),\n 'description' => $request->description,\n 'term_cond' => $request->term_cond,\n 'status' => $request->status,\n 'created_by' => $userId,\n 'updated_by' => $userId\n ];\n\n /* Upload Featured Image */\n $featured = $request->featured;\n if($featured != null){\n\n $arrayData = [\n 'code_kpr' => $request->code,\n 'image' => $featured,\n 'featured' => 'Y',\n ];\n\n KprAssetImg::create($arrayData);\n }\n\n /* Upload Attribute Image */\n $images = $request->image;\n if($images != null){\n foreach ($images as $key) {\n # code...\n $AttrImages = [\n 'code_kpr' => $request->code,\n 'image' => $key,\n 'featured' => 'N',\n ];\n\n KprAssetImg::create($AttrImages);\n }\n }\n\n $model = KprAsset::create($data);\n\n if($model){\n return redirect('kpr/asset/'.base64_encode($request->code) )->with('success','Asset Successfully Created');\n }else{\n Redirect::back()->withErrors(['error', 'Failed']);\n }\n\n }", "title": "" }, { "docid": "a4dea610f64bc7e0686cd86080618fa2", "score": "0.60810727", "text": "public function addImage()\r\n {\r\n $file = $_FILES['image']['tmp_name'];\r\n $sourceProperties = getimagesize($file);\r\n $fileNewName = time();\r\n $folderPath = \"./public/img/\";\r\n $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION);\r\n $imageType = $sourceProperties[2];\r\n\r\n\r\n switch ($imageType) {\r\n\r\n\r\n case IMAGETYPE_PNG:\r\n $imageResourceId = imagecreatefrompng($file);\r\n $targetLayer = $this->imageResize($imageResourceId, $sourceProperties[0], $sourceProperties[1]);\r\n imagepng($targetLayer, $folderPath . $fileNewName . \"_thump.\" . $ext);\r\n $this->setImgName($fileNewName . \"_thump.\" . $ext);\r\n break;\r\n\r\n\r\n case IMAGETYPE_GIF:\r\n $imageResourceId = imagecreatefromgif($file);\r\n $targetLayer = $this->imageResize($imageResourceId, $sourceProperties[0], $sourceProperties[1]);\r\n imagegif($targetLayer, $folderPath . $fileNewName . \"_thump.\" . $ext);\r\n $this->setImgName($fileNewName . \"_thump.\" . $ext);\r\n break;\r\n\r\n\r\n case IMAGETYPE_JPEG:\r\n $imageResourceId = imagecreatefromjpeg($file);\r\n $targetLayer = $this->imageResize($imageResourceId, $sourceProperties[0], $sourceProperties[1]);\r\n imagejpeg($targetLayer, $folderPath . $fileNewName . \"_thump.\" . $ext);\r\n $this->setImgName($fileNewName . \"_thump.\" . $ext);\r\n break;\r\n\r\n\r\n default:\r\n echo \"Invalid Image type.\";\r\n exit;\r\n break;\r\n }\r\n $db = null;\r\n }", "title": "" }, { "docid": "64e175cc22e666cbd0f08364474a70cf", "score": "0.6078957", "text": "public function store(Request $request) {\n\n\n\n $this->validate($request, [\n 'name' => 'required|unique:images,i_name',\n 'disc' => 'required',\n 'file' => 'required',\n ]);\n\n\n $album = $request->get('album');\n\n $album_id = Album::where('b_name', $album)->first();\n $aID = $album_id->b_id;\n\n $path = public_path() . '/extra-images/';\n $file = $request->file('file');\n\n $filename = time() . rand(1111, 9999) . '.' . $file->getClientOriginalName();\n if ($file->move($path, $filename)) {\n\n Image::create([\n 'i_name' => $request->get('name'),\n 'i_disc' => $request->get('disc'),\n 'album_id' => $aID,\n 'path' => $filename\n ]);\n }\n\n return redirect('image');\n }", "title": "" }, { "docid": "030b7e01c0a773275405fdbdd2b65026", "score": "0.60764694", "text": "public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\r\n\t}", "title": "" }, { "docid": "030b7e01c0a773275405fdbdd2b65026", "score": "0.60764694", "text": "public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\r\n\t}", "title": "" }, { "docid": "030b7e01c0a773275405fdbdd2b65026", "score": "0.60764694", "text": "public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\r\n\t}", "title": "" }, { "docid": "030b7e01c0a773275405fdbdd2b65026", "score": "0.60764694", "text": "public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\r\n\t}", "title": "" }, { "docid": "c917fab143692c496c189e8822d042d5", "score": "0.6072534", "text": "public function uploadImage(Request $request) {\n\n \n $this->validate(request(),[\n 'table_name' => 'required',\n 'table_id' => 'required',\n 'image' => 'image',\n ]);\n\n\n $image = $request->file('image');\n \n $image->move(public_path('images'), $image);\n\n \n\n $imageStatus = Photos::create([\n \"table_name\" => $table_name,\n \"table_id\" => $table_id,\n \"image\" => $image,\n ]);\n \n if(!is_null($imageStatus)) {\n \n return back()->with(\"success\", \"Image uploaded successfully.\");\n }\n \n else {\n return back()->with(\"failed\", \"Failed to upload image.\");\n }\n }", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "6d2c588b732fd6a7a13c027710fb9e24", "score": "0.60624653", "text": "public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "fb5f77cc713d951188e65e9a5c8b3d1c", "score": "0.6059226", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'image' => 'image|nullable|max:1999'\n ]);\n\n// handle file upload\n if($request->hasFile('image')){\n //get file name with extension\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n //get just file name\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n //GET extension\n $extension = $request->file('image')->getClientOriginalExtension();\n //file name to store\n $fileNameToStore = $filename.'_'.time().'.'.$extension;\n //upload image\n $path = $request->file('image')->storeAs('public/recipe_images', $fileNameToStore);\n\n\n }else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n\n\n $new = new recipe();\n $new->type = $request->get('type');\n $new->title = $request->get('title');\n $new->ingredients = $request->get('ingredients');\n $new->instructions = $request->get('instructions');\n $new->servings = $request->get('servings');\n $new->user_id = Auth::user()->id;\n $new->image = $fileNameToStore;\n $new->save();\n\n// return redirect( route( 'home' ) );\n return redirect('home');\n }", "title": "" }, { "docid": "3cd32873ff0f2eae5771682cea3d3a13", "score": "0.60476226", "text": "function add_product(){\n global $con;\n\n\n $flower_title=$flower_desciption=$flower_price=$flower_category=\"\";\n\n if (isset($_POST['publish'])) {\n\n $flower_title=$_POST['flower_title'];\n $flower_desciption=$_POST['flower_description'];\n $flower_price=$_POST['flower_price'];\n $flower_details=$_POST['flower_details'];\n $flower_category=$_POST['flower_category'];\n $flower_quantity=$_POST['flower_quantity'];\n \n $flower_image=$_FILES['file']['name'];\n // $image_temp_location=$_FILES['file']['name'];\n\n\n\n $query=\"INSERT INTO product (f_title, f_price, f_quantity, f_desc, f_details, cid, img) VALUES ('{$flower_title}', '{$flower_price}', '{$flower_quantity}', '{$flower_desciption}', '{$flower_details}', '{$flower_category}', '{$flower_image}')\";\n $result=mysqli_query($con,$query);\n header(\"location: admin_products.php\");\n\n \n }\n }", "title": "" }, { "docid": "ebbb876a3b97d89a96704008b31e6996", "score": "0.6045304", "text": "public function uploadItem(Request $req){\n $validator=Validator::make($req->all(),[\n 'type'=>'required',\n 'name'=>'required',\n 'description'=>'required',\n 'category'=>'required',\n 'product_type'=>'required',\n 'price'=>'required',\n 'charge'=>'required',\n 'charge_type'=>'required',\n 'images'=>'required',\n\n ]);\n\n if($validator->fails()){\n return response()->json([\n 'sucess'=>false,\n 'message' => $validator->errors()\n\n ]);\n }\n //if the request has everything attached\n //then store the items into the database.\n $product=new ProductsUpload();\n $product->type=$req->type;\n $product->name=$req->name;\n $product->description=$req->description;\n $product->category=$req->category;\n $product->product_type=$req->product_type;\n $product->price=$req->price;\n $product->charge=$req->charge;\n $product->charge_type=$req->charge_type;\n $product->images=$req->images;\n $result=$product->save();\n\n if(!$result){\n return response()->json([\n 'success'=>false,\n 'message'=>$result->errors()\n ]);\n }\n return response()->json([\n 'success'=>true,\n 'productInfo'=>$product\n ]);\n }", "title": "" }, { "docid": "5546b9d00fb8be1f1b847e48923fb454", "score": "0.6043525", "text": "public function store(ImageRequest $request)\n {\n //If the order of this image have already been used,\n //move the order of others images one step forward\n $type = $request->input('type');\n $order = $request->input('order');\n\n /* \n Laravel can not handle using the request manager the validation\n of the size image that exceeds the configuration of php.in\n */\n if($this->imageHelper->fileImageSizeExceeded($request->file('image'))){\n //Set the message and the error class\n Session::flash('message', 'The file image can not be greater than 2MB!'); \n Session::flash('alert-class', 'alert-danger');\n\n return redirect()->back()\n ->withInput()\n ->withErrors('image');\n }\n\n //Getting the max permitted position\n $maxPosition = Image::where('type', $type)->count() + 1;\n\n //If the admin informed a greater position, set the position as the maximum one\n if($order > $maxPosition){\n $order = $maxPosition;\n } \n \n //Adjust the order\n $this->imageHelper->adjustStoreOrder($type, $order, $this->image);\n\n //Creating the new image\n $image = $this->image->create($request->all());\n $image->order = $order;\n $image->active = true;\n\n //Moves and sets the uploaded image\n $this->imageHelper->uploadImage($request, $image); \n\n //Saving\n $image->save();\n\n //Sending the user to the accounts page\n return redirect()->route('image/index');\n }", "title": "" }, { "docid": "10e60f059f3a18857dc74a2b73539b65", "score": "0.6038601", "text": "public function store(Request $request)\n {\n $user = Auth::user();\n $product = new Product();\n $product->user_id = $user->id;\n $product->name_ar = request('name_ar');\n $product->name_en = request('name_en');\n $product->duration = request('duration').' '.request('time');\n $product->description_ar = request('description_ar');\n $product->description_en = request('description_en');\n $product->price = request('price');\n $product->qty = request('qty');\n $product->main_category = request('main_category');\n $product->sub_category = request('sub_category');\n $product->brand_id = request('brand_id');\n $product->save();\n\n $index = 0;\n if ($request->hasfile('images')) {\n foreach ($request->file('images') as $item) {\n $path = 'uploaded/';\n $image = new ProductImage();\n $name = \"product-\" . time() . $item->getClientOriginalName();\n $item->move($path, $name);\n $image->name = $name;\n $image->product_id = $product->id;\n if ($index == 0) {\n $image->main = 1;\n }\n $image->save();\n $index++;\n }\n }\n return redirect()->route('product.stored')->with('success', __('items.success_add'));\n }", "title": "" }, { "docid": "e4e4e300eb0f09c0a9026adac6a4da1f", "score": "0.60370666", "text": "public function store(Request $request)\n {\n //VALIDATION\n $this->validate($request,[\n 'title' => 'required|min:6',\n 'description' => 'required',\n //'images' => 'mimes:jpeg,png,gif|max:4883',\n 'price' => 'required',\n 'quantity' => 'required',\n 'category' => 'required',\n 'brand' => 'required',\n ]);\n\n $product = new Product();\n $product->name = Input::get('title');\n $product->description = Input::get('description');\n $product->price = Input::get('price');\n $product->quantity = Input::get('quantity');\n $product->category_id = Input::get('category');\n $product->brand_id = Input::get('brand');\n\n \n\n // FORMAT IMAGE FILENAME\n $name = $product->name;\n $name = strtolower(preg_replace(\"[^a-zA-Z0-9-]\", \"-\", strtr(utf8_decode(trim($name)), utf8_decode(\"áàãâéêíóôõúüñçÁÀÃÂÉÊÍÓÔÕÚÜÑÇ\"),\"aaaaeeiooouuncAAAAEEIOOOUUNC-\")) );\n $name = preg_replace('/[ -]+/' , '-' , $name);\n $product->slug = $name;\n\n $product->save();\n // CREATE PRODUCT IMAGES\n $count = 1;\n foreach ($request->images as $image) {\n \n $extension = $image->extension();\n $newname = $name.'-'.$count.'.'.$extension;\n //$filename = $image->store('products/'.$product->id, $newname);\n $filename = $image->storeAs('products/'.$product->id, $newname);\n \n ProductImage::create([\n 'product_id' => $product->id,\n 'image' => $newname\n ]);\n \n $count++;\n }\n \n // SYNC TAGS WITH PRODUCTS\n $product->tags()->sync($request->tags, false);\n\n Session::flash('success', 'Product successfully registered');\n return Redirect::to('admin/products/');\n }", "title": "" }, { "docid": "e91971b35e5cc43e215ad0cab3d43dc5", "score": "0.603602", "text": "public function store(Request $request)\n {\n // dd($request);\n\n // Validation\n $request->validate([\n \"photo\" => \"required|mimes:jpg,jpeg,png\",\n \"codeno\" => \"required\",\n \"name\" => \"required\",\n \"unit_price\" => \"required\"\n ]);\n\n //upload\n if($request->file()){\n // fileName => 624872374523_a.jpg\n $fileName = time().'_'.$request->photo->getClientOriginalName();\n\n // categoryimg/624872374523_a.jpg\n $filePath = $request->file('photo')->storeAs('itemimg',$fileName, 'public');\n\n $path = '/storage/'.$filePath;\n }\n\n // store data in Item Model\n $item = new Item;\n $item->photo = $path;\n $item->codeno = $request->codeno;\n $item->name = $request->name;\n $item->price = $request->unit_price;\n $item->discount = $request->discount;\n $item->description = $request->description;\n $item->brand_id = $request->brand_id;\n $item->subcategory_id = $request->subcategory_id;\n $item->save();\n\n // return\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "a9b869f3d183bd5f12b82a829d0b6c33", "score": "0.6028473", "text": "public function store(Request $request)\n {\n $code = 'MTPHRS'.rand(100000, 999999);\n $product = array(\n 'code' => $code,\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price')\n );\n \n Product::create($product);\n $product = Product::find($code);\n /*$image = Input::file('image')[0];\n\n $bannerImage = Image::make($image);\n $bannerImage->fit(800, 450);\n $bannerImage->save('images/products/'.$product->code.'.jpg');\n\n $thumbnailImage = $bannerImage;\n $thumbnailImage->fit(100);\n $thumbnailImage->save('images/products/'.$product->code.'_thumb.jpg');*/\n }", "title": "" }, { "docid": "dfe8297d1002c40a1be82dc319fb1dd8", "score": "0.6027948", "text": "public function store(Request $request)\n {\n\n $image=$request->file('upload_file');\n $name=$image->getClientOriginalName();\n $uploadPath='public/imageeee/';\n $image->move($uploadPath, $name);\n $imageUrl=$uploadPath.$name;\n\n\n $user= Auth::user()->id;\n $img=new Listing();\n $img->id=$request->id;\n $img->user_id=$user;\n $img->title=$request->title;\n $img->category=$request->category;\n $img->keywords=$request->keywords;\n $img->city=$request->city;\n $img->address=$request->address;\n $img->state=$request->state;\n $img->zip_code=$request->zip_code;\n\n $img->description=$request->description;\n $img->phone=$request->phone;\n $img->website=$request->website;\n $img->email=$request->email;\n $img->fb=$request->fb;\n $img->twitr=$request->twitr;\n $img->google=$request->google;\n $img->elevator=$request->elevator;\n $img->workspace=$request->workspace;\n $img->booking=$request->booking;\n $img->internet=$request->internet;\n $img->parking=$request->parking;\n $img->street=$request->street;\n $img->smoking=$request->smoking;\n $img->events=$request->events;\n\n $img->monday_op=$request->monday_op;\n $img->monday_cl=$request->monday_cl;\n $img->tuesday_op=$request->tuesday_op;\n $img->tuesday_cl=$request->tuesday_cl;\n $img->wednesday_op=$request->wednesday_op;\n $img->wednesday_cl=$request->wednesday_cl;\n $img->thursday_op=$request->thursday_op;\n $img->thursday_cl=$request->thursday_cl;\n $img->friday_op=$request->friday_op;\n $img->friday_cl=$request->friday_cl;\n $img->saturday_op=$request->saturday_op;\n $img->saturday_cl=$request->saturday_cl;\n $img->sunday_op=$request->sunday_op;\n $img->sunday_cl=$request->sunday_cl;\n\n $img->pricing_product=$request->pricing_product;\n $img->pricing_des=$request->pricing_des;\n $img->price=$request->price;\n $img->upload_file=$imageUrl;\n $img->save();\n return redirect ('/add-listing')->with('message','Your Listing Successfully Saved. Click here to preview');\n\n\n }", "title": "" }, { "docid": "237a5b0afc4fde890a0dfe9fe107cc57", "score": "0.60189086", "text": "public function imageAction() {\n $size = (string) $this->getRequest()->getParam('size');\n if ($size) {\n $imageFile = preg_replace(\"#.*/catalog/product/image/size/[0-9]*x[0-9]*#\", '', $this->getRequest()->getRequestUri());\n } else {\n $imageFile = preg_replace(\"#.*/catalog/product/image#\", '', $this->getRequest()->getRequestUri());\n }\n\n if (!strstr($imageFile, '.')) {\n $this->_forward('noRoute');\n return;\n }\n\n try {\n $imageModel = Mage::getModel('catalog/product_image');\n $imageModel->setSize($size)\n ->setBaseFile($imageFile)\n ->resize()\n ->setWatermark(Mage::getStoreConfig('catalog/watermark/image'))\n ->saveFile()\n ->push();\n } catch (Exception $e) {\n $this->_forward('noRoute');\n }\n }", "title": "" }, { "docid": "82a9fd0c7c1332c8fa62bd2ad2235724", "score": "0.6017768", "text": "public function store(Request $request)\n {\n //\n $request->validate([\n 'name'=>'required',\n 'available_item'=>'required',\n 'price_per'=>'required',\n\n ]);\n $data=$request->all();\n\n $item=new Item($data);\n $item->save();\n\n if($request->image){\n $item->addMediaFromRequest('image')->toMediaCollection('item_images');\n }\n event(new ItemEvent($item));\n \n return redirect()->route('item.index')->with('sucess','Item Add Sucessfully');\n\n }", "title": "" }, { "docid": "fa9e5ac4dca5f30786ea4244ea761755", "score": "0.6015528", "text": "public function store(Request $request)\n {\n //dd\n\n //validation\n $request->validate([\n 'item_codeno'=>'required|min:4',\n 'item_name'=>'required',\n 'item_photo'=>'required',\n 'unit_price'=>'required',\n 'discount_price'=>'required',\n 'brand_id'=>'required',\n 'subcategory_id'=>'required',\n 'item_des'=>'required',\n ]);\n\n //if include file, upload\n $imageName=time().'.'.$request->item_photo->extension();\n \n $request->item_photo->move(public_path('backend/itemimg'),$imageName);\n $myfile='backend/itemimg/'.$imageName;\n //data request\n $item=new Item; //setup class\n $item->codeno=$request->item_codeno;\n $item->name=$request->item_name;\n $item->photo=$myfile;\n $item->price=$request->unit_price;\n $item->discount=$request->discount_price;\n $item->description=$request->item_des;\n $item->brand_id=$request->brand_id;\n $item->subcategory_id=$request->subcategory_id;\n $item->save();\n\n //redirect\n return new ItemResource($item);\n }", "title": "" }, { "docid": "f21052b5ce171da3277f39fd67da8291", "score": "0.601465", "text": "public function actionImage()\n {\n $get = Yii::$app->request->get();\n\n if ($get['action']=='update') {\n $model = $this->findModel($get['idIma']);\n if ($model == null) {\n return 'anh san pham khong on tai';\n }\n $model->userUpdated = getUser()->id;\n }\n if ($get['action']=='') {\n $model = new ProductImages();\n $model->pro_id = $get['pro_id'];\n $model->created_at = time();\n $model->userCreated = getUser()->id;\n }\n\n $model->image = str_replace(Yii::$app->request->hostInfo,\"\",$get['image']);\n $model->title = $get['title'];\n $model->alt = $get['alt'];\n if ($get['order']=='') {\n $model->order = 0;\n }else {\n $model->order = $get['order'];\n }\n $model->status = true;\n $model->updated_at = time();\n if($model->save()){\n // $modelnew = new ProductImages();\n // $data = $modelnew->getAllImageBy($model->pro_id);\n $data[] = $model;\n }else {\n dbg($model->errors);\n $data['save'] = false;\n }\n\n $modelnew = new ProductImages();\n $data = $modelnew->getAllImageBy($get['pro_id']);\n return $this->renderPartial('newimage',['data'=>$data]);\n }", "title": "" }, { "docid": "08d1533a2be7fbe00aba758573e2ba9b", "score": "0.6012593", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$project = Project::create($input);\n\t\t$imageUri = Input::get('imageUri');\n\t\t$image_array = explode(',', $imageUri);\n\t\tarray_pop($image_array);\n\t\tforeach($image_array as $image_id)\n\t\t{\n\t\t\t$exists = $project->images->contains($image_id);\n \tif(!$exists)\n \t{\n \t\t$project->images()->attach($image_id);\n \t}\n\t\t}\n\t\tforeach(Input::file('image') as $file)\n {\n \tif($file)\n \t{\n \t\tif($file->isValid())\n\t {\n\t $destinationPath = public_path() . '/uploads/'; // upload path\n\t $fileName = $file->getClientOriginalName(); // renameing image\n\t $file->move($destinationPath, $fileName); // uploading file to given path\n\n\t $image = Image::create([\n\t \"title\" => Input::input('title'),\n\t \"description\" => Input::input('image_description'),\n\t \"location\" => '../../uploads/' . $fileName\n\t ]);\n\n\t $project->images()->attach($image->id);\n\t }\n\t else\n\t {\n\t return Redirect::to('image')->with('success', 'upload not successful');\n\t break;\n\t }\n \t}\n }\n\n\t\treturn redirect('update_projects')->with('success', 'add successful');\n\t}", "title": "" }, { "docid": "9db0a55a91bbc14e52b61d32b8f7c839", "score": "0.60116214", "text": "public function imagesAction()\n\t\t{\n\t\t\tif($this->request->getPost('upload')){\n\t\t\t\techo 'here at image upload<br />';\n\t\t\t\t$fp=new FormProcessor_Image($this->tempProduct, 'storeSeller');\n\t\t\t\techo 'here at instantiating image<br />';\n\t\t\t\tif($fp->process($this->request)){\n\t\t\t\t\techo 'here at process request<br />';\n\t\t\t\t\t//then update the session variable for it\n\t\t\t\t\t$this->messenger->addMessage('Image uploaded');\n\t\t\t\t}else{\n\t\t\t\t\techo 'here at process error<br />';\n\t\t\t\t\tforeach($fp->getErrors() as $error)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->messenger->addMessage($error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($this->request->getParam('delete'))\n\t\t\t{\n\t\t\t\t/*$image_id = (int) $this->request->getPost('image');\n\t\t\t\t$image = new DatabaseObject_Image($this->db, $this->tempProduct->image_table, $this->tempProduct->product_tag);\n\t\t\t\t\n\t\t\t\tif($image->loadForPost($this->product_id, $image_id)){\n\t\t\t\t\t$image->delete(); //the files are unlinked/deleted at preDelete.\n\t\t\t\t\t////echo 'image at delete';\n\t\t\t\t\t\n\t\t\t\t\tif($this->request->isXmlHttpRequest()){\n\t\t\t\t\t\t$json = array('deleted' =>true, 'image_id' =>$image_id);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$this->messenger->addMessage('Image deleted');\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t}\n\t\t\t\n\t\t\t/*elseif($this->request->getPost('reorder'))\n\t\t\t{\n\t\t\t\t$order = $request->getPost('post_images');\n\t\t\t\t$product->setImageOrder($order);\n\n\t\t\t}*/\n\t\t\t$this->_redirect('productlisting/productlistingpreview?id='.$this->tempProduct->getId().'&product='.$this->product_type.'&tag='.$this->product_tag);\n\t\t}", "title": "" }, { "docid": "0c16b685f56c68573ea7a2b4b15e9e98", "score": "0.6005334", "text": "public function images()\n {\n try {\n //init\n $input = Input::all();\n $current = date('Y-m-d H:i:s');\n //update\n if(isset($input) && isset($input['action']) && $input['action']==0)\n {\n $image = Image::find($input['id']);\n if($image)\n {\n $image->image_type = $input['image_type'];\n $image->caption = (!empty(strip_tags($input['caption'])))? strip_tags($input['caption']) : null;\n $image->updated = $current;\n $image->save();\n $image->url = Image::view_image($image->url);\n return ['success'=>true,'action'=>0,'image'=>$image];\n }\n return ['success'=>false,'msg'=>'There was an error updating the image.<br>The server could not retrieve the data.'];\n }\n //remove\n else if(isset($input) && isset($input['action']) && $input['action']==-1)\n {\n $image = Image::find($input['id']);\n if($image)\n {\n DB::table('venue_images')->where('venue_id',$input['venue_id'])->where('image_id',$image->id)->delete();\n $image->delete_image_file();\n $image->delete();\n return ['success'=>true,'action'=>-1];\n }\n return ['success'=>false,'msg'=>'There was an error deleting the image.<br>The server could not retrieve the data.'];\n }\n //save\n else if(isset($input) && isset($input['action']) && $input['action']==1)\n {\n $image = new Image;\n $image->created = $current;\n if(preg_match('/media\\/preview/',$input['url']))\n $image->set_url($input['url']);\n $image->image_type = $input['image_type'];\n $image->caption = (!empty(strip_tags($input['caption'])))? strip_tags($input['caption']) : null;\n $image->save();\n if($image)\n {\n DB::table('venue_images')->insert(['venue_id'=>$input['venue_id'],'image_id'=>$image->id]);\n $image->url = Image::view_image($image->url);\n return ['success'=>true,'action'=>1,'image'=>$image];\n }\n return ['success'=>false,'msg'=>'There was an error adding the image.<br>The server could not retrieve the data.'];\n }\n //get\n else if(isset($input) && isset($input['id']))\n {\n $image = Image::find($input['id']);\n if($image)\n {\n $image->url = Image::view_image($image->url);\n return ['success'=>true,'image'=>$image];\n }\n return ['success'=>false,'msg'=>'There was an error getting the image.<br>The server could not retrieve the data.'];\n }\n else\n return ['success'=>false,'msg'=>'Invalid Option.'];\n } catch (Exception $ex) {\n throw new Exception('Error VenueImages Index: '.$ex->getMessage());\n }\n }", "title": "" }, { "docid": "22e4aa3e743f737468bbf296c0feff03", "score": "0.60042715", "text": "public function store(Request $request)\r\n {\r\n $request->validate([\r\n 'imageTitle' => 'required|unique:image_management',\r\n 'imageFile' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2028',\r\n ]);\r\n // // create project instance\r\n $images = new ImageManagement;\r\n\r\n if ($request->has('imageStatus'))\r\n {\r\n $images->imageStatus = $request->input('imageStatus');\r\n }\r\n if($request->file('imageFile')){\r\n\r\n $path = \\Storage::putFile('images', $request->file('imageFile'));\r\n $images->imageFile=$path;\r\n }\r\n\r\n $images->imageTitle = $request->input('imageTitle');\r\n $images->save();\r\n return redirect()->route('images.index')->with('success','تم أضافة الصورة الى الالبوم');\r\n }", "title": "" }, { "docid": "c51105855bcb2ad87b4a4332874f3e95", "score": "0.6004028", "text": "function insertCarr(Request $request){\n $car = Car::create([\n 'marque' => $request->input('marque'),\n 'modele' => $request->input('modele'),\n 'etat' => $request->input('etat'),\n 'carburant' => $request->input('carburant'),\n 'couleur' => $request->input('couleur'),\n 'airBag' => $request->input('airBag'),\n 'nbrPlace' => $request->input('nbrPlace'),\n 'image' => 'default.jpg',\n 'description' => 'just une description simple',\n 'partenaire_id' => $request->input('partenaire_id'),\n ]);\n $carimage = \"\";\n if($request->hasFile('image')){\n $image = $request->file('image');\n $filename = $car->id.'.jpg';\n\n Image::make($image)->resize(300,300)->save('../../rent-car/src/Component/Partenaire/img/' . $filename);\n\n $carimage = $filename;\n\n }else{\n $carimage = 'default.jpg';\n }\n $car->update(['image'=>$carimage]);\n $cars = Car::where('partenaire_id','=',$request->input('part_idd'))->get();\n return $car;\n }", "title": "" }, { "docid": "42e3cfd29f2b521740f27b5654c7f429", "score": "0.60030216", "text": "function addhotelimage(Request $request){\n $request->validate([\n 'id' => 'required|numeric',\n 'gambar' => 'required|image'\n ]);\n\n $namaGambar = Str::random(20).'.'.$request->gambar->extension();\n $request->gambar->move(public_path('image/hotel'), $namaGambar);\n\n $id = $request->id;\n return AdminModel::addHotelImage($id, $namaGambar);\n }", "title": "" }, { "docid": "738750e05eff3fb4ff3efb45898b80e2", "score": "0.59997904", "text": "public function store(Request $request)\n {\n $request_data = $request->all();\n\n // if ($request->master_image) {\n // Image::make($request->master_image)\n // ->resize(300, null, function ($constraint) {\n // $constraint->aspectRatio();\n // })\n // ->save(public_path('uploads/products/' . $request->master_image->hashName()));\n // $request_data['master_image'] = $request->master_image->hashName();\n // }\n\n // if ($request->product_details_img) {\n // Image::make($request->product_details_img)\n // ->resize(300, null, function ($constraint) {\n // $constraint->aspectRatio();\n // })\n // ->save(public_path('uploads/products/' . $request->product_details_img->hashName()));\n // $request_data['product_details_img'] = $request->product_details_img->hashName();\n // }\n\n // if ($request->product_profile_img) {\n // Image::make($request->product_profile_img)\n // ->resize(300, null, function ($constraint) {\n // $constraint->aspectRatio();\n // })\n // ->save(public_path('uploads/products/' . $request->product_profile_img->hashName()));\n // $request_data['product_profile_img'] = $request->product_profile_img->hashName();\n // }\n\n\n if ($request->master_image) {\n $master_image=$request->file('master_image');\n $request_data['master_image'] = $this->UplaodFile($master_image);\n }\n if ($request->product_details_img) {\n $product_details_img=$request->file('product_details_img');\n $request_data['product_details_img'] = $this->UplaodFile($product_details_img);\n }\n if ($request->product_profile_img) {\n $product_profile_img=$request->file('product_profile_img');\n $request_data['product_profile_img'] = $this->UplaodFile($product_profile_img);\n }\n\n $product = Product::create($request_data);\n\n session()->flash('success', 'Product Data Added Succsessfuly');\n return redirect('/AdminProduct');\n }", "title": "" }, { "docid": "6ee0426eaad1600b6697f3d751cc8860", "score": "0.59996396", "text": "public function insert_from_post($posted_item_id)\n\t{\n\t\t$this->load->model('Tenant_model');\n\t\t$cur_tenant = $this->Tenant_model->get_by_account_id($this->session->userdata('id'));\n\t\t$item_type = $this->input->post('item_type');\n\t\t\n\t\t$this->detail_id\t\t\t= \"\";\n\t\t$this->posted_item_id\t\t= $posted_item_id;\n\t\t$this->init_posted_item();\n\t\t\n\t\tif (($item_type == \"ORDER\") || ($item_type == \"FLASH\"))\n\t\t{\n\t\t\t$this->var_type\t\t\t\t= $this->input->post('var_type');\n\t\t\t$files = $_FILES;\n\t\t\t\n\t\t\t$temp_var_descriptions\t= $this->input->post('var_desc');\n\t\t\t$i = 0;\n\t\t\tforeach($temp_var_descriptions as $temp_var_description)\n\t\t\t{\n\t\t\t\t$this->id \t\t\t\t= 0;\n\t\t\t\t$this->detail_id \t\t= 0;\n\t\t\t\t$this->var_description \t\t= $temp_var_description;\n\t\t\t\t$this->quantity_available\t= $this->input->post('quantity_available')[$i];\n\t\t\t\t\n\t\t\t\t$_FILES['image_two_name']['name']\t\t= $files['image_two_name']['name'][$i];\n\t\t\t\t$_FILES['image_two_name']['type']\t\t= $files['image_two_name']['type'][$i];\n\t\t\t\t$_FILES['image_two_name']['tmp_name']\t= $files['image_two_name']['tmp_name'][$i];\n\t\t\t\t$_FILES['image_two_name']['error']\t\t= $files['image_two_name']['error'][$i];\n\t\t\t\t$_FILES['image_two_name']['size']\t\t= $files['image_two_name']['size'][$i];\n\t\t\t\t\n\t\t\t\t$_FILES['image_three_name']['name']\t\t= $files['image_three_name']['name'][$i];\n\t\t\t\t$_FILES['image_three_name']['type']\t\t= $files['image_three_name']['type'][$i];\n\t\t\t\t$_FILES['image_three_name']['tmp_name']\t= $files['image_three_name']['tmp_name'][$i];\n\t\t\t\t$_FILES['image_three_name']['error']\t= $files['image_three_name']['error'][$i];\n\t\t\t\t$_FILES['image_three_name']['size']\t\t= $files['image_three_name']['size'][$i];\n\t\t\t\t\n\t\t\t\t$_FILES['image_four_name']['name']\t\t= $files['image_four_name']['name'][$i];\n\t\t\t\t$_FILES['image_four_name']['type']\t\t= $files['image_four_name']['type'][$i];\n\t\t\t\t$_FILES['image_four_name']['tmp_name']\t= $files['image_four_name']['tmp_name'][$i];\n\t\t\t\t$_FILES['image_four_name']['error']\t\t= $files['image_four_name']['error'][$i];\n\t\t\t\t$_FILES['image_four_name']['size']\t\t= $files['image_four_name']['size'][$i];\n\t\t\t\t\n\t\t\t\t\t// insert data, then generate [account_id] based on [id]\n\t\t\t\t$this->db->trans_start(); // buat nge lock db transaction (biar kalo fail ke rollback)\n\t\t\t\t\n\t\t\t\t$db_item = $this->get_db_from_stub($this); // ambil database object dari model ini\n\t\t\t\tif ($this->db->insert($this->table_posted_item_variance, $db_item))\n\t\t\t\t{\n\t\t\t\t\t$this->load->library('Id_generator');\n\t\t\t\t\t\n\t\t\t\t\t$this->id\t\t\t= $this->db->insert_id();\n\t\t\t\t\t$this->detail_id\t= $this->id_generator->generate(TYPE['name']['POSTED_ITEM_VARIANCE'], $this->id);\n\t\t\t\t\t\n\t\t\t\t\t$db_item = $this->get_db_from_stub($this); // ambil database object dari model ini\n\t\t\t\t\t$this->db->where('id', $db_item->id);\n\t\t\t\t\t$this->db->update($this->table_posted_item_variance, $db_item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->upload_image($db_item->id, $i);\n\t\t\t\t\n\t\t\t\t$this->db->trans_complete(); // selesai nge lock db transaction\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse if ($item_type == \"REPAIR\")\n\t\t{\n\t\t\t$this->db->trans_start(); // buat nge lock db transaction (biar kalo fail ke rollback)\n\t\t\t$this->quantity_available\t= 100;\n\t\t\t$db_item = $this->get_db_from_stub($this); // ambil database object dari model ini\n\t\t\tif ($this->db->insert($this->table_posted_item_variance, $db_item))\n\t\t\t{\n\t\t\t\t$this->load->library('Id_generator');\n\t\t\t\t\n\t\t\t\t$db_item->id\t\t\t= $this->db->insert_id();\n\t\t\t\t$db_item->detail_id\t\t= $this->id_generator->generate(TYPE['name']['POSTED_ITEM_VARIANCE'], $db_item->id);\n\t\t\t\t\n\t\t\t\t$this->db->where('id', $db_item->id);\n\t\t\t\t$this->db->update($this->table_posted_item_variance, $db_item);\n\t\t\t}\n\t\t\t\n\t\t\t$this->db->trans_complete();\n\t\t}\n\t\telse // BID\n\t\t{\n\t\t\t$this->var_type\t\t\t\t= $this->input->post('posted_item_variance_name');\n\t\t\t$this->var_description\t\t= $this->input->post('posted_item_variance_description');\n\t\t\t$this->quantity_available\t= 1;\n\t\t\t$this->db->trans_start(); // buat nge lock db transaction (biar kalo fail ke rollback)\n\t\t\t\t\n\t\t\t$db_item = $this->get_db_from_stub($this); // ambil database object dari model ini\n\t\t\tif ($this->db->insert($this->table_posted_item_variance, $db_item))\n\t\t\t{\n\t\t\t\t$this->load->library('Id_generator');\n\t\t\t\t\n\t\t\t\t$db_item->id\t\t\t= $this->db->insert_id();\n\t\t\t\t$db_item->detail_id\t\t= $this->id_generator->generate(TYPE['name']['POSTED_ITEM_VARIANCE'], $db_item->id);\n\t\t\t\t\n\t\t\t\t$this->db->where('id', $db_item->id);\n\t\t\t\t$this->db->update($this->table_posted_item_variance, $db_item);\n\t\t\t}\n\t\t\t\n\t\t\t$this->db->trans_complete();\n\t\t}\n\t}", "title": "" }, { "docid": "c98e3fc7b9394f9cfd0bbd6e4113b138", "score": "0.59971577", "text": "public function storeNew(Request $request){\n if ($request->property_image) {\n $property = Property::where(['owner' => Auth::user()->id])->first();\n $images = $request->property_image;\n foreach($images as $image) {\n $photo = new Photo;\n $photo->p_id =$property->id;\n $image_temp = $image;\n //echo $image_temp; die;\n if ($image_temp->isValid()) {\n $extension = $image_temp->getClientOriginalExtension();\n $filename = 'bks'.mt_rand(000, 9999999999) . '.' . $extension;\n $filepath = public_path().'/uploads/property/large/' . $filename;\n $webimagefilepath = public_path().'/uploads/property/small/' . $filename;\n $thumbnailpath = public_path().'/uploads/property/thumbnail/' . $filename;\n //upload the image\n Image::make($image_temp)->resize(600, 600)->save($filepath);\n Image::make($image_temp)->resize(200, 200)->save($webimagefilepath);\n Image::make($image_temp)->resize(100, 100)->save($thumbnailpath);\n $photo->path = $filename;\n $photo->alt_text = \"Book sasa property image\";\n $photo->save();\n }\n\n }\n return redirect()->back()->with('successalert','Images Uploaded successfully');\n }\n return redirect()->back()->with('erroralert','Please select a valid image to upload');\n }", "title": "" }, { "docid": "7fd774c07d4124a2319fc9771f9f3f41", "score": "0.5995589", "text": "public function actionAdd()\n {\n return $this->txSave(\"app\\models\\JobImage\");\n }", "title": "" }, { "docid": "7d280664c4d0b12fdf02d682c7ace274", "score": "0.5994532", "text": "public function store(VehicleRequest $request)\n {\n\n try {\n DB::beginTransaction();\n // creamos el vehiculo\n $vehicle = new $this->vehicle($request->all());\n $vehicle->id_user = intval($request->id_user);\n $vehicle->id_vehicle_type = intval($request->id_vehicle_type);\n //validamos si viene con imagen de ususario\n if($request->hasFile(\"image_registration_front\")){\n $file = $request->file(\"image_registration_front\");\n $name = time().$file->getClientOriginalName();\n $path = $file->move(public_path().'/img/vehicle/', $name);\n $vehicle->image_registration_front = Util::normalizePath($path);\n }\n //validamos si viene con imagen de ususario\n if($request->hasFile(\"image_registration_back\")){\n $file = $request->file(\"image_registration_back\");\n $name = time().$file->getClientOriginalName();\n $path = $file->move(public_path().'/img/vehicle/', $name);\n $vehicle->image_registration_back = Util::normalizePath($path);\n }\n\n $vehicle->save();\n DB::commit();\n return $this->showOne($vehicle);\n } catch (\\Exception $e) {\n DB::rollBack();\n return $this->errorResponse($e->getMessage(), 409);\n }\n }", "title": "" }, { "docid": "79f844df299c88ee5c527f5bf46c3443", "score": "0.5991791", "text": "public function postimage(Request $request)\n {\n $post = new Post();\n \n $post->equipment_type =$request->input('equipment_type');\n $post->sub_county\t =$request->input('sub_county');\n $post->manufacturer =$request->input('manufacturer');\n $post->list_title =$request->input('list_title');\n $post->cost =$request->input('cost');\n if ($request->hasfile('image')) {\n # code...\n $file=$request->file('image');\n $extension =$file->getClientOriginalExtension();\n $filename = time() . '.' . $extension;\n $file->move('uploads/post/', $filename);\n $post->image = $filename;\n\n }else {\n return $request;\n $post->image = '';\n\n }\n $post->save();\n\n return view('post')->with('post', $post);\n }", "title": "" }, { "docid": "7f402cb103fdfaebfb335236c9cf3e32", "score": "0.59882003", "text": "public function vehicle_image_details(){\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$image_name = html_escape($this->input->post('image_name'));\n\t\t\t\n\t\t\t$detail = $this->db->select('*')->from('vehicle_images')->where('image_name',$image_name)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t\t$data['id'] = $detail->id;\n\t\t\t\t\t\n\t\t\t\t\t$data['headerTitle'] = $detail->image_name;\t\t\t\n\t\t\t\t\t$data['vehicle_id'] = $detail->vehicle_id;\n\t\t\t\t\t\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'uploads/vehicles/'.$detail->vehicle_id.'/'.$detail->image_name.'\" class=\"img-responsive img-rounded\" width=\"240\" height=\"280\" />';\n\t\t\t\t\t\n\t\t\t\t\t$data['thumbnail'] = $thumbnail;\n\t\t\t\t\t\n\t\t\t\t\t$data['created'] = date(\"F j, Y\", strtotime($detail->created));\n\t\t\t\t\t\n\t\t\t\t\t$data['model'] = 'vehicle_images';\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t}\n\t\t\t\n\t\t\techo json_encode($data);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ce518c50a863b6c90977d6c8c7fd88bd", "score": "0.59812945", "text": "public function store(CreateImageRequest $request){\n\n $marketingImage = new Marketingimage([\n 'image_name' => $request->get('image_name'),\n 'image_extension' => $request->file('image')->getClientOriginalExtension(),\n 'mobile_image_name' => $request->get('mobile_image_name'),\n 'mobile_extension' => $request->file('mobile_image')->getClientOriginalExtension(),\n 'is_active' => $request->get('is_active'),\n 'is_featured' => $request->get('is_featured'),\n\n ]);\n\n //define the image paths\n \n $destinationFolder = '/imgs/marketing/';\n $destinationThumbnail = '/imgs/marketing/thumbnails/';\n $destinationMobile = '/imgs/marketing/mobile/';\n\n //assign the image paths to new model, so we can save them to DB\n\n $marketingImage->image_path = $destinationFolder;\n $marketingImage->mobile_image_path = $destinationMobile;\n \n // format checkbox values and save model\n\n $this->formatCheckboxValue($marketingImage);\n \n DB::beginTransaction();\n \n $marketingImage->save();\n\n //parts of the image we will need\n\n $file = Input::file('image');\n\n $imageName = $marketingImage->image_name;\n $extension = $request->file('image')->getClientOriginalExtension();\n\n //create instance of image from temp upload\n\n $image = Image::make($file->getRealPath());\n\n //save image with thumbnail\n\n $image->save(public_path() . $destinationFolder . $imageName . '.' . $extension)\n ->resize(60, 60)\n // ->greyscale()\n ->save(public_path() . $destinationThumbnail . 'thumb-' . $imageName . '.' . $extension);\n\n // now for mobile\n\n $mobileFile = Input::file('mobile_image');\n\n $mobileImageName = $marketingImage->mobile_image_name;\n $mobileExtension = $request->file('mobile_image')->getClientOriginalExtension();\n\n //create instance of image from temp upload\n $mobileImage = Image::make($mobileFile->getRealPath());\n $mobileImage->save(public_path() . $destinationMobile . $mobileImageName . '.' . $mobileExtension);\n\n\n // Process the uploaded image, add $model->attribute and folder name\n DB::commit();\n \n flash()->success('Marketing Image Created!');\n// flash()->overlay('Notice', 'You are now a Laracasts member!');\n\n return redirect()->route('marketingimage.show', [$marketingImage]);\n }", "title": "" }, { "docid": "ea628b03e3dbb0ecc5754010fad09f19", "score": "0.59800404", "text": "public function vehicle_details(){\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$pid = html_escape($this->input->post('id'));\n\t\t\t$id = preg_replace('#[^0-9]#i', '', $pid); // filter everything but numbers\n\n\t\t\t$detail = $this->db->select('*')->from('vehicles')->where('id',$id)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t$data['id'] = $detail->id;\n\t\t\t\t\t\n\t\t\t\t$data['headerTitle'] = $detail->vehicle_make.' '.$detail->vehicle_model;\t\n\t\t\t\t\n\t\t\t\t$title = $detail->vehicle_make.' '.$detail->vehicle_model;\n\t\t\t\t$image = '';\n\t\t\t\t$thumbnail = '';\n\t\t\t\t\t\n\t\t\t\t$filename = FCPATH.'uploads/vehicles/'.$detail->id.'/'.$detail->vehicle_image;\n\n\t\t\t\tif($detail->vehicle_image == '' || $detail->vehicle_image == null || !file_exists($filename)){\n\t\t\t\t\t\t\n\t\t\t\t\t//$result = $this->db->select_min('id')->from('vehicle_images')->where('vehicle_id', $detail->id)->get()->row();\n\t\t\t\t\t\t\n\t\t\t\t\t$result = $this->db->select('*, MIN(id) as min_id', false)->from('vehicle_images')->where('vehicle_id', $detail->id)->get()->row();\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($result)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//MAIN IMAGE\n\t\t\t\t\t\t$image = '<div class=\"wrapper\"><img alt=\"\" src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$result->image_name.'\" class=\"img-responsive main-img\" id=\"main-img\" width=\"\" height=\"\"/></div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//THUMBNAIL\n\t\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$result->image_name.'\" class=\"\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//MAIN IMAGE\n\t\t\t\t\t\t$image = '<div class=\"wrapper\"><img alt=\"\" src=\"'.base_url().'assets/images/img/no-default-thumbnail.png\" class=\"img-responsive main-img\" id=\"main-img\" width=\"\" height=\"\"/></div>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'assets/images/img/no-default-thumbnail.png\" />';\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//MAIN IMAGE\n\t\t\t\t\t$image = '<div class=\"wrapper\"><img alt=\"\" src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$detail->vehicle_image.'\" class=\"img-responsive main-img\" id=\"main-img\" width=\"\" height=\"\"/></div>';\n\t\t\t\t\t\t\n\t\t\t\t\t//THUMBNAIL\n\t\t\t\t\t$thumbnail = '<img src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$detail->vehicle_image.'\" class=\"\" />';\n\t\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t$data['image'] = $image;\n\t\t\t\t\t\n\t\t\t\t$data['thumbnail'] = $thumbnail;\n\t\t\t\t\t\n\t\t\t\t/*$result = $this->db->select_min('id')->from('vehicle_images')->where('vehicle_id', $detail->id)->get()->row();\n\t\t\t\t$image_name = '';\n\t\t\t\tif(!empty($result)){\n\t\t\t\t\t\t\n\t\t\t\t\t$image_name = $result->image_name;\n\t\t\t\t\t\t\n\t\t\t\t\t$data['image'] = '<a title=\"Click to View\"><img alt=\"\" src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$image_name.'\" class=\"img-responsive main-img\" id=\"main-img\" width=\"\" height=\"\"/></a>';\n\t\t\t\t\t\n\t\t\t\t\t$data['mini_thumbnail'] = '<img src=\"'.base_url().'uploads/projects/'.$detail->id.'/'.$image_name.'\" class=\"img-responsive img-thumbnail\" />';\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$data['image'] = '<a title=\"Click to View\"><img alt=\"\" src=\"'.base_url().'assets/images/img/no-default-thumbnail.png\" class=\"img-responsive main-img\" id=\"main-img\" width=\"\" height=\"\"/></a>';\n\t\t\t\t\t\n\t\t\t\t\t$data['mini_thumbnail'] = '<img src=\"'.base_url().'assets/images/img/no-default-thumbnail.png\" class=\"img-responsive img-thumbnail\" />';\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//get main image\n\t\t\t\t$main_img = $detail->vehicle_image;\n\t\t\t\t\t\n\t\t\t\t$vehicle_images = $this->Vehicles->get_vehicle_images($detail->id);\n\t\t\t\t\t\n\t\t\t\t//count and display the number of images stored\n\t\t\t\t$images_count = $this->Vehicles->count_vehicle_images($detail->id);\n\t\t\t\t\t\n\t\t\t\tif($images_count == '' || $images_count == null){\n\t\t\t\t\t$images_count = 0;\n\t\t\t\t}\n\t\t\t\t$data['images_count'] = $images_count;\n\t\t\t\t\t\n\t\t\t\t//start portfolio gallery view\n\t\t\t\t$gallery = '<div class=\"p_gallery\">';\n\t\t\t\t\t\n\t\t\t\t//start gallery edit group\n\t\t\t\t$image_group = '<div class=\"\">';\n\t\t\t\t$image_gallery = '<div class=\"gallery-wrapper\">';\n\t\t\t\t\t\n\t\t\t\tif(!empty($vehicle_images)){\n\t\t\t\t\t//item count initialised\n\t\t\t\t\t$i = 0;\n\t\t\t\t\t$a = 1;\n\t\t\t\t\t//gallery edit row\n\t\t\t\t\t$image_group .= '<div class=\"row\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($vehicle_images as $image){\n\n\t\t\t\t\t\t$image_gallery .= '<div class=\"img-wrapper\">';\n\t\t\t\t\t\t$image_gallery .= '<a href=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\" title=\"View\" data-fancybox=\"gallery\"><div class=\"wrapper\"><img src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\" id=\"'.$image->image_name.'\" class=\"img-responsive\" onclick=\"changeImage(\\''.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\\')\" /><div class=\"img-icon\"><i class=\"fa fa-search-plus\" aria-hidden=\"true\"></i></div></div></a>';\n\t\t\t\t\t\t$image_gallery .= '</div>';\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//portfolio gallery view\n\t\t\t\t\t\t$gallery .= '<a href=\"javascript:void(0)\" title=\"View '.$title.' '.$a.'\">';\n\t\t\t\t\t\t$gallery .= '<img src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\" id=\"'.$image->image_name.'\" class=\"img-responsive\" onclick=\"changeImage(\\''.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\\')\"/>';\n\t\t\t\t\t\t$gallery .= '</a>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//gallery edit group\n\t\t\t\t\t\t$image_group .= '<div class=\"col-sm-3 nopadding\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//gallery edit group\n\t\t\t\t\t\t$image_group .= '<div class=\"image-group\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$image_group .= '<img src=\"'.base_url().'uploads/vehicles/'.$detail->id.'/'.$image->image_name.'\" id=\"'.$image->image_name.'\" class=\"img-responsive\" />';\n\t\t\t\t\t\t//image path\n\t\t\t\t\t\t$path = 'uploads/vehicles/'.$detail->id.'/'.$image->image_name;\n\t\t\t\t\t\t$url = 'account/delete_vehicle_images';\n\t\t\t\t\t\t$imageurl = 'account/make_image_main';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($main_img == $image->image_name){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image_group .= '<span class=\"text-primary\"><i class=\"fa fa-picture-o\"></i> <strong>Main</strong></span>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image_group .= '<span class=\"pull-right\"><a href=\"#\" class=\"remove_image\" onclick=\"deleteVehicleImage(this,'.$detail->id.','.$image->id.',\\''.$path.'\\',\\''.$url.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-trash-o\"></i> Remove</span></a></span>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$image_group .= '<a href=\"#\" class=\"remove_image\" onclick=\"deleteVehicleImage(this,'.$detail->id.','.$image->id.',\\''.$path.'\\',\\''.$url.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-trash-o\"></i> Remove</span></a>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image_group .= '<span class=\"pull-right\"><a href=\"#\" class=\"main_image\" onclick=\"mainVehicleImage(this,'.$detail->id.',\\''.$image->image_name.'\\',\\''.$imageurl.'\\')\"><span aria-hidden=\"true\"><i class=\"fa fa-picture-o\"></i> Make Main</span></a></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$image_group .= '</div>';\n\t\t\t\t\t\t$image_group .= '</div>';\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\tif($i % 4 == 0){\n\t\t\t\t\t\t\t$image_group .= '</div><br/><div class=\"row\">';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$image_group .= '<div style=\"clear:both;\"></div>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$a++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$image_gallery .= '</div>';\n\t\t\t\t$data['image_gallery'] = $image_gallery;\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t//end gallery edit group\n\t\t\t\t$image_group .= '</div>';\n\t\t\t\t$data['image_group'] = $image_group;\n\t\t\t\t\t\n\t\t\t\t//end portfolio gallery view\n\t\t\t\t$gallery .= '</div>';\n\t\t\t\t$data['vehicle_gallery'] = $gallery;\n\t\t\t\t\t\n\t\t\t\t$data['vehicle_title'] = $detail->vehicle_make.' '.$detail->vehicle_model;\n\t\t\t\t$data['vehicle_type'] = $detail->vehicle_type;\n\t\t\t\t$data['vehicle_make'] = $detail->vehicle_make;\n\t\t\t\t$data['vehicle_model'] = $detail->vehicle_model;\n\t\t\t\t$data['year_of_manufacture'] = $detail->year_of_manufacture;\n\t\t\t\t$data['vehicle_odometer'] = $detail->vehicle_odometer;\n\t\t\t\t$data['vehicle_lot_number'] = $detail->vehicle_lot_number;\n\t\t\t\t$data['vehicle_vin'] = $detail->vehicle_vin;\n\t\t\t\t$data['vehicle_colour'] = $detail->vehicle_colour;\n\t\t\t\t\t\n\t\t\t\t$background_image = base_url().'assets/images/backgrounds/'.strtolower($detail->vehicle_colour).'.png?'.time();\n\t\t\t\t$data['colour'] = '<div class=\"colours-box\" title=\"'.ucwords($detail->vehicle_colour).'\" id=\"'.strtolower($detail->vehicle_colour).'\" data-toggle=\"tooltip\" data-placement=\"top\" style=\"background-color:'.strtolower($detail->vehicle_colour).'; background-image: url('.$background_image.'); background-position: center; background-repeat:no-repeat; background-size:cover;\"></div>';\n\t\t\t\t\t\n\t\t\t\t//$data['vehicle_price'] = $detail->vehicle_price;\n\t\t\t\t$vehicle_price = '$'.number_format($detail->vehicle_price, 0); \t\n\t\t\t\t\t\n\t\t\t\tif($detail->discount < 1){\n\t\t\t\t\t$data['discount'] = '';\n\t\t\t\t}else{\n\t\t\t\t\t$data['discount'] = $detail->discount .'%';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$price_after_discount = '';\n\t\t\t\tif($detail->price_after_discount < 1){\n\t\t\t\t\t$price_after_discount = '';\n\t\t\t\t\t$data['vehicle_price'] = '$'.number_format($detail->vehicle_price, 0);\n\t\t\t\t\t$data['price_after_discount'] = '';\n\t\t\t\t}else{\n\t\t\t\t\t$price_after_discount = '$'.number_format($detail->price_after_discount, 0);\n\t\t\t\t\t$vehicle_price = '$'.number_format($detail->price_after_discount, 0).' <span class=\"small\"><strike>$'.number_format($detail->vehicle_price, 0).'</strike></span>';\n\t\t\t\t\t$data['vehicle_price'] = '$'.number_format($detail->price_after_discount, 0);\n\t\t\t\t\t$data['old_price'] = '<strike>$'.number_format($detail->vehicle_price, 0).'</strike>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//$data['vehicle_price'] = '$'.number_format($detail->vehicle_price, 0);\n\t\t\t\t//$data['vehicle_price'] = $vehicle_price;\n\t\t\t\t\n\t\t\t\t$data['price_after_discount'] = $price_after_discount;\n\t\t\t\t$data['price'] = $detail->vehicle_price;\n\t\t\t\t\n\t\t\t\t/* CALCULATE INT AND DECIMAL\n\t\t\t\t$price_int = $detail->vehicle_price > 0 ? floor($detail->vehicle_price) : ceil($detail->vehicle_price);\n\t\t\t\t$data['price_int'] = $price_int;\n\t\t\t\t$data['price_decimal'] = abs($detail->vehicle_price - $price_int);\n\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t$data['vehicle_location_city'] = $detail->vehicle_location_city;\n\t\t\t\t$data['vehicle_location_country'] = $detail->vehicle_location_country;\n\t\t\t\t$data['vehicle_description'] = $detail->vehicle_description;\n\t\t\t\t\t\n\t\t\t\t$sale_status = $detail->sale_status;\n\t\t\t\tif($sale_status == '0'){\n\t\t\t\t\t$sale_status = 'Available';\n\t\t\t\t}else{\n\t\t\t\t\t$sale_status = 'Sold';\n\t\t\t\t}\n\t\t\t\t$data['saleStatus'] = $sale_status;\n\t\t\t\t$data['sale_status'] = $detail->sale_status;\n\t\t\t\t\t\n\t\t\t\t$data['trader_email'] = $detail->trader_email;\n\t\t\t\t\n\t\t\t\t$data['date_added'] = date(\"F j, Y\", strtotime($detail->date_added));\n\t\t\t\t$data['last_updated'] = date(\"F j, Y, g:i a\", strtotime($detail->last_updated));\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t//SELECT VEHICLE TYPE DROPDOWN\n\t\t\t\t$vehicle_type = '<option value=\"\">Select Type</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('vehicle_types');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$default = (strtolower($row['name']) == strtolower($detail->vehicle_type))?'selected':'';\n\t\t\t\t\t\t$vehicle_type .= '<option value=\"'.$row['name'].'\" '.$default.'>'.$row['name'].'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t$data['vehicle_type_options'] = $vehicle_type;\n\t\t\t\t//*********END SELECT VEHICLE TYPE DROPDOWN**********//\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//*********SELECT VEHICLE MAKE DROPDOWN**********//\n\t\t\t\t$vehicle_make = '<option value=\"\">Select Make</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('vehicle_makes');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$default2 = (strtolower($row['title']) == strtolower($detail->vehicle_make))?'selected':'';\n\t\t\t\t\t\t$vehicle_make .= '<option value=\"'.$row['id'].'\" '.$default2.'>'.$row['title'].'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data['vehicle_make_options'] = $vehicle_make;\n\t\t\t\t//*********END SELECT VEHICLE MAKE DROPDOWN**********//\n\t\t\t\t\t\n\t\t\t\t$make_array = $this->Vehicle_makes->get_make_by_title($detail->vehicle_make);\n\t\t\t\t$made_id = '';\n\t\t\t\tif($make_array){\n\t\t\t\t\tforeach($make_array as $m){\n\t\t\t\t\t\t\t$made_id = $m->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//*********SELECT VEHICLE MODEL DROPDOWN**********//\n\t\t\t\t$vehicle_model = '<option value=\"\">Select Model</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('vehicle_models');\n\t\t\t\tif($made_id != ''){\n\t\t\t\t\t$this->db->where('make_id', $made_id);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$default3 = (strtolower($row['title']) == strtolower($detail->vehicle_model))?'selected':'';\n\t\t\t\t\t\t$vehicle_model .= '<option value=\"'.$row['title'].'\" '.$default3.'>'.$row['title'].'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t$data['vehicle_model_options'] = $vehicle_model;\n\t\t\t\t//*********END SELECT VEHICLE MODEL DROPDOWN**********//\n\t\t\t\t\t\n\n\t\t\t\t//SELECT YEAR DROPDOWN\n\t\t\t\t$year_of_manufacture = '<option value=\"\">Select Year</option>';\n\t\t\t\tfor($i=date(\"Y\")-50; $i<=date(\"Y\"); $i++) {\n\t\t\t\t\t$sel = ($i == $detail->year_of_manufacture) ? 'selected' : '';\n\t\t\t\t\t$year_of_manufacture .= \"<option value=\".$i.\" \".$sel.\">\".$i.\"</option>\"; \n\t\t\t\t}\t\t\n\t\t\t\t$data['year_of_manufacture_options'] = $year_of_manufacture;\n\t\t\t\t//*********END SELECT YEAR DROPDOWN**********//\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t//SELECT COLOUR DROPDOWN\n\t\t\t\t$colours = '<option value=\"\" >Select Colour</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('colours');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$d = (strtolower($row['colour_name']) == strtolower($detail->vehicle_colour))?'selected':'';\n\t\t\t\t\t\t$colours .= '<option value=\"'.$row['colour_name'].'\" '.$d.'>'.ucwords($row['colour_name']).'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data['colour_options'] = $colours;\n\t\t\t\t//*********END SELECT COLOUR DROPDOWN**********//\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//SELECT COUNTRY DROPDOWN\n\t\t\t\t$countries = '<option value=\"\" >Select Country</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('countries');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$d = (strtolower($row['name']) == strtolower($detail->vehicle_location_country))?'selected':'';\n\t\t\t\t\t\t$countries .= '<option value=\"'.$row['name'].'\" '.$d.'>'.ucwords($row['name']).'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data['country_options'] = $countries;\n\t\t\t\t//*********END SELECT COUNTRY DROPDOWN**********//\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//*********SELECT SALE STATUS DROPDOWN**********//\n\t\t\t\t$sale_status = '<option value=\"\" >Sale Status</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t$this->db->from('status');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$default = (strtolower($row['status']) == strtolower($detail->sale_status))?'selected':'';\n\t\t\t\t\t\t$status = (strtolower($row['status']) == '0')?'Available':'Sold';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$sale_status .= '<option value=\"'.$row['status'].'\" '.$default.'>'.$status.'</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$data['sale_status_options'] = $sale_status;\n\t\t\t\t\t//*********END SELECT SALE STATUS DROPDOWN**********//\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data['model'] = 'vehicles';\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t}\n\t\t\t\n\t\t\techo json_encode($data);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "36762f5b217796949a64f51e11ebc3ba", "score": "0.59798336", "text": "public function upload(Request $request)\n {\n $visiInfo = new Visitinformation();\n $PlaceId = Place::where('placeName', $request->input('place'))->first()->id;\n\n\n // Get the currently authenticated user's ID...\n\n if (Auth::guard('admin')->check()){\n $idAuth = Auth::guard('admin')->user()->id;\n print_r($idAuth);\n }\n\n\n $visiInfo->title = $request->input('title');\n $visiInfo->description = $request->input('description');\n $visiInfo->address = $request->input('address');\n $visiInfo->place_id = $PlaceId;\n $visiInfo->admin_id = $idAuth;\n $visiInfo->rating = 0;\n $visiInfo->save();\n\n $files = $request->file('file');\n $types = $request->get('types');\n $visiInfo_id = $visiInfo->id;\n\n \tif(!empty($files)):\n foreach($files as $file):\n print_r($file);\n $photo = new Photo();\n // get file size\n\n $fileName= time().''.rand().'.'.$file->getClientOriginalExtension(); //\"-0.jpg\";\n // print_r($fileName);\n $location = public_path('images/'. $fileName);\n Image::make($file)->resize(800,400)->save($location);\n $photo->photo = $fileName;\n $photo->visitinformation_id = $visiInfo_id;\n $photo->save();\n \t\tendforeach;\n \tendif;\n\n if(!empty($types)):\n print_r($types);\n $visiInfo->placeType()->sync($types, false);\n endif;\n\n \treturn \\Response::json(array('success' => true));\n }", "title": "" }, { "docid": "a434956ba595ebf5e0162c7726dea612", "score": "0.5978361", "text": "function postEditProduct(Request $request)\n {\n $image = $request->file('image');\n $filename = time().'.'. $image->getClientOriginalExtension();\n\n $path = \"storage/CatalogPics/\".$filename;\n $pathToDb = \"/storage/CatalogPics/\".$filename;\n\n Image::make($image->getRealPath())->fit('400','280')->save($path);\n $id = $request->input('id');\n $name = $request->input('name');\n $image = $pathToDb;\n $price = $request->input('price');\n $category = $request->input('category');\n $description = $request->input('description');\n $catalog = new Catalog();\n $catalog->where('id', '=',$id)->update(\n ['name'=> $name,\n 'description'=>$description,\n 'image'=>$image,\n 'category'=>$category,\n 'price'=>$price\n ]);\n return redirect()->route('shopList');\n }", "title": "" }, { "docid": "284d47384b80ac7af14ddbdad63a646a", "score": "0.59782225", "text": "public function store(Request $request)\n {\n\n $files = $request->file('image');\n $fileAry = array();\n\nforeach ($files as $image) {\n $filename = uniqid() . '_' .$image->getClientOriginalName();\n array_push($fileAry,$filename);\n $image->move(public_path() . '/upload/', $filename);\n // code...\n}\nItem::create([\n 'name' => $request->get('name'),\n'quantity' => $request->get('quantity'),\n'image' => serialize($fileAry),\n]);\n\n\n\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "3bba092fda91107f57510033d8c6a8a9", "score": "0.5978182", "text": "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Gou_Brand');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "fd1afd009645ac9a9a771322e7de8a5d", "score": "0.59756726", "text": "public function new_item(Request $request){\n $item = new Item();\n\n try {\n $item->name=$request->input('name');\n $item->price=$request->input('price');\n $item->unit=$request->input('unit');\n $item->details=$request->input('details');\n $item->category_id=$request->input('category_id');\n\n if ($request->hasFile('item_image')) {\n $item->item_image=request()->item_image->store('uploads','public');\n $this->validate($request, [\n 'item_image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:51200|dimensions:max_width=361,max_height=361',\n ]);\n }\n else{\n $item->item_image=\"uploads/item_image.png\";\n }\n $item->save();\n\n \n return redirect()->back()->with('success','Producto agregado!');\n } catch (\\Throwable $th) {\n return redirect()->back()->with('error','Acción Denegada');\n }\n }", "title": "" }, { "docid": "25198496a726755bb9c99d8585c11bc3", "score": "0.5975156", "text": "public function newRow()\n {\n $isNew = UtilitiesHelper::toBoolean($this->getParam('new'));\n $instanceId = $this->getParam('id');\n $instance = R::findOne($this->model(), 'id = ?', array($instanceId));\n $imageField = $this->getParam('field');\n $imagePosition = (int)$this->getParam('pos');\n $imageSettings = $this->getImageSettings();\n $settingName = $this->getParam('setting');\n $imageSetting = $imageSettings[$settingName];\n $images = $this->getImagesValue($instance, $settingName);\n if (empty($images)) {\n $images = array();\n }\n else {\n if (!is_array($images)) {\n $images = UtilitiesHelper::decodeJson($images, true);\n }\n }\n $this->setPaths();\n $this->setupInstanceImageAssigns($instance);\n $this->app->getTemplateEngine()->assign(array(\n 'instanceName' => $this->instanceName,\n '_imageSetting' => $imageSetting,\n '_imagePos' => $imagePosition,\n '_imageSettingName' => $settingName\n\n ));\n if (count($imageSetting['types']) > 0) {\n $newImageRow = array();\n foreach($imageSetting['types'] as $type => $setting) {\n $newImageRow[$type] = '';\n }\n if ($isNew) {\n array_unshift($images, $newImageRow);\n $json_encoded = json_encode($images);\n $instance->set($imageField, $json_encoded);\n R::store($instance);\n }\n else {\n $image = $images[$imagePosition];\n $this->app->getTemplateEngine()->assign(array(\n '_image' => $image\n ));\n }\n $this->app->getTemplateEngine()->assign(array(\n $this->instanceName => $instance->export()\n ));\n $this->render('/admin/widgets/imageUploader/multiple/_manyTypes');\n }\n else {\n $newImageRow = '';\n array_unshift($images, $newImageRow);\n $json_encoded = json_encode($images);\n $instance->set($imageField, $json_encoded);\n R::store($instance);\n $this->app->getTemplateEngine()->assign(array(\n $this->instanceName => $instance->export()\n ));\n $this->render('/admin/widgets/imageUploader/multiple/_oneType');\n }\n }", "title": "" }, { "docid": "06c96aa1a103cd638c7bdfbd1eb89af2", "score": "0.59747225", "text": "public function uploadPhoto();", "title": "" }, { "docid": "69501a4f33aa8649dafbc1a46b5e8eba", "score": "0.59719783", "text": "public function store(Request $request)\n {\n \n if($request->hasfile('image')){\n $destinationPath = public_path( 'images/product' );\n if ( ! File::exists( $destinationPath ) ) {\n File::makeDirectory( $destinationPath, 0777, true, true );\n }\n \n $image = $request['image'];\n \n $extension = $image->getClientOriginalExtension(); \n $fileName = time().'.'.$extension; \n $image->move($destinationPath, $fileName);\n }else{\n $fileName = Null;\n }\n\n $array =[\n 'Product_name'=> $request->Product_name,\n 'Qty'=> $request->Qty,\n 'Price'=> $request->Price,\n 'image'=> $fileName,\n ];\n Product::insert($array);\n return redirect('Product_list');\n\n }", "title": "" }, { "docid": "b6bb9e8fa0f1623fc81b7af6cfb542fe", "score": "0.59715503", "text": "public function store(Request $request)\n { \n \n if($request->hasFile('image')){\n $file = $request->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = time().'.'.$extension;\n $file->move('/image/voitures', $filename);\n $vehicule->image = $filename;\n $vehicule = Vehicule::create($request->all());\n }\n // generer un matricule\n // $vehicule->vh_matricule = $this->matricule();\n // $vehicule = Vehicule::create($request->all());\n $vehicule = new Vehicule;\n $vehicule->vh_poids= $request->vh_poids;\n $vehicule->vh_hauteure = $request->vh_hauteure;\n $vehicule->vh_largeur = $request->vh_largeur;\n $vehicule->vh_longueur = $request->vh_longueur;\n $vehicule->vh_ptac = $request->vh_ptac;\n $vehicule->vh_ptra = $request->vh_ptra;\n $vehicule->typevehicule_id = $request->typevehicule_id;\n $vehicule->vh_essieu = $request->vh_essieu;\n $vehicule->vh_statut = $request->vh_statut;\n $vehicule->vh_disponibilite = $request->vh_disponibilite;\n $vehicule->vh_matricule = $this->matricule();\n $vehicule->save();\n return response()->json($vehicule, 200);\n }", "title": "" }, { "docid": "4d454123a2349531b18829fec08efd8b", "score": "0.5969265", "text": "function add_new_order_post()\n {\n\n //order info\n $name = $this->post('name');\n $description = $this->post('_description');\n $ordinal = $this->post('ordinal');\n $is_active = !empty($this->post('is_active')) ? 1 : 0 ;\n\n $check_verify_params = checkVerifyParams(array(\n $name,\n $_FILES['img_src']['name'],\n ));\n\n if(!empty($check_verify_params)){\n $this->response(RestBadRequest(MISMATCH_PARAMS_MSG), BAD_REQUEST_CODE);\n }\n\n //upload img_src\n $img_path = $_FILES['img_src']['name'];\n $img_path_ext = pathinfo($img_path, PATHINFO_EXTENSION);\n $config['upload_path'] = './public/upload/img/order';\n $config['allowed_types'] = 'jpg|jpeg|png';\n $config['file_name'] = strtotime('now') .'.'. $img_path_ext;\n\n //Load upload library and initialize configuration\n $this->load->library('upload', $config);\n $this->upload->initialize($config);\n\n if ($this->upload->do_upload('img_src')) {\n\n //insert order tb\n $this->order_model->create(array(\n 'name' => $name,\n 'plain_name' => skipVN($name, true),\n '_description' => $description,\n 'plain_description' => skipVN(removeHTMLTagsAndSpecialChar($description), true),\n '_key' => generateKeyTranslation(),\n 'img_src' => 'public/upload/img/order/'. $config['file_name'],\n 'ordinal' => $ordinal,\n 'is_active' => $is_active,\n 'create_time' => CURRENT_TIME,\n 'update_time' => CURRENT_TIME,\n 'create_time_mi' => CURRENT_MILLISECONDS\n ));\n\n\n $this->response(RestSuccess(), SUCCESS_CODE);\n }\n else{\n $this->response(RestServerError(), SERVER_ERROR_CODE);\n }\n }", "title": "" }, { "docid": "02b6b64378412048f593de1924472e2a", "score": "0.59680986", "text": "public function actionCreate()\n {\n $model = new Properties();\n $attachmentObj = new PropertyImageGalleries();\n $arrPost = Yii::$app->request->post();\n\n if ($model->load($arrPost)) {\n \n $txtHostName = $_SERVER['DOCUMENT_ROOT'];\n \n \n if(isset($_FILES['Properties']['name']['image']) && !empty($_FILES['Properties']['name']['image'])):\n $model->image = $_FILES['Properties']['name']['image'];\n $id = $model->getNextId('properties','id');\n //Save Featured Image\n $txtBaseFilePath = '/Featured/'.$id.'/';\n $baseImage = (file_get_contents($_FILES['Properties']['tmp_name']['image']));\n FileHelper::createDirectory($txtHostName.$txtBaseFilePath,$mode = 0777);\n file_put_contents($txtHostName.$txtBaseFilePath.$model->image,$baseImage);\n endif;\n // echo '<pre>';print_R($model);exit;\n //Save property model\n $model->id = $model->getNextId('properties','id');\n if(empty(Yii::$app->user->id)):\n $model->agent_id = 1;\n else:\n $model->agent_id = Yii::$app->user->id;\n endif;\n \n $model->dat_created = date('Y-m-d');\n $model->save();\n \n //Save attachment\n if(isset($_FILES['PropertyImageGalleries']['name']) && !empty($_FILES['PropertyImageGalleries']['name'])):\n foreach($_FILES['PropertyImageGalleries']['name']['name'] as $key => $txtFileName):\n \n $id = $model->id;\n //Save Featured Image\n $txtBaseFilePath = '/Gallery/'.$id.'/';\n $baseImage = (file_get_contents($_FILES['PropertyImageGalleries']['tmp_name']['name'][$key]));\n FileHelper::createDirectory($txtHostName.$txtBaseFilePath,$mode = 0777);\n file_put_contents($txtHostName.$txtBaseFilePath.$txtFileName,$baseImage);\n \n //Save Property Attachment Model\n $modelAttachment = new PropertyImageGalleries();\n $modelAttachment->id = $model->getNextId('property_image_galleries','id');\n $modelAttachment->property_id = $model->id;\n $modelAttachment->name =$txtFileName;\n $modelAttachment->size = (string)$_FILES['PropertyImageGalleries']['size']['name'][$key];\n // $modelAttachment->created_at = time();\n $modelAttachment->save();\n endforeach;\n endif;\n \n \n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'attachmentObj' => $attachmentObj,\n 'txtFilePath' => '',\n ]);\n }", "title": "" }, { "docid": "d03039f166b9d615f3f9e131b6e5222a", "score": "0.5964206", "text": "public function store(Request $request)\n {\n\n $id_user = Auth::id();\n $identification = User::find($id_user);\n\n $img = $request->file('image');\n\n $validator = Validator::make($request->all(),[\n 'image' => 'required|image',\n 'description' => 'required|max:55',\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator);\n }\n else{ \n $imgName = $img->getClientOriginalName();\n $path = $img->storeAs('img', $imgName);\n \n $storeImage = Image::create([\n 'id_user' => $identification->identification,\n 'img' => $imgName,\n 'description' => $request->input('description'),\n ]);\n Session::flash('message', 'Carga exitosa');\n return Redirect::back();\n } \n }", "title": "" }, { "docid": "0119e82e3ab68dfc89b627e0ebb665d4", "score": "0.59614444", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|min:6',\n 'description' => 'max:4000',\n 'image' => 'required|image|mimes:jpg,png,gif|max:5000',\n 'stock' => 'required'\n ]);\n\n if($request->hasFile('image')){\n $request->image->store('images', 'public');\n $product = new ModelProduct([\n \"title\" => $request->get('title'),\n \"description\" => $request->get('description'),\n \"image\" => $request->image->hashName(),\n \"stock\" => $request->get('stock')\n ]);\n }\n $product->save();\n\n return redirect('products')\n ->with('success','Item created successfully');\n }", "title": "" }, { "docid": "e20d3f5109c8f5a9557fe70517a78a2e", "score": "0.5958217", "text": "function create()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\t$this->content_obj = new ilPCInteractiveImage($this->getPage());\n\t\t$this->content_obj->createMediaObject();\n\t\t$media_obj = $this->content_obj->getMediaObject();\n\t\t$media_obj->setTitle($_FILES['image_file']['name']);\n\t\t$media_obj->create();\n\t\t$mob_dir = ilObjMediaObject::_getDirectory($media_obj->getId());\n//\t\t$media_obj->setStandardType(\"File\");\n\t\t$media_obj->createDirectory();\n\t\t$media_item = new ilMediaItem();\n\t\t$media_obj->addMediaItem($media_item);\n\t\t$media_item->setPurpose(\"Standard\");\n\t\t\n\t\t$file = $mob_dir.\"/\".$_FILES['image_file']['name'];\n\t\tilUtil::moveUploadedFile($_FILES['image_file']['tmp_name'],\n\t\t\t$_FILES['image_file']['name'], $file);\n\n\t\t// get mime type\n\t\t$format = ilObjMediaObject::getMimeType($file);\n\t\t$location = $_FILES['image_file']['name'];\n\n\t\t// set real meta and object data\n\t\t$media_item->setFormat($format);\n\t\t$media_item->setLocation($location);\n\t\t$media_item->setLocationType(\"LocalFile\");\n\n\t\tilUtil::renameExecutables($mob_dir);\n\t\t$media_obj->update();\n\n\t\t$this->content_obj->createAlias($this->pg_obj, $this->hier_id, $this->pc_id);\n\t\t$this->updated = $this->pg_obj->update();\n\t\tif ($this->updated === true)\n\t\t{\n\t\t\t$this->pg_obj->stripHierIDs();\n\t\t\t$this->pg_obj->addHierIDs();\n\t\t\t$ilCtrl->setParameter($this, \"hier_id\", $this->content_obj->readHierId());\n\t\t\t$ilCtrl->setParameter($this, \"pc_id\", $this->content_obj->readPCId());\n\t\t\t$this->content_obj->setHierId($this->content_obj->readHierId());\n\t\t\t$this->setHierId($this->content_obj->readHierId());\n\t\t\t$this->content_obj->setPCId($this->content_obj->readPCId());\n\t\t\tilUtil::sendSuccess($lng->txt(\"cont_saved_interactive_image\"), true);\n\t\t\t$this->ctrl->redirectByClass(\"ilpcinteractiveimagegui\", \"edit\");\n\n\t\t\t//$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "35bbb3325d9f495744773d40d0d8eb0c", "score": "0.59553516", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $attachmentObj = new PropertyImageGalleries();\n $attachmentObj->scenario = 'update';\n $attachmentModel = PropertyImageGalleries::find()\n ->andWhere('property_id = '.$id)\n ->all();\n \n $txtImageName = $model->image;\n if ($model->load(Yii::$app->request->post())) {\n $txtHostName = $_SERVER['DOCUMENT_ROOT'];\n \n \n if(isset($_FILES['Properties']['name']['image']) && !empty($_FILES['Properties']['name']['image'])):\n \n $model->image = $_FILES['Properties']['name']['image'];\n $id = $model->id;\n //Save Featured Image\n $txtBaseFilePath = '/Featured/'.$id.'/';\n $baseImage = (file_get_contents($_FILES['Properties']['tmp_name']['image']));\n FileHelper::createDirectory($txtHostName.$txtBaseFilePath,$mode = 0777);\n file_put_contents($txtHostName.$txtBaseFilePath.$model->image,$baseImage);\n endif;\n \n if(empty(Yii::$app->user->id)):\n $model->agent_id = 1;\n else:\n $model->agent_id = Yii::$app->user->id;\n endif;\n if(empty($model->image)):\n $model->image = $txtImageName;\n endif;\n // echo '<pre>';print_R($model);exit;\n $model->save();\n //echo '<pre>';print_R($_FILES);exit;\n //Save attachment\n if(isset($_FILES['PropertyImageGalleries']['name']['name']) && !empty($_FILES['PropertyImageGalleries']['name'])):\n foreach($_FILES['PropertyImageGalleries']['name']['name'] as $key => $txtFileName):\n if(empty($txtFileName)):\n continue;\n endif;\n $id = $model->id;\n //Save Featured Image\n $txtBaseFilePath = '/Gallery/'.$id.'/';\n $baseImage = (file_get_contents($_FILES['PropertyImageGalleries']['tmp_name']['name'][$key]));\n FileHelper::createDirectory($txtHostName.$txtBaseFilePath,$mode = 0777);\n file_put_contents($txtHostName.$txtBaseFilePath.$txtFileName,$baseImage);\n \n //Save Property Attachment Model\n $modelAttachment = new PropertyImageGalleries();\n $modelAttachment->id = $model->getNextId('property_image_galleries','id');\n $modelAttachment->property_id = $model->id;\n $modelAttachment->name =$txtFileName;\n $modelAttachment->size = (string)$_FILES['PropertyImageGalleries']['size']['name'][$key];\n //$modelAttachment->created_at = time();\n \n $modelAttachment->save();\n \n endforeach;\n endif;\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'attachmentObj' => $attachmentObj,\n 'attachmentModel' => $attachmentModel,\n 'txtFilePath' => '',\n ]);\n }", "title": "" }, { "docid": "894370ed1fe9f6ddb3d1e6ffc9dca7dc", "score": "0.5947891", "text": "public function store(Request $request)\n { \n $supplier = Auth::user();\n $this->validateProduct();\n //save photo in to folder\n \n $file_name = $request->product_img->getClientOriginalName();\n $path = 'images/products';\n $request->product_img->move($path, $file_name);\n $product = new Product(\n request(['product_name',\n 'product_description',\n 'product_price',\n 'sale_price',\n 'product_qty',\n 'gift_id',\n 'subcategory_id',\n 'category_id'\n ]));\n $product->product_img = $file_name;\n $product->supplier_id = $supplier->id;\n $product->save();\n \n \n\n \n if($request->hasFile('imgs')){\n $files=$request->file('imgs');\n \n foreach($files as $file){\n \n $file_name = $file->getClientOriginalName() ;\n $path = 'images/products';\n $file->move($path, $file_name); \n \n $product->images()->create(['name'=>$file_name]); \n\n }\n }\n $admins = Admin::all();\n Notification::send($admins, new ProductAdded($product));\n\n return redirect(route('supplierproducts.index'))->with('success_create','product has been created successfully!');\n }", "title": "" }, { "docid": "cb94425d4db532090692083bb4e17b6b", "score": "0.5947229", "text": "public function post_upload()\n {\n \t$propertyId = Input::get('property_name');\n\n $validation = Property::validate_upload();\n\n if($validation->fails()) {\n return Redirect::route('new_images')\n ->withErrors($validation);\n }\n\n else {\n\n $files = Input::file('file');\n $serializedFile = array();\n\n foreach ($files as $file) {\n // Validate files from input file\n $validation = Image::validateImage(array('file'=> $file));\n\n if (!$validation->fails() && $file->isValid()) {\n $fileName = $file->getClientOriginalName();\n $extension = $file->getClientOriginalExtension();\n $folderName = $propertyId;\n $destinationPath = 'uploads/' . $folderName;\n\n // Move file to generated folder\n $file->move($destinationPath, $fileName);\n\n Image::create(array(\n \t\t'image_propertyId' => $propertyId,\n \t\t'image_name' => $fileName,\n \t\t \t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s')\n \t\t));\n\n } else {\n return Redirect::route('new_images')\n ->with('status', 'alert-danger')\n ->with('image-message', 'There was a problem uploading your image(s)!');\n }\n\n $serializedFile[] = $folderName;\n }\n\n return Redirect::route('new_images')\n ->with('status', 'alert-success')\n ->with('files', $serializedFile)\n ->with('image-message', 'Your image(s) were successfully uploaded');\n }\n }", "title": "" }, { "docid": "a362a4e092f9d8513857f91289227647", "score": "0.5943414", "text": "public function actionCreate()\n {\n $id = $_GET['id']; //получение id продукта, отправленного с бэкенд/продакт/индекс\n $images = Img::find()->where(['product_id' => $id])->all(); // выбор всех фото по продукту \n $model = new Img();\n $foto = time(); // вводим переменную, которую закодирует мд5 при сохранении\n\n //сохранение загружаемого файла\n if ($model->load(Yii::$app->request->post()) ) {\n $model->product_id = $id;\n $model->file = UploadedFile::getInstance($model, 'file');\n if($model->file){\n $model->file->saveAs(Yii::getAlias('@frontend/web/images/') . md5($foto) . '.' . $model->file->extension);\n $model->image = '/frontend/web/images/' . md5($foto) . '.' . $model->file->extension;\n }\n $model->save(false); //что-бы повторно не валидировалось, иначе присваивается $model->image = \"i\"\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'images' => $images\n ]);\n }\n }", "title": "" }, { "docid": "84050b1acf72896a1f09c12037f3d05e", "score": "0.59433806", "text": "public function store(Request $request)\n {\n\n $this->authorize('isAdmin');\n\n $createCarDetails = $request->validate([\n 'reg_num' => 'required|string|max:200',\n 'chassis_num' => 'required|string',\n 'model' => 'required|string|max:200',\n 'insurance_image' => 'required|string',\n 'memo_image' => 'required|string',\n ]);\n\n\n //convert into insurance_image \n $name = time().'.' . explode('/', explode(':', substr($request->insurance_image, 0, strpos($request->insurance_image, ';')))[1])[1];\n \\Image::make($request->insurance_image)->save(public_path('car_releted_image/insurance_image/').$name);\n $request->merge(['insurance_image' => $name]);\n $insurance_image = $request->root().'/car_releted_image/insurance_image/'.$name;\n\n //convert into memo_image \n $name = time().'.' . explode('/', explode(':', substr($request->memo_image, 0, strpos($request->memo_image, ';')))[1])[1];\n \\Image::make($request->memo_image)->save(public_path('car_releted_image/memo_image/').$name);\n $request->merge(['memo_image' => $name]);\n $memo_image = $request->root().'/car_releted_image/memo_image/'.$name;\n \n\n $createCarDetails['insurance_image'] = $insurance_image;\n $createCarDetails['memo_image'] = $memo_image;\n\n\n CarDetails::create($createCarDetails);\n\n return $this->showMessage(\"Successfully Created\", \"done\");\n }", "title": "" } ]
5e35cb604cd24d0ba4f723896ee519e0
We require the cookie data and a database connection This should be enough for some time, but we might add callbacks and other things in the future
[ { "docid": "a7118013ea36e71143daa666f427180c", "score": "0.0", "text": "public function __construct(\n AphrontDatabaseConnection $connection,\n array $cookie_data) {\n\n $this->connection = $connection;\n\n $cookie_prefix = InfoarenaEnvironment::getEnvConfig(\"cookie.prefix\");\n\n $this->sessionKey = idx(\n $cookie_data,\n $cookie_prefix . \"skey\");\n\n $this->model = new SessionModel($connection);\n }", "title": "" } ]
[ { "docid": "be0ad7b73f03c76689450da452b5f61c", "score": "0.64180386", "text": "public function __construct()\n\t{\n\t\t$this->db = new PDO('sqlite:base.db');\n\t\t$this->uri = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_DEFAULT);\n\t\t$this->ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);\n\t\t$cookie = filter_input(INPUT_COOKIE, md5($this->uri), FILTER_DEFAULT);\n\t\t$this->user_agent = filter_input(INPUT_SERVER, 'HTTP_USER_AGENT');\n\n\t\tif( ! $cookie):\n\t\t\t//echo 'Ainda não tem Cookie';\n\t\t\t$this->_set_cookie();\n\t\t\t$this->_set_data();\n\t\tendif;\t\t\t\n\n\t}", "title": "" }, { "docid": "62a9c77ac06ca4c636545b3b217acc37", "score": "0.6331584", "text": "public abstract function cookiesNeeded();", "title": "" }, { "docid": "f691f0b29bc2a011891f222a731eea07", "score": "0.6048399", "text": "public function connectFromCookie($db){\n\n if(isset($_COOKIE['remember']) && !$this->user()){\n \n $remember_token = $_COOKIE['remember'];\n $parts = explode('==' , $remember_token);\n $user_id = $parts[0];\n $user = $db->query('SELECT * FROM users WHERE id = ?',[$user_id])->fetch();\n if($user){\n $expected = $user_id . '==' . $user->remember_token . sha1($user_id . 'harlem');\n if($expected == $remember_token){\n $this->connect($user);\n setcookie('remember',$remember_token, time() + 60*60*24*7);\n }else{\n setcookie('remember',null, -1);\n }\n\n }else{\n \n }\n }\n }", "title": "" }, { "docid": "c05cd5f1c1f0816640a710b7fb6e983b", "score": "0.6031273", "text": "abstract protected function fetchCookie();", "title": "" }, { "docid": "1eab7b98a3a36f0b4aa4f5636f8ab136", "score": "0.60079634", "text": "function getCookies() {\r\n\r\n\t\t// ....\r\n\r\n\t}", "title": "" }, { "docid": "30c8522684c8d41a112ad36014fca78f", "score": "0.5883196", "text": "function __setupCookie(){\n App::import('Component', 'Cookie');\n $this->Cookie = new CookieComponent();\n $this->Cookie->initialize(new Object()/* ignored */, array(\n 'time' => '1 Month'\n )); //init so we can write to the cookie\n $this->Cookie->startup(); //setup so we can read from the cookie\n }", "title": "" }, { "docid": "52b26940f094ede5c0cf75374b9ef68d", "score": "0.5875482", "text": "function reconnect_from_cookie(){\n //If we do not have a session we create a\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n //Verify the presence of the remember cookie that memorizes the connection\n if(isset($_COOKIE['remember']) && !isset($_SESSION['auth'])){\n require_once 'db.php';\n\n if(!isset($pdo)){\n global $pdo;\n }\n\n $remember_token = $_COOKIE['remember'];\n\n //Retrieve the id of the user\n $parts = explode('==', $remember_token);\n $user_id = $parts[0];\n\n //Retrieve the user corresponding to the id of the user\n $req = $pdo->prepare('SELECT * FROM users WHERE id = ?');\n $req->execute([$user_id]);\n $user = $req->fetch();\n\n //If the query returns a result, the user is automatically logged in\n if($user){\n $expected = $user_id . '==' . $user->remember_token . sha1($user_id . 'phone');\n if($expected == $remember_token){\n $_SESSION['auth'] = $user;\n setcookie('remember', $remember_token, time() + 60 * 60 * 24 * 7);\n unset($_SESSION['flash']);\n }\n else{\n setcookie('remember', null, -1);\n }\n }\n else{\n setcookie('remember', null, -1);\n }\n }\n }", "title": "" }, { "docid": "6b0a5b6ba0f5c4ae8ca3db487c1161d1", "score": "0.58441365", "text": "function init (){ \n global $mysql_host, $user;\n \n if (isset($_COOKIE['nocreports_uname']))\n $user->name = $_COOKIE['nocreports_uname'];\n else\n $user->name = \"jdoe\";\n\n $mysql_link_r = database_open($mysql_host, \"r\");\n $user->getUserSettings($user->name, $mysql_link_r); /* Get user settings */\n\n return($mysql_link_r);\n}", "title": "" }, { "docid": "8364765ccc4467a56dfe4288866912ed", "score": "0.5836088", "text": "function __configureAuthCookie(){\r\n\t \r\n\t}", "title": "" }, { "docid": "47c1d8221cc0dfe2b00c6c4bc53dd408", "score": "0.581891", "text": "public static function loadDBCreds()\n\t{\n\t\tif(!isset($_SESSION['dinkly']['db_creds']))\n\t\t{\n\t\t\t$config = Dinkly::getConfig();\n\t\t\t$db_creds = $config['databases'];\n\t\t\t$_SESSION['dinkly']['db_creds'] = $db_creds;\n\t\t\t$first_connection = key($db_creds);\n\t\t\tstatic::setActiveConnection($first_connection);\n\t\t}\n\t}", "title": "" }, { "docid": "900eb46466cfc5200afb4d9ac9255fc1", "score": "0.5782188", "text": "function get_cookie(){\n\t\t\tglobal $gv_login_cookie_name;\n\t\t\tif(isset($_COOKIE[$gv_login_cookie_name])){\n\t\t\t\t$this->cookie = $_COOKIE[$gv_login_cookie_name];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b0088e70a580a237d35605f8d1942982", "score": "0.57809126", "text": "function __configureAuthCookie(){\n\t \n\t}", "title": "" }, { "docid": "d7a2aa58f13bfcebace8c1717afacc26", "score": "0.57431936", "text": "function logincookie($id, $password, $secret, $updatedb = 1, $expires = 0x7fffffff)\n{\n // Retrieving Cookie Information\n $hash = $id . $secret . $password . getip() . $secret;\n // Cookie Information Encryption\n $hash = password_hash($hash, PASSWORD_BCRYPT);\n // Use the encryption below if you are in PHP 7.2 or higher,\n // Comment The Line Above, Uncomment The Line Below\n // $hash = password_hash ($hash, PASSWORD_ARGON2I);\n // Declaration And Sending Cookie\n setcookie(\"pass\", $hash, $expires, \"/\");\n setcookie(\"uid\", $id, $expires, \"/\");\n\n if ($updatedb) {\n $stmt = DB::run(\"UPDATE users SET last_login=? WHERE id=?\", [get_date_time(), $id]);\n }\n\n}", "title": "" }, { "docid": "e350d9743cb7d3be91a325f6668a0513", "score": "0.5731787", "text": "function db_connector() {\n\t\t$attributes = array(\n\t\t\t\\PDO::ATTR_PERSISTENT => true,\n\t\t\t\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\t$this->db = new \\PDO( 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $attributes );\n\t}", "title": "" }, { "docid": "0c8b6e5265e1d8522c42b88d385acc36", "score": "0.5718069", "text": "function login() {\n\n $dbc = connect_to_db(\"workoutapp\");\n if(isset($_COOKIE[\"key\"]) && !empty($_COOKIE[\"key\"])) {\n $key = $_COOKIE[\"key\"];\n $sql = \"select * from cached_logins where id=\\\"$key\\\"\"; //Check and see if cookie exists\n $result = perform_query($dbc, $sql);\n if(mysqli_num_rows($result) > 0) { //Cookie is already set\n disconnect_from_db($dbc,$result);\n header(\"Location: index.php\");\n }\n else {\n disconnect_from_db($dbc,$result);\n $_SESSION[\"ERR\"] = \"Hashed cookie id not found\";\n header(\"Location: login.php\");\n }\n }\n else { //Checks username and password\n if(isset($_POST[\"username\"])) {\n $username = $_POST[\"username\"];\n $password = sha1($_POST[\"password\"]);\n $sql = \"select * from users where user_name=\\\"$username\\\" and password=\\\"$password\\\";\";\n $result = perform_query($dbc, $sql);\n if(mysqli_num_rows($result) > 0) {\n $_SESSION[\"user\"] = $username;\n set_cookie($dbc);\n }\n else {\n $_SESSION[\"ERR\"] = \"Username/pw not found\";\n header(\"Location: login.php\");\n }\n }\n else {\n $_SESSION[\"ERR\"] = \"Username not set\";\n header(\"Location: login.php\");\n }\n }\n}", "title": "" }, { "docid": "bb2f6fa5b88c92181d09772e5c14ad23", "score": "0.57072073", "text": "public function enableCookies () {}", "title": "" }, { "docid": "822bcdbad4f1745a7b3b5e6e78c32be5", "score": "0.56919765", "text": "protected function _selectdb() {\n // Not a high priority; most people will only deploy with 1\n // Will probably not be included until I'm almost ready to call it \"finished\"\n\t}", "title": "" }, { "docid": "0b1211cb4e1ff2d1d27f8ce793a8d1d8", "score": "0.5690683", "text": "public static function initialiseDB(){}", "title": "" }, { "docid": "e889500e5168d07693465ee97f6f9b31", "score": "0.5683549", "text": "function pdo_connect($server = null, $username = null, $password = null, $database = null)\n{\n global $CDASH_DB_PORT, $CDASH_DB_TYPE, $CDASH_MAX_QUERY_RETRIES,\n $CDASH_USE_PERSISTENT_MYSQL_CONNECTION, $CDASH_DB_NAME,\n $CDASH_SSL_KEY, $CDASH_SSL_CERT, $CDASH_SSL_CA, $CDASH_DB_CONNECTION_TYPE;\n $db_name = is_null($database) ? $CDASH_DB_NAME : $database;\n return new CDash\\Database(\n $CDASH_DB_TYPE, $server, $username, $password, $CDASH_DB_PORT,\n $db_name, $CDASH_USE_PERSISTENT_MYSQL_CONNECTION,\n $CDASH_MAX_QUERY_RETRIES, $CDASH_SSL_KEY, $CDASH_SSL_CERT,\n $CDASH_SSL_CA, $CDASH_DB_CONNECTION_TYPE\n );\n}", "title": "" }, { "docid": "c81958ce91dec4217c136d9cee4cb0f6", "score": "0.56760424", "text": "function cookie_login($conn)\n {\n if (!isset($_SESSION['user_signed_in']))\n { \n if(isset($_COOKIE[\"email\"]) && isset($_COOKIE[\"pass\"]))\n {\n $email=$_COOKIE[\"email\"];\n $pass=$_COOKIE[\"pass\"];\n $sql= \"select email,type,id from users where email='$email' and password='$pass'\";\n $result = $conn->query($sql);\n if ($result->num_rows > 0) \n {\n $row = $result->fetch_assoc();\n $_SESSION['user_signed_in']=$email;\n $_SESSION['user_id']=$row['id']; \n $_SESSION['type']=$row['type']; \n }\n }\n }\n }", "title": "" }, { "docid": "31868bfd412b8930a8129080428c47a2", "score": "0.5670427", "text": "function getCookies();", "title": "" }, { "docid": "129dc7c03f3321ca286e1a121d620af0", "score": "0.5648787", "text": "public function __construct()\r\n {\r\n $dotenv = new Dotenv\\Dotenv(__DIR__);\r\n $dotenv->load();\r\n \r\n $servername = getenv('SERVERNAME');\r\n $username = getenv('DBUSER'); \r\n $password = getenv('PASSWORD'); \r\n $dbname = getenv('DBNAME');\r\n\r\n if (session_status() == PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n\r\n $_SESSION[\"token\"] = md5(uniqid(mt_rand(), true));\r\n\r\n try {\r\n $this->db = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\r\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n } catch(PDOException $e) {\r\n // TODO\r\n }\r\n }", "title": "" }, { "docid": "942c19f9a497ae2790c5727ae7496c44", "score": "0.5647659", "text": "function User(&$db) {\r\n $this->db = $db;\r\n# START:plain_cookie_check\r\n if ( isset($_COOKIE[$this->cookieName]) ) {\r\n\t $username = $_COOKIE[$this->cookieName];\r\n\t $sql = \"SELECT * FROM Person WHERE \" .\r\n \t \"(Username = '\" . addslashes($username) . \"') \";\r\n\t $rs = $this->db->executeQuery($sql);\r\n\t if ( $rs->next() ) {\r\n# END:plain_cookie_check\r\n\t $this->username = $rs->getCurrentValueByName(\"Username\");\r\n\t }\r\n }\r\n }", "title": "" }, { "docid": "7d412f5a97df453843b1557e723f28a3", "score": "0.56454486", "text": "private function _db() {\n\n \\R::setup(\n 'mysql:host=' . $this->_getConfig('dbHost') . ';dbname=' .\n $this->_getConfig('dbName'),\n $this->_getConfig('dbUser'),\n $this->_getConfig('dbPassword')\n );\n\n }", "title": "" }, { "docid": "1a7906d82d74372ec1598ae506e5c3df", "score": "0.5620328", "text": "protected function initDB(){\r\n //setea en la session la database\r\n if(! isset($_SESSION['databaseURL'])){\r\n// include(\"../conf/conf.php\");\r\n $dbConf = new Configuracion();\r\n $databaseURL = $dbConf->get_databaseURL();\r\n $databaseUName = $dbConf->get_databaseUName();\r\n $databasePWord = $dbConf->get_databasePWord();\r\n $databaseName = $dbConf->get_databaseName();\r\n\r\n //Set DB Info. in-session\r\n $_SESSION['databaseURL']=$databaseURL;\r\n $_SESSION['databaseUName']=$databaseUName;\r\n $_SESSION['databasePWord']=$databasePWord;\r\n $_SESSION['databaseName']=$databaseName;\r\n\r\n //si lo dejamos asi SE CONECTA DOS VECES\r\n //la primera vez :P\r\n\r\n// $connection = mysql_connect($databaseURL,$databaseUName,$databasePWord)\r\n// or die (\"Error while connecting to localhost\");\r\n// $db = mysql_select_db($databaseName,$connection)\r\n// or die (\"Error while connecting to database\");\r\n//\r\n// mysql_close($connection);\r\n }\r\n $databaseURL = $_SESSION['databaseURL'];\r\n $databaseUName = $_SESSION['databaseUName'];\r\n $databasePWord = $_SESSION['databasePWord'];\r\n $databaseName = $_SESSION['databaseName'];\r\n\r\n $connection = mysql_connect($databaseURL,$databaseUName,$databasePWord)\r\n or die (\"Error while connecting to host\");\r\n mysql_query('SET NAMES utf8');\r\n $db = mysql_select_db($databaseName,$connection)\r\n or die (\"Error while connecting to database\");\r\n return $connection;\r\n }", "title": "" }, { "docid": "cb32ef6d9cc4df954aa4bee732ee11e3", "score": "0.5614305", "text": "protected function configCookies()\n {\n if (isset($_POST[\"remember_me\"])){\n $email = $_POST[\"email\"];\n $password = $_POST[\"password\"];\n if (!empty($email) && !empty($password)) {\n $chiper = new ChiperService();\n $chiper->setCredentialsCookie($email, $password);\n }\n }\n }", "title": "" }, { "docid": "4d0bcfcaacd7d79711a758a03900b7de", "score": "0.56110114", "text": "public function getCookies () {}", "title": "" }, { "docid": "68e402057f0d01af7de6638348aa09a6", "score": "0.5611", "text": "public function __construct()\n {\n $this->database = new Database();\n $this->basic = new Basic();\n\n if (!isset($_SESSION)) {\n session_set_cookie_params(6000000, '/', null, false, true);\n session_start();\n }\n }", "title": "" }, { "docid": "2b3dc6374d6bad70e15946b836200064", "score": "0.560853", "text": "public function checkCookies()\n\t{\n\t\tif(config('crudkit.theme_selector', false))\n\t\t{\n\t\t\t//Skiiiin\n\t\t\t$skin = request()->cookie('crudkit-skin', '');\n\t\t\t$accent = request()->cookie('crudkit-accent', '');\n\t\t\tif(!CHelper::e($skin))\n\t\t\t{\n\t\t\t\tconfig(['crudkit.skin' => $skin]);\n\t\t\t}\n\t\t\tif(!CHelper::e($accent))\n\t\t\t{\n\t\t\t\tconfig(['crudkit.accent' => $accent]);\n\t\t\t} \n\t\t}\n\t}", "title": "" }, { "docid": "bc2dc4496dbc981766274348bee78f5f", "score": "0.5607825", "text": "function _initCookieParams() \n {\n $cookie = session_get_cookie_params();\n if ($this->_force_ssl) {\n $cookie['secure'] = true;\n }\n session_set_cookie_params( $cookie['lifetime'], $cookie['path'], $cookie['domain'], $cookie['secure'] );\n }", "title": "" }, { "docid": "123ae92a026629185c2e3f693e0b6b6e", "score": "0.55997694", "text": "function addCookieInfo( $newCookie )\r\n{\r\n global $db, $cfg;\r\n // Get uid of user\r\n $sql = \"SELECT uid FROM tf_users WHERE user_id = '\" . $cfg[\"user\"] . \"'\";\r\n $uid = $db->GetOne( $sql );\r\n $sql = \"INSERT INTO tf_cookies ( cid, uid, host, data ) VALUES ( '', '\" . $uid . \"', '\" . $newCookie[\"host\"] . \"', '\" . $newCookie[\"data\"] . \"' )\";\r\n $db->Execute( $sql );\r\n showError( $db, $sql );\r\n}", "title": "" }, { "docid": "d7084ddc35e7a4de8607660bb8eb89f5", "score": "0.5594664", "text": "function dbInit()\n {\n if( $this->IsConnected == false )\n {\n $this->Database = new eZDB( \"site.ini\", \"site\" );\n $this->IsConnected = true;\n }\n }", "title": "" }, { "docid": "fb94178298b26384f69cfc970bee8868", "score": "0.55860335", "text": "public function getCookies() {}", "title": "" }, { "docid": "cb716f93214a7fb1e217dba0727773e6", "score": "0.55770487", "text": "public static function init() {\n\t\t\n\t\t// set-up a database session handler\n\t\t$databaseSession = new SessionHandlers\\DatabaseHandler();\n\t\t\n\t\t// add db data\n\t\t$databaseSession->setDbDetails();\n\t\t$databaseSession->setDbTable('session_handler_table');\n\t\tsession_set_save_handler(array($databaseSession, 'open'),\n\t\t array($databaseSession, 'close'),\n\t\t array($databaseSession, 'read'),\n\t\t array($databaseSession, 'write'),\n\t\t array($databaseSession, 'destroy'),\n\t\t array($databaseSession, 'gc'));\n\t\t\n\t\t// the following prevents unexpected effects when using objects as save handlers.\n\t\tregister_shutdown_function('session_write_close');\n\t\t\n\t\t// figure out the environment\n\t\t$hostname = Config::getOption(\"hostname\");\n\t\t$secure = Config::getOption(\"enableHTTPS\");\n\t\t$httponly = Config::getOption(\"enableHTTPS\");\n\t\t\n\t\tsession_set_cookie_params(0,\"/\",$hostname,$secure,$httponly);\n\t\tsession_start();\n\t\t\n\t}", "title": "" }, { "docid": "28925bf520dfde3e2260c4cb703e1e3e", "score": "0.5574738", "text": "public function loginWithCookieData()\n {\n if (isset($_COOKIE['rememberme'])) {\n // extract data from the cookie\n list ($user_id, $token, $hash) = explode(':', $_COOKIE['rememberme']);\n // check cookie hash validity\n if ($hash == hash('sha256', $user_id . ':' . $token . COOKIE_SECRET_KEY) && !empty($token)) {\n // cookie looks good, try to select corresponding user\n // if ($this->databaseConnection()) {\n // get real token from database (and all other data)\n $this->query(\"SELECT user_id, user_name, user_email, user_type, first_name, last_name FROM users WHERE user_id = :user_id\n AND user_rememberme_token = :user_rememberme_token AND user_rememberme_token IS NOT NULL\");\n $this->bind(':user_id', $user_id, PDO::PARAM_INT);\n $this->bind(':user_rememberme_token', $token, PDO::PARAM_STR);\n \n // get result row (as an object)\n // $result_row = $sth->fetchObject();\n $result_row = $this->fetchObj();\n if (isset($result_row->user_id)) {\n // write user data into PHP SESSION [a file on your server]\n $_SESSION['user_id'] = $result_row->user_id;\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_logged_in'] = 1;\n \n //adding new session variable - michael harootoonyan\n $_SESSION['user_type'] = $result_row->user_type;\n $_SESSION['first_name'] = $result_row->first_name;\n $_SESSION['last_name'] = $result_row->last_name;\n // declare user id, set the login status to true\n $this->user_id = $result_row->user_id;\n $this->user_name = $result_row->user_name;\n $this->user_email = $result_row->user_email;\n $this->user_is_logged_in = true;\n //adding declaration for user type -michael harootoonyan\n $this->user_type = $result_row->user_type;\n $this->first_name = $result_row->first_name;\n $this->last_name = $result_row->last_name;\n // Cookie token usable only once\n $this->newRememberMeCookie();\n return true;\n }\n // }\n }\n // A cookie has been used but is not valid... we delete it\n $this->deleteRememberMeCookie();\n $this->errors[] = MESSAGE_COOKIE_INVALID;\n }\n return false;\n }", "title": "" }, { "docid": "04542d609bd144bc557448470a5ece1a", "score": "0.5563234", "text": "public function __construct() {\n $this->req = $this->connector = null;\n try {\n $this->connector = new PDO(DB_DATA[\"database\"], DB_DATA[\"login\"], DB_DATA[\"password\"], DB_DATA[\"option\"]);\n echo '<script>console.log(\"Database created !\");</script>';\n } catch (Exeption $e) {\n echo '<script>console.log(\"'.$e.'\");</script>';\n }\n }", "title": "" }, { "docid": "9c0bd1cc4666bae70c333a0d8dacda5b", "score": "0.55594474", "text": "private function getCookie() {\n $cookie = \\Yii::$app->request->cookies->get($this->cookie_name);\n if ($cookie) {\n $this->cookie_value = $cookie->value;\n } else {\n $this->setCookie();\n }\n }", "title": "" }, { "docid": "142514b6a4db0df2380dd0cc234b65d2", "score": "0.5548273", "text": "function extendLoginTimeOut()\n\t{\n\t\t// setcookie(\"password\",$_COOKIE['password'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"imageLoginName\",$_COOKIE['imageLoginName'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"type\",$_COOKIE['type'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"user\", $_COOKIE['user'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"userName\", $_COOKIE['userName'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"id\", $_COOKIE['id'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"authType\", $_COOKIE['authType'],time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '', false, true);\n\t\t// setcookie(\"userName\", $_COOKIE['userName'].\" \".$entityInfo->{lastName},time()+ VMCPortalConstants::$COOKIE_TIMEOUT,'/', '',false, true);\n\t}", "title": "" }, { "docid": "db418e34ef3cb5f94828785b7dca02a1", "score": "0.5546322", "text": "public function sendCookies() {}", "title": "" }, { "docid": "5dd09403d45025cb4e57c57e8fcaf091", "score": "0.5529842", "text": "function dbOpen() {\n $url=parse_url(getenv(\"CLEARDB_DATABASE_URL\"));\n\n mysql_pconnect(\n $server = $url[\"host\"],\n $username = $url[\"user\"],\n $password = $url[\"pass\"]);\n $db=substr($url[\"path\"],1);\n\n mysql_select_db($db);\n}", "title": "" }, { "docid": "83ace26ba1412f8ff136934a65e5d381", "score": "0.55297005", "text": "public function loadCredentials($cookie)\r\n {\r\n $this->Username=$cookie['user'];\r\n $this->Password=$cookie['password'];\r\n }", "title": "" }, { "docid": "bc13c17ba9b6f406e261c5c1e36c1c33", "score": "0.5527848", "text": "private function getCookieCredentials() {\n\n //load from trait\n $config = $this->loadConfig($this->httpRequest->getSiteParams()->getConfigPath() . 'config.yml');\n\n $this->config = $config['cookies'];\n }", "title": "" }, { "docid": "6b6f4a95d451718e7652320562ca0201", "score": "0.5527087", "text": "public function TestCookies(){\r\n\t\tif(isset($_COOKIE['id_usuario']) && isset($_COOKIE['contrasena'])){\r\n\t\t\tif(!authenticate($_COOKIE['id_usuario'],$_COOKIE['contrasena'])){\r\n\t\t\t\t$this->killCookies();\r\n\t\t\t}\r\n\t\t\t$this->creaSession($record);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "842a9228c161058b797f1c0cb3a3105b", "score": "0.5521991", "text": "static function init() {\n\t\tif (self::$db == null) {\n\t\t\tinclude_once('mainfile.php');\n\t\t\trequire_once('modules/formulize/include/functions.php');\n\n\t\t\tself::$db = $GLOBALS['xoopsDB'];\n\t\t\tself::$db->allowWebChanges = true;\n\t\t}\n\t}", "title": "" }, { "docid": "1b7427dfa62f36b73448cabc20f9d4ba", "score": "0.5520734", "text": "function __construct($database, $error_handler, $cookies_handler, $user_data_handler) {\n $this->session = $_SESSION;\n $this->error_handling_class = $error_handler;\n $this->database_class = $database;\n $this->cookies_handling_class = $cookies_handler;\n $this->user_data_handler = $user_data_handler;\n }", "title": "" }, { "docid": "2c3d397431bcb49944e37b2574435806", "score": "0.5520002", "text": "function get_db_read()\n\t{\n\t\tglobal $db_persistent; \n\t\tglobal $db_host; \n\t\tglobal $db_read_user; \n\t\tglobal $db_read_pass; \n\t\tglobal $db_name; \n\n\t\tstatic $db = null;\n\n\t\tif($db == null)\n\t\t{\n\t\t\t# Make a connection to the database\n\t\t\tif($db_persistent == 1)\n\t\t\t\t$db = mysql_pconnect($db_host, $db_read_user, $db_read_pass);\n\t\t\telse\n\t\t\t\t$db = mysql_connect($db_host, $db_read_user, $db_read_pass);\n\t \n\t\t\t# Make sure we have a database\n\t\t\tif(!$db)\n\t\t\t\tshow_mysql_error('Connecting to database', mysql_error());\n\t\n\t\t\t# Select the database\n\t\t\tmysql_select_db($db_name) or show_mysql_error('Selecting database', mysql_error());\n\t\t}\n\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "a04c13b2e35674f13b849d95458b9fff", "score": "0.549576", "text": "private function newRememberMeCookie()\n\n {\n\n\t\t\n\n // if database connection opened\n\n if ($this->databaseConnection()) {\n\n\t\n\n\t\t\t$role = $_SESSION['user_role'];\n\n\t\t\t\n\n\t\t\t\n\n\t\t\tswitch($role){\n\n\t\t\t\tcase 'admin':\n\n\t\t\t\t$table = 'admin';\n\n\t\t\t\t$id_field = 'user_id';\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase 'teacher':\n\n\t\t\t\tcase 'staff':\n\n\t\t\t\t$table = 'staff';\n\n\t\t\t\t$id_field = 'id';\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase 'student':\n\n\t\t\t\t$table = 'students';\n\n\t\t\t\t$id_field = 'id';\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase 'parents':\n\n\t\t\t\t$table = 'parents';\n\n\t\t\t\t$id_field = 'id';\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\ttry{\n\n // generate 64 char random string and store it in current user data\n\n\t\t\t//l\n\n\t\t\t\n\n\t\t\t $time = time();\n\n $random_token_string = hash('sha256', mt_rand());\n\n\t\t\t $sql = \"UPDATE $table SET last_login = $time, user_rememberme_token = :user_rememberme_token WHERE $id_field = :id\";\n\n\t\t\t $sth = $this->db_connection->prepare($sql);\n\n $sth->bindValue('user_rememberme_token',$random_token_string,PDO::PARAM_STR);\n\n\t\t\t $sth->bindValue('id',$_SESSION['user_id'],PDO::PARAM_INT);\n\n $sth->execute();\n\n\t\t\t\n\n\t\t\t}catch(PDOException $e){\n\n\t\t\t\t//die($e->getMessage());\n\n\t\t\t\t}\n\n // generate cookie string that consists of userid, randomstring and combined hash of both\n\n\t\t\t\n\n $cookie_string_first_part = $_SESSION['user_id'] . ':' . $random_token_string;\n\n $cookie_string_hash = hash('sha256', $cookie_string_first_part . COOKIE_SECRET_KEY);\n\n $cookie_string = $cookie_string_first_part . ':' . $cookie_string_hash.':'.$role;\n\n\t\t\t\n\n\t\t\t$time = time() + COOKIE_RUNTIME;\n\n // set cookie\n\n setcookie('rememberme', $cookie_string,$time,'/');\n\n\t\t\tsetcookie('rememberme_role', $_SESSION['user_role'], $time,'/');\n\n\t\t\t\n\n }\n\n }", "title": "" }, { "docid": "ff4988aab5b15042f43618cd69456416", "score": "0.549259", "text": "function DBManager() {\r\n\t\t$this->dbCon = $this->login();\r\n\t}", "title": "" }, { "docid": "4e5ba4b861e84281bc71fa275658928b", "score": "0.54860675", "text": "function OrionDB_Check_cookie(){\n // returns false when a session name has not been set\n global $ORIONDBCFG_session_name;\n \n if($ORIONDBCFG_session_name){\n if(array_key_exists('HTTP_COOKIE',$_SERVER)){\n // check whether the session name \n $sessions = explode('; ',$_SERVER['HTTP_COOKIE']);\n $OrionDBSession_found = false;\n foreach($sessions as $key => $value){\n $sesname = substr($value,0,strlen($ORIONDBCFG_session_name));\n //logmessage(\"checking session name in cookie: \" . $sesname . \" to configured: \" . $ORIONDBCFG_session_name);\n if($sesname == $ORIONDBCFG_session_name){\n $OrionDBSession_found = true; \n }\n }\n if($OrionDBSession_found){\n return true;\n }\n else {\n return false;\n }\n } \n else {\n return false; // no cookie found\n } \n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "af27c23ef5a5acf2bb98e3ff56b59e4c", "score": "0.5468285", "text": "public function loginWithCookieData()\n\n {\n\n\t\tglobal $database;\n\n\t\t//define('COOKIE_SECRET_KEY',);\n\n if (isset($_COOKIE['rememberme'])) {\n\n\t\t\t\n // extract data from the cookie\n\n list ($user_id, $token, $hash,$role) = explode(':', $_COOKIE['rememberme']);\n\n\t\t\t\n\n\t\n\t\t\t\t\n\t\t\t\tif(!empty($user_id)&& !empty($token) && !empty($hash) && !empty($role)){\n\n\t\t\t\t $sql = \"SELECT id FROM staff WHERE id = :user_id\n\n AND user_rememberme_token = :user_rememberme_token AND user_rememberme_token IS NOT NULL\";\n\n\t\t\t\t$sth = $database->prepare($sql);\n\n $sth->bindValue(':user_id', $user_id, PDO::PARAM_INT);\n\n $sth->bindValue(':user_rememberme_token', $token, PDO::PARAM_STR);\n\n $sth->execute();\n\n\t\t\t\t\t\n\n\t\t\t\tif($sth->rowCount() > 0){\n\n // get result row (as an object)\n\n $result_row = $sth->fetchObject();\n\n\t\t\t\n\n\t\t\t\t\tsession_regenerate_id();\n\n // write user data into PHP SESSION [a file on your server]\n\n $_SESSION['user_id'] = $user_id;\n\n\t\t\t\t$_SESSION['user_role'] = $role;\n\n $_SESSION['user_logged_in'] = 1;\n\n\t\t\t\t$_SESSION['userAgent'] = $this->hashSessionData($_SERVER['HTTP_USER_AGENT']);\n\n\t\t\t\t$_SESSION['rmt_address'] = $this->hashSessionData($_SERVER['REMOTE_ADDR']);\n\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t$time = time();\n\n\t\t\t\n\n\t\t\t\t $sql = \"UPDATE staff SET last_login = $time WHERE $id_field= :id \";\n\n $query_user = $database->prepare($sql);\n\n $query_user->bindValue('id', $_SESSION['user_id'], PDO::PARAM_INT);\n\n $query_user->execute(); ;\n\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t return true;}else{\n\n\t\t\t\t\tsetcookie(\"rememberme\", \"\", time() - 3600);\n\n\t\t\t\t\t return false;\n\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tsetcookie(\"rememberme\", \"\", time() - 3600);\n\n\t\t\t\t\t return false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t\n\n }\n\n \n\n }", "title": "" }, { "docid": "ba45ed610380b222b215bd4d0f872fd3", "score": "0.5465814", "text": "public function active_data()\r\n {\r\n // Create an instance of the RackSpace CloudFile store\r\n if(Site::conf('rackspace.enabled'))\r\n {\r\n $this->cloudstore = new Cloudstore(Site::conf('rackspace.username'), Site::conf('rackspace.api_key'));\r\n }\r\n\r\n // Create a connection to Mongo\r\n // Stores complex objects w/o defining schema\r\n if(Site::conf('mongo.enabled'))\r\n {\r\n $this->mongostore = new Mongostore(Site::conf('mongo.hostname'), Site::conf('mongo.port'), Site::conf('mongo.username'), Site::conf('mongo.pwd'));\r\n }\r\n\r\n // Create a connection to FathomDB MySQL\r\n // This is used for ActiveRules internal data\r\n if(Site::conf('mysql.enabled'))\r\n {\r\n $this->mysql = Database::instance(Site::conf('mysql.datasource'));\r\n }\r\n\r\n // Create connection to Xeround MySQL\r\n // This is used for all USER data\r\n if(Site::conf('xeround.enabled'))\r\n {\r\n $this->xeround = Database::instance(Site::conf('xeround.datasource'));\r\n }\r\n }", "title": "" }, { "docid": "b83f5d949867ef17c66eebcd8d1bd593", "score": "0.5465093", "text": "public function init_session_cookie() {\n $cookie = $this->get_session_cookie();\n if ( $cookie ) {\n $this->customer_id = $cookie[0];\n $this->session_expiration = $cookie[1];\n $this->data = (array) $cookie[3];\n } else {\n $this->customer_id = $this->generate_customer_id();\n $this->data = [];\n $this->set_customer_session_cookie( true );\n }\n }", "title": "" }, { "docid": "5f6764d9a05791d2e34a3dd151e3faad", "score": "0.5461306", "text": "public function _DB();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.54592377", "text": "public function getCookies();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.54592377", "text": "public function getCookies();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.54592377", "text": "public function getCookies();", "title": "" }, { "docid": "b097b853c927af79f3f32337e477227d", "score": "0.54563254", "text": "public function __construct() {\n\t\t\n\t\tcheck_env();\n\t\t\n\t\t$this->db = mysql_connect(BABEL_DB_HOSTNAME . ':' . BABEL_DB_PORT, BABEL_DB_USERNAME, BABEL_DB_PASSWORD);\n\t\tmysql_select_db(BABEL_DB_SCHEMATA);\n\t\tmysql_query(\"SET NAMES utf8\");\n\t\tmysql_query(\"SET CHARACTER SET utf8\");\n\t\tmysql_query(\"SET COLLATION_CONNECTION='utf8_general_ci'\");\n\t\tsession_set_cookie_params(2592000);\n\t\tsession_start();\n\t\t$this->User = new User('', '', $this->db);\n\t\tdefine('BABEL_LANG', $this->User->usr_lang);\n\t\t$this->Validator = new Validator($this->db, $this->User);\n\t\tif (!isset($_SESSION['babel_ua'])) {\n\t\t\t$_SESSION['babel_ua'] = LividUtil::parseUserAgent();\n\t\t}\n\t\t$this->URL = new URL();\n\t\tglobal $CACHE_LITE_OPTIONS_SHORT;\n\t\t$this->cs = new Cache_Lite($CACHE_LITE_OPTIONS_SHORT);\n\t\tglobal $CACHE_LITE_OPTIONS_LONG;\n\t\t$this->cl = new Cache_Lite($CACHE_LITE_OPTIONS_LONG);\n\t}", "title": "" }, { "docid": "ff1d2992665ca270ed0d51a7d6ba0b6f", "score": "0.5445219", "text": "private function setupCookie( $data )\n {\n // Initialize the session\n session_start();\n \n $_SESSION['userID'] = $data['Username'];\n $_SESSION['userRole'] = $data['Role'];\n if( $data['userRole'] < 4 )\n {\n $_SESSION['Org_ID'] = $data['Org_ID'];\n }\n\n // Extend cookie life time\n // A month in seconds = 30 days * 24 hours * 60 mins * 60 secs\n $cookieLifetime = 30 * 24 * 60 * 60;\n setcookie(\"Event-Manager-Global\", session_id(), time() + $cookieLifetime);\n\n return True;\n }", "title": "" }, { "docid": "66efd61ef107a7fae31ccfc318f16611", "score": "0.5442737", "text": "function db_init()\n{\n $log = start_system_log('db_init');\n $dbAccess = DBaccess ? DBaccess : [\n 'host' => DBhost,\n 'user' => DBuser,\n 'port' => DBport,\n 'password' => DBport,\n 'database' => DBname\n ];\n if (DBtype === \"psql\")\n $db = new Psqlo($dbAccess['host'], $dbAccess['user'], $dbAccess['port'], $dbAccess['password'], $dbAccess['database']);\n else\n $db = new mysqli($dbAccess['host'], $dbAccess['user'], $dbAccess['password'], $dbAccess['database']);\n\n if ($db->connect_errno) {\n $log->write(\"Data base connection error! \" . $db->connect_error, LOG_ERROR);\n echo \"severe error\";\n die();\n }\n return $db;\n}", "title": "" }, { "docid": "f0cfa722ca370bab2811de21d33fe848", "score": "0.5437381", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->values = new Charcoal_HashMap();\n\n // store client cookies\n if ( $_COOKIE && is_array($_COOKIE) ){\n foreach( $_COOKIE as $key => $value ){\n $this->values[$key] = $value;\n }\n }\n }", "title": "" }, { "docid": "4424e365d673f290ab828b24f4b380e9", "score": "0.54255056", "text": "public static function setCookies(){\n\t\tif(self::$change){\n\t\t\t$app = \\Slim\\Slim::getInstance();\n\t\t\t//Re/create the cookie\n\t\t\tif(!empty(self::$cookies)){\n\t\t\t\t$_SESSION['vanquish'] = self::$cookies;\n\t\t\t\t//Do not use \" $app->setCookie('vanquish', json_encode(self::$cookies)); \" to avoid cookie issue that keeps its status accross non-ssl and ssl sites and different subdomains\n\t\t\t\t$json = self::encodeSecureCookie(json_encode(self::$cookies), $app->bruno->cookies_lifetime);\n\t\t\t\tsetcookie($app->bruno->data['bruno_dev'].'_vanquish', $json, $app->bruno->cookies_lifetime, '/', '.'.$app->bruno->domain);\n\t\t\t} else {\n\t\t\t\tunset($_SESSION['vanquish']);\n\t\t\t\t$app->deleteCookie($app->bruno->data['bruno_dev'].'_vanquish');\n\t\t\t\tsetcookie($app->bruno->data['bruno_dev'].'_vanquish', null, time()-3600, '/', '.'.$app->bruno->domain);\n\t\t\t\tself::$first = true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7aff4744b83fdbba80e99b76d1e55afc", "score": "0.5411532", "text": "public function __construct() {\n\t self::$encryption=new Encryption();\n\t self::$sessionhandler2=new SecureSessionHandler();\n\n\t\tif(!isset($_COOKIE[self::$cookieID])){\n\t\t\t$query=\"INSERT INTO session_users (`user_id`) VALUES ('0')\";\n\n\t\t\t$id=self::execquery_id($query);\n\t\t\tsetcookie (self::$cookieID,$id, time() + self::$cookieExpired);\n\t\t}\n\t}", "title": "" }, { "docid": "bbf0898348bf2f02161fc15144168861", "score": "0.54021716", "text": "function __construct()\r\n { \r\n $f3=Base::instance();\r\n $this->f3=$f3;\r\n \r\n $db=new DB\\SQL(\r\n $f3->get(DB_CONN),\r\n $f3->get(DB_USERNAME),\r\n $f3->get(DB_PASSWORD),\r\n array( \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION )\r\n );\r\n $this->db=$db;\r\n }", "title": "" }, { "docid": "54a4c7b5358075eaa0c99ed5362038eb", "score": "0.5399295", "text": "public function __construct()\r\n {\r\n global $db, $system;\r\n if ($system['s3_enabled']) {\r\n $system['system_uploads'] = $system['system_uploads_url'];\r\n }\r\n if (isset($_COOKIE[$this->_cookie_user_id]) && isset($_COOKIE[$this->_cookie_user_token])) {\r\n\r\n $response_data = cachedUserData($db, $system, $_COOKIE[$this->_cookie_user_id], $_COOKIE[$this->_cookie_user_token]);\r\n //print_r($response_data);\r\n if (!empty($response_data) > 0) {\r\n $this->_data = $response_data;\r\n $this->_logged_in = true;\r\n $this->_is_admin = ($this->_data['user_group'] == 1) ? true : false;\r\n $this->_is_moderator = ($this->_data['user_group'] == 2) ? true : false;\r\n\r\n /* update user language */\r\n if ($system['current_language'] != $this->_data['user_language']) {\r\n $updateQ = sprintf(\"UPDATE users SET user_language = %s WHERE user_id = %s\", secure($system['current_language']), secure($this->_data['user_id'], 'int'));\r\n $db->query($updateQ) or _error(\"SQL_ERROR_THROWEN\");\r\n }\r\n /* update user last seen */\r\n $db->query(sprintf(\"UPDATE users SET user_last_seen = NOW() WHERE user_id = %s\", secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\r\n // $redisObject = new RedisClass();\r\n // $redisPostKey = 'user-' . $this->_data['user_id'];\r\n // $redisObject->deleteValueFromKey($redisPostKey);\r\n // cachedUserData($db, $system, $this->_data['user_id'], $this->_data['active_session_token']);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d4d20bf699cc2f3be61f702b99cfc169", "score": "0.5395668", "text": "static public function initialiseDB();", "title": "" }, { "docid": "1e29ef1c4c5e091c3751c5a203cad322", "score": "0.5393983", "text": "private function db_connect() {\n\t\tglobal $retweetbot_dsn;\n\t\t$this->db = new DB($retweetbot_dsn);\n\t}", "title": "" }, { "docid": "927bc359dd96a4bf4d98f15628665e91", "score": "0.53834635", "text": "public function set_cookie()\n {\n }", "title": "" }, { "docid": "7598e858b1d91377b7c6e23ea368a9a5", "score": "0.53818405", "text": "private function _setupDb()\n\t{\n\t\tsetupImvaOxid2Cr::activate();\n\t}", "title": "" }, { "docid": "1a4dbc2b7bdf49bd6926abc484397adb", "score": "0.5377254", "text": "function conectarDB()\n{\n $cleardb_url = parse_url(getenv(\"CLEARDB_DATABASE_URL\"));\n $cleardb_server = $cleardb_url[\"host\"];\n $cleardb_username = $cleardb_url[\"user\"];\n $cleardb_password = $cleardb_url[\"pass\"];\n $cleardb_db = substr($cleardb_url[\"path\"],1);\n $active_group = 'default';\n $query_builder = TRUE;\n \n $db = new PDO(\"mysql:host={$cleardb_server}; dbname={$cleardb_db}\", $cleardb_username, $cleardb_password);\n \n if (!$db) {\n echo \"Error: No se pudo conectar la base de datos\";\n exit;\n }\n \n return $db;\n}", "title": "" }, { "docid": "7fe68006791617aae7989f0fba220d34", "score": "0.53769255", "text": "function init_db() {\n global $sqlite_database;\n\n $db = sqlite_open($sqlite_database);\n $test_query = \"select count(*) from sqlite_master where name = 'credentials'\";\n if (sqlite_fetch_single(sqlite_query($db, $test_query)) == 0) {\n $create_table = \"create table credentials (userid text, credentials text);\";\n sqlite_exec($db, $create_table);\n }\n return $db;\n}", "title": "" }, { "docid": "48d6de6602fe840760a168b3569eaa4b", "score": "0.53764206", "text": "public function createCookie() {\n $this->pass = $this->loginModel->loginPassword;\n\t\t$hash = password_hash($this->pass, PASSWORD_BCRYPT);\n\n\t\tif (isset($_POST[\"loginKeeper\"])) {\n\n\t\t\tsetcookie('username', $_POST[self::$username], time()+600);\n\t\t\tsetcookie('password', $hash, time()+600);\n\t\t}\n\t}", "title": "" }, { "docid": "cf948b627fee7a2152612d1c0882a817", "score": "0.5374674", "text": "private function initRememberMe()\n {\n /** @var $objResult ADORecordSet */\n $sessionId = !empty($_COOKIE[session_name()]) ? $_COOKIE[session_name()] : null;\n if (isset($_POST['remember_me'])) {\n $this->rememberMe = true;\n if ($this->sessionExists($sessionId)) {//remember me status for new sessions will be stored in cmsSessionRead() (when creating the appropriate db entry)\n \\Env::get('db')->Execute('UPDATE `' . DBPREFIX . 'sessions` SET `remember_me` = 1 WHERE `sessionid` = \"' . contrexx_input2db($sessionId) . '\"');\n }\n } else {\n $objResult = \\Env::get('db')->Execute('SELECT `remember_me` FROM `' . DBPREFIX . 'sessions` WHERE `sessionid` = \"' . contrexx_input2db($sessionId) . '\"');\n if ($objResult && ($objResult->RecordCount() > 0)) {\n if ($objResult->fields['remember_me'] == 1) {\n $this->rememberMe = true;\n }\n }\n }\n }", "title": "" }, { "docid": "ac0b3b498214e96a53136fa452e50d44", "score": "0.53692216", "text": "abstract public function readCookie();", "title": "" }, { "docid": "37ce37f75eb82e008ed4de445b25d724", "score": "0.5367229", "text": "public static function intro()\n {\n global $_G,$_E,$permission,$_config;\n\n $session_setting = session_get_cookie_params();\n session_set_cookie_params($session_setting[\"lifetime\"],$_E['SITEDIR']);\n session_start();\n\n $acctable = DB::tname('account');\n if (self::CheckToken('login')) {\n //load user data\n //$_COOKIE[$_config['cookie']['namepre'].'_uid'] is checked in userControl::checktoken\n $loginuid = self::GetCookie('uid');\n\n if ($sqldata = DB::fetch(\"SELECT * FROM `$acctable` \".\n 'WHERE `uid` = ?', [$loginuid])) {\n $_G = $sqldata;\n } else {\n LOG::msg(Level::Error, 'Caonnot Load login info from DB', $loginuid);\n $_G = $permission['guest'];\n }\n } else {\n // guest\n\n self::DeleteToken('login');\n $_G = $permission['guest'];\n }\n }", "title": "" }, { "docid": "9cdd1652f62c5b2775dd41572f2546f4", "score": "0.5365995", "text": "protected function initdb(){\n\t\tparent::initdb();\n\n\t\t$this->_url = $GLOBALS['url'];\n\t}", "title": "" }, { "docid": "f4314207bd75acce527e33e0869a864c", "score": "0.53647065", "text": "public function __construct()\n {\n $this->db = new DBHandler(COMMENTIA_DB);\n\n if (!isset($_SESSION['__COMMENTIA__']['member_username'])) {\n $_SESSION['__COMMENTIA__']['member_is_logged_in'] = false;\n }\n\n if (!isset($_SESSION['__COMMENTIA__']['login_error_msg'])) {\n $_SESSION['__COMMENTIA__']['login_error_msg'] = '';\n }\n }", "title": "" }, { "docid": "a9749932b62413067e35905c1dcad274", "score": "0.5364023", "text": "function __construct(){\n\t\t\tsession_start();\n\t\t\t$connect = mysql_connect(\"localhost\", \"root\", \"\");\n\t\t\t$db = mysql_select_db(\"dbgy\");\n\t\t}", "title": "" }, { "docid": "62598c666bd09823a06b45ca4fbc8d26", "score": "0.53598166", "text": "private function _setCookie() {\n setcookie(self::$cookiename, $this->_package());\n }", "title": "" }, { "docid": "c9c4aff7831ac839ac6d6a7652657e19", "score": "0.53505063", "text": "public function __construct()\n\t{\n\n\t\tglobal $pref, $db_defaultPrefix;\n\t\te107::getSingleton('e107_traffic')->BumpWho('Create db object', 1);\n\n\t\t$this->mySQLPrefix = MPREFIX;\t\t\t\t// Set the default prefix - may be overridden\n\n\t\t/*$langid = (isset($pref['cookie_name'])) ? 'e107language_'.$pref['cookie_name'] : 'e107language_temp';\n\t\tif (isset($pref['user_tracking']) && ($pref['user_tracking'] == 'session'))\n\t\t{\n\t\t\tif (!isset($_SESSION[$langid])) { return; }\n\t\t\t$this->mySQLlanguage = $_SESSION[$langid];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!isset($_COOKIE[$langid])) { return; }\n\t\t\t$this->mySQLlanguage = $_COOKIE[$langid];\n\t\t}*/\n\t\t// Detect is already done in language handler, use it if not too early\n\t\tif(defined('e_LANGUAGE')) $this->mySQLlanguage = e107::getLanguage()->e_language;\n\t}", "title": "" }, { "docid": "6b676311772ef97284bb5acc6cdf3745", "score": "0.53450394", "text": "function saveParams($data){\n $expire=time()+60*60*24*30;\n setcookie(\"callback_uri\", $data['callback_uri'], $expire,'/');\n setcookie(\"application_uri\", $data['application_uri'], $expire,'/');\n setcookie(\"application_title\", $data['application_title'], $expire,'/');\n setcookie(\"application_type\", $data['application_type'], $expire,'/');\n setcookie(\"application_commercial\", $data['application_commercial'], $expire,'/');\n}", "title": "" }, { "docid": "d40d551d4e91ce635e045ec0b836847d", "score": "0.53403085", "text": "function DbConnect () {\n\n}", "title": "" }, { "docid": "601204bb705f1751a90eb9afc06088a4", "score": "0.5339233", "text": "function checkCookies() {\n\tif (isset($_COOKIE['yshoutPHP']))\n\t\tlogin($_COOKIE['yshoutPHP']);\n}", "title": "" }, { "docid": "7a071e27d0498d12e9fac27cf563cca2", "score": "0.53387934", "text": "private function _load_data(){\n $data = array();\n if($this->backend == 'session') {\n\n $data = $this->CI->session->userdata($this->session_key);\n\n } elseif($this->backend == 'cookies_db') {\n\n if(isset($_COOKIE[$this->cookiesName]) && !empty($_COOKIE[$this->cookiesName])){\n $cart = ManagerHolder::get($this->entityName)->getOneWhere(array('cart_id' => $_COOKIE[$this->cookiesName]));\n if($cart){\n $data = $cart['data'];\n }\n }\n }\n\n if(!is_array($data)){\n $this->_data = unserialize($data);\n } else {\n $this->_data = $data;\n }\n\n }", "title": "" }, { "docid": "935133bc86277fedd4932827d6676385", "score": "0.5334001", "text": "private function DropCookieHack()\n {\n\n }", "title": "" }, { "docid": "7d5b371bebae2325e458d2876e29eac8", "score": "0.5331691", "text": "private function tryLogin(){\n\t\t$db=$_GLOBALS[\"db\"];\n\t}", "title": "" }, { "docid": "41fa0997bfe4306acec2cd3cf58210e1", "score": "0.5331114", "text": "function dbinit()\n {\n \n }", "title": "" }, { "docid": "a562ccc2750993516610d62774b35afd", "score": "0.5331017", "text": "function has_cookies() // Will fail on users first visit, but then will catch on\n{\n global $HAS_COOKIES_CACHE;\n if ($HAS_COOKIES_CACHE !== null) {\n return $HAS_COOKIES_CACHE;\n }\n\n /*if (($GLOBALS['DEV_MODE']) && (get_param_integer('keep_debug_has_cookies', 0) == 0) && (!running_script('commandr'))) We know this works by now, was tested for years. Causes annoyance when developing\n {\n $_COOKIE = array();\n return false;\n }*/\n\n if (isset($_COOKIE['has_cookies'])) {\n $HAS_COOKIES_CACHE = true;\n return true;\n }\n require_code('users_active_actions');\n cms_setcookie('has_cookies', '1');\n $HAS_COOKIES_CACHE = false;\n return false;\n}", "title": "" }, { "docid": "1df2fe71b026a4e4db8ad4cc06858603", "score": "0.5329988", "text": "function __construct() {\n $connection = @mysql_connect(SERVER, USERNAME, PASSWORD) or die('Connection error -> ' . mysql_error());\n mysql_select_db(DATABASE, $connection) or die('Database error -> ' . mysql_error());\n }", "title": "" }, { "docid": "4317c05cf969a1b7aba8874c0dc4fa3d", "score": "0.5325897", "text": "function onLoad()\n\t{\n\t\t$cookie_name = \"_ad_visit_count\";\n\t\t$visits = \"0\";\n\t\t\n\t\tif (!isset($_COOKIE[$cookie_name]))\n\t\t{\n\t\t\t$visits = \"0\";\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$visits = $_COOKIE[$cookie_name];\n\t\t}\n\t\t\n\t\t$visits += 1;\n\t\tsetcookie($cookie_name, $visits, time() + (86400 * 365), \"/\"); // 86400 = 1 day\n\n\t\t/* Use a cookie to create a unique id */\n\t\t$cookie_name = \"_ad_visit_id\";\n\t\t$id = \"0\";\n\t\t\n\t\tif (!isset($_COOKIE[$cookie_name]))\n\t\t{\n\t\t\t$id = uniqid(\"\",true);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$id = $_COOKIE[$cookie_name];\n\t\t}\n\n\t\tsetcookie($cookie_name, $id, time() + (86400 * 365), \"/\"); // 86400 = 1 day\n\n\t\t/* Add an entry log to signal fetched page */\n\t\t//add_to_log(\"Type,Start,\".getHeadersInfo().\"Time,?\");\n\t}", "title": "" }, { "docid": "16fdec6babcc8386c145c5fbc8232c86", "score": "0.531263", "text": "function try_loading_session($db_connection)\n{\n if (isset($_COOKIE[\"session\"]))\n return get_login_session($_COOKIE[\"session\"], $db_connection);\n else return NULL;\n}", "title": "" }, { "docid": "e049f2137537fba3d05bf67f8553d576", "score": "0.5309452", "text": "public function __construct()\n {\n $sql = new SQL();\n $this->db = $sql->set(\"UserAgent\");\n }", "title": "" }, { "docid": "99a1d03d57fabea4df79d10ca54f4be4", "score": "0.53080404", "text": "private static function WEBauthentication(): mixed\n {\n if (isset($_COOKIE['loggedin'])) {\n $email = base64_decode($_COOKIE['loggedin']);\n\n Database::query(\"SELECT * FROM users WHERE email = :email\");\n Database::bind(':email', $email);\n\n if (!is_null(Database::fetch()['id'])) return Database::fetch()['id'];\n }\n return null;\n }", "title": "" }, { "docid": "d21811536c73f86f1c7f17152e73b2d4", "score": "0.53016216", "text": "function external_db()\n{\n $db_type = get_value('external_db_login__db_type', null, true);\n if (is_null($db_type)) {\n return null;\n }\n $db_name = get_value('external_db_login__db_name', null, true);\n $db_host = get_value('external_db_login__db_host', null, true);\n $db_user = get_value('external_db_login__db_user', null, true);\n $db_password = get_value('external_db_login__db_password', null, true);\n\n require_code('database/' . filter_naughty_harsh($db_type));\n $db = new DatabaseConnector($db_name, $db_host, $db_user, $db_password, '', false, object_factory('Database_Static_' . filter_naughty_harsh($db_type)));\n\n return $db;\n}", "title": "" }, { "docid": "b4d3d60347fd7a08b4cba89281c86b01", "score": "0.53007793", "text": "private function _make_database_connection() {\n\t\t$ADODB_CACHE_DIR = ROOT_BACK.CACHE_DIRECTORY;\n\t\n\t\tswitch (strtoupper(DB_DRIVER)) {\n\t\t\tcase 'SQLITE':\n\t\t\t\t$this->database = ADONewConnection('pdo');\n\t\t\t\t$this->database->PConnect(strtolower(DB_DRIVER).':'.ROOT_BACK.DB_NAME);\n\t\t\t\tbreak;\n\t\t\tcase 'MYSQL':\n\t\t\tdefault:\n\t\t\t\t$this->database = ADONewConnection(DB_DRIVER);\n\t\t\t\t$this->database->PConnect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->database->debug = false;\n\t}", "title": "" }, { "docid": "535adf0384b3ee191ec6e339163c6f02", "score": "0.5299345", "text": "function autoLogin(){\n\tif(isset($_COOKIE[\"siteAuth\"]))\n\t{\n\t\tparse_str($_COOKIE[\"siteAuth\"]);\n\t\t\n\t\t// Make a verification\n\t\n\t\tif($user_id!=\"\" && $user_email!=\"\")\n\t\t{\n\t\t\t// Register the session\n\t\t\t$_SESSION['user_id'] = $user_id;\n\t\t\t$_SESSION['user_email'] = $user_email;\n\t\t\t$_SESSION['username'] = $username;\n\t\t\t$_SESSION['sex'] = $sex;\t\n\t\t\t$this->query(\"Update #__customers Set last_connection=NOW(), ip='\".$_SERVER['REMOTE_ADDR'].\"' Where id=\".$user_id);\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "719b27f6b93cf0ba70616f707ad4e671", "score": "0.5297865", "text": "function zc_db_init()\n{\n\tglobal $zc, $zcFunc;\n\t\n\tif (!isset($zcFunc['db_fetch_assoc']) || $zcFunc['db_fetch_assoc'] != 'mysql_fetch_assoc')\n\t\t$zcFunc += array(\n\t\t\t'db_query' => 'zc_db_query',\n\t\t\t'db_insert' => 'zc_db_insert',\n\t\t\t'db_update' => 'zc_db_update',\n\t\t\t'db_fetch_assoc' => 'mysql_fetch_assoc',\n\t\t\t'db_fetch_row' => 'mysql_fetch_row',\n\t\t\t'db_free_result' => 'mysql_free_result',\n\t\t\t'db_insert_id' => 'mysql_insert_id',\n\t\t\t'db_num_rows' => 'mysql_num_rows',\n\t\t\t'db_num_fields' => 'mysql_num_fields',\n\t\t\t'db_escape_string' => 'addslashes',\n\t\t\t'db_unescape_string' => 'stripslashes',\n\t\t\t'db_server_info' => 'mysql_get_server_info',\n\t\t\t'db_error' => 'mysql_error',\n\t\t\t'db_select_db' => 'mysql_select_db',\n\t\t\t'db_affected_rows' => 'mysql_affected_rows',\n\t\t\t'db_title' => 'MySQL',\n\t\t);\n\n\t// this stuff we do only if zCommunity is stand-alone\n\tif (!$zc['with_software']['version'])\n\t{\n\t\tif (!empty($zc['db_persist']))\n\t\t\t$connection = @mysql_pconnect($zc['db_server'], $zc['db_user'], $zc['db_passwd']);\n\t\telse\n\t\t\t$connection = @mysql_connect($zc['db_server'], $zc['db_user'], $zc['db_passwd']);\n\n\t\tif (!$connection)\n\t\t\tzc_db_fatal_error();\n\n\t\tif (!@mysql_select_db($zc['db_name'], $connection))\n\t\t\tzc_db_fatal_error();\n\t\n\t\treturn $connection;\n\t}\n}", "title": "" }, { "docid": "37b7c0258de6529d8f6ebbc04da06a18", "score": "0.5296581", "text": "function getDatabaseConnection() {\n if ($_SERVER['SERVER_NAME']==\"test-ottermike.c9users.io\") { // running on c9\n $host = \"localhost\";\n $username = \"Michael\";\n $password = \"cst336\"; // best practice: define this in a separte file\n $dbname = \"meme_lab\"; \n } else { // running on Heroku\n $host = \"us-cdbr-iron-east-01.cleardb.net\";\n $username = \"b171ae97d81d35\";\n $password = \"ce803cfa\"; // best practice: define this in a separte file\n $dbname = \"heroku_992acbb4f28e214\"; \n }\n \n \n // Create connection\n $dbConn = new PDO(\"mysql:host=$host;dbname=$dbname\", $username, $password);\n $dbConn -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $dbConn; \n}", "title": "" }, { "docid": "7bac307597faee6ec55c4d1c32cd467e", "score": "0.5288074", "text": "public function forgetUser() {\n\t\tsetcookie(self::$usernameCookie, \"\", time()-3600);\n\t\tsetcookie(self::$passwordCookie, \"\", time()-3600);\n\t}", "title": "" }, { "docid": "5ff3dfdb01bf5fb2e9d47eea4c087fcc", "score": "0.5286234", "text": "function get_dbase() {\n //\n //If the dbase property is set, return it; otherwise continue to \n //establish it from user log in credentials\n if (isset($this->dbase)) {\n //\n //Test if we need to activate it or not\n if (get_class($this->dbase) === \"stdClass\") {\n //\n //Yes we do. Activate it/\n $this->dbase = $this->activate($this->dbase);\n }\n //\n //Return the active form\n return $this->dbase;\n }\n //\n //The database name must be a valid property of this object; otherwise \n //you get a runtime error.\n $dbname = $this->dbname;\n //\n //Create a new database connction; Buis has unfetterd access to\n //all teh databases -- but you must have registed to access buis \n $this->dbase = new dbase(page_login::username, page_login::password, $dbname);\n //\n //Return the connected database\n return $this->dbase;\n }", "title": "" }, { "docid": "647306869cbada97fba1338c8fac824a", "score": "0.52840465", "text": "function requestCookie(){\n $this->source = &$_COOKIE; //set the source to Cookie\n }", "title": "" }, { "docid": "c6e7a6f18abdb4e8c75e9502661734f7", "score": "0.5283108", "text": "function initCon(){\r\n /*替换为你自己的数据库名*/\r\n// $dbname = 'CVbitPUFVNaoxNelGGLx';\r\n $_SESSION[\"databaseName\"] = 'edc_questionnaire';\r\n $databaseName = 'edc_questionnaire';\r\n /*填入数据库连接信息*/\r\n// $host = 'sqld.duapp.com';\r\n// $port = 4050;\r\n// $user = '6b9246ee6b8349bd961cae567a0c5e24';//用户AK\r\n// $pwd = '540b206f0f3548fb9e130135faf84b55';//用户SK\r\n// /*以上信息都可以在数据库详情页查找到*/\r\n $host = 'localhost';\r\n $port = 3306;\r\n $user = 'root';//用户AK\r\n $pwd = '19491001';//用户SK\r\n /*接着调用mysql_connect()连接服务器*/\r\n /*为了避免因MySQL数据库连接失败而导致程序异常中断,此处通过在mysql_connect()函数前添加@,来抑制错误信息,确保程序继续运行*/\r\n /*有关mysql_connect()函数的详细介绍,可参看http://php.net/manual/zh/function.mysql-connect.php*/\r\n// $link = @mysql_connect(\"{$host}:{$port}\",$user,$pwd,true);\r\n $link = new mysqli($host, $user, $pwd,$databaseName, $port);\r\n if(mysqli_connect_errno()) {\r\n die(\"Connect Server Failed: \" . mysqli_connect_error());\r\n }\r\n return $link;\r\n}", "title": "" } ]
7dacd03ee31f5bef55a58d71536b698d
Returns the class/type name to use as Client.
[ { "docid": "2954ad8a7c69aa795bc3864bd754c878", "score": "0.0", "text": "public function getApiType()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_API_TYPE);\n }", "title": "" } ]
[ { "docid": "c4a57561c837d75587180eb142e617ec", "score": "0.77137035", "text": "public function getName()\n {\n return 'client';\n }", "title": "" }, { "docid": "11809df46cc1bd502ab4505306d02244", "score": "0.71402067", "text": "public function getClientType()\n {\n return (empty($this->clientType)) ? $this->type : $this->clientType;\n }", "title": "" }, { "docid": "3e14e0b334f33bc1bd0778a369df8d3b", "score": "0.7136669", "text": "public function getClientType()\n {\n return $this->client_type;\n }", "title": "" }, { "docid": "c053e3a4c6719fc0bc38584bb7609d43", "score": "0.68641406", "text": "public function getClientType() : string;", "title": "" }, { "docid": "09853880118f67f88d4e3e068f385527", "score": "0.68537456", "text": "protected function getClientClassName()\n\t{\n\t\treturn 'Prado.WebUI.TImageMap';\n\t}", "title": "" }, { "docid": "a3c22a2313ae5994c53083f1482718b2", "score": "0.683206", "text": "public function getClientName() {\n\t\treturn empty($this->client) ? null : $this->client->getName();\n\t}", "title": "" }, { "docid": "32831459062fe7e67eb183b83f6b7bf8", "score": "0.67935586", "text": "public function getName()\n {\n return 'Paydollar_Client';\n }", "title": "" }, { "docid": "3b2b711362e4c384876b61247ebd52fe", "score": "0.6754114", "text": "public function getClientName()\n {\n return $this->clientName;\n }", "title": "" }, { "docid": "22de45f58b54f8af008aafa3141cd49c", "score": "0.6729655", "text": "public function getClientName()\n {\n return $this->client_name;\n }", "title": "" }, { "docid": "22de45f58b54f8af008aafa3141cd49c", "score": "0.6729655", "text": "public function getClientName()\n {\n return $this->client_name;\n }", "title": "" }, { "docid": "078f56f3eac5b5003b64c6efa3cbb9ee", "score": "0.6684219", "text": "public function getClientName() {\n \treturn $this->clientName;\n }", "title": "" }, { "docid": "2c81c49ff60606116eb8c482c6e55470", "score": "0.6677723", "text": "public function getType(): string\n {\n try {\n return Tools::getClassName($this);\n } catch (\\Exception $e) {\n //NOOP -- this cannot happen!\n }\n\n return \"\";\n }", "title": "" }, { "docid": "2e53a9af3dd0c0fb9c54037a31d0b5b8", "score": "0.6638504", "text": "protected function getClientClassName()\n\t{\n\t\treturn 'Prado.WebUI.TTextBox';\n\t}", "title": "" }, { "docid": "a0ff07c4991946583fa9d1c0b2904a0f", "score": "0.662514", "text": "public static function className()\n {\n return get_class(static::get());\n }", "title": "" }, { "docid": "1631e23d751d1053d1392af9604aa9d2", "score": "0.65006363", "text": "protected function getClientClassName ()\r\n\t{\r\n\t\treturn 'Draggable';\r\n\t}", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.647469", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.647469", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.647469", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.647469", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.647469", "text": "public function getClassName();", "title": "" }, { "docid": "b965fb7cb05b3d158c195331221cb480", "score": "0.64454216", "text": "public function getClientForName($name);", "title": "" }, { "docid": "bb489807511c190e49882f52e83194bf", "score": "0.642818", "text": "function getType()\n {\n return get_class();\n }", "title": "" }, { "docid": "685203e39cc4cbfcadade6e606320b7e", "score": "0.64249533", "text": "function getType() {\n\t\treturn ClientType::all ()->lists ( 'name', 'id' );\n\t}", "title": "" }, { "docid": "2a814977007efefacf2fcd5e31f8baf4", "score": "0.64086074", "text": "public function getTypeClassName(): string;", "title": "" }, { "docid": "e931f1be68d824ab662be1798e507fca", "score": "0.6367948", "text": "public function getSecurityClientTypeUuid() {\n return $this->_security_client_type_uuid;\n }", "title": "" }, { "docid": "3533cdd1f4dd73cb24ba32b750d8d4ee", "score": "0.63606304", "text": "public function getName(): string\n {\n return get_called_class();\n }", "title": "" }, { "docid": "f0127a7bea719d208709976cee8d497f", "score": "0.63522166", "text": "protected function determine_client() {\n $client = 'predis';\n\n if ( class_exists( 'Redis' ) ) {\n $client = defined( 'HHVM_VERSION' ) ? 'hhvm' : 'phpredis';\n }\n\n if ( defined( 'WP_REDIS_CLIENT' ) ) {\n $client = (string) WP_REDIS_CLIENT;\n $client = str_replace( 'pecl', 'phpredis', $client );\n }\n\n return trim( strtolower( $client ) );\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.6345445", "text": "public function getClassName(): string;", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.6345445", "text": "public function getClassName(): string;", "title": "" }, { "docid": "9b6835898123dbd83c6d347b71c6e9ff", "score": "0.6335936", "text": "protected function _getNameForStoreClient()\n {\n $clientName = Zend_Registry::get('config')->settings->client->default->name; // default client\n if (Zend_Registry::isRegistered('store_config_name')) {\n $clientName = Zend_Registry::get('store_config_name');\n }\n\n return $clientName;\n }", "title": "" }, { "docid": "209a26d67f0adb82867e06d14b86292d", "score": "0.63073796", "text": "public function className()\n\t{\n\t\treturn $this->class;\n\t}", "title": "" }, { "docid": "9ca4a7dec9ae02bed7fd17de6f0f1972", "score": "0.62902415", "text": "function _client_kind(){\n\t\t\treturn '0';\n\t\t}", "title": "" }, { "docid": "65e0ea70e11163e77289b4f0c738202a", "score": "0.6280576", "text": "public function getClassName(){\n return get_class($this);\n }", "title": "" }, { "docid": "79a9ed46bb844b4ad92182aa087825df", "score": "0.6275019", "text": "public function className(): string;", "title": "" }, { "docid": "0631da91c99a646073e1bb09e8faf5ff", "score": "0.62746334", "text": "public function getClassName(): string {\n return $this[\"class\"] ?? \"\";\n }", "title": "" }, { "docid": "7f182cab5aba64d90cd8219acc037435", "score": "0.62739736", "text": "public function getAlias()\n {\n return 'm6_ws_client';\n }", "title": "" }, { "docid": "39f35f0fbb4e9e0aa526be505b04ff5a", "score": "0.62641555", "text": "public function getClassName()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "713bb0d42de95153dc63b96073e2e9f6", "score": "0.62609684", "text": "public function getClassName () {\n\t\treturn $this::class;\n\t}", "title": "" }, { "docid": "d835bbedd4d7b03b502f290acc9107b1", "score": "0.62469995", "text": "public function getOptionsClass()\n {\n return \\PamiModule\\Options\\Client::class;\n }", "title": "" }, { "docid": "1e03ae347b4ef8da66c555d158d71e4b", "score": "0.6222918", "text": "protected function getClientClassName()\n\t{\n\t\treturn 'Prado.WebUI.TActiveRadioButtonList';\n\t}", "title": "" }, { "docid": "88e4bf10b08303c531605ac8077e74cb", "score": "0.62221843", "text": "public function getType() {\n return strtr(substr(rtrim(get_class($this), '_'), 15), '\\\\', '_');\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.6217776", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.6217776", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.6217776", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "2ef3eca2484001fb5cc77bd81a31cb12", "score": "0.62162536", "text": "protected function getClassName(): string\n {\n return \"BroadcastServiceProvider\";\n }", "title": "" }, { "docid": "186cf8d2fbb09cbfab6eb376f0a10093", "score": "0.6212744", "text": "function className()\n {\n return(get_class($this));\n }", "title": "" }, { "docid": "2f65aa3ec444d02fd89655e03e062b1b", "score": "0.6210139", "text": "public function getClassName(): string\n {\n return $this->metadata->getName();\n }", "title": "" }, { "docid": "461be15839db1e85d337e8f83df3fc7d", "score": "0.6204113", "text": "public function getClassname()\r\n {\r\n return $this->classname;\r\n }", "title": "" }, { "docid": "698dbbd0f9d021af66fea5f6b83ccff2", "score": "0.6203927", "text": "public function getName()\r\n {\r\n return get_class($this);\r\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.6200721", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.6200721", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.6200721", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "46e8c7ca976ef0d75877c7340f6194f3", "score": "0.6199575", "text": "public function getName()\n\t{\n\t\treturn 'cs_client.client_status';\n\t}", "title": "" }, { "docid": "c08e1d997faa7e6d1cf0ed8823597a81", "score": "0.61916554", "text": "public function getClassName() : string\n {\n return $this->className;\n }", "title": "" }, { "docid": "6f70b373b689b01209c1d455687edef2", "score": "0.61909634", "text": "function getClassName() {\n\t\treturn $this->_ClassName;\n\t}", "title": "" }, { "docid": "6f16f10b522fd127ca1a2e50b0cdf356", "score": "0.6185965", "text": "public function getName() {\n return __CLASS__;\n }", "title": "" }, { "docid": "1380831789bce71ef8f9ff563639ca2d", "score": "0.61663204", "text": "static public function classname()\n\t{\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.6165473", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.6164582", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "140f49dde0b59efcdd600bb3161d1cda", "score": "0.61503047", "text": "public function getClassName() {\t\t\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "e32bcd95ab627f2a84d88a9daf5b7f22", "score": "0.61479914", "text": "public function getName()\n {\n $name = '';\n switch ($this->_clientId)\n {\n case HWDMediaShareCli::SITE:\n $name = 'site';\n break;\n case HWDMediaShareCli::ADMIN:\n $name = 'administrator';\n break;\n default:\n $name = 'cli';\n break;\n }\n return $name;\n }", "title": "" }, { "docid": "e62fa01c714c3b3f2ee78500dd2a0fca", "score": "0.614633", "text": "private function getClassName()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "a357ef3077312d1ade80334bc16119ed", "score": "0.61449635", "text": "public function getClassName()\n {\n return $this->sClassName;\n }", "title": "" }, { "docid": "46cb43ae3c2346b286286c751505a5c0", "score": "0.6143282", "text": "public static function getClassName(){\n\n return get_called_class();\n }", "title": "" }, { "docid": "7fc10922a34e985b6c4ed51671ae66e3", "score": "0.6139501", "text": "public function getAWSClient($clientType);", "title": "" }, { "docid": "871aa56c135c5c75c3c952dd9aaf6414", "score": "0.61374825", "text": "public static function className(){\n return __CLASS__;\n }", "title": "" }, { "docid": "871aa56c135c5c75c3c952dd9aaf6414", "score": "0.61374825", "text": "public static function className(){\n return __CLASS__;\n }", "title": "" }, { "docid": "a5b1f4570da9259f00098611e26b17fd", "score": "0.6131966", "text": "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "ef9c96c37233304dbc7f831dd11623d1", "score": "0.6125882", "text": "public static function class_name()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "30e1415781b1764ec4d50d9e77de53ae", "score": "0.6124226", "text": "public function getClassName()\n {\n return $this->strClassName;\n }", "title": "" }, { "docid": "349b10a89d8341526d579e628e355106", "score": "0.61112064", "text": "protected function getType()\n {\n if($this->currObj instanceof TeamSpeak3_Node_Server)\n {\n return \"server\";\n }\n elseif($this->currObj instanceof TeamSpeak3_Node_Channel)\n {\n return \"channel\";\n }\n elseif($this->currObj instanceof TeamSpeak3_Node_Client)\n {\n return \"client\";\n }\n elseif($this->currObj instanceof TeamSpeak3_Node_Servergroup || $this->currObj instanceof TeamSpeak3_Node_Channelgroup)\n {\n return \"group\";\n }\n\n return \"host\";\n }", "title": "" }, { "docid": "0c1a90b7eb71e82eabe22cc6263e34b0", "score": "0.61107326", "text": "public function getClassName()\n\t{\n\t\treturn $this->class_name;\n\t}", "title": "" }, { "docid": "e1a263835209aa278160c040fa8125ff", "score": "0.61063236", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.60982656", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.60982656", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "2a546a8ae753ae64a321eb4ff076e66a", "score": "0.6093638", "text": "function getClassName();", "title": "" }, { "docid": "861244f8974ee223c872ffc17bb0ed7b", "score": "0.6091042", "text": "public function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "title": "" }, { "docid": "ffff8f2d88a452a3692fb6dc5af4852a", "score": "0.6081981", "text": "public static function getClassName() {\n return get_called_class();\n }", "title": "" }, { "docid": "239edf40d1911f5b8ee7d114bbae0ace", "score": "0.60817564", "text": "public static function getTypeName();", "title": "" }, { "docid": "10da9934a8283e8d2d07fc701e732116", "score": "0.60778517", "text": "public function __get($name)\n {\n $words = Inflector::camel2words($name);\n $words = explode(' ', $words);\n if (array_pop($words) === 'Client') {\n $service = strtolower(join('', $words));\n if (!isset($this->clients[$service])) {\n $this->clients[$service] = $this->getSdk()->createClient($service);\n }\n return $this->clients[$service];\n }\n return parent::__get($name);\n }", "title": "" }, { "docid": "b015809bc6720187e05eb50f2825ea61", "score": "0.6072353", "text": "public static function _type(){\n return strtolower(\n pov()->utils->phpAnalyzer->getClassWithoutNameSpaces(\n get_called_class()\n )\n );\n }", "title": "" }, { "docid": "310d78645ed92c62563338a7daaf9d0b", "score": "0.6067572", "text": "public function GetClassName()\r\n {\r\n return $this->className_;\r\n }", "title": "" }, { "docid": "1e8083c58cb2d1c77874f4e15e72e24a", "score": "0.6047054", "text": "public function name() {\n\t\t$class = explode('\\\\', get_class($this));\n\t\treturn strtolower(array_pop($class));\n\t}", "title": "" }, { "docid": "26124f2347ab84516813c775e3a578ac", "score": "0.6025572", "text": "public function class_name() {\n $parts = explode('_', $this->name, 2);\n return $parts[1];\n }", "title": "" }, { "docid": "cac2a7600e81d7b30b47543c2cf1740a", "score": "0.6018026", "text": "public static function getClass(): string;", "title": "" }, { "docid": "ddfd8ce80a1e2e6f530c301d9a531acd", "score": "0.60140306", "text": "final public function addonGetClassName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.60112554", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "ff954574c7722c5a7a8d5abbb75ffc2d", "score": "0.60109496", "text": "public function __toString()\r\n\t{\r\n\t\treturn \\Adhoc\\Util::getClassName($this);\r\n\t}", "title": "" }, { "docid": "efc428d4f4038360c258eee757855e01", "score": "0.60051006", "text": "public static function class_name() {\n\t\treturn __CLASS__;\n\t}", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6003113", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6003113", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "9d19c51734e4c84f949147441a5d8ad6", "score": "0.6002157", "text": "public function getTypeName();", "title": "" }, { "docid": "fb78508efe6b0c323d6a655cbdbb8b6a", "score": "0.5999841", "text": "abstract protected function getClassName();", "title": "" }, { "docid": "2da2398f0db7f9e61c1404ce913c7426", "score": "0.5997879", "text": "public function getId()\n {\n $classNameSpace = get_called_class();\n $classParts = array_reverse(explode('\\\\', $classNameSpace));\n $class = str_replace('Command', '', $classParts[0]);\n\n return StringHelper::convertToSnakeCase($class);\n }", "title": "" }, { "docid": "c9521041d2a09e79f4426357ba29b002", "score": "0.59915334", "text": "public function getClass() : string\n {\n return $this->class;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "3e3a565a181db6f795f079d1dfb01f75", "score": "0.7101641", "text": "public function update(Resource $resource, $id)\n {\n //\n }", "title": "" }, { "docid": "fb65b4f4d55e024e7f1613af273a55f2", "score": "0.6776488", "text": "public function update(Request $request, Resource $resource)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'url' => 'required|max:255',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id',\n 'is_published' => 'required|boolean'\n ]);\n $resource_previous_unpublished = !$resource->is_published;\n //Create the resource\n $resource->update([\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => $request->is_published\n ]);\n //Drop the tags from the pivot table. Add the updated ones\n $resource->tags()->detach();\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource updated';\n $responseText .= $resource_previous_unpublished && $request->is_published ? ' and published' : '';\n //Take them back to the resource form so they can add more resources\n return back()->with('success', $responseText);\n }", "title": "" }, { "docid": "2a532e323886cdeee4fdc191ad2a127e", "score": "0.64731157", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n //\n\t\t\t\t$resource->name= $request->name;\n\t\t\t\t$resource->url= $request->url;\n\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'updated'=>$resource->save()\n\t\t\t\t\t]);\n }", "title": "" }, { "docid": "61a34fcd66242862e9a967402e4ff514", "score": "0.6267482", "text": "private function updateResource($resource, $inputs )\n {\n \n // if(isset($inputs['category_id'])){\n // $model->categories()->sync($inputs['category_id']);\n // } else {\n // $model->categories()->sync([]);\n // }\n return $resource->update($inputs);\n\n }", "title": "" }, { "docid": "a4a8c199770b8cc35d56a67cd9297225", "score": "0.62642777", "text": "public function update($storageName, $key, array $data);", "title": "" }, { "docid": "37aa707a5d1cf3d2b73c5d32bea86169", "score": "0.6242811", "text": "public function update($resource, array $data)\n {\n $this->validate($data, $resource);\n return $resource->update($data);\n }", "title": "" }, { "docid": "4c22c400891589f8da5573f60cdc4ea0", "score": "0.61387795", "text": "public function update(Request $request, Resource $resource)\n {\n $validator = Validator::make($request->all(),[\n 'wbs' => 'required',\n 'tipo_recurso' => 'required',\n 'cantidad' => 'required',\n 'comentarios' => 'required',\n 'vision_estrategica' => 'required'\n\n ]);\n if ($validator->fails()) {\n return response()->json(['Error'],404);\n\n }else{\n $resource->wbs = $request->wbs;\n $resource->tipo_recurso = $request->tipo_recurso;\n $resource->cantidad = $request->cantidad;\n $resource->comentarios = $request->comentarios;\n $resource->vision_estrategica = $request->vision_estrategica;\n \n $resource->save();\n return response()->json($resource);\n }\n }", "title": "" }, { "docid": "cb421444658bf63523d9239cfdb2c091", "score": "0.6102716", "text": "public function update(StorageRequest $request, $id)\n {\n try {\n $this->service->updateStorage($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 }", "title": "" }, { "docid": "40c721acddd9f92cbdc47e322ae39955", "score": "0.60832995", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n if($storage = Storage::find($id))\n {\n if( $storage->update( $request->all() ) )\n {\n if($request->storage_items)\n $storage->item()->sync($request->storage_items);\n else\n $storage->item()->sync([]);\n return redirect()->back();\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60161185", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "1342fca6bb741918e9de91960e422b72", "score": "0.59314024", "text": "public function dispatchOnPostUpdateResource($resource);", "title": "" }, { "docid": "4c33901004c334e4edd8b45955f45ed2", "score": "0.5907313", "text": "public function sliderUpdate(SliderUpdateRequest $request, $id)\n {\n\n $slider=Slider::find($id);\n /* dd($service); */\n $input= $request->all();\n\n if($request->hasFile('image')) {\n if($request->image==$slider->image){\n $input['image']=$slider->image;\n }else{\n $fileName=$request->file('image')->store('slider','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$slider->image);\n }\n } else {\n\n $input['image']=$slider->image;\n\n }\n $slider->update([\n 'title'=>$request->title,\n 'image'=>$input['image'],\n ]);\n /* dd($service); */\n\n return new SliderResource($slider);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.58927333", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.5877983", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "cc850ce20ed7c56b132541ba822c9777", "score": "0.58339095", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $request->validate([\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'resource' => 'file|mimes:pdf,doc,docx,xls,xlm,xla,xlc,xlt,xlw,ppt,pps,pot'\n ]);\n\n $eLibrary = ELibrary::findOrFail($id);\n\n /*Photo*/\n if($request->hasFile('resource') && $request->file('resource')->isValid()){\n $file = $request->file('resource');\n $filename = $data['title'] . '_' . time().'.'.$file->extension();\n $path = $file->storePubliclyAs('public/uploads/eLibrary',$filename);\n if($eLibrary->path) {\n if (Storage::exists($eLibrary->path)) Storage::delete($eLibrary->path);\n }\n $data['path'] = $path;\n }\n if($eLibrary->update($data)){\n Session::flash('alert-success',\"The E-Library resource '$eLibrary->title' has been updated\");\n }else{\n Session::flash('alert-danger',\"The E-Library resource '$eLibrary->title' could not be updated. Please contact support.\");\n }\n return redirect('admin/eLibrary');\n }", "title": "" }, { "docid": "2cf80d6b1d66cb9fd56bf8c18c026e8f", "score": "0.5824334", "text": "public function update(Request $request, $id)\n {\n $path = Product::find($id)->filename;\n $filename = $request->file('image');\n\n if(!($filename === null)) {\n $path = $request->file('image')->store('id/'.$request->input('user_id').'/products/images', 's3');\n }\n\n Product::find($id)->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'amount' => $request->input('amount'),\n 'filename' => basename($path),\n 'url' => Storage::disk('s3')->url($path),\n ]);\n return redirect()->route('products.index');\n\n\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "5a86878bd33a53b3ba502d5fdbe620c5", "score": "0.5785845", "text": "public function update(Request $request, $id)\n {\n $image= Image::find($id);\n\n $image->nom=$request->nom;\n $image->src=$request->file('src')->hashName();\n $image->tag_id=$request->tag_id;\n \n\n $image->save();\n\n Storage::disk('public')->delete('img/' . $image->src);\n\n $request->file('src')->storePublicly('img','public');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.5780427", "text": "public function update ($data) {}", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.5780427", "text": "public function update ($data) {}", "title": "" }, { "docid": "13371e530c9d042503b3d48fe48307cc", "score": "0.5767225", "text": "private function update()\n {\n Cache::put(static::class . $this->uuid, $this->data(), 30);\n }", "title": "" }, { "docid": "ee990a961940ba1d9bcbdf2c6d36091f", "score": "0.57537633", "text": "function update_instance($resource) {\n $this->_postprocess($resource);\n return parent::update_instance($resource);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57354003", "text": "public function setResource($resource);", "title": "" }, { "docid": "1a87e148e066a4886de60512f8e08a52", "score": "0.5728945", "text": "public function update(ShareRequest $request, $id)\n {\n $share = Share::find($id);\n $share->share_name = $request->get('share_name');\n $share->share_price = $request->get('share_price');\n $share->share_qty = $request->get('share_qty');\n $share->save();\n if ($share->image) {\n unlink(public_path('storage/') . $share->image);\n }\n $this->storeImage($share);\n return redirect('/shares')->with('success', 'Stock has been updated');\n }", "title": "" }, { "docid": "b8fe0c7f15bb7a13ab10f71ffcd06156", "score": "0.56978613", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n \n $product->stocks = $request->stock;\n \n $product->save();\n \n return redirect()->route('inventory.index'); \n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5693103", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5693103", "text": "public function update($object);", "title": "" }, { "docid": "e6fb42d6286b3f4fe6f14fab49db4173", "score": "0.5673247", "text": "public function update(Request $request, $id)\n {\n if($request->has('new_image')) {\n\n $product = Product::where('id',$id)->first(); \n\n $old_image = $product->image;\n unlink($old_image);\n\n\n $file = $request->file('new_image');\n $name = Str::random(10);\n $url = \\Storage::putFileAs('images',$file, $name . '.' .$file->extension());\n\n $data = array();\n $data['name'] = $request->name;\n $data['price'] = $request->price;\n $data['image'] = $url;\n\n $update = DB::table('products')->where('id',$id)->update($data);\n\n\n\n } else {\n $product = Product::find($id);\n $product->update($request->only('name','price'));\n }\n\n return redirect()->back()->with(\"status\",\"Successfully Updated\");\n\n\n\n }", "title": "" }, { "docid": "d1bfc26f51571559d08876ca1ee1e3c3", "score": "0.5654586", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->uploadStream($path, $resource, WriteMode::force());\n }", "title": "" }, { "docid": "09bd4dd53076527911b91beb82f9c3a4", "score": "0.5653929", "text": "public function update(Request $request, $id)\n {\n //\n $product_data=request()->except(['_token','_method']);\n \n if ($request->hasFile('Image_path')) {\n # code...\n $product = Products::findOrFail($id);\n Storage::delete('public/'.$product->Image_path);\n $product_data['Image_path']=$request->file('Image_path')->store('uploads', 'public');\n \n }\n Products::where('id','=',$id)->update($product_data);\n\n //$product = Products::findOrFail($id);\n //return view('products.edit', compact('product'));\n return redirect('productos')->with('Message','Producto modifiado con exito.');\n }", "title": "" }, { "docid": "97e4ce8ade6b1dc2b2b25f72334eb18d", "score": "0.56377935", "text": "public function dispatchOnPreUpdateResource($resource);", "title": "" }, { "docid": "318b6ff187eaf08454a3d0857e9aca4d", "score": "0.56296855", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\t$res = $this->cloudDrive->uploadStream($resource, $path, true);\r\n\r\n\t\treturn $res['success'];\r\n\t}", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.5624445", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "fef6f84766f65b55a5b2d09f06bbe894", "score": "0.5616146", "text": "public function update(model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "4a62a78ed2019e37a1f11273a9e45c02", "score": "0.55935365", "text": "public function putAction() {\n $token = $this->_getParam('token', 0);\n $id = $this->_getParam('id', 0);\n if (ZendX_Utilities_SecurityWSCheck::isValid($token)) {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s was Updated', $id);\n $this->_response->ok();\n } else {\n// $this->view->message = sprintf('Forbidden', $id);\n $this->_response->forbidden();\n }\n }", "title": "" }, { "docid": "a67ff3295306d457a45d5bfd402b9bbf", "score": "0.55862665", "text": "public function update(Request $request, $id)\n {\n $result=Slider::find($id);\n\n $result->name=$request->name;\n $result->desc=$request->desc;\n $result->price=$request->price;\n\n if ($request->hasFile('img')) {\n $file=$request->img->store('upload', 'public');\n $result->img=$file;\n }else{\n $errors=\"File not set\";\n return redirect()->back()\n ->withInput($request->input())\n ->with(\"msgError\", $errors);\n }\n\n $result->save();\n\n if ($result) {\n return redirect('show/slider')->with('message', 'Product updated successfully!');\n }\n else{\n return redirect()->back()->withInput($request->input())\n ->with('msgError', 'Record do not update in database!');\n }\n\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.5582684", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.5582684", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.5582684", "text": "public function update($request, $id);", "title": "" }, { "docid": "d6f71bb85fc7a75982a80e5421b6054e", "score": "0.5576981", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->brand_id = $request->brand_id;\n $product->product_price = $request->product_price;\n $product->area_id = $request->area_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->condition = $request->condition;\n\n // if($request->hasFile('product_image'))\n // {\n // $path = $request->product_image->store('images');\n // // $product->product_image = $request->product_image->hashName();\n // }\n // }\n\n $product->save();\n\n flash('Product successfully updated')->success();\n\n return redirect()->route('products.edit',$product->id);\n\n }", "title": "" }, { "docid": "b9d5c9b5a3c8b34eb93904bd4bc5dfc1", "score": "0.5574629", "text": "public function update($id, StoreSliderRequest $request)\n {\n $slider = Slider::find($id);\n $input = $request->all();\n $slider->fill($input);\n\n if(Input::file('image')){\n $file = Input::file('image');\n $filename = time().'-'.$file->getClientOriginalName();\n $directory = $slider->getPath();\n $file->move($directory, $filename);\n $slider->image = $directory.$filename;\n #ImageCompress::tinifyImage($slider->image);\n }\n\n $slider->save();\n\n return redirect()->route('admin.slider.index');\n }", "title": "" }, { "docid": "6ec0972709d8081c8584eadfdebd73e3", "score": "0.5573502", "text": "public function put($resource, array $args = [], array $options = []) {\n return $this->do('PUT', $resource, $args, $options);\n }", "title": "" }, { "docid": "720aa13d6dd5abab4700c72fc5726f2f", "score": "0.5570813", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->product_price = $request->product_price;\n $product->condition = $request->condition;\n $product->brand_id = $request->brand_id;\n $product->state_id = $request->state_id;\n $product->area_id = $request->area_id;\n // $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n\n if ($request->hasFile('product_image')) {\n\n $path = $request->product_image->store('public/uploads');\n\n $product->product_image = $request->product_image->hashNAme();\n\n }\n\n $product->save();\n\n Alert::success('Product succesfully updated!')->autoclose(4000);\n\n // flash('Product succesfully updated')->overlay();\n\n return redirect()->route('admin.products.index');\n\n\n\n }", "title": "" }, { "docid": "e186357e6cd112ce0670460eed4e4946", "score": "0.5564055", "text": "public function update(UploadImageRequest $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $filename = $request->file('image')->getClientOriginalName();\n $type = $request->file('image')->getClientOriginalExtension();\n $url = 'products/images/' . $product->id . '/' . $filename;\n\n $image = Image::make($request->file('image'))->resize(150, 150)->encode($type);\n Storage::disk('s3')->put($url, (string)$image, 'public');\n\n $product->update([\n 'image' => $url,\n ]);\n }\n $product->update([\n 'name' => $request->name,\n 'cost' => $request->cost,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'quantity' => $request->quantity,\n ]);\n $product->save();\n return redirect()->route('admin.product-administration.show', $product->id);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55611396", "text": "public function update($id, $data);", "title": "" }, { "docid": "c6efa075535fbc725da4b180e4ec737b", "score": "0.5551102", "text": "public function update(Request $request, $id)\n {\n if ( Auth::user()->userrole != \"Admin\") {\n return abort(401, 'Access Denied');\n }\n\n $article = Product::where('id',$id)->first(); \n $article->name = request('name');\n $article->sub_title = request('sub_title');\n $article->title = request('title');\n $article->title1 = request('title1');\n $article->title2 = request('title2');\n $article->title3 = request('title3');\n $article->content1 = request('content1');\n $article->content2 = request('content2');\n $article->content3 = request('content3');\n $article->button_text = request('button_text');\n $article->button_link = request('button_link');\n $article->description = request('description');\n $article->slug = Str::slug(request('title'), '-'); \n $article->active = request('active');\n\n // Store uploaded file...\n if($request->hasFile('image')) { \n $file = $request->file('image'); \n $imageName = time().'-'.$file->getClientOriginalName();\n $request->image->storeAs('public/products', $imageName); \n $article->image = $imageName; \n }\n\n $article->save(); \n\n return redirect()->route('admin.product.index');\n }", "title": "" }, { "docid": "8333f02674e0537622e556ed30714d92", "score": "0.5541855", "text": "protected function put()\n {\n \\throw_if(!$this->request->isJson(), new RestfulException(RestfulErrorMessage::InvalidJsonHeader));\n if ($this->restfulRequest->resourceId) {\n $document = null;\n try {\n $document = $this->_get();\n } catch (\\Exception $e) {\n // ...\n }\n return \\response(\n $this->_repository->replace($document, $this->restfulRequest->resourceId, $this->request->json()->all())\n );\n }\n if ($this->payloadIsAttributeSet()) {\n return \\response(\n $this->_repository->batchReplace($this->getFindOption(), $this->request->json()->all())\n );\n }\n throw new RestfulException(RestfulErrorMessage::InvalidRequestPayload);\n }", "title": "" }, { "docid": "a4b00c57c46ebcebca149c23c5beb30a", "score": "0.55279213", "text": "public function update(Request $request, $id)\n {\n $item = Items::find($id);\n $item->fill($request->all());\n\n// if (Input::file()) {\n// $filename = $request->file('image')->store('public');\n// $path = substr($filename, 7);\n// $item->image = $path;\n// }\n\n $item->update();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.552252", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "550e477a9a956b28304b535c2916ad5c", "score": "0.5521106", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"title\" => 'required',\n \"product_id\" => 'sometimes',\n \"button_text\" => 'sometimes',\n \"button_link\" => 'sometimes',\n \"priority\" => 'required',\n \"image\" => 'sometimes|file|image|max:3000',\n ]);\n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->product_id = $request->product_id;\n $slider->button_text = $request->button_text;\n $slider->button_link = $request->button_link;\n $slider->priority = $request->priority;\n\n if (request()->hasFile('image')) {\n if (File::exists('storage/' . $slider->image)) {\n File::delete('storage/' . $slider->image);\n }\n\n $path = $request->file('image')->store('sliders', 'public');\n $slider->image = $path;\n }\n $slider->save();\n $sliders = Slider::all();\n session()->flash('flash_message_success', 'You have updated a slider successfully!');\n return redirect()->route('admin.sliders')\n ->with(compact('sliders'));\n\n }", "title": "" }, { "docid": "416eb5614de4e6fedf65c1c8ec3c5924", "score": "0.55197877", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name'=>'required',\n 'category_id'=>'required|integer',\n 'status'=> 'required|boolean',\n 'picture'=> 'required',\n 'gender' => 'required',\n ]);\n $pic = null;\n if ($request->hasFile('picture')) {\n\n $image = $request->file('picture');\n $name = uniqid().'.'.$image->getClientOriginalExtension();\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n $pic = \"images/{$name}\";\n }\n $product = \\App\\Product::find($id);\n $product->name = $request->get('name');\n $product->category_id = $request->get('category_id');\n $product->status = $request->get('status');\n $product->picture = $pic;\n $product->gender = $request->get('gender');\n $product->save();\n\n return redirect('/products')->with('success', 'Stock has been updated');\n\n\n }", "title": "" }, { "docid": "9e68af5ab6e6fd50f6b3af43fa9adffb", "score": "0.5518567", "text": "public function update(Request $request, $id)\n {\n //\n\n $specialOffers = SpecialOffer::find($id);\n $specialOffers->product_title = $request->sliderTitle;\n $specialOffers->product_price = $request->sliderDetails;\n $specialOffers->product_available = $request->productPrice;\n $specialOffers->product_sold = $request->product_sold;\n \n \n if($request->file('image')){\n $image = $request->file('image');\n Storage::putFile('public/img/',$image);\n $specialOffers->image =\"storage/img/\".$image->hashName();\n }\n $specialOffers->save();\n \n return redirect()->route('admin.specialOffers.create')->with('success','specialOffers details updated Successfully');\n }", "title": "" }, { "docid": "a66a502d0331860b0492d8521d8dc6fc", "score": "0.55184567", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n $data = $request->all();\n if ($request->hasFile('imagen')) {\n $data['imagen'] = $request->file('imagen')->store('slides','public');\n\n $exists = Storage::disk('sliders')->exists($slider->solo_imagen);\n if($exists)\n Storage::delete(\"/public/$slider->imagen\");\n\n }\n $slider->fill($data);\n $slider->save();\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "864750e43aa4e758ff3496700f1f1f1e", "score": "0.55172956", "text": "public function update(Request $request, Path $path)\n {\n //\n \n $data = $request->all();\n \n if($request->file('image')){\n $data['image'] = $request->file('image')->store('assets/path', 'public');\n }\n\n $path->update($data);\n \n return redirect()->route('paths.index');\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.55113083", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "963320c6c8e6f19972872f0c66fe30e0", "score": "0.55090666", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('public/products');\n Storage::delete($product->image);\n }\n $product->name = $request->name;\n $product->description = $request->description;\n $product->image = $image;\n $product->price = $request->price;\n $product->additional_info = $request->additional_info;\n $product->category_id = $request->category;\n $product->subcategory_id = $request->subcategory;\n\n $product->save();\n\n return redirect()->route('product.index')->with('message', 'Successfully updated the product');\n }", "title": "" }, { "docid": "60f3ddc323c30358e47d69e943e6dbaa", "score": "0.55029297", "text": "public function update(Request $request, $id)\n {\n\n extract($this->getResourceNames());\n\n $this->authorize('EDIT_' . $permissionKey);\n\n $item = $modelPath::findOrFail($id);\n\n $this->validateEditForm($request, $item);\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "f413999cfa6fd30cb481e60a58035e46", "score": "0.5500634", "text": "public function update(Request $request,$id)\n {\n $product=Product::find($id);\n $request->validate([\n \"name\"=>\"required\",\n \"category\"=>\"required\",\n \"description\"=>\"required\",\n \"price\"=>\"required|numeric\",\n \"stock\"=>\"required|numeric\",\n \"image\"=>\"required\"\n ]);\n if($request->hasFile('image')){\n $imgname=$request->image->getClientOriginalName(); \n if(Storage::exists($request->image)){\n $product->image=$imgname; \n }\n else{\n $request->image->storeAs('public',$imgname);\n $product->image=$imgname;\n }\n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->description=$request->description;\n $product->stock=$request->stock;\n $product->price=$request->price;\n $product->save();\n\n }", "title": "" }, { "docid": "8de839d3e9816fa894298a9064d231f4", "score": "0.54981846", "text": "function update($record) {\n\t\techo \"update called\";\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t\t$this->rest->option(CURLOPT_PORT, REST_PORT);\n\t\t$key = $record->{$this->_keyfield};\n\t\t$retrieved = $this->rest->put('/job/' . $key, $record);\n\t\t$this->load(); // because the \"database\" might have changed\n\t}", "title": "" }, { "docid": "4d6dd204fb19a2d6fc40011791b9128d", "score": "0.5497489", "text": "public function update(Request $request, $id)\n {\n //\n $promotion = Promotion::findOrFail($id);\n\n if ($request->hasFile('photo')) {\n $photo = $request->photo;\n\n $path = 'images/promotion';\n $filename = $id . '.' . $photo->extension();\n $photo->storeAs($path, $filename);\n\n $promotion->image = 'storage/app/public/' . $path . '/' . $filename;\n }\n\n $input = $request->all();\n\n $validField = $promotion->fillable;\n\n foreach ($input as $key=>$data) {\n if (in_array($key, $validField)) {\n $promotion[$key] = $data;\n }\n }\n\n $promotion->save();\n\n return new PromotionResource($promotion);\n\n }", "title": "" }, { "docid": "01d7e90eb4d4834e12b31486f04ab3c2", "score": "0.5492901", "text": "public function update(Request $request)\n {\n $feature=Feature::find($request->id);\n if($request->hasFile('feature_icon')) {\n $file_name = time().'.'.$request->feature_icon->extension(); \n $path = $request->file('feature_icon')->storeAs('public/feature_icons',$file_name);\n $feature->feature_icon=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/feature_icons/' . $Image)){\n $delete= Storage::delete('/public/feature_icons/' . $Image);\n }\n } \n $feature->feature_name=$request->feature_name;\n $feature->updated_at=date('Y-m-d H:m:s');\n $feature->update();\n alert::success('feature Updated Successfully');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "f7f83699cca8c8d4920c525dc392587d", "score": "0.5492046", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = $request->all();\n $product = Product::find($id);\n\n $path = null;\n if ($request->file('image')) {\n $path = $request->file('image')->store('public/products');\n // @unlink('storage/'. $product->image);\n $data['image'] = $path;\n }\n\n\n $product->update($data);\n\n return redirect('/product');\n }", "title": "" }, { "docid": "2160be914cd287b1f331b462c6097a00", "score": "0.5488792", "text": "public function update(Request $request, $id)\n {\n // $this->authorize('haveaccess','producto.edit');\n $datosProductos=request()->except(['_token','_method']);\n\n if ($request->hasFile('imagen')) {\n\n $producto= Producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->imagen);\n\n $datosProductos['imagen']=$request->file('imagen')->store('uploads/producto','public');\n }\n\n Producto::where('id','=',$id)->update($datosProductos);\n $valores['concesionado']=Null;\n $producto= Producto::findOrFail($id);\n $producto->fill($valores);\n $producto->save();\n return view('supervisor.producto.edit',compact('producto'));\n }", "title": "" }, { "docid": "b7260400d51b81b18b18934a92080461", "score": "0.5486585", "text": "public function update($id)\n\t{\n\t\t$powerful = Powerful::findOrFail($id);\n\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'icon' => 'image'\n\t\t);\n\t\t$validator = Validator::make($data = Input::all(), $rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t//upload powerful icon\n\t\tif( Input::hasFile('icon') ) {\n\t\t\t//delete old icon\n\t\t\tif( File::exists($powerful->icon) ) File::delete($powerful->icon);\n\t\t\t//create new icon\n\t\t\t$name = md5(time() . Input::file('icon')->getClientOriginalName()) . '.' . Input::file('icon')->getClientOriginalExtension();;\n\t\t\t$folder = \"public/uploads/powerful\";\n\t\t\tInput::file('icon')->move($folder, $name);\n\t\t\t$path = $folder . '/' . $name;\n\n\t\t\t//update new path\n\t\t\t$data['icon'] = $path;\n\t\t} else {\n\t\t\tunset($data['icon']);\n\t\t}\n\n\t\t$powerful->update($data);\n\n\t\treturn Redirect::route('admin.powerful.index')->with('message', 'Item had updated!');\n\t}", "title": "" }, { "docid": "6cf2f968968fff04f96278a9288f5b34", "score": "0.54854506", "text": "public function update(Request $request, $id)\n {\n if ($this->checkRole()) {\n $product = Product::find($id);\n $product->brandName = $request->Input('brandName');\n $product->medicalName = $request->Input('medicalName');\n $product->price = $request->Input('price');\n $product->buying_price = $request->Input('buying_price');\n $product->reorder_level = $request->Input('reorder_level');\n if ($request->hasFile('image')) {\n $oldFilename = 'public/product_images/' . $product->image;\n $product->image = $this->filenameToStore($request);\n Storage::delete($oldFilename);\n }\n $product->save();\n $product->suppliers()->sync($request->suppliers);\n\n return redirect('/products')->with('success', 'Product Details Saved Successfully!');\n } else {\n return redirect()->route('home');\n }\n\n }", "title": "" }, { "docid": "317ca96a233f05a742b57399bd2b3542", "score": "0.548448", "text": "public function update(Request $r, $id)\n {\n $p = Product::find($id);\n $p->stock = $r->input('stock');\n $p->save();\n alert()->success('Success', 'Data successfully updated');\n return redirect()->route('emptyProduct.index');\n }", "title": "" }, { "docid": "57e8a233d0abf833c408dd0277ccd310", "score": "0.5484305", "text": "public function update($id)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n try {\n //Update \n $data2 = [\n 'slug' => request('slug'), \n 'title' => request('title'), \n 'status' => request('status'),\n 'description' => request('description'),\n 'user_id' => Auth::user()->id, \n ];\n\n $data = [\n 'pages' => request('pages'), \n 'body' => request('body'),\n ];\n\n $resource = Article::find($id);\n //var_dump($resource);\n $tags = [];\n\n //If new tags then create and add for sync\n foreach(json_decode(request('tags')) as $tagK => $tagV){\n if(!empty($tagV->create) && $tagV->create){\n if($tag = Tag::firstOrCreate([\n 'title' => $tagV->value,\n 'slug' => str_slug($tagV->value),\n ]))\n {\n $tag->resources()->sync($id);\n $tags[] = $tag->id;\n }\n }\n else {\n $tags[] = $tagV->value;\n }\n }\n\n if($resource->update($data) && $resource->resource->update($data2) && $resource->resource->tags()->sync($tags)) \n {\n return $this->respondSuccess('Successful edit.');\n }\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondError(null, ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "23ad4f3da087bda842fa1ac21c33815f", "score": "0.54825944", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->quantity = $request->quantity;\n\n $image = $request->file('image');\n if ($image) {\n if (File::exists($product->image)) {\n File::delete($product->image);\n }\n }\n\n $imagename = $image->getClientOriginalName();\n $imagesize = $image->getClientSize();\n $ext = $image->getClientOriginalExtension();\n\n $image_title = uniqid().time().'.'.$ext;\n $image->move('images/products/', $image_title);\n $product->image = \"images/products/\".$image_title;\n\n $product->save();\n\n session()->flash('success', 'Product updated successfully');\n return redirect()->route('supplier.home');\n }", "title": "" }, { "docid": "a01ea56f337a0cca2a7f8b0fb86e58d0", "score": "0.5479927", "text": "public function update(Request $request, $id)\n {\n\t\t$product = Product::find($id);\n\n\t\t$this->valid($request);\n\n\t\t$field = [\n\t\t\t'uuid',\n\t\t\t'name',\n\t\t\t'price',\n\t\t\t'description',\n\t\t];\n\n\t\tif ($request->product_photo) {\n\t\t\t$request->request->add([\n\t\t\t\t'rule' => [\n\t\t\t\t\t'product_photo' =>\n\t\t\t\t \t'required|image|mimes:jpeg,png,jpg|max:2048',\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$this->valid($request);\n\n\t\t\t$upload = $request->file('product_photo')->store('assets/img');\n\n\t\t\tif ($product->photo != '/assets/img/default.jpg') {\n\t\t\t\t@unlink(public_path().$product->photo);\n\t\t\t}\n\n\t\t\tarray_push($field, 'photo');\n\n\t\t\t$request->request->add([\n\t\t\t\t'photo' => '/'.$upload\n\t\t\t]);\n\t\t}\n\n\t\tProduct::where('id', $id)\n\t\t\t->update($request->only($field));\n\n\t\treturn redirect()->route('product.index')->with([\n\t\t\t'success' => 'Data Changed'\n\t\t]);\n }", "title": "" }, { "docid": "ba14e6d76f18913118873dc455ddf07e", "score": "0.54752797", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n //\n try {\n $originImage= $product->image;\n $product->fill($request->except(['category', 'supplier']));\n $product->image = $originImage;\n if ($request->image) {\n $oldImage = $product->image;\n $imageEncodeBase64 = $request->image;\n $postion = strpos($imageEncodeBase64, ';');\n $ext = explode('/', substr($imageEncodeBase64, 0, $postion))[1];\n $fileName = Str::uuid() . '.' . $ext;\n $filePath = public_path('storage/product') . '/' . $fileName;\n Image::make($imageEncodeBase64)->resize(200, 240)->save($filePath);\n $product->image = \"product/$fileName\";\n $filePath = public_path('storage/'.$oldImage);\n if(file_exists($filePath)){\n unlink($filePath);\n }\n }\n $product->save();\n return response()->success(new ProductResource($product));\n } catch (\\Throwable $ex) {\n return response()->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "cb574ee109ef0c4933aff2189613ba88", "score": "0.5467977", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (!$product) return new Response([\n 'result' => 'fail',\n 'message' => 'product not found'\n ]);\n\n $data = Input::all();\n\n foreach ($data as $key => $value) {\n if ($key === 'price') {\n $product->$key = $value*100;\n } else {\n $product->$key = $value;\n }\n }\n $product->save();\n return new Response(new ProductResource($product));\n }", "title": "" }, { "docid": "748d9e839dc1aa55917e22860bfd0666", "score": "0.546691", "text": "public function update(Request $request, $id, $parent = null)\n {\n extract($this->getResourceNames());\n\n if(!is_null($parent))\n {\n $item = $modelPath::findOrFail($parent);\n $parent = $this->parentModelPath::findOrFail($id);\n } else {\n $item = $modelPath::findOrFail($id);\n }\n\n $validated = $this->resolveRequest('Update')->validated();\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "47bbce92661ab4fdf29441a5eabbeea2", "score": "0.546329", "text": "public function update(Request $request, $id)\n {\n $update = Supplier::find($id);\n $update->name = $request->name;\n $update->slug = strtolower(str_replace(' ', '-',$request->name));\n $update->email = $request->email;\n $update->phone = $request->phone;\n $update->address = $request->address;\n $update->shop_name = $request->shop_name;\n\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $img = time() . '.'. $image->getClientOriginalExtension();\n $location = public_path('backend/assets/images/supplier/'.$img);\n Image::make($image)->resize(300,300)->save($location);\n $update->photo = $img;\n }\n $update->save();\n toast('Supplier Information Add Successfully','success');\n return redirect()->route('index.supplier');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5462037", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "e69ca8d6b4021523c67416bb5a8e3871", "score": "0.54620236", "text": "public function update($newpaht){}", "title": "" }, { "docid": "f684d143c5cb5e0fd840b77e6b10f6c8", "score": "0.5461201", "text": "public function update(Request $request, $id)\n { \n $product = Product::find($id);\n $product->name = $request->name;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->save();\n if($request->hasFile('image')){\n $file = $request->file('image');\n $name = time().'.jpg';\n $file->move(public_path('//images//'), $name);\n $image = Image::find($id);\n $image->path = '/images/'.$name;\n $image->save();\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product ,'image'=>$image,]);\n }\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product]);\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.5459952", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.5459952", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "6bbf67d9e29ef7e592b60af7e38a778c", "score": "0.5458404", "text": "public function update($resource, $attributes, $exec = false)\n {\n if (!$exec) {\n return $this->beforeUpdate($resource, $attributes);\n }\n\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->afterUpdate($resource, $attributes);\n });\n }", "title": "" }, { "docid": "dfb253684824fdc309f2bee7ce671811", "score": "0.5457697", "text": "public function update(Request $request, $id)\n {\n $imagenes=new Imagen();\n $imagenes=Imagen::findOrFail($id);\n $imagenes->descripcion=$request->input('descripcion');\n $imagenes->precio=$request->input('precio');\n $imagenes->categoria=$request->input('categoria');\n $foto=$request->file('foto');\n if($foto){\n $image_path=$foto->getClientOriginalName();\n Storage::disk('s3')->put($image_path,\\File::get($foto));\n $imagenes->foto=$image_path;\n }\n $imagenes->update();\n return redirect()->route('welcome');\n }", "title": "" }, { "docid": "6c0c4f37dc5881fde1e7b8d7f270ec97", "score": "0.54486126", "text": "public function update($id) {\n\n }", "title": "" }, { "docid": "f2d8cf4532904fd7bfbac2bd62a96a68", "score": "0.5447612", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n if ($request->hasFile('icon')) {\n $path = $request->icon->store('public/images');\n $input['icon'] = $path;\n }\n $block = FourBlock::find($id);\n $block->fill($input)->save();\n toastr()->success('Block has been updated successfully');\n return redirect()->route('fourblock.index');\n }", "title": "" }, { "docid": "24ebeddd4ada07f9b5b94ce822155042", "score": "0.54430884", "text": "public function update(Request $request, $id)\n {\n $product= Product::find($id);\n $this->authorize('update',$product);\n $product->fill($request->all());\n $product->save();\n return redirect('productos');\n }", "title": "" }, { "docid": "0073ba64b443f80ace8779c23d638758", "score": "0.5442894", "text": "public function update(StorePoductRequest $request, Product $product, $id)\n {\n $updated_datas = $request->except(['_method','_token']);\n $prod_to_update = Product::where('id',$id);\n $updated = $prod_to_update->update($updated_datas);\n if($prod_to_update){\n return redirect('/admin/products')->with('status', 'A termék sikeresen frissítve!');\n }\n\n }", "title": "" }, { "docid": "a3e811a8bb8418f3ddeffce2fb72454a", "score": "0.5440213", "text": "public function testUpdateEndpoint()\n {\n $product = factory(Product::class)->create();\n $data = $product->toArray();\n $data['name'] = \"{$product->name} 2\";\n $user = factory(User::class)->create();\n $user->assignRole('admin');\n\n $response = $this->actingAs($user)\n ->putJson(\n \"/api/admin/products/{$product->uuid}\",\n $data\n );\n $response->assertStatus(200);\n $response->assertJsonFragment([\n 'name' => $data['name'],\n 'uuid' => $product->uuid,\n ]);\n }", "title": "" }, { "docid": "2b54bef0cb09abd830d8673bfdd3df4e", "score": "0.54367185", "text": "public function update(ProductRequest $request, $id)\n {\n $inputs = $request->except(['_method', '_token']);\n if ($request->hasFile('poster')) {\n $poster = $request->file('poster');\n $new_name = uniqid(mb_strimwidth($poster->getClientOriginalName(), 0, 3, '_')) . '.' . $poster->getClientOriginalExtension();\n\n $img = Image::make($poster);\n $img->insert(public_path().'/images/watermark.png', 'center');\n $img->save(public_path() . '/images/' . $new_name);\n\n File::delete('images/' . $inputs['old_poster']);\n $inputs['poster'] = $new_name;\n unset($inputs['old_poster']);\n } else {\n $inputs['poster'] = $inputs['old_poster'] ?? null;\n unset($inputs['old_poster']);\n }\n if ($inputs['available'] === 'yes') {\n $inputs['available'] = 1;\n } else {\n $inputs['available'] = 0;\n }\n $update_product = Product::find($id);\n $update_product->fill($inputs);\n if ($update_product->update()) {\n return redirect()->route('product.index')->with('status', 'Product successfully updated !!!');\n }\n }", "title": "" }, { "docid": "f71584ef2ac9d0aab6b54094e7b315c4", "score": "0.54317683", "text": "public function update()\n {\n $this->executeActions(true);\n $this->saveData();\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "eaa583782a682873861569b9b98dc81c", "score": "0.5431416", "text": "public function updateEntity(Entity $entity);", "title": "" }, { "docid": "c46d525d33c8870edde305d0ee17d4ed", "score": "0.5431279", "text": "public function update(Request $request, $id)\n {\n\n\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'id_category' => 'required',\n 'strok' => 'required',\n 'img' => 'required|image|max:2044',\n\n ]);\n\n\n\n $product = Product::findOrFail($id);\n $product->fill($request->all());\n\n //pregunta si la imagen ya exite\n if ($request->hasFile('img')) {\n\n //elimina la imagen\n Storage::delete($product->img);\n\n $image = $request->file('img')->storeAs('public/img', $product->name . '2'.'.jpg');\n\n\n }\n\n $img = Storage::url($image);\n\n $rows = DB::table('products')\n ->where('id', $request->id)\n ->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'id_category' => $request->id_category,\n 'stock' => $request->stock,\n 'img' => $img,\n\n ]);\n return back()->with('mensaje', '¡Producto editado con exito!');\n }", "title": "" }, { "docid": "c0f0939bd5f8a0a097229e2d80aa0d31", "score": "0.54256433", "text": "public function update( $id, $name, $identifier );", "title": "" }, { "docid": "fd04bb969b17f620907a080e9e26f6ab", "score": "0.54223824", "text": "public function update(Request $request, $id)\n {\n //\n if($request->get('file') != '' ){\n $img = str_replace('data:image/jpeg;base64,','',$request->get('file'));\n $img = str_replace(' ','+',$img);\n echo file_put_contents(storage_path().$request->get('img_product'), base64_decode($img));\n } \n\n $product = Product::find($id); \n $product->name_product = $request->get('name_product');\n $product->cost_product = $request->get('cost_product');\n $product->price_product = $request->get('price_product');\n \n $product->save();\n return $product;\n\n }", "title": "" }, { "docid": "336bb2ab11980d312dc3ebdfdf92ee79", "score": "0.54195726", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'al_desc'=>'required|string',\n 'tr_desc'=>'required|string',\n 'stock'=>'required',\n 'age'=>'required',\n 'pur_price'=>'required',\n 'sale_price'=>'required',\n 'image' => 'required|image|max:2048',\n ]);\n\n $article = Articles::where('id', $id)\n ->first();\n\n $image_path = public_path(\"images/{$article->image}\");\n\n if (File::exists($image_path)) {\n unlink($image_path);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $image->move(public_path('images'), $filename);\n $article->image = $request->file('image')->getClientOriginalName();\n }\n\n $articleStock = $request->input('stock');\n $article->al_desc = $request->input('al_desc');\n $article->tr_desc = $request->input('tr_desc');\n $article->stock = $request->input('stock');\n $article->age=$request->input('age');\n $article->pur_price=$request->input('pur_price');\n $article->sale_price=$request->input('sale_price');\n $article->prime_stock +=$articleStock;\n $article->save();\n\n return redirect()->route('articles.index')->with('success','Article Updated Successfully');\n }", "title": "" }, { "docid": "9f31b47ab07ed8f7effea689ae758174", "score": "0.54191774", "text": "public function update()\n {\n $this->getDataBackend()->update();\n }", "title": "" }, { "docid": "9f4a5e931ad31bad773803c3dc4cda90", "score": "0.5417048", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')){\n\n $filename = $this->productImage($request->file('image'));\n \n }else{\n\n $recent = Product::findOrFail($id);\n $filename = $recent->image;\n }\n\n $product = new Product;\n Product::where('id', $id)->update($product->productData($request->toArray())+['status' => true, 'image' => $filename]);\n\n return redirect()->route('products.index')->with('success', 'product successfully updated');\n }", "title": "" }, { "docid": "b55b4c2da5ca8dec48b36986ba4711ee", "score": "0.54162306", "text": "public function update(Request $request, Product $product)\n\n {\n\n $input = $request->all();\n\n\n\n $validator = Validator::make($input, [\n\n 'name' => 'required',\n\n 'price' => 'required',\n\n 'stock' => 'required',\n\n 'shortDesc' => 'required',\n\n 'description' => 'required'\n\n ]);\n\n\n\n\n\n if($validator->fails()){\n\n return $this->sendError('Validation Error.', $validator->errors());\n\n }\n\n\n\n $product->name = $input['name'];\n\n $product->price = $input['price'];\n\n $product->stock = $input['stock'];\n\n $product->shortDesc = $input['shortDesc'];\n\n $product->description = $input['description'];\n\n\n\n $product->save();\n\n\n\n return $this->sendResponse(new ProductResource($product), 'Product updated successfully.');\n\n }", "title": "" }, { "docid": "fa4d35fe272f742ecbc45d6ae01985ba", "score": "0.5412952", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(),[\n 'name' => 'required|string|max:255',\n 'user_id' => 'required|exists:App\\Models\\User,id',\n 'category_id' => 'required|exists:App\\Models\\Category,id',\n 'description' => 'required',\n 'price' => 'required',\n 'photo' => 'image'\n\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()); \n }\n \n $product = Product::find($id);\n $product -> name = $request['name'];\n $product -> user_id = $request['user_id'];\n $product -> category_id = $request['category_id'];\n $product -> description = $request['description'];\n $product -> price = $request['price'];\n\n if($request->hasFile('photo')){\n if(File::exists(public_path(\"storage/\").$product -> photo)){\n File::delete(public_path(\"storage/\").$product -> photo);\n }\n $product -> photo=$request->photo->store('photo');\n }\n\n $product -> save();\n\n return response()\n ->json(['success' => 1,'message' => 'Updated succesfully!']);\n }", "title": "" }, { "docid": "daa5dabd0608fa1791ffe3d1866a3e16", "score": "0.5410799", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n \n $product = $this->repository->find($id);\n if(!$product){\n return redirect()->back();\n }\n\n $data = $request->all();\n\n // Upload de Imagem \n if($request->hasFile('image') && $request->image->isValid()){\n\n /** Verifica se o arquivo existe */\n if($product->image && Storage::exists($product->image)){\n /** Deleta o arquivo */\n Storage::delete($product->image);\n }\n // Salvando imagem e passando o caminho da imagem\n $imagePath = $request->image->store('products');\n\n // Passando o nome da imagem para armazenar no banco\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "89da7206a99a87abc155c6008d48f6f4", "score": "0.5410342", "text": "public function _update() {\n\t\t$this->_data['_rev'] = $this->_adapter->save($this, Zend_Http_Client::PUT);\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "8cc682b417e81303d02cf6c27cfcadc5", "score": "0.54102427", "text": "public function update(Request $request, $id)\n {\n $prds = Product::find($id);\n $prds->nombre = $request->input('nombre');\n if ($request->hasFile('foto')) {\n $file = time().'.'.$request->foto->extension();\n $request->foto->move(public_path('imgs'), $file);\n $prds->foto = \"imgs/\".$file;\n }\n $prds->directory_id = $request->input('directory_id');\n if($prds->save()) {\n return redirect('directories')\n ->with('status', 'La Noticia '.$prds->nombre.' se modifico con Exito!');\n }\n }", "title": "" }, { "docid": "a44c6c541eae25f18bc1eedd4d260d74", "score": "0.54096884", "text": "public function update($name, $object)\n {\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5404725", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5404725", "text": "public function update($id)\n {\n \n }", "title": "" } ]
221654b588a2ea5464428225dc6a8905
/ This software is released under the BSD license. Full text at project root > license.txt
[ { "docid": "887159322747b4acae2f2926edd98f88", "score": "0.0", "text": "function call($controller_name,$action_and_format,$params=null)\n{\n $tokens = explode(\".\",$action_and_format);\n $token_count = count($tokens);\n\n switch ($token_count)\n {\n case 1: return CallStack::call($controller_name,$tokens[0],\"rawp\",$params);\n case 2: return CallStack::call($controller_name,$tokens[0],$tokens[1],$params);\n default : throw new InvalidParameterException(\"Nome della action non valido!! : \".$action_and_format);\n }\n}", "title": "" } ]
[ { "docid": "953c81197f343c2286f85fe8b3a6e7a6", "score": "0.5784722", "text": "function copyright() {\n global $progname, $version;\n print <<<EOF\n\nCopyright (c) 2008 Gary Danko ([email protected])\n 2012 Nagios Enterprises - Nicholas Scott ([email protected])\n 2017 Nagios Enterprises - Jake Omann ([email protected])\n\nEOF;\n}", "title": "" }, { "docid": "37c1bf7f1ef9b3a953070fea387d9caf", "score": "0.55136365", "text": "protected function getLicense()\n {\n return '\n/**\n * phpDocumentor\n *\n * PHP Version 5.3\n *\n * @author Mike van Riel <[email protected]>\n * @copyright 2010-2012 Mike van Riel / Naenius (http://www.naenius.com)\n * @license http://www.opensource.org/licenses/mit-license.php MIT\n * @link http://phpdoc.org\n */';\n }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5421873", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5421873", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5421873", "text": "final private function __construct() {}", "title": "" }, { "docid": "407b096ffb0ab426f1ce3d2e18bceeb1", "score": "0.5418323", "text": "public function expel();", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.54158163", "text": "final private function __construct() { }", "title": "" }, { "docid": "5b60718847328e380135af0eb019cd80", "score": "0.54009163", "text": "abstract public function version();", "title": "" }, { "docid": "95ea0155da839f496eefd8bbd4200e5d", "score": "0.5391206", "text": "private function privf() {}", "title": "" }, { "docid": "95ea0155da839f496eefd8bbd4200e5d", "score": "0.5391206", "text": "private function privf() {}", "title": "" }, { "docid": "0ed54e066b86ce92f49738b4a19a12e4", "score": "0.5357383", "text": "function hg30_2W_CaCH6qtLGIcvZ()\n{\n \n}", "title": "" }, { "docid": "743671d0f33d2416f453d6919e593740", "score": "0.5337201", "text": "public function get_licence()\n {\n return 'BSD-like licence';\n }", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5336078", "text": "private function __construct () {}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5336078", "text": "private function __construct () {}", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.5291072", "text": "private final function __construct() {}", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.5291072", "text": "private final function __construct() {}", "title": "" }, { "docid": "e0cf128627bcbeb14cef8c5dbe48444e", "score": "0.52756095", "text": "private final function __construct() { }", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.52743", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "e5b891adc0ef39a1b3ff15e107eabc45", "score": "0.5261836", "text": "public function main()\n {\n }", "title": "" }, { "docid": "fb608361ec2f9bcc7857948154751a50", "score": "0.52415705", "text": "private function __construct()\n\t{\t\t\n\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.52343", "text": "private function __construct() {}", "title": "" }, { "docid": "1fcb64fe81e757e54d656e1c10d109be", "score": "0.5219339", "text": "function get_copyright()\n{\n return '<span class=\"copyright\">Powered by <a class=\"copyright\" href=\"http://www.frogsystem.de/\" target=\"_blank\">Frogsystem&nbsp;2</a> &copy; 2007 - ' . date('Y') . ' Frogsystem-Team</span>';\n}", "title": "" }, { "docid": "2886e4e2f013542d31d0758dbb99d5f2", "score": "0.5213777", "text": "function isPoolable(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.51973504", "text": "private function __construct() { }", "title": "" }, { "docid": "5d0d43bc5a256bc4d77305a246eea96b", "score": "0.51961774", "text": "public function __init() {}", "title": "" }, { "docid": "cb757f486e3a938ad0776a367a48c50f", "score": "0.51900196", "text": "private function test() {\n\t}", "title": "" }, { "docid": "c542e1e5e514f692240370153fe5431f", "score": "0.5180071", "text": "private function __construct() {\n\n \t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.51680154", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.51680154", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.5167588", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.5167588", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.5167588", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "e604ffabb18dce83ee0f86419a830df1", "score": "0.5167378", "text": "final private function __construct()\n {\n }", "title": "" }, { "docid": "e604ffabb18dce83ee0f86419a830df1", "score": "0.5167378", "text": "final private function __construct()\n {\n }", "title": "" } ]
d8099b6b25d2c702c3510e38b01cbffe
Renews the authorization for the given payment. Only authorizations for payments in the 'authorization' state can be renewed.
[ { "docid": "c08cbec1959b4964ad3d40c96dbe87d9", "score": "0.7232772", "text": "public function renewAuthorization(PaymentInterface $payment) {\n if ($payment->getState()->value != 'authorization') {\n throw new \\InvalidArgumentException($this->t('Only authorizations for payments in the \"authorization\" state can be renewed.'));\n }\n\n $passphrase = new Passphrase($this->configuration['sha_in']);\n $sha_algorithm = new HashAlgorithm($this->configuration['sha_algorithm']);\n $shaComposer = new AllParametersShaComposer($passphrase, $sha_algorithm);\n\n $directLinkRequest = new DirectLinkMaintenanceRequest($shaComposer);\n\n $directLinkRequest->setPspid($this->configuration['pspid']);\n $directLinkRequest->setUserId($this->configuration['userid']);\n $directLinkRequest->setPassword($this->configuration['password']);\n $directLinkRequest->setPayId($payment->getRemoteId());\n\n $operation = MaintenanceOperation::OPERATION_AUTHORISATION_RENEW;\n $directLinkRequest->setOperation(new MaintenanceOperation($operation));\n\n $directLinkRequest->validate();\n\n // We cannot use magic set method to AbstractRequest::__call the SHASIGN\n // value (as it is not on the list of Ogone fields), so let's get all\n // already set parameters, and add SHASIGN to them here.\n $body = $directLinkRequest->toArray();\n $body['SHASIGN'] = $directLinkRequest->getShaSign();\n\n // Log the request message if request logging is enabled.\n if (!empty($this->configuration['api_logging']['request'])) {\n \\Drupal::logger('commerce_ingenico')\n ->debug('DirectLink renew authorization request: @url <pre>@body</pre>', [\n '@url' => $this->getOgoneUri($directLinkRequest),\n '@body' => var_export($body, TRUE),\n ]);\n }\n\n // Perform the request to Ingenico API.\n $options = [\n 'form_params' => $body,\n ];\n $response = $this->httpClient->post($this->getOgoneUri($directLinkRequest), $options);\n\n // Log the response message if request logging is enabled.\n if (!empty($this->configuration['api_logging']['response'])) {\n \\Drupal::logger('commerce_ingenico')\n ->debug('DirectLink renew authorization response: <pre>@body</pre>', [\n '@body' => (string) $response->getBody(),\n ]);\n }\n\n // Validate the API response.\n if ($response->getStatusCode() != 200) {\n throw new InvalidResponseException($this->t('The request returned with error code @http_code.', ['@http_code' => $response->getStatusCode()]));\n }\n elseif (!$response->getBody()) {\n throw new InvalidResponseException($this->t('The response did not have a body.'));\n }\n\n $directLinkResponse = new DirectLinkMaintenanceResponse($response->getBody());\n if (!$directLinkResponse->isSuccessful()) {\n throw new DeclineException($this->t('Transaction has been declined by the gateway (@error_code).', [\n '@error_code' => $directLinkResponse->getParam('NCERROR'),\n ]), $directLinkResponse->getParam('NCERROR'));\n }\n\n $payment->setRemoteState($directLinkResponse->getParam('STATUS'));\n $payment->save();\n }", "title": "" } ]
[ { "docid": "7c09a810c20522b6efb2bc420d238816", "score": "0.6433812", "text": "public function renewAuthorization();", "title": "" }, { "docid": "6968d08e1b555a6363ea42c0da283956", "score": "0.5171768", "text": "function adext_payment_completed_renew( WP_Post $payment ) {\r\n\r\n if( get_post_meta( $payment->ID, \"_adverts_payment_type\", true ) != \"adverts-renewal\" ) {\r\n return;\r\n }\r\n\r\n $object_id = get_post_meta( $payment->ID, \"_adverts_object_id\", true );\r\n \r\n $post_date = current_time('mysql');\r\n $post_date_gmt = current_time('mysql', 1);\r\n \r\n $meta = maybe_unserialize( get_post_meta( $payment->ID, \"_adverts_payment_meta\", true ) );\r\n \r\n if(isset($meta[\"pricing\"][\"visible\"])) {\r\n $visible = $meta[\"pricing\"][\"visible\"];\r\n } else {\r\n $visible = 0;\r\n }\r\n \r\n $expires = get_post_meta( $object_id, \"_expiration_date\", true );\r\n\r\n if( $expires ) {\r\n \r\n // Udpdate expiration date if the Ad expires\r\n if( $expires > current_time('timestamp') ) {\r\n $publish = date( \"Y-m-d H:i:s\", $expires );\r\n } else {\r\n $publish = $post_date;\r\n }\r\n\r\n if( $visible > 0) {\r\n $expiry = strtotime( $publish . \" +$visible DAYS\" );\r\n update_post_meta( $object_id, \"_expiration_date\", $expiry );\r\n } else {\r\n delete_post_meta( $object_id, \"_expiration_date\" );\r\n }\r\n }\r\n \r\n /* @todo add activity log */\r\n \r\n wp_update_post( array(\r\n \"ID\" => $object_id,\r\n \"post_status\" => \"publish\",\r\n 'post_date' => $post_date,\r\n 'post_date_gmt' => $post_date_gmt\r\n ) );\r\n}", "title": "" }, { "docid": "cf72574827ce026132a4afc4a855832f", "score": "0.49976802", "text": "public function updated(PurchasePayment $purchasePayment)\n {\n //\n }", "title": "" }, { "docid": "c4f6921367953f26e8a5c9db3abb459f", "score": "0.49923977", "text": "function autorizePayment() {\n \n self::setState(GopayHelper::AUTHORIZED);\n\t\t\n }", "title": "" }, { "docid": "6aea9258e57c9cced547fdcb14c3d5e0", "score": "0.4933067", "text": "public function authorize($payment)\n {\n $order = $payment->getOrder();\n\n /** @var Mage_Sales_Model_Service_Order $serviceOrder */\n $serviceOrder = Mage::getModel('sales/service_order', $order);\n $invoice = $serviceOrder->prepareInvoice();\n $invoice->register();\n\n $this->_saveTransactionWithAddedInvoice($invoice);\n\n return $this;\n }", "title": "" }, { "docid": "26f5643e47e0af9bfe550f1355bc17de", "score": "0.49192268", "text": "public function rebate($payment, $amount, $comments);", "title": "" }, { "docid": "387d90848b588df325cfa64db422d3c1", "score": "0.4830543", "text": "public function updated(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "fb702db1414c033c4c0655821cbf0ff8", "score": "0.4814958", "text": "public function update_failing_payment_method( $subscription, $renewal_order ) {\n\t\tupdate_post_meta( is_callable( array( $subscription, 'get_id' ) ) ? $subscription->get_id() : $subscription->id, '_ppec_billing_agreement_id', $renewal_order->ppec_billing_agreement_id );\n\t}", "title": "" }, { "docid": "ecf69af6c8043f1d252beecf8351d583", "score": "0.48147765", "text": "public function updatePayment(PaymentInterface $payment);", "title": "" }, { "docid": "942033b622bb175792fac96a8e71ceeb", "score": "0.47832024", "text": "public static function status_update( Pronamic_Pay_Payment $payment ) {\n\t\t$source_id = $payment->get_source_id();\n\n\t\t$data = new Pronamic_WP_Pay_Extensions_EDD_PaymentData( $source_id, array() );\n\n\t\t// Only update if order is not completed\n\t\t$should_update = edd_get_payment_status( $source_id ) !== Pronamic_WP_Pay_Extensions_EDD_EasyDigitalDownloads::ORDER_STATUS_PUBLISH;\n\n\t\tif ( $should_update ) {\n\t\t\tswitch ( $payment->get_status() ) {\n\t\t\t\tcase Pronamic_WP_Pay_Statuses::CANCELLED :\n\t\t\t\t\t// Nothing to do?\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Pronamic_WP_Pay_Statuses::EXPIRED :\n\t\t\t\t\tedd_update_payment_status( $source_id, Pronamic_WP_Pay_Extensions_EDD_EasyDigitalDownloads::ORDER_STATUS_ABANDONED );\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Pronamic_WP_Pay_Statuses::FAILURE :\n\t\t\t\t\tedd_update_payment_status( $source_id, Pronamic_WP_Pay_Extensions_EDD_EasyDigitalDownloads::ORDER_STATUS_FAILED );\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Pronamic_WP_Pay_Statuses::SUCCESS :\n\t\t\t\t\tedd_insert_payment_note( $source_id, __( 'Payment completed.', 'pronamic_ideal' ) );\n\n\t\t\t\t\t/*\n\t\t\t\t\t * @see https://github.com/easydigitaldownloads/Easy-Digital-Downloads/blob/2.2.8/includes/admin/payments/view-order-details.php#L36\n\t\t\t\t\t * @see https://github.com/easydigitaldownloads/Easy-Digital-Downloads/blob/2.2.8/includes/admin/payments/view-order-details.php#L199-L206\n\t\t\t\t\t * @see https://github.com/easydigitaldownloads/Easy-Digital-Downloads/blob/2.2.8/includes/payments/functions.php#L1312-L1332\n\t\t\t\t\t * @see https://github.com/easydigitaldownloads/Easy-Digital-Downloads/blob/2.2.8/includes/gateways/paypal-standard.php#L555-L576\n\t\t\t\t\t */\n\t\t\t\t\tedd_update_payment_status( $source_id, Pronamic_WP_Pay_Extensions_EDD_EasyDigitalDownloads::ORDER_STATUS_PUBLISH );\n\n\t\t\t\t\tedd_empty_cart();\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Pronamic_WP_Pay_Statuses::OPEN :\n\t\t\t\t\tedd_insert_payment_note( $source_id, __( 'Payment open.', 'pronamic_ideal' ) );\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tedd_insert_payment_note( $source_id, __( 'Payment unknown.', 'pronamic_ideal' ) );\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8eae606f9851a0a77cad84f5576ec0c7", "score": "0.47645524", "text": "function refundPayment() {\n \n self::setState(GopayHelper::REFUNDED);\n\t\t\n }", "title": "" }, { "docid": "6df75d0115780cb8bf3770ce0106f314", "score": "0.46985328", "text": "public function authorize(Varien_Object $payment, $amount)\n {\n if ($amount <= 0) {\n Mage::throwException(Mage::helper($this->_code)->__('Invalid amount for authorization.'));\n }\n\n $data = $this->_doSale($payment);\n\n $payment->setTransactionId($data['confirmation'])\n ->setAdditionalInformation(serialize($data))\n ->setIsTransactionClosed(false);\n\n return $this;\n }", "title": "" }, { "docid": "24b59b06f20045e5716b8ba7ed43088f", "score": "0.46111", "text": "private function updateOrderStatus($payment)\n {\n switch($payment->getStatus())\n {\n case QuickPayPayment::PAYMENT_FULLY_AUTHORIZED:\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_RESERVED);\n break;\n case QuickPayPayment::PAYMENT_PARTLY_CAPTURED:\n case QuickPayPayment::PAYMENT_FULLY_CAPTURED:\n $order = $payment->getOrder();\n if($payment->getAmountCaptured() >= $order->getInvoiceAmount())\n {\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_COMPLETELY_PAID);\n if(empty($order->getClearedDate()))\n {\n $order->setClearedDate(new DateTime());\n Shopware()->Models()->flush($order);\n }\n }\n else\n {\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_PARTIALLY_PAID);\n }\n break;\n case QuickPayPayment::PAYMENT_CANCELLED:\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_THE_PROCESS_HAS_BEEN_CANCELLED);\n break;\n case QuickPayPayment::PAYMENT_FULLY_REFUNDED:\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_THE_PROCESS_HAS_BEEN_CANCELLED);\n break;\n case QuickPayPayment::PAYMENT_INVALIDATED:\n $this->savePaymentStatus($payment->getOrderId(), $payment->getId(), Status::PAYMENT_STATE_REVIEW_NECESSARY);\n break;\n }\n }", "title": "" }, { "docid": "f1b4f8bbecebc5407548efac1fc8cdeb", "score": "0.45917732", "text": "public static function trigger_renewal_payment_complete( $order_id ) {\n\t\tif ( self::is_renewal( $order_id ) ) {\n\t\t\tdo_action( 'woocommerce_renewal_order_payment_complete', $order_id );\n\t\t}\n\t}", "title": "" }, { "docid": "5b1572e0803b7b45462ebc34a25e0a78", "score": "0.45846897", "text": "public function edit(Payment $payment)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "08be6b98b7729244d8a15f0cf5a58b47", "score": "0.45818174", "text": "protected function renewAccessToken()\n {\n // set some params\n $formParams = [\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->apiClientId,\n 'client_secret' => $this->apiSecret,\n 'refresh_token' => $this->credentials->refresh_token,\n ];\n\n // run the query\n $auth = $this->oauthRequest($formParams);\n\n // set refreshed flag to true, we can't refresh again...\n $auth->created_at = time();\n $auth->refreshed = true;\n\n // use the response vars as the new creds\n $this->credentials = $auth;\n\n return $this;\n }", "title": "" }, { "docid": "e347ef07b50223fb7238fd564e258f6a", "score": "0.4579516", "text": "public function restored(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "6071a4320ac1a7012756f0f80c0060c8", "score": "0.45640874", "text": "public function reschedulePayment($paymentID, $date)\n {\n return $this->api->request('POST', '/2.0/subscription/payments_reschedule', [\n 'payment_id' => (int) $paymentID,\n 'date' => (string) $date\n ]);\n }", "title": "" }, { "docid": "b4a2d59ad2cfb786b01ab24b8446dc2c", "score": "0.45485353", "text": "public function restored(PurchasePayment $purchasePayment)\n {\n //\n }", "title": "" }, { "docid": "90529ff8519afe715516eb0a809f025f", "score": "0.45475292", "text": "public function update(Payment $payment, $operation)\n {\n if (!auth()->user()->can('payment confirm')) {\n abort(403);\n }\n\n if ($operation == 'successful') {\n $payment->is_success = 'successful';\n } else {\n $payment->is_success = 'unsuccessful';\n }\n $payment->save();\n\n return redirect()->route('payment.waiting');\n\n }", "title": "" }, { "docid": "cd234d3c9c86927bf6531185f53f55cb", "score": "0.454167", "text": "public function releasePayment($payment, $comments);", "title": "" }, { "docid": "a50ea3d290584524628cf2d8be45fd5b", "score": "0.45257112", "text": "public static function status_update( Pronamic_Pay_Payment $payment ) {\n\t\t$donation_id = $payment->get_source_id();\n\n\t\t$donation = new Charitable_Donation( $donation_id );\n\n\t\tswitch ( $payment->get_status() ) {\n\t\t\tcase Pronamic_WP_Pay_Statuses::CANCELLED :\n\t\t\t\t$donation->update_status( 'charitable-cancelled' );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::EXPIRED :\n\t\t\t\t$donation->update_status( 'charitable-failed' );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::FAILURE :\n\t\t\t\t$donation->update_status( 'charitable-failed' );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::SUCCESS :\n\t\t\t\t$donation->update_status( 'charitable-completed' );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::OPEN :\n\t\t\tdefault:\n\t\t\t\t$donation->update_status( 'charitable-pending' );\n\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "760ce120346039ca9a5c407023bbd63a", "score": "0.45130572", "text": "public function edit(Payment $payment)\n {\n if (auth()->user()->type === 'admin') {\n return response()->json([\n 'status' => 'ok',\n 'data' => new PaymentCollection($payment)\n ]);\n }\n else{\n return response()->json([\n 'status'=>'Error',\n 'massage'=>'شما دسترسی ندارید'\n ],403);\n }\n }", "title": "" }, { "docid": "5eca9f4c66c6b27b3168589729a9ed87", "score": "0.45074734", "text": "public function update_status( Pronamic_Pay_Payment $payment ) {\n\t\t$result = $this->client->get_status( $payment->get_transaction_id() );\n\n\t\t$error = $this->client->get_error();\n\n\t\tif ( is_wp_error( $error ) ) {\n\t\t\t$this->set_error( $error );\n\t\t} else {\n\t\t\t$transaction = $result->transaction;\n\n\t\t\t$payment->set_status( $transaction->get_status() );\n\t\t\t$payment->set_consumer_name( $transaction->get_consumer_name() );\n\t\t\t$payment->set_consumer_iban( $transaction->get_consumer_iban() );\n\t\t\t$payment->set_consumer_bic( $transaction->get_consumer_bic() );\n\t\t}\n\t}", "title": "" }, { "docid": "0c58f51650748e968e43d0316c85154b", "score": "0.4484106", "text": "public function applePayAuthorization(array $paymentData): array\n {\n $this->isPurchase = false;\n\n return $this->doCallApsWithApplePay($paymentData);\n }", "title": "" }, { "docid": "d2417e64738f28f060304c7a9f629cc0", "score": "0.44718567", "text": "public function updated(Repayment $repayment)\n {\n $loan = $repayment->loan;\n\n if ($repayment->week == $loan->duration) {\n $loan->status = Loan::STATUS_PAID;\n $loan->save();\n }\n }", "title": "" }, { "docid": "b12bd51f3a0da2eeb33f0acb4cba0784", "score": "0.44309664", "text": "public function renew(){\n\t$account_id = $this->input->post('account_id');\n\t$term = $this->input->post('term');\n\t$userid = $this->userobj->userid;\n\t$role = $this->userobj->role;\n\t$name = $this->userobj->name;\n\n\tif($role != 'admin') {\n\t $data['error'] = '<br><h1 style=\"text-align: center;\">Sorry, '.$name.'\n\t <br>You Don\\'t Have The Right to Modify This Account.</h1>';\n\t $data['page_title'] = 'Account Renew Error';\n\t $this->load_view('errors/generic_error',$data);\n\t return;\n\t}\n\t\n\t// set the new expire date based on the old one\n\t$accountInfo = $this->account_model->get_account_info($account_id);\n\t$expire_date = $accountInfo['expire_date'];\n\t$expire_date = $this->get_expire_date($expire_date, '', $term);\n\n\t// update the database now\n\t$this->account_model->renew_account($expire_date,$term,$account_id);\n\n\t// update the initiation file now\n\t$props = array(\n\t 'lis.expire' => $expire_date,\n\t);\n\t$this->admin_filemanager->modify_initiation_file($account_id, $props);\n\n\tredirect('admin/accounts/edit'.$account_id);\n }", "title": "" }, { "docid": "11f746f744e10e4eb2eeab1a43bdc50d", "score": "0.4425874", "text": "function setRenew($renew) {\n $this->renew = $renew;\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "60f100ea3872c97cb7548ee19be09eed", "score": "0.44213164", "text": "public function edit(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "acbe8a28bb039a6f535b4987f3fa11c2", "score": "0.43971294", "text": "public function approvePayment(): void\n {\n $this->paidOn = new \\DateTime();\n $this->status = self::PAID_STATUS;\n }", "title": "" }, { "docid": "18d44821ae79cc73f4131e2c226477f3", "score": "0.4396071", "text": "public function update(PaymentRequest $request, Payment $payment)\n {\n $this->paymentRepositoryInterface->updatePayment($request, $payment);\n return redirect(adminRedirectRoute('payment'))->withInfo('Payment Updated Successfully.');\n }", "title": "" }, { "docid": "e1e272bfa1f6e22fe60644fd83e60b4a", "score": "0.43921086", "text": "public function update(PaymentRequest $request, $payment=null)\n {\n \n }", "title": "" }, { "docid": "60ff43d757e1664588f49b658f664735", "score": "0.4388869", "text": "public function reactivate()\n {\n $this->account_status = self::ACC_STATUS_APPROVED;\n }", "title": "" }, { "docid": "006dd41c967153d152fc3c1e479fa18a", "score": "0.43847087", "text": "public function setPayment(\n $lpaId,\n Payment $payment\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'payment', $this);\n return $helper->setResource($payment->toJson());\n }", "title": "" }, { "docid": "c694b840085c479cdee98090510a0334", "score": "0.43600324", "text": "protected function handleResponse($payment)\n {\n $api = $this->getApiContext();\n\n $connnect = (new \\Billplz\\Connect($api->api_key))->detectMode();\n $billplz = new \\Billplz\\API($connnect);\n\n list($rheader, $rbody) = $billplz->toArray($billplz->getBill($payment['id']));\n\n if ($rbody['paid']) {\n $old = $this->helper->order->getStatus($rbody['reference_2']);\n $status = static::STATUS_APPROVED;\n $message = 'Payment Successfull';\n $data = $payment;\n } else {\n $status = static::STATUS_PENDING;\n $message = 'Payment Unsuccessfull';\n }\n\n if ($rbody['paid']) {\n if ($old->status === '3') {\n echo 'Payment status updated...';\n } else {\n $this->saveResponse($rheader, $rbody['state'], $message, json_encode($payment), $rbody['id'], $status, $payment['type']);\n if ($payment['type'] === 'callback' && strval($this->getState('id')) === $rbody['reference_1']) {\n $this->helper->order->setStatusByType('order', 'approved', $rbody['reference_2'], '', true, true, 'Payment Approved by '.$payment['type']);\n }\n }\n } else {\n $this->saveResponse($rheader, $rbody['state'], $message, json_encode($payment), $rbody['id'], $status, $payment['type']);\n }\n\n /*\n if (!$rbody['paid'] && $payment['type']==='redirect') {\n $this->app->redirect(JRoute::_('index.php?option=com_sellacious&view=order&id=' . $rbody['reference_2'] . '&layout=cancelled', false));\n exit;\n }\n $config = $this->getParams();\n */\n \n return $status == static::STATUS_APPROVED;\n }", "title": "" }, { "docid": "0f6fec0e76b5880f6f83cee7208cae81", "score": "0.43450516", "text": "public function renew(){ }", "title": "" }, { "docid": "434a473c2aad72663e326e1e5fff4ce2", "score": "0.43449295", "text": "public function authorize(Varien_Object $payment, $amount)\n {\n return $this->_authorize($payment, $amount);\n }", "title": "" }, { "docid": "aea8ef0b2201b542b6bb32fae5ddbe2b", "score": "0.43448922", "text": "public function cancel(Varien_Object $payment) {\r\n\r\n parent::void($payment);\r\n $this->getService()->void($payment);\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "1d9b14d3be3859d8805c86218900a75d", "score": "0.43440002", "text": "public function refund(Varien_Object $payment, $amount)\n {\n Mage::log('Refund transaction for order #' . $payment->getOrder()->getIncrementId());\n\n try {\n $this->getHelper()->initClient($this->getCode());\n\n $this->getHelper()->setTokenByPaymentTransaction($payment);\n\n $capture = $payment->lookupTransaction(null, Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);\n\n /* Refund Transaction is only possible, when Capture Transaction Exists */\n if (!isset($capture) || $capture === false) {\n Mage::log('Refund transaction for order #' . $payment->getOrder()->getIncrementId() . ' could not be completed! (No Capture Transaction Exists');\n return $this; \n }\n \n $reference_id = $capture->getTxnId();\n\n $genesis = new \\Genesis\\Genesis('Financial\\Refund');\n\n $genesis\n ->request()\n ->setTransactionId(\n $this->getHelper()->genTransactionId(\n $payment->getOrder()->getIncrementId()\n )\n )\n ->setRemoteIp(\n $this->getHelper('core/http')->getRemoteAddr(false)\n )\n ->setReferenceId(\n $reference_id\n )\n ->setCurrency(\n $payment->getOrder()->getBaseCurrencyCode()\n )\n ->setAmount($amount);\n\n $genesis->execute();\n\n $payment\n ->setTransactionId(\n $genesis->response()->getResponseObject()->unique_id\n )\n ->setParentTransactionId(\n $reference_id\n )\n ->setShouldCloseParentTransaction(\n true\n )\n ->resetTransactionAdditionalInfo(\n\n )\n ->setTransactionAdditionalInfo(\n array(\n Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS => $this->getHelper()->getArrayFromGatewayResponse(\n $genesis->response()->getResponseObject()\n )\n ),\n null\n );\n\n $payment->save();\n } catch (Exception $exception) {\n Mage::logException($exception);\n\n Mage::throwException(\n $exception->getMessage()\n );\n }\n\n return $this;\n }", "title": "" }, { "docid": "268f714820b17469c17547d9347e21e8", "score": "0.43423608", "text": "public function edit(RefPayment $refPayment)\n {\n //\n }", "title": "" }, { "docid": "85793456374edc40e59e9635b8684a99", "score": "0.43370646", "text": "public function authorize(Varien_Object $payment, $amount) {\r\n parent::authorize($payment, $amount);\r\n $this->getService()->authorize($payment, $amount);\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "a8e6500c9816f8e5fd3749172f2da4a1", "score": "0.43166542", "text": "public function status_update( Payment $payment, $can_redirect = false ) {\n\t\t$merchant = new Gateway( $payment->get_source_id() );\n\n\t\tswitch ( $payment->status ) {\n\t\t\tcase PaymentStatus::CANCELLED:\n\t\t\t\t$merchant->set_purchase_processed_by_purchid( WPeCommerce::PURCHASE_STATUS_INCOMPLETE_SALE );\n\n\t\t\t\tbreak;\n\t\t\tcase PaymentStatus::SUCCESS:\n\t\t\t\t/*\n\t\t\t\t * Transactions results\n\t\t\t\t *\n\t\t\t\t * @link https://github.com/wp-e-commerce/WP-e-Commerce/blob/v3.8.9.5/wpsc-merchants/paypal-pro.merchant.php#L303\n\t\t\t\t */\n\t\t\t\t$session_id = $payment->get_meta( 'wpsc_session_id' );\n\n\t\t\t\ttransaction_results( $session_id );\n\n\t\t\t\t$merchant->set_purchase_processed_by_purchid( WPeCommerce::PURCHASE_STATUS_ACCEPTED_PAYMENT );\n\n\t\t\t\tbreak;\n\t\t\tcase PaymentStatus::EXPIRED:\n\t\t\tcase PaymentStatus::FAILURE:\n\t\t\tcase PaymentStatus::OPEN:\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1e6a0069aab6c6e15a2608b68cefc741", "score": "0.4312508", "text": "function renew_region()\r\n{\r\n global $app, $grid, $region, $order_status;\r\n require_once('region.class.php');\r\n require_once('payment.class.php');\r\n\r\n // retrieve the payment\r\n $tbl_payment = new Payment;\r\n $payment = $tbl_payment->get($_SESSION['payment_id']);\r\n\r\n // renew the region\r\n\r\n // set the expiration-related dates if necessary\r\n $expires_at = strtotime(param('new_expires_at'));\r\n $region->expires_at = Util::epoch_to_datetime($expires_at);\r\n if ($grid->reminder_days > 0)\r\n $region->reminder_at = Util::epoch_to_datetime($expires_at - $grid->reminder_days * 86400);\r\n else\r\n $region->reminder_at = Util::empty_datetime();\r\n if ($grid->purge_days > 0)\r\n $region->purge_at = Util::epoch_to_datetime($expires_at + $grid->purge_days * 86400);\r\n else\r\n $region->purge_at = Util::empty_datetime();\r\n\r\n // upon renewal, region is marked active if it was expired.\r\n if ($region->status == REGION_EXPIRED)\r\n $region->status = REGION_ACTIVE;\r\n\r\n // save region and mark grid dirty\r\n $region->save();\r\n $grid->is_dirty = 1;\r\n $grid->save();\r\n\r\n // link the payment to the region\r\n $payment->region_id = param('region_id');\r\n $payment->email = param('email');\r\n $payment->amount = param('amount');\r\n $payment->drawing_id = param('drawing_id')?param('drawing_id'):0;\r\n $payment->save();\r\n\r\n // this payment is now finished\r\n unset($_SESSION['payment_id']);\r\n}", "title": "" }, { "docid": "4e155ffd9937c4adc9f7bfcac1c55a28", "score": "0.4288538", "text": "protected function _authorise3d($payment)\n\t{\n\t\ttry {\n\t\t\t$response = $this->_paymentRequest->authorise3d($payment);\n\t\t} catch(\\Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "0060d9aa4e6369475c5198074f693fd1", "score": "0.42857385", "text": "public function refund(Varien_Object $payment, $amount)\n {\n\n if (!$this->canRefund()) {\n Mage::throwException(Mage::helper('payment')->__('Refund action is not available.'));\n }\n \n $helper = Mage::helper('pix');\n\n $transactionId = $payment->getData()['additional_information']['transactionId'];\n\n $response = $helper->getClient()->cancel($transactionId, null);\n\n $helper->log(json_encode($response), 'pix_return_cancel_error.log');\n\n if ($response && $response['data'] && $response['data']['status'] == 'REFUNDED') {\n\n $payment\n ->setTransactionId('refunded_'.$transactionId)\n ->setCcStatus('REFUNDED')\n ->setIsTransactionClosed(1)\n ->setShouldCloseParentTransaction(1)\n ->setTransactionAdditionalInfo(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $helper->array_flatten($response['data']));\n \n $payment->save();\n\n } else {\n \n Mage::throwException(Mage::helper('pix')->__('Pedido não pode ser cancelado no Pix.'));\n }\n\n return $this;\n }", "title": "" }, { "docid": "7109763bb7e2f38ef441785225c305d1", "score": "0.42731312", "text": "public function update(Request $request, Payment $payment)\n {\n $request->validate([\n 'name' => 'required|string|max:255',\n 'amount'=>'required',\n 'description'=>'required'\n\n ]);\n\n $payment->update([\n 'name' => $request->name,\n 'amount'=>$request->amount,\n 'description'=>$request->description\n ]);\n\n return redirect()->route('payment.index');\n }", "title": "" }, { "docid": "acda381aab8d6dedba40aef99bb65d63", "score": "0.4270865", "text": "private function createAuthorization(Request $request, Transaction $transaction)\n {\n $payment_id = $request->paymentId;\n\n $payer_id = $request->PayerID;\n $token = $request->token;\n\n $payee = $transaction->payee;\n\n $redirect_url = $this->redirect_url . '/' . $payee->username;\n\n /** clear the session payment ID **/\n if (!$payer_id || !$token) {\n return $this->sendFailResponse(\n $redirect_url,\n $transaction,\n self::DONATION_TYPE\n );\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId($payer_id);\n\n /**Execute the payment **/\n try {\n $result = $payment->execute($execution, $this->_api_context);\n\n $authorization_id = $result->transactions[0]\n ->related_resources[0]\n ->authorization->id;\n\n $authorization = Authorization::get($authorization_id, $this->_api_context);\n\n $payer = Auth::user();\n\n $transaction_data = $transaction->transaction_data;\n\n $transaction_data = array_merge($transaction_data, [\n 'token' => $token,\n 'payerId' => $payer_id,\n 'authorizationId' => $authorization->id,\n ]);\n\n $transaction->transaction_data = $transaction_data;\n $transaction->save();\n } catch (\\Exception $e) {\n $this->sendFailResponse(\n $redirect_url,\n $transaction,\n self::DONATION_TYPE\n );\n }\n\n if ($result->getState() == 'approved') {\n // Make auto accept\n $auto_operation = AutoOperation::where('initiator_id', $payer->id)\n ->where('subject_id', $payee->id)\n ->first();\n if ($auto_operation) {\n if ($auto_operation->status === AutoOperation::STATUS_ALWAYS_DECLINE) {\n $transaction->status = Transaction::STATUS_DECLINED;\n } else {\n return $this->captureAuthorization($transaction);\n }\n } else {\n $transaction->status = Transaction::STATUS_PENDING;\n }\n $transaction->save();\n\n $transaction->payee->notify(new NewDonationNotification($transaction));\n\n $expireJob = dispatch(new ExpirePayment($transaction))\n ->delay(now()->addDays(3));\n\n return redirect($redirect_url . '#payment_status_ok');\n }\n\n return $this->sendFailResponse(\n $redirect_url,\n $transaction,\n self::DONATION_TYPE\n );\n }", "title": "" }, { "docid": "d13bce1707035c045a42ba56ec868228", "score": "0.42553642", "text": "public static function process_failed_renewal_order_payment( $order_id ) {\n\t\tif ( self::is_renewal( $order_id, array( 'order_role' => 'child' ) ) && ! WC_Subscriptions_Order::requires_manual_renewal( self::get_parent_order( $order_id ) ) ) {\n\t\t\tadd_action( 'woocommerce_payment_complete', __CLASS__ . '::process_subscription_payment_on_child_order', 10, 1 );\n\t\t}\n\t}", "title": "" }, { "docid": "1b1d3f89529ad69a2d0f570ba86e25f4", "score": "0.4255305", "text": "protected function _authorizePayment($order, $payment_method)\n {\n $this->_debugData[$this->_count]['_authorizePayment'] = 'Authorisation of the order';\n\n $this->_uncancelOrder($order);\n\n $fraudManualReviewStatus = $this->_getFraudManualReviewStatus($order);\n\n // If manual review is active and a seperate status is used then ignore the pre authorized status\n if($this->_fraudManualReview != true || $fraudManualReviewStatus == \"\") {\n $this->_setPrePaymentAuthorized($order);\n } else {\n $this->_debugData[$this->_count]['_authorizePayment info'] = 'Ignore the pre authorized status because the order is under manual review and use the Manual review status';\n }\n\n $this->_prepareInvoice($order);\n\n $_paymentCode = $this->_paymentMethodCode($order);\n\n //for boleto confirmation mail is send on order creation\n if($payment_method != \"adyen_boleto\" && !$order->getEmailSent()) {\n //send order confirmation mail after invoice creation so merchant can add invoicePDF to this mail\n $order->sendNewOrderEmail(); // send order email\n }\n\n if(($payment_method == \"c_cash\" && $this->_getConfigData('create_shipment', 'adyen_cash', $order->getStoreId())) || ($this->_getConfigData('create_shipment', 'adyen_pos', $order->getStoreId()) && $_paymentCode == \"adyen_pos\"))\n {\n $this->_createShipment($order);\n }\n }", "title": "" }, { "docid": "5f957bf2e0d377f395c97bddb9a0d600", "score": "0.42512944", "text": "function cancelPayment() {\n \n self::setState(GopayHelper::CANCELED);\n\t\t\n }", "title": "" }, { "docid": "4e9b58f19d6c2c4e35fb114dcdfff7e7", "score": "0.4244109", "text": "public function renewCertificate($certificate)\n {\n return $this->signCertificate($certificate);\n }", "title": "" }, { "docid": "d3146bf8d0c92a49f7a2114b8eb84d20", "score": "0.42425588", "text": "public function forceDeleted(PurchasePayment $purchasePayment)\n {\n //\n }", "title": "" }, { "docid": "06a9de5e3e6a81bb37839176a52334ea", "score": "0.42386642", "text": "public function authorize(Varien_Object $payment, $amount){\r\n if (!$this->validShippingAddress()) {\r\n Mage::helper('collectorbank')->logException(new Exception(\"Shipping and billing addresses don't match\"));\r\n Mage::throwException(Mage::helper('collectorbank')->__('Billing address does not match shipping address'));\r\n\r\n return $this;\r\n }\r\n\r\n $order = $payment->getOrder();\r\n\r\n $originalIncrementId = $order->getOriginalIncrementId();\r\n $newIncrementId = $order->getIncrementId();\r\n if ($order->getQuote()->getData('is_iframe')){\r\n return $this;\r\n }\r\n if ($originalIncrementId != null and $originalIncrementId != $newIncrementId) {\r\n $this->replaceInvoice($payment, $amount);\r\n } \r\n $session = Mage::getSingleton('checkout/session');\r\n $quote = $order->getQuote();\r\n $response = json_decode($quote->getData('collector_response'));\r\n $colpayment_method = \"\";\r\n if (array_key_exists('paymentMethod', $response['purchase'])){\r\n $colpayment_method = $response['purchase']['paymentMethod'];\r\n }\r\n $colpayment_details = json_encode($response['purchase']);\r\n $payment->setCollPaymentMethod($colpayment_method);\r\n $payment->setCollPaymentDetails($colpayment_details );\r\n\r\n\r\n $result['invoice_status'] = $response['status'];\r\n $result['invoice_no'] = $response['purchase']['purchaseIdentifier'];\r\n $result['total_amount'] = $response['order']['totalAmount'];\r\n\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_NO, isset($result['invoice_no']) ? $result['invoice_no'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_PAYMENT_REF, isset($result['payment_reference']) ? $result['payment_reference'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_LOWEST_AMOUNT_TO_PAY, isset($result['lowest_amount_to_pay']) ? $result['lowest_amount_to_pay'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_TOTAL_AMOUNT, isset($result['total_amount']) ? $result['total_amount'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_DUE_DATE, isset($result['due_date']) ? $result['due_date'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_AVAILABLE_RESERVATION_AMOUNT, isset($result['available_reservation_amount']) ? $result['available_reservation_amount'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_STATUS, isset($result['invoice_status']) ? $result['invoice_status'] : '');\r\n if ($session->getUseFee() != 5){\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE, $this->getInvoiceFee());\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_TAX, $this->getInvoiceFeeTax($order));\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_TAX_INVOICED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_INVOICED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_REFUNDED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_INVOICE_NO, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_DESCRIPTION, Mage::helper('collectorbank')->__('Invoice fee'));\r\n }\r\n\r\n\r\n $payment->save();\r\n\r\n $order = $payment->getOrder();\r\n if ($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {\r\n $comment = Mage::helper('collectorbank')->__('Collector authorization successful');\r\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING)\r\n ->addStatusToHistory($this->getConfigData('order_status'), $comment)\r\n ->setIsCustomerNotified(false)\r\n ->save();\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "0737579282afa47874a1943cfb45fe5c", "score": "0.42231658", "text": "public function setPayment(Payment $payment) {\n $this->payment = $payment;\n\n return $this;\n }", "title": "" }, { "docid": "db194016f196ed027e224205d25a1e49", "score": "0.42184457", "text": "public function salesOrderPaymentRefund($observer)\n {\n /** @var Mage_Sales_Model_Order_Payment $payment */\n $payment = $observer->getPayment();\n\n /** @var Mage_Sales_Model_Order_Creditmemo $creditmemo */\n $creditmemo = $observer->getCreditmemo();\n\n /** @var Mage_Sales_Model_Order $order */\n $order = $payment->getOrder();\n\n if (!$this->is_aplazame_payment($order)) {\n return $this;\n }\n\n $remainingAmountAfterRefund = $order->getBaseGrandTotal() - $order->getBaseTotalRefunded();\n $refundedTotal = $creditmemo->getBaseGrandTotal();\n\n /** @var Aplazame_Aplazame_Model_Api_Client $client */\n $client = Mage::getModel('aplazame/api_client');\n if($remainingAmountAfterRefund == 0)\n {\n //total is refunded so we cancel order at aplazame side\n $client->cancelOrder($order);\n } else {\n //partial refund so we refund at aplazame side\n $client->refundAmount($order, $refundedTotal);\n }\n\n return $this;\n }", "title": "" }, { "docid": "090fd152fcb9812c36402316b12467dd", "score": "0.42067328", "text": "public function void(Varien_Object $payment) {\r\n parent::void($payment);\r\n $this->getService()->void($payment);\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "23d51c77371b306f0551cf9d6395bccc", "score": "0.41967675", "text": "public function cancel(Varien_Object $payment)\n {\n return $this->void($payment);\n }", "title": "" }, { "docid": "23d51c77371b306f0551cf9d6395bccc", "score": "0.41967675", "text": "public function cancel(Varien_Object $payment)\n {\n return $this->void($payment);\n }", "title": "" }, { "docid": "f27da1d1596fc916ce9ea1dac17b7564", "score": "0.41913617", "text": "public function renewAuthStatus()\n {\n parent::renewAuthStatus();\n /* @var $identity User */\n if ($this->identity instanceof User && !$this->identity->canSignIn() && !$this->isGuest) {\n $this->logout();\n }\n }", "title": "" }, { "docid": "7ba086060d1f11d20a3f47e857f51c30", "score": "0.41827396", "text": "function ReversePayment($intPayment, $intReversedBy = NULL)\n\t {\n\t \ttry\n\t \t{\n\t \t\t$oPayment\t= Payment::getForId($intPayment);\n\t \t\t$oPayment->reverse($intReversedBy);\n\t \t}\n\t \tcatch (Exception $oException)\n\t \t{\n\t \t\treturn false;\n\t \t}\n\t\t\n\t\treturn true;\n\t }", "title": "" }, { "docid": "049b2328b5e564dd321688b1f80a9b47", "score": "0.4176845", "text": "public function initializePayment(Payment $payment)\n {\n\n $paymentInit = new PaymentInitializer();\n $vendor = $this->getProviderInfo($payment);\n\n $uuid = $payment->getNumber();\n\n if (!isset($uuid)) {\n\n $uuid = $this->utils->GUID();\n } else $paymentDb = $this->em->getRepository('PaymentBundle:Payment')->find($uuid);\n\n if (!isset($paymentDb)) {\n\n $paymentDb = new pay();\n $uuid = $this->utils->GUID();\n $paymentDb->setUuid($uuid);\n }\n\n $amount = $payment->getDisplayOriginalAmount();\n\n $originalAmount = $payment->getOriginalAmount();\n\n $currency = $payment->getDisplayedCurrency();\n $originalCurrency = $payment->getCurrency();\n\n $paymentAmountExchanged = array();\n $originalAmount = $this->currencyExchange->exchangeAmount($originalAmount, $originalCurrency, $currency);\n $paymentAmountExchanged = $this->getPaymentCurrencyInfo($amount, $currency);\n// $isCorporatePage = $this->utils->isCorporateSite();\n// if ($payment->getPaymentType() == Payment::CORPO_ON_ACCOUNT && $isCorporatePage){\n if ($payment->getPaymentType() == Payment::CORPO_ON_ACCOUNT) {\n\n $paymentStatus = $this->corpoDefaultPaymentStatus;\n $responseCode = $this->corpoDefaultResponseCode;\n $responseMessage = $this->corpoDefaultResponseMessage;\n\n $paymentInit->setCallBackUrl('_corpo_on_account_payment_process');\n } else { //if ($payment->getPaymentType() == Payment::CREDIT_CARD)\n $paymentStatus = $this->ccDefaultPaymentStatus;\n $responseCode = $this->ccDefaultResponseCode;\n $responseMessage = $this->ccDefaultResponseMessage;\n\n $supportedCurrencies = $vendor['currencies'];\n\n if (!in_array($currency, $supportedCurrencies)) {\n\n $amount = $this->currencyExchange->exchangeAmount($amount, $currency, $supportedCurrencies[0]);\n $currency = $supportedCurrencies[0];\n }\n\n $paymentInit->setCallBackUrl('_paymentview');\n }\n\n\n $paymentInit->setTransactionId($uuid);\n\n $paymentDb->setCurrency($currency); //$this->currencyPCC;\n $paymentDb->setOriginalAmount($originalAmount);\n $paymentDb->setAmount($amount);\n\n\n $paymentDb->setDisplayCurrency($payment->getDisplayedCurrency());\n $paymentDb->setDisplayOriginalAmount($payment->getDisplayOriginalAmount());\n $paymentDb->setDisplayAmount($payment->getDisplayOriginalAmount());\n\n $paymentDb->setEmail($payment->getCustomerEmail());\n $paymentDb->setModuleTransactionId($payment->getModuleTransactionId()); //$payment->getModuleTransactionId());\n $paymentDb->setCustomerName($payment->getCustomerFullName());\n $paymentDb->setUserAgent($payment->getUserAgent());\n $paymentDb->setCustomerIp($payment->getCustomerIp());\n\n $paymentDb->setCommand($payment->getCommand());\n $paymentDb->setCreationDate(new \\DateTime(\"now\"));\n $paymentDb->setUpdatedDate(new \\DateTime(\"now\"));\n\n $paymentDb->setStatus($paymentStatus);\n $paymentDb->setResponseCode($responseCode);\n $paymentDb->setResponseMessage($responseMessage);\n $paymentDb->setLanguage('en');\n\n $paymentDb->setType($payment->getModuleName());\n $paymentDb->setPaymentType($payment->getPaymentType());\n\n $paymentDb->setPaymentProvider($vendor['id']); //TODO GET KEY IF NOT ABLE ADD ID FIELD TO YML\n $paymentDb->setModuleId($payment->getTrxTypeId());\n\n //Adding FBC andSBC To DATABASE\n $paymentDb->setAmountFBC($paymentAmountExchanged['amountFBC']);\n $paymentDb->setAmountSBC($paymentAmountExchanged['amountSBC']);\n $paymentDb->setAccountCurrency($paymentAmountExchanged['accountCurrency']);\n $paymentDb->setAccountCurrencyAmount($paymentAmountExchanged['accountCurrencyAmount']);\n\n $paymentDb->setModuleCurrency($payment->getModuleCurrency());\n $paymentDb->setModuleAmount($payment->getModuleAmount());\n\n $this->em->persist($paymentDb);\n $this->em->flush();\n\n return $paymentInit;\n }", "title": "" }, { "docid": "e280c9b9a430c62ea43ce19e068da27e", "score": "0.41760263", "text": "public function resale($id_sale, $amount, $currency, $description = \"\", $card_code = \"\", $processing_date = \"\", $resale_by_authorization = false)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = $this->client->resale($id_sale, $amount, $currency, $description, $card_code, $processing_date, $resale_by_authorization);\n\t\t}\n\t\tcatch (SoapFault $exception)\n\t\t{\n\t\t\t$this->error = $exception;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "0868ce1085c6bf424988d6203ebaece9", "score": "0.41703075", "text": "public function rechargeAction()\n {\n $order = null;\n\n try {\n\n $helper = Mage::helper('xpaymentsconnector');\n\n $order = $this->getOrder();\n\n $cardData = Mage::getModel('xpaymentsconnector/usercards')->load(\n $this->getRequest()->getParam('card_id')\n )->getData();\n\n $helper->saveMaskedCardToOrder($order, $cardData);\n $order->setData('xpc_txnid', $cardData['txnId'])->save();\n \n $paymentMethod = $order->getPayment()->getMethodInstance();\n\n $quote = Mage::getModel('xpaymentsconnector/quote')->load($order->getQuoteId())\n ->setXpcSlot($paymentMethod->getXpcSlot());\n\n // For some reason quote is empty here. But we actually need only its ID.\n // All the necessary data is taken from the quote XPC data\n $quote->setEntityId($order->getQuoteId());\n\n $quote->getXpcData()->setData('backend_orderid', $order->getIncrementId())->save();\n\n $response = $paymentMethod->processPayment($quote);\n\n $this->processResponseAndRedirect(\n $response,\n 'Order was paid',\n 'Order was not paid'\n );\n\n } catch (Exception $exception) {\n\n $this->processExceptionAndRedirect($exception, $order);\n }\n }", "title": "" }, { "docid": "9b21aa079d3bb05deaa889b3f8bb969e", "score": "0.4167846", "text": "public static function reactivate_subscription( $subscription ) {\n\t\tif ( ! wcs_is_paypal_profile_a( wcs_get_paypal_id( $subscription->get_id() ), 'billing_agreement' ) && self::update_subscription_status( $subscription, 'Reactivate' ) ) {\n\t\t\t$subscription->add_order_note( __( 'Subscription reactivated with PayPal', 'woocommerce-subscriptions' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "2052d4edcbc5db4faf8a34ee9cb20593", "score": "0.4166288", "text": "private function put_payment( $xero_payment, $purchase_log ) {\n\n\t\t// Abort if a Xero_Invoice object was not passed\n\t\tif ( ! ( $xero_payment instanceof Xero_Payment ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prepare payload\n\t\t$xml = $xero_payment->get_xml();\n\n\t\t// Create oAuth object and send request\n\t\ttry {\n\n\t\t\t// Load oauth lib\n\t\t\t$this->load_oauth_lib();\n\n\t\t\t// Create object and send to Xero\n\t\t\t$XeroOAuth = new XeroOAuth( $this->xero_config );\n\n\t\t\t$request = $XeroOAuth->request( 'PUT', $XeroOAuth->url( 'Payments', 'core' ), array(), $xml );\n\t\t\t$response = $XeroOAuth->parseResponse( $request['response'], 'xml' );\n\n\t\t\t// Parse the response from Xero and fire appropriate actions\n\t\t\tif ( 200 == $request['code'] ) {\n\t\t\t\tdo_action( 'wpsc_xero_payment_success', $xero_payment, $response, $purchase_log );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdo_action( 'wpsc_xero_payment_fail', $xero_payment, $response, $purchase_log );\n\t\t\t}\n\n\t\t\treturn $response;\n\n\t\t}\n\t\tcatch( Exception $e ) {\n\t\t\tdo_action( 'wpsc_xero_payment_fail', $xero_payment, $response, $e );\n\t\t}\n\n\t}", "title": "" }, { "docid": "2089fcadbe22cab9e02539a1125c6c09", "score": "0.4155608", "text": "public function update_status( Pronamic_Pay_Payment $payment, $can_redirect = false ) {\n\t\t$lead_id = $payment->get_source_id();\n\n\t\t$lead = RGFormsModel::get_lead( $lead_id );\n\n\t\tif ( ! $lead ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$form_id = $lead['form_id'];\n\n\t\t$form = RGFormsModel::get_form_meta( $form_id );\n\t\t$feed = get_pronamic_gf_pay_feed_by_entry_id( $lead_id );\n\n\t\tif ( ! $feed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$data = new Pronamic_WP_Pay_Extensions_GravityForms_PaymentData( $form, $lead, $feed );\n\n\t\t$action = array(\n\t\t\t'id' => $payment->get_id(),\n\t\t\t'transaction_id' => $payment->get_transaction_id(),\n\t\t\t'amount' => $payment->get_amount(),\n\t\t\t'entry_id' => $lead['id'],\n\t\t);\n\n\t\tif ( $data->get_subscription() ) {\n\t\t\t$action['subscription_id'] = $payment->get_subscription_id();\n\t\t}\n\n\t\t$succes_action = 'complete_payment';\n\t\t$fail_action = 'fail_payment';\n\n\t\tif ( $payment->get_recurring() ) {\n\t\t\t$succes_action = 'add_subscription_payment';\n\t\t\t$fail_action = 'fail_subscription_payment';\n\t\t}\n\n\t\tswitch ( $payment->status ) {\n\t\t\tcase Pronamic_WP_Pay_Statuses::CANCELLED :\n\t\t\t\t$this->payment_action( $fail_action, $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::CANCELLED );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::EXPIRED :\n\t\t\t\t$this->payment_action( $fail_action, $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::EXPIRED );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::FAILURE :\n\t\t\t\t$this->payment_action( $fail_action, $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::FAILED );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::SUCCESS :\n\t\t\t\tif ( ! Pronamic_WP_Pay_Extensions_GravityForms_Entry::is_payment_approved( $lead ) || 'add_subscription_payment' === $succes_action ) {\n\t\t\t\t\t// @see https://github.com/wp-premium/gravityformspaypal/blob/2.3.1/class-gf-paypal.php#L1741-L1742\n\t\t\t\t\t$this->payment_action( $succes_action, $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::PAID );\n\t\t\t\t}\n\n\t\t\t\tif ( ! Pronamic_WP_Pay_Extensions_GravityForms_Entry::is_payment_approved( $lead ) ) {\n\t\t\t\t\t// Only fulfill order if the payment isn't approved already\n\n\t\t\t\t\tif ( isset( $action['subscription_id'] ) && ! empty( $action['subscription_id'] ) ) {\n\t\t\t\t\t\t$action['subscription_start_date'] = gmdate( 'Y-m-d H:i:s' );\n\n\t\t\t\t\t\t$this->payment_action( 'create_subscription', $lead, $action );\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->fulfill_order( $lead );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::OPEN :\n\t\t\tdefault :\n\t\t\t\tif ( $payment->get_recurring() ) {\n\t\t\t\t\t$this->payment_action( $fail_action, $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::FAILED );\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6527e2eb28a53ac8ac5fe5c26e0055da", "score": "0.4145678", "text": "public function update(Request $request, Payment $payment)\n {\n $product=Product::query()->where('id',$request->product_id)->get();\n $cart=Cart::query()->where('product_id',$request->product_id)->where('user_id',auth()->user()->id)->get();\n $payment=$product->sum('The_final_amount') * $cart->sum('count');\n $data=[\n 'user_id'=>auth()->user()->id,\n 'discount_id'=>$request->discount_id,\n 'product_id'=>$request->product_id,\n 'amount'=>$request->amount,\n ];\n $payment->update($data);\n }", "title": "" }, { "docid": "040fa231bbd97c74f167f28a884c5de5", "score": "0.414553", "text": "public function edit(Payment $payment)\n {\n $categories= Category::all();\n\n return view('admin.payment.edit',compact('categories'));\n }", "title": "" }, { "docid": "9ea8d2ca24e5889e79c08dd85aa3b040", "score": "0.4142878", "text": "public function refreshToken(): void\n {\n $rest = new RestClient($this->endpoint, $this->clientkey);\n $results = $rest->oauth2Principal();\n $this->access_token = $results->access_token;\n $this->expires_in = $results->expires_in;\n $this->token_type = $results->token_type;\n }", "title": "" }, { "docid": "4dfebcba405c80d18f88b90112502bd1", "score": "0.41337526", "text": "public function update(Payment $payment, array $input)\n {\n \tif ($payment->update($input))\n return true;\n\n throw new GeneralException(trans('exceptions.backend.payments.update_error'));\n }", "title": "" }, { "docid": "5b140933d0e707b6124e84491a0f63c2", "score": "0.41243505", "text": "public function update(Request $request, Payment $payment)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "eb7294ade77611f9c4a6a7689e4d0da3", "score": "0.4122001", "text": "public function authorize(Varien_Object $payment, $amount) {\n Mage::log(\"Dummypayment\\tIn authorize\");\n return $this;\n }", "title": "" }, { "docid": "895055391d924eb0ec934856edb65259", "score": "0.41194245", "text": "public function update(Request $request, Payment $payment) {\n //\n }", "title": "" }, { "docid": "1580af8ee7b7ca6429989e90918130d4", "score": "0.41127467", "text": "public function destroy(Payment $payment)\n {\n $this->paymentRepositoryInterface->destroyPayment($payment);\n return redirect(adminRedirectRoute('payment'))->withFail('Payment Deleted Successfully.');\n }", "title": "" }, { "docid": "8ca320a922cd695a2a3a1ee4883bf263", "score": "0.41116184", "text": "public function rotateTo($angle) {\r\n\t\t//Use modulo for number in range\r\n\t\t$angle = (360 + ($angle % 360)) % 360;\r\n\t\t$acAngle = (360 - $angle) % 360;\r\n\t\t//Check for allowed angles\r\n\t\t$angles = array(0, 90, 180, 270);\r\n\t\tif (!in_array($acAngle, $angles)) {\r\n\t\t\t$this->errors[] = array('success'=>false, 'error'=>'wrong_parameter_given', 'angle'=>$angle);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif ($acAngle!=0) $this->rotateImage($this->originalimage,$acAngle,$this->previewimage);\r\n\t\t$this->imagedata['r'] = $angle;\r\n\t\t\r\n\t\t$this->generatePreviewImage(true);\r\n\t\t$this->generateThumbs();\r\n\r\n\t}", "title": "" }, { "docid": "d49f54eafa7b0f3fa4f9502e20a78f88", "score": "0.41099733", "text": "public function refundPayment($orderUuid, $amount = null);", "title": "" }, { "docid": "9cdee83a75ec18e47865e53e79d5b156", "score": "0.4102572", "text": "public function update(UpdatePaymentRequest $request, $id)\n {\n $result = DB::connection('tenant')->transaction(function () use ($request, $id) {\n $payment = Payment::findOrFail($id);\n\n $payment->form->archive();\n\n foreach ($payment->details as $paymentDetail) {\n if (! $paymentDetail->isDownPayment()) {\n $reference = $paymentDetail->referenceable;\n $reference->remaining += $paymentDetail->amount;\n $reference->save();\n $reference->updateIfDone();\n }\n }\n\n $payment = Payment::create($request->all());\n\n $payment\n ->load('form')\n ->load('paymentable')\n ->load('details.referenceable')\n ->load('details.allocation');\n\n return new ApiResource($payment);\n });\n\n return $result;\n }", "title": "" }, { "docid": "060220df80246b3b5c0250960972a176", "score": "0.40979353", "text": "public function update(Request $request, Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "060220df80246b3b5c0250960972a176", "score": "0.40979353", "text": "public function update(Request $request, Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "060220df80246b3b5c0250960972a176", "score": "0.40979353", "text": "public function update(Request $request, Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "060220df80246b3b5c0250960972a176", "score": "0.40979353", "text": "public function update(Request $request, Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "060220df80246b3b5c0250960972a176", "score": "0.40979353", "text": "public function update(Request $request, Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "f75e8bf3e09a1bf0f2e0579ca978bd9b", "score": "0.40914157", "text": "public function refund(Varien_Object $payment, $amount)\n {\n if (!$this->canRefund()) {\n Mage::throwException(Mage::helper($this->_code)->__('Refund action is not available.'));\n }\n\n $data = $payment->getAdditionalInformation();\n\n if (empty($data['confirmation'])) {\n Mage::throwException(Mage::helper($this->_code)->__('Refund action is not available.'));\n }\n\n $this->_doValidate(...$this->_doRequest($this->getURL('/payment/' . $data['confirmation'] . '/refund'), array(), array()));\n\n return $this;\n }", "title": "" }, { "docid": "4d2a0aea3e893a1a2b13213aa77c1286", "score": "0.40807456", "text": "public function holdPayment($payment, $comments);", "title": "" }, { "docid": "ba30d0ba8f2140a64a9a00525180390d", "score": "0.40794253", "text": "public function finalizeOrderPayment(OrderPayment $payment, $param = array())\n {\n $payment->setContent($param);\n $order = $payment->getOrder();\n $order->setIsPaid(true);\n \n // Finalize order content\n $this->finalizeOrderContent($order);\n $this->appService->persistEntity($order);\n \n // Handle the order progress\n $this->progressHandler->handleProgress($order, Progress::PROGRESS_PAID);\n \n // Handle the event related to this action\n $this->eventHandler->handleEvent($order, Event::TR_PAYMENT_ORDER); \n $this->appService->flushEntityManager();\n \n return true;\n }", "title": "" }, { "docid": "43a728ab94a4199db6d37fd9335849d8", "score": "0.40791017", "text": "function rcp_award_commission( $payment_id, $payment_data, $amount ) {\n\n global $rcp_options;\n\n\t$user_info = maybe_unserialize( $payment_data['user_info'] );\n\n $user_link = '<a href=\"' . admin_url( 'admin.php?page=rcp-members&view_member=' . $payment_data['user_id'] ) . '\">' . __('View User', 'rcp') . '</a>';\n\n\t$data = array(\n 'order_id' => array(\n 'title' => __('Payment #', 'rcp'),\n 'domain' => 'rcp',\n 'value' => esc_sql( $payment_id )\n ),\n 'order_total' => array(\n 'title' => __('Total', 'rcp'),\n 'domain' => 'rcp',\n 'value' => esc_sql( $amount )\n ),\n 'referred_user' => array(\n \t'title' => __('Referred User', 'rcp'),\n \t'domain' => 'rcp',\n \t'value' => esc_sql( $user_link )\n )\n\t);\n\t\n $description = sprintf( __('Payment #%s', 'rcp'), $payment_id );\n\n if( class_exists( 'Affiliates_Referral_WordPress' ) ) {\n\n \t/*****************************************\n * Record referral for pro version\n *****************************************/\n $r = new Affiliates_Referral_WordPress();\n $r->evaluate( 0, $description, $data, $amount, null, $rcp_options['currency'], AFFILIATES_REFERRAL_STATUS_ACCEPTED, 'sale', $payment_id );\n\n } elseif( function_exists( 'affiliates_suggest_referral' ) ) {\n /*****************************************\n * Record referral for free version\n *****************************************/\n $referral_rate = get_option( 'aff_def_ref_calc_value' );\n $amount = round( floatval( $referral_rate ) * floatval( $amount ), AFFILIATES_REFERRAL_AMOUNT_DECIMALS );\n affiliates_suggest_referral( 0, $description, $data, $amount, $rcp_options['currency'] );\n }\n}", "title": "" }, { "docid": "dcad2e583a64fd4524e3d512069907ac", "score": "0.40723234", "text": "public function revokeAdmission($admission_id)\n {\n Admission::find($admission_id)->revokeThisAdmission();\n\n return redirect()->route('department.admission.index');\n }", "title": "" }, { "docid": "f9735a885371e8922c7311d3f0161b15", "score": "0.40722284", "text": "public function refund(Varien_Object $payment, $amount) {\r\n parent::refund($payment, $amount);\r\n $this->getService()->refund($payment, $amount);\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "8119bae7e1e16d7a050c42c3a3002efa", "score": "0.40701738", "text": "public function actionCancelPayment()\n {\n $mid = Yii::$app->request->get('mid', false);\n $app = Yii::$app->request->get('app', false);\n $payment_id = Yii::$app->request->get('pid', false);\n\n if($mid && $app && $payment_id)\n {\n $sc = $this->getShopifyClientObj($mid, $app);\n if($sc)\n {\n $response = $sc->call('DELETE', '/admin/recurring_application_charges/'.$payment_id.'.json');\n if(!isset($response['errors'])) {\n echo '<p><b>cancelled successfully</b></p><p><a href=\"list-recurring?mid='.$mid.'&app='.$app.'\">Back</a></p>';\n die; \n } else {\n var_dump($response);die;\n }\n }\n else\n {\n die('shopify object not created.');\n }\n }\n else {\n die('invalid merchant_id OR app OR payment_id');\n } \n }", "title": "" }, { "docid": "ff0c6773b841037aeb8b9d16bfd50833", "score": "0.4066817", "text": "public function forceDeleted(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "e416bb8dbb3a9fea56c5dfa993123257", "score": "0.40635508", "text": "public function updateRewards($order) {\n\n\t\t$this->owner->RewardAmount = $this->owner->RewardAmount + $order->SubTotal();\n\t\tif ($this->checkRewardAmount()) {\n\t\t\t$order->RewardsGiven = true;\n\t\t\t$order->write();\n\t\t}\n\n\t\t$this->owner->write();\n\t}", "title": "" }, { "docid": "548b845e1636bf0196edede70e9b2995", "score": "0.40634215", "text": "public function setPayment(OrderPaymentInterface $payment);", "title": "" }, { "docid": "baf7cf9f7819a64afc87722df508d76b", "score": "0.40583578", "text": "public static function maybe_record_renewal_order_payment( $order_id ) {\n\t\tif ( self::is_renewal( $order_id, array( 'order_role' => 'child' ) ) && WC_Subscriptions_Order::requires_manual_renewal( self::get_parent_order( $order_id ) ) ) {\n\t\t\tself::process_subscription_payment_on_child_order( $order_id );\n\t\t}\n\t}", "title": "" }, { "docid": "70d384e7a4fb2555b333a386c66d51f7", "score": "0.40576363", "text": "public function applyPayment ($date, float $paymentAmount, $amortizationTable){\n\n /** Validations */\n\n if( $this->isValidDate($date) == false)\n { throw new AprException(AprException::ERR_Invalid_Date);}\n\n if ($paymentAmount <= 0){\n throw new AprException(AprException::ERR_One_Time_Payment);\n }\n\n if ($amortizationTable->isEmpty()){\n throw new AprException(AprException::ERR_Amortization_Table);\n }\n\n /** Procedure */\n// THIS BLOCK OF CODE WAS REMOVED TO AVOID REVEALING PROTECTED INFORMATION\n return $changed;\n }", "title": "" } ]
2e624d810e994359aae7d86fcc27a082
Generates an array of just the fields that have updated
[ { "docid": "ac14c878206d8607995227ce29a9c14e", "score": "0.0", "text": "protected function createUpdateArray($use_set_notation = true) {\n\t\t$return_array = array();\n\t\t$set_data_array = array();\n\t\t$unset_data_array = array();\n\t\tforeach ($this->toArray(true, true) AS $name => $value) {\n\t\t\tif (in_array($name, $this->getModifiedColumns())) {\n\t\t\t\t/* @todo at some point in the future we may want to reference things by more than _id, so this will have to be abstracted */\n\t\t\t\tif(strpos($name, '_') === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if(strpos($name, 'modified_columns') === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (!is_null($value)) {\n\t\t\t\t\tif (is_array($value) && !empty($value) && ($use_set_notation === true)) {\n\t\t\t\t\t\t$set_notation_array = $this->createSetNotation($value);\n\t\t\t\t\t\tforeach($set_notation_array AS $set_node_id => $set_node_value) {\n\t\t\t\t\t\t\t$set_data_array[$name . '.' . $set_node_id] = $set_node_value; // Mongo prefers null to blank strings\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$set_data_array[$name] = $value; // Mongo prefers null to blank strings\n\t\t\t\t\t}\n\t\t\t\t} else if (is_null($value)) {\n\t\t\t\t $unset_data_array[$name] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(count($set_data_array) > 0) {\n\t\t\t$return_array['$set'] = $set_data_array;\n\t\t}\n\t\tif(count($unset_data_array) > 0) {\n\t\t $return_array['$unset'] = $unset_data_array;\n\t\t}\n\t\treturn $return_array;\n\t}", "title": "" } ]
[ { "docid": "611e2b8e7126dd6232a658726b0350c7", "score": "0.73484904", "text": "public function getChangedFields()\n {\n\n $fields = [];\n\n if ($this->synchronized || !static::$track) {\n return $fields;\n }\n\n foreach ($this->savedData as $key => $value) {\n\n if ($value != $this->data[$key]) {\n $fields[] = $key;\n }\n }\n\n return $fields;\n\n }", "title": "" }, { "docid": "405f0d5e165534352c51dd3e3142cd3b", "score": "0.7328125", "text": "public function getFieldsToChange() {\n return array();\n }", "title": "" }, { "docid": "e95d03c0d3690ec5d1d60506989fabd1", "score": "0.7162162", "text": "public function getAllFields()\n {\n return array_merge($this->_fields, $this->_changedFields);\n }", "title": "" }, { "docid": "7030330f63a9b167da100093f9ca6016", "score": "0.70554215", "text": "public function getChangedFields() {\n\t\treturn $this->changed_fields;\n\t}", "title": "" }, { "docid": "bbafe6982866426a882c2ced5dc2edc7", "score": "0.7050456", "text": "public function getModifiedData() {\n\t\t$modifiedArray = array();\n\t\tforeach($this->_modifiedFields AS $field) {\n\t\t\t$modifiedArray[$field] = $this->_values[$field];\n\t\t}\n\t\treturn $modifiedArray;\n\t}", "title": "" }, { "docid": "b1a7bcc86248048f156774a23893c805", "score": "0.70499116", "text": "public function getChangedFields()\n {\n return $this->_changedFields;\n }", "title": "" }, { "docid": "059611d4e2ac910f630bf3e944eede05", "score": "0.70057493", "text": "public function getModified()\n {\n $modified = array();\n foreach ($this->_modifiedFields as $columnName => $value) {\n $modified[$columnName] = $this->_data[$columnName];\n }\n return $modified;\n }", "title": "" }, { "docid": "b4cf09561fb33d93c7e0690a2f226fd8", "score": "0.6972492", "text": "public function getChangedFields()\n\t{\n\t\t$changed_fields = array();\n\t\tforeach ($this->tracker->getAllChangedProperties() as $prop => $info) {\n\t\t\tswitch ($prop) {\n\t\t\t\tcase 'agent':\n\t\t\t\t\t$changed_fields[] = 'ticket.agent_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'agent_team':\n\t\t\t\t\t$changed_fields[] = 'ticket.agent_team_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'category':\n\t\t\t\t\t$changed_fields[] = 'ticket.category_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'department':\n\t\t\t\t\t$changed_fields[] = 'ticket.department_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'priority':\n\t\t\t\t\t$changed_fields[] = 'ticket.priority_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'product':\n\t\t\t\t\t$changed_fields[] = 'ticket.product_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'workflow':\n\t\t\t\t\t$changed_fields[] = 'ticket.workflow_id';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'status':\n\t\t\t\t\t$changed_fields[] = 'ticket.status';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'is_hold':\n\t\t\t\t\t$changed_fields[] = 'ticket.is_hold';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hidden_status':\n\t\t\t\t\t$changed_fields[] = 'ticket.hidden_status';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'participants':\n\t\t\t\t\t$changed_fields[] = 'ticket.participants';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'labels':\n\t\t\t\tcase 'label_added':\n\t\t\t\tcase 'label_removed':\n\t\t\t\t\t$changed_fields[] = 'ticket.labels';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->logMessage(\"Raw Changed: \" . implode(', ', array_keys($this->tracker->getAllChangedProperties())));\n\n\t\t$this->logMessage(\"Changed fields: \" . implode(', ', $changed_fields));\n\n\t\treturn $changed_fields;\n\t}", "title": "" }, { "docid": "cefe65fd511a30b7feb5d4ccd7cb4a21", "score": "0.69045544", "text": "public function getRelatedFreshUpdate()\n {\n return array (\n $this->related->getUpdatedAtColumn () => $this->related->freshTimestamp ()\n );\n }", "title": "" }, { "docid": "120d81393b9a3fd35bd13ac43b83b5ad", "score": "0.68913275", "text": "function get_updates() {\n\t\t\treturn $this->quoted_attributes(array_diff_key($this->get_attributes(), array_combine($this->primary_keys, $this->primary_keys)));\n\t\t}", "title": "" }, { "docid": "cdae600ce0247c434604d6a20e8e5a44", "score": "0.6788496", "text": "public function list_dirty_fields() {\r\n return $this->orm->list_dirty_fields();\r\n }", "title": "" }, { "docid": "3ba659ec9f8e17a0534de3094d695526", "score": "0.67835695", "text": "public function refreshFields()\n {\n if ($this->id === null) {\n $this->original = [];\n return $this->fields = [];\n }\n \n $this->fields = static::query()->getById($this->id)->fields;\n $this->original = $this->fields;\n \n $this->fieldsAreFetched = true;\n \n return $this->fields;\n }", "title": "" }, { "docid": "d9aa387b250629e1a710c0cb84f97006", "score": "0.67766863", "text": "public function getUpdated();", "title": "" }, { "docid": "515c6cb0dbd674e0e21387ef29714b85", "score": "0.6681397", "text": "public function getUpdatedProperties() {}", "title": "" }, { "docid": "90150dab36780105e1d5c7b099716842", "score": "0.66619605", "text": "public function getUpdateFields() {\r\t\t$arTmp = Array();\r\t\t$rsProps = CIBlock::GetProperties($this->ibID, Array(), Array());\r\t\twhile ($arPropFields = $rsProps->GetNext()) {\r\t\t\tif($arPropFields[\"ACTIVE\"] !== \"Y\")\r\t\t\t\tcontinue;\r\t\t\t// $arPropFields[\"NAME\"] .= \" (PROPERTY_\".$arPropFields[\"CODE\"].\")\";\r\t\t\tswitch($arPropFields[\"PROPERTY_TYPE\"]) {\r\t\t\t\tcase \"L\":\r\t\t\t\t\t$arValues = Array();\r\t\t\t\t\t$rs = CIBlockPropertyEnum::GetList(array(\"SORT\" => \"ASC\"), array(\"PROPERTY_ID\" => $arPropFields[\"ID\"]));\r\t\t\t\t\twhile($ar = $rs->Fetch())\r\t\t\t\t\t\t$arValues[$ar[\"ID\"]] = $ar[\"VALUE\"];\r\t\t\t\t\t$arTmp[\"p_\".$arPropFields[\"ID\"]] = Array(\"TYPE\"=>\"L\", \"VALUES\"=>$arValues, \"NAME\"=>$arPropFields[\"NAME\"], \"MULTIPLE\"=>$arPropFields[\"MULTIPLE\"], \"IS_REQUIRED\"=>$arPropFields[\"IS_REQUIRED\"], \"DELETE_EQ\"=>Array(\"like\"), \"CODE\"=>$arPropFields[\"ID\"]);\r\r\t\t\t\t\t// delete empty and like compare options\r\t\t\t\t\t// if($arPropFields[\"IS_REQUIRED\"]==\"Y\")\r\t\t\t\t\t\t// $arTmp[\"p_\".$arPropFields[\"ID\"]][\"DELETE_EQ\"][] = \"empty\";\r\r\t\t\t\t\tbreak;\r\t\t\t\tcase \"S\":\r\t\t\t\t\t$arTmp[\"p_\".$arPropFields[\"ID\"]] = Array(\"TYPE\"=>\"S\", \"NAME\"=>$arPropFields[\"NAME\"], \"MULTIPLE\"=>$arPropFields[\"MULTIPLE\"], \"IS_REQUIRED\"=>$arPropFields[\"IS_REQUIRED\"], \"CODE\"=>$arPropFields[\"ID\"]);\r\t\t\t\t\t// delete empty compare options\r\t\t\t\t\t// if($arPropFields[\"IS_REQUIRED\"]==\"Y\")\r\t\t\t\t\t\t// $arTmp[\"p_\".$arPropFields[\"ID\"]][\"DELETE_EQ\"] = Array(\"empty\");\r\t\t\t\t\tbreak;\r\t\t\t\tcase \"N\":\r\t\t\t\tcase \"E\":\r\t\t\t\tcase \"U\":\r\t\t\t\t\t$arTmp[\"p_\".$arPropFields[\"ID\"]] = Array(\"TYPE\"=>\"N\", \"NAME\"=>$arPropFields[\"NAME\"], \"MULTIPLE\"=>$arPropFields[\"MULTIPLE\"], \"IS_REQUIRED\"=>$arPropFields[\"IS_REQUIRED\"], \"DELETE_EQ\"=>Array(\"like\"), \"CODE\"=>$arPropFields[\"ID\"]);\r\t\t\t\t\t// if($arPropFields[\"IS_REQUIRED\"]==\"Y\")\r\t\t\t\t\t\t// $arTmp[\"p_\".$arPropFields[\"ID\"]][\"DELETE_EQ\"][] = \"empty\";\r\t\t\t\t\tbreak;\r\t\t\t}\r\t\t}\r\r\t\t// get sections\r\t\t$rsSections = CIBlockSection::GetTreeList(array(\"IBLOCK_ID\"=>$this->ibID));\r\t\twhile($arSection = $rsSections->GetNext())\r\t\t\t$this->arStrFieldsWhere[\"f_SECTION_ID\"][\"VALUES\"][$arSection[\"ID\"]] = str_repeat(\"&nbsp;&nbsp;\", intval($arSection[\"DEPTH_LEVEL\"])-1).$arSection[\"NAME\"];\r\t\t// -----\r\r\t\t$this->arStrFieldsUse += $arTmp;\r\t\t$this->arStrFieldsWhere += $arTmp;\r\t\t$this->arStrFields += $arTmp;\r\t\treturn $this->arStrFields;\r\t}", "title": "" }, { "docid": "4a4c243cd69e08a9b686ec8b74ef23fe", "score": "0.6641612", "text": "public function getChangeset(): array\n\t{\n\t\t$changes = [];\n\n\t\tforeach ($this->getNonMetadataFields() as $key => $value) {\n\t\t\tif (! isset($this->initialFieldValues[$key]) || $value !== $this->initialFieldValues[$key]) {\n\t\t\t\t$changes[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $changes;\n\t}", "title": "" }, { "docid": "69e403ad21a1447b205ae2a4f490a36a", "score": "0.6639052", "text": "function createUpdateFields()\n\t{\n\t $insertValues = \"\";\n\t $update_functions = \"\";\n\t $table = Doctrine_Core::getTable($this->tableName)->getColumns();\n\t \n\t foreach ($table as $fielname => $info)\n\t {\n\t if (strtolower($fielname) != 'id' && strtolower($fielname) != 'created_at' && strtolower($fielname) != 'updated_at')\n\t {\n\t $insertValues .= \"if (isset($\".$this->moduleNameVar.\"['\".$fielname.\"'])) {\n\t $\".$this->moduleNameVar.\"_rs->\".$fielname.\" = \\$this->update\".$this->moduleName.ucfirst($fielname).\"($\".$this->moduleNameVar.\"['\".$fielname.\"']);\n\t }\n\t \";\n\t $update_functions .= \"\n protected function update\".ucfirst($this->moduleNameVar).ucfirst($fielname).\"($\".$fielname.\" = '') {\n return $\".$fielname.\";\n }\";\n\t }\n\t }\n\t \n\t $this->update_functions = $update_functions;\n\t $this->updateFromRequestFields = $insertValues;\n\t}", "title": "" }, { "docid": "03d628c524a94b21db53da7235ce0ad9", "score": "0.66078675", "text": "public function getModifiedFields() {\n\t\treturn $this->_modifiedFields;\n\t}", "title": "" }, { "docid": "feb2a211f4244d7bc52dc097353b6c47", "score": "0.6599494", "text": "public function getChangedData($fields = [])\n {\n\n if ($this->synchronized) {\n return [];\n }\n\n $tmp = [];\n\n if (!$fields)\n $fields = array_keys($this->savedData);\n\n foreach ($fields as $field) {\n if ($this->savedData[$field] != $this->data[$field]) {\n $tmp[] = $this->data[$field];\n }\n }\n\n return $tmp;\n\n }", "title": "" }, { "docid": "2e4bc267da7989b12b99e2df47627e03", "score": "0.65795845", "text": "protected function getPageFields()\n\t{\n\t\tif( $this->updSelectedFields === NULL )\n\t\t{\n\t\t\t$this->updSelectedFields = array_diff( $this->pSet->getUpdateSelectedFields(), $this->keyFields);\n\t\t\t$denyDuplicateFields = array();\n\t\t\tforeach( $this->updSelectedFields as $f )\n\t\t\t{\n\t\t\t\tif( !$this->pSet->allowDuplicateValues($f) )\n\t\t\t\t\t$denyDuplicateFields[] = $f;\n\t\t\t}\n\t\t\t$this->updSelectedFields = array_diff( $this->updSelectedFields, $denyDuplicateFields);\n\t\t}\n\t\treturn $this->updSelectedFields;\n\t}", "title": "" }, { "docid": "17f5b5197d2c70383328f9d0a7597517", "score": "0.6564657", "text": "protected function listUpdates() {}", "title": "" }, { "docid": "fa1e405167cfe570f07c5984577b31d7", "score": "0.65519863", "text": "abstract protected function getAllUpdates();", "title": "" }, { "docid": "c06f4ae3e593289124745d0bd260f2cc", "score": "0.6512016", "text": "protected function _updatefields() {}", "title": "" }, { "docid": "fb87bd981e86de187ae4d8dae0e704e9", "score": "0.64257276", "text": "function object_changed($changes, $fields) {\n return array_intersect_key($changes, array_flip($fields));\n}", "title": "" }, { "docid": "297b7c712efdad0deb87b315bd9026d4", "score": "0.6417386", "text": "public function getToUpdate()\n\t{\n\t\t$tToUpdate = array();\n\t\tif ($this->_tPropertyToUpdate) {\n\t\t\tforeach ($this->_tPropertyToUpdate as $sVar) {\n\t\t\t\t$tToUpdate[$sVar] = $this->_tProperty[$sVar];\n\t\t\t}\n\t\t}\n\t\treturn $tToUpdate;\n\t}", "title": "" }, { "docid": "c543e04d9aef20dbe71ea6d159ef7ab8", "score": "0.63472104", "text": "public function getFieldsWithSetter(): array {\n $fields = [];\n foreach ($this->asArray as $field => $method) {\n if (!empty($method[\"set\"])) {\n $fields[] = $field;\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "d7253527a95376f1ea616781142cf1a5", "score": "0.63343436", "text": "public function modified($field = null) {\n\t\tif ($field) {\n\t\t\tif (!isset($this->_updated[$field]) && !isset($this->_data[$field])) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (!array_key_exists($field, $this->_updated)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$value = $this->_updated[$field];\n\t\t\tif (is_object($value) && method_exists($value, 'modified')) {\n\t\t\t\t$modified = $value->modified();\n\t\t\t\treturn $modified === true || is_array($modified) && in_array(true, $modified, true);\n\t\t\t}\n\n\t\t\t$isSet = isset($this->_data[$field]);\n\t\t\treturn !$isSet || ($this->_data[$field] !== $this->_updated[$field]);\n\t\t}\n\n\t\t$fields = array_fill_keys(array_keys($this->_data), false);\n\n\t\tforeach ($this->_updated as $field => $value) {\n\t\t\tif (is_object($value) && method_exists($value, 'modified')) {\n\t\t\t\tif (!isset($this->_data[$field])) {\n\t\t\t\t\t$fields[$field] = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$modified = $value->modified();\n\n\t\t\t\t$fields[$field] = (\n\t\t\t\t\t$modified === true || is_array($modified) && in_array(true, $modified, true)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$fields[$field] = (\n\t\t\t\t\t!isset($fields[$field]) || $this->_data[$field] !== $this->_updated[$field]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "7593f1e3793a5b666c501ebec1f64674", "score": "0.6303318", "text": "public function getChanged(): array\n {\n return $this->changed;\n }", "title": "" }, { "docid": "12a48255229c29f68b06fbf2663fd8ae", "score": "0.62857467", "text": "public function getChangedKeys()\n {\n return array_intersect_key($this->_data, $this->_modifiedFields);\n }", "title": "" }, { "docid": "9f228745dc05ee33a26e0c430d69828c", "score": "0.62477183", "text": "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'productId' => function () {\n return $this->productId . '';\n },\n 'createdAt' => function () {\n return MongodbUtil::MongoDate2String($this->createdAt, 'Y-m-d H:i:s');\n },\n 'code', 'isUsed', 'usedBy', 'usedAt',\n ]\n );\n }", "title": "" }, { "docid": "53366f13925489b7035f24a922ad64e4", "score": "0.6229566", "text": "public function getUpdateList()\n {\n return $this->updateList;\n }", "title": "" }, { "docid": "8195dbd0034bd747b7cc9d3f119f47b4", "score": "0.62265056", "text": "public function getModified() {\n\t\t$this->setCommonColumns();\n\t\t$q = $this->getCustom();\n\t\t$q->whereNotNull('et.email_id');\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "985ef2d49fa03513593e3678958ba84c", "score": "0.62259555", "text": "public function getFieldsUpdate($attributes){\n $query = null;\n foreach ($attributes as $key => $value) {\n $query .= $key.\"=:\".$key.\",\";\n }\n return $query = rtrim($query,\",\");\n }", "title": "" }, { "docid": "763d228f6688783a51172dff0e210571", "score": "0.62233925", "text": "public function getChanges(){\n\n $metas = $this->getLastMetas();\n $last = $this->changes->getUserLastUpdates($this->user_id,$this->riiinglink->id);\n\n if( $this->updates->count() > 1)\n {\n return $this->calculDiff(unserialize($this->updates->last()->labels), unserialize($this->updates->first()->labels));\n }\n elseif( $this->updates->count() == 1)\n {\n if($metas)\n {\n if($this->updates->first()->name == 'created_meta')\n {\n return $this->calculDiff([], unserialize($metas));\n }\n else\n {\n if(!$last->isEmpty())\n {\n return $this->calculDiff(unserialize($last->first()->labels),unserialize($metas));\n }\n }\n }\n\n return [];\n }\n\n return [];\n }", "title": "" }, { "docid": "ecd38417ed9476c71b37bf61db00eb11", "score": "0.62097", "text": "public function _getUpdateKeys() {\n return array(Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID => $this->{Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID});\n }", "title": "" }, { "docid": "fdd21281f4d8746feaea82613d0b6480", "score": "0.6193101", "text": "private function array_Rulse_For_Update() {\n return array(array(\n 'field' => 'f_name',\n 'label' => 'prènom',\n 'rules' => 'required|min_length[3]',\n ),\n array(\n 'field' => 'l_name',\n 'label' => 'nom',\n 'rules' => 'required|min_length[3]',\n ),\n array(\n 'field' => 'phone_number',\n 'label' => 'Numéro téléphone',\n 'rules' => 'required|min_length[8]|numeric',\n ),\n array(\n 'field' => 'address',\n 'label' => 'Adresse',\n 'rules' => 'required|min_length[8]',\n ),\n array(\n 'field' => 'function',\n 'label' => 'Fonction',\n 'rules' => 'required|min_length[5]',\n ),\n array(\n 'field' => 'state',\n 'label' => 'Ville',\n 'rules' => 'required|min_length[3]',\n ),\n array(\n 'field' => 'company',\n 'label' => 'raison sociale',\n 'rules' => 'required|min_length[3]|callback_key_exist_update_company',\n ),\n );\n }", "title": "" }, { "docid": "98fde86f13b28a17c5815dc6aff39936", "score": "0.6182448", "text": "function update_fields($fields){\n //\n //Get the indexed columns \n //\n //loop through all the columns in this entity \n foreach ($this->entity->columns as $column) {\n //\n //Get the name of the column\n $name= $column->name;\n //\n //if the column is foreign or primary return\n if($column->type==!'primary' || $column->type==!'foreign' ){\n //\n //Test if the column already exist in the fields array\n //first map the columns to get the column names\n $names= array_map(function ($f){return $f->column->name;}, $fields);\n //\n $enn= array_search($name, $names);\n //\n //If the culumn is an indexed column do nothing if false do the following\n if ($enn === false){\n //\n //Test if it is called a name \n if ($name== 'name'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a description \n if ($name== 'description'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a title \n if ($name== 'title'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a id \n if ($name== 'id'){\n //\n array_push($fields, $column);\n }\n }\n }\n }\n //\n //\n return $fields;\n }", "title": "" }, { "docid": "0205f05e9f8d78caf5c18c810e942ab1", "score": "0.6168725", "text": "static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }", "title": "" }, { "docid": "8b886cc54ca501d6e3f324cedf1d4d1f", "score": "0.61641043", "text": "public function getDirty()\n {\n return array_diff_key(parent::getDirty(), array_flip(['id']));\n }", "title": "" }, { "docid": "11f06e01497c065e73c41859dbb488f1", "score": "0.6153408", "text": "function getUpdateFields($params, $table){\n\t\tglobal $SYSTEM_USER;\n\t\t$set = '';\n\t\tforeach($params as $key => $value){\n\t\t\tif(is_null($value)){\n\t\t\t\t$set .= \"`$key`=null, \";\n\t\t\t} elseif(is_bool($value) === true){\n\t\t\t\t$value = $value?1:0;\n\t\t\t\t$set .= \"`$key`=$value , \";\n\t\t\t} elseif (is_numeric($value)) {\n\t\t\t\t$set .= \"`$key`='$value', \";\n\t\t\t} else {\n\t\t\t\t$data = $this->dbconn->quote($value);\n\t\t\t\t$set .= \"`$key`=$data, \";\n\t\t\t}\n\t\t}\n\t\t//if table starts with 'm_'\n\t\tif(strpos($table, 'm_') === 0){\n\t\t\t$currentDate = date(\"Y/m/d H:i:s\");\n\t\t\t$set .= \"`update_date`='$currentDate', \";\n\t\t\t$set .= \"`update_user_code`='$SYSTEM_USER', \";\n\t\t}\n\t\treturn rtrim($set, \", \");\n\t}", "title": "" }, { "docid": "97714ef15e364203b396f14a4c890bf9", "score": "0.6144225", "text": "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 }", "title": "" }, { "docid": "81ba5b691bf2ee0cc66425c0b2181d1a", "score": "0.6143408", "text": "public function getChangedValues() {\n $values = array();\n foreach ($this->changedAttributes as $attributeName => $t) {\n $values[$attributeName] = $this->get($attributeName);\n }\n return $values;\n }", "title": "" }, { "docid": "92874eb2c7f2002492f4701c1f7ed49e", "score": "0.6139618", "text": "public function changedData(){\n\t\t$res = array();\n\t\tforeach($this->data as $k=>$v){\n\t\t\t$add = false;\n\t\t\tif($k != $this->primaryKey){\n\t\t\t\t$add = true;\n\t\t\t\tif(array_key_exists($k,$this->orig)){//support for null values\n\t\t\t\t\tif($this->orig[$k] == $v){\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($add){\n\t\t\t\t\t$res[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "81a03027ceb18fb33c843b8996547ae6", "score": "0.61117864", "text": "public function getFields2Update() {\r\t\tforeach($this->arPost as $k=>$v) {\r\t\t\t// where field (W1, W2 ...)\r\t\t\tif(substr($k,0,1)==\"R\" && isset($this->arStrFields[$v['k']])) {\r\t\t\t\t$key = substr($v['k'],2);\r\t\t\t\t$f_or_p = substr($v['k'],0,2);\r\t\t\t\tif($f_or_p==\"f_\")\r\t\t\t\t\t$this->arFields2Update[$key] = $v['v'];\r\t\t\t\telseif($f_or_p==\"p_\") {\r\t\t\t\t\t// allow multiple value\r\t\t\t\t\tif($this->arStrFields[$v['k']][\"MULTIPLE\"] == \"Y\")\r\t\t\t\t\t\t$this->arProps2Update[$key][] = $v['v'];\r\t\t\t\t\t// single value\r\t\t\t\t\telse\r\t\t\t\t\t\t$this->arProps2Update[$key] = $v['v'];\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\tif(empty($this->arFields2Update) && empty($this->arProps2Update))\r\t\t\t$this->strError .= GetMessage(\"av_ibprops_error_empty_rules\").\"\\n\";\r\t\telse {\r\t\t\t$s = \"\\n\".GetMessage(\"av_ibprops_fields\").\"\\n\".print_r($this->arFields2Update, true);\r\t\t\t$d = \"\\n\".GetMessage(\"av_ibprops_props\").\"\\n\".print_r($this->arProps2Update, true);\r\t\t\tfile_put_contents($this->logDir.$this->fileName.\".txt\", $s.$d, FILE_APPEND);\r\t\t}\r\t}", "title": "" }, { "docid": "ca51598f1611aa4cbcb58be0f00dea4e", "score": "0.60982984", "text": "public function fields()\n {\n $fields = parent::fields();\n\n unset($fields['time_sent'], $fields['time_read'], $fields['time_archived'], $fields['uid']);\n\n $fields['timeSent'] = 'time_sent';\n $fields['wasRead'] = 'wasRead';\n $fields['wasArchived'] = 'wasArchived';\n\n return $fields;\n }", "title": "" }, { "docid": "a4a3821bf1e8803d000691ddbf376af1", "score": "0.6080825", "text": "public function updatedTables(){\n return $this->updatedTables;\n }", "title": "" }, { "docid": "31a35cc94fff922332149459c24b17a4", "score": "0.6068171", "text": "public function getHasChanged()\n\t{\n\t\treturn $this->generateTimestamps($this->_directory)!=$this->_timestamps;\n\t}", "title": "" }, { "docid": "8520e52cc64935c3fe5c49d7bd06dc94", "score": "0.605013", "text": "public function getChanges(array $context, $new)\n {\n $output = array();\n\n foreach ($this->_fields as $key => $field) {\n if ($field instanceof FieldInterface) {\n $changes = $field->getDataModelDependyChanges($context, $new);\n\n if ($changes) {\n $output[$field->getFieldKey()] = $changes;\n }\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "9bdd94e2e425c9d569c3d3327224e313", "score": "0.60475177", "text": "public function hasChangedFields()\n {\n return (count($this->_changedFields) > 0);\n }", "title": "" }, { "docid": "8291ca2467db170ccf8aae7f10a4edcf", "score": "0.60282725", "text": "public function getSaveFields()\n {\n\n return array\n (\n 'wbfsys_person_duplicate_suspicion' => array\n (\n 'id_person',\n 'id_duplicate',\n 'id_propability',\n 'm_version',\n ),\n\n );\n\n }", "title": "" }, { "docid": "323f09bae0faaf15647d83aed845e3dd", "score": "0.5994896", "text": "protected function getEntityIdsReferencingReadyUpdates() {\n $entity_ids = [];\n if ($field_ids = $this->getReferencingFieldIds()) {\n $entity_storage = $this->entityTypeManager->getStorage($this->updateEntityType());\n foreach ($field_ids as $field_id) {\n\n $query = $entity_storage->getQuery('AND');\n $this->addActiveUpdateConditions($query, \"$field_id.entity.\");\n $entity_ids += $query->execute();\n }\n }\n return $entity_ids;\n }", "title": "" }, { "docid": "1c6115f310ef1c50281bab0dd076d781", "score": "0.59888446", "text": "protected function getUpdateStatements() {}", "title": "" }, { "docid": "87c4c479db514a0ab9dfa0b4e39e3dd3", "score": "0.59849614", "text": "public function getModified()\n {\n if ($this->isNew()) {\n return array();\n }\n\n $originalData = static::getEntityManager()->getUnitOfWork()->getOriginalEntityData($this);\n\n return array_diff($originalData, $this->toArray());\n }", "title": "" }, { "docid": "165816ebc56559d12a043646ca9df1f7", "score": "0.59834504", "text": "public function getChanges(): array\n {\n return $this->_changes ?? [];\n }", "title": "" }, { "docid": "59a2eb1bde15eb055f29832216722ce6", "score": "0.5977684", "text": "protected function fields()\n {\n return [];\n }", "title": "" }, { "docid": "246a5b89800572eeb42d99ffe71c5745", "score": "0.5968545", "text": "public function updates()\n {\n return $this->updates;\n }", "title": "" }, { "docid": "cd1094203ded061fc1456065cc82e580", "score": "0.5963257", "text": "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'date', 'origin', 'originName', 'total',\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt);\n }\n ]\n );\n }", "title": "" }, { "docid": "0115708a0f60126771821c7872973892", "score": "0.59576863", "text": "private function _find_fields() {\n\t\t$result = $this->db->fields($this->_table);\n\t\t$this->_fields = array_diff($result, array('id'));\n\t}", "title": "" }, { "docid": "790d79dc3f7f78e1a3d01ec7a39b1952", "score": "0.5956906", "text": "public function compileUpdates($field = '');", "title": "" }, { "docid": "04cd5e770ebedc83493103369b505ee5", "score": "0.5951302", "text": "public function selectUpdatableFields(TimeTraveller $timeTraveller): array;", "title": "" }, { "docid": "8d1735e683a55f6705bbe0f26540de3b", "score": "0.59511554", "text": "public function getUpdates() {\n return $this->updates;\n }", "title": "" }, { "docid": "a2647a42cf756db5c5dd66b8ac5629a4", "score": "0.5938943", "text": "protected static function immutable_fields() {\n return array(\"id\");\n }", "title": "" }, { "docid": "e9dbcb0a0fb41189633e26abfaa1426c", "score": "0.59382933", "text": "public function fields(){\n\n $fields = parent::fields();\n\n unset(\n $fields['auth_key'],\n $fields['password_hash'],\n $fields['password_reset_token'],\n $fields['created_at'],\n $fields['updated_at'],\n $fields['verification_token'],\n $fields['address_id'],\n $fields['status']\n );\n\n return array_merge($fields, ['address', 'fullName']);\n }", "title": "" }, { "docid": "ab83aee66d33386981925b382c5c1e02", "score": "0.59365857", "text": "public function getDirty(): array\n {\n return $this->dirty;\n }", "title": "" }, { "docid": "943debb7c180e3bebac50f5d9737b37f", "score": "0.5922371", "text": "public function testUpdateExtraFields(): void { }", "title": "" }, { "docid": "aafd9db728fd1f77683348805ab68bbc", "score": "0.59214604", "text": "public function getDirty()\n {\n return array_keys($this->_dirty);\n }", "title": "" }, { "docid": "fcce94b766729ef6255531f919136b65", "score": "0.59051734", "text": "public function getFields(): array\n {\n return [\n 'id' => $this->id,\n 'exam_id' => $this->exam_id,\n 'reviewer_id' => $this->reviewer_id,\n 'status' => $this->status,\n ];\n }", "title": "" }, { "docid": "2e1286a7e2c094c64993af0971e2d5f3", "score": "0.5902122", "text": "public static function addMissingFieldsOnUpdate()\n {\n $oDbMetaDataHandler = oxNew('oxDbMetaDataHandler');\n\n $aTableFields = array(\n 'oepaypal_order' => 'OEPAYPAL_TIMESTAMP',\n 'oepaypal_orderpayments' => 'OEPAYPAL_TIMESTAMP',\n 'oepaypal_orderpaymentcomments' => 'OEPAYPAL_TIMESTAMP',\n );\n\n foreach ($aTableFields as $sTableName => $sFieldName) {\n if (!$oDbMetaDataHandler->fieldExists($sFieldName, $sTableName)) {\n oxDb::getDb()->execute(\n \"ALTER TABLE `\" . $sTableName\n . \"` ADD `\" . $sFieldName . \"` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;\"\n );\n }\n }\n }", "title": "" }, { "docid": "541f9040b14520c28a9a58efabc57353", "score": "0.5901462", "text": "protected function getUpdateDataChanges($entity, $initial_data)\n {\n $initial_data = (object) $initial_data;\n $data = [];\n foreach ($this->cols_fields as $col => $field) {\n $new = $entity->$field;\n $old = $initial_data->$field;\n if (! $this->compare($new, $old)) {\n $data[$col] = $new;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.5899151", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.5899151", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.5899151", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "c414ed230ffeab08e40f54a949f18237", "score": "0.58978444", "text": "protected function getUpdateMethodValidation(): array\n {\n return [\n 'name' => 'sometimes|string',\n 'price' => 'sometimes|integer',\n 'description' => 'sometimes|integer',\n ];\n }", "title": "" }, { "docid": "8cdeda89a091747de58738cef692e928", "score": "0.5883052", "text": "public function fields()\n {\n\n return [];\n }", "title": "" }, { "docid": "2eed5f9716259fcabf7391018ef16c62", "score": "0.5878057", "text": "protected function dirtyAttributes()\n {\n return array_keys($this->dirty);\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.58720404", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "625855fa190f59f2a13c8b2432dbbba2", "score": "0.5864658", "text": "function isModified() { \n \t return (boolean) count($this->modified_fields);\n \t}", "title": "" }, { "docid": "ed465dcbbd79fe223078940d3cf8163c", "score": "0.58509696", "text": "public function getDirty()\n {\n $dirty = [];\n\n foreach ($this->getAttributes() as $key => $value) {\n if (!$this->originalIsEquivalent($key, $value)) {\n $dirty[$key] = $value;\n }\n }\n\n return $dirty;\n }", "title": "" }, { "docid": "71a1c1da127902154d9077606aa3c3b0", "score": "0.58311725", "text": "public function getOriginalFields()\n\t{\n\t\treturn $this->_originalFields;\n\t}", "title": "" }, { "docid": "cb3c9035aafd8c0733892c983ad466be", "score": "0.583116", "text": "public function getChanges();", "title": "" }, { "docid": "cb3c9035aafd8c0733892c983ad466be", "score": "0.583116", "text": "public function getChanges();", "title": "" }, { "docid": "a337da5bc75f63867b350818b8fa48aa", "score": "0.58301747", "text": "public function getForUpdate()\n {\n $today = date('U', strtotime('today'));\n return $this\n ->where('is_deleted', 0)\n ->group_start()\n ->where('requested_at <', $today)\n ->or_where('requested_at IS NULL')\n ->group_end()\n ->get();\n }", "title": "" }, { "docid": "9e84f111178ebcc83e4c571d97551443", "score": "0.58282167", "text": "public function fields()\n {\n return [ \n ];\n }", "title": "" }, { "docid": "e506245367ac42fc562766836e229025", "score": "0.58239996", "text": "public function getToApiObjectFields() {\n return array();\n }", "title": "" }, { "docid": "2e1e1c9b65ab338e1a3c703083b9c16c", "score": "0.5815618", "text": "public function updateData()\n {\n return ([\n [\"2\", \"9898989898\", \"pune\", 302, \"manager-records\"]\n ]);\n }", "title": "" }, { "docid": "c81c16f3f514745c238d5925d83869d3", "score": "0.5791237", "text": "public function getFillableFieldsWithSameReceivedName(): array\n {\n return array_diff(array_keys(get_object_vars($this)), $this->getCalculatedFields());\n }", "title": "" }, { "docid": "4cdf2eb8671c9faf82e4854b94154e09", "score": "0.5781675", "text": "protected function getAdditionFields(): array\n {\n return $this->additionFields;\n }", "title": "" }, { "docid": "92a52c944e85fcd05e594b7b5d95e00a", "score": "0.5769983", "text": "public function getBuiltFields();", "title": "" }, { "docid": "f9623f370e53e2b51a64567ba017d762", "score": "0.57671463", "text": "protected function getAdditionFields(): array\n {\n if ($this->action->id == 'create' || $this->action->id == 'update') {\n return [\n 'aboutList' => About::find()->all(),\n ];\n }\n\n return $this->additionFields;\n }", "title": "" }, { "docid": "f8a2a17bbeed0c706703c9e9bb3c42a9", "score": "0.57624245", "text": "protected function getUniqueEntityFields()\n {\n\n // NOTE override if unique entity constraint applies\n return array();\n }", "title": "" }, { "docid": "b583bfa62287200b3be01dd7da97d769", "score": "0.5755797", "text": "protected function _update()\n {\n $hash = $this->hasChangedFields() ? $this->getChangedFields()\n : $this->getFields();\n\n $primary = array();\n\n // we should check if tabe has only one primary\n $keys = $this->_db->getPrimary();\n if (is_array($keys)) {\n foreach ($keys as $key) {\n $primary[\"{$key} = ?\"] = $this->_fields[$key];\n }\n }\n\n return $this->_db->update($hash, $primary);\n }", "title": "" }, { "docid": "cbb5413c6e33f7d272e7368901075bf8", "score": "0.57452226", "text": "public function onBeforeUpdate() {\n foreach (ar('requestBy,requestByManagerId,requestDate') as $prop) unset($this->_modified[$prop]);\n }", "title": "" }, { "docid": "9f1f2d6fa3e896cef6496fadee16f1a8", "score": "0.5744864", "text": "public function getModifiedData($id)\n\t{\n\t\t$result = array();\n\t\tif (isset($this->modified[$id])) {\n\t\t\tforeach (array_keys($this->modified[$id]) as $field) {\n\t\t\t\t$result[$field] = $this->data[$id][$field];\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "241a2c45fe41a7e2a786e94b3073fda3", "score": "0.5736758", "text": "function calculate_changes(&$fields, &$db_rec, &$sage_rec)\n{\n global $FIELD_MAP, $NULLIFY_INSTATE;\n\n $changes = ['notes'=> [], 'abbrevs'=> [], 'sqldata'=> []];\n\n foreach ($fields as $abbr) {\n $dbfld = $FIELD_MAP[$abbr]['db'];\n $sagefld = $FIELD_MAP[$abbr]['sage'];\n $db_val = get($db_rec, $dbfld, 'NULL');\n $sage_val = get($sage_rec, $sagefld, 'NULL');\n if (is_array($sage_val)) {\n $sage_val = get($sage_val, 'district', 'NULL');\n }\n\n if ($db_val != $sage_val) {\n if ($sage_val != 'NULL' || in_array($abbr, $NULLIFY_INSTATE)) {\n // If the SAGE value for the current field is \"null\" (and the original\n // value was not null), then the field will be nullified only if it's\n // one of the four primary district fields (CD, SD, AD, or ED).\n if ($sage_val == 'NULL') {\n $sage_val = 0;\n }\n $changes['abbrevs'][] = $abbr;\n $changes['sqldata'][$dbfld] = $sage_val;\n $changes['notes'][] = \"$abbr:$db_val=>$sage_val\";\n }\n else {\n $changes['notes'][] = \"$abbr:$db_val~=$db_val\";\n }\n }\n else {\n $changes['notes'][] = \"$abbr:$db_val==$sage_val\";\n }\n }\n\n return $changes;\n}", "title": "" }, { "docid": "f1f465ab1f36414c23c3c4fcbf82368a", "score": "0.5729673", "text": "public function allFields() : array {\n $return = [];\n $return[] = [\n 'name' => $this->yext()->uniqueYextIdFieldName(),\n 'type' => 'plaintext',\n ];\n $return[] = [\n 'name' => $this->yext()->uniqueYextLastUpdatedFieldName(),\n 'type' => 'plaintext',\n ];\n $return[] = [\n 'name' => $this->bio(),\n 'type' => 'formatted',\n ];\n $return[] = [\n 'name' => $this->headshot(),\n 'type' => 'image',\n ];\n $return[] = [\n 'name' => $this->raw(),\n 'type' => 'long text',\n ];\n foreach ($this->customFieldInfo() as $custom) {\n if (!empty($custom[1])) {\n $return[] = [\n 'name' => $custom[1],\n 'type' => 'plaintext',\n ];\n }\n }\n return $return;\n }", "title": "" }, { "docid": "8d7a0d9eb114b8cb5281d910e3276435", "score": "0.57243186", "text": "public function getAllTableFields() {\n return[\n 'id',\n 'user_name',\n 'reason_id',\n 'reason_description',\n 'is_added_by_cron',\n 'amount',\n 'added_in',\n 'created_at',\n 'updated_at'\n ];\n }", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.57233644", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.57233644", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.57233644", "text": "public function getFields(): array;", "title": "" }, { "docid": "a1ad16e2b94aad7fd2aebcf2e844c300", "score": "0.5719693", "text": "public function isUpdated() {}", "title": "" }, { "docid": "180ebd54f45c8d7f6501472034b20de7", "score": "0.57176286", "text": "public function submissionFields()\n {\n return array(\n 'missing change_type' => array('change_type'),\n 'missing change_items' => array('change_items'),\n );\n }", "title": "" } ]
e07846e6907a4d446f4dbde708e35b70
Generate UUIDs instead of integers for primary keys
[ { "docid": "d313968513d3bdee71517b5ed3b6f67b", "score": "0.66521", "text": "protected static function bootUsesUuid() {\n static::creating(function ($model) {\n if (! $model->getKey()) {\n $model->{$model->getKeyName()} = (string) Str::uuid();\n }\n });\n }", "title": "" } ]
[ { "docid": "23a9f28a99f63dfb554d9b25f333b027", "score": "0.7493878", "text": "public function generateId();", "title": "" }, { "docid": "1baa0f15040720ee94b7c536a128907b", "score": "0.74787724", "text": "abstract protected function generateId();", "title": "" }, { "docid": "e68b1be6021bb53700a2ce0d9ab8adeb", "score": "0.7229372", "text": "private function generateUuid(){\n $num = \"100.\" . $this->randomNumber();\n // to-do: make sure ID is not already taken\n $id = \"[UUID:\" . $num . \"]\";\n return $id;\n }", "title": "" }, { "docid": "62edf521af37a2c2e38800c9a9d36406", "score": "0.7147951", "text": "public function uuid();", "title": "" }, { "docid": "6aa8c8f28de436bb6924dc0ef2b9200d", "score": "0.7074531", "text": "protected function generateUuid()\n {\n return Str::uuid();\n }", "title": "" }, { "docid": "70eda5f18c229f2707870207369621c5", "score": "0.7060883", "text": "private function generateId() {\n $count = $this->getRowCount($this->tableName) + 1;\n $id = \"E\" . str_pad($count, 4, '0', STR_PAD_LEFT);\n return $id;\n }", "title": "" }, { "docid": "090fa7ece7daba9600a70937cbcaaf4d", "score": "0.705448", "text": "function uuid()\n{\n //Génération d'un nombre aléatoire\n do {\n $cstrong = true;\n $bytes = openssl_random_pseudo_bytes(4, $cstrong);\n $uuid = bin2hex($bytes) . \"-\";\n\n $bytes = openssl_random_pseudo_bytes(2, $cstrong);\n $uuid = $uuid . bin2hex($bytes) . \"-\";\n\n $bytes = openssl_random_pseudo_bytes(2, $cstrong);\n $uuid = $uuid . bin2hex($bytes) . \"-\";\n\n $bytes = openssl_random_pseudo_bytes(2, $cstrong);\n $uuid = $uuid . bin2hex($bytes) . \"-\";\n\n $cstrong = true;\n $bytes = openssl_random_pseudo_bytes(6, $cstrong);\n $uuid = $uuid . bin2hex($bytes);\n } while (checkUUID($uuid));\n\n return $uuid;\n}", "title": "" }, { "docid": "ef985545ec21ea2d5833b87bb6d0de4b", "score": "0.70289564", "text": "public function uuid() {}", "title": "" }, { "docid": "325186137354a893b4dd036327b531dc", "score": "0.70147645", "text": "function uniqueId() {\n\t$randomKey = rand(0, 99999999);\n\treturn padNumber( $randomKey, 8 );\n}", "title": "" }, { "docid": "2532215c72eddd0b1a134825229dbacf", "score": "0.69967043", "text": "private function gen_uuid()\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "d76c9fc39fa9f3429b6ab090fc39ff7f", "score": "0.6970839", "text": "public static function genUUIDv4(): string;", "title": "" }, { "docid": "65ee235b301333fd0e368c626f2f9628", "score": "0.6965487", "text": "protected function generateId()\n {\n return md5($this->name . $this->description . $this->discountType . $this->combinable);\n }", "title": "" }, { "docid": "ba1940606c63c62cf9fd6ddffc6a576e", "score": "0.6956526", "text": "public function generateUuidV4(): string;", "title": "" }, { "docid": "252c674a746d6a45700f734b07fb3d6c", "score": "0.6947757", "text": "public function getUuidColumn(): string\n {\n return 'uuid';\n }", "title": "" }, { "docid": "252c674a746d6a45700f734b07fb3d6c", "score": "0.6947757", "text": "public function getUuidColumn(): string\n {\n return 'uuid';\n }", "title": "" }, { "docid": "f8dd6920517cf7f6d670ad6180de7acb", "score": "0.69373304", "text": "public static function bootUuidKey()\n {\n static::creating(function ($model)\n {\n // generate UUID key for new record\n $model->{$model->getKeyName()} = (string) Uuid::uuid4();\n });\n }", "title": "" }, { "docid": "23832b1c3a291c7615017342e2c283ef", "score": "0.69239277", "text": "public function testGeneratingId()\n {\n $entity = new stdClass();\n $idGenerator = new UuidV4Generator();\n $id1 = $idGenerator->generate($entity);\n $id2 = $idGenerator->generate($entity);\n $this->assertNotSame($id1, $id2);\n $this->assertEquals(36, strlen($id1));\n $this->assertEquals(36, strlen($id2));\n }", "title": "" }, { "docid": "66cb5bb82a129d45cba2c702f7e9037f", "score": "0.69138455", "text": "function gen_uuid() {\n return sprintf( '%04x%04x%04x%04x%04x%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_mid\"\n mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand( 0, 0x0fff ) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand( 0, 0x3fff ) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n}", "title": "" }, { "docid": "b37f9bd518ffd4867912c758095eed64", "score": "0.69025964", "text": "private function createId()\n {\n $data = openssl_random_pseudo_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0010\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "title": "" }, { "docid": "58ddc7e730e2207557da77d15fbe1767", "score": "0.689626", "text": "function new_uuid($insert=false) {\n\tif (function_exists('uuid_create')) {\n\t\tuuid_create($v4);\n\t\tuuid_make($v4, UUID_MAKE_V4);\n\t\tuuid_export($v4, UUID_FMT_STR, $v4String);\n\t\t$uuid = $v4String;\n\t} else {\n\t\t$uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\n\t\t// 32 bits for \"time_low\"\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\n \t\t// 16 bits for \"time_mid\"\n\t\tmt_rand(0, 0xffff),\n\n\t\t// 16 bits for \"time_hi_and_version\",\n\t\t// four most significant bits holds version number 4\n\t\tmt_rand(0, 0x0fff) | 0x4000,\n\n\t\t// 16 bits, 8 bits for \"clk_seq_hi_res\",\n\t\t// 8 bits for \"clk_seq_low\",\n\t\t// two most significant bits holds zero and one for variant DCE1.1\n\t\tmt_rand(0, 0x3fff) | 0x8000,\n\n\t\t// 48 bits for \"node\"\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n\t\t);\n\t}\n\t\n\tif ($insert) {\n\t\t// insert the new uuid\n\t\t$inTable = 'items';\n\t\tif (isset($_SESSION['id_study'])) {\n\t\t\t$id_study = $_SESSION['id_study'];\n\t\t} else {\n\t\t\t$id_study = '';\n\t\t}\n\t\tif (isset($_SESSION['sample_type'])) {\n\t\t\t$sample_type = $_SESSION['sample_type'];\n\t\t} else {\n\t\t\t$sample_type = '';\n\t\t}\n\t\tif (isset($_SESSION['shipment_type'])) {\n\t\t\t$shipment_type = $_SESSION['shipment_type'];\n\t\t} else {\n\t\t\t$shipment_type = ''; \n\t\t}\n\t\tif (isset($_SESSION['id_visit'])) {\n\t\t\t$id_visit = $_SESSION['id_visit'];\n\t\t} else {\n\t\t\t$id_visit = '';\n\t\t}\n\t\t$id = insUuid($uuid,'unassigned',$id_study,$sample_type,$shipment_type,$id_visit);\n\t\t$_SESSION['containertype'] = 'unassigned';\n\t\t$_SESSION['containerid'] = $id;\n\t\t$_SESSION['divX_'.$id] = 0;\n\t}\n\t\treturn $uuid;\n}", "title": "" }, { "docid": "05d8b550ae696ed9173f3674036857a0", "score": "0.6896107", "text": "public static function create_uuid()\n {\n /* If we're on Linux, then we'll use a system function for that. */\n\n if (file_exists(\"/proc/sys/kernel/random/uuid\")) {\n return trim(file_get_contents(\"/proc/sys/kernel/random/uuid\"));\n }\n\n /* On other systems (as well as on some other Linux distributions)\n * fall back to the original implementation (which is NOT safe - we had\n * one duplicate during 3 years of its running). */\n\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "b4806b41cf7c30a89df35e020f6ce811", "score": "0.6891778", "text": "static function uuid() {\n \n // The field names refer to RFC 4122 section 4.1.2\n \n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "title": "" }, { "docid": "7ae1c95d0e594ffc5fd1d2f1a9654599", "score": "0.6888683", "text": "static function uuid() {\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n mt_rand( 0, 0x0fff ) | 0x4000,\n mt_rand( 0, 0x3fff ) | 0x8000,\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );\n }", "title": "" }, { "docid": "ea26113eae89fc8c303826c00b80d826", "score": "0.6885294", "text": "public function generateNewId()\n\t{\n\t\treturn Uuid::uuid4();\n\t}", "title": "" }, { "docid": "2cbd82176cb38bdee215b224823964bd", "score": "0.68826306", "text": "function _generateId(){\n static $idx = 1;\n\n if (!$this->getAttribute('id')) {\n $this->updateAttributes(array('id' => 'id_'. substr(md5(microtime() . $idx++), 0, 6)));\n }\n }", "title": "" }, { "docid": "7ecdd6be15be035d9f924bc8c6f811cf", "score": "0.68655586", "text": "function uuid() {\n \t\treturn sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n \t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n \t\tmt_rand( 0, 0x0fff ) | 0x4000,\n \t\tmt_rand( 0, 0x3fff ) | 0x8000,\n \t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );\n \t\t}", "title": "" }, { "docid": "1777404bc5f3d667333808f4ebf67115", "score": "0.68629247", "text": "function generateUuid() {\n\n $data = openssl_random_pseudo_bytes(16);\n assert(strlen($data) == 16);\n\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "title": "" }, { "docid": "8602da25f1d298ad5ee00068caf0e98a", "score": "0.6857617", "text": "public static final function generateUUID(){\n\n\t\t//Execution\n\t\t$result = OrmDb::execute('SELECT UUID() AS uuid;',\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\"Database error during OrmCore::generateUUID()\");\n\n\t\t$row=$result->FetchRow();\n\n\t\treturn $row['uuid'];\n\t}", "title": "" }, { "docid": "55674f103319a61d9b36be40f291cc28", "score": "0.6838691", "text": "public static function genUniqID(){\n\t//if($this->where(''))\n\treturn \\MS\\Core\\Helper\\Comman::random(4,1);\n}", "title": "" }, { "docid": "d027bbf30b6c39d92f72e8dbe9ca3abf", "score": "0.6829096", "text": "function uuid() {\n\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(_ml_substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "title": "" }, { "docid": "6569bd355edff740de0879c2cfd88875", "score": "0.6806679", "text": "public function generateUuid() {\n\t\t$uuid = '';\n\t\tfor ($i = 0; $i < 16; $i++) {\n\t\t\t$int = mt_rand(0, 255);\n\t\t\t$uuid .= (($int < 15) ? 0 : '') . dechex($int);\n\t\t}\n\t\treturn $uuid;\n\t}", "title": "" }, { "docid": "402d046bd95747f74730575bd9507aff", "score": "0.679868", "text": "function uuid () {\n return UUID::UUIDv4();\n}", "title": "" }, { "docid": "4fbd461903cf5571a75fb063d2249d1b", "score": "0.6787622", "text": "function uuid() {\r\n \r\n\t// The field names refer to RFC 4122 section 4.1.2\r\n \r\n\treturn sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\r\n\t\tmt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\r\n\t\tmt_rand(0, 65535), // 16 bits for \"time_mid\"\r\n\t\tmt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\r\n\t\tbindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\r\n\t\t\t// 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\r\n\t\t\t// (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\r\n\t\t\t// 8 bits for \"clk_seq_low\"\r\n\t\tmt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\" \r\n\t); \r\n }", "title": "" }, { "docid": "7a53ce198b1296e70f94f72b8f888d10", "score": "0.6763336", "text": "final private function generateUuid()\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "dd11f4fa4a3744dc4e42b91e9834c402", "score": "0.67440873", "text": "public static function generate_uuid() {\n $uuid = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n mt_rand( 0, 0xffff ),\n mt_rand( 0, 0x0C2f ) | 0x4000,\n mt_rand( 0, 0x3fff ) | 0x8000,\n mt_rand( 0, 0x2Aff ), mt_rand( 0, 0xffD3 ), mt_rand( 0, 0xff4B )\n );\n\n return strtoupper($uuid);\n }", "title": "" }, { "docid": "3b6435b342fc8f8bc9dcf2fbd08bd2aa", "score": "0.6736533", "text": "public function uuid()\n\t{\n\t\treturn sprintf(\n\t\t\t\"%04x%04x-%04x-4%03x-%04x-%04x%04x%04x\",\n\t\t\tmt_rand( 0, 65535 ), mt_rand( 0, 65535 ), // 32 bits for \"time_low\"\n\t\t\tmt_rand( 0, 65535 ), // 16 bits for \"time_mid\"\n\t\t\tmt_rand( 0, 4095 ), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n\t\t\tbindec( substr_replace( sprintf( \"%016b\", mt_rand( 0, 65535 ) ), '01', 6, 2 ) ),\n\t\t\t// 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n\t\t\t// (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n\t\t\t// 8 bits for \"clk_seq_low\"\n\t\t\tmt_rand( 0, 65535 ), mt_rand( 0, 65535 ), mt_rand( 0, 65535 ) // 48 bits for \"node\" \n\t\t); \n\t}", "title": "" }, { "docid": "0f055e8e016e18c7cabe230e0d686d24", "score": "0.6733116", "text": "public static function generateUuid() {\n\t\n\t\t// Generate the characters\n\t\t$chars = md5(uniqid(rand(), TRUE));\n\t\t\n\t\t// Hopefully this conforms to a standard, and can be used as a Microsoft GUID.\n\t\t// To achive this, we need to change come bytes.\n\t\t// The flags the UUID as \"random type\"\n\t\t$byte = hexdec(substr($chars, 12, 2));\n\t\t$byte = $byte & hexdec(\"0f\");\n\t\t$byte = $byte | hexdec(\"40\");\n\t\t$chars = substr_replace($chars, strtoupper(dechex($byte)), 12, 2);\n\t\t\n\t\t// This sets the variant of the UUID\n\t\t$byte = hexdec(substr($chars, 16, 2));\n\t\t$byte = $byte & hexdec(\"3f\");\n\t\t$byte = $byte | hexdec(\"80\");\n\t\t$chars = substr_replace($chars, strtoupper(dechex($byte)), 16, 2);\n\t\t\n\t\t// create UUID string\n\t\t$uuid = sprintf(\"%s-%s-%s-%s-%s\", substr($chars, 0, 8), substr($chars, 8, 4), substr($chars, 12, 4), substr($chars, 16, 4), substr($chars, 20, 12)); \n\t\t\n\t\t// return the UUID\n\t\treturn strtoupper($uuid);\n\t\t\n\t}", "title": "" }, { "docid": "fde217cb853768e7558cc6ea4909e829", "score": "0.67323977", "text": "function uuid() {\r\n // http://www.ietf.org/rfc/rfc4122.txt\r\n\r\n \treturn sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\r\n //mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\r\n 0,0,\r\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\r\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\r\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\r\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\r\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\r\n // 8 bits for \"clk_seq_low\"\r\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\" \r\n \t); \r\n\t}", "title": "" }, { "docid": "c3b640eec0211a2fa97738ac8b05e5a4", "score": "0.6729591", "text": "function generate_uuid_v4 ()\r\n{\r\n\treturn sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\r\n\r\n\t\t// 32 bits for \"time_low\"\r\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff),\r\n\r\n\t\t// 16 bits for \"time_mid\"\r\n\t\tmt_rand(0, 0xffff),\r\n\r\n\t\t// 16 bits for \"time_hi_and_version\",\r\n\t\t// four most significant bits holds version number 4\r\n\t\tmt_rand(0, 0x0fff) | 0x4000,\r\n\r\n\t\t// 16 bits, 8 bits for \"clk_seq_hi_res\",\r\n\t\t// 8 bits for \"clk_seq_low\",\r\n\t\t// two most significant bits holds zero and one for variant DCE1.1\r\n\t\tmt_rand(0, 0x3fff) | 0x8000,\r\n\r\n\t\t// 48 bits for \"node\"\r\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\r\n\t\t);\r\n}", "title": "" }, { "docid": "5c00c7814ad27d7276c812601b1804fa", "score": "0.672075", "text": "static public function generateId() {\n return bin2hex(openssl_random_pseudo_bytes(32));\n }", "title": "" }, { "docid": "0e5694e5c8548d7186c4fd85cf6827e8", "score": "0.6710875", "text": "protected function generateId(): string\n {\n return uniqid(date('YmdHms'), false);\n }", "title": "" }, { "docid": "91c1a7f6b982a37f89edeb89121c5cfb", "score": "0.6709547", "text": "function getGeneratedId();", "title": "" }, { "docid": "6ba6d01a4ec2c040b331d81f02df58c6", "score": "0.6698648", "text": "public static function GenerateUUID() : string {\n $data = openssl_random_pseudo_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "title": "" }, { "docid": "784a5cb0948070291b104ff8494bfdb3", "score": "0.66768384", "text": "public static function createUuid()\n\t{\n\t\treturn sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\t// 32 bits for \"time_low\"\n\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n\t\t\t// 16 bits for \"time_mid\"\n\t\t\tmt_rand( 0, 0xffff ),\n\n\t\t\t// 16 bits for \"time_hi_and_version\",\n\t\t\t// four most significant bits holds version number 4\n\t\t\tmt_rand( 0, 0x0fff ) | 0x4000,\n\n\t\t\t// 16 bits, 8 bits for \"clk_seq_hi_res\",\n\t\t\t// 8 bits for \"clk_seq_low\",\n\t\t\t// two most significant bits holds zero and one for variant DCE1.1\n\t\t\tmt_rand( 0, 0x3fff ) | 0x8000,\n\n\t\t\t// 48 bits for \"node\"\n\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n\t\t);\n\t}", "title": "" }, { "docid": "d2907623a63de762f7d10594efcb4a31", "score": "0.66713977", "text": "protected function _randomid()\n {\n return strval(new Horde_Support_Randomid());\n }", "title": "" }, { "docid": "a1bec51a6b137fdac2a49ae0d34225af", "score": "0.66700715", "text": "protected function generateUuid()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "b333be5b54fb79ff5eadcfa56c9a03ae", "score": "0.66690785", "text": "public static function guidv4()\n {\n $data = openssl_random_pseudo_bytes( 16 );\n $data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100\n $data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10\n\n return vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $data ), 4 ) );\n }", "title": "" }, { "docid": "e23e77547274f50095a325f58bd30b15", "score": "0.6658428", "text": "function CreateID() {\n $result = \"\";\n $length = 16;\n for ($i=0; $i < $length; $i++) {\n $result.= dechex(mt_rand(0,$length-1));\n }\n return $result;\n }", "title": "" }, { "docid": "cfa309f027b0105bd2a64ccd2df1b104", "score": "0.66467834", "text": "public static function createUuid()\n\t\t{\n\t\t\t$data = \\openssl_random_pseudo_bytes(16);\n\n\t\t\t// set the version to 0100\n\t\t\t$data[6] = \\chr(\\ord($data[6]) & 0x0f | 0x40);\n\t\t\t// set bits 6-7 to 10\n\t\t\t$data[8] = \\chr(\\ord($data[8]) & 0x3f | 0x80);\n\n\t\t\treturn \\vsprintf('%s%s-%s-%s-%s-%s%s%s', \\str_split(\\bin2hex($data), 4));\n\t\t}", "title": "" }, { "docid": "fc4efb6e72f6d8958140026412d73e2a", "score": "0.663497", "text": "public static function UUID(): string\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\n // 32 bits for \"time_low\"\n random_int(0, 0xffff), random_int(0, 0xffff),\n\n // 16 bits for \"time_mid\"\n random_int(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\", four most significant bits holds version number 4\n random_int(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\", 8 bits for \"clk_seq_low\", two most significant bits holds zero and\n // one for variant DCE1.1\n random_int(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n random_int(0, 0xffff), random_int(0, 0xffff), random_int(0, 0xffff)\n );\n }", "title": "" }, { "docid": "ff1ab922633157784a3328e62f8f237c", "score": "0.66309947", "text": "public function uniqueId(): int;", "title": "" }, { "docid": "c59341e864d8f7eb068f1d5800ab9527", "score": "0.6626995", "text": "protected function id()\n {\n return Str::random(32);\n }", "title": "" }, { "docid": "e7e0869503d1700be8b5d45a78e9568b", "score": "0.66217035", "text": "function genId(){\n\n\t\t$id_arr['IdCreator']=array('id'=>NULL);\n\t\t$this->create();\n\t\t$this->save($id_arr);\n\t\treturn $this->id;\n\n\t}", "title": "" }, { "docid": "2f7c263c34ad677292554c79059bbd7d", "score": "0.66066164", "text": "public function uuid() {\n }", "title": "" }, { "docid": "e3ba9af5f705440bba65f778bc759d06", "score": "0.6601688", "text": "public static function uuid()\r\n {\r\n return sprintf(\r\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\r\n mt_rand(0, 0xffff),\r\n mt_rand(0, 0xffff),\r\n mt_rand(0, 0xffff),\r\n mt_rand(0, 0x0fff) | 0x4000,\r\n mt_rand(0, 0x3fff) | 0x8000,\r\n mt_rand(0, 0xffff),\r\n mt_rand(0, 0xffff),\r\n mt_rand(0, 0xffff)\r\n );\r\n }", "title": "" }, { "docid": "75d033f6cb2fff8c6dacd439a1581bd0", "score": "0.65943736", "text": "public static function bootUuids()\n {\n static::creating(function (Model $model) {\n $model->{$model->getKeyName()} = Str::orderedUuid()->toString();\n });\n }", "title": "" }, { "docid": "0334a3093d566f1ae5c74951a9b0beb2", "score": "0.65543956", "text": "private function generateUuid(): string\n {\n $g = $this->getUuidGenerator();\n\n return $g();\n }", "title": "" }, { "docid": "7586f4ed5c5e8effaa82aefdc3cd9185", "score": "0.6550013", "text": "public function generateTransId()\n {\n $numberPool = range(0, 9);\n $alphaPool = range('a', 'z');\n $upperCaseAlphaPool = range('A', 'Z');\n $arrayPool = array_merge($numberPool, $alphaPool, $upperCaseAlphaPool);\n shuffle($arrayPool);\n $result = array_slice($arrayPool, 0, 16);\n $tranxId = implode('', $result);\n\n return $tranxId;\n }", "title": "" }, { "docid": "4e1cc00da16a136f77bf7584a8fa1e26", "score": "0.6541886", "text": "private function getRandomId(): string\n {\n return bin2hex(random_bytes(12));\n }", "title": "" }, { "docid": "8d9bb373c4ae2e4314a4bc1c5bc235ed", "score": "0.65332806", "text": "function guidv4($data = null) {\r\n $data = $data ?? random_bytes(16);\r\n assert(strlen($data) == 16);\r\n\r\n // Set version to 0100\r\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\r\n // Set bits 6-7 to 10\r\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\r\n\r\n // Output the 36 character UUID.\r\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\r\n}", "title": "" }, { "docid": "af06260864a82d5e174496c852d9e831", "score": "0.6532566", "text": "function upfront_get_unique_id ($pfx = '') {\n\treturn sprintf(\"%s-%s-%s\", ($pfx ? $pfx : \"entity\"), time(), rand(1000,99999));\n}", "title": "" }, { "docid": "936f35db7040a34ffbf3761b8cd39dc4", "score": "0.6531899", "text": "function gaGenUUID() {\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_mid\"\n mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand( 0, 0x0fff ) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand( 0, 0x3fff ) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n}", "title": "" }, { "docid": "16f122021695ea1f8b81ab0b1bfcc696", "score": "0.6530137", "text": "public function generateUuid()\n {\n $version = 'uuid'.$this->getUuidVersion();\n\n return \\Ramsey\\Uuid\\Uuid::$version()->toString();\n }", "title": "" }, { "docid": "ee5fe4408869552b8395f06a41725a38", "score": "0.65257484", "text": "public function generateUniqueID(){\n\t\t// \t\treturn base64_encode(uniqid() . substr(uniqid(), 11, 2));\t// e.g. NGYcZDRjODcxYzFkY2Rk (seems popular format)\n\t\t// \t\treturn uniqid();\t\t\t\t\t// e.g. 4f3d4c8602346\n\t\treturn str_replace('.', '', uniqid('', true));\t\t// e.g. 4f3d4c860235a529118898\n\t\t// \t\treturn str_replace('-', '', String::uuid());\t\t// e.g. 4f3d4c80cb204b6a8e580a006f97281a\n\t}", "title": "" }, { "docid": "18c0b1ac85a068360426fa2d6ed1ee11", "score": "0.6525354", "text": "protected static function createId() {\n if (!isset(self::$_idFormat)) {\n self::$_idFormat = sprintf('wmailer.id.%.5f.%d.%%05d', microtime(true), rand(1000, 9999));\n }\n return sprintf(self::$_idFormat, ++self::$_idIndex);\n }", "title": "" }, { "docid": "4e6b7b0a68b7452a3182a7ab8a5fcad0", "score": "0.6525127", "text": "function uuid() { \r\n\r\n // Generate 128 bit random sequence\r\n $randmax_bits = strlen(base_convert(mt_getrandmax(), 10, 2)); // how many bits is mt_getrandmax()\r\n $x = '';\r\n while (strlen($x) < 128) {\r\n $maxbits = (128 - strlen($x) < $randmax_bits) ? 128 - strlen($x) : $randmax_bits;\r\n $x .= str_pad(base_convert(mt_rand(0, pow(2,$maxbits)), 10, 2), $maxbits, \"0\", STR_PAD_LEFT);\r\n }\r\n\r\n // break into fields\r\n $a = array();\r\n $a['time_low_part'] = substr($x, 0, 32);\r\n $a['time_mid'] = substr($x, 32, 16);\r\n $a['time_hi_and_version'] = substr($x, 48, 16);\r\n $a['clock_seq'] = substr($x, 64, 16);\r\n $a['node_part'] = substr($x, 80, 48);\r\n \r\n // Apply bit masks for \"random or pseudo-random\" version per RFC\r\n $a['time_hi_and_version'] = substr_replace($a['time_hi_and_version'], '0100', 0, 4);\r\n $a['clock_seq'] = substr_replace($a['clock_seq'], '10', 0, 2);\r\n\r\n // Format output\r\n return sprintf('%s%s%s%s%s',\r\n str_pad(base_convert($a['time_low_part'], 2, 16), 8, \"0\", STR_PAD_LEFT),\r\n str_pad(base_convert($a['time_mid'], 2, 16), 4, \"0\", STR_PAD_LEFT),\r\n str_pad(base_convert($a['time_hi_and_version'], 2, 16), 4, \"0\", STR_PAD_LEFT),\r\n str_pad(base_convert($a['clock_seq'], 2, 16), 4, \"0\", STR_PAD_LEFT),\r\n str_pad(base_convert($a['node_part'], 2, 16), 12, \"0\", STR_PAD_LEFT));\r\n}", "title": "" }, { "docid": "ba1da559440629bc2e40e091d9554fbc", "score": "0.65174824", "text": "public static function uuidSecure() {\n\n $pr_bits = null;\n $fp = @fopen('/dev/urandom','rb');\n if ($fp !== false) {\n $pr_bits .= @fread($fp, 16);\n @fclose($fp);\n } else {\n $this->cakeError('randomNumber');\n }\n\n $time_low = bin2hex(substr($pr_bits,0, 4));\n $time_mid = bin2hex(substr($pr_bits,4, 2));\n $time_hi_and_version = bin2hex(substr($pr_bits,6, 2));\n $clock_seq_hi_and_reserved = bin2hex(substr($pr_bits,8, 2));\n $node = bin2hex(substr($pr_bits,10, 6));\n\n /**\n * Set the four most significant bits (bits 12 through 15) of the\n * time_hi_and_version field to the 4-bit version number from\n * Section 4.1.3.\n * @see http://tools.ietf.org/html/rfc4122#section-4.1.3\n */\n $time_hi_and_version = hexdec($time_hi_and_version);\n $time_hi_and_version = $time_hi_and_version >> 4;\n $time_hi_and_version = $time_hi_and_version | 0x4000;\n\n /**\n * Set the two most significant bits (bits 6 and 7) of the\n * clock_seq_hi_and_reserved to zero and one, respectively.\n */\n $clock_seq_hi_and_reserved = hexdec($clock_seq_hi_and_reserved);\n $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved >> 2;\n $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved | 0x8000;\n\n return sprintf('%08s-%04s-%04x-%04x-%012s',\n $time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node);\n }", "title": "" }, { "docid": "20a3d756f75d18381379b5eb3906e644", "score": "0.65080774", "text": "public function getUuid();", "title": "" }, { "docid": "304b9a2df19c92abac5696f47e68728a", "score": "0.65058035", "text": "protected function getUuid(): string\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "e1ced96ff3e415c56592f6fcbf26d18a", "score": "0.649672", "text": "function guidv4($data = null) {\n // Generate 16 bytes (128 bits) of random data or use the data passed into the function.\n $data = $data ?? random_bytes(16);\n assert(strlen($data) == 16);\n\n // Set version to 0100\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n // Set bits 6-7 to 10\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n // Output the 36 character UUID.\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "title": "" }, { "docid": "a8bbbb75e0867bf4acbee10c86b09be8", "score": "0.6486686", "text": "protected static function generateUuid(): string\n {\n return uniqid(time(), true);\n }", "title": "" }, { "docid": "b0690140bb39506869a02b05b4a5d956", "score": "0.6484597", "text": "public function getGuid();", "title": "" }, { "docid": "fa7df3e4f6b2541b2b64479f6b5e7f4e", "score": "0.64649665", "text": "public static function generateUUID()\n {\n return PackageUuid::generate()->string;\n }", "title": "" }, { "docid": "b26009c7364dd59066dfc3d54b5d80b9", "score": "0.6459189", "text": "function blowfish_uuid()\n {\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(_ml_substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "title": "" }, { "docid": "8d095cfb30f806fea7e18e0997f6fb95", "score": "0.645865", "text": "public static function unique_ID($uids = array()){\n\n \tif (function_exists('openssl_random_pseudo_bytes')) {\n\n \t\t// openssl_random_pseudo_bytes\n\n \t\t$uid = substr(bin2hex(openssl_random_pseudo_bytes(5)), 0, 9);\n\n \t} else {\n\n \t\t// fallback\n\n \t\t$keyspace = '0123456789abcdefghijklmnopqrstuvwxyz';\n \t\t$keyspace_length = 36;\n \t\t$uid = '';\n\n \t\tfor ($i = 0; $i < 9; $i++) {\n \t\t\t$uid .= $keyspace[rand(0, $keyspace_length - 1)];\n }\n\n \t}\n\n \tif( in_array( $uid, $uids ) ){\n \t\treturn self::unique_ID($uids);\n \t}\n\n \treturn $uid;\n }", "title": "" }, { "docid": "fa8f07e2c1d1768d4f67772458aaa494", "score": "0.6437403", "text": "public static function generateUid($chars = 36): string\n {\n try {\n return (string) Uuid::uuid4();\n } catch (\\Exception $e) {\n Log::error(\n \"[P24Transaction::generateUid()]: Unable to generate P24Transaction's UUID due to: \"\n .$e->getMessage()\n );\n\n return Str::random($chars);\n }\n }", "title": "" }, { "docid": "119f2b3090232e0cb9bef0880dc75850", "score": "0.64349324", "text": "public function generateUUIDV4(): string\n {\n $data = random_bytes(16);\n $data[6] = chr((ord($data[6]) & 0x0f) | 0x40);\n $data[8] = chr((ord($data[8]) & 0x3f) | 0x80);\n return strtoupper(vsprintf(\"%s%s-%s-%s-%s-%s%s%s\", str_split(bin2hex($data), 4)));\n }", "title": "" }, { "docid": "93df89cc75b80b89e656ff342f91dfaa", "score": "0.6425643", "text": "function makeSecureUUID() {\n\n if (function_exists('com_create_guid') === true) {\n return trim(com_create_guid(), '{}');\n }\n \n return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', \n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n}", "title": "" }, { "docid": "40644f5f6c127509cc258f00e1d610a6", "score": "0.63881606", "text": "function get_unique_id()\n{\n\tstatic $id = 0;\n\treturn 'ud' . ($id ++);\n}", "title": "" }, { "docid": "53b74437b38a1fd7951bf75893fb431c", "score": "0.63766026", "text": "public function generateId() {\n return uniqid(); //for only one server \n }", "title": "" }, { "docid": "0cc506d9ccf484fab7bcd344a8655592", "score": "0.6375684", "text": "protected static function createGUID() {\n\t\tself::$intOrders = self::$intOrders + 2;\n\t\t$intNewID = self::$intOrders;\n\t\tself::$arrIDs[] = $intNewID;\n\n\t\treturn $intNewID;\n\t}", "title": "" }, { "docid": "e635aceb3a3303ea3e20c5e24bd0a5f0", "score": "0.6369575", "text": "function rand_uniqid() {\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n}", "title": "" }, { "docid": "f3e13404d374f9ce6d2a1bec2aa4f44b", "score": "0.6368756", "text": "protected static function randomGenerator()\n {\n $uuid = static::randomBytes(16);\n $uuid[8] = chr(ord($uuid[8]) & static::CLEAR_VAR | static::VAR_RFC);\n $uuid[6] = chr(ord($uuid[6]) & static::CLEAR_VER | static::VERSION_4);\n\n return $uuid;\n }", "title": "" }, { "docid": "d376b4eb401c2a4362cb50abdb289eac", "score": "0.6358482", "text": "private function generateUuid()\n {\n $salt = \\PHP_DDNS\\Core\\PHP_DDNS_Helper::generateRandomString( 10 );\n return hash( 'sha1', \\PHP_DDNS\\Core\\PHP_DDNS_Helper::encrypt( ( ( isset( $this->CONFIG['name'] ) ) ? $this->CONFIG['name'] : $this->getDeviceName() ), $salt ) );\n }", "title": "" }, { "docid": "a98ec2f51be02825b5e5a7e6e5f4491c", "score": "0.635415", "text": "protected function generateEntityIdentifier()\n {\n $length = 16;\n\n $identifier = str_random($length);\n while (Entity::whereIdentifier($identifier)->count() !== 0) {\n $identifier = str_random($length);\n }\n\n return $identifier;\n }", "title": "" }, { "docid": "27a75680463b76c83d9d1ff30fe07ae6", "score": "0.6350204", "text": "function generateTransferId():string{\n return uniqid(true);\n }", "title": "" }, { "docid": "3e4c866f5c3bdbe5bca23f3a06c270ed", "score": "0.63483125", "text": "public function customCreateGuid() {\n if (function_exists('com_create_guid')) {\n return com_create_guid();\n } else {\n mt_srand((double) microtime() * 10000); // Optional for php 4.2.0 and up.\n $charid = strtoupper(md5(uniqid(rand(), true)));\n $hyphen = chr(45); // \"-\"\n $uuid = \"\" // \"{\"\n . substr($charid, 0, 8) . $hyphen\n . substr($charid, 8, 4) . $hyphen\n . substr($charid, 12, 4) . $hyphen\n . substr($charid, 16, 4) . $hyphen\n . substr($charid, 20, 12)\n . \"\"; // \"}\"\n return $uuid;\n }\n }", "title": "" }, { "docid": "3962459da1a1a268025945a21a54409f", "score": "0.6335511", "text": "public function generatePublicId()\n {\n $this->public_id = 'USR' . time();\n }", "title": "" }, { "docid": "3c23ca900eb3f88e51a8cd958d978166", "score": "0.6332755", "text": "public function generate_uniqid()\n {\n return '0'.substr(uniqid(rand()), 0, 11);\n }", "title": "" }, { "docid": "8df0dba3684bc5fa09677bae52ac9f70", "score": "0.6332254", "text": "function create_guid()\n\n{\n\n $microTime = microtime();\n list($a_dec, $a_sec) = explode(\" \", $microTime);\n\n $dec_hex = sprintf(\"%x\", $a_dec* 1000000);\n $sec_hex = sprintf(\"%x\", $a_sec);\n\n ensure_length($dec_hex, 5);\n ensure_length($sec_hex, 6);\n\n $guid = \"\";\n $guid .= $dec_hex;\n $guid .= create_guid_section(3);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= $sec_hex;\n $guid .= create_guid_section(6);\n\n return $guid;\n}", "title": "" }, { "docid": "fecac44a5ad38d0e28052f18a9873907", "score": "0.6326347", "text": "public function random_id(){\n $idFirstName = 'UP';\n $idList = $this->findColumn();\n if ($idList) {\n $isUnique = false;\n while(!$isUnique) { \n $id = $this->randomGenerator(5);\n $id = $id;\n if(!in_array($id, $idList['idUser'])){\n $isUnique = true;\n }\n }\n $id = $idFirstName.$id;\n }else {\n $id = $this->randomGenerator(5);\n $id = $idFirstName.$id;\n }\n return $id;\n\n }", "title": "" }, { "docid": "b985df10725f3baa2b9cce019f0148ca", "score": "0.63180995", "text": "public function defaultUuidAttribute()\n {\n return (string) Str::uuid();\n }", "title": "" }, { "docid": "974bd40b48660b678a4be9284f9a38db", "score": "0.63152707", "text": "function generateUUID()\n{\n $currentTime = (string)microtime(true);\n\n $randNumber = (string)rand(10000, 1000000);\n\n $shuffledString = str_shuffle(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\");\n\n return md5($currentTime . $randNumber . $shuffledString);\n}", "title": "" }, { "docid": "5ad129bd7183dc478973e6b5210a2df2", "score": "0.63068306", "text": "function generateUserRefUUID(){\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n // 16 bits for \"time_mid\"\n mt_rand( 0, 0xffff ),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand( 0, 0x0fff ) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand( 0, 0x3fff ) | 0x8000,\n // 48 bits for \"node\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n\n}", "title": "" }, { "docid": "978e81a8157e773570b21c23defeb127", "score": "0.6306207", "text": "public function getNewId();", "title": "" }, { "docid": "9b61a0902ae39e535fd31cbd8dace148", "score": "0.6301783", "text": "function unique_id($l = 16) {\n if($l > 32) $l = 32;\n return substr(md5(uniqid(mt_rand(), true)), 0, $l);\n}", "title": "" }, { "docid": "618da0ed6701af0813af5228fdb29345", "score": "0.6291709", "text": "public static function generateShortUuid() {\n\t\n\t\treturn substr(self::generateUuid(), 0, 8);\n\t\t\n\t}", "title": "" }, { "docid": "9327a685a9bcf7ee1d0d287b859e3988", "score": "0.6278093", "text": "private static function generateId( ){\n $id = \"\";\n $i = ceil( CommentDatabase::getNb() / IdGenerator::perChar()) + 1;\n do {\n $id = IdGenerator::create(3, 3+$i);\n $i++;\n } while (CommentDatabase::idExists( $id));\n return $id;\n }", "title": "" }, { "docid": "106b15f7b8fd6945b3aa693775ae01f9", "score": "0.62759435", "text": "public function generateOwnerUUID()\n {\n $chars = md5(uniqid(mt_rand(), true));\n $uuid = substr ( $chars, 0, 8 ) . '-'\n . substr ( $chars, 8, 4 ) . '-'\n . substr ( $chars, 12, 4 ) . '-'\n . substr ( $chars, 16, 4 ) . '-'\n . substr ( $chars, 20, 12 );\n return $uuid ;\n }", "title": "" }, { "docid": "2b20ace3b5360b777b3b611f3e33c234", "score": "0.6272421", "text": "protected function uuid()\n {\n return sha1(implode('.', func_get_args()));\n }", "title": "" } ]
3cbc762bba8b126ac45f7e9119a993c3
/===================== SUB CATEGORY ENDS ===================== /===================== Brand Add =========================
[ { "docid": "5480451f7c53331e511a937f02f2cbc6", "score": "0.6864322", "text": "function addBrand($data,$file){\n\t\t\t\n\t\t\t$brand_name = $this->escape_string($this->strip_all($data['brand_name']));\n\t\t\t$SaveImage = new SaveImage();\n\t\t\t$imgDir = '../images/brand/';\n\t\t\t$brand_permalink\t= $this->getValidatedPermalink($brand_name);\n\n\t\t\tif(isset($file['banner_image']['name']) && !empty($file['banner_image']['name'])){\n\t\t\t\t$file_name = strtolower( pathinfo($file['banner_image']['name'], PATHINFO_FILENAME));\n\t\t\t\t$cropData = $this->strip_all($data['cropData1']);\n\t\t\t\t\n\t\t\t\t$banner_image = $SaveImage->uploadCroppedImageFileFromForm($file['banner_image'], 150, $cropData, $imgDir, $file_name.'-'.time().'-2');\n\t\t\t} else {\n\t\t\t\t$banner_image = '';\n\t\t\t}\n\n\t\t\t$sql = \"INSERT INTO \".PREFIX.\"brand_master(`brand_name`, `image_name`, `permalink`) VALUES ('\".$brand_name.\"','\".$banner_image.\"','\".$brand_permalink.\"')\";\n\t\t\t$this->query($sql);\n\t\t\n\t\t}", "title": "" } ]
[ { "docid": "be6da3edac16e920bbff8e302f9ae0ed", "score": "0.7490414", "text": "public function add_brand()\n {\n if($this->isLoggedIn())\n {\n $data['menu'] = $this->Admin_model->getMenuItems('admin_menu');\n $data['theme'] = $this->Admin_model->getActiveTheme();\n $data['company_info'] = $this->Admin_model->get_company_info();\n $data['title'] = $data['company_info']['name'].\" | Add Brand\";\n $this->load->view('backend/static/head', $data);\n $this->load->view('backend/static/header');\n $this->load->view('backend/static/sidebar1');\n $this->load->view('backend/add_brand');\n $this->load->view('backend/static/footer');\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "259b6139afb02b4a348bef73ef05fd62", "score": "0.74205", "text": "function display_Add_Brand(){\n $this->getView(\"master2\",[\n \"url\" => $this->getBaseUrl(),\n \"act\" => \"brand\",\n \"page\" => \"Brands_Add_View\"\n ]);\n }", "title": "" }, { "docid": "def9d51778db464ae501cf4616538d52", "score": "0.70170146", "text": "function addbrandstocategory() {\r\n\t\t$user=$this->session->userdata ( \"admin_user\" );\r\n\t\tif ($user== false) {\r\n\t\t\tredirect ( \"admin\" );\r\n\t\t\tdie ();\r\n\t\t}\r\n\t\tif ($this->input->post ( 'brandname' ) != FALSE && $this->input->post ( 'selcatname' )) {\r\n\t\t\t$brandname = $this->input->post ( 'brandname' );\r\n\t\t\t$brands = explode ( ',', $brandname );\r\n\t\t\t//print_r($brands);exit;\r\n\t\t\t$catid = $this->input->post ( 'selcatname' );\r\n\t\t\tfor($i = 0; $i < count ( $brands ); $i ++) {\r\n\t\t\t\t$this->adminmodel->insertbrand ( $brands [$i], $catid );\r\n\t\t\t\t$this->db->close ();\r\n\t\t\t}\r\n\t\t\tredirect ( 'admin/loadaddbrandspage' );\r\n\t\t} else {\r\n\t\t\t$this->error=\"Enter a brandadmin\";\r\n\t\t\t$data['error']=$this->error;\r\n\t\t\t$this->loadaddbrandspage();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9da1ea041249a46f929a7882cc0d27c0", "score": "0.6968953", "text": "public function addBrandAction()\n\t{\n\t\t$entityCollection = Default_Model_Entity::createQuery()\n\t\t\t->addWhere('parent_user_id IS NULL')\n\t\t\t->execute()\n\t\t;\n\n\t\t$brandModels = array();\n\t\t$brandOptionModels = array();\n\n\t\tforeach($entityCollection as $entityModel) {\n\t\t\tforeach($entityModel->EntityM2nBrandOptionModel as $brandOption) {\n\t\t\t\t$brandShort = $brandOption->BrandOptionModel->short;\n\t\t\t\tif(!isset($brandModels[$brandShort])) {\n\t\t\t\t\t$brandModels[$brandShort] = Default_Model_Brand::getModelByShort($brandShort)->id;\n\t\t\t\t}\n\n\t\t\t\t$brandOptionModelValue = Default_Model_EntityM2nBrandOptionModelValues::getModelByColumn('entity_m2n_brand_option_model_id', $brandOption->id);\n\n\t\t\t\t// This is set directly form the form, so check if this value has been set\n\t\t\t\tif($brandOptionModelValue->is_member == 1) {\n\t\t\t\t\t$entityM2nBrandRelationCount = Default_Model_EntityM2nBrand::createQuery()\n\t\t\t\t\t\t->addWhere('entity_id = ?', array($entityModel->id))\n\t\t\t\t\t\t->addWhere('brand_id = ?', array($brandModels[$brandShort]))\n\t\t\t\t\t\t->count()\n\t\t\t\t\t;\n\n\t\t\t\t\t// If the proper entry for entityM2nBrand has not been created, create it\n\t\t\t\t\tif(!$entityM2nBrandRelationCount) {\n\t\t\t\t\t\t$newEntityM2nBrandRelation = new Default_Model_EntityM2nBrand();\n\t\t\t\t\t\t$newEntityM2nBrandRelation->entity_id = $entityModel->id;\n\t\t\t\t\t\t$newEntityM2nBrandRelation->brand_id = $brandModels[$brandShort];\n\t\t\t\t\t\t$newEntityM2nBrandRelation->save();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get all sub users\n\t\t\t\t\t$subEntityCollection = Default_Model_Entity::createQuery()\n\t\t\t\t\t\t->addWhere('parent_user_id = ?', array($entityModel->id))\n\t\t\t\t\t\t->execute()\n\t\t\t\t\t;\n\n\t\t\t\t\tforeach($subEntityCollection as $subEntityModel) {\n\t\t\t\t\t\t$subEntityM2nBrandOptionModelRelationCount = Default_Model_EntityM2nBrandOptionModel::createQuery()\n\t\t\t\t\t\t\t->addWhere('entity_id = ?', array($subEntityModel->id))\n\t\t\t\t\t\t\t->addWhere('brand_option_model_id = ?', array($brandOption->brand_option_model_id))\n\t\t\t\t\t\t\t->count()\n\t\t\t\t\t\t;\n\n\t\t\t\t\t\t// If sub user does not have entry for brandOptionModel, create it, and add the is_memeber value as well\n\t\t\t\t\t\tif(!$subEntityM2nBrandOptionModelRelationCount) {\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation = new Default_Model_EntityM2nBrandOptionModel();\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->entity_id = $subEntityModel->id;\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->brand_option_model_id = $brandOption->brand_option_model_id;\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->save();\n\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue = new Default_Model_EntityM2nBrandOptionModelValues();\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->entity_m2n_brand_option_model_id = $newSubEntityM2nBrandOptionModelRelation->id;\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->is_member = 1;\n\t\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->save();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$subEntityM2nBrandRelationCount = Default_Model_EntityM2nBrand::createQuery()\n\t\t\t\t\t\t\t->addWhere('entity_id = ?', array($subEntityModel->id))\n\t\t\t\t\t\t\t->addWhere('brand_id = ?', array($brandModels[$brandShort]))\n\t\t\t\t\t\t\t->count()\n\t\t\t\t\t\t;\n\n\t\t\t\t\t\t// If the proper entry for entityM2nBrand for sub user has not been created, create it\n\t\t\t\t\t\tif(!$subEntityM2nBrandRelationCount) {\n\t\t\t\t\t\t\t$subEntityM2nBrandRelation = new Default_Model_EntityM2nBrand();\n\t\t\t\t\t\t\t$subEntityM2nBrandRelation->entity_id = $subEntityModel->id;\n\t\t\t\t\t\t\t$subEntityM2nBrandRelation->brand_id = $brandModels[$brandShort];\n\t\t\t\t\t\t\t$subEntityM2nBrandRelation->save();\n }\n\n $subEntityModel->contract_type_id = $entityModel->contract_type_id;\n $subEntityModel->region_id = $entityModel->region_id;\n $subEntityModel->department_id = $entityModel->department_id;\n $subEntityModel->spoken_language = $entityModel->spoken_language;\n $subEntityModel->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($entityModel->EntityM2nBrand as $brand) {\n\t\t\t\t$brandOptionShort = $brand->Brand->short;\n\t\t\t\tif(!isset($brandOptionModels[$brandOptionShort])) {\n\t\t\t\t\t$brandOptionModels[$brandOptionShort] = Default_Model_BrandOptionModel::getModelByShort($brandOptionShort)->id;\n\t\t\t\t}\n\n\t\t\t\t$entityM2nBrandOptionRelationCount = Default_Model_EntityM2nBrandOptionModel::createQuery()\n\t\t\t\t\t->addWhere('entity_id = ?', array($entityModel->id))\n\t\t\t\t\t->addWhere('brand_option_model_id = ?', array($brandOptionModels[$brandOptionShort]))\n\t\t\t\t\t->count()\n\t\t\t\t;\n\n\t\t\t\t// If the proper entry for entityM2nBrandOptionModel has not been created, create it\n\t\t\t\tif(!$entityM2nBrandOptionRelationCount) {\n\t\t\t\t\t$newEntityM2nBrandOptionRelation = new Default_Model_EntityM2nBrandOptionModel();\n\t\t\t\t\t$newEntityM2nBrandOptionRelation->entity_id = $entityModel->id;\n\t\t\t\t\t$newEntityM2nBrandOptionRelation->brand_option_model_id = $brandOptionModels[$brandOptionShort];\n\t\t\t\t\t$newEntityM2nBrandOptionRelation->save();\n\n\t\t\t\t\t$newEntityM2nBrandOptionValue = new Default_Model_EntityM2nBrandOptionModelValues();\n\t\t\t\t\t$newEntityM2nBrandOptionValue->entity_m2n_brand_option_model_id = $newEntityM2nBrandOptionRelation->id;\n\t\t\t\t\t$newEntityM2nBrandOptionValue->is_member = 1;\n\t\t\t\t\t$newEntityM2nBrandOptionValue->save();\n\t\t\t\t}\n\n\t\t\t\t// Get all sub users\n\t\t\t\t$subEntityCollection = Default_Model_Entity::createQuery()\n\t\t\t\t\t->addWhere('parent_user_id = ?', array($entityModel->id))\n\t\t\t\t\t->execute()\n\t\t\t\t;\n\n\t\t\t\tforeach($subEntityCollection as $subEntityModel) {\n\t\t\t\t\t$subEntityM2nBrandOptionModelRelationCount = Default_Model_EntityM2nBrandOptionModel::createQuery()\n\t\t\t\t\t\t->addWhere('entity_id = ?', array($subEntityModel->id))\n\t\t\t\t\t\t->addWhere('brand_option_model_id = ?', array($brandOptionModels[$brandOptionShort]))\n\t\t\t\t\t\t->count()\n\t\t\t\t\t;\n\n\t\t\t\t\t// If sub user does not have entry for brandOptionModel, create it, and add the is_memeber value as well\n\t\t\t\t\tif(!$subEntityM2nBrandOptionModelRelationCount) {\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation = new Default_Model_EntityM2nBrandOptionModel();\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->entity_id = $subEntityModel->id;\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->brand_option_model_id = $brandOptionModels[$brandOptionShort];\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelRelation->save();\n\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue = new Default_Model_EntityM2nBrandOptionModelValues();\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->entity_m2n_brand_option_model_id = $newSubEntityM2nBrandOptionModelRelation->id;\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->is_member = 1;\n\t\t\t\t\t\t$newSubEntityM2nBrandOptionModelValue->save();\n\t\t\t\t\t}\n\n\t\t\t\t\t$subEntityM2nBrandRelationCount = Default_Model_EntityM2nBrand::createQuery()\n\t\t\t\t\t\t->addWhere('entity_id = ?', array($subEntityModel->id))\n\t\t\t\t\t\t->addWhere('brand_id = ?', array($brand->Brand->id))\n\t\t\t\t\t\t->count()\n\t\t\t\t\t;\n\n\t\t\t\t\t// If the proper entry for entityM2nBrand for sub user has not been created, create it\n\t\t\t\t\tif(!$subEntityM2nBrandRelationCount) {\n\t\t\t\t\t\t$subEntityM2nBrandRelation = new Default_Model_EntityM2nBrand();\n\t\t\t\t\t\t$subEntityM2nBrandRelation->entity_id = $subEntityModel->id;\n\t\t\t\t\t\t$subEntityM2nBrandRelation->brand_id = $brand->Brand->id;\n\t\t\t\t\t\t$subEntityM2nBrandRelation->save();\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tZend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->setNoRender(TRUE);\n\t\tZend_Layout::getMvcInstance()->disableLayout();\n\t}", "title": "" }, { "docid": "422a82762427ab45ff16b123341f7471", "score": "0.6869337", "text": "function addBrand($new_brand)\n {\n //to avoid duplicate entries in database\n $existing_brand = Brand::findByName($new_brand->getName());\n\n if($existing_brand == null){\n $new_brand->save();\n $GLOBALS['DB']->exec(\"INSERT INTO brands_stores (brand_id, store_id)\n VALUES ({$new_brand->getId()}, {$this->getId()});\");\n }\n else {\n if ($this->notStocking($new_brand)) {\n $GLOBALS['DB']->exec(\"INSERT INTO brands_stores (brand_id, store_id)\n VALUES ({$existing_brand->getId()}, {$this->getId()});\");\n }\n }\n }", "title": "" }, { "docid": "856a8333650f5938508d308e5b861fc2", "score": "0.6838512", "text": "public function add_brand($data) {\n\t\t$this->db->insert('tbl_brand', $data);\n\t}", "title": "" }, { "docid": "16eda89ec2eb68ed7cd44c732bbe5fb3", "score": "0.68349147", "text": "public function add_brand_form() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n\t\t if ($this->lang->line('admin_make_and_model_add_new_maker_add_new_brand') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_make_and_model_add_new_maker_add_new_brand')); \n\t\t else $this->data['heading'] = 'Add New Brand';\n $this->load->view(OPERATOR_NAME.'/brand/add_brand', $this->data);\n }\n }", "title": "" }, { "docid": "60784ba72449bf086fa5363178b6a299", "score": "0.68307", "text": "public function brandadd()\n {\n $this->load->view('admin/header');\n $this->load->view('admin/brandadd');\n }", "title": "" }, { "docid": "49ef5664b74467c06b1dfc12aeb502c7", "score": "0.66865283", "text": "public function add()\n\t\t{\n\t\t\t$data = array(\n\n\t\t\t\t\t\t'brn_name'=>$this->input->post('txtBrandname'),\n\t\t\t\t\t\t'brn_desc'=>$this->input->post('txtBrandDesc'),\n\t\t\t\t\t\t'user_crea'=>1,\n\t\t\t\t\t\t'date_crea'=>date('Y-m-d')\n\t\t\t\t\t\t);\n\t\t\t$this->db->insert('tbl_brand', $data);\n\n\t\t}", "title": "" }, { "docid": "cff867c643f6ecea098491af050cb439", "score": "0.660236", "text": "public function brand(){\n\n $data = $this->get_session_data();\n\n $data['title'] = 'ALS - Brand';\n $this->parser->parse('templates/header.php', $data);\n\n $this->db->select('b.*, i.name as item_type_name');\n $this->db->from('brands b, item_types i');\n $this->db->where('i.id = b.item_type_id');\n $query = $this->db->get();\n $data['records'] = $query->result();\n\n// echo json_encode($data);\n $this->parser->parse('masters/brands/index.php', $data);\n\n $this->parser->parse('templates/footer.php', $data);\n }", "title": "" }, { "docid": "f5617f1c4ef8785fd7f225104bca475d", "score": "0.6564141", "text": "public function brand_insert_form(){\n\n $data = $this->get_session_data();\n\n $data['title'] = 'ALS - Brand';\n $this->parser->parse('templates/header.php', $data);\n\n $this->db->select('*');\n $this->db->from('item_types i');\n $this->db->order_by('name asc');\n $data['item_types'] = $this->db->get()->result();\n $this->parser->parse('masters/brands/insert_form.php', $data);\n\n $this->parser->parse('templates/footer.php', $data);\n }", "title": "" }, { "docid": "55b4744304dd62b82d8362eaf14e14af", "score": "0.6496208", "text": "public function save_brand()\n {\n if($this->isLoggedIn())\n {\n if ($_POST) {\n $config = array(\n array(\n 'field' => 'name',\n 'label' => 'Name',\n 'rules' => 'trim|required'\n )\n );\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() == false) {\n echo json_encode(([\"msg_type\" => \"error\", \"message\" => validation_errors() ]));\n } else {\n $this->Admin_model->add_brand($_POST);\n echo json_encode(([\"msg_type\" => \"success\", \"message\" => \"Brand added successfully!\"]));\n }\n }\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "a7e8ec611bbea1a0e8a64c6a4e496ffa", "score": "0.6327232", "text": "function add_brands($name){\n\t\treturn $this->query(\"insert into brands(brand_name) value('$name')\");\n\t}", "title": "" }, { "docid": "d72c2693d51a9df0832577e46c88e802", "score": "0.63050604", "text": "public function get_brand() {\n\t\tglobal $wpdb;\n\t\t// $this->get_brand = $wpdb->get_results($this->query);\n\t\t$this->seo_brand = $this->get_brand[0]->seo_brand;\n\t\t\n\t\t// Set page title and description\n\t\tif ($this->get_brand[0]->modelid) {\n\t\t\t$this->title = $this->seo_brand;\n\t\t\t$this->seo_title = $this->seo_brand.\" devices\";\n\t\t\t$this->seo_desc = $this->seo_brand.' devices full specifications, in-depth hardware informations and secret codes.';\n\t\t\t$this->seo_keywords = $this->seo_brand.\", Specifications, Secret Codes\";\n\t\t}\n\t\telse {\n\t\t\t$this->title = \"Brand\";\n\t\t\t$this->seo_title = \"Listing of devices by Brand\";\n\t\t\t$this->seo_desc = \"Secret Specs is the ultimate website for phone and mobile device full specifications, in-depth hardware informations and secret codes. Listing all mobile device brands.\";\n\t\t\t$this->seo_keywords = \"Samsung, Sony, HTC, Huawei, Xiaomi\";\n\t\t}\n\t}", "title": "" }, { "docid": "c06e556ec497ed45a60393016cc609ed", "score": "0.62497765", "text": "function loadaddbrandspage() {\r\n\t\t$user=$this->session->userdata ( \"admin_user\" );\r\n\t\tif ($user== false) {\r\n\t\t\tredirect ( \"admin\" );\r\n\t\t\tdie ();\r\n\t\t}\r\n\t\t$categories = $this->adminmodel->getcategory ();\r\n\t\t//print_r($categories);exit;\r\n\t\t$data ['adm_categories'] = $categories;\r\n\t\t$data ['superadmin'] = TRUE;\r\n\t\t$data['error']=$this->error;\r\n\t\t$data ['page'] = \"superadmin_addbrands\";\r\n\t\t$this->load->view ( 'admin', $data );\r\n\t}", "title": "" }, { "docid": "78998d64f5c90bc4ba9cda6a2bce9e1d", "score": "0.61562735", "text": "function add_brand()\n\t{ \t\t$this->load->view('includes/header');\n\t \t\t$this->load->view('includes/sidebar');\n\t\t\t$id=$this->uri->segment(3);\n\t\t\t$this->form_validation->set_rules('brand_name','Brand Name','required');\n\t\t\tif($this->form_validation->run()==false)\n\t\t\t{\t\n\t\t\t\t$this->load->view('admin/add_brand');\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t $this->load->library('image_lib');\n\t\t\t\t\t$path_parts = pathinfo($_FILES[\"image\"][\"name\"]);\n\t\t\t\t\t$extension = $_FILES[\"image\"][\"name\"] ;\n\t\t\t\t\tmove_uploaded_file($_FILES['image']['tmp_name'], \"./uploads/brands/\" . $extension);\n\t\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t\t$config['maintain_ratio'] = TRUE;\n\t\t\t\t\t$config['create_thumb'] = False;\n\t\t\t\t\t$config['overwrite'] = TRUE;\n\t\t\t\t\t$config['encrypt_name'] = TRUE;\n\t\t\t\t\t$config['width'] = 200;\n\t\t\t\t\t$config['height'] = 200;\n\t\t\t\t\t$config['quality'] = 300;\n\t\t\t\t\t$config['source_image'] = \"uploads/brands/\" . $extension;\n\t\t\t\t\t$this->image_lib->clear();\n\t\t\t\t\t$this->image_lib->initialize($config);\n\t\t\t\t\t\n\t\t\t\tif($config['size']!=300)\n\t\t\t\t\t{\t$this->image_lib->resize();\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->image_lib->resize())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $this->image_lib->display_errors();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\tif(!extension)\n\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t//echo\"not upload some problem.....\";die;\n\t\t\t\t\t\t\t$error = array('error' => $this->upload->display_errors());\n\t\t\t\t\t\t\t$this->load->view('admin/add_brand',$error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$brand_name=$this->input->post('brand_name');\n\t\t\t\t\t\t\tif(isset($id))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//$photo=$this->upload->data();\n\t\t\t\t\t\t\t//$image =$photo['raw_name'].$photo['file_ext'];\n\t\t\t\t\t\t\t$brandAdd=array(\n\t\t\t\t\t\t\t'brand_name'=>$brand_name,\n\t\t\t\t\t\t\t'image' =>$extension\n\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t$this->brand_m->edit_brand($brandAdd,$id);\n\t\t\t\t\t\t\tredirect('brand_c/view_brand');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//$photo=$this->upload->data();\n\t\t\t\t\t\t\t//$image =$photo['raw_name'].$photo['file_ext'];\n\t\t\t\t\t\t\t$brandAdd=array(\n\t\t\t\t\t\t\t'brand_name'=>$brand_name,\n\t\t\t\t\t\t\t'image' =>$extension,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->brand_m->insert_brand($brandAdd);\n\t\t\t\t\t\t\tredirect('brand_c/create_brand');\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}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!extension)\n\t\t\t\t{\t\t\n\t\t\t\t\t//echo\"not upload some problem.....\";die;\n\t\t\t\t\t$error = array('error' => $this->upload->display_errors());\n\t\t\t\t\t$this->load->view('admin/add_brand',$error);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$brand_name=$this->input->post('brand_name');\n\t\t\t\t\tif(isset($id))\n\t\t\t\t\t{\n\t\t\t\t\t//$photo=$this->upload->data();\n\t\t\t\t\t//$image =$photo['raw_name'].$photo['file_ext'];\n\t\t\t\t\t$brandAdd=array(\n\t\t\t\t\t'brand_name'=>$brand_name,\n\t\t\t\t\t'image' =>$extension\n\t\t\t\t\t);\t\n\t\t\t\t\t$this->brand_m->edit_brand($brandAdd,$id);\n\t\t\t\t\t\n\t\t\t\t\tredirect('brand_c/view_brand');\n\t\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//$photo=$this->upload->data();\n\t\t\t\t\t//$image =$photo['raw_name'].$photo['file_ext'];\n\t\t\t\t\t$brandAdd=array(\n\t\t\t\t\t'brand_name'=>$brand_name,\n\t\t\t\t\t'image' =>$extension,\n\t\t\t\t\t);\n\t\t\t\t$this->brand_m->insert_brand($brandAdd);\n\t\t\t\t\tredirect('brand_c/create_brand');\n\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\t $this->load->view('includes/footer');\n\t}", "title": "" }, { "docid": "54beeef5addceb191487b321a86c361c", "score": "0.6152874", "text": "public function brandbindingindex()\n\t{\n\t\t$brand_name = $_REQUEST['brand_name'];\n\t\t$this->assign(\"brand_name\",$brand_name);\n\t\t\n\t\t$list = M('manager_appliance_category')->select();\n\t\t$this->assign('cate_name_list',$list);\n\t\t\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "8aa12100b059716d5b66d81915165966", "score": "0.6144558", "text": "public function manage_brands()\n {\n if($this->isLoggedIn())\n {\n $data['menu'] = $this->Admin_model->getMenuItems('admin_menu');\n $data['theme'] = $this->Admin_model->getActiveTheme();\n $data['brands'] = $this->Admin_model->getAll('brands');\n $data['company_info'] = $this->Admin_model->get_company_info();\n $data['title'] = $data['company_info']['name'].\" | Manage brands\";\n $this->load->view('backend/static/head', $data);\n $this->load->view('backend/static/header');\n $this->load->view('backend/static/sidebar1');\n $this->load->view('backend/manage_brands');\n $this->load->view('backend/static/footer');\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "a7f263011fff28149442f5346f021dd9", "score": "0.6105252", "text": "public function getBrand(){\n\t\n\t$index = 0 ;\n\t\n\t$brand_sql=mysql_query(\"SELECT * FROM product WHERE category_id='$this->category_id' GROUP BY brand_id\");\n\twhile($brand_data= mysql_fetch_array($brand_sql))\n\t{\n\t\t$brand_id = $brand_data['brand_id'];\n\t\t\n\t\t$brand_info_sql=mysql_query(\"SELECT * FROM brand WHERE brand_id='$brand_id'\");\n\t\twhile($brand_info_data=mysql_fetch_array($brand_info_sql))\n\t\t{\n\t\t\t$brand_name = $brand_info_data['brand_name'];\n\t\t\n\t\t$this->brand[$index]['brand_id']= $brand_id ; \n\t\t$this->brand[$index]['brand_name']= $brand_name ; \n\t\n\t\t\n\t\t}\n\t\t$index++;\n\t}\n\t\n\treturn\t$this->brand;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "d0c05b6075e8c561804b20de38c7e7a5", "score": "0.6068448", "text": "public function getBrandlistDetails($brandId){\n\n //$storeId=$this->session->userdata('badmin')['BizId'];\n $data['category']=$this->GridProductModel->getBrandlistDetails($brandId);\n }", "title": "" }, { "docid": "0d14ee37f38fedc59f77639bf0aacd02", "score": "0.60573596", "text": "public function withBrandAction()\n {\n $em = $this->get('doctrine')->getManager();\n\n $product = $em->getRepository('AppCoreBundle:Product')->find(1);\n\n dump($product);\n exit;\n $products = $em->getRepository('AppCoreBundle:Product')->retrievedWithBrand();\n dump($products);\n exit;\n }", "title": "" }, { "docid": "94edd20c332ee596ce861ac16f104783", "score": "0.60540056", "text": "function view_edit_brand()\n\t{ $this->load->view('includes/header');\n\t $this->load->view('includes/sidebar');\n\t\t$id=$this->uri->segment(3);\n\t\t$data['get_brand']=$this->brand_m->get_brand_by_id($id);\n\t\t$this->load->view('admin/add_brand',$data);\n\t\t $this->load->view('includes/footer');\n\t}", "title": "" }, { "docid": "30fba4bb1bc713444871d0dd28fb7598", "score": "0.60447055", "text": "public function global_settings_add_subcategory(){\n // echo \"not implemented yet\";\n }", "title": "" }, { "docid": "82880e4dc17dffda7dace0497b76f3bd", "score": "0.6041111", "text": "public function actionBrandApplicationAdd()\n {\n $user = Yii::$app->user->identity;\n\n $transaction = Yii::$app->db->beginTransaction();\n\n $brandApplication = BrandApplication::addByAttrs($user, Yii::$app->request->post());\n if (!is_object($brandApplication)) {\n $transaction->rollBack();\n\n return Json::encode([\n 'code' => $brandApplication,\n 'msg' => Yii::$app->params['errorCodes'][$brandApplication],\n ]);\n }\n\n $authorizationNames = Yii::$app->request->post('authorization_names', []);\n $images = Yii::$app->request->post('images', []);\n\n $code = BrandApplicationImage::addByAttrs($brandApplication, $images, $authorizationNames);\n if (200 != $code) {\n $transaction->rollBack();\n\n return Json::encode([\n 'code' => $code,\n 'msg' => Yii::$app->params['errorCodes'][$code],\n ]);\n }\n\n $transaction->commit();\n\n return Json::encode([\n 'code' => 200,\n 'msg' => 'OK',\n ]);\n }", "title": "" }, { "docid": "091a1d908a744a7f2567351c2698f1fd", "score": "0.603054", "text": "public function AssembleBrandCategoryEditControl()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\t$logger->debug(\"START\");\n\t\t\t$_BrandCategory = new BrandCategory();\n\t\t\tif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\")\n\t\t\t{\n\t\t\t\t$_BrandCategory->setName($this->CleanInput($_POST[\"Name\"]));\n\t\t\t}\n\t\t\t$logger->debug(\"END\");\n\t\t\treturn $_BrandCategory;\n\t\t}", "title": "" }, { "docid": "c96a08160b38c0cbd653559061e7dffa", "score": "0.6018863", "text": "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\n if ($this->request->is('post')) {\n $this->ProductSubCategory->set($this->request->data);\n\t\t\t $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n if ($this->ProductSubCategory->validates()) {\n if ($this->ProductSubCategory->save($this->request->data)) {\n $this->Session->write('flash', array(ADD_RECORD, 'success'));\n\n } else {\n $this->Session->write('flash', array(ERROR_MSG, 'failure'));\n }\n $this->redirect(array('controller' => 'ProductSubCategories', 'action' => 'index'));\n }\n }\n }", "title": "" }, { "docid": "1ffa08632398a962c6d4b0c423c259b0", "score": "0.60180235", "text": "function link_brand($atts, $content = '') {\n extract($this->shortcodes->shortcode_atts(array(\n 'brand' => 0,\n 'ssl' => 0,\n 'title' => ''\n ), $atts));\n \n $ssl = ($ssl) ? true : false;\n $title = html_entity_decode(($title) ? 'Title=\"' . $title . '\"' : \"\");\n $link = $content;\n if ($brand) {\n //$this->load->model('catalog/manufacturer');\n $manufacturer = Make::a('catalog/manufacturer')->create()->getManufacturer($brand); \n if ($manufacturer) {\n $link = '<a href=\"' . makeUrl('product/manufacturer',array('manufacturer_id=' . $brand),true,$ssl) . '\" ' . $title . ' >' . html_entity_decode(($content != '' ? $content : $manufacturer['name'])) . '</a>';\n }\n }\n return $link;\n }", "title": "" }, { "docid": "e4cb575179eb5e615c5cce0577a8cb6a", "score": "0.6009", "text": "public function getBrand()\n {\n return parent::getValue('brand');\n }", "title": "" }, { "docid": "e91e7877e5f6dd8565a0c5e6c4c9a197", "score": "0.5954082", "text": "public function create()\n { //return add brand page\n return view('admin.brand.add');\n }", "title": "" }, { "docid": "0470f19b62987bc5e55746796d095733", "score": "0.59531987", "text": "public function print_brand() {\n\t\techo \"\n\t\t\t<hr>\n\t\t\t<div class=\\\"row\\\">\n\t\t\t<div class=\\\"small-12 columns\\\">\n\t\t\t<div class=\\\"row\\\">\n\t\t\";\n\t\t\n\t\t$dup_brand = $this->get_brand[0]->brand;\t// To get distinct brand\n\t\t$current_count = 0;\t\t\t\t\t\t\t// To count number of models for each brand\n\t\t$current_brand = $this->get_brand[0]->brand;\n\t\t$current_seobrand = $this->get_brand[0]->seo_brand;\n\t\t$array_count = COUNT($this->get_brand);\t// To check for last\n\t\t$i = 0;\t\t\t\t\t\t\t\t\t// item in array\n\t\t$countAD = 0;\n\t\t$doneAD = false;\n\t\tforeach ($this->get_brand as $brand) {\n\t\t\t// Ads\n\t\t\tif (($countAD == 20) && (!$doneAD)) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"small-12 columns\">\n\t\t\t\t<!-- /6880916/Secret-After-728-300 -->\n\t\t\t\t<div id='ad-after'>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\tgoogletag.cmd.push(function() { googletag.display('ad-after'); });\n\t\t\t\t</script>\n\t\t\t\t</div>\n\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\t$doneAD = true;\n\t\t\t}\n\t\t\t// List all brand\n\t\t\tif ($this->page == 'allbrand') {\n\t\t\t\t$i++;\n\t\t\t\tif ($i < $array_count) {\n\t\t\t\t\tif ($brand->brand != $dup_brand) {\n\t\t\t\t\t\techo \"<div class=\\\"small-12 medium-6 columns\\\" style=\\\"height:25pt\\\">\";\n\t\t\t\t\t\techo \"<a href=\\\"//secretspecs.com/brand/$current_brand/\\\" title=\\\"$current_seobrand\\\">$current_seobrand ($current_count)</a>\";\n\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t$dup_brand = $brand->brand;\n\t\t\t\t\t\t$current_count = 1;\n\t\t\t\t\t\t$countAD++;\t\t// increase count for Ads\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$current_count++;\n\t\t\t\t\t}\n\t\t\t\t\t$current_brand = $brand->brand;\n\t\t\t\t\t$current_seobrand = $brand->seo_brand;\n\t\t\t\t} else {\n\t\t\t\t\tif ($brand->brand != $dup_brand) {\n\t\t\t\t\t\techo \"<div class=\\\"small-12 medium-6 columns\\\" style=\\\"height:25pt\\\">\";\n\t\t\t\t\t\techo \"<a href=\\\"//secretspecs.com/brand/$current_brand/\\\" title=\\\"$current_seobrand\\\">$current_seobrand ($current_count)</a>\";\n\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t$current_count = 1;\n\t\t\t\t\t\t$countAD++;\t\t// increase count for Ads\n\t\t\t\t\t}\n\t\t\t\t\techo \"<div class=\\\"small-12 medium-6 columns end\\\" style=\\\"height:25pt\\\">\";\n\t\t\t\t\techo \"<a href=\\\"//secretspecs.com/brand/$brand->brand/\\\" title=\\\"$brand->seo_brand\\\">$brand->seo_brand ($current_count)</a>\";\n\t\t\t\t\techo \"</div>\";\n\t\t\t\t}\n\t\t\t// List models for selected brand\n\t\t\t} else {\n\t\t\t\t$i++;\n\t\t\t\tif ($i < $array_count) { echo \"<div class=\\\"small-12 medium-6 columns\\\" style=\\\"height:25pt\\\">\"; }\n\t\t\t\telse { echo \"<div class=\\\"small-12 medium-6 columns end\\\" style=\\\"height:25pt\\\">\"; }\n\t\t\t\techo \"<a href=\\\"//secretspecs.com/model/$brand->brand/$brand->model/\\\" title=\\\"$brand->seo_model\\\">$brand->seo_model</a>\";\n\t\t\t\techo \"</div>\";\n\t\t\t\t$countAD++;\t\t// increase count for Ads\n\t\t\t}\n\t\t}\n\t\techo \"</div></div></div>\";\n\t}", "title": "" }, { "docid": "3ee21a384329a27113ec9316ed54c626", "score": "0.594562", "text": "public function getBrand_id()\n {\n return $this->brand_id;\n }", "title": "" }, { "docid": "3ee21a384329a27113ec9316ed54c626", "score": "0.594562", "text": "public function getBrand_id()\n {\n return $this->brand_id;\n }", "title": "" }, { "docid": "1ddb55e2e860c99b2840d6cc662d4d64", "score": "0.5922898", "text": "public function insertBrand() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n $brand_id = $this->input->post('brand_id');\n $brand_name = $this->input->post('brand_name');\n $condition = array('brand_name' => $brand_name);\n\n $duplicate_name = $this->brand_model->get_all_details(BRAND, $condition);\n if ($duplicate_name->num_rows() > 0) {\n $this->setErrorMessage('error', 'Brand name already exists','admin_driver_brand_name_exist');\n redirect(OPERATOR_NAME.'/brand/add_brand_form/' . $brand_id);\n }\n\n $excludeArr = array(\"status\", \"brand_logo\");\n\n if ($this->input->post('status') != '') {\n $brand_status = 'Active';\n } else {\n $brand_status = 'Inactive';\n }\n\n $seourlBase = $seourl = url_title($brand_name, '-', TRUE);\n $seourl_check = '0';\n $duplicate_url = $this->brand_model->get_all_details(BRAND, array('seourl' => $seourl));\n if ($duplicate_url->num_rows() > 0) {\n $seourl = $seourlBase . '-' . $duplicate_url->num_rows();\n } else {\n $seourl_check = '1';\n }\n $urlCount = $duplicate_url->num_rows();\n while ($seourl_check == '0') {\n $urlCount++;\n $duplicate_url = $this->brand_model->get_all_details(BRAND, array('seourl' => $seourl));\n if ($duplicate_url->num_rows() > 0) {\n $seourl = $seourlBase . '-' . $urlCount;\n } else {\n $seourl_check = '1';\n }\n }\n\n $inputArr = array(\n 'brand_name' => $brand_name,\n 'seourl' => $seourl,\n 'status' => $brand_status,\n 'created' => date('Y-m-d H:i:s')\n );\n\n if ($_FILES['brand_logo']['name'] != '') {\n $config['encrypt_name'] = TRUE;\n $config['overwrite'] = FALSE;\n $config['allowed_types'] = 'jpg|jpeg|gif|png|bmp';\n $config['max_size'] = 2000;\n $config['upload_path'] = './images/brand/';\n $this->load->library('upload', $config);\n if ($this->upload->do_upload('brand_logo')) {\n $logoDetails = $this->upload->data();\n $ImageName = $logoDetails['file_name'];\n @copy('./images/brand/' . $ImageName, './images/brand/thumbnail/' . $ImageName);\n $this->imageResizeWithSpace(75, 42, $ImageName, './images/brand/thumbnail/');\n } else {\n $logoDetails = $this->upload->display_errors();\n $this->setErrorMessage('error', $logoDetails);\n redirect(OPERATOR_NAME.'/brand/add_brand_form/' . $brand_id);\n }\n $brand_data = array('brand_logo' => $ImageName);\n } else {\n $brand_data = array();\n }\n\n $dataArr = array_merge($inputArr, $brand_data);\n\n $this->brand_model->simple_insert(BRAND, $dataArr);\n $this->setErrorMessage('success', 'Brand added successfully','admin_driver_brand_added_success');\n redirect(OPERATOR_NAME.'/brand/display_brand_list');\n }\n }", "title": "" }, { "docid": "04557f4d6b2e6508081375cad83073e9", "score": "0.59156775", "text": "function brandslist($current_brand = '') {\n global $wpdb;\n $options = \"\";\n //$options .= \"<option value=''>\".TXT_WPSC_SELECTACATEGORY.\"</option>\\r\\n\";\n $values = $wpdb->get_results(\"SELECT * FROM `\".$wpdb->prefix.\"product_brands` WHERE `active`='1' ORDER BY `id` ASC\",ARRAY_A);\n $options .= \"<option $selected value='0'>\".TXT_WPSC_SELECTABRAND.\"</option>\\r\\n\";\n foreach((array)$values as $option)\n {\n if($current_brand == $option['id'])\n {\n $selected = \"selected='selected'\";\n }\n $options .= \"<option $selected value='\".$option['id'].\"'>\".$option['name'].\"</option>\\r\\n\";\n $selected = \"\";\n }\n $concat .= \"<select name='brand'>\".$options.\"</select>\\r\\n\";\n return $concat;\n }", "title": "" }, { "docid": "b72f97b923b3e5b6427e1ea9003e2796", "score": "0.5886005", "text": "function create_nr_brands_custom_post_type() {\n\t$labels = array(\n\t\t'name' => __( 'Brands' ),\n\t\t'singular_name' => __( 'Brand'),\n\t\t'menu_name' => __( 'Brands'),\n\t\t'parent_item_colon' => __( 'Parent Brand'),\n\t\t'all_items' => __( 'All Brand'),\n\t\t'view_item' => __( 'View Brand'),\n\t\t'add_new_item' => __( 'Add New Brand'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Brand'),\n\t\t'update_item' => __( 'Update Brand'),\n\t\t'search_items' => __( 'Search Brand'),\n\t\t'not_found' => __( 'Not Found'),\n\t\t'not_found_in_trash' => __( 'Not found in Trash')\n\t);\n\t$args = array(\n\t\t'label' => __( 'brands'),\n\t\t'description' => __( 'Brands'),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields'),\n\t\t'public' => false,\n\t\t'hierarchical' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'has_archive' => false,\n\t\t'can_export' => true,\n\t\t'exclude_from_search' => true,\n\t 'yarpp_support' => true,\n\t\t'publicly_queryable' => true,\n 'capability_type' => 'page',\n 'rewrite' => array('slug' => 'brand'), /* change to discounts at some point */\n 'menu_icon' => 'dashicons-megaphone',\n 'menu_position' => 6,\n );\n\tregister_post_type( 'nr_brands', $args );\n}", "title": "" }, { "docid": "aafea96f292f8c186918d9057004bde9", "score": "0.5863774", "text": "private function addBreadCrumbs(): void\n {\n // the category will be added in the breadcrumb\n if (count(FrontendBlogModel::getAllCategories()) > 1) {\n $this->breadcrumb->addElement($this->blogPost['category_title'], $this->blogPost['category_full_url']);\n }\n\n $this->breadcrumb->addElement($this->blogPost['title']);\n }", "title": "" }, { "docid": "37a455c9f8847ae4a57dd0f6fd32b4bc", "score": "0.5858269", "text": "public function DALBrands() {\n \n }", "title": "" }, { "docid": "e54001c0c7f0a227cd1bb028768a5809", "score": "0.5847372", "text": "public function edit_brand()\n {\n if($this->isLoggedIn())\n {\n $id = $this->uri->segment(3);\n $data['menu'] = $this->Admin_model->getMenuItems('admin_menu');\n $data['theme'] = $this->Admin_model->getActiveTheme();\n $data['brand_detail'] = $this->Admin_model->getById('brands', $id);\n $data['company_info'] = $this->Admin_model->get_company_info();\n $data['title'] = $data['company_info']['name'].\" | Update Brand\";\n $this->load->view('backend/static/head', $data);\n $this->load->view('backend/static/header');\n $this->load->view('backend/static/sidebar1');\n $this->load->view('backend/edit_brand');\n $this->load->view('backend/static/footer');\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "f23bd84f2f12b53a3b850a3889200e28", "score": "0.5841924", "text": "public function brandInsert($brandName){\n $brandName = $this->fm->validation($brandName);\n $brandName = mysqli_real_escape_string($this->db->link, $brandName);\n\n if (empty($brandName)) {\n $msg = \"<div class='alert alert-warning'>Field must not be empty!</div>\";\n return $msg;\n }else{\n\n $selectExist = \"SELECT * FROM tbl_brand WHERE brandName='$brandName'\";\n $result = $this->db->select($selectExist);\n if ($result != false) {\n $msg = \"<div class='alert alert-warning'>Your Brand already exist</div>\";\n return $msg;\n }else{\n $query = \"INSERT INTO tbl_brand(brandName) VALUES('$brandName')\";\n $insert = $this->db->insert($query);\n if ($insert) {\n $msg = \"<div class='alert alert-success'>Brand inserted Successfully!</div>\";\n return $msg;\n }else{\n $msg = \"Category Not inserted Successfully\";\n return $msg;\n }\n }\n }\n }", "title": "" }, { "docid": "5a69ee2ccd93f08aef23c36f4e973dd6", "score": "0.5837782", "text": "public function display_brand_list() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n\t\t if ($this->lang->line('admin_make_and_model_marker_list_brand_list') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_make_and_model_marker_list_brand_list')); \n\t\t else $this->data['heading'] = 'Brand List';\n $condition = array();\n $this->data['brandList'] = $this->brand_model->get_all_details(BRAND, $condition);\n $this->load->view(OPERATOR_NAME.'/brand/display_brand_list', $this->data);\n }\n }", "title": "" }, { "docid": "973675c7410de054bd796d885f7b9b22", "score": "0.5836832", "text": "public function actionCreate() {\n $model = new Brand;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Brand'])) {\n $this->saveBrand($_POST['Brand'], $model);\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "d8175d325f309cbf8b70e1c0aae5646d", "score": "0.5819901", "text": "function addNewBicycleBrand($name){\r\n $query = \"INSERT INTO bicycle_brand (name) VALUES ('\".$name.\"')\" ; \r\n $result = mysql_query($query) or trigger_error(mysql_error().\" \".$query);\r\n }", "title": "" }, { "docid": "20d179c1acc21add38e9f422902071fc", "score": "0.5819784", "text": "public function getcustombrand($storeid,$segment,$brand);", "title": "" }, { "docid": "f27e7518cf673ad1eed98c92cd336000", "score": "0.5803197", "text": "function getBrand() {\n return $this->brand;\n }", "title": "" }, { "docid": "ec61dc62a285e3d8a16b111fdae44122", "score": "0.5801101", "text": "public function brands(){\n\t\tif($this->session->userdata('userid') && $this->session->userdata('is_admin') == 'yes'){\n\t\t\t$data = array();\n\t\t\t$data['content_data']\t= $this->db->order_by('id','ASC')->get('brand')->result_array();\n\t\t\t$data['page_title'] = 'Brands';\n\t\t\t$data['page_content'] = 'brand/list';\n\t\t\t$this->load->view('common/main_view',$data);\n\t\t}else{\n\t\t\t$this->session->set_flashdata('msg','Please Login');\n\t\t\tredirect();\n\t\t}\n\t}", "title": "" }, { "docid": "f6c5bdc40af86d9f8ec7b06656bda645", "score": "0.5790794", "text": "public function view_brand()\n\t\t{\t\t\t$this->load->view('includes/header');\n\t\t \t\t$this->load->view('includes/sidebar');\n\t\t\t$viewB['get_brand']=$this->brand_m->getBrand();\n\t\t\t$this->load->view('admin/view_brand',$viewB);\n \t\t\t$this->load->view('includes/footer');\n\t\t}", "title": "" }, { "docid": "ef417cd58a86fb0bfb960fef33661199", "score": "0.57892406", "text": "public function insert_brand_data($data)\r\n {\t\r\n \r\n if($this->db->insert('brand',$data))\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n \r\n \t\r\n }", "title": "" }, { "docid": "d69a7e761adb48c9824e6ae7ca535e14", "score": "0.57874066", "text": "public function manage_brand($id='')\n {\n if($id > 0){\n $res = Brand::where('id',$id)->get();\n $Arr['brand_id'] = $res[0]->id;\n $Arr['brand'] = $res[0]->name;\n $Arr['brand_image'] = $res[0]->image;\n $Arr['showOnFrontend'] = $res[0]->showOnFrontend;\n return view('admin/attributes/brands/brands_manage',$Arr);\n }\n $Arr['brand_id'] = 0;\n $Arr['brand'] = '';\n $Arr['brand_image'] = '';\n $Arr['showOnFrontend'] = '';\n return view('admin/attributes/brands/brands_manage',$Arr);\n }", "title": "" }, { "docid": "81c71a3e7bb61fb05f01d082e648652d", "score": "0.5779961", "text": "public function brand($brand_id,$slug='')\n { // die;\n if(!Session::has('customerlogin'))\n {\n $this->cartitem = Cart::where([ \n 'session_key' => Session::getId()]\n )->get()->count();\n\n }else{\n $this->cartitem = Cart::where([ \n 'customer_id' => Session::get('customerid')]\n )->get()->count();\n }\n\n $categories = Category::all()->sortBy(\"category_name\");\n $brands = Brand::all()->sortBy(\"brand_name\");\n\n //dd($categories);\n $siteobject = Siteprofile::first();\n $singlebrand = Brand::find($brand_id);\n\n $products = \\App\\Product::with(['brand','category','color'])->orderBy('id','desc')->where('brand_id',$brand_id)->paginate(20);\n //=dd($product);\n return view('front.product.product_brand')\n ->withProducts($products)\n ->withSiteobject($siteobject)\n ->withBrands($brands)\n ->withCategories($categories)\n ->withSinglebrand($singlebrand)\n ->withTotalcart($this->cartitem);\n }", "title": "" }, { "docid": "66d10cddb4a3bfe44d88b0ee2be7c1c4", "score": "0.5765821", "text": "public function add_product(){\n $data[\"category\"] = $this->product_model->fetchdata(\"product_category\", NULL);\n parent::admin_page('add_product', $data);\n }", "title": "" }, { "docid": "e393041c935e8d4d0bdb690719a9464a", "score": "0.5750748", "text": "function adddeal()\r\n\t{\r\n\t\t$user=$this->auth(DEAL_MANAGER_ROLE);\r\n\t\t$brandid = $user[\"brandid\"];\r\n\t\t$categories = $this->adminmodel->getcategoryforusertype ( $brandid );\r\n\t\t$data ['adm_categories'] = $categories;\r\n\t\t//$categories = $this->adminmodel->getcategoryforusertype ( $brandid );\r\n\t\t//print_r($categories);exit;\r\n\t\t//$data ['admin_categories'] = $categories;\r\n\t\tif($this->error!=NULL)\r\n\t\t$data['error']=$this->error;\r\n\t\t$data['menu']=$this->dbm->getallmenu();\r\n\t\t$data['brandid']=$brandid;\r\n\t\t$data ['adminheader'] = TRUE;\r\n\t\t$data ['page'] = \"adddeal\";\r\n\t\t$this->load->view ( 'admin', $data );\r\n\t}", "title": "" }, { "docid": "cd39c151f3219812402fbf60b979fddf", "score": "0.5741272", "text": "public function index()\n {\n return view('admin.pages.add_brand');\n\n }", "title": "" }, { "docid": "07a8ee51cc2d61dc725c4f6cff838b66", "score": "0.5720391", "text": "public function store(Request $request)\n {\n if (($request->category_id) == \"\") {\n Session::flash('flash_message','Please Select Category');\n return redirect()->back()->with('status_color','danger');\n } elseif(($request->subcategory_id) == \"\") {\n Session::flash('flash_message','Please Select Sub Category');\n return redirect()->back()->with('status_color','danger');\n }else{\n\n $validator = Validator::make($request->all(),[\n\n 'brand_name'=>'required',\n ]);\n\n if ($validator->fails()) { \n $plainErrorText = \"\";\n $errorMessage = json_decode($validator->messages(),true);\n foreach($errorMessage as $value){\n $plainErrorText .= $value[0].\". \";\n }\n Session::flash('flash_message',$plainErrorText);\n return redirect()->back()->withErrors($validator)->withInput()->with('status_color','warning');\n }\n\n $input = $request->all();\n\n try {\n $bug = 0;\n $insert = Brand::create($input);\n \n } catch (\\Exception $e) {\n $bug = $e->errorInfo[1];\n }\n if ($bug==0) {\n Session::flash('flash_message','Brand Added Successfully.');\n return redirect('admin/brand')->with('status_color','success');\n } else {\n Session::flash('flash_message','Something Error Found');\n return redirect('admin/brand')->with('status_color','danger');\n }\n }\n \n }", "title": "" }, { "docid": "e53509209050e565f200c04834bdd015", "score": "0.5709466", "text": "public function getAllSubBrand()\n\t {\n\t $brand = $_POST['brand'];\n\t $result = $this->CreateNewsAlertModel->getAllSubBrand($brand);\n\t $arr = array('0' => 'Select');\n\t foreach ($result as $row)\n\t {\n\t $arr[$row->Id] = $row->Name;\n\t }\n\n\t echo form_dropdown('SubBrandId', $arr, '0', \"tabindex='3', id='SubBrandId'\");\n\t }", "title": "" }, { "docid": "72b1546c55fd49e0fa20b78144f14989", "score": "0.56935287", "text": "public function delete_brand()\n {\n if ($this->isLoggedIn()) {\n $id = $this->input->post('id');\n $this->Admin_model->delete('brands', $id);\n } else {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "6fcad1092addbf00b17b9d61f4e6441c", "score": "0.56702685", "text": "public function add(){\n\t\t$data['category'] = $this->product_model->getCategory();\n\t\t$data['tax'] = $this->product_model->getTax();\n\t $data['sac'] = $this->product_model->getSac();\n\t\t$data['chapter'] = $this->product_model->getHsnChapter();\n\t\t$data['hsn'] = $this->product_model->getHsn();\n\t\t$data['brand']\t = $this->product_model->getBrand();\t\n\t\t\n\t\t$this->load->view('product/add',$data);\n\t}", "title": "" }, { "docid": "6cc0e41a8f612ae1160b8c91604f23d6", "score": "0.5669847", "text": "public function getBrand()\n {\n return $this->brand;\n }", "title": "" }, { "docid": "6cc0e41a8f612ae1160b8c91604f23d6", "score": "0.5669847", "text": "public function getBrand()\n {\n return $this->brand;\n }", "title": "" }, { "docid": "fd4150c708912e1ffe32ee2d50e3c5d2", "score": "0.5668012", "text": "public function addBrand(Request $request)\n {\n // validate image\n $request->validate([\n 'brand_image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $file = $request->file('brand_image');\n // getting image extension\n $extension = $file->getClientOriginalExtension(); \n $filename =$request->input('brand_name').'_logo.'.$extension;\n $brand_path=$file->move('template\\images\\brands', $filename);\n\n // insert category name into db\n $checkInsert = DB::insert('insert into brand_tab (brand_name,brand_image) values(?,?)', [$request->input('brand_name'),$brand_path]);\n return redirect()->to('admin/dashboard');\n }", "title": "" }, { "docid": "5da71cd6db7ca0206f0e0ddd3bea7d8d", "score": "0.56677437", "text": "public function quickCreate(string $brand_key) {\n if(str_starts_with($brand_key, 'new_tag_')){\n $brand = Brand::create([\n 'name' => str_replace('new_tag_', '', $brand_key)\n ]);\n } else {\n $brand = Brand::find(str_replace('brand_id_', '', $brand_key));\n }\n return $brand;\n }", "title": "" }, { "docid": "9be6ed3e368b6b160ce0166afd2d6aec", "score": "0.56618875", "text": "function createBrandItemsPage()\n {\n $controller = 'category';\n $action = 'brand';\n\n //รายชื่อ category ทั้งหมด ( cat_name )\n $brand_path = $this->source . 'brands/';\n $brand_names = $this->category_names( $brand_path );\n\n //Loop ผ่าน brand_names\n $i = 1;\n foreach ( $brand_names as $brand_name )\n {\n //แต่ละ brand_name มีทั้งหมดกี่หน้า เก็บไว้ในตัวแปร array\n $pages = $this->category_pages( $brand_name, $brand_path );\n\n //สร้างโฟลเดอร์ตามชื่อ cat_name\n $dest = $this->dest . '/brand/' . $brand_name . '/' ;\n Helper::make_dir( $dest );\n\n //Loop ผ่าน $pages เพื่อกำหนด params และเรียกฟังก์ชั่น generate page ขึ้นมาทำงาน\n foreach ( $pages as $number )\n {\n $param1 = $brand_name;\n $param2 = $number;\n\n $command = 'php ' . CALL_CREATOR . '/index.php ';\n $command .= $controller . ' ' . $action . ' ';\n $command .= $param1 . ' ' . $param2;\n\n echo $this->site_dir;\n echo \" Created brand items: \";\n echo $i . ' ';\n $i++;\n\n echo shell_exec( $command );\n }\n\n }//foreacch brand names\n }", "title": "" }, { "docid": "cef8aa970f9d146e75935a7b834b795e", "score": "0.5660007", "text": "public function edit_brand_form() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n\t\t if ($this->lang->line('admin_make_and_model_model_edit_brand') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_make_and_model_model_edit_brand')); \n\t\t else $this->data['heading'] = 'Edit Brand';\n $brand_id = $this->uri->segment(4, 0);\n $condition = array('_id' => MongoID($brand_id));\n $this->data['brand_details'] = $this->brand_model->get_all_details(BRAND, $condition);\n if ($this->data['brand_details']->num_rows() == 1) {\n $this->load->view(OPERATOR_NAME.'/brand/edit_brand', $this->data);\n } else {\n redirect(OPERATOR_NAME);\n }\n }\n }", "title": "" }, { "docid": "22175976f373e864536fca60d750797d", "score": "0.56599754", "text": "public function actionBrandListAdmin()\n {\n $code = 1000;\n\n $user = Yii::$app->user->identity;\n if (!$user) {\n return Json::encode([\n 'code' => $code,\n 'msg' => Yii::$app->params['errorCodes'][$code],\n ]);\n }\n\n $sort = Yii::$app->request->get('sort', []);\n $model = new GoodsBrand;\n $orderBy = $sort ? ModelService::sortFields($model, $sort) : ModelService::sortFields($model);\n if ($orderBy === false) {\n return Json::encode([\n 'code' => $code,\n 'msg' => Yii::$app->params['errorCodes'][$code],\n ]);\n }\n\n if ($user->login_role_id == Yii::$app->params['supplierRoleId']) {\n $supplier = Supplier::find()->where(['uid' => $user->id])->one();\n if (!$supplier) {\n $code = 500;\n return Json::encode([\n 'code' => $code,\n 'msg' => Yii::$app->params['errorCodes'][$code],\n ]);\n }\n\n $where = \"supplier_id = {$supplier->id}\";\n } else {\n $status = (int)Yii::$app->request->get('status', GoodsBrand::STATUS_ONLINE);\n if (!in_array($status, array_keys(GoodsBrand::$statuses))) {\n return Json::encode([\n 'code' => $code,\n 'msg' => Yii::$app->params['errorCodes'][$code],\n ]);\n }\n\n $where = 'review_status = ' . GoodsBrand::REVIEW_STATUS_APPROVE;\n $where .= \" and status = {$status}\";\n\n $keyword = trim(Yii::$app->request->get('keyword', ''));\n if (!$keyword) {\n $pid = (int)Yii::$app->request->get('pid', 0);\n if ($pid > 0) {\n $categoryIds = GoodsCategory::level23Ids($pid);\n if (!$categoryIds) {\n $where .= ' and 0';\n } else {\n $ids = BrandCategory::brandIdsByCategoryIds($categoryIds);\n $where .= ' and id in (' . implode(',', $ids) . ')';\n }\n }\n } else {\n $where .= \" and name like '%{$keyword}%'\";\n }\n }\n\n $page = (int)Yii::$app->request->get('page', 1);\n $size = (int)Yii::$app->request->get('size', GoodsBrand::PAGE_SIZE_DEFAULT);\n\n return Json::encode([\n 'code' => 200,\n 'msg' => 'OK',\n 'data' => [\n 'brand_list_admin' => [\n 'total' => (int)GoodsBrand::find()->where($where)->asArray()->count(),\n 'details' => GoodsBrand::pagination($where, GoodsBrand::$adminFields, $page, $size, $orderBy)\n ]\n ],\n ]);\n }", "title": "" }, { "docid": "cbb5404b5b90917a9ab5ea40f114642d", "score": "0.56583285", "text": "public function brand_insert(){\n // and then redirect to /master/item-type\n // check if this is a POST request\n if ($this->input->method(TRUE) != 'POST'){\n // if not, just redirect\n redirect(base_url() . 'master/brand');\n }\n\n $this->load->model('Brand_model');\n $data = [\n 'name' => $this->input->post('name', TRUE),\n 'item_type_id' => $this->input->post('item_type_id', TRUE)\n ];\n\n if ($this->Brand_model->insert($data)) {\n //success inserting data\n redirect(base_url() . 'master/brand');\n } else {\n //show errors\n }\n }", "title": "" }, { "docid": "937239db854f77e1efa48a937317ddf3", "score": "0.5651791", "text": "function add_products($product_cat, $product_brand, $product_title, $product_price, $product_desc, $product_image){\n\t\treturn $this->query(\"insert into products(product_cat, product_brand, product_title, product_price, product_desc, product_image) values('$product_cat', '$product_brand', '$product_title', '$product_price', '$product_desc', '$product_image')\");\n\t\t\n\n\t}", "title": "" }, { "docid": "7f3514dbdf01a3e211b14c226e1f845c", "score": "0.5651527", "text": "public function getBrandId()\n {\n return $this->brandId;\n }", "title": "" }, { "docid": "332235ed560094a16f3260f3d2085a93", "score": "0.56485134", "text": "function addSubCategory($data) {\n\t\t\t$category_id\t\t= $this->escape_string($this->strip_all($data['category_id']));\n\t\t\t$sub_category_name \t= $this->escape_string($this->strip_all($data['sub_category_name']));\n\t\t\t$active \t\t\t= $this->escape_string($this->strip_all($data['active']));\n\t\t\t$meta_title = $this->escape_string($this->strip_all($data['meta_title']));\n\t\t\t$meta_keywords = $this->escape_string($this->strip_all($data['meta_keywords']));\n\t\t\t$og_description = $data['og_description'];\n\t\t\t// $description \t\t= $data['description'];\n\t\t\t\n\t\t\t$sub_category_permalink\t= $this->getValidatedPermalink($sub_category_name);\n\n\t\t\t$SaveImage = new SaveImage();\n\t\t\t$imgDir = '../images/sub_category/';\n\n\t\t\tif(isset($file['banner_image']['name']) && !empty($file['banner_image']['name'])){\n\t\t\t\t$file_name = strtolower( pathinfo($file['banner_image']['name'], PATHINFO_FILENAME));\n\t\t\t\t$cropData = $this->strip_all($data['cropData1']);\n\t\t\t\t\n\t\t\t\t$banner_image = $SaveImage->uploadCroppedImageFileFromForm($file['banner_image'], 1366, $cropData, $imgDir, $file_name.'-'.time().'-1');\n\t\t\t} else {\n\t\t\t\t$banner_image = '';\n\t\t\t}\n\n\t\t\tif(isset($file['mobile_image']['name']) && !empty($file['mobile_image']['name'])){\n\t\t\t\t$file_name = strtolower( pathinfo($file['mobile_image']['name'], PATHINFO_FILENAME));\n\t\t\t\t$cropData = $this->strip_all($data['cropData2']);\n\t\t\t\t\n\t\t\t\t$mobile_image = $SaveImage->uploadCroppedImageFileFromForm($file['mobile_image'], 400, $cropData, $imgDir, $file_name.'-'.time().'-2');\n\t\t\t} else {\n\t\t\t\t$mobile_image = '';\n\t\t\t}\n\t\t\t$date = date(\"Y-m-d h:i:s\");\n\t\t\t$query = \"insert into \".PREFIX.\"sub_category_master(category_id, sub_category_name, sub_category_permalink, banner_image, mobile_image, active, created, meta_title, meta_keywords, og_description) values ('\".$category_id.\"', '\".$sub_category_name.\"', '\".$sub_category_permalink.\"', '\".$banner_image.\"', '\".$mobile_image.\"', '\".$active.\"', '\".$date.\"', '\".$meta_title.\"', '\".$meta_keywords.\"', '\".$og_description.\"')\";\n\t\t\treturn $this->query($query);\n\t\t}", "title": "" }, { "docid": "26a39ac82c766f2d9a6f7a5f11858eb4", "score": "0.5626934", "text": "public function adminSaveBrandOptionValue(Varien_Event_Observer $observer){\n\t\n\t\t$getSavedAttribute = $observer->getAttribute()->getAttributeCode();\n\t\tif($getSavedAttribute == 'brand_name'){\n\t\t\t\n\t\t\n\t\t\t//Check if any option is deleted\n\t\t\t$getObserver = $observer->getData();\n\t\t\t$getAttributeArray = $getObserver['attribute']->getOption();\n\t\t\t$optionDeleteArray = $getAttributeArray['delete'];\n\t\t\t//Using in_array we will check if any option is set to delete \n\t\t\t//and if it is deleted then delete the same from brand table too\n\t\t\tif(in_array(\"1\", $optionDeleteArray)){\n\t\t\t\tforeach($optionDeleteArray as $key=>$value){\n\t\t\t\t\t$connection = Mage::getSingleton('core/resource')->getConnection('core_write');\n\t\t\t\t\t$__condition = array($connection->quoteInto('option_id=?', $key));\n\t\t\t\t\t$connection->delete('brand', $__condition);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$attribute_code = \"brand_name\";\n\t\t\t$attribute_details = Mage::getSingleton(\"eav/config\")->getAttribute(\"catalog_product\", $attribute_code);\n\t\t\t$options = $attribute_details->getSource()->getAllOptions(false);\n\t\t\t$model = Mage::getModel('brand/brand');\n\t\t\t$collection = $model->getCollection()->addFieldToSelect('option_id');\n\t\t\t$optionId = $collection->getData('option_id');\n\t\t\tforeach($optionId as $optionIds){\n\t\t\t\t$optionIdArray[]= $optionIds['option_id'];\n\t\t\t}\n\t\t\tforeach($options as $option){\n\t\t\t\t$optionId = $option[\"value\"];\n\t\t\t\t$label = $option[\"label\"];\n\t\t\t\tif (!in_array($optionId, $optionIdArray)) {\n\t\t\t\t\t$data = array('option_id' => $optionId, 'name' => $label,'status'=>'1');\n\t\t\t\t\t $model->setData($data)->save();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "6c5ca140f0707fa2f0839977f2b08400", "score": "0.5616015", "text": "public function addNewBranch(Request $request)\n {\n\n $brands = Brand::pluck('brand_name','id');\n\n \treturn view('Backend.Adprovider.branches.add_branch',compact('brands'));\n }", "title": "" }, { "docid": "53d90e285715ef4d24b891c9cbbb72bf", "score": "0.56136066", "text": "function addNewProduct()\n {\n if ($this->isAdmin() == true) {\n $this->loadThis();\n } else {\n $this->load->model('product_model');\n\n $this->global['pageTitle'] = 'Ecommerce : Add New Product';\n $data = array();\n\t\t\t\n\t\t\t$this->load->model('brand_model');\n\t\t\t$brand['brandRecords'] = $this->brand_model->productbrandListing();\n\t\t\t\n\t\t\t$this->load->model('unit_model');\n\t\t\t$brand['unitRecords'] = $this->unit_model->getAllUnit();\n\t\t\t\n $this->loadViews('addNewProduct', $this->global, $brand, null);\n }\n }", "title": "" }, { "docid": "e1d2684d49568f75100fb178e804222a", "score": "0.5608992", "text": "public function bag_type_add()\n\t{\t\n\n\t\t$data['meal_time_id'] = implode(',', $this->input->post('m_time'));\n\n\t\t$b_limit = '';\n\t\t$prd_ids = $this->input->post('prd_id');\n\t\tif(!empty($prd_ids))\n\t\t{\t\n\t\t\t\n\t\t\t$bcapacity = $this->input->post('bcapacity');\n\t\t\t$limit = 0;\n\t\t\tforeach ($prd_ids as $key => $prd_id) {\n\n\t\t\t\t$limit = ($bcapacity[$key]) ? $bcapacity[$key] : 0;\n\t\t\t\t$b_limit .= $prd_id.'-'.$limit.',';\n\t\t\t}\n\t\t}\n\t\t$data['bname'] = $this->input->post('bname');\n\t\t$data['bcapacity'] = trim($b_limit, ',');\n\t\t$data['bag_prefix'] = $this->input->post('bag_prefix');\n\t\t$data['modified_on'] = date('Y-m-d H:i:s');\n\t\t$data['status'] = 0;\n\t\t$result = $this->Setting_model->bag_type_add($data);\n\t\t$this->session->set_flashdata('bag_success', 'Bag Type has been added successfully.');\n\n\t redirect('bag-type-list');\n\t}", "title": "" }, { "docid": "d533eea4b68121505d6bbfda4dfc6549", "score": "0.5607738", "text": "public function create()\n {\n return view('admin.brand.add');\n }", "title": "" }, { "docid": "d533eea4b68121505d6bbfda4dfc6549", "score": "0.5607738", "text": "public function create()\n {\n return view('admin.brand.add');\n }", "title": "" }, { "docid": "daff1f311303ea95dafef81945591780", "score": "0.55987334", "text": "function addProductInfo($product_type_id, $category_id, $product_info)\n {\n global $application;\n\n $product_type = $this->getProductType($product_type_id);\n\n $res = execQuery('INSERT_NEW_PRODUCT', array('p_type_id' => $product_type_id, 'p_name' => $product_info['Name']));\n\n\n $product_id = $application->db->DB_Insert_Id();\n\n //<add_link>\n $this->addProductLinkToCategory($product_id,$category_id);\n //</add_link>\n\n foreach ($product_type['attr'] as $view_tag => $attr)\n {\n // skip artificial attributes\n if ($view_tag == 'ID' || $view_tag == 'Name')\n {\n continue;\n }\n\n // prepare SEO URL tag\n if($view_tag == 'SEOPrefix' and isset($product_info[$view_tag]))\n {\n $product_info[$view_tag] = $this->_prepareSEOURL($product_info[$view_tag]);\n }\n\n execQuery('INSERT_NEW_PRODUCT_ATTRIBUTE', array('p_id' => $product_id, 'a_id' => $attr['id'], 'pa_value' => (isset($product_info[$view_tag]) ? $product_info[$view_tag] : $attr['default'])));\n $pa_id = $application->db->DB_Insert_Id();\n\n // If it is an image, save it to the separate table.\n if ($attr['input_type_name'] == 'image')\n {\n if ($product_info[$view_tag])\n {\n // define if the value for the given attributes exists in the DB.\n $tmp_name = str_replace($application->appIni['URL_IMAGES_DIR'],'',$product_info[$view_tag]);\n\n $image_info = $application->saveUploadImage(\"\", $tmp_name);\n $image_info['pa_id'] = $pa_id;\n execQuery('INSERT_NEW_PRODUCT_IMAGE', $image_info);\n }\n }\n\n }\n\n modApiFunc('EventsManager','throwEvent','ProductAdded', $product_id);\n\n //return the new product ID to use later in different hooks\n return $product_id;\n }", "title": "" }, { "docid": "18424dbc0dfb7f76fc84483e02af24c0", "score": "0.5590813", "text": "public function save_update_brand()\n {\n if ($_POST) {\n $config = array(\n array(\n 'field' => 'name',\n 'label' => 'Name',\n 'rules' => 'trim|required'\n )\n );\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() == false) {\n echo json_encode(([\"msg_type\" => \"error\", \"message\" => validation_errors() ]));\n } else {\n $id = $this->input->post('id');\n $this->Admin_model->update_brand($_POST, $id);\n echo json_encode(([\"msg_type\" => \"success\", \"message\" => \"Brand Updated Successfully\" ]));\n }\n }\n }", "title": "" }, { "docid": "0f14e80e42ee24f11a1968b6d0336029", "score": "0.5581714", "text": "public function actionCreate()\r\n {\r\n $model = new Branddetails();\r\n\r\n if ($model->load(Yii::$app->request->post())) {\r\n $model->parent_id = self::IS_PARENT;\r\n $model->url_safe = SiteUtil::getUrlFormate($_POST['Branddetails']['name']);\r\n $authimage = \\yii\\web\\UploadedFile::getInstance($model, 'img_url');\r\n if (!empty($authimage)) {\r\n $rootPath = str_replace(DIRECTORY_SEPARATOR . 'backend', \"\", Yii::$app->basePath);\r\n $filepath = $rootPath . '/backend/web/images/';\r\n $exp_var = explode('.', $authimage->name);\r\n $ext = end($exp_var);\r\n $randomstring = time() .\"-\". $model->url_safe.\".\" . $ext;\r\n $model->img_url = $randomstring;\r\n $authimage->saveAs($filepath . $randomstring);\r\n }\r\n if ($model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n echo '<pre>';print_r($model->errors);die;\r\n }\r\n }\r\n\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }", "title": "" }, { "docid": "c8dd4b5431e588fdc600f2cc19126e75", "score": "0.5573335", "text": "function getbrand()\n{\n global $db;\n $get_brands = \"select * from brands \";\n // selecting brand table\n $run_brands = mysqli_query($db, $get_brands);\n // sql query\n while ($row_brands = mysqli_fetch_array($run_brands)) {\n\n $brand_id = $row_brands['brand_id'];\n $brand_title = $row_brands['brand_title'];\n // $prod_img = $row_brands['product_img1'];\n\n // after clicking a tag---> cat declare variable---> with $brand_id\n echo \"<li><a href='products.php?cat=$brand_id'>\n <i class='icon-chevron-right'></i>$brand_title </a></li>\";\n\n\n // so now getting brand product by id\n }\n}", "title": "" }, { "docid": "469f2b41a8107fbc05110fc2d8c4df5b", "score": "0.557001", "text": "function get_Brands_Productions()\r\n{\r\n global $connection;\r\n if (isset($_GET['brand_id']))\r\n {\r\n\r\n $brands_id=$_GET['brand_id'];\r\n //query getting products of brand\r\n $get_pro=\"select * from products where product_brand = $brands_id \";\r\n //query getting name of brand\r\n $get_brand_name=\"select brand_title from brands where brand_id = $brands_id\";\r\n\r\n $run_pro=mysqli_query($connection,\"SET NAMES utf8\");\r\n $run_pro=mysqli_query($connection,\"SET CHARACTER SET utf8\");\r\n $run_pro =mysqli_query($connection,$get_pro);\r\n $run_brand_name = mysqli_query($connection,$get_brand_name);\r\n\r\n //display name of brand\r\n while($row_brands=mysqli_fetch_array($run_brand_name))\r\n {\r\n $row_brand_title = $row_brands['brand_title'];\r\n echo \"<br><br><h2 style='text-align: right' >$row_brand_title</h2>\";\r\n }\r\n\r\n\r\n if (mysqli_num_rows($run_pro)==0)\r\n {\r\n echo\"<br/><br/><b><h3>متاسفانه محصول خاصی در این دسته وجود ندارد</h3></b>\";\r\n }\r\n\r\n while ($row_brand_pro = mysqli_fetch_array($run_pro))\r\n {\r\n $product_id=$row_brand_pro['product_id'];\r\n $product_title=$row_brand_pro['product_title'];\r\n $product_cat=$row_brand_pro['product_cat'];\r\n $product_brand=$row_brand_pro['product_brand'];\r\n $product_price=$row_brand_pro['product_price'];\r\n $product_desc=$row_brand_pro['product_desc'];\r\n $product_image=$row_brand_pro['product_image'];\r\n\r\n echo \"\r\n <div class='product_box'>\r\n <h2 style='text-align: right'>$product_title</h2>\r\n <img src='admin_area/$product_image' height='140' width='140' alt='image'>\r\n <div class='price'>قیمت: <span>$product_price تومان</span></div>\r\n <div class='buynow'><a href='index.php?add_cart=$product_id'>هم اکنون بخرید</a> </div>\r\n <a href='details.php?product_id=$product_id'>توضیحات</a>\r\n </div>\r\n \r\n \";\r\n }\r\n\r\n }\r\n}", "title": "" }, { "docid": "49b425ca525886c6be5a20a25afeb43e", "score": "0.5566707", "text": "public function getBrandName()\n {\n return $this->brand_name;\n }", "title": "" }, { "docid": "a01366cb0396272f4d183a4955a9c8fb", "score": "0.55610085", "text": "public function addNewBranch(Request $request)\n {\n\n $brands = Brand::pluck('brand_name','id');\n\n \treturn view('Backend.Admin.branches.add_branch',compact('brands'));\n }", "title": "" }, { "docid": "85ccf8a0b99e220ff0e00a31fb7650b8", "score": "0.556088", "text": "public function addBranch() {\n try {\n if (!($this->branch instanceof Base_Model_Lib_App_Core_Catalog_Entity_Branch)) {\n throw new Base_Model_Lib_App_Core_Catalog_Exception(\" Branch Entity not intialized\");\n } else {\n $data = array(\n 'name' => $this->branch->getName(),\n 'region_id' => $this->branch->getRegion(),\n 'prefix' => $this->branch->getPrefix());\n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_Lib_App_Core_Catalog_Exception($ex);\n }\n }", "title": "" }, { "docid": "bb32ba260e09af3540f48ad85a6a2b3b", "score": "0.5548412", "text": "public function setBrandId($brandId);", "title": "" }, { "docid": "66af17cafa9f0c088ff77e09244b5153", "score": "0.55407894", "text": "public function webadmin_add() {\n $this->layout = 'admin_main';\n $this->loadModel('Category');\n $cat_data = $this->Category->find('list', array('fields' => 'Category.name'));\n $this->set('data', $cat_data);\n if ($this->request->is('post')) {\n If ($this->Subcategory->save($this->request->data)) {\n $this->Session->setFlash('Sub Category Added Successfully', 'success');\n $this->redirect(array('controller' => 'subcategories', 'action' => 'index', $this->request->data['Subcategory']['category_id']));\n }\n }\n }", "title": "" }, { "docid": "eb3dc78e9d3406a5d77b38b49fa2f045", "score": "0.5537379", "text": "public function getBrandBaseCategory() \n {\n if (is_null($this->_brand_base_category)) {\n $cat = Mage::getModel('catalog/category')->getCollection()\n ->addAttributeToselect('*')\n ->addAttributeToFilter('entity_id', $this->getManufacturerCategoryId())\n ->setPageSize(1)\n ->setPage(1)\n ->joinUrlRewrite()\n ->getFirstItem();\n\n $this->_brand_base_category = $cat;\n }\n return $this->_brand_base_category;\n }", "title": "" }, { "docid": "3af7b0ee3f370117ae8731bdec6508b3", "score": "0.5531237", "text": "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'name' => 'required|unique:brands,brand_name'\n\t\t);\n\t\t$validator = Validator::make(Input::all(),$rules);\n\n\t\tif( $validator->fails() ) {\n\t\t\treturn Redirect::to('admin/brand/create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\t\t}\n\n\t\t$image_files = array();\n\t\t$image_files = parent::common_upload_picture(Input::file('userfile'),'uploads/brand_icons');\n\n\t\t$brand = new Brand;\n\t\t$brand->brand_name = Input::get('name');\n\n\t\tif($image_files) {\n\t\t\tfor ($i=0; $i < count($image_files); $i++) {\n\t\t\t\t$brand->brand_icon = $image_files[$i]['imagename'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$brand->created_at = Date('Y-m-d H:i:s');\n\t\t$brand->save();\n\n\t\tSession::flash('success', 'Brand is successfully created.');\n\t\treturn Redirect::to('admin/brand');\n\t}", "title": "" }, { "docid": "965eab25c6e732e25f6f0cf51020590f", "score": "0.5529996", "text": "public function readBrands(){\n\t\treturn $query = \"SELECT distinct product_brand FROM \" . self::$model . \" GROUP BY product_brand\";\n\t}", "title": "" }, { "docid": "1b10899b795203772971b45b1f0277a2", "score": "0.5508532", "text": "function simplecart_brandingclose() { ?>\n\t\t \t</div><!-- #branding -->\n\t\t<?php }", "title": "" }, { "docid": "b9e209996ccd2249b194eb22d9493d10", "score": "0.55043745", "text": "public function add_category() {\n\t\ttry {\n\t\t\t$data['tab']='AddCategory';\n\t\t\t$data['bcum']='Add Category';\n\t\t\t$data['main']='category';\n\t\t\t$data['mode']='add';\n\t\t\t$this->load->view('backend/header', $data);\n\t\t\t$this->load->view('backend/add-category');\n\t\t\t$this->load->view('backend/footer');\n\t\t}\n\t\tcatch (Exception $ex) {\n\t\t\techo $ex->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "10d60bba2a9959f4d94f44e880a7c6ee", "score": "0.5490694", "text": "public function getBrandName()\n {\n return $this->brandName;\n }", "title": "" }, { "docid": "10d60bba2a9959f4d94f44e880a7c6ee", "score": "0.5490694", "text": "public function getBrandName()\n {\n return $this->brandName;\n }", "title": "" }, { "docid": "10d60bba2a9959f4d94f44e880a7c6ee", "score": "0.5490694", "text": "public function getBrandName()\n {\n return $this->brandName;\n }", "title": "" }, { "docid": "5999ceb364cf5c0e94b84302c6b1d434", "score": "0.5485051", "text": "function add_brand_class( $classes )\n{\n global $post;\n if ( isset( $post ) ) {\n $classes[] = $post->post_type . '-' . $post->post_name;\n }\n return $classes;\n}", "title": "" }, { "docid": "fa0d1db195e8966271dd4d82bd798cff", "score": "0.54799026", "text": "public function create()\n {\n return view('admin.brands.create', [\n 'brand'=>new Brand,\n ]\n\n );\n\n }", "title": "" }, { "docid": "4a95385b50b99d90b0542b80e7f2c5e0", "score": "0.5479176", "text": "public function getBrandCode()\n {\n return apply_filters('bp_trapp_save_brand_code', '');\n }", "title": "" }, { "docid": "c46b3c09aafd3f1443d4d98e9fd4443f", "score": "0.54728717", "text": "public function _construct() {\n $this->_init('brandmanagement/brandmanagement', 'brandmanagement_id');\n }", "title": "" }, { "docid": "2b83dcbdc5cdb29950a85b12a67891ed", "score": "0.5468561", "text": "function getBrandProducts(){\n \n global $db;\n\n\nif(isset($_GET['brand'])){\n $brand_id=$_GET['brand'];\n \n\n\n $get_brand_products=\"select * from products where brand_id='$brand_id'\";\n \n $run_brand_products=mysqli_query($db, $get_brand_products);\n \n $count= mysqli_num_rows($run_brand_products);\n \n if($count==0)\n {\n echo \"<h2>No Products Available!</h2>\";\n }\n \n \n \n \n while($row_brand_products=mysqli_fetch_array($run_brand_products))\n {\n $pro_id=$row_brand_products['product_id'];\n $pro_title=$row_brand_products['product_title'];\n $pro_cat=$row_brand_products['cat_id'];\n $pro_brand=$row_brand_products['brand_id'];\n $pro_desc=$row_brand_products['product_des'];\n $pro_price=$row_brand_products['product_price'];\n $pro_image=$row_brand_products['product_img1'];\n \n \n echo \"<div id='single_product'>\n <a href='details.php?pro_id=$pro_id' style='float:left;'>Details</a><br>\n \n <h3>$pro_title</h3>\n <img src='admin_area/product_image/$pro_image' height='150' width='150'/>\n \n <p><b>Rs.$pro_price/-</b></p>\n \n <a href='index.php?add_cart=$pro_id'><button>Add to Cart</button></a>\n \n\n \n </div>\";\n } \n}\n}", "title": "" }, { "docid": "71dfae1d8fe2d4988bdda79d9cbbb3f4", "score": "0.5453273", "text": "public function EditBrand() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n $brand_id = $this->input->post('brand_id');\n $brand_name = $this->input->post('brand_name');\n\n $condition = array('brand_name' => $brand_name, 'id !=' => $brand_id);\n $duplicate_name = $this->brand_model->get_all_details(BRAND, $condition);\n if ($duplicate_name->num_rows() > 0) {\n $this->setErrorMessage('error', 'Brand name already exists','admin_driver_brand_name_already');\n redirect(OPERATOR_NAME.'/brand/edit_brand_form/' . $brand_id);\n }\n\n $condition = array('_id' => MongoID($brand_id));\n $excludeArr = array(\"status\");\n if ($this->input->post('status') != '') {\n $brand_status = 'Active';\n } else {\n $brand_status = 'Inactive';\n }\n\n $seourlBase = $seourl = url_title($brand_name, '-', TRUE);\n $seourl_check = '0';\n $duplicate_url = $this->brand_model->get_all_details(BRAND, array('seourl' => $seourl));\n if ($duplicate_url->num_rows() > 0) {\n $seourl = $seourlBase . '-' . $duplicate_url->num_rows();\n } else {\n $seourl_check = '1';\n }\n $urlCount = $duplicate_url->num_rows();\n while ($seourl_check == '0') {\n $urlCount++;\n $duplicate_url = $this->brand_model->get_all_details(BRAND, array('seourl' => $seourl));\n if ($duplicate_url->num_rows() > 0) {\n $seourl = $seourlBase . '-' . $urlCount;\n } else {\n $seourl_check = '1';\n }\n }\n\n $inputArr = array(\n 'brand_name' => $brand_name,\n 'seourl' => $seourl,\n 'status' => $brand_status\n );\n\n if ($_FILES['brand_logo']['name'] != '') {\n $config['encrypt_name'] = TRUE;\n $config['overwrite'] = FALSE;\n $config['allowed_types'] = 'jpg|jpeg|gif|png|bmp';\n $config['max_size'] = 2000;\n $config['upload_path'] = './images/brand/';\n $this->load->library('upload', $config);\n if ($this->upload->do_upload('brand_logo')) {\n $logoDetails = $this->upload->data();\n $ImageName = $logoDetails['file_name'];\n @copy('./images/brand/' . $ImageName, './images/brand/thumbnail/' . $ImageName);\n $this->imageResizeWithSpace(75, 42, $ImageName, './images/brand/thumbnail/');\n } else {\n $logoDetails = $this->upload->display_errors();\n $this->setErrorMessage('error', $logoDetails);\n redirect(OPERATOR_NAME.'/brand/add_brand_form/' . $brand_id);\n }\n $brand_data = array('brand_logo' => $ImageName);\n } else {\n $brand_data = array();\n }\n\n\n $dataArr = array_merge($inputArr, $brand_data);\n\n $this->brand_model->update_details(BRAND, $dataArr, $condition);\t\t\t\n\t\t\t\n $modelArr = array('brand' => (string)$brand_id,'brand_name' => (string)$brand_name);\n\t\t\t$model_condition = array('brand' => (string)$brand_id);\n\t\t\t$this->brand_model->update_details(MODELS, $modelArr, $model_condition);\n\t\t\t\n $this->setErrorMessage('success', 'Brand Updated successfully','admin_brand_update_success');\n redirect(OPERATOR_NAME.'/brand/display_brand_list');\n }\n }", "title": "" }, { "docid": "fc561a48317c0af9843ea154d15b879e", "score": "0.54479504", "text": "function addeditvendorProduct( $ketObj )\n{ \n\tif( isset( $_REQUEST['avid'] ) && $_REQUEST['avid'] > 0 ){\n\t\t\t$avid = $_REQUEST['avid'];\n\t\t\n\t}else{\n\t\t\t$avid = \"\";\n\t}\n\t\tif( isset( $_REQUEST['productCat'] ) && ($_REQUEST['productCat'] > 0 || $_REQUEST['productCat']=\"ap\" )){\n\t\t\t$productCat = $_REQUEST['productCat'];\n\t\t\t\n\t\t\n\t\t}else{\n\t\t\t$productCat = \"\";\n\t\t}\n\t\tif( isset( $_REQUEST['searchbyproduct'] ) && $_REQUEST['searchbyproduct'] != \"\" ){\n\t\t\t$searchbyproduct = $_REQUEST['searchbyproduct'];\n\t\t\t\n\t\t\n\t\t}else{\n\t\t\t$searchbyproduct = \"\";\n\t\t}if( isset( $_REQUEST['searchp'] ) && $_REQUEST['searchp'] != \"\" ){\n\t\t\t$searchp = $_REQUEST['searchp'];\n\t\t\t\n\t\t\n\t\t}else{\n\t\t\t$searchp = \"\";\n\t\t}if( isset( $_REQUEST['buscatidS'] ) && $_REQUEST['buscatidS'] != \"\" ){\n\t\t\t$buscatidS = $_REQUEST['buscatidS'];\n\t\t}else{\n\t\t\t$buscatidS = $_REQUEST['buscatidS'];\n\t\t}if( isset( $_REQUEST['orderstatusS'] ) && $_REQUEST['orderstatusS'] != \"\" ){\n\t\t\t$orderstatusS = $_REQUEST['orderstatusS'];\n\t\t}else{\n\t\t\t$orderstatusS = \"\";\n\t\t}\n\n\n $Cattext = \"\";\n $busCat = \"\";\n\tif( isset( $_POST['Catsecond'] ) && is_array( $_POST['Catsecond'] ) && count( $_POST['Catsecond'] ) > 0 ){\n\t\t\n\t\t$subCattext = $_POST['Catsecond'];\n\t\t\n\t\tforeach( $subCattext as $sub )\n\t\t{\n\t\t\t$Cattext = $Cattext.\"*\".$sub.\"*,\";\n\t\t\t$busCat = $sub;\n\t\t}\n\t}else {\n\t\t\t$Cattext = $_POST['sub_cat_text'];\n\t\t\t$busCat = $_POST['b_cat'];\n\t\n\t\n\t}\n \n\tif( isset( $_POST['product'] ) && $_POST['product'] != \"\") { $pide = $_POST['product'];}else{$pide = $_POST['pide']; }\n\t\n\tif( isset( $_POST['productCat'] ) && $_POST['productCat'] > 0 ){ \n\t\t$parent_cat = $_POST['productCat'];\n\t}else {\n\t\t\t$parent_cat = $_POST['parent_cat'];\n\t\n\t}\n\t\n\t\n\t$ketechVendorP['vid'] = $_POST['vid'];\n\t$ketechVendorP['b_cat'] = $busCat;\n\t$ketechVendorP['p_cat'] = $parent_cat;\n\t$ketechVendorP['sub_cat_text'] = $Cattext;\n\t$ketechVendorP['pid'] = $pide;\n\t//$ketechVendorP['baseprice'] = $_POST['baseprice'];\n\t//$ketechVendorP['sellprice'] = $_POST['sellprice'];\n\t$ketechVendorP['modify_baseprice'] = $_POST['modifybaseprice'];\n\t$ketechVendorP['modify_sellprice'] = $_POST['modifysellprice'];\n\t$ketechVendorP['admin_approval'] = 1;\n\t$ketechVendorP['stock'] = $_POST['stock'];\n\t$ketechVendorP['status'] = $_POST['status'];\n\t$ketechVendorP['ART_NO'] =\t$_POST['art_no'];\n\t$ketechVendorP['SUPPL_NO'] =\t$_POST['sup_no'];\n\t$ketechVendorP['SUPPL_NAME'] =\t$_POST['sup_name'];\n\t$ketechVendorP['SUPPL_ART_NO'] =\t$_POST['suppl_art_no'];\n\t$ketechVendorP['BUYER_UID'] =\t$_POST['buyer_uid'];\n\t$ketechVendorP['CONT_BUY_UNIT'] =\t$_POST['count_buy_unit'];\n\t$ketechVendorP['ART_GRP_NO'] =\t$_POST['art_grp_no'];\n\t$ketechVendorP['ART_GRP_DESCR'] =\t$_POST['art_grp_descr'];\n\t$ketechVendorP['ART_GRP_SUB_NO'] =\t$_POST['art_grp_sub_no'];\n\t$ketechVendorP['ART_GRP_SUB_DESCR'] =\t$_POST['art_grp_sub_descr'];\n\t$ketechVendorP['DEPT_NO'] =\t$_POST['dept_no'];\n\t$ketechVendorP['DEPT_DESCR'] =\t$_POST['dept_descr'];\n\t$ketechVendorP['SELL_PR'] =\t$_POST['sell_pr'];\n\t$ketechVendorP['SELL_VAT'] =\t$_POST['sell_vat'];\n\t$ketechVendorP['SPAT'] =\t$_POST['spat'];\n\t$ketechVendorP['MRP_PRICE'] =\t$_POST['mrp_price'];\n\t$ketechVendorP['VAT_MY'] =\t$_POST['vat_my'];\n\t$ketechVendorP['BUY_VAT_NO'] =\t$_POST['buy_vat_no'];\n\t$ketechVendorP['BUY_VAT_PERC'] =\t$_POST['buy_vat_perc'];\n\t$ketechVendorP['Offer_No'] =\t$_POST['offer_no'];\n\t$ketechVendorP['DMS'] =\t$_POST['dms'];\n\t$ketechVendorP['ON_ORDER'] =\t$_POST['on_order'];\n\t$ketechVendorP['LAST_DELDAY'] =\t$_POST['last_delday'];\n\t$ketechVendorP['LAST_SALEDAY'] =\t$_POST['last_saleday'];\n\t$ketechVendorP['MFG_Date'] =\t$_POST['mfg_date'];\n\t$ketechVendorP['Exp_Date'] =\t$_POST['exp_date'];\n\t$ketechVendorP['ART_STATUS'] =\t$_POST['art_status'];\n\t$ketechVendorP['STORE'] =\t$_POST['store'];\n\t\n\t$hidcid\t\t\t\t =\t $_POST['hidcid'];\n\t\n // echo \"<pre>\";\n // print_r( $_POST );\n //die();\n\t\n\t//$allSet = $ketObj->runquery( \"SELECT\", \"*\", \"ketechprod\", array(), \"\" );\n\tif( isset( $hidcid ) && $hidcid > 0 )\n\t{\n\t\t$allSet = $ketObj->runquery( \"UPDATE\", \"\", \"ketechvp_\".$_POST['hidchild'].\"\", $ketechVendorP, \"WHERE id=\".$hidcid );\n\t}else\n\t{\n\t\t$allSet = $ketObj->runquery( \"INSERT\", \"*\", \"ketechvp_\".$_POST['hidchild'].\"\", $ketechVendorP );\n\t\t\n\t}\n\t$VendorInfo = $ketObj->runquery( \"SELECT\", \"*\", \"ketechvendor\", array(),\" where id = \".$_SESSION['vid'].\"\" );\n\t$BaseUrl = $ketObj->runquery( \"SELECT\", \"burl,uemail,uname\", \"ketechset\", array(),\"\" );\n\t\n\t$vid= $VendorInfo['0']['id'];\n\t$vcity= $VendorInfo['0']['vcity'];\n\t$varea= $VendorInfo['0']['varea'];\n\t$vphone= $VendorInfo['0']['vphone'];\n\t$path = $BaseUrl['0']['burl'].'/index.php?v=shopvpl&f=tmpl&vid='.$vid.'&admin_approval=y';\n\t\n\t$toemail = $BaseUrl['0']['uemail'];\n\t$toname = $BaseUrl['0']['uname'];\n\t$fromemail= $VendorInfo['0']['vmail'];\n\t$fromname= $VendorInfo['0']['vname'];\n\t$subject = \"Product Approval For \".$fromname;\n\t$message = \"Hello Admin <br/> Please find vendor detail below<br/><b>Vendror Id: \".$vid.\"<br/>Vendor City: \".$vcity.\"<br/>Vendor Area: \".$varea.\"<br/>Vendor Phone: \".$vphone.\"<br/><a href = 'http://\".$path.\"' target='_blank'>To Approve Product Click Here</a>\";\n\t\n\t/*echo $message;\n\tdie();*/\n\t\t\n\t$ketObj->emailSend($toemail,$toname,$fromemail ,$fromname,$subject ,$message );\t\n\t\t\n\t\n\t\t\n\t ##header(\"Location: index.php?v=\".$_POST['v'].\"&f=\".$_POST['f'].\"&vid=\".$ketechVendorP['vid'].\"\" );\n\t \n\t header( \"Location: index.php?v=\".$_POST['v'].\"&f=\".$_POST['f'].\"&vid=\".$ketechVendorP['vid'].\"&avid=\".$avid.\"&productCat=\".$productCat.\"&searchbyproduct=\".$searchbyproduct.\"&searchp=\".$searchp.\"&buscatid=\".$buscatidS.\"&orderstatus=\".$orderstatusS.\"\" );\n\n}", "title": "" }, { "docid": "78ffdf3c40785558d724c8460683f5fb", "score": "0.5446049", "text": "public function getBrand()\n {\n return isset($this->Brand) ? $this->Brand : null;\n }", "title": "" }, { "docid": "50ee97a43586640d0b28d0b2e0ed2dc9", "score": "0.5440237", "text": "function clientCode(string $brand): void\n{\n if ($brand === 'Apple') { // conditional checks required in each place an instantiation of products occur\n $phone = new iPhone();\n $phone->call();\n $phone->text();\n\n $tablet = new iPad();\n $tablet->browse();\n } elseif ($brand === 'Samsung') {\n $phone = new Galaxy();\n $phone->call();\n $phone->text();\n\n $tablet = new GalaxyTab();\n $tablet->browse();\n }\n}", "title": "" } ]
f658ae4481efa3312a813846a16fc915
get the title of the dashboard
[ { "docid": "68bbb1d521cda61573b393d479a0bb99", "score": "0.8056267", "text": "public static function getTitle() {\n return AConfig::trans('dashboard');\n }", "title": "" } ]
[ { "docid": "a9cdbb71e6207a50e1ff9982c66fa9d4", "score": "0.7835359", "text": "function title()\n\t{\n\t\treturn $this->settings('title');\n\t}", "title": "" }, { "docid": "797a6ae64c8f4c656d3e8edde3874e1e", "score": "0.7702414", "text": "function getTitle() {\n\techo(CLanaya::Instance()->title);\n\n\treturn CLanaya::Instance()->title;\n}", "title": "" }, { "docid": "26b7b83f44b9fd5ef3d79157c3264e28", "score": "0.76880103", "text": "private final function getTitle()\n {\n if (isset($this->title)) {\n return $this->title;\n }\n\n if (isset($this->menu_title)) {\n return $this->menu_title;\n }\n\n else return 'Squeeze 1.0 Page';\n }", "title": "" }, { "docid": "49e29ed3748ab0c1c36bbb61463909e3", "score": "0.76401895", "text": "public function get_title();", "title": "" }, { "docid": "49e29ed3748ab0c1c36bbb61463909e3", "score": "0.76401895", "text": "public function get_title();", "title": "" }, { "docid": "49e29ed3748ab0c1c36bbb61463909e3", "score": "0.76401895", "text": "public function get_title();", "title": "" }, { "docid": "60d2591292ad47a641a9c774c314bc0f", "score": "0.7555631", "text": "public function title()\n {\n return Application::slugToTitle($this->slug);\n }", "title": "" }, { "docid": "c3a1c06b0290737ae1b700ab4687fd2b", "score": "0.75502455", "text": "function getTitle() {\n\t\treturn $this->getData('title');\n\t}", "title": "" }, { "docid": "c3a1c06b0290737ae1b700ab4687fd2b", "score": "0.75502455", "text": "function getTitle() {\n\t\treturn $this->getData('title');\n\t}", "title": "" }, { "docid": "1712945449603b3433a2aae8df1fbb8c", "score": "0.75381213", "text": "public static function getTitle() : string {\n return self::$pageTitle;\n }", "title": "" }, { "docid": "395549b34c96fcb611cb8f46d03496e4", "score": "0.75230265", "text": "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "395549b34c96fcb611cb8f46d03496e4", "score": "0.75230265", "text": "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "895f29e019956299bf11714e3a15aa0a", "score": "0.7516436", "text": "public function get_title() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "10129ddf92366b0c23231c0cfd0a7dcd", "score": "0.7516001", "text": "public function title()\n\t{\n\t\treturn $this->getTitle();\n\t}", "title": "" }, { "docid": "03c42f56237aa05ec343182f1f356001", "score": "0.7503999", "text": "public function get_title() : string {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "87be5e265f693232e161388203e35421", "score": "0.7503662", "text": "public function get_title() \n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "82f2f02ca177e389a413b47ac2b7defe", "score": "0.7496418", "text": "public function get_panel_title() {\t\n\t $action = null;\n\t\t$xixallow = $this->xix_allow();\n\t\t\n\t switch ($action) {\t\n\t\t\n\t\t case 'modapp' : $ret = localize('_xixupgrade',getlocal()); break;\n\t\t default : $ret = ($xixallow) ? localize('_xixcreate',getlocal()) : null;\n\t\t}\n\t\t\n\t\t//return ($ret);\n\t\t$wret = '<h2 class=\"entry-title\">'.$ret.'</h2>';\n\t\treturn ($wret);\n\t}", "title": "" }, { "docid": "b184ed4f410c471e2c93842d9e4905de", "score": "0.74951804", "text": "public function getTitle() {\n\t\t$this->load();\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "207878285cf8a16af6388ca38d4afca0", "score": "0.7463886", "text": "public function getTitle()\n {\n return isset($this->config['title']) ? $this->config['title'] : ucfirst($this->key_name);\n }", "title": "" }, { "docid": "258777de587678e669edbc436ba93e92", "score": "0.74595565", "text": "public function GetTitle () {\r\r\n\t\treturn $this->title;\r\r\n\t}", "title": "" }, { "docid": "1cd84bc439c48458d95142c59edcfa31", "score": "0.7457338", "text": "public function title()\n {\n return $this->title;\n }", "title": "" }, { "docid": "17a89f42948170ddb81e0e70e8f5e521", "score": "0.7440749", "text": "public function get_title() {\n\t\treturn __( 'Da Winti Beregner', 'elementor-dawinti' );\n\t}", "title": "" }, { "docid": "fe389a603346ca673ba0463b88eafa18", "score": "0.7425869", "text": "public function getTitle(){\n\t\treturn($this->title);\n\t}", "title": "" }, { "docid": "fe389a603346ca673ba0463b88eafa18", "score": "0.7425869", "text": "public function getTitle(){\n\t\treturn($this->title);\n\t}", "title": "" }, { "docid": "5799fac89ada2c634caac2c5c8299517", "score": "0.74242955", "text": "public function getTitle(): string {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "8b1f961af32f1edfe31c82f2ba425cb5", "score": "0.7397711", "text": "public function getTitle() {\r\n\treturn $this->title;\r\n }", "title": "" }, { "docid": "b5d454a84e8b5ae2d764f85dd15bf840", "score": "0.7391389", "text": "function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "3baabb47a0dc5bebb3bcea7ee7eefbbd", "score": "0.73905784", "text": "public function getTitle()\n {\n if ($this->_title === null) {\n return ucfirst(Yii::$app->controller->action->id);\n }\n\n return $this->_title;\n }", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.73901623", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "562107ef70d28e208853495b87e8d510", "score": "0.73886174", "text": "public function getTitle() {\n\t\treturn $this->getSystem()->getTitle();\n\t}", "title": "" }, { "docid": "484befdebceb43912491af15df2c98a6", "score": "0.73884654", "text": "public function plugin_page_title() {\r\n\t\treturn $this->_title;\r\n\t}", "title": "" }, { "docid": "9a49805d643f851871843375207718b2", "score": "0.73873734", "text": "private final function getMenuTitle()\n {\n if (isset($this->menu_title)) {\n return $this->menu_title;\n }\n\n if (isset($this->title)) {\n return $this->title;\n }\n\n return 'Squeeze 1.0 Page';\n }", "title": "" }, { "docid": "b1c0949f65019baef19402bd556aa57d", "score": "0.73814875", "text": "public function get_title() {\r\n\t\treturn $this->name;\r\n\t}", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.73805195", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "3c47909549d79a63dfdac0ebdac817a6", "score": "0.73561317", "text": "private function getTitle()\n {\n return $this->strTitle;\n }", "title": "" }, { "docid": "c4334cc2a13bf81a136f1c3d64cac819", "score": "0.7348404", "text": "function get_title() {\n return $this->title;\n }", "title": "" }, { "docid": "56a0f03fef130f6be4a8b70024bf2c0c", "score": "0.7345649", "text": "public function getTitle()\n\t\t{\n\t\t\treturn $this->title;\n\t\t}", "title": "" }, { "docid": "56a0f03fef130f6be4a8b70024bf2c0c", "score": "0.7345649", "text": "public function getTitle()\n\t\t{\n\t\t\treturn $this->title;\n\t\t}", "title": "" }, { "docid": "2f3c17657f6cb19f8c0aada3af4cddc1", "score": "0.7344657", "text": "public function getTitle()\n {\n return $this->get('title');\n }", "title": "" }, { "docid": "3ec0375793a58d2403a60e6074ea3fe5", "score": "0.7344539", "text": "public function getTitle()\n {\n return $this->pageTitle;\n }", "title": "" }, { "docid": "87688fba61cf119d942fe51bb2dccddc", "score": "0.73419654", "text": "public function getTitle() {\n\t\treturn $this->entry->title;\n\t}", "title": "" }, { "docid": "2b74facb5cb42a8ab4721dade07a5d2d", "score": "0.73410285", "text": "public function getTitle() {\n\t\t\treturn $this->data['title'];\n\t\t}", "title": "" }, { "docid": "71c6973071613a0efd90ca213569f987", "score": "0.7327632", "text": "public function getTitle() : string {\n return $this->title;\n }", "title": "" }, { "docid": "3e4ed61e19e4ea14fbbce969bccbb4fe", "score": "0.7327215", "text": "public function getTitle(): string\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "70de4e562ec0d38bd402dc83616af070", "score": "0.73254836", "text": "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "70de4e562ec0d38bd402dc83616af070", "score": "0.73254836", "text": "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "70de4e562ec0d38bd402dc83616af070", "score": "0.73254836", "text": "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "c7b3f1ce8e4e91792b28272b6fc94cbc", "score": "0.73222613", "text": "public function getTitle(): string {\n return $this->title;\n }", "title": "" }, { "docid": "9b3a090f25c2709229ee6420b3c0f515", "score": "0.7322137", "text": "public function get_title()\n {\n // Return the title value\n return $this->_title;\n }", "title": "" }, { "docid": "fc45c019327c80050ef95460e8e80d24", "score": "0.73185885", "text": "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "fc45c019327c80050ef95460e8e80d24", "score": "0.73185885", "text": "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.7316638", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7782105", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.74687606", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.7393118", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7328834", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72882813", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.72740334", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.72529656", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.7215597", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.7178891", "text": "public function create()\n {\n return view('core.admin.form.create');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.71638685", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.7148757", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.71411735", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.713852", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.71345985", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.7130929", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.71173835", "text": "public function create()\n {\n return view('crud.new');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.71150076", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.71074176", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.7075148", "text": "public function create()\n {\n //\n return view('submit.create');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.7073722", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7072655", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.70675695", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.70457923", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.7040961", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.70215225", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.7014469", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.7008361", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.70045805", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.69976735", "text": "public function create()\n {\n return view('student_form');\n }", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.6994326", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69885707", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6986169", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.6984008", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.69780463", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.69766605", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.69652027", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.69635683", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.69630045", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6958746", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "ec1387b33a439043065a5a57c6b204dc", "score": "0.695659", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.6953423", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.6939794", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.69371575", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.69358236", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.6935629", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.693502", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "70b9293351aa11656c59414a77fe44bf", "score": "0.6923899", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.6919321", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.6917995", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.6916618", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6914903", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.69129646", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.69047606", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.6899591", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6898638", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.68974555", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.6896062", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.68953085", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.6891878", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.68887526", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.6888498", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6884337", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.6883745", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6879102", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.687882", "text": "public function create()\n {\n return view('pemilih::create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6876466", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.68743026", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.6870653", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.68705153", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.68689495", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.6868636", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6866793", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.68618274", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.6860699", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "60bdecfc6ffd19a36bc113519ea81603", "score": "0.685967", "text": "public function create()\n {\n //\n return view('products.form');\n }", "title": "" }, { "docid": "3d7bc8bb3b893c8acc93454aa41e36a4", "score": "0.68593067", "text": "public function create()\n\t{\n\n\t\treturn view('admin.oficinas.create');\n\t}", "title": "" }, { "docid": "5ac05ec4af3247a2fffa1aede51592e8", "score": "0.6858492", "text": "public function create()\n {\n return view('ringan.create');\n }", "title": "" }, { "docid": "17dc479c63e9567096e96d737df7c124", "score": "0.6857442", "text": "public function create() {\n $data = [\n 'title' => 'site_name',\n 'page_title' => 'add_admin',\n 'type' => 'add',\n 'form_title' => 'admin_form',\n 'submit_button' => 'save',\n ];\n return view(AD . '.brands_form')->with($data);\n }", "title": "" } ]
f787a5248a6e2add437ddc72b001644c
Method that tries to update an existing case.
[ { "docid": "cf85a88a8a62754760bbb91678f789a0", "score": "0.6497053", "text": "public function modifyCase(DocCase $case, $id)\n {\n try {\n\n $sql = \"UPDATE cases SET title = :title, description = :description, category_id = :category_id, variant = :variant WHERE ID = :id;\";\n\n //get values\n $title = $case->getTitle();\n $description = $case->getDescription();\n $category_id = $case->getCategory();\n $variant = $case->getVariant();\n\n //if the variant is not null, insert row in representation table\n if ($variant != null) {\n $sql .= \"INSERT INTO representation (id_case, id_variant) VALUES (:id, :variant);\";\n echo $variant;\n }\n\n //prepare query\n $prepared_query = $this->conn->prepare($sql);\n\n //bind params first statement\n $prepared_query->bindParam(':title', $title, PDO::PARAM_STR);\n $prepared_query->bindParam(':id', $id, PDO::PARAM_INT);\n $prepared_query->bindParam(':description', $description, PDO::PARAM_STR);\n $prepared_query->bindParam(':category_id', $category_id, PDO::PARAM_INT);\n $prepared_query->bindParam(':variant', $variant, PDO::PARAM_INT);\n\n $prepared_query->execute();\n\n return true;\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n return false;\n }\n }", "title": "" } ]
[ { "docid": "788717ba7723d22b6d57d7ba56bd27cb", "score": "0.681984", "text": "public function update(Request $request, Cases $cases)\n {\n //\n }", "title": "" }, { "docid": "9dc0fcc4b9c3c8f2ee4f97c3ed79a39f", "score": "0.66225535", "text": "public function update($id)\n\t{\n\t\t$case = Case::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Case::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$case->update($data);\n\n\t\treturn Redirect::route('cases.index');\n\t}", "title": "" }, { "docid": "f16000fb4e2876f56e806ee145790f06", "score": "0.64748436", "text": "public function edit(Cases $cases)\n {\n //\n }", "title": "" }, { "docid": "11dca9e035fb21a91a49a775bb7b3011", "score": "0.63237375", "text": "public function update(Request $request, Suitcase $suitcase)\n {\n //\n }", "title": "" }, { "docid": "e9d30e568bb9881d106aecf7a60ea592", "score": "0.6161484", "text": "public function update(Request $request,$id)\n {\n $this->validate($request,[\n 'case_no' => 'required',\n 'case_title' => 'required',\n 'case_date' => 'required',\n 'case_description' => 'required',\n ]);\n\n $case = Cas::find($id);\n $case->case_no = $request->case_no;\n $case->case_title = $request->case_title;\n $case->case_date = $request->case_date;\n $case->case_description = $request->case_description;\n $case->save();\n Toastr::success('Cose Successfully updated','Success');\n return redirect()->route('case.index');\n }", "title": "" }, { "docid": "fedeb1625e6c6931b31329c9bfa215d3", "score": "0.6131266", "text": "public function UpdateCaseData(Request $request)\n {\n if (!$request->input('test')) {\n $CaseId = Session::get('CaseId');\n\n //Generate Tracking Id\n Session::put('TrackingID', $this->generateRandomString() . $CaseId);\n\n DB::table('refundcase')\n ->where('RefundCase_Id', '=', $CaseId)\n ->update(['RefundCaseDetail' => $request->getContent(), 'RefundCaseStatus' => 'Label Generated', 'RefundCaseStatusKey' => Session::get('TrackingID')]);\n //update case history\n $this->UpdateCaseHistory($CaseId, 'Customer|Label Generated ');\n return 'true';\n } else {\n return response()->json('UP');\n }\n }", "title": "" }, { "docid": "9cb3a13bf7a456d84d747fb5113a54c7", "score": "0.6128449", "text": "public function captureCaseUpdate(CaseRequest $request)\n {\n\n $userRole = UserRole::where('name', '=', 'House Holder')->first();\n $user = New User();\n $user->role = $userRole->id;\n $user->name = $request['name'];\n $user->surname = $request['surname'];\n $user->cellphone = $request['cellphone'];\n $user->id_number = $request['id_number'];\n $user->position = $request['position'];\n $title = Title::where('slug', '=', $request['title'])->first();\n $user->title = $title->id;\n $user->gender = $request['gender'];\n $user->dob = $request['dob'];\n $user->house_number = $request['house_number'];\n $user->email = $request['cellphone'] . \"@siyaleader.net\";\n $user->created_by = \\Auth::user()->id;\n $language = Language::where('slug', '=', $request['language'])->first();\n $user->language = $language->id;\n $province = Province::where('slug', '=', $request['province'])->first();\n $user->province = $province->id;\n $district = District::where('slug', '=', $request['district'])->first();\n $user->district = $district->id;\n $municipality = Municipality::where('slug', '=', $request['municipality'])->first();\n $user->municipality = $municipality->id;\n $ward = Ward::where('slug', '=', $request['ward'])->first();\n $user->ward = $ward->id;\n $user->save();\n $casePriority = CasePriority::where('slug', '=', $request['priority'])->first();\n $case = CaseReport::find($request['caseID']);\n $case->description = $request['description'];\n $case->priority = $casePriority->id;\n $case->province = $user->province;\n $case->district = $user->district;\n $case->municipality = $user->municipality;\n $case->ward = $user->ward;\n $case->area = $user->area;\n $case->house_holder_id = $user->id;\n $case->updated_by = \\Auth::user()->id;\n $case->updated_at = \\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString();\n $case->save();\n\n\n return 'ok';\n\n }", "title": "" }, { "docid": "591dcdea44af79a02ba87e92bf6ea3e1", "score": "0.6113608", "text": "public function update(Request $request, $id) {\n try {\n $case = CaseFile::findOrFail($id);\n\n $this->validate($request, [\n 'clientCaseRefHead' => 'required' \n ]); \n $request['approvedBy_id'] = $request->input(\"approvedBy_id\") == \"\" ? null : $request->input(\"approvedBy_id\");\n $request['caseRef_id'] = $request->input(\"caseRef_id\") == \"\" ? null : $request->input(\"caseRef_id\"); \n $request['writer_id'] = $request->input(\"writer_id\") == \"\" ? null : $request->input(\"writer_id\");\n\n if($request['recipient_id'] == \"\") \n $request['recipient_id']= null; \n $input = $request->all(); \n $case->fill($input)->save(); \n \n return response($case);\n } catch (Exception $e) {\n return \"Error\";\n }\n }", "title": "" }, { "docid": "22bc1120c91694c5349d6242d21151b1", "score": "0.60311395", "text": "public function usecases_update(Request $request) {\n \n $date = explode(\"/\", $request->published);\n $published = $date[2].'-'.$date[1].'-'.$date[0];\n $data = $request->all();\n \n if($request->input('id')) {\n // Check slug already exist, then add ID of the item\n $articleID = $request->input('id');\n $slug = $data['slug']; \n $count = Article::where('slug', $slug)->where('articleIdx', '!=', $articleID)->count();\n if ($count > 0) {\n $data['slug'] = $slug. '-'.$articleID;\n }\n }\n\n if($request->input('id')) {\n $articleIdx = $request->input('id'); \n $data['published'] = date(DB_DATE_FORMAT, strtotime($published));\n unset($data['id']);\n Article::find($articleIdx)->update($data); \n Session::flash('flash_success', 'Data has been updated successfully');\n \n $logDetail = 'Updated: ID- '.$articleIdx.', Title- '.$data['articleTitle'].', CommunityID- '.$data['communityIdx'];\n SiteHelper::logActivity('USECASE', $logDetail, 'admin');\n\n } else { \n $data['published'] = date(DB_DATE_FORMAT, strtotime($published));\n unset($data['id']);\n\n // Check same slug already exist, then remove slug from insertion and update later with ID\n $slug = $data['slug']; \n $slugCount = Article::where('slug', $slug)->count();\n if ($slugCount > 0) {\n $data['slug'] = '';\n }\n\n $data['isUseCase'] = 1; \n $savedData = Article::create($data); \n $articleIdx = $savedData->articleIdx; \n\n // now update the slug if the count \n $data['articleIdx'] = $articleIdx;\n $data['slug'] = $slug. '-'.$articleIdx;\n Article::find($articleIdx)->update($data);\n \n $logDetail = 'Added: ID- '.$articleIdx.', Title- '.$data['articleTitle'].', CommunityID- '.$data['communityIdx'];\n SiteHelper::logActivity('USECASE', $logDetail, 'admin');\n\n Session::flash('flash_success', 'New Data has been added successfully'); \n }\n\n if ($request->hasFile('uploadedFile')) {\n $this->usecases_upload_attach($request, $articleIdx);\n }\n \n return \"success\";\n\n }", "title": "" }, { "docid": "ed0fc7859cc83648bf17e22b11b97f9d", "score": "0.59967554", "text": "public function edit(Suitcase $suitcase)\n {\n //\n }", "title": "" }, { "docid": "bdacae9c4bd38b9929e4789728b8d004", "score": "0.5945464", "text": "public function edit($id)\n {\n\n $destinationFolder = 'files/case_' . $id;\n\n if (!\\File::exists($destinationFolder)) {\n $createDir = \\File::makeDirectory($destinationFolder, 0777, true);\n }\n\n $caseObj = \\DB::table('cases')\n ->join('cases_statuses', 'cases.status', '=', 'cases_statuses.id')\n ->where('cases.id', '=', $id)\n ->select(\\DB::raw(\"\n cases.id,\n cases.case_sub_type,\n cases.case_type,\n cases.house_holder_id,\n cases_statuses.name as status\n \"\n ))\n ->first();\n\n if ($caseObj->status == 'Pending' && $caseObj->house_holder_id == 0) {\n\n $case = \\DB::table('cases')\n ->join('cases_statuses', 'cases.status', '=', 'cases_statuses.id')\n ->where('cases.id', '=', $id)\n ->select(\\DB::raw(\"\n cases.id,\n cases.description,\n cases.created_at,\n cases.img_url,\n cases.reporter as reporteID,\n cases.house_holder_id,\n cases.saps_case_number,\n cases.street_number,\n cases.route,\n cases.locality,\n cases.administrative_area_level_1,\n cases.postal_code,\n cases.country,\n cases.client_reference_number,\n cases.saps_station,\n cases.investigation_officer,\n cases.investigation_cell,\n cases.investigation_email,\n cases.investigation_note, \n cases_statuses.name as status,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporter,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as household,\n (select `created_at` from `cases_activities` where `case_id` = `cases`.`id` order by `created_at` desc limit 1) as last_at,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporterCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as householdCell\n \"\n )\n )\n ->get();\n }\n\n\n if ($caseObj->status == 'Pending' && $caseObj->house_holder_id > 0) {\n\n\n $case = \\DB::table('cases')\n ->join('cases_statuses', 'cases.status', '=', 'cases_statuses.id')\n ->join('cases_types', 'cases.case_type', '=', 'cases_types.id')\n ->join('cases_sub_types', 'cases.case_sub_type', '=', 'cases_sub_types.id')\n ->where('cases.id', '=', $id)\n ->select(\\DB::raw(\"\n cases.id,\n cases.description,\n cases.created_at,\n cases.img_url,\n cases.reporter as reporteID,\n cases.house_holder_id,\n cases.saps_case_number,\n cases.street_number,\n cases.route,\n cases.locality,\n cases.administrative_area_level_1,\n cases.postal_code,\n cases.country,\n cases.saps_station,\n cases.investigation_officer,\n cases.investigation_cell,\n cases.investigation_email,\n cases.investigation_note, \n cases.client_reference_number,\n cases_statuses.name as status,\n cases_types.name as case_type,\n cases_sub_types.name as case_sub_type,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporter,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as household,\n (select `created_at` from `cases_activities` where `case_id` = `cases`.`id` order by `created_at` desc limit 1) as last_at,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporterCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as householdCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `client_reference_number` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as reference_number\n \"\n )\n )\n ->get();\n }\n\n\n if ($caseObj->status != 'Pending') {\n\n\n if ($caseObj->case_sub_type > 0) {\n\n\n $case = \\DB::table('cases')\n ->join('cases_statuses', 'cases.status', '=', 'cases_statuses.id')\n ->join('cases_types', 'cases.case_type', '=', 'cases_types.id')\n ->join('cases_sub_types', 'cases.case_sub_type', '=', 'cases_sub_types.id')\n ->where('cases.id', '=', $id)\n ->select(\\DB::raw(\"\n cases.id,\n cases.description,\n cases.created_at,\n cases.img_url,\n cases.reporter as reporteID,\n cases.street_number,\n cases.route,\n cases.locality,\n cases.administrative_area_level_1,\n cases.postal_code,\n cases.country,\n cases.house_holder_id,\n cases.saps_case_number,\n cases.saps_station,\n cases.investigation_officer,\n cases.investigation_cell,\n cases.investigation_email,\n cases.investigation_note, \n cases.client_reference_number,\n cases_statuses.name as status,\n cases_types.name as case_type,\n cases_sub_types.name as case_sub_type,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporter,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as household,\n (select `created_at` from `cases_activities` where `case_id` = `cases`.`id` order by `created_at` desc limit 1) as last_at,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporterCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as householdCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `client_reference_number` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as reference_number\n \"\n ))->get();\n\n\n } else {\n\n\n $case = \\DB::table('cases')\n ->join('cases_statuses', 'cases.status', '=', 'cases_statuses.id')\n ->join('cases_types', 'cases.case_type', '=', 'cases_types.id')\n ->where('cases.id', '=', $id)\n ->select(\\DB::raw(\"\n cases.id,\n cases.description,\n cases.created_at,\n cases.img_url,\n cases.reporter as reporteID,\n cases.house_holder_id,\n cases.street_number,\n cases.route,\n cases.locality,\n cases.administrative_area_level_1,\n cases.postal_code,\n cases.country,\n cases.saps_case_number,\n cases.saps_station,\n cases.investigation_officer,\n cases.investigation_cell,\n cases.investigation_email,\n cases.investigation_note, \n cases.client_reference_number,\n cases_statuses.name as status,\n cases_types.name as case_type,\n cases.saps_station,\n cases.investigation_officer,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporter,\n IF(`cases`.`addressbook` = 1,(SELECT CONCAT(`first_name`, ' ', `surname`) FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT CONCAT(users.`name`, ' ', users.`surname`) FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as household,\n (select `created_at` from `cases_activities` where `case_id` = `cases`.`id` order by `created_at` desc limit 1) as last_at,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`reporter`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`reporter`)) as reporterCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `cellphone` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as householdCell,\n IF(`cases`.`addressbook` = 1,(SELECT `cellphone` FROM `addressbook` WHERE `addressbook`.`id`= `cases`.`house_holder_id`), (SELECT `client_reference_number` FROM `users` WHERE `users`.`id`= `cases`.`house_holder_id`)) as reference_number\n \"\n ))->get();\n\n\n }\n\n\n }\n\n\n return $case;\n }", "title": "" }, { "docid": "aa0bcb3a8083efa98170436cd8fbe758", "score": "0.584207", "text": "function TestCase_update($case_id, $case_status_id, $category_id, $isautomated, $alias = NULL, $arguments = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"case_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.update', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "title": "" }, { "docid": "6ca17f56effb2beb259a0e7b50d5bc5d", "score": "0.5713151", "text": "public function setCase($case)\n {\n $this->case = $case;\n }", "title": "" }, { "docid": "344be644438dffddc0d072ea29ded7da", "score": "0.5679849", "text": "public function update(Request $request, $id)\n {\n /*$validator = Validator::make($request->all(), [\n 'class' => 'required',\n 'details' => 'required',\n\n ]);\n if ($validator->fails()) {\n return Redirect::route('routine_edit',$id)->withErrors($validator);\n }*/\n $routine=Routine::find($id);\n $routine->type=$request->type?$request->type:false;\n\n $routine->classes_id=$request->class;\n $routine->details=$request->details;\n $routine->updated_by=Sentinel::getUser()->id;\n $routine->update();\n if($routine){\n\n return Redirect::route('routine')->with('message','successfully updated');\n }else{\n\n return Redirect::back()->with('message','updated failed');\n }\n }", "title": "" }, { "docid": "e4418893eb3af8e38aa7cd67c55eb76e", "score": "0.5657795", "text": "public function updatecasedetail($status, $id)\n {\n $this->db->where('id', $id)->update(\"case_detail\", $status);\n }", "title": "" }, { "docid": "24de866ff95333aa4c60d87590ea6ef1", "score": "0.5580253", "text": "public function update(Request $request, $id)\n\t{\n\t\t// Updating Case Data --> by shrouk\n\n\t\t$person = Person::findOrFail($id);\n\t\t$person_info = PersonInfo::findOrFail($person->id);\n\n\t\t$person_info->name = $request->input(\"name\");\n $person_info->address = $request->input(\"address\");\n $person_info->birthDate = $request->input(\"birthdate\");\n $person_info->gender = $request->input(\"gender\");\n $person_info->maritalstatus = $request->input(\"maritalstatus\");\n $person_info->phone = $request->input(\"phone\");\n $person_info->city_id = 1;\n $person_info->governorate_id = 1;\n\t\t$person_info->save();\n\n\t\t//second stage:\n\t\t//setting PersonStatus Object ...\n\t\t$person->person_status_id = 1;\n\t\t$person->save();\n\t\treturn redirect()->route('people.index')->with('message', 'Item updated successfully.');\n\t}", "title": "" }, { "docid": "cae89e5974faa786ebf5f4f612c969e0", "score": "0.55705786", "text": "public function updateRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getEditRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// update\n\t\t\t\t$this->getHandler()->update($record);\n\n\n\t\t\t\t$msg = new Message('You have successful edit a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "title": "" }, { "docid": "b63ba8e53c96360188605b372615fcf9", "score": "0.556319", "text": "public function update(Request $request, Contest $contest)\n {\n //\n }", "title": "" }, { "docid": "8a4ca5aa342e69362000967a63bd8dbc", "score": "0.55448866", "text": "public function update($id)\n\t{\n\t\t$opdcasecategory = Opdcasecategory::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Opdcasecategory::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$opdcasecategory->update($data);\n\n\t\treturn Redirect::route('opdcasecategories.index');\n\t}", "title": "" }, { "docid": "1b2bbfb04199fd677299be07cd7328f7", "score": "0.5524576", "text": "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Comentario', ['id_receita' => 2]);\n $receita = Comentario::findOne($id);\n $receita->descricao = 'novo Comentario';\n $receita->update();\n $this->tester->seeRecord('common\\models\\Comentario', ['descricao' => 'novo Comentario']);\n }", "title": "" }, { "docid": "c28d0c592fc3decfcd2667411e7da42c", "score": "0.55101746", "text": "public function update(Request $request, Disease $disease)\r\r\n {\r\r\n //\r\r\n }", "title": "" }, { "docid": "17aed1f70aedb757e51fc1a48d395e06", "score": "0.55035585", "text": "public function update($record);", "title": "" }, { "docid": "4ab55cd8e0147cf98b39751dadb7e193", "score": "0.5484355", "text": "public function update(Request $request)\n {\n try{\n $isUpdate = City::where($request->only('id'))->update($request->only('name'));\n if($isUpdate === 1){\n return redirect()->route('add-city-page')->with('successUpdate','City Update Successfully..'); \n }else{\n return redirect()->route('add-city-page');\n }\n }catch(\\Exception $error){\n report($error);\n }\n }", "title": "" }, { "docid": "de4e1638057a194be83eb3e50ee01202", "score": "0.54593384", "text": "function TestCaseRun_update($run_id, $case_id, $build_id, $environment_id, $assignee = NULL, $case_run_status_id = NULL, $notes = NULL, $update_bugs = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"case_run_status_id\" => \"int\", \"notes\" => \"string\", \"update_bugs\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.update', array(new xmlrpcval($run_id, \"int\"),new xmlrpcval($case_id, \"int\"),new xmlrpcval($build_id, \"int\"),new xmlrpcval($environment_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "title": "" }, { "docid": "a3f96210f3a13720507582fc202d89ee", "score": "0.5455047", "text": "public function testUpdateChallengeActivity()\n {\n }", "title": "" }, { "docid": "4d006c52d782c79e3c1a5c36cf126c33", "score": "0.5452188", "text": "public function update(Request $request, $id)\n {\n //$this->validate(request(), [ ]);\n \n $task = Task::findOrFail($id);\n\n $task->name=request('name');\n $task->case_id=request('case_id');\n $task->user_id=request('user_id');\n $task->priority=request('priority');\n $task->stage_id=request('stage_id');\n $task->date=request('date');\n $task->description=request('description');\n\n $task->save();\n\n return redirect()\n ->route('task_edit', $task->id)\n ->with('success', __('global.edit_succees'));\n }", "title": "" }, { "docid": "7f4d5d022ab49d7b152ea8ad001bdeb3", "score": "0.5446971", "text": "public function testUpdateChallenge()\n {\n }", "title": "" }, { "docid": "f1f6f1c93d230872c97fb5c213aeea56", "score": "0.5444222", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n ]);\n\n $data = [\n 'name' => $request->name,\n 'pre_medicine_type_id' => $request->pre_medicine_type_id ,\n 'user_id' => Sentinel::getUser()->id,\n 'created_at' => now(),\n ];\n $routine = PreRoutine::findorfail($id) ;\n $routine->update($data);\n Session::flash('success', 'Routine Update Succeed!');\n Pharma::activities(\"Update\", \"Routine\", \"Updated Medicine\");\n return redirect('doctor/medicine/routine');\n\n }", "title": "" }, { "docid": "ecadc5cb476f50f3e8fea49f548256a0", "score": "0.5418433", "text": "public function update(Request $request, Case_hiring $case_hiring)\n {\n //\n $hiring=Case_hiring::find($request->id);\n $hiring->court_id=$request->court;\n $hiring->judge_id=$request->judge;\n $hiring->hiring_type=$request->hiring_type;\n $hiring->date=$request->date;\n $hiring->time=$request->time;\n $hiring->narration=$request->narration;\n $hiring->save();\n return redirect()->route('kase.show',['id',$request->case]);\n }", "title": "" }, { "docid": "96d03128fba27bc39ad130974e384c6e", "score": "0.5417943", "text": "private function update($cat){\r\n\t\tif(!$this->acceptUpdates) return;//do not allow health coach to change answers\r\n\t\tif(!isset($this->categories[$cat])) throw new Exception(\"Invalid category\");\r\n\r\n\t\t$sql=\"UPDATE `u_mod_ifocus` SET \";\r\n\t\t$comma=false;\r\n\t\tforeach($this->data[$cat] as $key=>$value){\r\n\t\t\tif($comma) $sql.=\" , \";\r\n\t\t\t$sql.=\"`\".$key.\"`='\".$this->dbOb->escape_string($value).\"'\";\r\n\t\t\t$comma=true;\r\n\t\t}\r\n\t\tif(!$comma) return; //cant update a section we have no data for\r\n\t\tif(!$this->id) return; //can't update a record we haven't loaded\r\n\r\n\t\t$sql .= \", last_completed = '\" . $cat . \"'\";\r\n\r\n\t\tif($cat==\"biometric_data\"){\r\n\t\t\tif(!$this->isCompleted()) $sql.=\", date_completed=NOW() \";\r\n\t\t\t//upon completion reward points for Health Assessment Questions\r\n\t\t\t$im=new IncentivePointsModel();\r\n\t\t\tif($this->data[\"preventative_health\"][\"q12\"]==1){\r\n\t\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"FluShot\");\r\n\t\t\t}\r\n\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"Complete\");\r\n\t\t}\r\n\r\n\t\t$sql .= \" ,date_updated=NOW() WHERE id = '\" . $this->data['id'] . \"'\";\r\n\t\t$this->dbOb->update($sql);\r\n\t}", "title": "" }, { "docid": "fe2d3fb3cb86b76db4c281df3bcecac7", "score": "0.5400456", "text": "public function update(Request $request, $id) {\n\t\tif (!$request->json()) {\n\t\t\tabort(404);\n\t\t}\n $validate_rules = [\n 'case_category_id' => 'required|integer',\n 'case_no' => 'sometimes|nullable|string',\n 'file_no' => 'sometimes|nullable|string|max:20',\n 'acts*' => 'required|integer',\n 'plaintiff' => 'required|integer',\n 'opposite' => 'required|integer',\n 'client_category_id' => 'required|integer',\n 'court_category_id' => 'required|integer',\n 'court_id' => 'required|integer',\n 'lawyer_id' => 'sometimes|nullable|integer',\n 'stage_id' => 'sometimes|nullable|integer',\n 'receiving_date' => 'sometimes|nullable|date',\n 'filling_date' => 'sometimes|nullable|date',\n 'hearing_date' => 'sometimes|nullable|date',\n 'judgement_date' => 'sometimes|nullable|date',\n 'description' => 'sometimes|nullable|string',\n 'file.*' => 'sometimes|nullable|mimes:jpg,bmp,png,doc,docx,pdf,jpeg,txt',\n ];\n $request->validate($validate_rules, validationMessage($validate_rules));\n\n\t\t$filling_date = Null;\n\t\t$receiving_date = Null;\n\n\n\t\tif ($request->filling_date_yes) {\n\t\t\t$filling_date = date_format(date_create($request->filling_date), 'Y-m-d H:i:s');\n\t\t}\n\n\t\tif ($request->plaintiff == $request->opposite) {\n\t\t\tToastr::error(__('case.Plaintiff can not be opposite'));\n\t\t\tthrow ValidationException::withMessages(['plaintiff' => __('case.Plaintiff can not be opposite')]);\n\t\t}\n\t\tif ($request->receiving_date_yes) {\n\t\t\t$receiving_date = date_format(date_create($request->receiving_date), 'Y-m-d H:i:s');\n\t\t}\n\n\n\t\t$model = Cases::findOrFail($id);\n\t\t$plaintiff = Client::find($request->plaintiff);\n\t\t$opposite = Client::find($request->opposite);\n\t\t$title = $plaintiff->name . ' v/s ' . $opposite->name;\n\t\t$client_category = ClientCategory::find($request->client_category_id);\n\t\t$client = $client_category->plaintiff ? 'Plaintiff' : 'Opposite';\n\n\t\t$model->title = $title;\n\t\t$model->client = $client;\n\t\t$model->case_category_id = $request->case_category_id;\n\t\t$model->case_no = $request->case_no;\n\t\t$model->file_no = $request->file_no;\n\t\t$model->plaintiff = $request->plaintiff;\n\t\t$model->opposite = $request->opposite;\n\t\t$model->client_category_id = $request->client_category_id;\n\t\t$model->court_category_id = $request->court_category_id;\n\t\t$model->court_id = $request->court_id;\n\t\t$model->lawyer_id = $request->lawyer_id;\n\t\t$model->ref_name = $request->ref_name;\n\t\t$model->ref_mobile = $request->ref_mobile;\n\t\t$model->stage_id = $request->stage_id;\n\t\t$model->receiving_date = $receiving_date;\n\t\t$model->filling_date = $filling_date;\n\t\t$model->description = $request->description;\n\t\t$model->save();\n\n\t\tif ($request->acts AND count($request->acts) > 0) {\n\t\t\tCaseAct::where('cases_id', $model->id)->delete();\n\t\t\tforeach ($request->acts as $value) {\n\t\t\t\t$act = new CaseAct();\n\t\t\t\t$act->acts_id = $value;\n\t\t\t\t$act->cases_id = $model->id;\n\t\t\t\t$act->save();\n\t\t\t}\n\t\t}\n\n\t\t$response = [\n\t\t\t'message' => __('case.Case Updated Successfully'),\n\t\t\t'goto' => route('case.show', $model->id),\n\t\t];\n\n\t\treturn response()->json($response);\n\t}", "title": "" }, { "docid": "9f9e37739ac6599f13678d307bdd2a5c", "score": "0.5390761", "text": "protected function update() {}", "title": "" }, { "docid": "cbd71068ea2d5458e6d01597c3b77b95", "score": "0.5382692", "text": "public function updateTicketById() {\n if (func_num_args() > 0):\n $ticketId = func_get_arg(0);\n $edit = func_get_arg(1);\n $where = \"ticket_id = \" . $ticketId;\n $check = $this->update($edit, $where);\n\n if ($check):\n return 1;\n endif;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }", "title": "" }, { "docid": "5b5b196d9dfbd1f74c7b754dc1c93554", "score": "0.53818405", "text": "public function update() {\n\n //GETS TASK, DEPENDING ON TASK ID (ID)\n $data=Tasks::find(request('task_id'));\n\n //GETS REQUEST AND REPLACES TASK TITLE & DESCRIPTION\n $data->task=request('task');\n $data->description=request('description');\n\n //SAVES DB\n $data->save();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$data->NotepadID\");\n }", "title": "" }, { "docid": "7cbc25f5f56a071a755c081c7024c226", "score": "0.53778154", "text": "public function update($id )\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\tDB::table($input)->update();\n\t\t//$tasksCatagory->update($input);\n\n\t\treturn Redirect::route('tasksCatagories.show', $tasksCatagory->id)->with('message', 'catagory updated.');\n\n\t}", "title": "" }, { "docid": "13d4d3733bdf09dc95d2b2d67584f3df", "score": "0.53746414", "text": "public function update(Request $request, $id)\n {\n $this->sensitive = $this->sensitive->find($id);\n if(!$this->sensitive) {\n request()->session()->flash('error','Data not found');\n return redirect()->back();\n }\n $rules = $this->sensitive->getRules('update');\n $request->validate($rules);\n $data = $request->all();\n $this->sensitive->fill($data);\n $success = $this->sensitive->save();\n if($success){\n $request->session()->flash('success','Data updated successfully.');\n } else {\n $request->session()->flash('error','Problem while updating data.');\n }\n return redirect()->route('settings.index');\n }", "title": "" }, { "docid": "42eb9b0a01edf48e1286b1d9d6fe1f49", "score": "0.53719944", "text": "public function update()\n\t{\n\t\t$rules=[\n\t\t\t'name' => 'required',\n\t\t\t'description' => 'required'\n\t\t];\n\t\t$validator = \\Validator::make(Input::all(), $rules);\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::to('/level/edit/'.Input::get('id'))->withErrors($validator);\n\t\t}\n\t\telse {\n\t\t\t$section = Level::find(Input::get('id'));\n\t\t\t$section->name= Input::get('name');\n\n\t\t\t$section->description=Input::get('description');\n\t\t\t$section->save();\n\t\t\treturn Redirect::to('/level/list')->with(\"success\",\"Level Updated Succesfully.\");\n\n\t\t}\n\t}", "title": "" }, { "docid": "13f3ee3e07b7ec3a58232ec61b3572c5", "score": "0.5367859", "text": "public function updateCaseStatus($id,$CaseStatus)\n {\n $this->db->where_in('order_id',$id);\n $this->db->update('case_detail',$CaseStatus);\n return $this->db->affected_rows();\n }", "title": "" }, { "docid": "3b5c8eed31c3ed91c5dfd4e3f9c48823", "score": "0.53635424", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n\n $contest = Contest::find($id);\n $contest->name = $request->input('name');\n $contest->description = $request->input('description');\n $contest->save();\n\n return back();\n }", "title": "" }, { "docid": "2ad2b49456f5855392fd04644b7fb760", "score": "0.5363236", "text": "abstract protected function updateModel();", "title": "" }, { "docid": "6d7e615516a3e97ad08abc6611473510", "score": "0.5360627", "text": "public function update()\n\t{\n\t\t$input = \\Input::all();\n\n\t\t$category = Category::findOrFail($input.id);\n\n\t\tif($category){\n\t\t\t$category->name = $input.name;\n\t\t\t$result = $category->save();\n\t\t}\n\n\t\tif($result){\n\t\t\treturn \"true\";\n\t\t}\n\t\treturn \"false\";\n\t}", "title": "" }, { "docid": "a1d88ecc9ebbabfd02aeea2275013257", "score": "0.5360427", "text": "public function update(EntryModeRequest $request, EntryMode $entryMode)\n {\n\t $entryMode->update($request->all());\n return redirect('/entry_mode');\n }", "title": "" }, { "docid": "db6c24fea35d6f4e3c09e20c61429d99", "score": "0.53510976", "text": "public function update(Request $request, $slug)\n {\n\n $result = (object)\\App\\Challenge::updateRecord($request, $slug);\n \\Session::flash('type', $result->type);\n \\Session::flash('message', $result->message);\n return redirect('admin/challenges');\n }", "title": "" }, { "docid": "d39b6b3c67eb11a4fbbb12a4f4d0c946", "score": "0.5350963", "text": "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "title": "" }, { "docid": "e940d88911cbea6a274c1ec4de54f629", "score": "0.5342213", "text": "public function update(Request $request, Contest $contest)\n {\n $this->getUser()->hasPermission(['update'], 'contests');\n\n $contest->setConnection($this->getUser()->getRole->name);\n\n $contest->fill($request->all());\n\n if ($contest->save()) {\n return redirect()->route('contests.show', ['idContest' => $contest->id])->with('success', 'Contest successfully updated');\n } else {\n return back()->withErrors('An error occurred while saving the contest. Please try again later.');\n }\n }", "title": "" }, { "docid": "4f6c3d1c28ade90730ade9c409334425", "score": "0.5337221", "text": "private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\n\t}", "title": "" }, { "docid": "22175f06ee0898262e000e7d7ff93ecd", "score": "0.53278583", "text": "public function update(Request $request, $id)\n {\n $habitacion = Habitacion::find($id);\n if($habitacion != NULL){\n $habitacion->fill($request->all());\n $habitacion->save();\n return $habitacion;\n }\n else{\n return \"No puede modificar una habitacion no existente.\";\n }\n }", "title": "" }, { "docid": "eaafb7e005b4fc38ded662a8225f7e96", "score": "0.5318986", "text": "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "title": "" }, { "docid": "072d8ab5aa06be3c1b72d74c66c457a9", "score": "0.5310624", "text": "public function update(UpdateRequest $request, UpdateUseCase $useCase)\n {\n $quiz = $request->updateQuiz();\n $updated = $useCase->invoke($quiz);\n return new QuestionResource($updated['question']);\n }", "title": "" }, { "docid": "4aaff1e3ffbbb33d3f5dd29011e1814d", "score": "0.53083146", "text": "protected function _update()\n\t{\n\t}", "title": "" }, { "docid": "9a7270149c8a2ef48724b2469cf92425", "score": "0.53039116", "text": "public function addCase(DocCase $case)\n {\n try {\n\n $sql = \"INSERT INTO cases(title, created_by, description, category_id, variant) \n VALUES (:title, :created_by, :description, :category_id, :variant);\";\n\n //get values\n $title = $case->getTitle();\n $description = $case->getDescription();\n $category_id = $case->getCategory();\n $variant = $case->getVariant();\n\n //prepare query\n $prepared_query = $this->conn->prepare($sql);\n\n //bind params first statement\n $prepared_query->bindParam(':title', $title, PDO::PARAM_STR);\n $prepared_query->bindParam(':created_by', $_SESSION['id'], PDO::PARAM_INT);\n $prepared_query->bindParam(':description', $description, PDO::PARAM_STR);\n $prepared_query->bindParam(':category_id', $category_id, PDO::PARAM_INT);\n $prepared_query->bindParam(':variant', $variant, PDO::PARAM_INT);\n\n $prepared_query->execute();\n\n //if the variant is not null, insert row in representation table\n if ($variant != null) {\n $sql = \"INSERT INTO representation (id_case, id_variant) VALUES (:id_case, :variant);\";\n\n //prepare query\n $prepared_query = $this->conn->prepare($sql);\n\n $last_inserted_id = $this->conn->lastInsertId();\n $prepared_query->bindParam(':variant', $variant, PDO::PARAM_INT);\n $prepared_query->bindParam(':id_case', $last_inserted_id, PDO::PARAM_INT);\n\n $prepared_query->execute();\n }\n\n return true;\n } catch (PDOException $ex) {\n echo $ex;\n return false;\n }\n }", "title": "" }, { "docid": "12e3440e8f9f97949b4811ad15af13db", "score": "0.5298563", "text": "public function setDeletedCase($id)\n {\n try {\n\n //get cases that have the variant id of the deleted case\n $variant_query = $this->conn->prepare(\"SELECT * FROM CASES WHERE variant = :id\");\n $variant_query->bindParam(':id', $id, PDO::PARAM_INT);\n $variant_query->execute();\n\n $results = $variant_query->fetchAll(PDO::FETCH_ASSOC);\n\n //set null variant field\n foreach ($results as $result) {\n $prepared_query = $this->conn->prepare(\"UPDATE CASES set variant = null where id = :id\");\n $prepared_query->bindParam(':id', $result['id'], PDO::PARAM_INT);\n $prepared_query->execute();\n }\n\n //prepare query\n $prepared_query = $this->conn->prepare(\"UPDATE CASES SET deleted = 1 WHERE ID = :id\");\n $prepared_query->bindParam(':id', $id, PDO::PARAM_INT);\n $prepared_query->execute();\n\n return true;\n\n } catch (PDOException $ex) {\n return false;\n }\n }", "title": "" }, { "docid": "201175cb086233f773248c218bd789ab", "score": "0.5280668", "text": "public function update(Request $request, $id)\r\n {\r\n $this->validate($request, [\r\n 'apt_floornumber' => 'required|integer',\r\n 'apt_number' => 'required|integer',\r\n ]);\r\n //dd($request);\r\n // $CreateAptUpdate = $request;\r\n $CreateApt = Apartment::find($id);\r\n $CreateApt->apt_floornumber = $request->apt_floornumber;\r\n $CreateApt->apt_number = $request->apt_number;\r\n $CreateApt->apt_comments = $request->apt_comments;\r\n $CreateApt->cntr_id = $request->cntr_id; #commented to avoid FK from Center table\r\n $CreateApt->save();\r\n return redirect('apartment');\r\n }", "title": "" }, { "docid": "95b1376e39ee89553aea95ab91a8806f", "score": "0.52724016", "text": "public function update(Request $request, $id)\n {\n \n \n $facility = facility::find($id);\n $facility -> booking_type = $request -> booking_type;\n $facility -> facility_name = $request -> facility_name;\n $facility -> amount = $request -> amount;\n $facility -> description = 'none';\n $facility -> capacity = '0';\n $facility -> save();\n return redirect('/facility_list')->withStatus(__('Facility successfully updated.'));\n }", "title": "" }, { "docid": "72f2403b4bc15c770a3c862c1f1c52ba", "score": "0.5269225", "text": "public function update()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_POST['id']);\n $tacgia->anh = $_POST['anh'];\n $tacgia->ten = $_POST['ten'];\n $tacgia->thongtin = $_POST['thongtin'];\n $tacgia->update();\n\n go_back();\n }", "title": "" }, { "docid": "43fcbdb93d2e973661123a6e0e2027e6", "score": "0.5263667", "text": "protected function _update()\n {\n \n }", "title": "" }, { "docid": "43fcbdb93d2e973661123a6e0e2027e6", "score": "0.5263667", "text": "protected function _update()\n {\n \n }", "title": "" }, { "docid": "a444bd06043527ebb066aa0aee5e7b1d", "score": "0.5263127", "text": "public function update(Request $request, $id)\n {\n $contest = Contest::findOrFail($id);\n\n $rules = $this->contestRules();\n $rules['name'] = 'required';\n// $rules['shows'] = 'min:3';\n $this->customValidate($request, $rules);\n\n $input = $request->all();\n\n $contest->update($input);\n\n $shows = $request->input('shows');\n\n foreach ($shows as $show) {\n// $showContest=ShowContest::findOrNew(array('show_id'=>$show['show_id'],'contest_id'=> $contest->id));\n// $showContest=ShowContest::where('show_id', $show['show_id'])->where('contest_id', $contest->id);\n $showContest = ShowContest::firstOrNew(['show_id' => $show['show_id'],'contest_id'=>$contest->id]);\n $showContest->winner_count=$show['winner_count'];\n $showContest->save();\n\n\n }\n return redirect('contests');\n }", "title": "" }, { "docid": "32485581f4b2ea3471882a0319bc600a", "score": "0.5260678", "text": "public function update(Request $request, $id)\n {\n $testimonial=Testimonial::findOrFail($id);\n $this->validate($request,[\n 'title'=>'string|required|max:50',\n 'description'=>'string|nullable',\n 'photo'=>'string|required',\n 'status'=>'required|in:active,inactive',\n ]);\n $data=$request->all();\n $status=$testimonial->fill($data)->save();\n if($status){\n request()->session()->flash('success','testimonial successfully updated');\n }\n else{\n request()->session()->flash('error','Error occurred while updating testimonial');\n }\n return redirect()->route('testimonial.index');\n }", "title": "" }, { "docid": "54ba7d6e11afd72e5efe80515c380bca", "score": "0.52492017", "text": "public function testEdit()\n {\n $city = \\App\\City::first();\n\n $this->actingAs( \\App\\User::first() )\n ->visit('/city/'.$city->id.'/edit')\n ->see('Update City / District Information')\n ->type('Chittagong', 'name')\n ->select(2, 'state_id')\n ->select(true, 'status')\n ->press('Update Now')\n ->seePageIs('/city/'.$city->id.'/edit')\n ->see('Updated!');\n }", "title": "" }, { "docid": "a1dfcedca6a8f3302d0dcb13274b2543", "score": "0.52457976", "text": "public function update(Request $request, $id)\n {\n $data=request()->validate([\n 'capacidad'=>'required|max:50',\n \n ],\n [\n 'capacidad.required'=>'Ingrese capacidad ',\n 'capacidad.max'=>'Máximo 50 caracteres para la capacidad',\n \n ]);\n \n $capacidad=Capacidad::findOrfail($id); //instanciamos nuestro modelo categoria\n $capacidad->capacidad=$request->capacidad; //designamos el valor de descripcion\n $capacidad->idcurso=$request->idcurso; //designamos el valor de descripcion\n $capacidad->estado='1'; //campo de descripcion\n $capacidad->save(); \n return redirect()->route('capacidad.index')->with('datos','Registro Actualizado...!'); \n \n \n }", "title": "" }, { "docid": "bebbfe641bf86d85bd5999e5b6d49027", "score": "0.5241287", "text": "public function update(Request $request, $id)\n {\n try {\n $data = [\n \"code_area\" => $request->code_area,\n \"name\" => $request->name,\n \"capacity\" => $request->capacity\n ];\n $this->repository->updateData($data, $id);\n return redirect()->back()->with('success', \"Record successfully updated\");\n } catch (Exception $e) {\n return redirect()->back()->with('error', $e->getMessage());\n } \n }", "title": "" }, { "docid": "3782c63d97522d6a1030a7c0bec3471e", "score": "0.5234963", "text": "public function postEdit($id)\n\t{\n\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, Idea_capitalization::$rules);\n\n // If validation fails, we'll exit the operation now.\n if ($validation->fails()) {\n // Ooops.. something went wrong\n return Redirect::back()->withInput()->withErrors($validation);\n }\n \t$idea_capitalization = $this->idea_capitalization->find($id);\n\n if ($idea_capitalization->update($input)) {\n // Redirect to the idea_capitalizations page\n return Redirect::to(\"idea_capitalizations/$id/edit\")->with('success', Lang::get('idea_capitalizations/message.update.success'));\n }\n\n // Redirect to the idea_capitalizations management page\n return Redirect::to(\"idea_capitalizations/$id/edit\")->with('error', Lang::get('tweets/message.update.error'));\n\t}", "title": "" }, { "docid": "b50140c6844b7c8172f2190b8f351a1a", "score": "0.5234425", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'name' => 'required'\n ]);\n $disease = Disease::where('id',$id)->firstOrfail();\n $disease->name = $request->name;\n $disease->save();\n return redirect(route('admin.disease.index'))->with('success','Disease Updated Successfully.');\n }", "title": "" }, { "docid": "0ac75be346ee2051184ca4ba106e73de", "score": "0.52325237", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, array(\n 'city_name' => 'required',\n 'city_short_name' => 'required|max:3'\n )); \n \n $city = City::find($id);\n $city->city_name = $request->city_name;\n $city->city_short_name = $request->city_short_name;\n $city->save();\n Session::flash('success', 'City has been updated successfully.');\n return redirect()->route('cities');\n }", "title": "" }, { "docid": "b794784d7c255185035f63efb494c067", "score": "0.52045", "text": "public function update(DataRequest $request, $id)\n {\n $entry = Nutrition::find($id);\n $entry->school_name = $request->input('school_name');\n $entry->address = $request->input('address');\n $entry->city = $request->input('city');\n $entry->postal_code = $request->input('postal_code');\n $entry->school_board = $request->input('school_board');\n $entry->school_id = $request->input('school_id');\n $entry->breakfast = $request->input('breakfast');\n $entry->lunch = $request->input('lunch');\n $entry->snack = $request->input('snack');\n $entry->hidden = $request->input('hidden');\n $entry->save();\n session()->flash('message', \"Entry #$id has been successfully modified\");\n return redirect(url(''));\n }", "title": "" }, { "docid": "e7786714b24d9d4fae07241ace2406b4", "score": "0.52025974", "text": "public function update(Request $request, $id)\n {\n //dd('update');\n $ended=date(\"Y-m-d \");\n $status=\"TERMINE\";\n $campagnes=Campagne::findOrFail($id);\n //dd($request);\n\n $rules=[\n 'title'=>'required|min:9',\n 'budget'=>'bail|required',\n 'status'=>'required|min:7'];\n $this->validate($request,$rules);\n // dd('store');\n try {\n $campagnes->update([\n 'title'=>Str::lower($request->intitule),\n 'budget'=>$request->budget,\n 'status'=>$request->status,\n 'obs'=>$request->obs\n ]);\n return redirect()->route('campagnes.show',$id);\n\n } catch (\\Throwable $th) {\n return redirect()->route('errors.bdInsert')->with('success',$th->getMessage());\n }\n \n }", "title": "" }, { "docid": "542b942b9664999e5bd1db6c0590b145", "score": "0.5198801", "text": "public function updateinventorycasedetail($status, $id)\n {\n $this->db->where('id', $id)->update(\"case_details_inventory\", $status);\n }", "title": "" }, { "docid": "9f4d556625c5f3d62a0b12efe8e7ab31", "score": "0.51898044", "text": "public function update(Request $request, $id)\n {\n $city = City::find($id);\n $city->update($request->city);\n \n if($city->save()){\n return redirect('cidades')->with('success', 'Cidade atualizada com sucesso!');\n }else{\n return back()->with('error','Erro de atualização');\n }\n }", "title": "" }, { "docid": "3e5ffc0f20e1e6a615ed91c222f50b1d", "score": "0.5185985", "text": "public function update(Request $request, Routine $routine)\n {\n //\n }", "title": "" }, { "docid": "b891c6008ba33eac41f8a93a250fdb96", "score": "0.5183741", "text": "public function update()\n {\n if (Entry::canCreateOrEdit() === false) {\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the competition has now started and entries cannot be changed.\");\n }\n\n $input = Input::all();\n\n $validator = Validator::make($input, Entry::$prediction_rules, Entry::$prediction_rules_messages);\n\n if ($validator->fails()) {\n return Redirect::route('entry.edit')\n ->withInput()\n ->withErrors($validator);\n }\n \n $entry = $this->getEntry();\n\n if ($entry) {\n\n $entry->update($input);\n $entry->save();\n\n foreach($entry->matchPredictions as $match_prediction) {\n $field = \"match_prediction_$match_prediction->id\";\n if (Input::has($field)) {\n $match_prediction->result = Input::get($field);\n $match_prediction->save();\n }\n }\n }\n\n return Redirect::route('entry.index');\n }", "title": "" }, { "docid": "d7fa622b7dc6174c3e591b76486593ca", "score": "0.5181399", "text": "public function update($id)\n\t{\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'house_id' => 'required|integer|min:1'\n\t\t);\n\t\t$messages = array(\n\t\t\t'min' => 'Please, select a House'\n\t\t);\n\t\t$input = Input::all();\n\t\t$v = Validator::make($input, $rules, $messages);\n\n\t\tif($v->fails()) {\n\t\t\treturn Redirect::to('characters/' . $id . '/edit')->withErrors($v);\n\t\t} else {\n\n\t\t\t$data = Character::find($id);\n\t\t\t$data->name = Input::get('name');\n\t\t\t$data->house_id = Input::get('house_id');\n\t\t\t$data->save();\n\n\t\t\tSession::flash('message', 'Successfully updated!');\n\t\t\treturn Redirect::to('characters');\n\t\t}\n\t}", "title": "" }, { "docid": "bab0c48eed11c73f1d66846ef2bcba18", "score": "0.5180716", "text": "public function update(EditFacilityPlanRequest $request, $id)\n {\n \t$facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n \t\n \t/*foreach($request->all() as $key => $val){\n \t\tif($key !== \"_token\" && $key !==\"name\")\n \t\t\t$facilityKeys[]= $val;\n \t}*/\n \t\n \t\n \t$facility_plan= FacilityPlan::find($id);\n \t$facility_plan->fill($request->all());\n \t$facility_plan->save();\n \t \n \t$facility_plan->facilities()->sync($facilityKeys);\n \n $message= $facility_plan->name . ' updated succesfully';\n if($request->ajax()){\n \treturn $message;\n }\n Session::flash('message',$message);\n return redirect()->route('admin.facility_plans.index');\n }", "title": "" }, { "docid": "348f4ddf5abbd586ad0fb2104ec2166e", "score": "0.5178291", "text": "public function update(Request $request, $slug)\n {\n if (!checkRole(getUserGrade(1)))\n {\n prepareBlockUserMessage();\n return back();\n }\n\n\n $record = FaqCategory::getRecordWithSlug($slug);\n\n if ($isValid = $this->isValidRecord($record))\n return redirect($isValid);\n\n $this->validate($request, [\n 'title' => 'bail|required|max:100',\n ]);\n\n\n\n if ($redirect = $this->check_isdemo()) {\n flash('info','crud_operations_disabled_in_demo', 'info');\n return redirect($redirect);\n }\n\n $title = $request->title;\n\n /**\n * Check if the title of the record is changed, \n * if changed update the slug value based on the new title\n */\n if($title != $record->title)\n $record->slug = $record->makeSlug($title, TRUE);\n\n\n $record->title = $title;\n $record->status = $request->status;\n \n $record->save();\n\n flash('success','record_updated_successfully', 'success');\n return redirect(URL_FAQ_CATEGORIES);\n }", "title": "" }, { "docid": "0e569e08e365eeb483a9ac20db3b9ef4", "score": "0.517784", "text": "public function update(Request $request, $id)\n {\n\n $prc_update = \\DB::table(\"objective\")\n ->where('id', $id)\n ->update([\n 'name' => $request->StrategyName,\n 'objective_type' => $request->Category,\n\n \n ]);\n\n \n if($prc_update) {\n // $prc_update->save();\n\n return response()->json([\n \"code\" => 200,\n // \"msg\" =>'updated'// 'تم تعديل طلب الإجازة'\n ]);\n\n }\n else{\n return response()->json([\n \"code\" => 201,\n // \"msg\" => 'not updated'//'لا يمكن الحفظ لأن البيانات تم تعديلها من قبل مستخدم آخر, رجاء إعادة فتح الصفحة'\n ]);\n\n }\n }", "title": "" }, { "docid": "7ac89422cdba09bb1d3989f61b68283a", "score": "0.5177289", "text": "public function update(Request $request, cardface_classofcreature_atag $cardface_classofcreature_atag){\n // enter your stuff here if you want...\n\treturn(parent::update($request,$cardface_classofcreature_atag));\n }", "title": "" }, { "docid": "a5e0401c474dfb77d8bf8b82e011fcee", "score": "0.51759076", "text": "public function update(Request $request, $id)\n {\t\n $this->validate($request, [\n 'test_name' => 'required',\n \n ]);\n \n $input = $request->only(['test_name','test_under','test_unit','test_description','test_charge','test_status']);\n \n \t$category = Test::where('test_aid', $id)\n ->update($input);\n\n return redirect()->route('test.index')\n ->with('success','Test Update successfully.');\n }", "title": "" }, { "docid": "db05bc7d7f4a15e924f97a3b822a5c3c", "score": "0.51745677", "text": "public function update(Request $request, $id)\n {\n if ($redirect = $this->check_isdemo()) {\n flash('info','crud_operations_disabled_in_demo', 'info');\n return redirect($redirect);\n }\n\n $create_letter = IndustryType::findOrFail($id);\n $create_letter->update($request->all());\n\n return redirect()->route('admin.industry_type.index');\n }", "title": "" }, { "docid": "0dc2c794134078abc75f57d0496a864a", "score": "0.51741874", "text": "function update(EducationModel $edu) { \n try { \n Log::info(\"Entering EducationDataService.update()\");\n \n //use the connection to create a prepared statement\n $stmt = $this->conn->prepare(\"UPDATE `EDUCATION` SET `SCHOOL`= :school,`DEGREE`= :degree,`START_YEAR`= :start,`END_YEAR`= :end,`ADDITIONAL_INFORMATION`= :info WHERE `ID` = :id\");\n \n //Store the information from the education object into variables\n $school = $edu->getSchool();\n $degree = $edu->getDegree();\n $start = $edu->getStart_year();\n $end = $edu->getEnd_year();\n $info = $edu->getAdditional_info();\n $id = $edu->getId();\n \n //Bind the variables from the education object to the SQL statement\n $stmt->bindParam(':school', $school);\n $stmt->bindParam(':degree', $degree);\n $stmt->bindParam(':start', $start);\n $stmt->bindParam(':end', $end);\n $stmt->bindParam(':info', $info);\n $stmt->bindParam(':id', $id);\n \n //Excecute the SQL statement\n $stmt->execute(); \n \n //If a row was updated the method will return true.\n //If not it will return false\n if ($stmt->rowCount() == 1) {\n Log::info(\"Exiting EducationDataService.update() with true\"); \n return true;\n }\n else {\n Log::info(\"Exiting EducationDataService.update()with false\");\n return false;\n }\n }\n catch (PDOException $e){\n Log::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }", "title": "" }, { "docid": "9f4fe261ae430d5f0bbfe658b9771856", "score": "0.51734644", "text": "public function update($entity){ \n //TODO: Implement update record.\n }", "title": "" }, { "docid": "959acee7bcd26439dd830f0062dd87ec", "score": "0.51703304", "text": "public function testUpdateAirport()\n {\n $db=new Db();\n $this->airport->setAirportFromDB($db, 8);\n $actual=$this->airport->updateAirport($db);\n $this->assertEquals(true,$actual);\n }", "title": "" }, { "docid": "a5eb99397bad4d0eb936db24bc008456", "score": "0.5168689", "text": "protected function _saveSolutionCase($solution, $case = array()) {\n\n $id = $message = '';\n\n if ($case['id']) {\n $exists_case = Pi::Model(SOLUTION_CASE, $this->getModule())->find($case['solution_case_id']);\n $row = array(\n 'id' => $case['solution_case_id'],\n 'solution' => $solution,\n 'case' => $case['case'],\n 'title' => $case['title'],\n 'icon' => $case['icon_url'],\n 'time_created' => time(),\n );\n\n if ($exists_case['id']) {\n $row['time_updated'] = time();\n $exists_case->assign($row);\n $exists_case->save();\n $id = (int) $exists_case->id;\n }\n else {\n // Save\n try {\n $new_case = Pi::model(SOLUTION_CASE, $this->getModule())->createRow($row);\n $new_case->save();\n } catch (\\Exception $exception) {\n $message .= '<li>1070' . $row['title'] . _a(' can\\'t save:') . '</li>';\n $message .= $exception->getMessage();\n }\n $id = (int) $new_case->id;\n }\n\n }\n else {\n // Remove if uncheck.\n $remove_id = $id = (int) $case['solution_case_id'];\n $model = Pi::Model(SOLUTION_CASE, $this->getModule());\n if ($remove_id) {\n $row[$remove_id] = $model->find($remove_id);\n if ($row[$remove_id]) {\n try {\n $row[$remove_id]->delete();\n } catch (\\Exception $exception) {\n $message .= '<li>' . $case['title'] . _a(' can\\'t remove.') . '</li>';\n $message .= $exception->getMessage();\n }\n\n }\n }\n\n }\n\n return array(\n 'id' => $id,\n 'message' => $message,\n );\n }", "title": "" }, { "docid": "0ec8825af43ac63ec88accdb39a2d7c5", "score": "0.5160994", "text": "public function testSaveUpdate()\n {\n $city = $this->existing_city;\n\n // set string properties to \"updated <property_name>\"\n // set numeric properties to strlen(<property_name>)\n foreach (get_object_vars($city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($value)) {\n $city->$key = \"updated \".$key;\n } elseif (is_numeric($value)) {\n $city->$key = strlen($key);\n }\n }\n }\n\n // update the city\n $city->save();\n\n // go get the updated record\n $updated_city = new City($city->id);\n // check the properties of the updatedCity\n foreach (get_object_vars($updated_city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($city->$key)) {\n $this->assertEquals(\"updated \".$key, $value);\n } elseif (is_numeric($city->$key)) {\n $this->assertEquals(strlen($key), $value);\n }\n }\n }\n }", "title": "" }, { "docid": "ef10e410a30c1dc071aa50d822bc754e", "score": "0.51527745", "text": "public function update(Request $request, $id)\n {\n $jipphy02tt01 = jipphy02tt01::find($id);\n\n\n\n // Save the data to the database\n\n\n $jipphy02tt01->solution = $request->input('solution');\n\n $jipphy02tt01->question_data = $request->input('question_data');\n $jipphy02tt01->option1 = $request->input('option1');\n $jipphy02tt01->option2 = $request->input('option2');\n $jipphy02tt01->option3 = $request->input('option3');\n $jipphy02tt01->option4 = $request->input('option4');\n $jipphy02tt01->correct_ans = $request->input('correct_ans');\n $jipphy02tt01->difficulty = $request->input('difficulty');\n $jipphy02tt01->ideal_time = $request->input('ideal_time');\n $jipphy02tt01->question_type = $request->input('question_type');\n\n\n\n\n\n $jipphy02tt01->save();\n\n\n\n\n // set flash data with success message\n Session::flash('success', 'This question was successfully updated.');\n\n // redirect with flash data to posts.show\n return redirect()->route('jipphy02tt01.show', $jipphy02tt01->id);\n }", "title": "" }, { "docid": "e6b8b064e7cb30643ed0a74698f4ec90", "score": "0.5149636", "text": "public function update(Request $request, $id)\n {\n //\n $county = County::findOrFail($id);\n $input = $request->all();\n $county->fill($input)->save();\n Session::flash('message', 'County successfully updated!');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "83d1301ce44909e057a16197d41184fb", "score": "0.51485443", "text": "public function update(CARequest $request, $id)\n {\n //\n }", "title": "" }, { "docid": "640472bb48d36de970e60ad1e20a2fcb", "score": "0.51468956", "text": "public function update(Request $request, $id)\n {\n //\n $experiment = \\App\\Experiment::find($id);\n $experiment->name = $request->name;\n $experiment->task_id = $request->task_id;\n $experiment->comment = $request->comment;\n $experiment->save();\n \n return redirect()->route('experiment.index');\n }", "title": "" }, { "docid": "f8e83be7fc0c8ccddb9b259d8d3433bf", "score": "0.5146035", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required'\n ]);\n\n $desease = Desease::findOrFail($id);\n $desease->name = $request->input('name');\n $desease->description = $request->input('description');\n $desease->save();\n\n return redirect()->route('deseases.index')->with('success','Desease updated');\n }", "title": "" }, { "docid": "2def7181db57bf5791d716c52423a753", "score": "0.5143411", "text": "function setCaseEmpresa($caseid){\n\n $empr_id = empresa();\n\n\t\t\tlog_message('DEBUG','#TRAZA|BPM|setCaseEmpresa($caseid) >> '.json_encode($caseid));\n\t\t\tlog_message('DEBUG','#TRAZA|BPM|setCaseEmpresa($caseid) $empr_id>> '.json_encode($empr_id));\n\n $string_case_id = (string)$caseid;\n\n\t\t\t$data = array(\"case_id\"=>$string_case_id,\"empr_id\"=>$empr_id);\n\n\t\t\t$CI = &get_instance();\n\t\t\t$CI->load->database();\n\t\t\t$resp = $CI->db->insert('case_empresa', $data);\n\n\t\t\tif ($resp === FALSE) {\n\n\t\t\t\tlog_message('ERROR','#TRAZA|BPM|setCaseEmpresa($caseid) >> ERROR No se actualizó la tabla case_empresa con el case_id');\n\t\t\t\treturn $this->msj(false, 'No se guardo el case_id');\n\t\t\t} else {\n\n\t\t\t\tlog_message('INFO','#TRAZA|BPM|setCaseEmpresa($caseid) >> Guardado Exitoso');\n\t\t\t\treturn $this->msj(true, 'Guardado exitosamente');\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0f2087ce360f7422f102445d235b926c", "score": "0.51400965", "text": "public function update(Request $request, post $post)\n {\n $request->validate([\n 'town' => 'required|regex:/^([a-zA-Z]+)(\\s[a-zA-Z]+)*$/|max:100',\n 'capacity' => 'required',\n 'code' => 'required|max:20'\n ]);\n\n $post->fill($request->all());\n $post->save();\n return redirect()->route('posts.index')->with('message', 'Changed successful!'); \n }", "title": "" }, { "docid": "5e7a11db3cdb49c90401aa809cb25bfb", "score": "0.5138761", "text": "public function update(Request $request, $id)\n {\n $habit = Habit::find($id);\n $habit->habits_name=$request->input('habits_name');\n $habit->description=$request->input('description');\n $habit->save();\n return redirect('myapp/habits/index');\n }", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.513495", "text": "public function update($data) {}", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.513495", "text": "public function update($data) {}", "title": "" }, { "docid": "65f3b1f9bb24950a4fa3dc4a65fc1509", "score": "0.513403", "text": "public function update()\n {\n $model = $this->model()::findOrFail(request('_id'));\n $data = array_merge(request()->all(), ['slug' => request('name')]);\n $category = $model->update($data);\n return redirect()->route('admin.'.$this->table().'.index');\n }", "title": "" }, { "docid": "7ab8504f8f644cff9d14c00b97595be8", "score": "0.5133509", "text": "public function update(Request $request, $id)\n {\n //診断結果の更新\n /* \n $diagnosis = Diagnosis::find($id);\n $diagnosis->fill( $request->all() ); \n $diagnosis->save();\n */\n\n \n //return redirect('diagnoses.diagnosis-top');\n }", "title": "" }, { "docid": "d718c8389436a95a127ec3a7cdbdf36d", "score": "0.51329535", "text": "function update_record () {\n\t\t\n\t\t// validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // update data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE customers SET name = ?, email = ?, mobile = ? WHERE id=\".$_GET['id'];\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->update();\n }\n\t\n\t}", "title": "" }, { "docid": "41167892b7f935d40869a623c8f40270", "score": "0.5130135", "text": "public function testUpdateChallengeActivityTemplate()\n {\n }", "title": "" }, { "docid": "b3c268c05967457da97e87da4c0df13d", "score": "0.5124088", "text": "public function update()\n {\n $data = Input::all();\n foreach (array_combine($data['question_id'], $data['question_name']) as $question_id => $question_name) {\n $question = Question::find($question_id);\n $question->question_name = $question_name;\n $question->save();\n }\n\n Flash::success('The question has been successfully updated!');\n return Redirect::action('AnswerController@edit', $question->exam_id);\n }", "title": "" }, { "docid": "474128b1b3164d340bfc3d09d216c7ca", "score": "0.51209337", "text": "public function update(Request $request){\n // chake the validation \n\n $validation = $this->chakeValidation($request);\n if($validation->passes()){\n\n //update the Data \n $menu= MemberCategory::find($request->memberCategoryId);\n $menu->categoryHeadding = $request->categoryHeadding;\n $menu->categoryTitle = $request->categoryTitle;\n $menu->position = $request->position;\n $menu->publicationStatus = $request->publicationStatus;\n $menu->save();\n // return to the manage file with value\n return redirect('/member.category.manage')->with('message', 'Team Member Category Information Update SuccessFully !');\n }else{\n return redirect('/member.category.edit')\n ->withErrors($validatoion) \n ->withInput();\n }\n }", "title": "" }, { "docid": "dc902f0b44784231b8f3bcf0dd61f2a9", "score": "0.51192", "text": "public function update(Request $request, $id)\n {\n //\n $request->request->add(['id'=>$id]);\n $request->validate([\n 'id' => 'required|integer|exists:cities|unique:cities,name,'.$id,\n 'name' => 'required|min:3|max:15|string',\n 'status' => 'in:on'\n ],[\n 'name.required' => 'Please, enter city name',\n 'name.min' => 'Name must be at least 3 characters lenght',\n 'name.max' => 'Name must be a less than 15 characters'\n ]);\n\n $city = City::find($id);\n $city->name = $request->get('name');\n $city->status = $request->has('status') ? 'Active' : 'InActive';\n $isUpdated = $city->save();\n if($isUpdated) {\n session()->flash('alert-type', 'alert-success');\n session()->flash('message', 'City updated successfuly');\n return redirect()->back();\n }else{\n session()->flash('alert-type', 'alert-danger');\n session()->flash('message', 'Failed to update city!!');\n return redirect()->back();\n }\n\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "01d9929d04e29418ab58c2939e8fd1bc", "score": "0.0", "text": "public function handle()\n {\n \t\n\n //查询游戏列表\n $gamelist = DB::table('mg_game')->where('status',1)->where('cate',1)->get();\n if(date(\"H:i:s\") >= '15:00:00' && date(\"H:i:s\") <= '24:00:00'){\n $today = strtotime(date(\"Y-m-d\"));\n }else{\n $today = strtotime(date('Y-m-d', strtotime('-1 day')));\n }\n $access_token = env('ACCESS_TOKEN_CLOSECAMPAIGN');\n foreach ($gamelist as $key => $value) {\n dump($value->name);\n $data = DB::table('mg_game_report')->where('game_id',$value->id)->where('date',$today)->first(); \n $revenue = $data->fb_ad_network_revenue+$data->is_revenue+$data->mp_revenue+$data->al_revenue+$data->am_revenue;\n $profit = $revenue - $data->cost;\n if($data->cost!=0&&$data->install_count!=0){\n $cpi = round($data->cost/$data->install_count,2);\n }else{\n $cpi = 0;\n }\n // $email1 = explode(',',$value->alarm_email);\n dump($profit);\n $profitup = $profit * -1;\n \n dump($profitup);\n if($value->monitor_profit){\n $monitor_profit = $value->monitor_profit;\n }else{\n $monitor_profit = 50;\n }\n if($profitup >= $monitor_profit){\n $account = explode(',',$value->fb_read_accounts);\n foreach ($account as $key1 => $value1) {\n\n //遍历这个超额账户下所有状态为ACTIVE的campaign\n $url = 'https://graph.facebook.com/v6.0/act_'.$value1.'/campaigns?fields=status,name&limit=2000&access_token='.$access_token;\n $res = (new IndexController)->curl_get_https ($url);\n $res_ary = json_decode ( $res, true );\n dump($res_ary);\n if(!empty($res_ary['data'])){\n \t//关闭这个账户下所有campaign\n foreach ($res_ary['data'] as $key2 => $value2) {\n if($value2['status'] == 'ACTIVE'){\n $url1 = 'https://graph.facebook.com/v5.0/'.$value2['id'].'?';\n $get_data1 = array (\n 'status' => 'PAUSED',\n 'access_token' => $access_token\n );\n $res = (new IndexController)->curl_post_https ( $url1.http_build_query($get_data1 ));\n dump(json_decode($res));\n dump('关闭'.$value2['name'].'('.$value2['id'].')'.'campaign完成');\n Log::info('关闭'.$value2['name'].'('.$value2['id'].')'.'campaign完成');\n }\n }\n }\n }\n \n }\n }\n Log::info('检查利润关闭campaign完成');\n }", "title": "" } ]
[ { "docid": "9b61a9780f98b7e39b854a3f341f2c83", "score": "0.6328427", "text": "public function handle()\n {\n $since_id = $this->option('since_id');\n $max_id = $this->option('max_id');\n $count = $this->option('count');\n\n $this->getHomeTimeline($since_id, $max_id, $count);\n }", "title": "" }, { "docid": "7c516ae73803eeb16ef7eb97da0b914a", "score": "0.6300644", "text": "public function handle()\n {\n $this->user = User::find($this->argument('user'));\n $cardmarketOrder = $this->user->cardmarketApi->order->get($this->argument('order'));\n\n if ($this->option('json')) {\n $this->line(json_encode($cardmarketOrder));\n }\n else {\n dump($cardmarketOrder);\n }\n\n if ($this->option('sync')) {\n Order::updateOrCreateFromCardmarket($this->user->id, $cardmarketOrder['order'], Order::FORCE_UPDATE_OR_CREATE);\n $this->line('updated');\n }\n }", "title": "" }, { "docid": "f796d182659c80e3aa00ef0c54d38e8e", "score": "0.6264176", "text": "public function handle()\n\t{\n\t\t$module = ModuleFacade::find($this->argument('module-name'));\n\n\t\tif (!$this->canExecuteCmd($module)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$generator = new Generator($this->argument('module-name'));\n\t\t$generator->generate();\n\n\t\t$this->info('The module \"'.$this->argument('module-name').'\" has been generated');\n\t}", "title": "" }, { "docid": "70d93dc14a0673f1f71672709dc2fbc9", "score": "0.626039", "text": "public function handle()\n {\n $guild = $this->argument('guild');\n $this->storemembers($guild);\n }", "title": "" }, { "docid": "cdedd52ba82ea778d7ad11f14e79f53d", "score": "0.6258918", "text": "public function handle()\n {\n $this->dispatch(\n new Execute($this->argument('testNumber'), $this->argument('setNumber'))\n );\n }", "title": "" }, { "docid": "3b0509f3a86b6c547166732abbc7958c", "score": "0.6256363", "text": "public function handle()\n {\n $sponsorId = $this->argumentsSponsorId();\n\n $this->info(\"sponsor_id: {$sponsorId}\");\n\n $sponsorRole = SponsorRole::findOrFail($sponsorId);\n\n $this->info('permissions: ' . json_encode($sponsorRole->permissions, JSON_PRETTY_PRINT));\n }", "title": "" }, { "docid": "b2a7e3102f513887d841ad6105595f20", "score": "0.6240963", "text": "public function handle()\n {\n $tables = explode(',', $this->argument('tables'));\n\n try {\n foreach ($tables as $table) {\n $this->printResult(\n $table,\n $this->fileGenerator->generateVDOSeedFile($table, $this->suffix)\n );\n }\n } catch (Exception $exception) {\n $this->printResult($table, false);\n }\n }", "title": "" }, { "docid": "3f4c93e1fdea3267d366f776dbd1799b", "score": "0.62376475", "text": "public function handle()\n {\n $this->exportFiles();\n\n $this->info('LineBot scaffolding generated successfully.');\n }", "title": "" }, { "docid": "c0541ad73acdefb2c54d6b765ea32446", "score": "0.62272376", "text": "public function handle()\n {\n list($projectId, $domain, $interval, $wordlist) = $this->getArguments();\n\n $wordlist = base_path(\"toolset/wordlists/subdomains/\" . $wordlist);\n $resolver = base_path(\"toolset/wordlists/dns/resolvers.txt\");\n\n $this->validateArguments($projectId, $domain, $interval, $wordlist, $resolver);\n\n\n $this->wildCardDomainTest($domain);\n\n $this->project = Project::findOrFail($projectId);\n\n $outputPath = $this->makeOutputFileAndPath($domain, $projectId, $wordlist);\n\n $this->cmd = $this->createCommand($wordlist, $domain, $resolver, $interval, $outputPath);\n\n $this->line(\"Executed command: \".$this->cmd);\n\n AdminNotice::create([\n 'type' => 'success',\n 'context' => \"massdns:scan\",\n 'message' => \"Execution started\",\n 'cmd' => $this->cmd,\n ]);\n\n $this->executeCommand($this->cmd);\n\n $this->checkIfReportWasCreated($outputPath);\n\n $this->importMassDNSDataToDB($outputPath);\n\n\n $message = \"Process finished, report saved to file and database.\";\n $this->info($message);\n\n AdminNotice::create([\n 'type' => 'success',\n 'context' => 'massdns:scan',\n 'message' => $message,\n 'cmd' => $this->cmd,\n ]);\n }", "title": "" }, { "docid": "1e29a288c11d33bb22b1da684d7f898c", "score": "0.6223742", "text": "public function handle()\n {\n $site = resolve(ActiveSite::class);\n $season = resolve(ActiveSeason::class);\n $callStr = $this->argument('callStr');\n\n $tenantHeaders = ['Site', 'Season'];\n $tenantData = [[\"[$site->id] $site->domain\", \"[$season->id] $season->title\"]];\n $this->table($tenantHeaders, $tenantData);\n\n $this->info('Calling the following command: '.$callStr);\n\n $this->call($callStr);\n\n }", "title": "" }, { "docid": "57ea73a42d502c56feefbfd3dc054c83", "score": "0.6204291", "text": "public function handle()\n {\n $this->publishAssets();\n\n $this->runMigration();\n }", "title": "" }, { "docid": "647047d55143451f2cfb3fce8dd00e7a", "score": "0.6199982", "text": "public function handle(): void\n {\n $id = $this->argument('user');\n $this->info('Activating user with ID ' . $id);\n }", "title": "" }, { "docid": "bee040bcce6cafcab519c58b60f1bb23", "score": "0.6194441", "text": "public function handle()\n {\n $userModelClass = config('auth.providers.users.model');\n\n $user = $userModelClass::findOrFail($this->argument('user'));\n\n $this->info(\"Found a user: {$user->email}\");\n\n $generator = new PasswordToken;\n $token = $generator->createToken($user);\n $url = $generator->createPasswordSetupUrl($user, $token);\n \n $this->info(\"Token created: $token\");\n $this->info(\"Setup URL generated: $url\");\n\n $user->notify(new SetPassword($url));\n\n $this->info(\"Notification sent\");\n }", "title": "" }, { "docid": "c30062d887f40e144e7dab66d5c5a514", "score": "0.6177539", "text": "public function handle() {\n\n $this->comment('Sitemap making...');\n // $domain = $this->argument('domain');\n \\Queue::push('\\App\\Commands\\MakeSitemap'/*, ['domain' => $domain]*/);\n }", "title": "" }, { "docid": "7d06d7da20c7fa060564ccbdadb79e76", "score": "0.614832", "text": "public function handle()\n {\n $this->info(\n $this->prependTimestamp('Generating starmap...')\n );\n\n $this->generator->generate();\n\n if ($this->hasOption('no-render')) {\n $this->info(\n $this->prependTimestamp('Generation complete!')\n );\n } else {\n $this->info(\n $this->prependTimestamp('Generation complete! Rendering starmap...')\n );\n\n $this->call('starmap:render');\n }\n }", "title": "" }, { "docid": "a036419499013847cf7992dc5e87e9dc", "score": "0.6147983", "text": "public function handle()\n {\n $argument = $this->argument('name');\n $options = $this->options();\n\n if ($options['ping'])\n $this->ping($argument);\n\n /** TODO: Implement another Ping stuffs in Nodelink */\n\n if ($options['primary'])\n $this->warn($this->colorText('[Primary] ', ConsoleColor::White) . 'Not implemented yet');\n\n if ($options['complex'])\n $this->warn($this->colorText('[Complex] ', ConsoleColor::White) . 'Not implemented yet');\n\n }", "title": "" }, { "docid": "453e34b776bec1a4f017f7fdb4c8e3ad", "score": "0.61215985", "text": "public function handle() {\n $path = base_path().DIRECTORY_SEPARATOR.$this->argument('file');\n $productDatas = json_decode(file_get_contents($path), true);\n\n foreach ($productDatas as $productData) {\n $product = (new ProductSetter($productData))->set();\n\n $this->info(\"Product `{$product->name->description}` seeded\");\n }\n }", "title": "" }, { "docid": "e97672062b2a2a40f86292d6032b73bb", "score": "0.611681", "text": "public function handle() {\n $projectName = $this->option('name');\n $project = Project::where('title', $projectName)->first();\n if (is_null($project)) return printf(\"Project %s not found\\n\", $projectName);\n if ($project->active) return printf(\"Project %s is already active\\n\", $projectName);\n // Update all scenarios.\n Project::where('title', $projectName)->update(['active' => true]);\n printf(\"Project %s is now active\\n\", $projectName);\n }", "title": "" }, { "docid": "e5c351143f3b4b352af61cc1f758a41e", "score": "0.6116113", "text": "public function handle()\n {\n $productCode = $this->option('product_code');\n\n if ($productCode) {\n $products = GamePlatformProduct::getAll()->where('code', $productCode);\n } else {\n $products = GamePlatformProduct::getAll();\n }\n\n foreach ($products as $product) {\n $this->import($product);\n }\n }", "title": "" }, { "docid": "9e88a81856a06b5eae0bc0102ec698a1", "score": "0.6116094", "text": "public function handle()\n {\n try {\n $td_entity_type = $this->argument('td_entity_type');\n \n\n $crud = $this->refresh_class_interfaces->run(\n $this,\n $td_entity_type\n );\n \n\n $this->info($td_entity_type.'Interface updated successfully!');\n \n } catch (\\Exception $ex) {\n $this->error($ex->getMessage() . ' on line ' . $ex->getLine() . ' in ' . $ex->getFile());\n }\n }", "title": "" }, { "docid": "3f3b717fae45a0f36dad05c68dd3b628", "score": "0.61114675", "text": "public function handle()\n {\n $userId = $this->argument('userId');\n\n $email = $this->argument('email');\n\n $user = User::find($userId);\n \n if (!empty($user)) {\n\n Mail::to($email)->send(new ResendOtpOnEditprofileMail($user));\n }\n }", "title": "" }, { "docid": "727e10d79b6fe861843c7ae9ecbbaffc", "score": "0.6099305", "text": "public function handle()\n {\n $generator = new Generator(\n $this->argument('xsdpath'),\n $this->argument('outputPath'),\n $this->argument('namespace')\n );\n $generator->generate();\n }", "title": "" }, { "docid": "cfd42eff3b2089cc38258c3cbfc7f8c4", "score": "0.60989857", "text": "public function handle()\n {\n try {\n if (!$this->argument('mid')) {\n $this->info(json_encode(UserMail::putUserMail($this->arguments())));\n }\n else {\n $this->info(json_encode(UserMail::putUserMail($this->arguments())));\n } \r\n } catch (Exception $e) {\n $this->error(\"An error occurred\");\n }\n }", "title": "" }, { "docid": "d7cde14c8862d2a8c2552d72f0feea62", "score": "0.60967433", "text": "public function handle()\n {\n $this->info('Fetching football matches');\n\n $limit = Config::value(Config::PAST);\n\n $params = [\n 'dateTo' => now()->format('Y-m-d'),\n 'dateFrom' => date('Y-m-d', strtotime(\"-{$limit}\")),\n ];\n\n if (!empty(Config::value(Config::COMPETITIONS))) {\n $params['competitions'] = implode(\n ',',\n Config::value(Config::COMPETITIONS)\n );\n }\n\n $matches = Http::withHeaders([\n 'X-Auth-token' => Config::value(Config::API_KEY),\n ])\n ->get('https://api.football-data.org/v4/matches', $params)\n ->json();\n\n MatchResultsStore::make()->updateMatchResults($matches['matches']);\n\n $this->info('Data import finished!');\n }", "title": "" }, { "docid": "b70761f76854d73ca65281145c14d295", "score": "0.60940534", "text": "public function handle()\n {\n $loop = Factory::create();\n\n $shortSchedule = (new ShortSchedule($loop))->registerCommands();\n\n $shortSchedule->pendingCommands()->filter(function ($value) {\n return $value->getCacheName() == $this->argument('id');\n })->each->callAfterEndedBackgroundCommand($this->argument('code'));\n }", "title": "" }, { "docid": "c6d1b8a22ce1217a7e70a63421bf4062", "score": "0.60940534", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch ($type) {\n case \"sync\" :\n $this->sync();\n break;\n default :\n throw new Exception('Empty type commaand.');\n break;\n }\n }", "title": "" }, { "docid": "d85f83a16288ac92aacd272ad0e67bef", "score": "0.6081542", "text": "public function handle()\n {\n $this->getConfig();\n $this->getDatabaseManager();\n $this->getRenderer();\n $this->getGenerator();\n\n $this->generate();\n }", "title": "" }, { "docid": "2a3737b8de54fce579bad5d374267720", "score": "0.60812765", "text": "public function handle()\n {\n $fullPath = Helpers::projectCopyPath($this->argument('name') . '.php');\n\n $filesystem = new Filesystem();\n\n if ($filesystem->exists($fullPath)) {\n $this->error(\"File {$fullPath} already exists.\");\n\n return;\n }\n\n $this->makePathToFile($filesystem);\n;\n $filesystem->put($fullPath, $this->getStub());\n }", "title": "" }, { "docid": "bd09a0c0c18c2b25abaab424e9afdb3d", "score": "0.6079936", "text": "public function handle()\n {\n $userId = $this->argument('userId');\n if (!$userId) {\n $userId = $this->ask('Please provide the id of the user you wish to lookup');\n }\n try {\n $user = User::findOrFail($userId)->toArray();\n $this->table(array_keys($user), [$user]);\n } catch (ModelNotFoundException $exception) {\n $this->error('Could not find user given by id: ' . $userId);\n }\n }", "title": "" }, { "docid": "2cf05b169d73c31058f994ce1a39a1d5", "score": "0.60769695", "text": "public function handle() {\n $domainArg = $this->argument('domain');\n foreach ($this->config[\"workflows\"] as $workflow) {\n if ($domainArg === $workflow['domain']) {\n $stack[] = $this->runWorkflowActivity($domainArg);\n }\n }\n\n if (empty($stack)) {\n $this->warn(\"No workflows activity running\");\n }\n }", "title": "" }, { "docid": "b7c4765fd84bb3cfead2c3b48ef7feda", "score": "0.60759884", "text": "public function handle()\n {\n $generator = $this->argument('generator');\n $model = $this->argument('model');\n\n if (in_array($generator, [\n 'domain',\n ])) {\n $fullGenerator = \"__make_{$generator}\";\n if (method_exists($this, $fullGenerator)) {\n $this->$fullGenerator($model);\n }\n } else {\n $this->runStand($generator, $model);\n }\n }", "title": "" }, { "docid": "27322ba73399e1276e71ac5ff53e4a90", "score": "0.60689557", "text": "public function handle()\n {\n $numberMinutes = (int)config('constants.sync_minutes');\n $this->output->writeln(sprintf('syncing objects that have been cached for %d minutes', $numberMinutes));\n $this->sync->sync($numberMinutes);\n $this->output->writeln('done.');\n }", "title": "" }, { "docid": "4e6e7325707d32777022f3c3b78ba786", "score": "0.6067131", "text": "public function handle()\n {\n $this->updateCharacterPredictionCounts();\n $this->updateTotalPredictionCount();\n $this->line(\"Successfully updated all statistics\");\n }", "title": "" }, { "docid": "a51b689e95b100310ffcfb862ca58115", "score": "0.60501164", "text": "public function handle()\n {\n $version = $this->argument('version');\n\n $this->info('Notifying Sentry of new version: '.$version);\n\n try {\n $this->centurian->createRelease($version);\n } catch (Exception $e) {\n $this->error('There was an error making your release.');\n\n return;\n }\n\n $this->info('Version '.$version.' has been released.');\n }", "title": "" }, { "docid": "a790e0a0315e50088d956d3deb6d4248", "score": "0.6048065", "text": "public function handle()\n {\n $provider = in_array('users', array_keys(config('auth.providers'))) ? 'users' : null;\n\n $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]);\n\n if ($this->option('uuids')) {\n $this->configureUuids();\n }\n\n $this->call('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client']);\n $this->call('passport:client', ['--password' => true, '--name' => config('app.name').' Password Grant Client', '--provider' => $provider]);\n }", "title": "" }, { "docid": "1180c35a19ba2f9cc857674029cdd48a", "score": "0.6045552", "text": "public function handle()\n {\n $discordUsers = $this->getUsers();\n\n if (! $discordUsers) {\n $this->error('No users found.');\n exit();\n }\n\n foreach ($discordUsers as $account) {\n $this->account = $account;\n $this->grantRoles();\n $this->removeRoles();\n $this->assignNickname();\n sleep(1);\n }\n\n $this->info($discordUsers->count().' user(s) updated on Discord.');\n Log::debug($discordUsers->count().' user(s) updated on Discord.');\n }", "title": "" }, { "docid": "cfff40e5fc7b554023a9e8095f1c5c7a", "score": "0.6039821", "text": "public function fire()\n {\n $resultMessage = self::SYNC_SUCCESS;\n\n try {\n $this->outbound->handle($this->argument('queue'));\n } catch (AWSSQSServerException $exc) {\n $resultMessage = $exc->getMessage();\n }\n\n $this->info($resultMessage);\n }", "title": "" }, { "docid": "63f71fad0a40a3fa1204612f8b5a1fac", "score": "0.602985", "text": "public function handle()\n {\n $email_address = $this->argument('email_address');\n $force = $this->option('force');\n\n $user = User::where('email', $email_address)->first();\n\n if(!$email_address) {\n echo \"User with email:{$email_address} does not exist.\\n\";\n return;\n }\n\n $subscription = UserSubscription::where('user_id', $user->id)->first();\n if(!$subscription || !$subscription->active) {\n echo \"User {$user->name} does not have any active subscriptions.\\n\";\n return;\n }\n\n echo \"Terminating {$user->name}'s subscription... \\n\";\n\n try{\n $this->user_subscription_handler->cancel($subscription, $force);\n echo \"Subscription cancelled!\\n\";\n } catch(SubscriptionException $e) {\n echo $e->getMessage().\"\\n\";\n }\n }", "title": "" }, { "docid": "8a9b4586631459b1d27255037a2b374f", "score": "0.6028499", "text": "public function handle()\n {\n $this->info('Generating optimized class loader');\n\n if ($this->option('psr')) {\n $this->composer->dumpAutoloads();\n } else {\n $this->composer->dumpOptimized();\n }\n\n $this->call('clear-compiled');\n }", "title": "" }, { "docid": "72755b55031c92f88f4f45f853d3f8c3", "score": "0.6022397", "text": "public function handle()\n {\n $defaultTimeZone = 'Asia/Saigon';\n if (date_default_timezone_get() != $defaultTimeZone) {\n date_default_timezone_set($defaultTimeZone);\n }\n\n $fillter_owner_id = $this->option('owner') . '';\n $get_list = $this->option('getlist');\n $parent = $this->option('map_parent');\n\n if ($get_list) {\n $this->get_list($fillter_owner_id);\n }\n\n if ($parent) {\n $this->map_parents($fillter_owner_id);\n }\n }", "title": "" }, { "docid": "8122991715c92a51ce935a863d43aa64", "score": "0.60219145", "text": "public function handle() {\n\n $name = $this->argument('name');\n\n $database = $this->choice(\n 'What is the database used for this repository',\n Constants::$database,\n 0\n );\n\n $this->makeRepositoryAndInterface($name, $database);\n\n $this->info('Repository and Interface generated successfully, Kindly map them in the RepositoryServiceProvider');\n }", "title": "" }, { "docid": "4a2b63360e263807c21593ff2530b701", "score": "0.6019057", "text": "public function handle()\n {\n $projects = Project::all();\n $toolController = new ToolController();\n\n foreach($projects as $project) {\n echo 'Pulling DB snapshot for ' . $project['project_name'] . PHP_EOL;\n $toolController->dbSnapshotPull($project);\n echo 'Pulling media snapshot for ' . $project['project_name'] . PHP_EOL;\n $toolController->mediaSnapshotPull($project);\n }\n }", "title": "" }, { "docid": "ecc2c71d631200edc1bdba19435739e3", "score": "0.6015364", "text": "public function handle()\n {\n $this->createPermissions();\n $this->attachPermissions();\n }", "title": "" }, { "docid": "e7f89ca03f50bd6de305d4b54ec96cfb", "score": "0.6014478", "text": "public function handle()\n {\n echo $args = $this->argument('args') . \"\\n\";\n $arr = explode('/', $args);\n echo Helper::getExchangeRate($arr[0], $arr[1]) . \"\\n\";\n }", "title": "" }, { "docid": "65a7d7935846d174d517918a4cda9d85", "score": "0.6012377", "text": "public function handle()\n {\n // Sync all roles\n $this->syncRoles();\n\n // Sync all features\n $this->syncFeatures();\n\n // Sync all permissions\n $this->syncPermissions();\n }", "title": "" }, { "docid": "484d1ef4f92db1a2cc75baff39126872", "score": "0.6007349", "text": "public function handle()\n {\n $ids = $this->options('id');\n\n $activities = Activity::whereIn('id', $ids)->with('activityItems')->get();\n\n $this->info(sprintf('Found %d activities.', $activities->count()));\n\n $path = getcwd() . '/activities.json';\n\n $this->info(sprintf('Writing data to %s', $path));\n\n File::put($path, $activities->toJSON(JSON_PRETTY_PRINT));\n }", "title": "" }, { "docid": "4ff1bb2cfc1eebaedf4ed1db50897703", "score": "0.6007263", "text": "public function handle()\n {\n if ($this->option('setup')) {\n $this->setupWebhook();\n }\n\n if ($this->option('remove')) {\n $this->removeWebhook();\n }\n\n if ($this->option('info')) {\n $this->getWebhookInfo();\n }\n }", "title": "" }, { "docid": "b6a20998437189315ee6b9f41d38150b", "score": "0.6006057", "text": "public function handle()\n {\n $this->ip = trim($this->argument('ip'));\n\n if ($errors = $this->isIpValidateError()) {\n $this->errorsInConsole($errors);\n\n return;\n }\n\n $result = spammer($this->ip)->restore();\n\n $this->info($result);\n }", "title": "" }, { "docid": "8d8c092db04fbdcdf2f17d3226442267", "score": "0.60018986", "text": "public function handle()\n {\n $this->info('Syncing variables...');\n $variables = Variable::all();\n Api::exec('variables/sync', ['variables' => $variables->toArray()]);\n }", "title": "" }, { "docid": "3e63d741cd08736541b4d3fbe0896064", "score": "0.6001355", "text": "public function handle()\n {\n $name = $this->option('name');\n $password = $this->option('password');\n\n if(!$user = $this->findUser($name))\n {\n return $this->error('The user is not registered.');\n }\n\n if($this->setNewPassword($user->id, $password))\n {\n return $this->info('Set a new password to the user.');\n }\n }", "title": "" }, { "docid": "a6d3b9eb06a0c39e4c46e9e4ace7a67e", "score": "0.59998405", "text": "public function handle(): void\n {\n $this->call('migrate', [\n '--path' => 'vendor/ahmedwaleed/mailmerge/src/database/migrations',\n ]);\n\n $this->line('');\n $this->line('');\n $this->info('MailMerge migrations ran successfully.');\n }", "title": "" }, { "docid": "d0e839d3c3b406e4f8f7ec2ae9de3195", "score": "0.599728", "text": "public function handle()\n {\n $model = $this->getModelInput();\n\n $this->replacesLines($model);\n\n $this->info('Replaced lines successfully.');\n }", "title": "" }, { "docid": "e1ac023a7ae95f2de7b023d7ad1510b2", "score": "0.59920716", "text": "public function handle()\n {\n $this->comment('Scanning permissions..');\n\n $this->scanRolesAndPermissions();\n $this->generateRolesAndPermissions();\n\n $this->comment('-');\n }", "title": "" }, { "docid": "1eac73c246536652449db278785c8788", "score": "0.599187", "text": "public function handle()\n {\n\t\t$name = $this->argument('user_name');\n\t\t$user = User::findByName($name);\n\t\tif (!$user){\n\t\t\t$this->line('Username <fg=cyan>'.$this->argument('user_name').'</> <fg=red>not found</>');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$this->line('Grant Role to <fg=cyan>'.$name.'</>');\n\t\tforeach($this->argument('role_id') as $role){\n\t\t\t//check if given role valid id\n\t\t\tif (Role::find($role)){\n\t\t\t\t\n\t\t\t\t$user->grantRole($role, $this->serializeRoleOptions($role));\n\t\t\t\t$this->line('Role <fg=green>'.$role.'</> <fg=yellow>Granted</>');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->line('Role <fg=green>'.$role.'</> <fg=red>Not Found</>');\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "2bc374a93d61f7291e6849ff143e8a7d", "score": "0.5990702", "text": "public function handle()\n {\n \n $exercise = new QzExercise();\n $do_exercise = $exercise->forceExecute();\n Log::info($do_exercise);\n }", "title": "" }, { "docid": "261f64ff1d1f3fd8ee7cd75b8f4c0498", "score": "0.5988628", "text": "public function handle()\n {\n return $this->calculator->execute(\n $this->option(\"force\"),\n $this->option(\"debug\") \n ? function ($text, $method = 'info') {\n $this->$method($text);\n }\n : function($text = null, $method = null) {return;}\n );\n }", "title": "" }, { "docid": "f23d77deb27eb95ee44abd504739be6a", "score": "0.5985976", "text": "public function handle()\n {\n switch($this->argument('type')){\n case 'all':\n $this->syncReportPoints();\n $this->syncMarkers();\n break;\n case 'reportpoints':\n $this->syncReportPoints();\n break;\n case 'markers':\n $this->syncMarkers();\n break;\n }\n }", "title": "" }, { "docid": "809c0efaa61e5abc70ec1b0e214bf934", "score": "0.59832907", "text": "public function handle()\n {\n // if you are on the local environment\n if (!app()->isLocal()) {\n $this->error('This command is only avilable on the local environment.');\n\n return;\n }\n\n $this->migrateTenant();\n }", "title": "" }, { "docid": "ee04790add943567bb786df2bff318f5", "score": "0.5982712", "text": "public function handle()\n {\n $from = $this->argument('from');\n $to = $this->argument('to');\n\n $this->output->comment('Migrating assets from ' . $from . ' to ' . $to);\n\n // Find all assets on specified disk\n $assets = Asset::where('disk', '=', $from)\n ->orderBy('id')\n ->get()\n ;\n\n $assets->each(function(Asset $asset) use ($to) {\n $this->migrateAsset($asset, $to);\n });\n }", "title": "" }, { "docid": "bb25b4c92e5ca44728569a7649c70f5b", "score": "0.5980048", "text": "public function handle()\n {\n if ($package = $this->option('package')) {\n $this->manager->setPathToVendorPackage($package);\n }\n\n $this->files = $this->manager->files();\n\n if (empty($this->files)) {\n $this->warn('No language files were found!');\n }\n\n $languages = $this->manager->languages();\n\n $this->table(\n array_merge(['key'], $languages),\n $this->tableRows()\n );\n }", "title": "" }, { "docid": "8941b47357e75e4d56424b8a556e1d2c", "score": "0.5979924", "text": "public function handle(): void\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n $number = $this->argument('number');\n\n Mail::to($email)->send(new Greeting($name, $number));\n\n $this->info('sent');\n }", "title": "" }, { "docid": "e56c501fddb54ff021bde48387564434", "score": "0.5972038", "text": "public function handle()\n {\n Log::debug(\"Entering \" . __METHOD__);\n\n $email = $this->option('email') ?: null;\n if ($email) {\n $user = User::whereEmail($email)->first();\n }\n else {\n $user = User::all();\n }\n\n if ($user) {\n unset($user->api_token);\n $this->info($user->toJson(JSON_PRETTY_PRINT));\n }\n\n Log::debug(\"Exiting \" . __METHOD__);\n }", "title": "" }, { "docid": "ee760d8ede3da6f55684ae83a21ca542", "score": "0.5971986", "text": "public function handle()\n {\n $name = strtolower($this->argument('name'));\n \n if($this->laravel['themes']->exists($name) && !$this->option('force')){\n $this->error('Theme already exists.');\n return;\n }\n\n $this->generate($name);\n }", "title": "" }, { "docid": "98644eb2d863319460ca3fa5a1b6ddbc", "score": "0.59715384", "text": "public function handle()\n {\n $users = $this->userService->getUsers();\n foreach ($users as $user) {\n echo 'GitHub name: '.$user->github_name.\" checking\\n\";\n if (!$this->gitHubService->checkContribution($user->github_name)) {\n $this->yoService->sendYo($user->yo_name);\n \\Log::info('GitHub name: '.$user->github_name.' is lazy person');\n }\n }\n }", "title": "" }, { "docid": "746de77d8c76a03e804ebad8ba07a7b4", "score": "0.5969086", "text": "public function handle()\n {\n $transactionId = $this->argument('transactionId');\n $this->wechatPay->refundByTransactionId($transactionId);\n $this->info('refund success!');\n }", "title": "" }, { "docid": "e6a72e0721e21d9cd52298d931698366", "score": "0.59677947", "text": "public function handle()\n {\n try {\n if (env('DB_INSTALL') == 1) {\n $day = $this->argument('day');\n $cdn = new CdnReportController();\n $cdn->genDailyByteSentReport($day);\n }\n } catch (Exception $ex) {\n //dd($ex);\n $this->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "e79d9da75c1be207ef3c85c2e9928ca2", "score": "0.59647113", "text": "public function handle()\n {\n $programmerName = 'Raymond Usbal';\n $user = User::where('name', $programmerName)->first();\n\n if (! $user) {\n $this->info(\"Programmer name not found: '$programmerName'\");\n return;\n }\n\n $user->notify(new ProgrammerTestNotification());\n $this->info(\"Programmer notification sent to $user->email\");\n }", "title": "" }, { "docid": "2d145dde8e79c4ea4e41da739f3f5657", "score": "0.5963121", "text": "public function handle()\n {\n $this->rtc = ucfirst($this->argument('name'));\n $this->rcc = Str::camel($this->argument('name'));\n $this->rsc = Str::snake($this->argument('name'));\n\n $this->generateMigration();\n $this->generateModel();\n $this->generateInterface();\n $this->generateRepository();\n $this->generateController();\n $this->generateView();\n $this->addToAppServiceProvider();\n $this->warn('New resource generated successfully');\n }", "title": "" }, { "docid": "8359aec221adcf9289b8beb520727cd3", "score": "0.59600073", "text": "public function handle()\n {\n try {\n $this->serve(ProcessGraphAPIContentInsightsFeature::class, [\n 'page' => $this->argument('page')\n ]);\n } catch (RevokedTalentAccountException $exception) {\n $this->warn($exception->getMessage());\n\n Log::error($exception->getMessage(), [\n 'talent' => $exception->getTalent(),\n 'exception' => $exception,\n ]);\n }\n }", "title": "" }, { "docid": "b53a80abaf262256a1ed330dae653cfc", "score": "0.59596485", "text": "public function handle()\n {\n //\n\t $args = $this->option('word');\n\t File::put(public_path('words.txt'), json_encode($args));\n\t\techo 'Added '.count($args).' words.';\n }", "title": "" }, { "docid": "5da1ac1c30fa6271e2d47967bf2ad984", "score": "0.59575003", "text": "public function handle()\n {\n $this->title();\n\n $this->info('Removing logs...');\n $this->call('log:clear', [\n '--all' => true,\n ]);\n\n $this->info('Reloading .env...');\n File::delete(base_path('bootstrap/cache/config.php'));\n $this->call('config:cache');\n $this->call('config:clear');\n $this->call('cache:clear');\n $this->call('view:clear');\n\n // sudo chown -R $USER:www-data .\n // sudo chgrp -R www-data storage bootstrap/cache\n // sudo chmod -R ug+rwx storage bootstrap/cache\n // git checkout .\n\n $this->info('Optimize app...');\n $this->call('optimize:clear');\n $this->call('optimize');\n $this->call('event:cache');\n\n $this->info('Done.');\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "22f98c5033284ae972cb086f1f784c8f", "score": "0.5954784", "text": "public function handle()\n {\n ini_set(\"memory_limit\", \"4096M\");\n $dataset = Dataset::findOrFail($this->argument(\"datasetId\"));\n $project = Project::findOrFail($this->option(\"project-id\"));\n $importDatasetIntoProjectAction = new ImportDatasetIntoProjectAction();\n $importDatasetIntoProjectAction->execute($dataset, $project, $dataset->importDirectory());\n }", "title": "" }, { "docid": "e2399839913e79c6e4fabe0c5c5f1ee3", "score": "0.59545153", "text": "public function handle()\n {\n $combined = '';\n foreach(glob(base_path('vendor').'/**/**/AutoCompletionHelper.php') as $filename){\n $combined .=file_get_contents($filename);\n }\n \n \n $this->file_force_contents(base_path($this->argument('name').'.php'),\n \"<?php\\n\".str_ireplace([\"<?php\\n\",\"<?php\", \"?>\\n\",\"?>\"],\"\",$combined)\n );\n \n $this->info('Generating ...');\n $this->info($this->argument('name').'.php ........ OK');\n\n }", "title": "" }, { "docid": "04af290fd17a3e9011bc00c430a11e1b", "score": "0.5951234", "text": "public function handle()\n {\n $this->runPreRebuildCommands();\n\n $this->setRebuildModeTo(true);\n $this->rebuildEvents();\n $this->setRebuildModeTo(false);\n\n $this->runPostRebuildCommands();\n\n // Statistics\n\n $this->output->writeln(\"\");\n $this->table([\n 'Statistic', 'Value'\n ], [\n ['Steps', \"<comment>\" . ($this->steps - 1) . \"</comment>\"],\n ['Total Execution Time', \"<comment>\" . $this->humanReadableExecutionTime($this->totalExecutionTime) . \"</comment>\"],\n ['Average Execution Time', \"<comment>\" . $this->humanReadableExecutionTime($this->totalExecutionTime / ($this->steps - 1)) . \"</comment>\"]\n ]);\n }", "title": "" }, { "docid": "64baf9ef864cd44b177ee1fac309fbd5", "score": "0.59498435", "text": "public function handle()\n {\n $usernameFrom = $this->argument('usernameFrom');\n $usernameTo = $this->argument('usernameTo');\n $amountOfMoney = $this->argument('amountOfMoney');\n\n try {\n $this->moneyTransactionService->sendMoney($usernameFrom, $usernameTo, $amountOfMoney);\n $this->info('<fg=green>Деньги успешно переведенны!</>');\n } catch (\\LogicException $exception) {\n $this->info('<error>' . $exception->getMessage() . '</error>');\n }\n }", "title": "" }, { "docid": "936f4fdcf84ca7eb08c227f02b1b1103", "score": "0.5949668", "text": "public function handle()\n {\n foreach ($this->argument('source') as $path) {\n try {\n $this->consume($path);\n } catch (ConsumeCommandException $e) {\n $this->error($e->getMessage());\n\n // Continue handling the command\n continue;\n }\n }\n }", "title": "" }, { "docid": "9d1b869da1418aec3b64e6bd40722dd3", "score": "0.59437037", "text": "public function handle()\n {\n $sprouts = $this->loadSprouts();\n\n $sprout = $this->choice('Select a sprout to run', $sprouts);\n\n $sprout = $this->laravel->make($sprout);\n\n $sprout->setContainer($this->laravel)->setCommand($this)();\n\n $this->info(sprintf('%s ran successfully.', $sprout->description()));\n }", "title": "" }, { "docid": "cc7b51c4c0b2731414bdd064013c3e98", "score": "0.5942688", "text": "public function handle()\n {\n try {\n $entity_name = $this->argument('entity_name');\n $type = $this->argument('type');\n $function_name = $this->argument('function_name');\n $schema_path = $this->argument('schema_path');\n\n\n $this->workflow_function_process->generate($entity_name, $type, $function_name, $schema_path, $this);\n\n\n $this->info($entity_name.' '.$function_name.' workflow function successfully updated');\n \n } catch (\\Exception $ex) {\n $this->error($ex->getMessage() . ' on line ' . $ex->getLine() . ' in ' . $ex->getFile());\n }\n }", "title": "" }, { "docid": "c233687bf20bdcef0bca858ed24f02f5", "score": "0.59415096", "text": "public function handle()\n {\n $this->createDirectories();\n $this->copyFiles();\n\n $this->info('API Authentication scaffolding generated successfully.');\n }", "title": "" }, { "docid": "324c26a4dc2486dcbc31cedb938c2075", "score": "0.59385437", "text": "public function handle()\n {\n try {\n $seed = $this->option('seed');\n\n $this->call('migrate:refresh');\n \n if($seed !== null) {\n $this->info('Running Seeders');\n $this->call('db:seed');\n }\n \n $this->call('passport:install', ['--force']);\n $this->call('vendor:publish', ['--tag=\"cors\"']);\n } catch (\\Exception $ex) {\n $this->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "c80f10c3ec504e9435c8745e51edc1b6", "score": "0.5938461", "text": "public function handle()\n {\n $this->info('Publishing Migrations');\n $this->publish();\n }", "title": "" }, { "docid": "e84d3ced7172d2876b990cc06f2f728b", "score": "0.59382284", "text": "public function handle(): void\n {\n $this->alert($this->description);\n\n $this->call('cortex:publish:pages', ['--force' => $this->option('force')]);\n $this->call('cortex:migrate:pages', ['--force' => $this->option('force')]);\n $this->call('cortex:seed:pages');\n }", "title": "" }, { "docid": "78dad3ed58205beec671ad6d0e2a5a2a", "score": "0.59378505", "text": "public function handle()\n {\n $this->ensureDirectoriesExist();\n $this->exportViews();\n\n if (! $this->option('views')) {\n $this->exportBackend();\n }\n\n $this->info('Authentication scaffolding generated successfully.');\n }", "title": "" }, { "docid": "b54011ef77a43c222109189d95275e1c", "score": "0.59374547", "text": "public function handle()\n {\n $months = $this->argument('months');\n\n /**\n * [TODO] we could change the code to no truncate the table\n * and insert missing data only\n * (as the other command GetCurrencyHistoricPrices already does)\n */\n BtcHistoricPrice::truncate();\n\n $this->comment(\"Getting Btc Prices.\");\n\n $btcHistoricData = $this->getBtcHistoricData($months);\n\n /**\n * insert data in bulk\n */\n BtcHistoricPrice::insert($btcHistoricData);\n\n $this->comment(\"Btc Prices inserted in the db.\");\n\n /**\n * After inserting latest Btc Prices we\n * run the command to get currencies in case that we have\n * now a date that is missing\n */\n $this->call('currency:historic-prices');\n\n /**\n * Clean cache has this will affect Gains calculator cached data\n */\n Cache::flush();\n $this->comment(\"Clean cache\");\n }", "title": "" }, { "docid": "d81f187b58a507d337571a975a48c190", "score": "0.5931182", "text": "public function handle()\n {\n $list = $this->allInvitedStatus();\n foreach ($list as $line) {\n $this->line($line);\n }\n }", "title": "" }, { "docid": "5d85aa67bdda57fdeff59b36fb1cbb59", "score": "0.5931003", "text": "public function handle()\n {\n $this->call('cache:clear');\n $this->call('view:clear');\n $this->call('route:clear');\n $this->call('addon:discover');\n }", "title": "" }, { "docid": "56d7a594aad4f75a1d3d1e701d83c694", "score": "0.5929949", "text": "public function handle()\n {\n // Reset data\n $this->call('plugin:refresh', ['name' => 'Offline.Tricks']);\n\n $this->info(\"Generating tags...\");\n Tags::run();\n $this->info(\"Generating topics...\");\n Topics::run();\n $this->info(\"Generating users...\");\n Users::run();\n $this->info(\"Generating tricks...\");\n Tricks::run();\n $this->info(\"Generating comments...\");\n Comments::run();\n }", "title": "" }, { "docid": "5a51a03a289bf145397b2339a7e7d921", "score": "0.5926738", "text": "public function handle()\n {\n $path = database_path('seeds/*.php');\n\n $files = collect(File::glob($path))->map(function ($path) {\n return str_replace('.php', '', basename($path));\n })->toArray();\n\n $seederName = $this->choice('Select seeder', $files);\n\n $this->call('db:seed', ['--class' => $seederName]);\n $this->info('Seeding ' . $seederName);\n }", "title": "" }, { "docid": "7756d5de5099c3e82f6709aafd2f8d5a", "score": "0.59265715", "text": "public function handle()\n {\n $entity = $this->argument('entity');\n\n $attributes = $this->option('attributes');\n\n $source = $this->option('source');\n\n $path = $this->getMigrationPath();\n\n if (is_null($attributes) && is_null($source)) {\n $this->error('Either --attributes or --source must be given');\n exit(1);\n }\n\n try {\n if (!is_null($attributes)) {\n list($file, $attributes) = $this->creator->createFromString($attributes, $entity, $path);\n } else {\n list($file, $attributes) = $this->creator->createFromSource($source, $entity, $path);\n }\n } catch (CsvException | \\Exception $e) {\n $this->error($e->getMessage());\n exit(1);\n }\n\n $file = pathinfo($file, PATHINFO_FILENAME);\n $this->info(\"Created Migration: $file\");\n \n $this->call('eav:map:attribute', ['attributes' => implode(',', $attributes), 'entity' => $entity]);\n }", "title": "" }, { "docid": "fa4330c4fc3e0426e6d4be2c7fdd7133", "score": "0.5924163", "text": "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setPlain($this->option('plain'))\n ->setForce($this->option('force'))\n ->generate();\n }", "title": "" }, { "docid": "61915d6895c1562b6f2d6f9bf6b9d77a", "score": "0.59223235", "text": "public function handle()\n {\n $updatedGames = 0;\n $this->info('Updating games...');\n $games = Game::all();\n foreach ($games as $game) {\n if (empty($game->description)) {\n $this->updateGame($game);\n $updatedGames++;\n }\n }\n\n $this->info(\"Updated $updatedGames games\");\n }", "title": "" }, { "docid": "30bff9ecf344933a25f5b8d4a194255b", "score": "0.5920596", "text": "public function handle()\n {\n $tenant = Tenant::new()\n ->withDomains($this->getDomains())\n ->withData($this->getData())\n ->save();\n\n $this->info($tenant->id);\n }", "title": "" }, { "docid": "78f1f0e3c8513561c87b66ece06939da", "score": "0.59196204", "text": "public function handle()\n {\n $jiri_id = $this->argument('jiri');\n $this->jiri = Jiri::findOrfail($jiri_id)->load('judges');\n $this->generateToken();\n $this->sendEmails();\n }", "title": "" }, { "docid": "1059374cad70e45a752438f8850355cc", "score": "0.5918375", "text": "public function handle()\n {\n $ret = $this->exchangeBll->marketSell(\n $this->argument('symbol'),\n $this->argument('quantity')\n );\n\n dd(compact('ret'));\n }", "title": "" }, { "docid": "a914f2d4b0d6b12a949d83f979e3c6ac", "score": "0.5918017", "text": "public function handle()\n {\n $this->info('Shuffling On Call');\n $count = $this->argument('count');\n Employee::clearOnCall();\n for ($i = 0; $i < $count; $i++) {\n $employee = $this->getRandomEmployee();\n $employee->setOnCall()->save();\n $this->line($employee->name . ' set to On Call.');\n }\n\n // send digest email notification to [email protected]\n Mail::to('[email protected]')->send(new OnCallDigest());\n\n $this->comment('Finished.');\n }", "title": "" }, { "docid": "6e02a2c3709af7a9e6cf947f72cc33bb", "score": "0.5917934", "text": "public function handle()\n {\n $switch = $this->argument('switch');\n if ($switch === 'on') {\n update_option('demo_mode', 'TRUE');\n \\Cache::forget(settingsCacheName());\n $this->info('Demo mode activated');\n } else {\n update_option('demo_mode', 'FALSE');\n \\Cache::forget(settingsCacheName());\n $this->info('Demo mode deactivated');\n }\n }", "title": "" }, { "docid": "b5a5232e56de9d733aa5bfce156eb30d", "score": "0.5917324", "text": "public function handle()\n {\n $domainName = $this->argument('domainName');\n\n try{\n if ( \\validate_domain($domainName) ){\n $ip_addr = gethostbyname(\"$domainName.\");\n $ipInfo = app(IpInfo::class)->ip_address($ip_addr);\n $loc = '';\n $isp = $ipInfo->get('org');\n $ipInfo->get('city') ? $loc .= $ipInfo->get('city'). \", \" : '';\n $ipInfo->get('reqion') ? $loc .= $ipInfo->get('reqion'). \", \" : '';\n $ipInfo->get('country') ? $loc .= $ipInfo->get('country') : '';\n\n $this->info(\"Domain Name: \" .$domainName);\n $this->info(\"Domain IP: \" .$ip_addr);\n $this->info(\"ISP: \" .$isp);\n $this->info(\"Loc: \" .$loc);\n \n exit(1);\n }\n $this->error(\"Invalid domain name\");\n } catch (\\Exception $e){\n $this->error($e->getMessage());\n }\n \n }", "title": "" }, { "docid": "2b36e584174d9551a106bba537987a6e", "score": "0.59116817", "text": "public function handle()\n {\n $details = $this->getDetails();\n if(empty($details)){\n error_log('Details array is empty!!!');\n }\n $this->user->role = TRUE;\n $admin = $this->user->createAdmin($details);\n\n $this->display($admin);\n }", "title": "" }, { "docid": "9954e14786b6076e35df37dc993db915", "score": "0.59082335", "text": "public function handle()\n {\n $this->info('\n_____________ ___________ _____ __\n__ ___/__ /_____ ___________(_)__ /_____________ __ // /\n_____ \\__ __ \\ / / /_ ___/_ /__ //_/ _ \\_ __ \\ _ // /_\n____/ /_ / / / /_/ /_ / _ / _ ,< / __/ / / / /__ __/\n/____/ /_/ /_/\\__,_/ /_/ /_/ /_/|_| \\___//_/ /_/ /_/ \n ');\n $this->line(app('git.version') . ' by Internet Marketing Dojo (www.dojo.cc)');\n\n $commands = collect(Artisan::all())->filter(function($value, $key){\n return Str::contains(get_class($value), 'Shuriken') && $key !== 'start';\n });\n\n $keys = $commands->keys();\n\n if($this->option('omakase')){\n $action = $keys->filter(function($item, $key){\n return Str::contains($item, 'import');\n })->random();\n\n $this->call($action, ['--omakase' => true]);\n }\n else{\n $action = $this->choice('What do you want to do?', $keys->toArray(), 0);\n $this->call($action);\n }\n }", "title": "" }, { "docid": "1f862f196ac9151fa813e2dbbe77d30c", "score": "0.59077567", "text": "public function handle()\n {\n\n $startDate = date('Y-m-d H:i:s');\n echo \"Starting to export aggregate CSV files at \". $startDate . \" \\n\";\n\n AnalysisOps::generateAnalysisCsvFiles();\n\n echo \"\\n\\n...started exporting aggregate CSV files at \" . $startDate . \"\\n\";\n echo \"Finished at \". date('Y-m-d H:i:s') . \" \\n\\n\";\n }", "title": "" }, { "docid": "7b235c14f97825faffc58026db39f8d3", "score": "0.5907628", "text": "public function handle()\n {\n $this->seeder->setConnection($this->option('database'));\n\n if (!$this->seeder->repositoryExists()) {\n $this->error('No seeds found.');\n\n return;\n }\n\n $ran = $this->seeder->getRepository()->getRan();\n\n if (count($seeds = $this->getStatusFor($ran)) > 0) {\n $this->table(['Ran?', 'Seed'], $seeds);\n } else {\n $this->error('No seeds found');\n }\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "dc0e2c636cfd3699c3f9f8cc59765c86", "score": "0.0", "text": "public function show($id){\n\t\t//\n\t\t$http_status = 200;\n\t\t$data = array();\n\t\t$parametros = Input::all();\n\n\t\tif(isset($parametros['mostrar'])){\n\t\t\tif($parametros['mostrar'] == 'datos-estrategia-presupuestario'){\n\t\t\t\t$recurso = Estrategia::join('catalogoUnidadesResponsables AS unidadResponsable','unidadResponsable.clave','=','estrategia.claveUnidadResponsable')\n\t\t\t\t\t//leftjoin('catalogoProgramasPresupuestales AS programaPresupuestario','programaPresupuestario.clave','=','estrategia.claveProgramaPresupuestario')\n\t\t\t\t\t->select('estrategia.*','unidadResponsable.descripcion AS unidadResponsable')//,'programaPresupuestario.descripcion AS programaPresupuestario'\n\t\t\t\t\t->find($id);\n\t\t\t}elseif($parametros['mostrar'] == 'datos-estrategia-avance'){\n\t\t\t\t$mes_del_trimestre = Util::obtenerMesTrimestre();\n\t\t\t\tif($mes_del_trimestre == 3){\n\t\t\t\t\t$trimestre_actual = Util::obtenerTrimestre();\n\t\t\t\t}else{\n\t\t\t\t\t$trimestre_actual = 0;\n\t\t\t\t}\n\t\t\t\t$recurso = Estrategia::with(array('registroAvance',\n\t\t\t\t\t'evaluacionTrimestre'=>function($query) use ($trimestre_actual){\n\t\t\t\t\t\t$query->where('trimestre','=',$trimestre_actual);\n }))\n ->join('catalogoTiposIndicadores AS TipoIndicador','TipoIndicador.id','=','estrategia.idTipoIndicador')\n\t\t\t\t\t//->leftjoin('catalogoProgramasPresupuestales AS programaPresupuestario','programaPresupuestario.clave','=','estrategia.claveProgramaPresupuestario')\n\t\t\t\t\t->join('catalogoUnidadesResponsables AS unidadResponsable','unidadResponsable.clave','=','estrategia.claveUnidadResponsable')\n\t\t\t\t\t->select('estrategia.*','unidadResponsable.descripcion AS unidadResponsable', 'TipoIndicador.descripcion as TipoIndicadorMeta')//'programaPresupuestario.descripcion AS programaPresupuestario',\n\t\t\t\t\t->find($id);\n\t\t\t}elseif($parametros['mostrar'] == 'datos-metas-avance'){\n\t\t\t\t$trimestre_actual = Util::obtenerTrimestre();\n\t\t\t\t$recurso = Estrategia::with(array('registroAvance'=>function($query) use ($trimestre_actual){\n\t\t\t\t\t$query->where('trimestre','<=',$trimestre_actual);\n\t\t\t\t},'registroAvance.comentarios'))->join('catalogoUnidadesMedida AS unidadMedida','unidadMedida.id','=','estrategia.idUnidadMedida')\n\t\t\t\t->select('estrategia.*','unidadMedida.descripcion AS unidadMedida')\n\t\t\t\t->find($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(is_null($recurso)){\n\t\t\t$http_status = 404;\n\t\t\t$data = array(\"data\"=>\"No existe el recurso que quiere solicitar.\",'code'=>'U06');\n\t\t}else{\n\t\t\t$data[\"data\"] = $recurso;\n\t\t}\n\n\t\treturn Response::json($data,$http_status);\n\t}", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7593495", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.6845801", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6490299", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.63472325", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.6216249", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62105983", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.6198528", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.61824137", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.6155446", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.60641253", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.6063686", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.5995527", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5986619", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.5962972", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.5881492", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.587919", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.58711755", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.58634454", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.58409727", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.5838473", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.5811056", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.57885426", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5787194", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.5782477", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.57743496", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.5769528", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.5768978", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.57409096", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.5725927", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.5720744", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.570918", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5699814", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.56937706", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
15dc90a8abc4b44d0689794322faef9e
reads all resources from a resource group from the Azure API and returns an array of resource objects may throw QueryException on HTTP error
[ { "docid": "970eb8abbc30519e04b765106cfa8e0b", "score": "0.7637627", "text": "protected function getResGroupResources($resource_group)\n {\n Logger::info(\n \"Azure API: querying resource group '\".$resource_group.\"'\");\n\n $result = $this->call_get('subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/resources',\n \"2017-05-10\");\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying resource group resources\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get resource group '%s' resources. \".\n \"HTTP: %d\",\n $resource_group, $result->info->http_code);\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" } ]
[ { "docid": "59993451ae88c2a8cef8e25bb1ebd0eb", "score": "0.6759996", "text": "protected function getResourceGroups( $rgn )\n {\n // if the form joker drops in here, make it global\n if ($rgn == ImportSource::RESOURCE_GROUP_JOKER)\n $rgn = '';\n\n if ($rgn == '')\n Logger::info(\"Azure API: querying all resource groups\");\n else\n Logger::info(\"Azure API: looking for resource groups '\".$rgn.\"'.\");\n\n\n $result = $this->call_get('subscriptions/'.\n $this->subscription_id.\n '/resourceGroups',\n \"2014-04-01\");\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying resource groups\");\n\n if ($result->info->http_code != 200)\n {\n Logger::error(\"Azure API: Could not get resource group(s). HTTP: \".\n $result->info->http_code);\n throw new QueryException(\"Could not get resource group(s). HTTP: \".\n $result->info->http_code);\n }\n\n\n // decode the JSON, take only the \"value\" array\n $azure_groups = $result->decode_response()->value;\n\n // make shure we don't have an empty list returned from API\n if (count($azure_groups) == 0)\n {\n $error = \"Azure API: Could not find any matching resource group.\";\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // if parameter is empty string, just deliver all groups\n if ($rgn == '')\n return $azure_groups;\n\n // if not, determine which groups are wanted\n $wanted = explode(\" \", $rgn);\n $return_groups = array();\n\n // do we have duplicate entries ?\n // if so, present a warning and remove dupes\n if(count($wanted) > count(array_unique($wanted)))\n {\n Logger::warning(\"Azure API: there are duplicate entries in \".\n \"configured resource groups '\".$rgn.\n \"'. This might be a configuration error.\");\n $wanted = array_unique($wanted);\n }\n\n // search all azure resourceGroups and pick these configured\n // keep track which where found already\n foreach($azure_groups as $ag)\n if ((count($wanted) > 0) and (in_array($ag->name, $wanted)))\n {\n $return_groups[] = $ag;\n unset($wanted[array_search($ag->name, $wanted)]);\n }\n\n // check if things have gone wrong, i.e. $wanted not empty,\n // but result list is empty\n\n if (count($return_groups) == 0)\n {\n $error = sprintf(\n \"Azure API: Could not find matching resource group for '%s'.\",\n $rgn);\n Logger::error( $error );\n throw new ConfigurationError( $error );\n }\n\n // check if there is something left in $wanted\n // in that case, we did not find all configured resourceGroups\n // which is worth a warning.\n\n if (count($wanted)>0)\n Logger::warning(\n \"Azure API: could not find resource group(s) named '\".\n implode(\" \", $wanted).\"'. This might be a \".\n \"configuration error.\");\n\n return $return_groups;\n }", "title": "" }, { "docid": "b102f733699df2e7b54246e72a37e72b", "score": "0.6590903", "text": "public function getAll( $rgn )\n {\n // log individual log message as constant should be redefined\n // in subclasses\n\n Logger::info(static::MSG_LOG_GET_ALL);\n $rgs = $this->getResourceGroups( $rgn );\n\n Logger::debug( \"Azure API: found \". count( $rgs ). \" elements.\" );\n\n $objects = array();\n\n // walk through any resourceGroups\n foreach( $rgs as $group )\n {\n $objects = array_merge_recursive(\n $objects, $this->scanResourceGroup( $group )\n );\n }\n\n Logger::debug( \"Azure API: returning \". count( $objects ).\n \" elements.\" );\n\n return $objects;\n }", "title": "" }, { "docid": "ac3754da98546af817500f34554460b5", "score": "0.6492239", "text": "public function resources()\n {\n try {\n return $this->connection->get('/' . self::API_VERSION . '/resources');\n } catch (\\Exception $e) {\n return [\n 'error' => $e->getMessage()\n ];\n }\n }", "title": "" }, { "docid": "5f6ec26ca3936fd7600039256ecf585f", "score": "0.6246996", "text": "public function getResources($filter=null){\n $srv=$this->Resource();\n $fields=['ObjectId','ParentObjectId','Id','Name','Title','ResourceType'];\n $rr=new ReadResources($fields);\n if($filter!=null) $rr->setFilter($this->prepareFilter($filter));\n $res=self::O2A($srv->ReadResources($rr)->getResource(),$fields);\n return $res;\n }", "title": "" }, { "docid": "e460e6cca72d7364a25dbee6a0caab7a", "score": "0.61881566", "text": "public function getAllResources ()\r\n\t{\r\n\t\t$sql = $this->select()->from($this->t1, \"*\");\r\n\t\t\r\n\t\treturn $this->dbr()->fetchAll($sql);\r\n\t}", "title": "" }, { "docid": "253cc2d8c1d15016b039c63fb7e8cf7b", "score": "0.60844785", "text": "public function getResources()\n\t{\n\t\t$resources = [];\n\t\t$sql = 'SELECT * FROM '.$this->_options['resources'];\n\t\tforeach ($this->_db->fetchAll($sql, \\Phalcon\\Db::FETCH_ASSOC) as $row) {\n if ($row['name'] == '*') {\n continue;\n }\n\t\t\t$resources[] = new Resource($row['name'], $row['description']);\n\t\t}\n\n\t\treturn $resources;\n\t}", "title": "" }, { "docid": "709da32bb223b66c0ad77983d6ecef1a", "score": "0.58341885", "text": "public function getData() {\n $depth = !empty($this->_config['level']) ? $this->_config['level'] : 10;\n $ids = $this->getChildIds($this->_config['id'],$depth);\n $resourceArray = array();\n\n /* get all of the ids for processing */\n if ($this->_config['displayStart'] && $this->_config['id'] !== 0) {\n $ids[] = $this->_config['id'];\n }\n if (!empty($ids)) {\n $c = $this->modx->newQuery('modResource');\n $c->leftJoin('modResourceGroupResource','ResourceGroupResources');\n $c->query['distinct'] = 'DISTINCT';\n\n /* add the ignore hidden option to the where clause */\n if (!$this->_config['ignoreHidden']) {\n $c->where(array('hidemenu:=' => 0));\n }\n\n /* if set, limit results to specific resources */\n if (!empty($this->_config['includeDocs'])) {\n $c->where(array('modResource.id:IN' => explode(',',$this->_config['includeDocs'])));\n }\n\n /* add the exclude resources to the where clause */\n if (!empty($this->_config['contexts'])) {\n $c->where(array('modResource.context_key:IN' => explode(',',$this->_config['contexts'])));\n $c->sortby('context_key','DESC');\n }\n\n /* add the exclude resources to the where clause */\n if (!empty($this->_config['excludeDocs'])) {\n $c->where(array('modResource.id:NOT IN' => explode(',',$this->_config['excludeDocs'])));\n }\n \n /* add the limit to the query */\n if (!empty($this->_config['limit'])) {\n $offset = !empty($this->_config['offset']) ? $this->_config['offset'] : 0;\n $c->limit($this->_config['limit'], $offset);\n }\n\n /* JSON where ability */\n if (!empty($this->_config['where'])) {\n $where = $this->modx->fromJSON($this->_config['where']);\n if (!empty($where)) {\n $c->where($where);\n }\n }\n if (!empty($this->_config['templates'])) {\n $c->where(array(\n 'template:IN' => explode(',',$this->_config['templates']),\n ));\n }\n\n /* determine sorting */\n if (strtolower($this->_config['sortBy']) == 'random') {\n $c->sortby('rand()', '');\n } else {\n $c->sortby($this->_config['sortBy'],$this->_config['sortOrder']);\n }\n\n $c->where(array('modResource.id:IN' => $ids));\n if ($this->modx->user->hasSessionContext('mgr') && $this->modx->hasPermission('view_unpublished') && $this->_config['previewUnpublished']) {} else {\n $c->where(array('modResource.published:=' => 1));\n }\n $c->where(array('modResource.deleted:=' => 0));\n\n /* not sure why this groupby is here in the first place. removing for now as it causes\n * issues with the sortby clauses */\n //$c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));\n\n $c->select($this->modx->getSelectColumns('modResource','modResource'));\n $c->select(array(\n 'protected' => 'ResourceGroupResources.document_group',\n ));\n\n $result = $this->modx->getCollection('modResource', $c);\n\n\n $resourceArray = array();\n $level = 1;\n $prevParent = -1;\n /* setup start level for determining each items level */\n if ($this->_config['id'] == 0) {\n $startLevel = 0;\n } else {\n $activeContext = $this->modx->context->get('key');\n $contexts = !empty($this->_config['contexts']) ? explode(',',$this->_config['contexts']) : array();\n /* switching ctx, as this startId may not be in current Context */\n if (!empty($this->_config['startIdContext'])) {\n $this->modx->switchContext($this->_config['startIdContext']);\n $startLevel = count($this->modx->getParentIds($this->_config['id']));\n $this->modx->switchContext($activeContext);\n\n /* attempt to auto-find startId context if &contexts param only has one context */\n } else if (!empty($contexts) && !empty($contexts[0]) && $contexts[0] != $activeContext) {\n $this->modx->switchContext($contexts[0]);\n $startLevel = count($this->modx->getParentIds($this->_config['id']));\n $this->modx->switchContext($activeContext);\n\n } else {\n $startLevel = count($this->modx->getParentIds($this->_config['id']));\n }\n }\n $resultIds = array();\n\n $activeContext = $this->modx->context->get('key');\n $currentContext = $activeContext;\n $switchedContext = false;\n /** @var modResource $doc */\n foreach ($result as $doc) {\n $docContextKey = $doc->get('context_key');\n if (!empty($docContextKey) && $docContextKey != $currentContext) {\n $this->modx->switchContext($docContextKey);\n $switchedContext = true;\n $currentContext = $doc->get('context_key');\n }\n\t\t if ((!empty($this->_config['permissions'])) && (!$doc->checkPolicy($this->_config['permissions']))) continue;\n $tempDocInfo = $doc->toArray();\n $resultIds[] = $tempDocInfo['id'];\n $tempDocInfo['content'] = $tempDocInfo['class_key'] == 'modWebLink' ? $tempDocInfo['content'] : '';\n /* create the link */\n $linkScheme = $this->_config['fullLink'] ? 'full' : $this->modx->getOption('link_tag_scheme',null,'');\n if (!empty($this->_config['scheme'])) $linkScheme = $this->_config['scheme'];\n\n if ($this->_config['useWeblinkUrl'] !== 'false' && $tempDocInfo['class_key'] == 'modWebLink') {\n if (is_numeric($tempDocInfo['content'])) {\n $tempDocInfo['link'] = $this->modx->makeUrl(intval($tempDocInfo['content']),'','',$linkScheme);\n } else {\n $tempDocInfo['link'] = $tempDocInfo['content'];\n }\n } elseif ($tempDocInfo['id'] == $this->modx->getOption('site_start')) {\n $tempDocInfo['link'] = $this->modx->getOption('site_url');\n } else {\n $tempDocInfo['link'] = $this->modx->makeUrl($tempDocInfo['id'],'','',$linkScheme);\n }\n /* determine the level, if parent has changed */\n if ($prevParent !== $tempDocInfo['parent']) {\n $level = count($this->modx->getParentIds($tempDocInfo['id'])) - $startLevel;\n }\n /* add parent to hasChildren array for later processing */\n if (($level > 1 || $this->_config['displayStart']) && !in_array($tempDocInfo['parent'],$this->hasChildren)) {\n $this->hasChildren[] = $tempDocInfo['parent'];\n }\n /* set the level */\n $tempDocInfo['level'] = $level;\n $prevParent = $tempDocInfo['parent'];\n /* determine other output options */\n $useTextField = (empty($tempDocInfo[$this->_config['textOfLinks']])) ? 'pagetitle' : $this->_config['textOfLinks'];\n $tempDocInfo['linktext'] = $tempDocInfo[$useTextField];\n $tempDocInfo['title'] = $tempDocInfo[$this->_config['titleOfLinks']];\n $tempDocInfo['protected'] = !empty($tempDocInfo['protected']);\n if (!empty($this->tvList)) {\n $tempResults[] = $tempDocInfo;\n } else {\n $resourceArray[$tempDocInfo['level']][$tempDocInfo['parent']][] = $tempDocInfo;\n }\n }\n /* process the tvs */\n if (!empty($this->tvList) && !empty($resultIds)) {\n $tvValues = array();\n /* loop through all tvs and get their values for each resource */\n foreach ($this->tvList as $tvName) {\n $tvValues = array_merge_recursive($this->appendTV($tvName,$resultIds),$tvValues);\n }\n /* loop through the document array and add the tvarpublic ues to each resource */\n foreach ($tempResults as $tempDocInfo) {\n if (array_key_exists(\"#{$tempDocInfo['id']}\",$tvValues)) {\n foreach ($tvValues[\"#{$tempDocInfo['id']}\"] as $tvName => $tvValue) {\n $tempDocInfo[$tvName] = $tvValue;\n }\n }\n $resourceArray[$tempDocInfo['level']][$tempDocInfo['parent']][] = $tempDocInfo;\n }\n }\n if (!empty($switchedContext)) {\n $this->modx->switchContext($activeContext);\n }\n }\n return $resourceArray;\n }", "title": "" }, { "docid": "833c666706b90352e2a4e7681aa72555", "score": "0.5786808", "text": "public function findResourcesByAccessGroupIds(ResourceFilter $filter, array $accessGroupIds): array;", "title": "" }, { "docid": "82015d66cd8aec117bf711fd19054658", "score": "0.57740754", "text": "public function getResourceList()\n {\n return $this->resourceList;\n }", "title": "" }, { "docid": "8776303a39a28b5959bb7ccb799f362a", "score": "0.57553947", "text": "public function getResourceList ()\r\n\t{\r\n\t\t$sql = $this->select()\r\n\t\t\t->from($this->t1, array(\"{$this->t1}.*\", \"group_concat({$this->t2}.name) as role\"))\r\n\t\t\t->join($this->rsh, \"{$this->t1}.id = {$this->rsh}.resource_id\", null)\r\n\t\t\t->join($this->t2, \"{$this->t2}.id = {$this->rsh}.role_id\", null)\r\n\t\t\t->group(\"{$this->t1}.id\");\r\n\t\t\r\n\t\treturn $this->dbr()->fetchAll($sql);\r\n\t}", "title": "" }, { "docid": "7df5491fbb664c953c7e5dff4627f1cc", "score": "0.5737396", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return new ResourceCollection($resources);\n }", "title": "" }, { "docid": "2279763d009e6209c42fe9aa5cfa9ad2", "score": "0.573299", "text": "public function getAll(Query $query = null): ResourceArray\n {\n return $this->getResource([\n '{resourceId}' => '',\n ], $query);\n }", "title": "" }, { "docid": "f519982b82c487bebe8054dafd7be9ca", "score": "0.5635762", "text": "protected function getVirtualMachines($group)\n {\n $resource_group = $group->name;\n\n Logger::info(\n \"Azure API: querying virtual machines from resource group '\".\n $resource_group.\"'\");\n\n $retval = array();\n\n $call =\n 'subscriptions/'. $this->subscription_id.\n '/resourceGroups/'. $resource_group.\n '/providers/Microsoft.Compute/virtualMachines';\n\n while( $call != NULL ) // iterate over all pages\n {\n Logger::debug( \"Azure API: calling \".$call );\n\n $result = $this->call_get($call, \"2018-06-01\" );\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying virtual machines\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get virtual machines for resource \".\n \"group '%s'. HTTP: %d\",\n $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n $temp = $result->decode_response();\n\n $retval = $retval + $temp->value;\n\n if (property_exists( $temp, 'nextLink'))\n {\n $call = $temp->nextLink;\n Logger::info(\"Azure API: querying next page virtual machines\");\n }\n else\n {\n $call = NULL;\n };\n }\n\n Logger::info(\n \"Azure API: got \". count($retval). \" virtual machines for \".\n \"resource group '\". $resource_group. \"'\"\n );\n return $retval;\n }", "title": "" }, { "docid": "4ff0b8ebf06aaeb284ef4e09b7268911", "score": "0.5627973", "text": "protected function getContainerRegistries($group)\n {\n $resource_group = $group->name;\n\n Logger::info( \"Azure API: querying Container Registries from \".\n \"resource group '\".$resource_group.\"'\");\n\n $result = $this->call_get(\n 'subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/providers/Microsoft.ContainerRegistry/registries',\n \"2017-10-01\"\n );\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError(\n $result->error,\n \"querying Microsoft.ContainerRegistry\"\n );\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get Microsoft.ContainerRegistry for \".\n \"resource group '%s'. HTTP: %d\",\n $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "22b2c29d7c8340ca73f45d5977a925ba", "score": "0.5627615", "text": "protected function getSubscriptions( )\n {\n Logger::info(\"Azure API: querying all subscriptions available\");\n\n $result = $this->call_get('subscriptions', \"2014-04-01\");\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying subscriptions\");\n\n if ($result->info->http_code != 200)\n {\n Logger::error(\"Azure API: Could not get subscription(s). HTTP: \".\n $result->info->http_code);\n throw new QueryException(\"Could not get subscription(s). HTTP: \".\n $result->info->http_code);\n }\n\n\n // decode the JSON, take only the \"value\" array\n $azure_subs = $result->decode_response()->value;\n\n // make shure we don't have an empty list returned from API\n if (count($azure_subs) == 0)\n {\n $error = \"Azure API: Could not find any subscriptions.\";\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n Logger::info(\"Azure API: found \".count($azure_subs).\" subscriptions\");\n\n return $azure_subs;\n }", "title": "" }, { "docid": "040f15f93b0b7bb79d5664e9bdc0db3e", "score": "0.56260127", "text": "public static function listResources()\n {\n $registeredResources = self::listRegisteredResources();\n $dbResources = self::all()->keyBy('endpoint')->all();\n $resources = $registeredResources + $dbResources;\n ksort($resources);\n\n return $resources;\n }", "title": "" }, { "docid": "398b4aafe3f3c76782320d8bdd088882", "score": "0.5583322", "text": "public function getResources() {\n \t$resourceList = new phpkit_CombinedList('osid_resource_ResourceList');\n \t$resourceList->addList($this->getPersonResources());\n \t$resourceList->addList($this->getCampusResources());\n \t$resourceList->addList($this->getBuildingResources());\n \t$resourceList->addList($this->getRoomResources());\n \treturn $resourceList;\n }", "title": "" }, { "docid": "eb42d82ed1d49060ab6e0c74f4da0006", "score": "0.55475885", "text": "public function listResourceRecordSets($zoneId, $type = '', $name = '', $maxItems = 100) {\n\t\t// we'll strip off the leading forward slash, so we can use it as the action directly.\n\t\t$zoneId = trim($zoneId, '/');\n\n\t\t$rest = new Route53Request($this, $zoneId.'/rrset', 'GET');\n\n\t\tif(strlen($type) > 0) {\n\t\t\t$rest->setParameter('type', $type);\n\t\t}\n\t\tif(strlen($name) > 0) {\n\t\t\t$rest->setParameter('name', $name);\n\t\t}\n\t\tif($maxItems != 100) {\n\t\t\t$rest->setParameter('maxitems', $maxItems);\n\t\t}\n\n\t\t$rest = $rest->getResponse();\n\t\tif($rest->error === false && $rest->code !== 200) {\n\t\t\t$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');\n\t\t}\n\t\tif($rest->error !== false) {\n\t\t\t$this->__triggerError('listResourceRecordSets', $rest->error);\n\t\t\treturn false;\n\t\t}\n\n\t\t$response = array();\n\t\tif (!isset($rest->body))\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\n\t\t$recordSets = array();\n\t\tforeach($rest->body->ResourceRecordSets->ResourceRecordSet as $set) {\n\t\t\t$recordSets[] = $this->parseResourceRecordSet($set);\n\t\t}\n\n\t\t$response['ResourceRecordSets'] = $recordSets;\n\n\t\tif(isset($rest->body->MaxItems)) {\n\t\t\t$response['MaxItems'] = (string)$rest->body->MaxItems;\n\t\t}\n\n\t\tif(isset($rest->body->IsTruncated)) {\n\t\t\t$response['IsTruncated'] = (string)$rest->body->IsTruncated;\n\t\t\tif($response['IsTruncated'] == 'true') {\n\t\t\t\t$response['NextRecordName'] = (string)$rest->body->NextRecordName;\n\t\t\t\t$response['NextRecordType'] = (string)$rest->body->NextRecordType;\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "5fa181067c9398ff89cbc24cf3783857", "score": "0.55436987", "text": "protected function getNetworkInterfaces($group)\n {\n $resource_group = $group->name;\n\n Logger::info(\n \"Azure API: retrieving network interfaces from resource group '\".\n $resource_group.\"'\");\n\n $result = $this->call_get(\n 'subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/providers/Microsoft.Network/networkInterfaces',\n \"2018-07-01\"\n );\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying network interfaces\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get network interfaces for resource \".\n \"group '%s'. HTTP: %d\",\n $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "babd4c7a1803d5aa07ccf2a3ae583359", "score": "0.5529597", "text": "public function getAllAclResources() {\n\t\t$dbAdapter = $this->tableGateway->getAdapter();\n\t\t$sql = new Sql($dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from(array(\"m\" => \"acl_modules\"))\n \t\t->columns(array(\"module_id\" => \"id\", \"module_name\" => \"name\"))\n\t\t\t->join(array(\"c\" => \"acl_controllers\"), \"m.id=c.module_id\", array(\"controller_id\"=>\"id\", \"controller_name\"=>\"name\"),\"left\")\n\t\t\t->join(array(\"a\" => \"acl_actions\"), \"c.id=a.controller_id\", array(\"action_id\"=>\"id\", \"action_name\"=>\"name\"),\"left\");\r\n\t\t$statement = $sql->prepareStatementForSqlObject($select);\r\n\t\t$results = $statement->execute();\n\t\t$returnArray = array();\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$returnArray[] = $result;\r\n\t\t}\n\t\treturn $returnArray;\r\n\t}", "title": "" }, { "docid": "71a36a374bbd72642c5b55bca2930eca", "score": "0.55007946", "text": "private function get_all_resource($resource, $key = 'name')\n {\n $resource_list = [];\n $next = self::BASE_URL . sprintf('%s/', $resource);\n do {\n $resource_data = $this->request($next);\n if ($resource_data['code'] === self::STATUS_CODE_OK && !empty($resource_data['data'])) {\n $results = $resource_data['data']->results;\n $next = $resource_data['data']->next;\n foreach($results as $result) {\n $resource_list[$result->{$key}] = $result;\n }\n }\n } while($next !== null && $resource_data['code'] === self::STATUS_CODE_OK);\n return [\n 'code' => $resource_data['code'],\n 'error' => $resource_data['error'],\n 'data' => $resource_list\n ];\n }", "title": "" }, { "docid": "411946df12f2cb19022b48abcc5dcfc8", "score": "0.54911876", "text": "protected function scanResourceGroup($group)\n {\n // log if there are resource groups with surprising provisioning state\n if ($group->properties->provisioningState != \"Succeeded\")\n {\n Logger::info(\"Azure API: Resoure group \".$group->name.\n \" invalid provisioning state.\");\n }\n\n // get data needed\n $virtual_machines = $this->getVirtualMachines($group);\n $network_interfaces = $this->getNetworkInterfaces($group);\n $public_ip = $this->getPublicIpAddresses($group);\n\n $objects = array();\n\n foreach($virtual_machines as $current)\n {\n // get Virtual Machine Run Time State\n $runtimestate = $this->getVirtualMachineRunTimeState($current);\n\n // get metric definitions list\n $metrics = $this->getMetricDefinitionsList($current->id);\n\n $object = (object) [\n 'name' => $current->name,\n 'subscriptionId' => $this->subscription_id,\n 'id' => $current->id,\n 'location' => $current->location,\n 'type' => $current->type,\n 'osType' => (\n property_exists(\n $current->properties->storageProfile->osDisk,\n 'osType') ?\n $current->properties->storageProfile->osDisk->osType : \"\"\n ),\n 'osDiskName' => (\n property_exists(\n $current->properties->storageProfile->osDisk, 'name' ) ?\n $current->properties->storageProfile->osDisk->name : \"\"\n ),\n 'dataDisks' => count(\n $current->properties->storageProfile->dataDisks\n ),\n 'privateIP' => NULL,\n 'network_interfaces_count' => 0,\n 'publicIP' => NULL,\n 'cores' => NULL,\n 'resourceDiskSizeInMB' => NULL,\n 'memoryInMB' => NULL,\n 'maxdataDiscCount' => NULL,\n 'provisioningState'=> $current->properties->provisioningState,\n 'metricDefinitions'=> $metrics,\n 'tags' => (\n property_exists($current, 'tags') ? $current->tags : \"\"),\n 'state' => $runtimestate,\n ];\n\n // scan network interfaces and find the ones belonging to\n // the current vm\n\n foreach($network_interfaces as $interf)\n {\n // In Azure, a network interface may not have a VM attached :-(\n // and make shure, we match the current vm\n if (\n property_exists($interf->properties, 'virtualMachine') and\n property_exists($interf->properties->virtualMachine, 'id') and\n $interf->properties->virtualMachine->id == $current->id )\n {\n $object->network_interfaces_count++;\n\n $object->privateIP =\n $interf->properties->\n ipConfigurations[0]->properties->\n privateIPAddress;\n // check, if this interface has got a public IP address\n if (property_exists(\n $interf->properties->ipConfigurations[0]->properties,\n 'publicIPAddress'))\n {\n foreach($public_ip as $pubip)\n {\n if ((\n $interf->properties->ipConfigurations[0]->\n properties->publicIPAddress->id ==\n $pubip->id\n ) and (\n property_exists(\n $pubip->properties,'ipAddress'\n )\n ))\n {\n $object->publicIP =\n $pubip->properties->ipAddress;\n }\n }\n if ($object->publicIP == NULL) {\n Logger::info( \"Azure API: Public IP for \\'\".\n $interf->id.\n \"\\' not found.\" );\n }\n }\n }\n else\n {\n Logger::info( \"Azure API: Network interface \\'\".\n $interf->id.\n \"\\' without configured VM id.\" );\n }\n } // end foreach network interfaces\n\n // get the sizing done\n $vmsize = $this->getVirtualMachineSizing($current);\n\n if ($vmsize != NULL)\n {\n $object->cores = $vmsize->numberOfCores;\n $object->resourceDiskSizeInMB = $vmsize->resourceDiskSizeInMB;\n $object->memoryInMB = $vmsize->memoryInMB;\n $object->maxDataDiscCount = $vmsize->maxDataDiskCount;\n }\n\n // add this VM to the list.\n $objects[] = $object;\n }\n\n return $objects;\n }", "title": "" }, { "docid": "576c1e0266bd595a3f34b726c157863a", "score": "0.5485095", "text": "public function testGetResources() {\n $perPage = 3;\n $response = $this->resources->getResources(\n Configuration::$authorization,\n $page = 1,\n $perPage);\n\n // Was it fetched?\n $this->assertInstanceOf('GonebusyLib\\Models\\GetResourcesResponse', $response);\n\n // Did it return an array of 3 resources?\n $this->assertCount($perPage, $response->resources);\n foreach($response->resources as $resource) {\n $this->assertInstanceOf('GonebusyLib\\Models\\EntitiesResourceResponse', $resource);\n }\n }", "title": "" }, { "docid": "8b3ed1ce42ed2453575fc65ce13e3948", "score": "0.5460143", "text": "public function get_all_by_resource($resource_id)\r\n {\r\n return parent::get_all_by('resource_id', $resource_id);\r\n }", "title": "" }, { "docid": "cf1fd8b945a77cfad7361109bad114c5", "score": "0.54585266", "text": "public function getAllResources()\n\t{\n\t\t$resourceService = new ResourcesServices();\n\t\t$resources = $resourceService->getAllResources();\n\t\t$result = array();\n\t\t\n\t\tforeach ($resources as $res){\n\t\t\t$result[$res['id']] = $res['app'] . \" - \" . $res['name_menu'];\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c13ddfda59cfb8aa08eb9de226713d0e", "score": "0.54421514", "text": "protected function getLoadBalancers($group)\n {\n $resource_group = $group->name;\n\n Logger::info(\"Azure API: querying load balancers from resource group '\".\n $resource_group.\"'\");\n\n $result = $this->call_get('subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/providers/Microsoft.Network/loadBalancers',\n \"2018-07-01\");\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying load balancers\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get load balancers for resource group \".\n \"'%s'. HTTP: %d\", $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "f694017ad36976e8769f6fe8684a697f", "score": "0.5437087", "text": "public function getResources()\n {\n $resources = [];\n $module = $this->module;\n $model = Pi::model('category', $module);\n $rowset = $model->select([]);\n foreach ($rowset as $row) {\n $name = 'category-' . $row->name;\n $title = ucwords('category ' . $row->title);\n $resources[$name] = $title;\n }\n\n return $resources;\n }", "title": "" }, { "docid": "3fddfd9727a903560e69b898ea6b571b", "score": "0.54275554", "text": "public function getList( $filter = array() )\n {\n $items = array();\n\n while ( true )\n {\n $response = $this->get( $filter );\n $items = array_merge( $items, $response->items );\n if ( ! isset( $response->nextPageToken ) )\n break;\n $token = $response->nextPageToken;\n if ( ! $token )\n break;\n $filter['pageToken'] = $token;\n }\n\n $resources = array();\n $resource_class = $this->getType();\n\n foreach ( $items as $item )\n {\n $resource = new $resource_class();\n $resource->set( $item );\n $resources[] = $resource;\n }\n\n return $resources;\n }", "title": "" }, { "docid": "4cecc7aafbf36bfab0121765639cc931", "score": "0.54215187", "text": "public function getAclResources() : array;", "title": "" }, { "docid": "ba9d2ac73a1ea81d67ce19f2abf8797b", "score": "0.54015976", "text": "public function resources($type) {\n\t\t$res = $this->client->get($type);\n\n\t\tif ($res->getStatusCode() !== 200) {\n\t\t\tthrow new CachetException('Invalid response code!');\n\t\t}\n\n\t\t$json = $this->json($res);\n\n\t\t// TODO pagination, possibly collections?\n\n\t\treturn $json->data;\n\t}", "title": "" }, { "docid": "4497b9666b7d16c30a5520aed58a0df4", "score": "0.5366588", "text": "public function getAll()\n {\n $model = new static::$model;\n\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }", "title": "" }, { "docid": "1e348baa89063954f96133b6198a919e", "score": "0.53475827", "text": "public function getResources()\n {\n return $this->resources;\n }", "title": "" }, { "docid": "1e348baa89063954f96133b6198a919e", "score": "0.53475827", "text": "public function getResources()\n {\n return $this->resources;\n }", "title": "" }, { "docid": "1e348baa89063954f96133b6198a919e", "score": "0.53475827", "text": "public function getResources()\n {\n return $this->resources;\n }", "title": "" }, { "docid": "5fa3c8fcab707da68c89e6fd37bf80ca", "score": "0.5346339", "text": "public function getResources()\n {\n $this->loadRegisteredResources();\n return $this->resources;\n }", "title": "" }, { "docid": "c517fdb7187c309f07eccbdf09ca2da8", "score": "0.5340708", "text": "public function resources()\n {\n return [];\n }", "title": "" }, { "docid": "bf47d8573ebc6a39532fa6642916a8c4", "score": "0.5329403", "text": "public function fetchResources($module_id)\n { \n $table = $this->getTable();\n $select = $table->select()->where('module_id =' . (int) $module_id); \n return $this->fetchAll($select)->toArray();\n }", "title": "" }, { "docid": "219c4f3201e7903ebca5ddbbaca85ce9", "score": "0.5329338", "text": "public function getResources()\n\t{\n\t\treturn $this->resources;\n\t}", "title": "" }, { "docid": "9a1b055dd5ada9b33a2622f8c3399ef6", "score": "0.5321295", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM am_api_subscription';\n\t\t$SqlQuery2 = new SqlQuery2($sql);\n\t\treturn $this->getList($SqlQuery2);\n\t}", "title": "" }, { "docid": "8f1488ad0b9976b5ff8205e2d3462e55", "score": "0.52972937", "text": "public function getResourcesAttribute()\n {\n $array = [];\n foreach(config('group.resources') as $resource) {\n $array[$resource] = $this->$resource;\n }\n return collect($array);\n }", "title": "" }, { "docid": "ccffa5657082b591ead1a11597e90807", "score": "0.52730775", "text": "public function getResources(): array;", "title": "" }, { "docid": "5418d4e57d28501e867188d403c7c8ad", "score": "0.52632004", "text": "protected function getDisks($group)\n {\n $resource_group = $group->name;\n\n Logger::info(\"Azure API: querying disks from resource group '\".\n $resource_group.\"'\");\n\n $result = $this->call_get('subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/providers/Microsoft.Compute/disks',\n \"2017-03-30\");\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying disks\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get disks for resource group '%s'. \".\n \"HTTP: %d\", $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "6aa11f33e7d0e575cfc3be0eab9262e3", "score": "0.5240022", "text": "public function listByResourceGroupAsync($resourceGroupName, array $filter, $top = null, $skip = null, $expand = null, $select = null, $orderby = null, $count = null, $search = null, $format = null, array $customHeaders = [])\n {\n if ($resourceGroupName == null) {\n Validate::notNullOrEmpty($resourceGroupName, '$resourceGroupName');\n }\n if ($this->_client->getApiVersion() == null) {\n Validate::notNullOrEmpty($this->_client->getApiVersion(), '$this->_client->getApiVersion()');\n }\n if ($this->_client->getSubscriptionId() == null) {\n Validate::notNullOrEmpty($this->_client->getSubscriptionId(), '$this->_client->getSubscriptionId()');\n }\n\n $path = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts';\n $statusCodes = [200];\n $method = 'GET';\n\n $path = strtr($path, ['{resourceGroupName}' => $resourceGroupName, '{subscriptionId}' => $this->_client->getSubscriptionId()]);\n $queryParams = ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$expand' => $expand, '$select' => $select, '$orderby' => $orderby, '$count' => $count, '$search' => $search, '$format' => $format, 'api-version' => $this->_client->getApiVersion()];\n $headers = $customHeaders;\n if ($this->_client->getAcceptLanguage() != null) {\n $headers['accept-language'] = $this->_client->getAcceptLanguage();\n }\n if ($this->_client->getGenerateClientRequestId()) {\n $headers[Resources::X_MS_REQUEST_ID] = Utilities::getGuid();\n }\n\n $body = '';\n\n $response = HttpClient::send(\n $method,\n $headers,\n $queryParams,\n [],\n $this->_client->getUrl($path),\n $statusCodes,\n $body,\n $this->_client->getFilters()\n );\n\n return $response;\n }", "title": "" }, { "docid": "84d71dd87eae7509f454033ad94c340c", "score": "0.5232827", "text": "public function getTagsByResourceId(string $resourceId): array;", "title": "" }, { "docid": "d00c62169aa1895379be2517df7ccb4f", "score": "0.52324086", "text": "public function read_requested_resources(){\r\n //session username and page title\r\n $data['page_title']=\"READ RESOURCES\";\r\n $data['username'] = $this->setSessionData();\r\n $data['entity_type']=6; //6 is a flag for REQUESTED RESOURCE entity\r\n $data['requested_resources']=$this->crud_model_requested_resource->extractAllResources();\r\n\r\n $pagination_config = config_pagination(10,\"resource_requested_player\");//SEE pagination_config_helper HELPER for config_pagination($results_per_page) method\r\n\r\n $this->pagination->initialize($pagination_config);\r\n $data['links']=$this->pagination->create_links();\r\n\r\n $this->loadEntityDetails($data);\r\n\r\n }", "title": "" }, { "docid": "8e8d1ccac2b1c1599bc026410d42c75b", "score": "0.521909", "text": "function getResources(){\r\n\t\treturn $resources;\r\n\t}", "title": "" }, { "docid": "2f36a5d65a8cb3daa08bb8df5f1d006b", "score": "0.5218446", "text": "public function getAclResources ()\r\n\t{\r\n\t\t$sql = $this->select()\r\n\t\t\t->from($this->t1, array(\"{$this->t1}.name as resource\", \"{$this->t2}.id as role\"))\r\n\t\t\t->join($this->rsh, \"{$this->t1}.id = {$this->rsh}.resource_id\", null)\r\n\t\t\t->join($this->t2, \"{$this->t2}.id = {$this->rsh}.role_id\", null);\r\n\t\t\r\n\t\treturn $this->dbr()->fetchAll($sql);\r\n\t}", "title": "" }, { "docid": "43fffd95ebbce19d83a389c165581fa4", "score": "0.5215554", "text": "public function getResourcesForAll()\n {\n return $this->repository->resourcesForAll();\n }", "title": "" }, { "docid": "545d578cfa6fa270bdbae94c0cc8edc2", "score": "0.52140456", "text": "public function groupResourcePermissions()\n {\n return $this->hasMany(GroupResourcePermission::class)->where('active',1);\n }", "title": "" }, { "docid": "8c9d4810103d10f42fad3133424d01a7", "score": "0.5213586", "text": "protected function getAllContainerRegistries()\n {\n Logger::info( \"Azure API: querying all Container Registries\");\n\n $result = $this->call_get(\n 'subscriptions/'.\n $this->subscription_id.\n '/providers/Microsoft.ContainerRegistry/registries',\n \"2017-10-01\"\n );\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError(\n $result->error,\n \"querying Microsoft.ContainerRegistry\"\n );\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get Microsoft.ContainerRegistry: \".\n \"HTTP: %d\", $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "3927241c0d4aa3601dd9829184f624fe", "score": "0.5208505", "text": "public static function get_available_app_interface_compute_resources($id)\n{\n $airavataclient = Session::get(\"airavataClient\");\n $computeResources = null;\n\n try\n {\n $computeResources = $airavataclient->getAvailableAppInterfaceComputeResources($id);\n }\n catch (InvalidRequestException $ire)\n {\n Utilities::print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');\n }\n catch (AiravataClientException $ace)\n {\n Utilities::print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata Client Exception: ' . $ace->getMessage() . '</p>');\n }\n catch (AiravataSystemException $ase)\n {\n Utilities::print_error_message('<p>There was a problem getting compute resources.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');\n }\n\n return $computeResources;\n}", "title": "" }, { "docid": "80622e1594dffcac4ae50b2a8358cde3", "score": "0.5205843", "text": "public function resourcesForAll()\n {\n $query = $this\n ->getEntityManager()\n ->createQueryBuilder()\n\n ->select('player.avatarName as resource')\n ->from('UserBundle:Player', 'player')\n\n ->where('player.avatarName IS NOT NULL')\n ;\n\n $results = $query\n ->getQuery()\n ->getResult()\n ;\n\n $data = [];\n foreach ($results as $result) {\n $data[] = $result['resource'];\n }\n\n return $data;\n }", "title": "" }, { "docid": "a7a30b4d20c11b2703d43a02f1c3a1ae", "score": "0.5199463", "text": "public function acl_resource_collection(array $order_by=null, $offset=null, $limit=null) {\n return $this->_preload_many_to_many(\n 'acl_resource_collection',\n 'Neoform\\Acl\\Role\\Resource',\n 'by_acl_role',\n 'Neoform\\Acl\\Resource',\n $order_by,\n $offset,\n $limit\n );\n }", "title": "" }, { "docid": "438713e014e2423e772b3323efd88f08", "score": "0.5183182", "text": "public function getSubresources(): array\n {\n return $this->subresources;\n }", "title": "" }, { "docid": "978772d1b93154972eef6da206daa639", "score": "0.51783043", "text": "function getResourcesByName($a_sName)\n {\n $oResourceSelector = getResourceSelector();\n $oResourceSelector->setName($a_sName);\n $oResourceCollection = $this->read($oResourceSelector);\n return $oResourceCollection;\n\n }", "title": "" }, { "docid": "57bcee56d6a10d40f12dcada2b885d9f", "score": "0.5177981", "text": "public function getAll() {\n $api_url = \"http://localhost:8081/buku/gets\";\n $svcGet = curl_init();\n\n curl_setopt_array($svcGet, array(\n CURLOPT_URL => $api_url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'GET'\n ));\n\n $response = json_decode(curl_exec($svcGet));\n \n curl_close($svcGet);\n\n if (!is_null($response)) \n return $response;\n else\n show_404();\n }", "title": "" }, { "docid": "a68786425023a6fead6ba75ac5879c10", "score": "0.51660144", "text": "protected function getExpressRouteCircuits($group)\n {\n $resource_group = $group->name;\n\n Logger::info(\n \"Azure API: querying express route circuits from resource group '\".\n $resource_group.\"'\"\n );\n\n $result = $this->call_get(\n 'subscriptions/'.\n $this->subscription_id.\n '/resourceGroups/'.\n $resource_group.\n '/providers/Microsoft.Network/expressRouteCircuits',\n \"2018-08-01\"\n );\n\n // check if things have gone wrong\n if ($result->errno != CURLE_OK)\n $this->raiseCurlError( $result->error,\n \"querying express route circuits\");\n\n if ($result->info->http_code != 200)\n {\n $error = sprintf(\n \"Azure API: Could not get express route circuits for resource \".\n \"group '%s'. HTTP: %d\",\n $resource_group, $result->info->http_code\n );\n Logger::error( $error );\n throw new QueryException( $error );\n }\n\n // get result data from JSON into object $decoded\n return $result->decode_response()->value;\n }", "title": "" }, { "docid": "a2b899b658c87054a8a1a10e506a048a", "score": "0.51560354", "text": "public function index()\n {\n $iso = checkParam('iso');\n $limit = checkParam('limit') ?? 2000;\n $organization = checkParam('organization_id');\n $dialects = checkParam('include_dialects');\n\n $resources = Resource::with('translations', 'links', 'organization.translations', 'language')\n ->when($iso, function ($query) use ($iso, $dialects) {\n $query->whereHas('language', function ($subquery) use ($iso, $dialects) {\n if (!$dialects) {\n $subquery->where('iso', $iso);\n } else {\n $language = Language::with('dialects')->where('iso', $iso)->select('id')->get();\n $subquery->whereIn('id', $language->pluck('id'));\n }\n });\n })\n ->when($organization, function ($query) use ($organization) {\n $query->whereHas('organization', function ($subquery) use ($organization) {\n $subquery->where('id', $organization)->orWhere('slug', $organization);\n });\n })\n ->take($limit)->get();\n\n return $this->reply(fractal($resources, new ResourcesTransformer(), $this->serializer));\n }", "title": "" }, { "docid": "1759d9813f2dc851ca3bbb7d197f25cd", "score": "0.5148485", "text": "public function retrieveAllGroups();", "title": "" }, { "docid": "68bcded4ac8b8fcb021a7c0c4a736522", "score": "0.5139688", "text": "public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface\n {\n }", "title": "" }, { "docid": "b319eb671f262ca79e36cfa499e025f3", "score": "0.5134677", "text": "public function resources($options = [])\n {\n $url = $this->getBaseUrl();\n $resources = $this->request($url, $options);\n\n return $resources;\n }", "title": "" }, { "docid": "4fecba65f301cc8599aabc72d8822a12", "score": "0.5129158", "text": "public function index()\n {\n $groups = auth()->user()->groups;\n\n return GroupResource::collection($groups);\n }", "title": "" }, { "docid": "97c6b977e583d7954da64412f9b5e9c4", "score": "0.50883275", "text": "protected function getAPIResourcesRequest()\n {\n\n $resourcePath = '/apis/autoscaling/v1/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'],\n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\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('authorization');\n if ($apiKey !== null) {\n $headers['authorization'] = $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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "670fc7b3dc85f5326dc513440c559d36", "score": "0.50824577", "text": "private function get_resource_ids()\n {\n // Regex pattern to match only on word list entries\n $pattern = \"\\w \\bword list\\b\";\n $url = \"https://data.gov.au/api/3/action/package_show?id=fa0667b1-9e0d-4aef-baa1-e20357a769b6\";\n $response = file_get_contents($url);\n // Decode JSON object into an associative array\n $response_array = json_decode($response, true);\n $resource_ids = array();\n\n // Take each entry from the response, check if it's a word list and store the resource id if it is\n foreach($response_array as $entry) {\n $name = $entry->name;\n\n if (preg_match($pattern, $name)) {\n // Grab the name of the language\n $language = explode(' ', trim($entry->name))[0];\n array_push($resource_ids, array($language, $entry->id));\n }\n }\n\n return resource_ids;\n }", "title": "" }, { "docid": "2e9bf2e29cb70ba122528f677f8c6425", "score": "0.5078192", "text": "abstract protected function scanResourceGroup( $group );", "title": "" }, { "docid": "d2d5897d867e18a37f2fed944352130a", "score": "0.5070714", "text": "public function listResourceRecordSets($zoneId, $type = '', $name = '') {\n // we'll strip off the leading forward slash, so we can use it as the action directly.\n $zoneId = trim($zoneId, '/');\n\t\t$response = array();\n\t\t$recordSets = array();\n\t\twhile(1) {\n\t\t\t$rest = new util_amazon_r53Request($this, $zoneId . '/rrset', 'GET');\n\n\t\t\tif (strlen($type) > 0) {\n\t\t\t\t$rest->setParameter('type', $type);\n\t\t\t}\n\t\t\tif (strlen($name) > 0) {\n\t\t\t\t$rest->setParameter('name', $name);\n\t\t\t}\n\n\t\t\t$rest = $rest->getResponse();\n\t\t\tif ($rest->error === false && $rest->code !== 200) {\n\t\t\t\t$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');\n\t\t\t}\n\t\t\tif ($rest->error !== false) {\n\t\t\t\t$this->__triggerError('listResourceRecordSets', $rest->error);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!isset($rest->body)) {\n\t\t\t\treturn $response;\n\t\t\t}\n\n\t\t\tforeach ($rest->body->ResourceRecordSets->ResourceRecordSet as $set) {\n\t\t\t\t$recordSets[] = $this->parseResourceRecordSet($set);\n\t\t\t}\n\n\n\t\t\tif (isset($rest->body->MaxItems)) {\n\t\t\t\t$response['MaxItems'] = (string) $rest->body->MaxItems;\n\t\t\t}\n\n\t\t\tif (isset($rest->body->IsTruncated)) {\n\t\t\t\t$response['IsTruncated'] = (string) $rest->body->IsTruncated;\n\t\t\t\tif ($response['IsTruncated'] == 'true') {\n\t\t\t\t\t// There are more records. Set the $type and $name to indicate the start of the next recordset.\n\t\t\t\t\t$name = $response['NextRecordName'] = (string) $rest->body->NextRecordName;\n\t\t\t\t\t$type = $response['NextRecordType'] = (string) $rest->body->NextRecordType;\n\t\t\t\t} else {\n\t\t\t\t\t// The record set is complete. Don't loop anymore.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There was no truncate flag set at all. This should be set, but if not, don't continue looping.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$response['ResourceRecordSets'] = $recordSets;\n return $response;\n }", "title": "" }, { "docid": "02fd3da65494f182942752b659925a23", "score": "0.5067658", "text": "public function listResources($uri, array $query)\n {\n return $this->request('GET', $uri, $query);\n }", "title": "" }, { "docid": "24e739c7ab1662046671f0b5fd2bea65", "score": "0.5065426", "text": "public function get_all($resource, $params=NULL) {\n\n $arr = [];\n $res = $this->get($resource,$params,$this->headers);\n if ($res->getStatusCode() < 300) {\n $parts = explode('/',$res->getHeader('Content-Range')[0]);\n $size = (int) $parts[1];\n $parts0 = explode('-',$parts[0]);\n if (isset($parts0[1])) {\n $last = (int) $parts0[1];\n } else {\n $last = 0;\n }\n $arr = json_decode($res->getBody());\n $headers = $this->headers;\n $i = 0;\n while (($last+1) < $size) {\n $headers['Range'] = ($last + 1) . '-';\n $r = $this->get($resource,$params,$headers);\n $parts = explode('/',$r->getHeader('Content-Range')[0]);\n $parts0 = explode('-',$parts[0]);\n $last = $parts0[1];\n $arr = array_merge($arr,json_decode($r->getBody()));\n }\n return $arr;\n } else {\n return $arr;\n }\n }", "title": "" }, { "docid": "7c7ab82f4ac0b49d9d0133abb395c127", "score": "0.5063059", "text": "public function fetchResourceNamesRecursive($id)\n {\n $response = new Xend_Response();\n $validate = new Xend_Validate_Id();\n if (!$validate->isValid($id)) {\n $response->addStatus(new Xend_Acl_Status(Xend_Acl_Status::INPUT_PARAMS_INCORRECT, 'resource_id'));\n return $response;\n }\n\n $collection = array();\n foreach($this->_fetchRecursive($id) as $row) {\n $collection[] = $row['name'];\n }\n\n $response->rowset = $collection;\n $response->addStatus(new Xend_Acl_Status(Xend_Acl_Status::OK));\n return $response;\n }", "title": "" }, { "docid": "608ff88e0638c909dad542886b412d01", "score": "0.50326526", "text": "public function getResources($prefix = null){\n\t\tif($prefix != null){\n\t\t\tif(!is_array($prefix)){\n\t\t\t\t$prefix = array($prefix);\n\t\t\t}\n\t\t\treturn Aco::whereIn(\"prefix\", $prefix)->get();\n\t\t}\n\t\treturn Aco::all();\n\t}", "title": "" }, { "docid": "d0b5e79a5f8c0c43664dea2952e3d5bc", "score": "0.5030429", "text": "public static function getAll() {\n global $lC_Database, $lC_Language;\n\n $media = $_GET['media'];\n\n $Qgroups = $lC_Database->query('select id, title from :table_products_images_groups where language_id = :language_id order by title');\n $Qgroups->bindTable(':table_products_images_groups', TABLE_PRODUCTS_IMAGES_GROUPS);\n $Qgroups->bindInt(':language_id', $lC_Language->getID());\n $Qgroups->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);\n $Qgroups->execute();\n\n $result = array('aaData' => array());\n while ( $Qgroups->next() ) {\n $group_name = $Qgroups->value('title');\n if ( $Qgroups->valueInt('id') == DEFAULT_IMAGE_GROUP_ID ) {\n $group_name .= '<small class=\"tag purple-gradient glossy margin-left\">' . $lC_Language->get('default_entry') . '</small>';\n }\n $name = '<td>' . $group_name . '</td>';\n \n if (strtolower($group_name) != 'originals') {\n $action = '<td class=\"align-right vertical-center\">\n <span class=\"button-group\">\n <a href=\"' . ((int)($_SESSION['admin']['access']['product_settings'] < 3) ? '#' : 'javascript://\" onclick=\"editGroup(\\'' . $Qgroups->valueInt('id') . '\\')') . '\" class=\"button icon-pencil' . ((int)($_SESSION['admin']['access']['product_settings'] < 3) ? ' disabled' : NULL) . '\">' . (($media === 'mobile-portrait' || $media === 'mobile-landscape') ? NULL : $lC_Language->get('icon_edit')) . '</a>\n </span>\n <span class=\"button-group\">\n <a href=\"' . ((int)($_SESSION['admin']['access']['product_settings'] < 4 || $Qgroups->valueInt('id') == DEFAULT_IMAGE_GROUP_ID) ? '#' : 'javascript://\" onclick=\"deleteGroup(\\'' . $Qgroups->valueInt('id') . '\\', \\'' . urlencode($Qgroups->valueProtected('title')) . '\\')') . '\" class=\"button icon-trash with-tooltip' . ((int)($_SESSION['admin']['access']['product_settings'] < 4 || $Qgroups->valueInt('id') == DEFAULT_IMAGE_GROUP_ID) ? ' disabled' : NULL) . '\" title=\"' . $lC_Language->get('icon_delete') . '\"></a>\n </span>\n </td>';\n } else {\n $action = '<td></td>';\n }\n $result['aaData'][] = array(\"$name\", \"$action\");\n \n }\n\n $Qgroups->freeResult();\n\n return $result;\n }", "title": "" }, { "docid": "bbec8105a0b05ab1539d5238b242359c", "score": "0.5013703", "text": "public function getRestResources($rest_status = false)\n {\n $config = $this->getRestDrupalConfig();\n\n $resources = $this->pluginManagerRest->getDefinitions();\n\n $enabled_resources = array_combine(array_keys($config), array_keys($config));\n $available_resources = ['enabled' => [], 'disabled' => []];\n\n foreach ($resources as $id => $resource) {\n $status = in_array($id, $enabled_resources) ? 'enabled' : 'disabled';\n $available_resources[$status][$id] = $resource;\n }\n\n // Sort the list of resources by label.\n $sort_resources = function ($resource_a, $resource_b) {\n return strcmp($resource_a['label'], $resource_b['label']);\n };\n if (!empty($available_resources['enabled'])) {\n uasort($available_resources['enabled'], $sort_resources);\n }\n if (!empty($available_resources['disabled'])) {\n uasort($available_resources['disabled'], $sort_resources);\n }\n\n if (isset($available_resources[$rest_status])) {\n return [$rest_status => $available_resources[$rest_status]];\n }\n\n return $available_resources;\n }", "title": "" }, { "docid": "33a97d8b28752814bd7a452a8e5c9113", "score": "0.50003684", "text": "function getResourcesByDescription($a_sDescription)\n {\n $oResourceSelector = getResourceSelector();\n $oResourceSelector->setDescription($a_sDescription);\n $oResourceCollection = $this->read($oResourceSelector);\n return $oResourceCollection;\n\n }", "title": "" }, { "docid": "f95d63d65994832a2fdd319826526804", "score": "0.49998504", "text": "protected function getList() {\n\t\t$app = Api::getInstance();\n\t\t$input = $app->input;\n\n\t\t$data = new \\stdClass;\n\t\t$data->start = $input->get->get('start', 0, 'INT');\n\t\t$data->limit = $input->get->get('limit', 10, 'INT');\n\t\t$data->sort = $input->get->get('sort', 'created_time', 'STRING');\n\t\t$data->direction = $input->get->get('direction', 'desc', 'STRING');\n\t\t$data->isOn = $input->get->get('isOn', null, 'STRING');\n\n\t\tif ($data->limit < 1 || $data->limit > 100) {\n\t\t\tthrow new \\Exception('Limit exceeds allowed bounds. Should be between 1 and 100', 400);\n\t\t}\n\n\t\t// TODO return total as well\n\t\t// $data->total = $this->getTotal();\n\n\t\t$app->appendBody($data);\n\n\t\t//because we pass so many options to the load many function\n\t\treturn $this->loadMany($data);\n\t}", "title": "" }, { "docid": "47693a9929a48d12b490529b75e628f5", "score": "0.4997453", "text": "protected function requestCollection(Resource $resource)\n {\n $response = $this->prepareResponse();\n\n $where = $resource->where;\n $resource_query = $resource->query;\n\n /*\n * Filter query parameters\n */\n $filters = $this->resources[$resource->name]['filters']\n ?? $this->default_filters\n ?? [];\n if (is_string($filters)) {\n if ($filters === 'ALL') {\n $filters = $resource->model_class::getColumns();\n } else {\n $special = $resource->getSpecialFields();\n if (array_key_exists($filters, $special)) {\n $filters = $special[$filters];\n } else {\n $this->sendError(\n static::ERROR_INTERNAL_SERVER,\n \"Resource '$resource->name' has invalid filters group\"\n );\n }\n }\n }\n $operators = static::FITLER_OPERATORS;\n $operators_single = ['gt', 'ge', 'lt', 'le', 'rx'];\n foreach ($filters as $filter) {\n $q = $resource_query[$filter] ?? null;\n $pack = [];\n if (is_array($q)) {\n foreach ($q as $key => $value) {\n if (is_numeric($key)) {\n $pack[''][] = $value;\n } elseif (in_array($key, $operators_single)) {\n if (is_array($value)) {\n $this->sendError(\n static::ERROR_INVALID_QUERY_PARAMETER,\n \"Filter operator '$key' can not be array\"\n );\n }\n $pack[$key] = $value;\n } elseif (array_key_exists($key, $operators)) {\n $pack[$key] = (is_array($value))\n ? $value\n : explode(',', $value);\n\n if (in_array($key, ['bw', 'nw'])\n && count($pack[$key]) !== 2\n ) {\n $this->sendError(\n static::ERROR_INVALID_QUERY_PARAMETER,\n \"Filter operator '$key' needs two values\"\n );\n }\n } else {\n $this->sendError(\n static::ERROR_INVALID_QUERY_PARAMETER,\n \"Invalid filter operator '$key' in '$filter'\"\n );\n }\n }\n } elseif ($q !== null) {\n $pack[''] = explode(',', $q);\n }\n\n foreach ($pack as $key => $value) {\n if (is_array($value) && count($value) === 1) {\n $value = $value[0];\n }\n if (in_array($key, ['', 'ne']) && $value === 'NULL') {\n $value = null;\n }\n if ($key !== '') {\n $key = '[' . static::FITLER_OPERATORS[$key] . ']';\n }\n $where[$filter . $key] = $value;\n }\n }\n\n /*\n * Authorization filter\n */\n if ($resource->authorized !== null) {\n $where = (empty($where))\n ? $resource->authorized\n : [\n 'AND # Requested' => $where,\n 'AND # Authorized' => $resource->authorized,\n ];\n }\n\n /*\n * Sort query parameter\n */\n $sort = $resource_query['sort'] ?? '';\n if ($sort !== '') {\n $sort = explode(',', $sort);\n $order = [];\n foreach ($sort as $id => $value) {\n if (strpos($value, '-') === 0) {\n $sort[$id] = $value = substr($value, 1);\n if ($value === '') {\n unset($sort[$id]);\n continue;\n }\n $order[$value] = 'DESC';\n } elseif ($value === '') {\n unset($sort[$id]);\n continue;\n } else {\n $order[] = $value;\n }\n }\n if (!empty($order)) {\n $this->checkUnknownField($resource, $sort);\n $where['ORDER'] = $order;\n }\n }\n\n /*\n * Per page and page query parameters\n */\n $per_page = ($this->safe_method || isset($resource_query['page']))\n ? $this->per_page\n : 0;\n $per_page = $resource_query['per_page'] ?? $per_page;\n if ($per_page === 'all') {\n $per_page = 0;\n }\n if (!is_numeric($per_page) || $per_page < 0) {\n $this->sendError(\n static::ERROR_INVALID_QUERY_PARAMETER,\n \"Invalid 'per_page' parameter\"\n );\n } elseif ($per_page > 0) {\n $page = $resource_query['page'] ?? 1;\n if (!is_numeric($page) || $page < 1) {\n $this->sendError(\n static::ERROR_INVALID_QUERY_PARAMETER,\n \"Invalid 'page' parameter\"\n );\n }\n\n if ($this->safe_method) {\n $count = $this->countResource($resource->name, $where);\n $pages = ceil($count / $per_page);\n $routes = [];\n\n $tmp = $resource_query;\n $tmp['page'] = 1;\n $routes['first'] = http_build_query($tmp);\n if ($page > 1) {\n $tmp['page'] = $page - 1;\n $routes['previous'] = http_build_query($tmp);\n }\n if ($page < $pages) {\n $tmp['page'] = $page + 1;\n $routes['next'] = http_build_query($tmp);\n }\n $tmp['page'] = $pages;\n $routes['last'] = http_build_query($tmp);\n\n foreach ($routes as &$route) {\n $route = $resource->route . '?' . $route;\n }\n unset($route);\n\n $response->headers['Link'] = $this->headerLink($routes);\n $response->headers['X-Total-Count'] = $count;\n }\n\n $where['LIMIT'] = [($page - 1) * $per_page, $per_page];\n }\n\n $resource->where = $where;\n\n /*\n * Process request\n */\n if ($this->externalHandler($resource)) {\n return;\n }\n\n $fields = $this->parseFields($resource);\n $has_fields = ($resource->query['fields'] ?? '') !== '';\n $body = null;\n\n switch ($this->method) {\n case 'GET':\n case 'HEAD':\n $body = $resource->model_class::dump($where, $fields);\n break;\n\n case 'DELETE':\n $list = [];\n foreach ($resource->getIterator() as $id => $model) {\n $route = $resource->route . '/'\n . (strrpos($resource->route, '/') == 0\n ? $this->getPrimaryKey($model)\n : $id + 1);\n\n $this->deleteModel($model, $resource, $route);\n\n if ($model::SOFT_DELETE !== null) {\n $tmp = $model->getData();\n if (!empty($fields)) {\n $tmp = Utils::arrayWhitelist($tmp, $fields);\n } elseif ($has_fields) {\n continue;\n }\n $list[] = $tmp;\n }\n }\n if (!empty($list)) {\n $body = $list;\n }\n break;\n\n case 'PATCH':\n $body = [];\n foreach ($resource->getIterator() as $id => $model) {\n $route = $resource->route . '/'\n . (strrpos($resource->route, '/') == 0\n ? $this->getPrimaryKey($model)\n : $id + 1);\n\n $this->updateModel($model, $resource, $route);\n\n $tmp = $model->getData();\n if (!empty($fields)) {\n $tmp = Utils::arrayWhitelist($tmp, $fields);\n } elseif ($has_fields) {\n continue;\n }\n $body[] = $tmp;\n }\n break;\n\n case 'POST':\n $this->checkMissingFields($resource);\n\n $model = $this->createModel($resource);\n $location = $this->getContentLocation($model, $resource);\n\n $response->status = HttpResponse::HTTP_CREATED;\n $response->headers['Location'] = $location;\n break;\n\n case 'PUT':\n $this->sendError(\n static::ERROR_METHOD_NOT_ALLOWED,\n 'Collections do not allow PUT Method'\n );\n break;\n }\n\n if ($body !== null) {\n $response->headers['Content-Type'] = 'application/json';\n $response->body = $body;\n }\n\n return $response;\n }", "title": "" }, { "docid": "a7aa3c55a3c7ead55722f33fc74a2405", "score": "0.49916175", "text": "public function getResources();", "title": "" }, { "docid": "3229829c83af88f697af63175625f418", "score": "0.49825978", "text": "public function get_sub_resources()\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$args = func_get_args();\r\n\t\t\t$isStatic = !isset($this) || !is_a( $this, __CLASS__ );\r\n\t\t\t\r\n\t\t\tif ( $isStatic )\r\n\t\t\t\treturn call_user_func_array( array( 'LW_Resource', 'static_get_sub_resources' ), $args );\r\n\t\t\telse\t\t\t\t\r\n\t\t\t\treturn $this->static_get_sub_resources( $this, $args[0] );\r\n\t\t\r\n\t\t}", "title": "" }, { "docid": "eebcaa5492eb207e4f7b0028a584708b", "score": "0.49784943", "text": "public function index()\n {\n //\n return Resource::all();\n }", "title": "" }, { "docid": "7d3f9afef1a1686b3f4e597bfb5c9004", "score": "0.49670762", "text": "public function groupComponentResourcePermissions()\n {\n $resComponents = [];\n foreach($this->groupResourcePermissions as $item)\n {\n if ($item->resource_type_id == ResourceType::COMPONENT)\n $resComponents[] = $item;\n }\n return $resComponents;\n }", "title": "" }, { "docid": "5acae31f70c9c2cfad76fda1be293459", "score": "0.49662346", "text": "public function getAdGroups(){\r\n $this->startTimer();\r\n $url = $this->server_url . \"/admin/index.php\";\r\n $postdata = 'op=getadgroups';\r\n $buffer = $this->doPOST($url, $postdata);\r\n $collection = new Collection($buffer, \"entry\", \"AdgroupRecord\" , \"meta\");\r\n $this->stopTimer();\r\n if ($collection->getNumberOfRecords() > 0)\r\n {\r\n return $collection;\r\n }\r\n else\r\n {\r\n return $collection->getMetaRecord();\r\n }\r\n return NULL; \r\n }", "title": "" }, { "docid": "05b03e964452af543806b4c3caaff28e", "score": "0.49657294", "text": "public function getGroupList($platformID = \"\")\n {\n $url = '/group';\n $body = [\n 'pms_platformid' => $platformID,\n ];\n $body_string = http_build_query($body);\n $body_string = urldecode($body_string);\n $url = $url . \"?\" . $body_string;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->baseURL . $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization:\" . $this->token_type . \" \" . $this->getToken()));\n $response = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response, true) ?? array();\n if(empty($response) || $response['result'] == false){\n throw new \\RuntimeException(\"error_code:\" . $response['error_code'] . \"\\nmessage:\" . $response['error']);\n }\n $response = $response['data'];\n $data = array();\n foreach($response as $r){\n $data[] = [\n 'id' => $r['_id'],\n 'schedule' => $r['crontab_setting'],\n 'isScheduleOn' => $r['crontab'] === 'true' ? true : false,\n 'name' => $r['group_name'],\n 'district' => $r['district'],\n 'status' => $r['status'],\n 'exportCount' => $r['export_count'],\n 'sampleCount' => $r['sample_count']\n ];\n }\n return $data;\n }", "title": "" }, { "docid": "8252adb93f8f240ae9fe844349fd3f7b", "score": "0.4959005", "text": "public static function getResources($size = 5, $page = 1, $sort = \"\", $fields = \"\")\n {\n $request = \"resources\";\n $request .= \"?size=\" . $size;\n $request .= \"&page=\" . $page;\n if ($sort != \"\")\n $request .= \"&sort=\" . $sort;\n if ($fields != \"\")\n $request .= \"&fields=\" . $fields;\n\n return self::request($request);\n }", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "46b83daf147808ed52071df1f995e5d0", "score": "0.49490649", "text": "public function getAll(): array;", "title": "" }, { "docid": "3c99dc8db4cdb4fb76b4e15eb978e8d7", "score": "0.49424815", "text": "public function all(){\n return TypeDeviceResource::collection(TypeDevice::orderBy('id','DESC')->get());\n }", "title": "" }, { "docid": "e206148a1ae4b90910f5d2678c5d092b", "score": "0.49404207", "text": "protected function getItemsByItemGroupRequest($itemGroupId)\n {\n // verify the required parameter 'itemGroupId' is set\n if ($itemGroupId === null || (is_array($itemGroupId) && count($itemGroupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $itemGroupId when calling getItemsByItemGroup'\n );\n }\n\n $resourcePath = '/item/get_items_by_item_group';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($itemGroupId !== null) {\n $queryParams['item_group_id'] = ObjectSerializer::toQueryValue($itemGroupId);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7d3d5ea98fecbcdaa728156240d52501", "score": "0.49353737", "text": "public function index()\n\t{\n\t\t$resources = $this->getResourceRepository()->findAllPaginated()->toArray();\n\n return $this->apiResponse->success($resources['data'], 200, array_except($resources, 'data'));\n\t}", "title": "" }, { "docid": "2f2823963b01939beae829f7552b0e69", "score": "0.49350554", "text": "public function retrieveAll();", "title": "" }, { "docid": "69895241a63181797704ca7bf8c52edd", "score": "0.4918553", "text": "public function getResources(){ }", "title": "" }, { "docid": "e0723351cf5d363b097f985039c05a7b", "score": "0.49180138", "text": "public function getGroups(){\r\n $this->startTimer();\r\n $url = $this->server_url . \"/admin/index.php\";\r\n $postdata = 'op=getgroups';\r\n $buffer = $this->doPOST($url, $postdata);\r\n $collection = new Collection($buffer, \"group\", \"GroupRecord\" , \"meta\");\r\n $this->stopTimer();\r\n if ($collection->getNumberOfRecords() > 0)\r\n {\r\n return $collection;\r\n }\r\n else\r\n {\r\n return $collection->getMetaRecord();\r\n }\r\n return NULL; \r\n }", "title": "" }, { "docid": "bc53d89e89774c64b55319857865fd73", "score": "0.49113587", "text": "public function index(AttributeGroup $attributegroup)\n {\n $attributes = $attributegroup->attributes;\n\n return AttributeResource::collection($attributes);\n }", "title": "" }, { "docid": "9e4aa3765a088d74ea20e0e8231d81d1", "score": "0.49107626", "text": "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "title": "" }, { "docid": "c6662b2783585af586f0fa203b12af6c", "score": "0.49070683", "text": "function getResourcesByResourceTypeId($a_iResourceTypeId)\n {\n $oResourceSelector = getResourceSelector();\n $oResourceSelector->setResourceTypeId($a_iResourceTypeId);\n $oResourceCollection = $this->read($oResourceSelector);\n return $oResourceCollection;\n\n }", "title": "" }, { "docid": "c31fff6c6344d346833430a9516482d4", "score": "0.4902918", "text": "private function generateResourcesArray()\n {\n $resourcesArray = [\n 'urn:magento:mftf:DataGenerator/etc/dataOperation.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd'),\n 'urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd'),\n 'urn:magento:mftf:Page/etc/PageObject.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd'),\n 'urn:magento:mftf:Page/etc/SectionObject.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd'),\n 'urn:magento:mftf:Test/etc/actionGroupSchema.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd'),\n 'urn:magento:mftf:Test/etc/testSchema.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd'),\n 'urn:magento:mftf:Suite/etc/suiteSchema.xsd' =>\n realpath(FW_BP . '/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd')\n ];\n return $resourcesArray;\n }", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.49012083", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.49012083", "text": "public function getAll();", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "e304ad8d3a31801d7452bed425512759", "score": "0.0", "text": "public function run()\n {\n $product = new App\\Product([\n\t\t\t'imagePath' => 'https://www.buckeyehvacparts.com/wp-content/themes/cheap-hvac-parts/images/image_coming_soon.png',\n\t\t\t'title' => 'Product',\n\t\t\t'description' => 'koop nu!!',\n\t\t\t'price' => 50,\n 'category_id' => '1'\n ]);\n $product->save();\n\n $product = new App\\Product([\n\t\t\t'imagePath' => 'https://www.buckeyehvacparts.com/wp-content/themes/cheap-hvac-parts/images/image_coming_soon.png',\n\t\t\t'title' => 'Product',\n\t\t\t'description' => 'koop nu!!',\n\t\t\t'price' => 50,\n 'category_id' => '1'\n ]);\n $product->save();\n\n $product = new App\\Product([\n\t\t\t'imagePath' => 'https://www.buckeyehvacparts.com/wp-content/themes/cheap-hvac-parts/images/image_coming_soon.png',\n\t\t\t'title' => 'Product',\n\t\t\t'description' => 'koop nu!!',\n\t\t\t'price' => 50,\n 'category_id' => '1'\n ]);\n $product->save();\n\n $product = new App\\Product([\n\t\t\t'imagePath' => 'https://www.buckeyehvacparts.com/wp-content/themes/cheap-hvac-parts/images/image_coming_soon.png',\n\t\t\t'title' => 'Product',\n\t\t\t'description' => 'koop nu!!',\n\t\t\t'price' => 50,\n 'category_id' => '1'\n ]);\n $product->save();\n\n $product = new App\\Product([\n\t\t\t'imagePath' => 'https://www.buckeyehvacparts.com/wp-content/themes/cheap-hvac-parts/images/image_coming_soon.png',\n\t\t\t'title' => 'Product',\n\t\t\t'description' => 'koop nu!!',\n\t\t\t'price' => 50,\n 'category_id' => '1'\n ]);\n $product->save();\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\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 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::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 Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::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 Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::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 Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\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 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "c8d5f91e0351948cc70e8d07c308742f", "score": "0.0", "text": "public function show($id)\n {\n //\n $hangout = Hangout::find($id);\n\n// return dd($hangout);\n\n// return response()->json([\n// 'data' => $hangout\n// ], 200);\n\n return response()->json([\n 'data' => $this->transform2($hangout)\n ], 200);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "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('Rack 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',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
7419bfeb2f5622e1b5380cd43c5c1ce3
Get the new RDN that the LDAP object will have.
[ { "docid": "ea567fe87a679ac1f80cc33cdb7ca544", "score": "0.7014652", "text": "public function getNewRdn()\n {\n return $this->properties['newRdn'];\n }", "title": "" } ]
[ { "docid": "02b3545aa799ea0caced7984ec4417f9", "score": "0.6269926", "text": "public function setNewRdn($rdn)\n {\n $this->properties['newRdn'] = $rdn;\n\n return $this;\n }", "title": "" }, { "docid": "52ee969ae247418ca101560a6a2f0e64", "score": "0.6242377", "text": "public function getLDAP()\n {\n return $this->ldap;\n }", "title": "" }, { "docid": "1adf618eb8d55ebe4fadd1ff97ddfc9b", "score": "0.61762947", "text": "protected function generateNewDn()\n {\n if ($this->getMail() == \"\") {\n throw new BadMethodCallException(\"Cant generate DN: mail is empty ('')\");\n }\n return \"mail=\" . $this->getMail() . \",ou=Forward,dc=pbnl,dc=de\";\n }", "title": "" }, { "docid": "9ea3da4f2b22554c97a05edfd1242999", "score": "0.6067935", "text": "public static function getRdnFromDn($dn)\n {\n $rdn = self::explodeDn($dn, 0)[0];\n $rdn = explode('=', $rdn, 2);\n\n return $rdn[0] . '=' . $rdn[1];\n }", "title": "" }, { "docid": "35f096e815bdf905b4a069b3a68ebf8d", "score": "0.59964794", "text": "public function getDn()\n {\n return $this->dn;\n }", "title": "" }, { "docid": "35f096e815bdf905b4a069b3a68ebf8d", "score": "0.59964794", "text": "public function getDn()\n {\n return $this->dn;\n }", "title": "" }, { "docid": "fe7bd992fac46de0a621471e334efb46", "score": "0.5961338", "text": "public function getBaseDN()\n {\n return (string)$this->baseDN;\n }", "title": "" }, { "docid": "db3b0a5b29877a6bb80bdcf19ac34879", "score": "0.5959911", "text": "function getBaseDN()\n\t{\n\t\tglobal $servers;\n\n\t\tdebug_log(sprintf('%s::getBaseDN(): Looking for BaseDN',get_class($this)),8);\n\t\t// Return the cached entry if we've been here before.\n\t\tif (! is_null($this->_baseDN)) {\n\t\t\tdebug_log(sprintf('%s::getBaseDN(): Return CACHED BaseDN [%s]',get_class($this),implode('|',$this->_baseDN)),7);\n\t\t\treturn $this->_baseDN;\n\t\t}\n\n\t\tdebug_log(sprintf('%s::getBaseDN(): Checking config for BaseDN',get_class($this)),9);\n\t\t// If the base is set in the configuration file, then just return that.\n\t\t// @todo Do we need to test if the config array is blank?\n\t\tif (isset($servers[$this->server_id]['base']) && $servers[$this->server_id]['base']) {\n\t\t\t$this->_baseDN = is_array($servers[$this->server_id]['base']) ? $servers[$this->server_id]['base'] : array($servers[$this->server_id]['base']);\n\t\t\tdebug_log(sprintf('%s::getBaseDN(): Return BaseDN from Config [%s]',get_class($this),implode('|',$this->_baseDN)),4);\n\t\t\treturn $this->_baseDN;\n\n\t\t// We need to figure it out.\n\t\t} else {\n\n\t\t\tdebug_log(sprintf('%s::getBaseDN(): Connect to LDAP to find BaseDN',get_class($this)),9);\n\t\t\t// Are we connected\n\t\t\t// @todo This bit needs to be more robust.\n\t\t\tif ($this->connect()) {\n\t\t\t\t$r = @ldap_read( $this->connect(), \"\", 'objectClass=*', array( 'namingContexts' ) );\n\t\t\t\tdebug_log(sprintf('%s::getBaseDN(): Search Results [%s], Resource [%s], Msg [%s]',get_class($this),$r,$this->connect(),ldap_error($this->connect())),9);\n\t\t\t\tif( ! $r )\n\t\t\t\t\treturn array('');\n\n\t\t\t\t$r = @ldap_get_entries( $this->connect(false), $r );\n\t\t\t\tif( isset( $r[0]['namingcontexts'] ) ) {\n\n\t\t\t\t\t// If we have a count key, delete it - dont need it.\n\t\t\t\t\tif (isset($r[0]['namingcontexts']['count']))\n\t\t\t\t\t\tunset($r[0]['namingcontexts']['count']);\n\n\t\t\t\t\tdebug_log(sprintf('%s::getBaseDN(): LDAP Entries:%s',get_class($this),implode('|',$r[0]['namingcontexts'])),5);\n\t\t\t\t\t$this->_baseDN = $r[0]['namingcontexts'];\n\t\t\t\t\t// @todo Do we need this session?\n\t\t\t\t\t//$_SESSION[ \"pla_root_dn_$this->server_id\" ] = $this->_baseDN;\n\t\t\t\t\treturn $this->_baseDN;\n\n\t\t\t\t} else {\n\t\t\t\t\treturn array('');\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn array('');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b7e3f2bab7f4eb5164edec16d84c47af", "score": "0.59474635", "text": "protected function makeRdn($username)\n {\n $parts = explode('.', $this->domain);\n\n $rdn = 'dc=' . implode(',dc=', $parts);\n\n return sprintf('uid=%s,ou=people,%s', $username, $rdn);\n }", "title": "" }, { "docid": "6282172498f863e07e31362212a3e9e6", "score": "0.5944433", "text": "public function getDn()\n {\n return $this->properties['dn'];\n }", "title": "" }, { "docid": "a05be3f91c0762b9c1989ebf10791617", "score": "0.5845739", "text": "function ldap_get_dn($link_identifier, $result_entry_identifier)\n{\n\tif (isset($link_identifier->failBindGetDn)) {\n\t\treturn '____FAIL____';\n\t}\n\n\treturn isset($link_identifier->failGetDn) ? false : (isset($link_identifier->returnGetDn) ? $link_identifier->returnGetDn : null);\n}", "title": "" }, { "docid": "e5bb20fe28f6b5fecbc4a66793f1b8f7", "score": "0.5820094", "text": "public function getDeleteOldRdn()\n {\n return $this->properties['deleteOldRdn'];\n }", "title": "" }, { "docid": "81fce70c5fefee3f71f6100e21fcceae", "score": "0.57925105", "text": "public function setBaseDN($dn)\n {\n $oldDN = $this->getBaseDN();\n $this->baseDN = trim($dn);\n return $oldDN;\n }", "title": "" }, { "docid": "737cd07265b755408c2992725b321486", "score": "0.57906204", "text": "public function get_base_dn()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (is_null($this->config))\n $this->_load_config();\n\n return $this->config['base_dn'];\n }", "title": "" }, { "docid": "47174dfa6bd7d791d692c66f8f86f967", "score": "0.57883155", "text": "public function get_ldap_handle()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (is_null($this->config['base_dn']))\n $this->_load_config();\n\n $read_config['protocol'] = 'ldap';\n $read_config['base_dn'] = $this->config['base_dn'];\n $read_config['bind_dn'] = $this->config['bind_dn'];\n $read_config['bind_pw'] = $this->config['bind_pw'];\n $read_config['bind_host'] = '127.0.0.1';\n\n $mode = $this->get_mode();\n\n if ($mode === self::MODE_SLAVE) {\n $write_config['base_dn'] = $this->config['base_dn'];\n $write_config['bind_dn'] = $this->get_syncuser_dn();\n $write_config['bind_pw'] = $this->config['sync_key'];\n $write_config['bind_host'] = $this->config['master_hostname'];\n $write_config['protocol'] = 'ldaps';\n } else {\n $write_config = $read_config;\n }\n\n // TODO: revisit hack\n if (file_exists('/var/clearos/samba_directory/ldap.conf')) {\n $read_config['protocol'] = 'ldaps';\n $write_config['protocol'] = 'ldaps';\n }\n\n $ldaph = new LDAP_Client($read_config, $write_config);\n\n return $ldaph;\n }", "title": "" }, { "docid": "b2a231b9874974a54f896d67c7be4d77", "score": "0.5729642", "text": "public function get_bind_dn()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (is_null($this->config))\n $this->_load_config();\n\n return $this->config['bind_dn'];\n }", "title": "" }, { "docid": "4160718189f2f8518f3fb4d6fec92938", "score": "0.5704888", "text": "public function __toString()\n\t\t{\n\t\t\treturn \"LDAP\";\n\t\t}", "title": "" }, { "docid": "ce8816510b7793af9f445be5d1cc620b", "score": "0.5688855", "text": "public function getLdapConnection()\n {\n return $this->ldap;\n }", "title": "" }, { "docid": "91c9c5037cdab6189b1c9e30f636c0be", "score": "0.5683652", "text": "public function getId()\n {\n return $this->ldapEntry['cn'][0];\n }", "title": "" }, { "docid": "e6d2ae3b9e5a729e90f044d8791737da", "score": "0.5622248", "text": "public function get_syncuser_dn()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n return \"cn=syncuser,ou=Internal,\" . $this->get_base_dn();\n }", "title": "" }, { "docid": "50db328767bb5a7a50a59c92c59991b3", "score": "0.5581913", "text": "public function lrn(): LRN\r\n {\r\n $lrn = new LRN($this);\r\n return $lrn;\r\n }", "title": "" }, { "docid": "70980e083d65a9a71fb0a3d32691038e", "score": "0.55623335", "text": "private function get_LDAP_dn($baseDn, $uidAttr) {\n $authparams = json_decode($this->authmethodparams, true);\n $adldap = $this->directory_connect($authparams);\n try {\n $adldap->authenticate($authparams['adminUsername'], $authparams['adminPassword']);\n } catch (adLDAPException $e) {\n $this->Log->write(\"Error\", \"Something went wrong during auth: \" . $e->getMessage(), 2);\n $this->Result->show(\"danger\", _(\"Error: \") . $e->getMessage(), true);\n }\n $users = $adldap->user()->search($baseDn, $uidAttr);\n if (!empty($users[0]['dn'])) {\n return $users[0]['dn'];\n }\n return false;\n }", "title": "" }, { "docid": "beb886781b6f0a00558f0a219900ae75", "score": "0.55542505", "text": "function _check_create_dn($baseDN)\n\t{\n\t\t// check if $baseDN exists. If not create new one\n\t\tif(@ldap_read($this->ds, $baseDN, 'objectclass=*'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//error_log(__METHOD__.\"('$baseDN') !ldap_read({$this->ds}, '$baseDN', 'objectclass=*') ldap_errno()=\".ldap_errno($this->ds).', ldap_error()='.ldap_error($this->ds).get_class($this));\n\t\tif(ldap_errno($this->ds) != 32 || substr($baseDN,0,3) != 'cn=')\n\t\t{\n\t\t\terror_log(__METHOD__.\"('$baseDN') baseDN does NOT exist and we cant/wont create it! ldap_errno()=\".ldap_errno($this->ds).', ldap_error()='.ldap_error($this->ds));\n\t\t\treturn $this->_error(__LINE__);\t// baseDN does NOT exist and we cant/wont create it\n\t\t}\n\t\t// create a admin connection to add the needed DN\n\t\t$adminLDAP = new ldap;\n\t\t$adminDS = $adminLDAP->ldapConnect();\n\n\t\tlist(,$ou) = explode(',',$baseDN);\n\t\tforeach(array(\n\t\t\t'ou=contacts,'.$this->allContactsDN,\n\t\t\t$ou.',ou=contacts,'.$this->allContactsDN,\n\t\t\t$baseDN,\n\t\t) as $dn)\n\t\t{\n\t\t\tif (!@ldap_read($this->ds, $dn, 'objectclass=*') && ldap_errno($this->ds) == 32)\n\t\t\t{\n\t\t\t\t// entry does not exist, lets try to create it\n\t\t\t\tlist($top) = explode(',',$dn);\n\t\t\t\tlist($var,$val) = explode('=',$top);\n\t\t\t\t$data = array(\n\t\t\t\t\t'objectClass' => $var == 'cn' ? 'organizationalRole' : 'organizationalUnit',\n\t\t\t\t\t$var => $val,\n\t\t\t\t);\n\t\t\t\tif(!@ldap_add($adminDS, $dn, $data))\n\t\t\t\t{\n\t\t\t\t\t//echo \"<p>ldap_add($adminDS,'$dn',\".print_r($data,true).\")</p>\\n\";\n\t\t\t\t\t$err = lang(\"Can't create dn %1\",$dn).': '.$this->_error(__LINE__,$adminDS);\n\t\t\t\t\t$adminLDAP->ldapDisconnect();\n\t\t\t\t\treturn $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$adminLDAP->ldapDisconnect();\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3fdddf93797da20ffdceb8bc08a48a54", "score": "0.55211097", "text": "protected function getUserDn()\n {\n $userName = $this->login->username;\n\n // Translate given e-mail to username\n if (strpos($userName, '@') !== false) {\n $user = User::findOne(['email' => $userName]);\n if ($user !== null) {\n $userName = $user->username;\n }\n }\n\n try {\n $this->getLdap()->bind($userName, $this->login->password);\n return $this->getLdap()->getCanonicalAccountName($userName, Ldap::ACCTNAME_FORM_DN);\n } catch (LdapException $ex) {\n // User not found in LDAP\n }\n return '';\n }", "title": "" }, { "docid": "8e677023fbbc91b540bf99dc9b55b405", "score": "0.5516817", "text": "function ldap()\n {\n return DI::getInstance()->get('ldap');\n }", "title": "" }, { "docid": "6b1298b297aa5a45be0abee2caf8f2ac", "score": "0.5485191", "text": "function LDAP_fqdn2dn($domain)\n{\n\tif (!(strpos($domain,\"dc=\")===FALSE))\n\t\t{\n\t\t\t$domain=str_replace(\"\\.\",\", dc=\",$domain);\n\t\t\t$domain=\"dc=\".$domain;\n\t\t};\n\treturn($domain);\n}", "title": "" }, { "docid": "c2f9dc7a8717bc7fbdf188b90735575e", "score": "0.54540765", "text": "public function getLdap()\n {\n if ($this->_ldap === null) {\n /**\n * @see Zend_Ldap\n */\n // require_once 'Zend/Ldap.php';\n $this->_ldap = new DfiLdap();\n }\n\n return $this->_ldap;\n }", "title": "" }, { "docid": "74a3297fddfde8e932d35d7359e61174", "score": "0.5450981", "text": "public function connect() {\n $this->ldapConnexion = ldap_connect($this->uri);\n $this->bind();\n\n return $this->ldapConnexion;\n }", "title": "" }, { "docid": "3e5dfb9680e94e943d032ebe39c57ac7", "score": "0.5428354", "text": "function dn2uri ($dn) {\n\tglobal $servers;\n\t$server = $servers[1]['host'];\n\t$dnParts = array_reverse(split(\",\", $dn));\n\tfor ($i = count($dnParts)-1; $i >= 0; $i--){\n\t\t$uri = $uri . trim($dnParts[$i]);\n\t\tif ($i != 0) $uri = $uri . \",\";\n\t}\n\t$uri = \"ldap://$server/\" . urlencode($uri);\n\t$uri = str_replace (\"%3D\", \"=\", $uri);\n\t$uri = str_replace (\"%2C\", \",\", $uri);\n\t$uri = str_replace (\"%20\", \"+\", $uri);\n\treturn $uri;\n}", "title": "" }, { "docid": "01220846df605c441c9abc33c69bedef", "score": "0.5419396", "text": "function uid() { return $this->userldaparray['uidNumber'];}", "title": "" }, { "docid": "ffa252f4a5e35cc1cceac27ba3b8e184", "score": "0.5415818", "text": "public function getBaseDn()\n {\n return $this->operation->getBaseDn();\n }", "title": "" }, { "docid": "58076fd8c4dce1d91a34eda82b854083", "score": "0.53808093", "text": "function getUserRecord_dn($dn) {\n\t\t$filter = \"(&(objectCategory=person)(objectClass=user))\";\n\t\t$result = ldap_search($this->ldapconn, $dn, $filter, $this->justthese)\n\t\t\t\tor die(\"ERROR: Failed to search the AD Tree.\");\n\n\t\t$entries = ldap_get_entries($this->ldapconn, $result);\n\t\t//print_r($entries);\n\n\t\tif ($entries[\"count\"] > 0)\n\t\t{\n\t\t\t$exclude = count(array_intersect($this->excludegroups, $entries[0]['memberof']));\n\t\t\t$accountDisabled = (isset($entries[0]['useraccountcontrol']) and (((int)$entries[0]['useraccountcontrol'][0] & 2) != 2));\n\t\t\tif(($exclude == 0) and $accountDisabled){\n\t\t\t\t$user_name = strtolower($entries[0]['samaccountname'][0]);\n\t\t\t\t$entries[0]['user_picture'] = site_url(\"images/profile/$user_name\");\n\t\t\t\t$entries[0]['i_department'] = $this->getUserDepartment($entries[0]['samaccountname'][0]);\n\n\t\t\t\treturn $entries[0];\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "4fd110a0f7ea8a8fb26ec51a0ce71502", "score": "0.537546", "text": "public function modify($rdn, $info)\n\t{\n\t\t$modify\t= ldap_modify($this->link, $rdn . \",\" . $this->baseDN, $info);\n\t\treturn $modify;\n\t}", "title": "" }, { "docid": "ca065e53389cf73587837e18374f2a98", "score": "0.53704417", "text": "public function getDerivedGroupFromDnAttribute(): ?string;", "title": "" }, { "docid": "c1f7d113750cbc2b65ae11844eadeca6", "score": "0.53565913", "text": "public function connect()\n\t{\n\t\t$this->link\t= ldap_connect($this->host, $this->port)\n\t\t\t\t\t or die (\"Can't connect to \". $this->host . \":\". $this->port . \"!\");\n\t\treturn $this->link;\n\t}", "title": "" }, { "docid": "6f98d4172504f2007c19d9543def07f7", "score": "0.5340609", "text": "public function get_adLDAP() : ?adLDAP;", "title": "" }, { "docid": "ba79217d6170fb70723438ec6c5bc34a", "score": "0.5330678", "text": "public function getLastName() \r\n {\r\n return $this->ldapData['sn'][0];\r\n }", "title": "" }, { "docid": "33de3eaca931ea3149d68456b2ba8e9a", "score": "0.5329367", "text": "function getSchemaDN($dn='', $debug = false)\n\t{\n\t\t// If we already got the SchemaDN, then return it.\n\t\tif ($this->_schemaDN)\n\t\t\treturn $this->_schemaDN;\n\n\t\tif( $debug ) echo \"<pre>\";\n\n\t\tif (! $this->connect())\n\t\t\treturn false;\n\n\t\t$search = @ldap_read( $this->connect(), $dn, 'objectClass=*', array( 'subschemaSubentry' ) );\n\t\tif( $debug ) { printf(\"%s::getSchemaDN(): ldap_read: \",get_class($this)); var_dump( $search ); echo \"\\n\"; }\n\t\tif( ! $search ) {\n\t\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning null. (search result is blank)<BR>\",get_class($this));\n\t\t\treturn null;\n\t\t}\n\n\t\tif( @ldap_count_entries( $this->connect(), $search ) == 0 ) {\n\t\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning null. (ldap_count_entries() == 0)<BR>\",get_class($this));\n\t\t\treturn null;\n\t\t}\n\n\t\t$entries = @ldap_get_entries( $this->connect(), $search );\n\t\tif( $debug ) { echo \"Entries (ldap_get_entries): \"; var_dump( $entries ); echo \"\\n\"; }\n\t\tif( ! $entries || ! is_array( $entries ) ) {\n\t\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning null. (Bad entries, false or not array)<BR>\",get_class($this));\n\t\t\treturn null;\n\t\t}\n\n\t\t$entry = isset( $entries[0] ) ? $entries[0] : false;\n\t\tif( ! $entry ) {\n\t\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning null. (entry is false)<BR>\",get_class($this));\n\t\t\treturn null;\n\t\t}\n\n\t\t$sub_schema_sub_entry = isset( $entry[0] ) ? $entry[0] : false;\n\t\tif( ! $sub_schema_sub_entry ) {\n\t\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning null. (sub_schema_sub_entry val is false)<BR>\",get_class($this));\n\t\t\treturn null;\n\t\t}\n\n\t\t$this->_schemaDN = isset( $entry[ $sub_schema_sub_entry ][0] ) ? $entry[ $sub_schema_sub_entry ][0] : false;\n\n\t\tif( $debug ) printf(\"%s::getSchemaDN(): returning (%s)<BR>\",get_class($this),$this->_schemaDN);\n\t\treturn $this->_schemaDN;\n\t}", "title": "" }, { "docid": "ad8d2b6c230683fef0509b157fd7f57a", "score": "0.53267884", "text": "public function setNewLocation($dn)\n {\n $this->properties['newLocation'] = $dn;\n\n return $this;\n }", "title": "" }, { "docid": "9718f505623e6b9731f8172d87d84f94", "score": "0.53099656", "text": "public function getTld()\n {\n return preg_replace('/(.*)\\.([a-z]+)$/', '$2', $this->domainName);\n }", "title": "" }, { "docid": "51492547bef7718cc9fb44be7647215a", "score": "0.53028136", "text": "protected function createLdapModel(): LdapRecord\n {\n $class = '\\\\'.ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "7217257952a1eefc3a402abf2ed0f9f4", "score": "0.52796173", "text": "public function getLogin()\n {\n return $this->ldapEntry['uid'][0];\n }", "title": "" }, { "docid": "b66b80ad702ef6270163b1af9e9360e8", "score": "0.52728516", "text": "public function get_master_dn()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n return \"cn=Master,ou=Servers,\" . $this->get_base_dn();\n }", "title": "" }, { "docid": "c299efe2a3bfa3e0e909f6a1697b16a0", "score": "0.5226939", "text": "private function ddnDomain()\n {\n return $this->settings['scheme'] . '://' . $this->settings['host'] . ':' . $this->settings['port'] . '/';\n }", "title": "" }, { "docid": "5b214fbf0908b4a14eeac6bf5303013c", "score": "0.5208224", "text": "public function domain() {\n\t\treturn $this->get(Constants::DN);\n\t}", "title": "" }, { "docid": "d5692835608f9ab572bbb98db7a27ba6", "score": "0.5200403", "text": "protected function getBaseDn()\n {\n if (!empty($this->connection->getConfig()->getBaseDn())) {\n $baseDn = $this->connection->getConfig()->getBaseDn();\n } elseif ($this->connection->getRootDse()->has('defaultNamingContext')) {\n $baseDn = $this->connection->getRootDse()->get('defaultNamingContext');\n } elseif ($this->connection->getRootDse()->has('namingContexts')) {\n $baseDn = $this->connection->getRootDse()->get('namingContexts')[0];\n } else {\n throw new LdapConnectionException('The base DN is not defined and could not be found in the RootDSE.');\n }\n\n return $baseDn;\n }", "title": "" }, { "docid": "9aa08b5e7962abc99db05f7267108b37", "score": "0.5182278", "text": "public function object()\n {\n return $this->belongsTo(ModelRepository::get(LdapObject::class), 'object_id');\n }", "title": "" }, { "docid": "432c359fde21a5175c86eb9b7e5122e8", "score": "0.51797235", "text": "function ldapName($uvmID) {\n if (empty($uvmID)) {\n return \"no:netid\";\n }\n $Sname = \"not:found\";\n\n $ds = ldap_connect(\"ldap.uvm.edu\");\n\n if ($ds) {\n $r = ldap_bind($ds);\n $dn = \"uid=$uvmID,ou=People,dc=uvm,dc=edu\";\n $filter = \"(|(netid=$uvmID))\";\n $findthese = array(\"sn\", \"givenname\");\n\n $sr = ldap_search($ds, $dn, $filter, $findthese);\n\n if (ldap_count_entries($ds, $sr) > 0) {\n $info = ldap_get_entries($ds, $sr);\n $Sname = $info[0][\"givenname\"][0] . \" \" . $info[0][\"sn\"][0];\n }\n }\n\n ldap_close($ds);\n\n return $Sname;\n }", "title": "" }, { "docid": "e95776eb2d8dafe5a6e479a72b6688ca", "score": "0.5171665", "text": "public function shiftEntry()\n {\n if (is_null($this->_entry)) {\n if (!$this->_entry = @ldap_first_entry($this->_link, $this->_search)) {\n return false;\n }\n $entry = Horde_Ldap_Entry::createConnected($this->_ldap, $this->_entry);\n } else {\n if (!$this->_entry = @ldap_next_entry($this->_link, $this->_entry)) {\n return false;\n }\n $entry = Horde_Ldap_Entry::createConnected($this->_ldap, $this->_entry);\n }\n\n return $entry;\n }", "title": "" }, { "docid": "6f20782f7bfb371684f98431bbcd88ad", "score": "0.5171428", "text": "function get_real_name($add_uid = false) {\n\t$realname = '';\n\t$ent_ref_val = '';\n\tglobal $user;\n\t$profile = user_load($user->uid);\n\t\n\tif( isset($profile->field_er_realname['und']['0']['value']) ) {\n\t\t$realname = (string) $profile->field_er_realname['und']['0']['value'];\n\t\t$ent_ref_val = \"$realname ({$profile->uid})\";\n\t}\n\t\n\tif($add_uid) {\n\t\treturn $ent_ref_val;\n\t} else {\n\t\treturn $realname;\n\t}\n}", "title": "" }, { "docid": "11c0557bbc46c3a14fecd73f944e6697", "score": "0.5163027", "text": "public function domain()\n {\n return $this->belongsTo(LdapDomain::class, 'domain_id');\n }", "title": "" }, { "docid": "11c0557bbc46c3a14fecd73f944e6697", "score": "0.5163027", "text": "public function domain()\n {\n return $this->belongsTo(LdapDomain::class, 'domain_id');\n }", "title": "" }, { "docid": "f82d41722600ef9dc1ac8c4da77502fe", "score": "0.5144175", "text": "public function add($rdn, $info)\n\t{\n\t\t$add \t= ldap_add($this->link, $rdn . \",\" . $this->baseDN, $info);\n\t\treturn $add;\n\t}", "title": "" }, { "docid": "ede7c82e7ab1f1e1ec1272bb399555c4", "score": "0.51391685", "text": "public function InsertUserDN(string $dn): LDAPUser\n {\n $query_insert_usr_id = <<<'SQL'\n INSERT INTO users_id(id,member_since) VALUES (NULL,CURRENT_TIMESTAMP);\n SQL;\n $query_insert_local_ldapuser = <<<'SQL'\n INSERT INTO users_ldap(dn, usr_id) VALUES (?,?);\n SQL;\n\n $LDAPUser = new LDAPUser();\n $LDAPUser->setDN($dn);\n\n $this->sql_db->begin_transaction();\n\n $stmt_insert_usr_id = $this->sql_db->prepare($query_insert_usr_id);\n $stmt_insert_local_userldap = $this->sql_db->prepare($query_insert_local_ldapuser);\n\n $stmt_insert_usr_id->execute();\n $new_user_id = $stmt_insert_usr_id->insert_id;\n\n $stmt_insert_local_userldap->bind_param('si',$LDAPUser->getDN(),$new_user_id);\n $stmt_insert_local_userldap->execute();\n\n if($stmt_insert_local_userldap->affected_rows !=1)\n {\n $this->sql_db->rollback();\n throw new \\Exception(\"LocalLdap User Could not be Added\");\n }\n else{\n $this->sql_db->commit();\n $LDAPUser->setUsrId($new_user_id);\n }\n\n return $LDAPUser;\n }", "title": "" }, { "docid": "addf708821ea8594744cfc4d47a4a125", "score": "0.5138443", "text": "function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []) : bool\n{\n}", "title": "" }, { "docid": "7b539eadcda2dbcd24bb746ec71dadca", "score": "0.51344085", "text": "public function getUID() {\n\n\t\t// load ldap config\n\t\tinclude('config.inc');\n\t\t$attributes = array(\"uidNumber\");\n\n\t\t$search = ldap_search($this->connection, $UIDBASE, '(|(uid=*))', $attributes);\n\t\t$this->checkErrors();\n\t\t// TODO: Handle errors\n\n\t\t$results = ldap_get_entries($this->connection, $search);\n\t\t$this->checkErrors();\n\t\t// TODO: Handle errors\n\n\t\t$selectedUID = $MINUID;\n\n\t\t// loop through and find the highest UID returned\n\t\tforeach($results as $result){\n\t\t\t$uidNumber = $result['uidnumber'][0];\n\t\t\tif(!empty($uidNumber)){\n\t\t\t\tif(is_numeric($uidNumber)){\n\t\t\t\t\tif($uidNumber > $selectedUID){\n\t\t\t\t\t\t$selectedUID = $uidNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// prevent re-use of uid number cross users\n\t\t\tunset($uidNumber);\n\t\t}\n\n\n\t\t// up the UID to next free one\n\t\t$selectedUID++;\n\n\t\t// TODO: Add cap to maximum UID returned\n\t\tif($selectedUID > $MAXUID){\n\t\t\terror_log('ERROR: Maximum UID breached!');\n\t\t\techo \"[ERROR] Maximum UID exceeded.\";\n\t\t\texit;\n\t\t}\n\n\t\treturn $selectedUID;\n\t\t\t\n\t}", "title": "" }, { "docid": "ad7dab7b5864503c723ff2ff6005b0b0", "score": "0.5112396", "text": "public function delete($rdn)\n\t{\n\t\t$delete = ldap_delete($this->link, $rdn . \",\" . $this->baseDN);\n\t\treturn $delete;\n\t}", "title": "" }, { "docid": "680fd650e0a37641ffff8073856d9d73", "score": "0.50996923", "text": "public function bindUser($userRdn = \"\")\n\t{\n\t\t$bind\t\t= ldap_bind($this->link,((trim($userRdn) != \"\") ? $userRdn : $this->userRDN) . \",\" . $this->baseDN, $this->passwd);\n\t\treturn $bind;\n\t}", "title": "" }, { "docid": "8346cf40fb9224bc7e225edcbeaaba7b", "score": "0.5087657", "text": "function LdapRealm() {\n }", "title": "" }, { "docid": "ed3cb35a0b820d6e80791c3823adcd5f", "score": "0.50756913", "text": "public function _load_ldap_dn($info, $mode = 0)\n\t{\n // phpcs:enable\n\t\tglobal $conf;\n\t\t$dn='';\n\t\tif ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES.\"=\".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].\",\".$conf->global->LDAP_MEMBER_TYPE_DN;\n\t\tif ($mode==1) $dn=$conf->global->LDAP_MEMBER_TYPE_DN;\n\t\tif ($mode==2) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES.\"=\".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES];\n\t\treturn $dn;\n\t}", "title": "" }, { "docid": "d4ccb1860740ee1829be39455b44e1b9", "score": "0.5060712", "text": "public function getNewDomainVnc(){\n return libvirt_domain_new_get_vnc();\n }", "title": "" }, { "docid": "67b30a804070db18324a1dabae838307", "score": "0.50370735", "text": "public function getLid()\n {\n return $this->get(self::LID);\n }", "title": "" }, { "docid": "866f9eea4423774fc335409386c034c7", "score": "0.50105125", "text": "public function get_details_from_ldap() {\n\t\tglobal $config;\n\t\t$attributes = array();\n\t\t$attributes[] = 'dn';\n\t\t$attributes[] = $config['ldap']['user_id'];\n\t\t$attributes[] = $config['ldap']['user_name'];\n\t\t$attributes[] = $config['ldap']['user_email'];\n\t\t$attributes[] = $config['ldap']['group_member_value'];\n\t\tif(isset($config['ldap']['user_active'])) {\n\t\t\t$attributes[] = $config['ldap']['user_active'];\n\t\t}\n\t\t$ldapusers = $this->ldap->search($config['ldap']['dn_user'], LDAP::escape($config['ldap']['user_id']).'='.LDAP::escape($this->uid), array_keys(array_flip($attributes)));\n\t\tif($ldapuser = reset($ldapusers)) {\n\t\t\t$this->auth_realm = 'LDAP';\n\t\t\t$this->uid = $ldapuser[strtolower($config['ldap']['user_id'])];\n\t\t\t$this->name = $ldapuser[strtolower($config['ldap']['user_name'])];\n\t\t\t$this->email = $ldapuser[strtolower($config['ldap']['user_email'])];\n\t\t\tif(isset($config['ldap']['user_active'])) {\n\t\t\t\t$this->active = 0;\n\t\t\t\tif(isset($config['ldap']['user_active_true'])) {\n\t\t\t\t\t$this->active = intval($ldapuser[strtolower($config['ldap']['user_active'])] == $config['ldap']['user_active_true']);\n\t\t\t\t} elseif(isset($config['ldap']['user_active_false'])) {\n\t\t\t\t\t$this->active = intval($ldapuser[strtolower($config['ldap']['user_active'])] != $config['ldap']['user_active_false']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->active = 1;\n\t\t\t}\n\t\t\t$this->admin = 0;\n\t\t\t$group_member = $ldapuser[strtolower($config['ldap']['group_member_value'])];\n\t\t\t$ldapgroups = $this->ldap->search($config['ldap']['dn_group'], LDAP::escape($config['ldap']['group_member']).'='.LDAP::escape($group_member), array('cn'));\n\t\t\tforeach($ldapgroups as $ldapgroup) {\n\t\t\t\tif($ldapgroup['cn'] == $config['ldap']['admin_group_cn']) $this->admin = 1;\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new UserNotFoundException('User does not exist in LDAP.');\n\t\t}\n\t}", "title": "" }, { "docid": "085e799e42d1a76bd6cb610e6293465c", "score": "0.5008463", "text": "public function get_details_from_ldap() {\n\t\tglobal $config;\n\t\t$attributes = array();\n\t\t$attributes[] = 'dn';\n\t\t$attributes[] = $config['ldap']['user_id'];\n\t\t$attributes[] = $config['ldap']['user_name'];\n\t\t$attributes[] = $config['ldap']['user_email'];\n\t\t$attributes[] = $config['ldap']['group_member_value'];\n\t\t$filter = LDAP::escape($config['ldap']['user_id']).'='.LDAP::escape($this->uid);\n\t\tif(isset($config['ldap']['user_active'])) {\n\t\t\t$attributes[] = $config['ldap']['user_active'];\n\t\t}\n\t\t$ldapusers = $this->ldap->search($config['ldap']['dn_user'], $filter, array_keys(array_flip($attributes)));\n\t\tif($ldapuser = reset($ldapusers)) {\n\t\t\t$this->auth_realm = 'LDAP';\n\t\t\t$this->uid = $ldapuser[strtolower($config['ldap']['user_id'])];\n\t\t\t$this->name = $ldapuser[strtolower($config['ldap']['user_name'])];\n\t\t\t$this->email = $ldapuser[strtolower($config['ldap']['user_email'])];\n\t\t\tif(isset($config['ldap']['user_active'])) {\n\t\t\t\t$this->active = 0;\n\t\t\t\tif(isset($config['ldap']['user_active_true'])) {\n\t\t\t\t\t$this->active = intval($ldapuser[strtolower($config['ldap']['user_active'])] == $config['ldap']['user_active_true']);\n\t\t\t\t} elseif(isset($config['ldap']['user_active_false'])) {\n\t\t\t\t\t$this->active = intval($ldapuser[strtolower($config['ldap']['user_active'])] != $config['ldap']['user_active_false']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->active = 1;\n\t\t\t}\n\t\t\t$this->admin = 0;\n\t\t\t$group_member = $ldapuser[strtolower($config['ldap']['group_member_value'])];\n\t\t\t$this->ldapgroups = $this->ldap->search($config['ldap']['dn_group'], LDAP::escape($config['ldap']['group_member']).'='.LDAP::escape($group_member), array('cn'));\n\t\t\tforeach($this->ldapgroups as $ldapgroup) {\n\t\t\t\tif($ldapgroup['cn'] == $config['ldap']['admin_group_cn']) $this->admin = 1;\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new UserNotFoundException('User does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "a729b599a9df343b1dcd9d546f720ca6", "score": "0.4997945", "text": "public function getMSISDN();", "title": "" }, { "docid": "d50d0a6f5c1eb4985c5ff0f56e8df21d", "score": "0.49911922", "text": "function getFromDBbyDn($user_dn) {\n return $this->getFromDBByCrit(['user_dn' => $user_dn]);\n }", "title": "" }, { "docid": "120671fd9e419f99f4092e1613662cfc", "score": "0.4985196", "text": "public function ldap_search_dn($value_to_search){\n\t\t$this->write_log(\"[function]> ldap_search_dn(\".$value_to_search.\")\");\n\t\t$filter = '(&(objectClass=person)('.$this->config['ld_attr'].'='.$value_to_search.'))';\n\n\t\t// connection handling\n\t\t$this->write_log(\"[ldap_search_dn]> Connecting to server\");\n\t\t//if(!$bcnx = $this->make_ldap_conn()){\n\t\tif(!$this->cnx){\n\t\t\t$this->write_log(\"[ldap_search_dn]> Cannot connect to server!\");\n\t\t\treturn false;\n\t\t}\n\t\t$this->write_log(\"[ldap_search_dn]> make_ldap_bind_as(\\$this->cnx,\".$this->config['ld_binddn'].\",\".$this->config['ld_bindpw'].\")\");\n\t\t//if(!$this->make_ldap_bind_as($bcnx,$this->config['ld_binddn'],$this->config['ld_bindpw'])){\n\t\tif(!$this->make_ldap_bind_as($this->cnx,$this->config['ld_binddn'],$this->config['ld_bindpw'])){\n\t\t\t$this->write_log(\"[ldap_search_dn]> Cannot bind to server!\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->write_log(\"[ldap_search_dn]> @ldap_search(\\$this->cnx,\".$this->config['basedn'].\",\".$filter.\",array('dn'),0,1)\");\n\n\t\t// look for our attribute and get always the DN for login\n\t\t//if($search = ldap_search($bcnx,$this->config['basedn'],$filter,array('dn'),0,1)){\n\t\tif($search = @ldap_search($this->cnx,$this->config['basedn'],$filter,array('dn'),0,1)){\n\t\t\t$this->write_log(\"[ldap_search_dn]> ldap_search successfull\");\n\t\t\t//$entry = ldap_get_entries($bcnx, $search);\n\t\t\t$entry = @ldap_get_entries($this->cnx, $search);\n\t\t\t//if (!empty($entry[0][strtolower($this->config['ld_attr'])][0])) {\n\t\t\tif (!empty($entry[0][\"dn\"])) {\n\t\t\t\t$this->write_log(\"[ldap_search_dn]> RESULT: \".$entry[0][\"dn\"]);\n\t\t\t\t//@ldap_unbind($bcnx);\n\t\t\t\treturn $entry[0][\"dn\"];\n\t\t\t}\n\t\t\t$this->write_log(\"[ldap_search_dn]> result is empty!\");\n\t\t\treturn false;\n\t\t}\n\t\t$this->write_log(\"[ldap_search_dn]> ldap_search NOT successfull:\");\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d8e8f2ac32e1f65d84dcc3d79744500a", "score": "0.49825165", "text": "public function getCurrentDSN() : string\n {\n return $this->currentDSN;\n }", "title": "" }, { "docid": "53ebd6ca1984e32333f01884f0fc2fa4", "score": "0.49740475", "text": "public function getLname(): string\n {\n return $this->_lname;\n }", "title": "" }, { "docid": "6914ddf10b6bdce583af0812e47b8f75", "score": "0.497217", "text": "function rebind(){\n\t\t//connect with another account to search with if necessary\n\t\t$ad_dn=$this->_ad_username;\n\t\t$this->_bind = @ldap_bind($this->_conn,$ad_dn,$this->_ad_password);\n\t\tif ($this->_bind){ return true; }\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1c716ad40022fd85f3aa4cfa97dc40cb", "score": "0.49685448", "text": "private function initWindows()\n {\n if ($this->ssl) {\n $ldap_connection = ldap_connect('ldaps://' . $this->ip, $this->port);\n } else {\n $ldap_connection = ldap_connect('ldap://' . $this->ip, $this->port);\n }\n\n // Set Protocol Version\n ldap_set_option($ldap_connection, LDAP_OPT_PROTOCOL_VERSION, 3);\n\n ldap_set_option($ldap_connection, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);\n\n ldap_set_option($ldap_connection, LDAP_OPT_REFERRALS, 0);\n // Try to Bind Ldap\n try {\n ldap_bind($ldap_connection, $this->dn, $this->password);\n } catch (Exception $e) {\n dd($e->getMessage());\n }\n\n // Return Object to use it later.\n return $ldap_connection;\n }", "title": "" }, { "docid": "ae4076071eadf5cf8763eaffa04f3d96", "score": "0.4962619", "text": "function cn()\n\t{\n\t\treturn $this->_cn;\t\n\t}", "title": "" }, { "docid": "ee9f13e4eef382ed59c66629886fb98d", "score": "0.49304226", "text": "abstract public function getDsn();", "title": "" }, { "docid": "ec3ca7518d34d0c48ee942b8a8f1b9a2", "score": "0.49153778", "text": "function setDN($username, $nosub = 0) {\r\n\t\tif ($this->users_dn == '' || $nosub) {\r\n\t\t\t$this->_dn = $username;\r\n\t\t} else {\r\n\t\t\t$this->_dn = str_replace('[username]', $username, $this->users_dn);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ca112b59b04ed28b5cdf05497bd9053a", "score": "0.4912826", "text": "public function key()\n {\n $entry = $this->current();\n return $entry instanceof Horde_Ldap_Entry ? $entry->dn() :false;\n }", "title": "" }, { "docid": "68962ae620ad70c8d08b7150ed350d2b", "score": "0.4911399", "text": "function save()\n {\n plugin::save();\n unset($this->attrs['base']);\n\n /* Try to add entries to databases */\n $str = $this->add_to_database(true);\n if($str){\n msg_dialog::display(_(\"Error\"), $str, ERROR_DIALOG);\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cat($this->dn, array('dn'));\n $a= $ldap->fetch();\n\n if (count($a)){\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n\n $this->handle_post_events(\"modify\");\n } else {\n $ldap->cd($this->config->current['BASE']);\n $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));\n $ldap->cd($this->dn);\n $ldap->add($this->attrs);\n $this->handle_post_events(\"add\");\n }\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));\n }\n\n /* Log last action */\n if($this->initially_was_account){\n new log(\"modify\",\"gofonmacro/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n }else{\n new log(\"create\",\"gofonmacro/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n }\n }", "title": "" }, { "docid": "e9a78cb577620c8d58653b2d03256a67", "score": "0.4885109", "text": "function LDAP_getNextUserID()\n{\n\treturn(LDAP_getNextID(\"user\"));\n}", "title": "" }, { "docid": "cad63fa928833c8afc0d3d02d8cf98bb", "score": "0.48807558", "text": "public function copy($entry, $newdn)\n {\n if (!$entry instanceof Horde_Ldap_Entry) {\n throw new Horde_Ldap_Exception('Parameter $entry is expected to be a Horde_Ldap_Entry object');\n }\n\n $newentry = Horde_Ldap_Entry::createFresh($newdn, $entry->getValues());\n $this->add($newentry);\n\n return $newentry;\n }", "title": "" }, { "docid": "a3005a1b06a236a5f5f1cc0667aacc15", "score": "0.48784235", "text": "public function getIdld()\n {\n return $this->idld;\n }", "title": "" }, { "docid": "572716901118ffe81fb6f143efa94c7c", "score": "0.48590386", "text": "public function getDdn(): DateTime\n {\n return $this->ddn;\n }", "title": "" }, { "docid": "4a81553ef1a529cd461b0a61ca0111e1", "score": "0.48500055", "text": "function openlucius_core_get_realname_from_uid($uid) {\n return db_select('realname', 'r')\n ->fields('r', array('realname'))\n ->condition('r.uid', $uid, '=')\n ->execute()->fetchField();\n}", "title": "" }, { "docid": "7bc27d0f4c719474104c960664cdbb93", "score": "0.48415884", "text": "public function deriveUsernameFromLdapResponse(Entry $ldap_entry): string;", "title": "" }, { "docid": "c1dd7de2d2fe650fd27cc183a71f24a5", "score": "0.48386773", "text": "public function getRealname()\n {\n return $this->realname;\n }", "title": "" }, { "docid": "91f3604589fc3dba00d0f0f29087fe16", "score": "0.48375764", "text": "public function getDomainObjectName();", "title": "" }, { "docid": "ef608dd32137d527258d00c186ee246e", "score": "0.48370728", "text": "function LDAP_getNextGroupID()\n{\n\treturn(LDAP_getNextID(\"group\"));\n}", "title": "" }, { "docid": "534689de94de54444757e5a85cfc0fee", "score": "0.48369732", "text": "function getDSN();", "title": "" }, { "docid": "bc8715bfd95f782b7bdee683067419e0", "score": "0.48246196", "text": "public function tld()\n\t{\n\t\treturn $this->tld;\n\t}", "title": "" }, { "docid": "720d4a7497c6906877d42f708504af9b", "score": "0.48172596", "text": "public function getDsn() {}", "title": "" }, { "docid": "f0cf8f14f519bda74e329b2fa8503c64", "score": "0.4806274", "text": "function _get_name($fedid)\n {\n $src = $this->_ldap_search('uid=' . $fedid);\n return array_key_exists($fedid, $src) ? $src[$fedid] : '';\n }", "title": "" }, { "docid": "f23a56e703800754606cb85a48599ff8", "score": "0.4803092", "text": "public function getIsInLDAP()\n {\n return $this->isInLDAP;\n }", "title": "" }, { "docid": "3c9f2980911873ca622a3d97f8ed1701", "score": "0.47988072", "text": "public function get_base_internet_domain()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $base_dn = $this->get_base_dn();\n\n $domain = preg_replace('/(,dc=)/', '.', $base_dn);\n $domain = preg_replace('/dc=/', '', $domain);\n\n return $domain;\n }", "title": "" }, { "docid": "597738b17152a1fb55700744254dd762", "score": "0.47896615", "text": "public function getNrg()\n {\n return $this->nrg;\n }", "title": "" }, { "docid": "8f7a64f1471ddb46c86f65adebf4a4ba", "score": "0.47883552", "text": "public function connect()\n {\n $port = $this->ssl ? $this::PORT_SSL : $this::PORT;\n\n $hostname = $this->domainController->getHostname();\n\n return $this->connection = ldap_connect($hostname, $port);\n }", "title": "" }, { "docid": "fecc6994f06baa80f8b68c83537860ab", "score": "0.4784566", "text": "public function getFqdn()\n {\n return $this->fqdn;\n }", "title": "" }, { "docid": "fecc6994f06baa80f8b68c83537860ab", "score": "0.4784566", "text": "public function getFqdn()\n {\n return $this->fqdn;\n }", "title": "" }, { "docid": "1ec312b23056168a6682cbc048c09c73", "score": "0.47718617", "text": "function LDAP_makeConnection($host, $baseDN, $pwd=\"\")\n{\n// \tldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);\n\n\t$ds = ldap_connect(\"$host\");\n\n\tldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 );\n\n\tif (!empty($pwd))\n\t\t$r=ldap_bind($ds,\"cn=admin,$baseDN\", $pwd);\n\telse\n\t\t$r=ldap_bind($ds);\n\n\tif ($r === FALSE)\n\t\treturn($r);\n\n\treturn($ds);\n}", "title": "" }, { "docid": "90bfe2ccff4f16d1c0a24621f6f25fbd", "score": "0.47676894", "text": "public static function newInstance() {\n return new self(\n \\ConfigIgestisGlobalVars::ldapUri(),\n \\ConfigIgestisGlobalVars::ldapBaseDn(),\n \\ConfigIgestisGlobalVars::ldapAdmin(),\n \\ConfigIgestisGlobalVars::ldapPassword(),\n \\ConfigIgestisGlobalVars::ldapUserFilter()\n );\n }", "title": "" }, { "docid": "2bdc10b88e03e1751d46fa74a98c1a77", "score": "0.47658053", "text": "public function getGroupTestGroupDn(): ?string;", "title": "" }, { "docid": "8850c98ee2e9c3c89ecf9bd4aea3f920", "score": "0.4763768", "text": "private function create_new_ldap_person()\n {\n $entry = Net_LDAP2_Entry::createFresh($this->dn, array_filter($this->userldaparray));\n $ldapres = $this->ldap->add($entry);\n if (PEAR::isError($ldapres)) {\n throw new Exception('LDAP Error: '.$ldapres->getMessage()); //TODO: Better error handling\n }\n // Overwrite other messages in messages array\n $this->messages = array(\"New member created with id \" . $this->userldaparray['uidNumber']);\n // Also create group\n return TRUE;\n }", "title": "" }, { "docid": "326cd66bf165b402d5e30a49edf10f6f", "score": "0.47622144", "text": "public function getFullyQualifiedDomainName();", "title": "" } ]
ac215166e21b720fff9536a84386fadd
Redirect the user to the Google authentication page.
[ { "docid": "2c4d55bc6b1ec3d665a761317c4dca29", "score": "0.7675303", "text": "public function redirectToGoogleProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" } ]
[ { "docid": "ac6acb6eeb5a8b4c6c60431f9078465d", "score": "0.7970856", "text": "public function redirectToGoogle(){\n return Socialite::driver('google')->with([\"prompt\" => \"select_account\"])->redirect();\n }", "title": "" }, { "docid": "19a9af42008ca107570ebf69f93a4a77", "score": "0.7863181", "text": "public function redirectToGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "19a9af42008ca107570ebf69f93a4a77", "score": "0.7863181", "text": "public function redirectToGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "19a9af42008ca107570ebf69f93a4a77", "score": "0.7863181", "text": "public function redirectToGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "19a9af42008ca107570ebf69f93a4a77", "score": "0.7863181", "text": "public function redirectToGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "4898c5919755ee0329d8480aea1428e6", "score": "0.7851566", "text": "public function redirectToProvider() {\n $client = self::googleClient();\n\n $auth_url = $client->createAuthUrl();\n\n return redirect($auth_url);\n }", "title": "" }, { "docid": "7ecec4b29242455a6049ad9c4f645552", "score": "0.7648852", "text": "public function redirectToProviderGoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "18014857224c120a7e6108fd31f05668", "score": "0.7617399", "text": "public function login_google(){\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "6a17cc0482d7ef6da71f8554fc4888bc", "score": "0.75896215", "text": "public function googleRedirect()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c709731ef3eb2674c145d90008a80057", "score": "0.75857204", "text": "private function googleRedirect()\n {\n return Socialite::driver(Integration::SERVICE_GOOGLE)\n ->with(['access_type' => 'offline', 'approval_prompt' => 'force'])\n ->scopes(['openid', 'profile', 'email', Google_Service_People::CONTACTS_READONLY])\n ->stateless()\n ->redirect();\n }", "title": "" }, { "docid": "ee9e81ed59f51c7d722d527d1ce9d17c", "score": "0.7547495", "text": "public function redirectToProvidergoogle()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "3c1969d88689c9406eb13bd945a30387", "score": "0.7537451", "text": "public function handleProviderCallbackGoogle()\n {\n $user = Socialite::driver('google')->user();\n $socialiteAuth = self::socialiteAuth($user);\n return redirect('/');\n }", "title": "" }, { "docid": "4648bdc55334bdc14df1520e5dd698f0", "score": "0.743955", "text": "private function authenticate()\n {\n $authUrl = $this->google_client->createAuthUrl();\n header('Location: ' . $authUrl);\n die;\n }", "title": "" }, { "docid": "27fdedd16501ab36c1e27ddce53dbf5d", "score": "0.73871046", "text": "public function redirect() {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "4ff1b493eee19ed8b7c938155d1a1540", "score": "0.7348266", "text": "public function redirect()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "edf231c97b1865cad325f7414e4ff007", "score": "0.7310625", "text": "public function redirect()\n {\n return \\Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "edf231c97b1865cad325f7414e4ff007", "score": "0.7310625", "text": "public function redirect()\n {\n return \\Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "d7eeb0f336facba16077eff74d388114", "score": "0.7304128", "text": "public function redirectToGoogle(Request $request)\n {\n session()->put('callback', $request->get('callback'));\n\n return Socialite::driver('google')->stateless()->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.708373", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.708373", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.708373", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "93ed1c8256f4964336d85e44bab95d69", "score": "0.69820356", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "61c8a08ec8b371399afbdf157269c24f", "score": "0.69519997", "text": "public function redirectToProvider()\n {\n //return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "17dd5717e7341c6af2eacb295ecac0c6", "score": "0.6946128", "text": "public static function loginWithGoogle()\n {\n $userID = AccountsService::registerGoogleUser();\n\n $isAuthorized = Auth::loginUsingId($userID);\n\n if (!$isAuthorized) {\n throw new AuthException('Authentification failed.');\n }\n\n $activeUser = AccountsService::getActiveUser();\n\n self::updateAuthToken($activeUser->id, $activeUser->email, $activeUser->password);\n\n return self::getHomePage($activeUser->role);\n }", "title": "" }, { "docid": "5785c329c371c2403aba9c49376ca6f0", "score": "0.6918601", "text": "public function login(){\n $authUrl = $this->gClient->createAuthUrl();\n return $authUrl;\n \n if (Session::has('google_token')) \n { \n $this->gClient->setAccessToken(Session::get('google_token'));\n die('You are already login');\n }\n else \n {\n //get google login url\n $authUrl = $this->gClient->createAuthUrl();\n return $authUrl;\n }\n }", "title": "" }, { "docid": "47e96e9a53a8efebb3638703a0fdc7d5", "score": "0.69128233", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')\n ->scopes(config('services.google.scopes'))\n ->with([\"access_type\" => \"offline\", \"prompt\" => \"consent select_account\"])\n ->redirect();\n }", "title": "" }, { "docid": "eddd485e35f1ad78787ae7c1136a162e", "score": "0.6891828", "text": "public function redirectToProvider()\n {\n\n\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "8d193b8b87dbd2f2f15701d317bd1d32", "score": "0.68892765", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->scopes(['profile', 'email'])->redirect();\n }", "title": "" }, { "docid": "bd4ddfc40ffc729fa80a24f2aefa9322", "score": "0.6835073", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')\n ->scopes(['openid', 'profile', 'email'])\n ->redirect();\n }", "title": "" }, { "docid": "382f567f008ef14b5a70f06954c1b156", "score": "0.6780261", "text": "public function redirect()\n {\n header('Location: ' . $this->getAuthorizeUrl());\n }", "title": "" }, { "docid": "48ecde54ec98472e814ecddf70010913", "score": "0.67220163", "text": "public function handleGoogleCallback(){\n try {\n $user = Socialite::driver('google')->stateless()->user();;\n $finduser = User::where('google_id', $user->id)->first();\n if($finduser){\n Auth::login($finduser);\n return redirect()->route('site.account.index');\n }else{\n $newUser = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'google_id'=> $user->id,\n 'password' => ''\n ]);\n Auth::login($newUser);\n return redirect()->route('site.account.index');\n }\n } catch (Exception $e) {\n return redirect()->route('site.catalog.index')->with('error', 'Авторизация через Google в данный момент недоступна.');\n }\n }", "title": "" }, { "docid": "82a52f35f9ff8a09b8de8ae0f4ffa5fb", "score": "0.670542", "text": "public function redirectToProvider()\n {\n //return Socialite::driver('google')->redirect();\n return Scorialite::driver('google')->stateless()->user();\n }", "title": "" }, { "docid": "32a125fc593933b243deab52bcab080f", "score": "0.66645205", "text": "public static function auth()\n {\n if ($_SERVER['REQUEST_URI'] !== '/auth/') {\n header('Location: ' . $_SERVER['HTTP_REFERER'] . '/auth/');\n }\n }", "title": "" }, { "docid": "c29b4b6283b4dbbc7e3f49708e6b1583", "score": "0.66598386", "text": "public function script_authenticate_redirect( $url = null ) {\n\t\t\tif( empty( $url )) {\n\t\t\t\tif( false !== strpos( '?', $this->authURL )) {\n\t\t\t\t\t$url = $this->authURL .'?'. $this->tokenName .'=';\n\t\t\t\t} else {\n\t\t\t\t\t$url = $this->authURL .'&'. $this->tokenName .'=';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$code = \"\n\t\t\t\t<script>\n\t\t\t\t\tfunction onSignIn(googleUser) {\n\t\t\t\t\t\tconsole.log( 'Redirecting to: {$url}' );\n\t\t\t\t\t\tvar id_token = googleUser.getAuthResponse().id_token;\n\t\t\t\t\t\twindow.location = '{$url}' + id_token;\n\t\t\t\t\t}\n\t\t\t\t</script>\\n\";\n\t\t\treturn $code;\n\t\t}", "title": "" }, { "docid": "801355026d09f3ffa0144a66c6c02e41", "score": "0.6608524", "text": "public function handleProviderCallback()\n {\n if (Input::get('error') == 'access_denied') {\n\n return redirect('/');\n\n } else {\n\n $user = Socialite::driver('google')->user();\n\n $data = [\n 'name' => $user->getName(),\n 'email' => $user->getEmail()\n ];\n\n $id = Users::getId($data['email']);\n\n if ($id) {\n Auth::loginUsingId($id);\n\n return redirect('/');\n //return redirect()->route('/home');\n\n } else {\n // return view('auth.login', ['loginStatus' => 'You account do not register']);\n return redirect('/login/?loginStatus=YOUR GOOGLE EMAIL IS NOT REGISTERED IN THE SYSTEM');\n\n }\n }\n }", "title": "" }, { "docid": "83f13add8d43cfe79288241d9718a170", "score": "0.6599739", "text": "function sign_in_required()\n {\n header('location:'.get_signin_url());\n }", "title": "" }, { "docid": "5d94e502c6a3d9ca24e60e849ac6ad18", "score": "0.6586717", "text": "public function redirectToProvider()\n\t{\n\t\treturn Socialite::driver('google')\n\t\t ->scopes(['openid', 'profile', 'email', Google_Service_Drive::DRIVE_READONLY])\n\t\t\t\t\t\t->with(['access_type' => 'offline', 'prompt' => 'consent'])\n\t\t ->redirect();\n\t}", "title": "" }, { "docid": "50b09ed48a2bb816acd8e5de20db4caf", "score": "0.65673536", "text": "function oAuthRedirect() {\n\t\t\tBigTree::redirect($this->AuthorizeURL.\n\t\t\t\t\"?client_id=\".urlencode($this->Settings[\"key\"]).\n\t\t\t\t\"&redirect_uri=\".urlencode($this->ReturnURL).\n\t\t\t\t\"&response_type=code\".\n\t\t\t\t\"&scope=\".urlencode($this->Scope).\n\t\t\t\t\"&approval_prompt=force\".\n\t\t\t\t\"&access_type=offline\");\n\t\t}", "title": "" }, { "docid": "42ba35427411e3ec9e8da9de5ded9fad", "score": "0.6541641", "text": "public function oauthRedirect(Request $request)\n {\n // to gvreporter://login?code=ABC123\n if($request->get('continue', 'web') === 'app') {\n $request->session()->flash('oauth::continue', 'app');\n }\n return Socialite::driver('google')\n ->with(['hd' => 'gobettivolta.edu.it' ])\n ->redirect();\n }", "title": "" }, { "docid": "7159218429b662f8bfae1af988d86057", "score": "0.6523506", "text": "public function handleGoogleCallback()\n {\n try {\n \n $googleUser = Socialite::driver('google')->user();\n $user = User::where([\n 'email' => $googleUser->getEmail()\n ])->first();\n\n if(!$user) {\n $password = Str::random(8);\n $newUser = User::create([\n 'name' => $googleUser->name,\n 'email' => $googleUser->getEmail(),\n 'google_id'=> $googleUser->id,\n 'password' => Hash::make($password)\n ]);\n\n Mail::to($newUser)->send(new SendGoogleUserPassword($newUser, $password));\n }\n return redirect('/login')->with('status', 'Google authentication successfylly');\n \n } catch (ClientException $e) {\n return redirect('/login')->with('status', 'Failed to authenticate with google');\n }\n }", "title": "" }, { "docid": "cc3263e18597d50fc7cf57c202aa6ba0", "score": "0.6496981", "text": "function cs_google_sign_button() {\r\n\r\n global $cs_google_settings;\r\n $cs_google_settings['google_login_button'] = 'Google';\r\n return '<a href=\"' . cs_google_login_url() . (isset($_GET['redirect_to']) ? '&redirect=' . $_GET['redirect_to'] : '') . '\" rel=\"nofollow\">' . $cs_google_settings['google_login_button'] . '</a><br />';\r\n}", "title": "" }, { "docid": "3469c46c61db726a24f6f588e9acd99d", "score": "0.649088", "text": "function cs_google_login_compat() {\r\n\r\n global $wp;\r\n if ($wp->request == 'loginGoogle' || isset($wp->query_vars['loginGoogle'])) {\r\n cs_google_login_action();\r\n }\r\n}", "title": "" }, { "docid": "2aae3fb150a46f8041e214462256025f", "score": "0.6490705", "text": "public function redirect()\n {\n return new RedirectResponse('http://google.com/');\n }", "title": "" }, { "docid": "2663a1ac6f9631187526a37438befb62", "score": "0.64632416", "text": "public function GoogleLogin(){\n\t\t\n\t\t/* Google App Client Id */\n\t\tdefine('CLIENT_ID', '325224881481-mulslpp5kpe0dfvgr84p5bakfmicvsh6.apps.googleusercontent.com');\n\n\t\t/* Google App Client Secret */\n\t\tdefine('CLIENT_SECRET', 'MfMmHK2jFdICS2JqnUjeJmZD');\n\n\t\t/* Google App Redirect Url */\n\t\tdefine('CLIENT_REDIRECT_URL', base_url().'user/googlelogin');\n\n\t\t$this->load->library('GoogleLoginApi');\n\t\t$data = $this->googleloginapi->GetAccessToken(CLIENT_ID, CLIENT_REDIRECT_URL, CLIENT_SECRET, $_GET['code']);\n\t\t$userData = $this->googleloginapi->GetUserProfileInfo($data['access_token']);\n\n\t\t$email = $userData['emails'][0]['value'];\n\t\t$result = $this->user_model->googleLogin($email,$userData);\n\n\t\tif($result){\n\t\t\t/*$this->load->view('user/mentor');*/\n\t\t\tredirect('../mentee');\n\t\t}else{\n\t\t\tredirect(base_url());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "13783e9a6ddc7fb5c80b249f28853f9a", "score": "0.64357305", "text": "public static function redirect() {\n $auth_uri = self::getAuthorizationUri();\n header(\"Location: $auth_uri\", true, 301);\n exit();\n }", "title": "" }, { "docid": "4b59d389eadb0bb33511a07b87cf257f", "score": "0.6426849", "text": "public function redirect($url, $urlFail)\n {\n //Redirigimos al usuario al inicio de sesion de 'Gmail': \n $_SESSION['url'] = $url;\n $_SESSION['urlFail'] = $urlFail;\n\n return Socialite::driver('google')->redirect();\n \n }", "title": "" }, { "docid": "d1ae1ede8afb823d4284b4e66bf674ec", "score": "0.6416693", "text": "public function handleGoogleCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n $finduser = User::where('google_id', $user->id)->first();\n\n if($finduser){\n Auth::login($finduser);\n return redirect()->intended('/')->with('success', 'Welcome To TajaMandi.');\n }\n else{\n $monthyear = date('F, Y');\n $newUser = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'google_id'=> $user->id,\n 'role_id'=> 3,\n 'is_verified' => 1,\n 'monthyear'=>$monthyear,\n 'password' => Hash::make('123456dummy')\n ]);\n Auth::login($newUser);\n $newUser->notify(new NewUserNotification($newUser));\n return redirect()->intended('/')->with('success', 'You have successfully signed in with google.');\n }\n } catch (Exception $e) {\n return redirect()->route('index')->with('failure', 'You already have an account with this gmail address.');\n }\n }", "title": "" }, { "docid": "4b7cd35cdc9588b5d74fa30716ed5d27", "score": "0.6413866", "text": "public function googleoauth_login_form() {\n\t\t$clientId = get_option( 'google_oauth_client_id' );\n\t\t$autologinActive = get_option( 'google_oauth_autologin_active' );\n\n\t\t$redirectUrl = admin_url( 'admin-ajax.php?action=googleoauth-callback' );\n\t\tsetcookie('requested_url', $_REQUEST[\"redirect_to\"] );\n\n\n\t\tif ( isset( $_GET['google-oauth-error'] ) ) {\n\t\t\techo '<div style=\"padding:10px;background-color:#FFDFDD;border:1px solid #ced9ea;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;\"><p style=\"line-height:1.6em;\"><strong>Error!</strong> Error connecting to Google Apps. </p></div><br>';\n\t\t}\n\t\telse if ( isset( $_GET['google-domain-error'] ) ) {\n\t\t\t$username = htmlentities($_GET['google-oauth-username']);\n\t\t\techo '<div style=\"padding:10px;background-color:#FFDFDD;border:1px solid #ced9ea;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;\"><p style=\"line-height:1.6em;\"><strong>Error!</strong> User ' . $username . ' is not authorised to login. </p></div><br>';\n\t\t}\n\t\telse if ( $autologinActive && !isset( $_GET['loggedout']) ){\n\t\t\t//straight through to autologin - no form rendered\n\t\t\t$loginUrl = 'https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=' . $clientId . '&redirect_uri=' . $redirectUrl . '&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&[email protected]&access_type=offline';\n\t\t\twp_redirect($loginUrl);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "762ba359c258051c2232119e6362c67d", "score": "0.6389539", "text": "public function redirectToProvider()\n {\n return redirect($this->provider->getAuthorizationUrl());\n }", "title": "" }, { "docid": "1818694489b5cde6e178a4645b0fb9d9", "score": "0.63833064", "text": "protected function _to_login_page( )\n {\n redirect ( BASE_URL. 'signin' ) ;\n }", "title": "" }, { "docid": "1654a103d0d2f0c4e1b19f544187ea79", "score": "0.6346354", "text": "public function handleProviderCallbackgoogle()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n return response()->json(['status' => \"error\", 'msg' => \"Failed Google Redirected.\"]);\n }\n\n // check if they're an existing user\n $existingUser = User::where('email', $user->email)->first();\n if($existingUser){\n // log them in\n auth()->login($existingUser, true);\n } else {\n // create a new user\n $newUser = new User;\n $newUser->username = $user->name;\n $newUser->email = $user->email;\n $newUser->sign_date = date('Y-m-d h:i:s');\n $newUser->google_id = $user->id;\n $newUser->save();\n\n RoleUser::create([\n 'user_id' => $newUser->id,\n 'role_id' => 3,\n ]);\n\n auth()->login($newUser, true);\n }\n $result = Category::all();\n\n return response()->json(['status' => \"success\", 'msg' => \"Successfully Logged In.\", \"data\" => $result]);\n }", "title": "" }, { "docid": "fcf6f9321f759da4a6cb9a7996057ab4", "score": "0.6341825", "text": "public function googleLoginAction()\n {\n $aGoogleConfig = array(\n 'callbackUrl' => $this->siteUrl.'index/google-login',\n 'siteUrl' => 'https://www.google.com/accounts/',\n 'authorizeUrl' => 'https://www.google.com/accounts/OAuthAuthorizeToken',\n 'requestTokenUrl' => 'https://www.google.com/accounts/OAuthGetRequestToken',\n 'accessTokenUrl' => 'https://www.google.com/accounts/OAuthGetAccessToken',\n 'consumerKey' => 'test.masterholiday.net',\n 'consumerKey' => '277786433425.apps.googleusercontent.com',\n 'consumerSecret' => '3p_ZBUFPVOuIjbTUTIORsnFl',\n 'consumerSecret' => 'CzXeDFxClCADXL9RxCD8zuBz'\n );\n\n $consumer = new Zend_Oauth_Consumer($aGoogleConfig);\n $token = null;\n\n if (isset($_GET['oauth_token'])) {\n try {\n $token = $consumer->getAccessToken( $_GET, unserialize($_SESSION['GOOGLE_REQUEST_TOKEN']) );\n\n }\n catch (Exception $e) {\n $this->_helper->layout()->disableLayout();\n ?>\n <html><head></head><body onload=\"window.close();\"></body></html>\n <?php\n die();\n }\n }\n\n if (!$token) {\n $token = $consumer->getRequestToken(array('scope' => 'http://www-opensocial.googleusercontent.com/api/people/ https://www.googleapis.com/auth/userinfo#email'));\n $_SESSION['GOOGLE_REQUEST_TOKEN'] = serialize($token);\n $consumer->redirect();\n }\n else {\n $client = $token->getHttpClient($aGoogleConfig);\n $client->setUri('https://www-opensocial.googleusercontent.com/api/people/@me/@self');\n $client->setMethod(Zend_Http_Client::GET);\n $response = $client->request();\n $data = Zend_Json::decode($response->getBody());\n $client = $token->getHttpClient($aGoogleConfig);\n $client->setUri('https://www.googleapis.com/userinfo/email');\n $client->setMethod(Zend_Http_Client::GET);\n $response = $client->request();\n $emailData = explode('&', $response->getBody());\n if ($emailData) {\n foreach ($emailData as $sRow) {\n $aRow = explode('=', $sRow);\n $data[$aRow[0]] = $aRow[1];\n }\n }\n $oUser = new User();\n if ($oUser->emailExists($data['email']) && !$this->doSocialLogin('google', $data['entry']['id'], $data['email'], $data['entry']['name']['formatted'], true)) {\n $this->_helper->layout()->disableLayout();\n ?>\n <html><head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <script>\n function refreshParent() {window.opener.showError('Пользователь с таким E-mail уже зарегистрирован'); window.close();}\n </script>\n </head><body onload=\"refreshParent();\"></body></html>\n <?php\n die();\n }\n if ($this->doSocialLogin('google', $data['entry']['id'], $data['email'], $data['entry']['name']['formatted'])) {\n $this->_helper->layout()->disableLayout();\n ?>\n <html><head>\n <script>\n function refreshParent() {window.opener.getUserHeader(); window.opener.hideUserPopup(); window.close();}\n </script>\n </head><body onload=\"refreshParent();\"></body></html>\n <?php\n die();\n }\n else {\n die('ERROR');\n }\n }\n }", "title": "" }, { "docid": "6a0bb19b57d9629926141f0fd6eaf805", "score": "0.63347214", "text": "function cs_google_edit_profile_redirect() {\r\n\r\n global $wp;\r\n if (isset($wp->query_vars['editProfileRedirect'])) {\r\n if (function_exists('bp_loggedin_user_domain')) {\r\n header('LOCATION: ' . bp_loggedin_user_domain() . 'profile/edit/group/1/');\r\n } else {\r\n header('LOCATION: ' . self_admin_url('profile.php'));\r\n }\r\n exit;\r\n }\r\n}", "title": "" }, { "docid": "6bdbe516be7e13e765ff0a54ec624cad", "score": "0.629137", "text": "public function googleoauth_page_init() {\n\t\t$is_google_oauth_user = get_user_meta( wp_get_current_user()->ID, 'google-oauth-user', true);\n\n\t\tif ( is_user_logged_in() && $is_google_oauth_user != '' && ! isset( $_COOKIE['google_oauth_id_token'] ) ) {\n\t\t\twp_logout();\n\t\t\twp_redirect( wp_login_url());\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "c05935600921ccdb6d6af1c3f9ef8cbe", "score": "0.6279369", "text": "public function connectGoogleDrive()\n {\n session()->put('gdrive_redirect', action('SettingsController@settings'));\n\n return redirect(action('GoogleDriveController@callback'));\n }", "title": "" }, { "docid": "770a13a2b1a15bcd3d0e0edfc06f5a17", "score": "0.6237774", "text": "public function redirectToProvider()\n {\n return SocialiteAuth::getDriver()->redirect();\n }", "title": "" }, { "docid": "24b7dc2fafca2c23fc7d344784fabaef", "score": "0.6227584", "text": "public function google_login(){\n\t // Include the google api php libraries\n\t\tinclude_once APPPATH.\"libraries/google-api-php-client/Google_Client.php\";\n\t\tinclude_once APPPATH.\"libraries/google-api-php-client/contrib/Google_Oauth2Service.php\";\n\t // Google Project API Credentials\n\t\t$clientId = 'sorry but this is secret :)';\n\t\t$clientSecret = 'sorry but this is secret :)';\n\t\t$redirectUrl = base_url() . 'login/google/';\n\n \t // Google Client Configuration\n\t\t$gClient = new Google_Client();\n\t\t$gClient->setApplicationName('Login to japege.herokuapp.com');\n\t\t$gClient->setClientId($clientId);\n\t\t$gClient->setClientSecret($clientSecret);\n\t\t$gClient->setRedirectUri($redirectUrl);\n\t\t$google_oauthV2 = new Google_Oauth2Service($gClient);\n\n\t\tif (isset($_REQUEST['code'])) {\n\t\t\t$gClient->authenticate();\n\t\t\t$this->session->set_userdata('token', $gClient->getAccessToken());\n\t\t\tredirect($redirectUrl);\n\t\t}\n\n\t\t$token = $this->session->userdata('token');\n\t\tif (!empty($token)) {\n\t\t\t$gClient->setAccessToken($token);\n\t\t}\n\n\t\tif ($gClient->getAccessToken()) {\n\t\t\t$userProfile = $google_oauthV2->userinfo->get();\n // Preparing data before inserting to DB\n\t\t\t$userData['oauth_provider'] = 'google';\n\t\t\t$userData['oauth_uid'] = $userProfile['id'];\n\t\t\t$userData['first_name'] = $userProfile['given_name'];\n\t\t\t$userData['last_name'] = $userProfile['family_name'];\n\t\t\t$userData['email_address'] = $userProfile['email'];\n\t\t\t$userData['gender'] = $userProfile['gender'];\n\t\t\t$userData['locale'] = $userProfile['locale'];\n\t\t\t$userData['image'] = $userProfile['picture'];\n\n\t\t\t$this->session->set_userdata($userData);\n\t\t\t$userID = $this->customer->checkUser($userData);\n\t\t\t //a customer has logged in with google account before\n\t\t\tif(!empty($userID)){\n\n\t\t\t\t$this->login->customer_log_in($userID,true);\n\t\t\t} //a customer logs in with gogle 1st time\n\t\t} else {\n\t\t\tredirect($gClient->createAuthUrl());\n\t\t}\n\t}", "title": "" }, { "docid": "901e7149ee5f66b8756cb773a74e621a", "score": "0.6224012", "text": "protected function google_login($data, $googleId) {\n $getuser = $this->signup->userAlreadyExists($googleId, 2); // Call your model to check if user already register with you.\n /* NOTE : I am checking user availability with the Google id. You may also check using email if you have login check with user email */\n if (count($getuser) == 0) {\n $user_id = $this->signup->addUser($data); // Call your model to Insert new user\n $this->ion_auth_signup($data);\n return 2; // Return 2 to set the redirections where you want to redirect user after login.\n } else {\n $this->ion_auth_signup($data);\n return 2; // Return 1 to set the redirections where you want to redirect user after login.\n }\n }", "title": "" }, { "docid": "2270b49e69061868efab1f43dfaf76c9", "score": "0.6203719", "text": "protected function redirectTo()\n {\n if(Auth::guest())\n {\n return redirect(route((new BAuth)->login_route))->withErrors(\"Anda Harus login terlebih dahulu.\");\n }\n else\n {\n return redirect(route((new BAuth)->login_redirect))->withErrors(\"Akses tidak diperbolehkan.\");\n }\n }", "title": "" }, { "docid": "f8784ffed4049d0d634457154b6137cc", "score": "0.61883247", "text": "public function redirectUser() {\r\n\t\tif($this->statusCheck() == true) {\r\n\t\t\theader(\"location: usercontroller.php\");\r\n\t\t} else {\r\n\t\t\theader(\"location: login.php\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b3088f1d5f1f39aa9fce5ac202e60a10", "score": "0.6163637", "text": "public function redirectedAction()\r\n {\r\n $locale = $this->socialManager->getlocale();\r\n $providerName = $this->params()->fromRoute('provider');\r\n $callback = $this->getCallbackUrl($providerName);\r\n $queryParams = $this->params()->fromQuery();\r\n $userProfile = 'no-provider';\r\n if (false !== $provider = $this->socialManager->startProvider($providerName)) {\r\n $userProfile = $provider->sendClientRequest($callback, $queryParams);\r\n }\r\n $result = $this->socialManager->handleSocialAuthRedirect($userProfile);\r\n $this->redirectMessage()->addRedirectMessages($result);\r\n if ($result->isValid()) {\r\n $this->redirect()->toRoute('default', ['locale' => $locale, 'controller' => 'index', 'action' => 'index']);\r\n } else {\r\n $this->redirect()->toRoute('default', ['locale' => $locale, 'controller' => 'social', 'action' => 'failed-login']);\r\n }\r\n }", "title": "" }, { "docid": "21dcb49fc0e1dfd929291ac802e9ab0e", "score": "0.6139043", "text": "public function googlelogin(){\n include_once APPPATH.\"libraries/google-api-php-client/Google_Client.php\";\n include_once APPPATH.\"libraries/google-api-php-client/contrib/Google_Oauth2Service.php\";\n \n // Google Project API Credentials\n $clientId = 'Insert Google Client ID';\n $clientSecret = 'Insert Google Client secret';\n $redirectUrl = base_url() . 'user_authentication/';\n \n // Google Client Configuration\n $gClient = new Google_Client();\n $gClient->setApplicationName('Login to greenindia.com');\n $gClient->setClientId($clientId);\n $gClient->setClientSecret($clientSecret);\n $gClient->setRedirectUri($redirectUrl);\n $google_oauthV2 = new Google_Oauth2Service($gClient);\n\n if (isset($_REQUEST['code'])) {\n $gClient->authenticate();\n $this->session->set_userdata('token', $gClient->getAccessToken());\n redirect($redirectUrl);\n }\n\n $token = $this->session->userdata('token');\n if (!empty($token)) {\n $gClient->setAccessToken($token);\n }\n\n if ($gClient->getAccessToken()) {\n $userProfile = $google_oauthV2->userinfo->get();\n // Preparing data for database insertion\n $userData['oauth_provider'] = 'google';\n $userData['oauth_uid'] = $userProfile['id'];\n $userData['first_name'] = $userProfile['given_name'];\n $userData['last_name'] = $userProfile['family_name'];\n $userData['email'] = $userProfile['email'];\n $userData['gender'] = $userProfile['gender'];\n $userData['locale'] = $userProfile['locale'];\n $userData['profile_url'] = $userProfile['link'];\n $userData['picture_url'] = $userProfile['picture'];\n // Insert or update user data\n $insertt = $this->register_model->checkGoogleUser($userData);\n if(!empty($insertt)){\n $data['userData'] = $insertt;\n $this->session->set_userdata('logged_in_user',$insertt);\n \n } else {\n $data['userData'] = array();\n }\n } else {\n $data['authUrl'] = $gClient->createAuthUrl();\n }\n return $data;\n }", "title": "" }, { "docid": "43c7543e69e2b3300e46a712cb84ed08", "score": "0.6123347", "text": "public function redirect()\n {\n $this->getRedirectResponse()->send();\n }", "title": "" }, { "docid": "63770426016588d95a820eed48b33037", "score": "0.6118973", "text": "public function handleGoogleCallback()\n {\n $user = Socialite::driver('google')->stateless()->user();\n $existingUser = User::where('email', $user->email)->first();\n if($existingUser){\n // log them in\n auth()->login($existingUser, true);\n return redirect('/');\n } else {\n try {\n $create = new User;\n $create->name = $user->name;\n $create->email = $user->email;\n $create->google_id = $user->id;\n $create->avatar = $user->avatar;\n $create->avatar_original = $user->avatar_original;\n $create->save();\n Auth::loginUsingId($create->id);\n\n return redirect('/');\n\n } catch (Exception $e) {\n\n return $e;\n\n }\n }\n}", "title": "" }, { "docid": "f376da82b29b885980fc3d24416cc92e", "score": "0.6106016", "text": "public function google($role) {\n if(Session::isset('user')) {\n header('location: /');\n }\n $data = [];\n if(strpos($_GET['url'], 'code')) {\n $google = new Google($role, substr($_GET['url'], strpos($_GET['url'], '=')+1));\n $googleUser = $google->getUserInfo();\n if(($user = $this->userModel->findUserByEmail($googleUser->email))) {\n if($user) {\n if($user->account_status == 0) {\n Session::set('message', 'Account approval pending!');\n Session::set('type', 'warning');\n } else if ($user->account_status == 2) {\n Session::set('message', 'Your account has been suspended by the admin!');\n Session::set('type', 'warning');\n } else if ($user->account_status == 3) {\n Session::set('message', 'Your account request has been rejected!');\n Session::set('type', 'warning');\n } else {\n Session::set('user', serialize($user));\n Session::set('message', 'Welcome ' . $user->name . '!');\n Session::set('type', 'success');\n if($intended) {\n header('location: ' . $intended);\n }\n else\n header('location: /');\n die();\n }\n } else {\n Session::set('message', 'Something went wrong!');\n Session::set('type', 'error');\n header('location: /');\n die();\n }\n } else {\n $data['prefilled'] = true;\n $data['email'] = $googleUser->email;\n $data['name'] = $googleUser->name;\n $data['role'] = $role;\n $this->view(\"pages/auth/signup\", $data);\n }\n } else {\n Session::set('message', 'Something went wrong!');\n Session::set('type', 'error');\n header('location: /');\n die();\n }\n }", "title": "" }, { "docid": "2d515284c878b674302b128959f0d909", "score": "0.6102752", "text": "private function redirect_if_authenticated () {\n\t\t# redirects user to login page if unauthenticated\n\t\tif(!$this->session->token || !$this->session->id) {\n\t\t\t$loc = base_url(uri_string()).'?'.$_SERVER['QUERY_STRING'];\n\t\t\theader('location:'.base_url().'?redirect=true&loc='.$loc);\n\t\t}\n\t}", "title": "" }, { "docid": "fbe75eb81967401c17e3b174518381b0", "score": "0.60754377", "text": "public function handleGoogleCallback()\n {\n try {\n\n $user = Socialite::driver('google')->user();\n\n $userLog = User::where('email', $user->email)->first();\n\n if($userLog){\n\n Auth::login($userLog);\n\n return redirect('/home');\n\n }else{\n $userGmail = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'google_id'=> $user->id,\n 'password' => encrypt('123456dummy')\n ]);\n\n $userRole = Role::where('name','user')->first();\n\n $userGmail->roles()->attach($userRole);\n\n Auth::login($userGmail);\n\n return redirect('/home');\n }\n\n } catch (Exception $e) {\n dd($e->getMessage());\n }\n }", "title": "" }, { "docid": "2718f7296112e4883b3e346852e1da15", "score": "0.6052986", "text": "public function getGoogleCallback()\n\t{\n\t $code = Input::get( 'code' );\n\t $googleService = OAuth::consumer( 'Google' );\n\t if ( !empty( $code ) ) {\n\t $token = $googleService->requestAccessToken( $code );\n\t $result = json_decode( $googleService->request( 'https://www.googleapis.com/oauth2/v1/userinfo' ), true );\n\n\t if(@$result['id']) \n\t {\n\t \t$user = User::where('google_id', $result['id'])->first();\n\t \tif( ! $user)\n\t \t{\n\t \t\t$result['username'] = explode('@', $result['email']);\n\t \t\t$result['username'] = $result['username'][0];\n\t \t\tSession::flash('result', $result);\n\t \t\treturn Redirect::to('auth/dang-ky');\n\t \t} else {\n\t \t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t $user = Sentry::findUserById($user->id);\n\t\t\t\t\t Sentry::login($user, true);\n\t\t\t\t\t return Redirect::to('/');\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\LoginRequiredException $e)\n\t\t\t\t\t{\n\t\t\t\t\t $error = 'Login field is required.';\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t\t\t\t{\n\t\t\t\t\t $error = 'User not found.';\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotActivatedException $e)\n\t\t\t\t\t{\n\t\t\t\t\t $error = 'User not activated.';\n\t\t\t\t\t}\n\t \t\t\n\t \t\treturn Redirect::to('auth/dang-nhap')->withErrors($error);\n\t \t}\n\t }\n\t }\n\t else {\n\t $url = $googleService->getAuthorizationUri();\n\t return Redirect::to( (string)$url );\n\t }\n\t}", "title": "" }, { "docid": "6af110454d18aaa5b509c7e51a81853a", "score": "0.6038682", "text": "public function loginWithGoogle() {\n $code = Input::get( 'code' );\n $key=Session::get('iid');\n\n\n\n // get google service\n $googleService = OAuth::consumer( 'Google' );\n\n // check if code is valid\n\n // if code is provided get user data and sign in\n if ( !empty( $code ) ) {\n\n // This was a callback request from google, get the token\n // (REQUESTING for the token)\n $token = $googleService->requestAccessToken( $code );\n\n // Send a request with it(requesting user information)\n $result = json_decode( $googleService->request( 'https://www.googleapis.com/oauth2/v1/userinfo' ), true );\n\n if(!empty($token)){ /*if the permission is given(session tokens)*/\n\n try{\n\n\n if(!empty($key)){ /*if it's the sign up process*/\n\n // Find the user using the user id\n $user = Sentry::findUserByLogin($result['email']);\n\n // Log the user in\n Sentry::login($user, false);\n\n //should display an error message saying the user is already registered\n\n $user_id = $user->id;\n return Redirect::to('login')->withErrors(array('failure' => 'You are already registered. Want to <a href=\"users/'.$user_id.'/home\">login</a> ? ')); \n\n }else{ /*if it's the login process*/\n\n // Find the user using the user id\n $user = Sentry::findUserByLogin($result['email']);\n\n // Log the user in\n Sentry::login($user, false);\n\n //should display an error message saying the user is already registered\n\n $user_id = $user->id;\n return Redirect::to('users/'.$user_id.'/home'); \n\n }\n\n\n } catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n {\n\n\n if(!empty($key)){ /*if it's the sign up process*/\n\n //selected institute id in the registration\n $ins= Institution::whereinstitution_id(Session::get('iid'))->first();\n return View::make('home/googlePlusSignup')->with('result',$result)->with('ins',$ins); \n }else{ /*if it's the login process*/\n\n return Redirect::to('login')->withErrors(array('failure' => 'You are not registered in our system. Please sign up first')); \n }\n\n }\n }\n } // if not ask for permission first (google sign in page)\n else {\n // get googleService (google plus) authorization\n $url = $googleService->getAuthorizationUri();\n $iid = Input::get('instituteId');\n\n Session::put('iid',$iid);\n\n // return to google login url\n return Redirect::to( (string)$url );\n }\n\t}", "title": "" }, { "docid": "2af6287269fe6c789781dbe48e679785", "score": "0.6032881", "text": "private function beginGoogleAuthentication( array $reqs, $buttonAuthenticationRequestName ) {\n\t\t$req =\n\t\t\tGoogleAuthenticationRequest::getRequestByName( $reqs,\n\t\t\t\t$buttonAuthenticationRequestName );\n\t\tif ( !$req ) {\n\t\t\treturn AuthenticationResponse::newAbstain();\n\t\t}\n\t\t$client = $this->getGoogleClient();\n\t\t$this->manager->setAuthenticationSessionData( self::RETURNURL_SESSION_KEY,\n\t\t\t$req->returnToUrl );\n\n\t\treturn AuthenticationResponse::newRedirect( [\n\t\t\tnew GoogleServerAuthenticationRequest(),\n\t\t], $client->createAuthUrl() );\n\t}", "title": "" }, { "docid": "2839df4824b7a3baefca2b87eb089024", "score": "0.6028825", "text": "public function loginWithGoogle() {\n\t $code = Input::get( 'code' );\n\n\t // get google service\n\t $googleService = OAuth::consumer( 'Google' );\n\n\t // check if code is valid\n\n\t // if code is provided get user data and sign in\n\t if ( !empty( $code ) ) {\n\n\t // This was a callback request from google, get the token\n\t $token = $googleService->requestAccessToken( $code );\n\n\t // Send a request with it\n\t $result = json_decode( $googleService->request( 'https://www.googleapis.com/oauth2/v1/userinfo' ), true );\n\n\t $message = 'Your unique Google user id is: ' . $result['id'] . ' and your name is ' . $result['name'];\n\t #echo $message. \"<br/>\";\n\t \n\t $user = User::where('email', $result['email'])->first();\n\t \n\t if ( !$user ) {\n\t \t$user = new User;\t \t\n\t \t$user->email = $result['email'];\n\t \t$user->name = $result['name'];\n\t \t$user->given_name = $result['given_name'];\n\t \t$user->family_name = $result['family_name'];\n\t \t$user->picture = $result['picture'];\n\t \t$user->save();\n\t }\n\n\t Auth::login($user);\n\t \n\n\t //Var_dump\n\t //display whole array().\n\t #dd($result);\n\t return Redirect::route('homepage');\n\n\t }\n\t // if not ask for permission first\n\t else {\n\t \tif ( Input::has('error')){\n\t \t\t$error = Input::get('error');\n\t \t\tSession::flash('message', $error);\n\t \t\treturn Redirect::to('/');\n\t \t}\n\n\t // get googleService authorization\n\t $url = $googleService->getAuthorizationUri();\n\n\t // return to google login url\n\t return Redirect::to( (string)$url );\n\t }\n\t}", "title": "" }, { "docid": "d3d62459efe18522d28d5806ef3cd3c7", "score": "0.6028286", "text": "function cs_google_login_action() {\r\n\t\r\n\t\r\n global $wp, $wpdb, $cs_google_settings;\r\n \r\n // include_once plugin_dir_url( __FILE__ ) . '/sdk/init.php';\r\n \r\n \tinclude_once 'sdk/apiClient.php';\r\n\t//echo 'abcdefghijklmnopqrstuvwxyz';\r\n\tinclude_once 'sdk/contrib/apiOauth2Service.php';\r\n\t\r\n\t\r\n\tglobal $cs_theme_options;\r\n\t//$cs_theme_options = get_option('cs_theme_options');\r\n\t\r\n\t$client = new apiClient();\r\n\t$client->setClientId($cs_theme_options['cs_google_client_id']);\r\n\t$client->setClientSecret($cs_theme_options['cs_google_client_secret']);\r\n\t$client->setDeveloperKey($cs_theme_options['cs_google_api_key']);\r\n\t$client->setRedirectUri(cs_google_login_url());\r\n\t$client->setApprovalPrompt('auto');\r\n\t\r\n\t$oauth2 = new apiOauth2Service($client);\r\n \r\n if (isset($_GET['code'])) {\r\n if (isset($cs_google_settings['cs_google_login_redirect_url']) && $cs_google_settings['cs_google_login_redirect_url'] != '' && $cs_google_settings['cs_google_login_redirect_url'] != 'auto') {\r\n $_GET['redirect'] = $cs_google_settings['cs_google_login_redirect_url'];\r\n } else {\r\n\t\t$_GET['redirect'] = cs_google_login_url();\r\n\t}\r\n set_site_transient( cs_google_uniqid().'_google_r', $_GET['redirect'], 3600);\r\n $client->authenticate();\r\n $access_token = $client->getAccessToken();\r\n set_site_transient( cs_google_uniqid().'_google_at', $access_token, 3600);\r\n header('Location: ' . filter_var(cs_google_login_url() , FILTER_SANITIZE_URL));\r\n exit;\r\n }\r\n \r\n $access_token = get_site_transient( cs_google_uniqid().'_google_at');\r\n\r\n if ($access_token !== false) {\r\n $client->setAccessToken($access_token);\r\n }\r\n if (isset($_REQUEST['logout'])) {\r\n delete_site_transient( cs_google_uniqid().'_google_at');\r\n $client->revokeToken();\r\n }\r\n if ($client->getAccessToken()) {\r\n $u = $oauth2->userinfo->get();\r\n\t//var_dump($u);\r\n // The access token may have been updated lazily.\r\n set_site_transient( cs_google_uniqid().'_google_at', $client->getAccessToken(), 3600);\r\n\r\n $email = filter_var($u['email'], FILTER_SANITIZE_EMAIL);\r\n if (!is_user_logged_in()) {\r\n\t\r\n\t $ID = email_exists($email);\t\r\n\t\t\r\n if ($ID == NULL) { // Register\r\n\r\n \r\n if ($ID == false) { // Real register\r\n\r\n //require_once get_template_directory() . WPINC . '/registration.php';\r\n $random_password = wp_generate_password($length = 12, $include_standard_special_chars = false);\r\n if (!isset($cs_google_settings['google_user_prefix'])) $cs_google_settings['google_user_prefix'] = 'Google - ';\r\n $sanitized_user_login = sanitize_user($cs_google_settings['google_user_prefix'] . $u['name']);\r\n if (!validate_username($sanitized_user_login)) {\r\n $sanitized_user_login = sanitize_user('google' . $user_profile['id']);\r\n }\r\n $defaul_user_name = $sanitized_user_login;\r\n $i = 1;\r\n while (username_exists($sanitized_user_login)) {\r\n $sanitized_user_login = $defaul_user_name . $i;\r\n $i++;\r\n }\r\n $ID = wp_create_user($sanitized_user_login, $random_password, $email);\r\n if (!is_wp_error($ID)) {\r\n\t\t\t# Add Role\r\n\t\t\t$new_user = new WP_User( $ID );\r\n\t\t\t$new_user->set_role( 'subscriber' );\t\r\n \r\n\t\t\t# Notification\r\n\t\t\twp_new_user_notification($ID, $random_password);\r\n $user_info = get_userdata($ID);\r\n \r\n\t\t\twp_update_user(array(\r\n 'ID' => $ID,\r\n 'display_name' \t=> $u['name'],\r\n 'first_name' \t=> $u['given_name'],\r\n 'last_name' \t\t=> $u['family_name'],\r\n 'googleplus' \t\t=> $u['link']\r\n ));\r\n \tupdate_user_meta($ID, 'cs_google_default_password', $user_info->user_pass);\r\n \tdo_action('cs_google_user_registered', $ID, $u, $oauth2);\r\n\t\t\t\tupdate_user_meta($ID, 'cs_user_registered', 'google');\r\n } else {\r\n return;\r\n }\r\n }\r\n \r\n if (isset($cs_google_settings['google_redirect_reg']) && $cs_google_settings['google_redirect_reg'] != '' && $cs_google_settings['google_redirect_reg'] != 'auto') {\r\n set_site_transient( cs_google_uniqid().'_google_r', $cs_google_settings['google_redirect_reg'], 3600);\r\n }\r\n }\r\n if ($ID) { \r\n\r\n $secure_cookie = is_ssl();\r\n $secure_cookie = apply_filters('secure_signon_cookie', $secure_cookie, array());\r\n global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie\r\n\r\n $auth_secure_cookie = $secure_cookie;\r\n wp_set_auth_cookie($ID, true, $secure_cookie);\r\n $user_info = get_userdata($ID);\r\n do_action('wp_login', $user_info->user_login, $user_info);\r\n //do_action('cs_google_user_logged_in', $ID, $u, $oauth2);\r\n update_user_meta($ID, 'google_profile_picture', $u['picture']);\r\n }\r\n } else {\r\n \r\n $user_info = wp_get_current_user();\r\n set_site_transient($user_info->ID.'_cs_google_admin_notice',__('This Google profile is already linked with other account. Linking process failed!', 'directory'), 3600);\r\n \r\n }\r\n } else {\r\n if (isset($cs_google_settings['google_redirect']) && $cs_google_settings['google_redirect'] != '' && $cs_google_settings['google_redirect'] != 'auto') {\r\n $_GET['redirect'] = $cs_google_settings['google_redirect'];\r\n }\r\n if (isset($_GET['redirect'])) {\r\n set_site_transient( cs_google_uniqid().'_google_r', $_GET['redirect'], 3600);\r\n }\r\n \r\n $redirect = get_site_transient( cs_google_uniqid().'_google_r');\r\n \r\n if ($redirect || $redirect == cs_google_login_url()) {\r\n $redirect = site_url();\r\n set_site_transient( cs_google_uniqid().'_google_r', $redirect, 3600);\r\n }\r\n header('LOCATION: ' . $client->createAuthUrl());\r\n exit;\r\n }\r\n cs_google_redirect();\r\n}", "title": "" }, { "docid": "a88a818ccb80d07adb08942122ade88f", "score": "0.6005278", "text": "public function logInWithGoogle( $callback )\n\t{\n\t\treturn $this->request->logInSocial( 'google_oauth2', $callback );\n\t}", "title": "" }, { "docid": "4e42ad272b9970bb1460f407897f73cf", "score": "0.6002279", "text": "public function handleGoogleCallback(Request $request)\n {\n $oAuthUser = Socialite::driver('google')->stateless()->user();\n\n $user = User::where('email', $oAuthUser->getEmail())->first();\n\n $fullName = $oAuthUser->getName();\n $fullName = explode(' ', $fullName);\n $firstName = $fullName[0];\n $lastName = '';\n if (count($fullName) > 1) {\n $lastName = $fullName[1];\n }\n\n if (! $user) {\n return Redirect::away(env('WEBSITE_URL').'/signup?'\n .'email='.$oAuthUser->getEmail()\n .'&name='.$oAuthUser->getNickname()\n .'&first_name='.$firstName\n .'&last_name='.$lastName);\n }\n\n $tokenResult = $user->createToken($user->name);\n\n return Redirect::away(session()->get('callback').'?'\n .'access_token='.$tokenResult->accessToken\n .'&id='.$tokenResult->token->id\n .'&ed='.$tokenResult->token->expires_at);\n }", "title": "" }, { "docid": "ad85925d1188108dea3ab9620e9d6dd0", "score": "0.59995294", "text": "public function redirectToGeneratedUrl() {\n //permissions\n $scopes = array(\n \"read_friendlists\",\n \"manage_friendlists\",\n \"publish_actions\",\n \"user_groups\",\n \"user_friends\",\n \"user_about_me\",\n \"user_location\",\n \"user_birthday\",\n \"email\"\n );\n $loginUrl = $this->loginHelper->getLoginUrl($scopes);\n redirect($loginUrl);\n }", "title": "" }, { "docid": "e110172ccaa84b50aa7b3f887870e496", "score": "0.5999418", "text": "static function login_redirect() {\r\n redirect(static::LOGIN_PAGE.\"?redirect=\".urlencode($_SERVER['REQUEST_URI']));\r\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.59970707", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "05d7e220f3931fab55969708c4ea2547", "score": "0.599328", "text": "public function redirectIfLogedin()\n {\n $session_user_id = Session::get('user_id');\n if(!empty($session_user_id)) {\n $redirect_library = new Redirect();\n $redirect_library->go($this->redirect_path);\n }\n }", "title": "" }, { "docid": "e66ebf7ed94cf578e3bc6653a8a82dbb", "score": "0.5991229", "text": "public function googleCallback()\n {\n $socialUser = Socialite::driver('google')->user();\n\n $user = User::where('google_id', $socialUser->getId())->first();\n\n if (!$user) {\n $withSameEmail = User::where('email', $socialUser->getEmail())->count();\n if ($withSameEmail) {\n return redirect('/login')->withErrors(array('oAuth' => 'User with this email already exists.'));\n }\n $names = explode(' ', $socialUser->getName());\n $firstName = $names[0];\n $lastName = sizeof($names) > 1 ? $names[1] : null;\n $google_id = $socialUser->getId();\n $user = User::create([\n 'email' => $socialUser->getEmail(),\n 'firstName' => $firstName,\n 'lastName' => $lastName,\n ]);\n $user->google_id = $google_id;\n $user->social_email = $socialUser->getEmail();\n $user->save();\n }\n\n Auth::login($user);\n\n return redirect('/');\n }", "title": "" }, { "docid": "6ff803202f5b8b819b4f7812d161b681", "score": "0.5977799", "text": "public function redirect() {\n\t\tif ($this->errors) {\n\t\t\t// error\n\t\t\treturn redirect($this->loginPath())->withInput($this->input)->withErrors($this->errors);\n\t\t} else {\n\t\t\t// ok\n\t\t\treturn redirect()->to($this->redirect); // default\n\t\t}\n\t}", "title": "" }, { "docid": "501712fea6453f4fbf875a6ebc3cf911", "score": "0.5965062", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "e7585376f7e23f593736455a92f6142b", "score": "0.59535384", "text": "public function redirectToProvider()\n {\n\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "f79e6ce8f21bdeee4131e188b069cd53", "score": "0.5921085", "text": "protected function redirectTo($request)\n {\n if ($request->input('token')){\n $user = User::where('auth_token', $request->input('token'))->first();\n if ($user){\n Auth::loginUsingId($user->id);\n return false;\n }\n }\n return 'http://domain-auth.com/login?redirect_url=domain-2.com';\n }", "title": "" }, { "docid": "2d34d64c8a7e9f19915c91c723c893c4", "score": "0.59182835", "text": "public function auth()\n {\n if($this->lock->check()) return;\n return $this->redirect();\n }", "title": "" }, { "docid": "514b166f7177d93758fdfa9dd1890162", "score": "0.5910349", "text": "public function callback(SocialGoogleAccountService $service) {\n $user = $service->createOrGetUser(Socialite::driver('google')->user());\n auth()->login($user);\n \n if (empty(auth()->user()->username) && auth()->user()->onboarded == 0) {\n return redirect()->to('/socialite/complete');\n } else {\n return redirect()->to('/dashboard');\n }\n }", "title": "" }, { "docid": "34ad8904f643cb0ed1179904bfaaed17", "score": "0.58960605", "text": "public function redirect ()\n {\n $registry = \\Factory::getRegistry();\n $_SESSION[$this->referrer_cookie] = $registry->get(\"REQUEST_PATH\");\n header(\"Location: \" . $this->redirect_path);\n }", "title": "" }, { "docid": "0e76efc290e819fea41a1ebd3175c1ca", "score": "0.5883621", "text": "public function tpg_redirect(){\r\n\t\tif (!is_user_logged_in()) {\r\n\t\t\t$new_site='http://'.$this->rd_opts['rd-path'];\r\n\t\t\twp_redirect($new_site); \r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "815d385a0edd6c6edf316f1e29f7760d", "score": "0.5883336", "text": "public function redirectTo()\n {\n if (Auth::check()) {\n // logined user, only users with non-temp email & pass access and binded can unbind\n if (!Auth::user()->isIndependent()) {\n return redirect()->route('account.settings');\n }\n if (Auth::user()->getExtra('aauth_id')) {\n return $this->generateOperationView(Auth::user()->getExtra('aauth_nickname'));\n }\n }\n return new RedirectResponse('https://cn.aauth.link/#/launch/'.config('services.aauth.client_id'));\n }", "title": "" }, { "docid": "86d0eb66700264a5898f29df07397c15", "score": "0.5873833", "text": "public function redirectToProvider()\n {\n // save anything you will need later, for example a url to come back to\n Session::put('url.intended', URL::previous());\n\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "a4bf283fb6cd66fc24ed4199c991a1a0", "score": "0.58706164", "text": "public function redirectToProvider(Request $request)\n {\n //valiadate attributes of record\n $validator = Validator::make($request->all(), [\n '_token' => \"bail|required\",\n 'choice' => \"required|string|max:64\",\n ]);\n\n if ($validator->fails()) {\n $error = 'Please select a valid login choice.';\n return redirect('/?error=' . $error);\n }\n\n $choice = $request->input('choice');\n\n if ($choice == \"Login with UPR/UPRM account\") {\n return Socialite::driver('google')->redirect();\n } else {\n $error = 'Please select a valid login choice.';\n return redirect('/?error=' . $error);\n }\n\n }", "title": "" }, { "docid": "93e88b3b54248b408d46e2b20ef17924", "score": "0.5858626", "text": "function goToAuthUrl() {\n $url = \"http://localhost:8081/auth/oauth/authorize?client_id=ClientId&redirect_uri=http://prj.local:80/callback.php&scope=user_info&response_type=code&secret=secret\";\n if ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n header(\"location: \".$url, true);\n }\n}", "title": "" }, { "docid": "4b59a6d5d7849e86a0504d99901ad05e", "score": "0.58520645", "text": "protected function redirectTo()\n {\n // Try to login user into other domains Not working :(\n// $domains = ['http://directevents.test'];\n// foreach ($domains as $domain) {\n// $client = new Client(); //GuzzleHttp\\Client\n// $result = $client->post($domain.'/authUser', [\n// 'form_params' => [\n// 'sessionId' => \\Session::getId(),\n// '_token' => csrf_token()\n// ]\n// ]);\n// }\n\n if (\\Auth::user()->hasRole('administrator')) {\n return '/admin';\n } else if (\\Auth::user()->hasRole('standhouder')) {\n $explodedUrl = explode('.',request()->getHost());\n\n $domain = count($explodedUrl) > 2 ? $explodedUrl[1] : $explodedUrl[0];\n\n if ($domain == 'directevents') {\n return '/dashboard';\n } else {\n return '/';\n }\n }\n }", "title": "" }, { "docid": "6b49daf5d8c2c6a3990ffacb2f244cd5", "score": "0.585191", "text": "public function redirectToProvider()\n\t {\n\t\t\t return Socialite::driver('facebook')->redirect();\n\t\t\t /*return Socialite::driver('facebook')->fields([\n 'first_name', 'last_name', 'email', 'gender', 'birthday'\n ])->scopes([\n 'email', 'user_birthday'\n ])->redirect();*/\n\t }", "title": "" }, { "docid": "f7a3720cfa4cc6db422672f9a520dc71", "score": "0.5843526", "text": "function ges_redirect( $url )\r\n{\r\n if( getsessionvar(\"user_header302_relocation\") == true )\r\n { \r\n header( \"302 Moved\" ); \r\n }\r\n\r\n if( strpos( $url, \"Location\" ) === false )\r\n\t$url = \"Location:\" . $url;\r\n \r\n header( $url );\r\n}", "title": "" }, { "docid": "09c255c4edd8a67c715235e6e1eabd6f", "score": "0.5841473", "text": "public function gmailcallback() {\n\t\t$this->load->library('gmailLogin');\n\t\tif($this->gmaillogin->checkRedirectCode()){\n\t\t\t$guser=$this->gmaillogin->getUserData();\n\n\t\t\t$user = array(\n\t\t\t\t'id'=>$guser->getId(),\n\t\t\t\t'name'=>$guser->getName(),\n\t\t\t\t'email'=>($guser->getEmail()) ? $guser->getEmail() : '',\n\t\t\t);\n\t\t\t$this->socialLogin($user,'G');\n\t\t}else{\n\t\t\t// flash message and redirect\n\t}\n}", "title": "" } ]
36796518d373b59a1da2677e27772fcd
get results from elastic search
[ { "docid": "9b0f8b6031b9b71749ea08bc17d99a74", "score": "0.61104745", "text": "public function getResultList($query, $type)\n {\n $elasticSearch = new \\EWW\\Dpf\\Services\\ElasticSearch();\n\n // die();\n $results = $elasticSearch->search($query, $type);\n\n return $results['hits'];\n }", "title": "" } ]
[ { "docid": "f591acb7e2306fcf98692245959db39e", "score": "0.7250804", "text": "function search() {\n\n /* Start building the query object. We hope to end up with something like:\n $reqeust = '{\n \"from\" : 0,\n \"size\": 10,\n \"query\" : {\n \"terms\" : {\n \"creator\" : [ \"card\" ]\n }\n },\n sort: {\n title: {\n order: \"desc\"\n }\n }\n }';\n */\n $request = array();\n\n // Users can query by specifying an url param like &filter=title:ender\n // TODO: We should allow for multiple filters.\n $key_and_val = explode(\":\", $this->get('GET.filter'));\n if (count($key_and_val) == 2 and !empty($key_and_val[0]) and !empty($key_and_val[1])) {\n $request['query']['query_string']['fields'] = array($key_and_val[0]);\n $request['query']['query_string']['query'] = $key_and_val[1];\n $request['query']['query_string']['default_operator'] = 'AND';\n } else {\n $request['query'] = array(\"match_all\" => new stdClass);\n }\n \n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $incoming_sort = $this->get('GET.sort');\n $sort_field_and_dir = explode(\" \", $this->get('GET.sort'));\n if (count($sort_field_and_dir) == 2) {\n $request['sort'] = array($sort_field_and_dir[0] => array('order' => $sort_field_and_dir[1]));\n }\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n \n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n \n // We don't want dupes. Dedupe based on hollis_id\n $deduped_docs = $this->dedupe_using_hollis_id($cleaned_results);\n \n $this->set('results', $deduped_docs);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n }", "title": "" }, { "docid": "8695148884d216ce7e112b1b19e1abf0", "score": "0.7140981", "text": "public static function jsonSearch($term){\n\n $params['index'] = 'twitter';\n $params['type'] = 'drone';\n $params['body']['query']['match']['tweet'] = $q;\n $client = new Elasticsearch\\Client();\n\n $results2 = $client->search($params);\n //print_r($results2);\n $array_tweet = array();\n foreach($results2['hits']['hits'] as $hits){\n //print_r($hits);\n foreach($hits['_source'] as $message){\n\n $array_tweet[] = $message;\n\n echo $message . '<br>';\n\n }\n\n\n }\n print_r($array_tweet);\n\n\n\n }", "title": "" }, { "docid": "3b21bba491b97c6ab7e26b06edd3a6a1", "score": "0.68556046", "text": "public function index()\n {\n if (!$this->config()->enabled) {\n $this->httpError(500, 'ElasticsearchController is not enabled');\n exit(1);\n }\n\n $endpoint = Environment::getEnv('APP_SEARCH_ENDPOINT');\n $searchKey = Environment::getEnv('APP_SEARCH_API_SEARCH_KEY');\n $engineName = Environment::getEnv('APP_SEARCH_ENGINE_PREFIX');\n\n if (!$endpoint || !$searchKey || !$engineName) {\n $this->httpError(500, 'Required environment value not found for search-proxy');\n }\n\n if (strpos($searchKey, 'search-') !== 0) {\n $this->httpError(500, 'Elastic search key not correctly configured for search-proxy');\n }\n\n // Ensure we have POST data before attempting to extract it\n $postData = array_keys($_POST);\n\n if (sizeof($postData) === 0) {\n $this->httpError(500, 'No data submitted to search endpoint');\n }\n\n $url = $this->getRequest()->getURL();\n $action = substr(rtrim($url, '/'), strrpos($url, '/') + 1);\n\n // trim .json if present\n if (substr($action, -5) === '.json') {\n $action = substr($action, 0, -5);\n }\n\n if (!in_array($action, $this->config()->allow_list)) {\n $this->httpError(403, 'Attempted to access blocked endpoint');\n }\n\n // If we get here, all checks have passed and we just need to extract the POST data. We don't care what the actual data\n // is, so we run no further checks. This is an awkward way of extracting the POST data, which is sent by the Elastic\n // search-ui system as application/json in the POST body, but this isn't understood by PHP, so PHP assumes that the\n // POST body is actually the array *key* with an empty value - hence the use of array_keys to flip the array and then\n // extracting the zeroth key.\n $postData = $postData[0];\n\n // Allow POST data to be manipulated by extensions\n $this->extend('augmentElasticQuery', $postData);\n\n /**\n * Map of $_SERVER keys => Elastic header names that should be preserved and included in the request\n */\n $passthruHeaders = [\n 'HTTP_X_SWIFTYPE_CLIENT' => 'X-Swiftype-Client',\n 'HTTP_X_SWIFTYPE_CLIENT_VERSION' => 'X-Swiftype-Client-Version',\n 'HTTP_X_SWIFTYPE_INTEGRATION' => 'x-swiftype-integration',\n 'HTTP_X_SWIFTYPE_INTEGRATION_VERSION' => 'x-swiftype-integration-version'\n ];\n\n $headers = [\n sprintf('Authorization: Bearer %s', $searchKey), // Insert the API key stored in the environment\n 'Content-Type: application/json;charset=utf-8' // Force to application/json as we've overwritten this in the JS so PHP knows it's a POST\n ];\n\n // Pass-through optional HTTP headers provided by the Elastic search-ui JS\n foreach ($passthruHeaders as $httpKey => $elasticKey) {\n if (isset($_SERVER[$httpKey])) {\n $headers[] = sprintf('%s: %s', $elasticKey, $_SERVER[$httpKey]);\n }\n }\n\n $indexName = Environment::getEnv('APP_SEARCH_ENGINE_INDEX_NAME') ?: 'content';\n\n // Hard-code the API path to ensure an attacker can't exploit other endpoints on the App Search instance\n $path = sprintf('/api/as/v1/engines/%s-%s/%s', $engineName, $indexName, $action);\n $fullUrl = $endpoint . $path;\n\n $curl = curl_init($fullUrl);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);\n\n // Set a reasonable timeout to lower attack surface\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config()->curl_connect_timeout);\n curl_setopt($curl, CURLOPT_TIMEOUT, $this->config()->curl_timeout);\n\n // Check for proxy vars and set if present\n $proxyURL = Environment::getEnv('SS_OUTBOUND_PROXY');\n $proxyPort = Environment::getEnv('SS_OUTBOUND_PROXY_PORT');\n\n if ($proxyURL && $proxyPort) {\n curl_setopt($curl, CURLOPT_PROXY, \"{$proxyURL}:{$proxyPort}\");\n }\n\n // This will return the results of the API query out to stdout for the frontend library to interpret\n $response = curl_exec($curl);\n\n if (curl_errno($curl)) {\n $curlError = curl_error($curl);\n }\n curl_close($curl);\n\n if (isset($curlError)) {\n Injector::inst()->get(LoggerInterface::class)->warning(\n sprintf(\"error connecting to elastic: %s\", $curlError)\n );\n }\n\n // Allow response data from Elastic to be manipulated by extensions prior to being returned\n $this->extend('augmentElasticResults', $response);\n\n return $response;\n }", "title": "" }, { "docid": "fe503a282401e39a889a4bc3f0f3bd32", "score": "0.6758282", "text": "protected function findResults() {\n\n $keys = $this->keywords;\n\n // Build matching conditions.\n $query = $this->database\n ->select('search_index', 'i', array('target' => 'replica'))\n ->extend('Drupal\\search\\SearchQuery')\n ->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender');\n\n // Join on {contact} and {users_field_data} to get user's published status.\n // This join on {contact} also serves the advanced search items\n // (in $this->advanced) that are in {contact}.\n $query->join('contact', 'c', 'c.id = i.sid');\n $query->join('users_field_data', 'ufd', 'ufd.uid = c.user_id');\n $query->condition('ufd.status', 1);\n\n $query\n ->searchExpression($keys, $this->getPluginId());\n\n // @todo ===============\n // Handle advanced search filters in the f query string.\n // \\Drupal::request()->query->get('f') is an array that looks like this in\n // the URL: ?f[]=first_name:Jane&f[]=gender:f\n // So $parameters['f'] looks like:\n // array('first_name:Jane', 'gender:f');\n // We need to parse this out into query conditions, some of which go into\n // the keywords string, and some of which are separate conditions.\n //\n // Note: advanced form fields are added in searchFormAlter(),\n // and the URL containing the \"f\" parameter is built in\n // buildSearchUrlQuery().\n $parameters = $this->getParameters();\n if (!empty($parameters['f']) && is_array($parameters['f'])) {\n // @todo This loop should probably be moved to a helper function.\n $filters = array();\n // Match any query value that is an expected option and a value\n // separated by ':' like 'first_name:Jane'.\n $pattern = '/^(' . implode('|', array_keys($this->advanced)) . '):([^ ]*)/i';\n foreach ($parameters['f'] as $item) {\n if (preg_match($pattern, $item, $m)) {\n // Use the matched value as the array key to eliminate duplicates.\n $filters[$m[1]][$m[2]] = $m[2];\n }\n }\n\n // Now turn these into query conditions. This assumes that everything in\n // $filters is a known type of advanced search as defined in\n // $this->advanced.\n foreach ($filters as $option => $matched) {\n $info = $this->advanced[$option];\n // Insert additional conditions. By default, all use the OR operator.\n $operator = empty($info['operator']) ? 'OR' : $info['operator'];\n $where = new Condition($operator);\n foreach ($matched as $value) {\n $where->condition($info['column'], $value);\n }\n $query->condition($where);\n if (!empty($info['join'])) {\n $query->join($info['join']['table'], $info['join']['alias'], $info['join']['condition']);\n }\n }\n }\n // ===============\n // Add the ranking expressions.\n $this->addFedoraResourceRankings($query);\n\n // Run the query.\n $find = $query\n // Add the language code of the indexed item to the result of the query,\n // since the entity will be rendered using the respective language.\n ->fields('i', array('langcode'))\n // And since SearchQuery makes these into GROUP BY queries, if we add\n // a field, for PostgreSQL we also need to make it an aggregate or a\n // GROUP BY. In this case, we want GROUP BY.\n ->groupBy('i.langcode')\n ->limit(10)\n ->execute();\n\n // Check query status and set messages if needed.\n $status = $query->getStatus();\n\n if ($status & SearchQuery::EXPRESSIONS_IGNORED) {\n drupal_set_message($this->t('Your search used too many AND/OR expressions. Only the first @count terms were included in this search.', array('@count' => $this->searchSettings->get('and_or_limit'))), 'warning');\n }\n\n if ($status & SearchQuery::LOWER_CASE_OR) {\n drupal_set_message($this->t('Search for either of the two terms with uppercase OR. For example, cats OR dogs.'), 'warning');\n }\n\n if ($status & SearchQuery::NO_POSITIVE_KEYWORDS) {\n drupal_set_message($this->formatPlural($this->searchSettings->get('index.minimum_word_size'), 'You must include at least one keyword to match in the content, and punctuation is ignored.', 'You must include at least one keyword to match in the content. Keywords must be at least @count characters, and punctuation is ignored.'), 'warning');\n }\n\n return $find;\n }", "title": "" }, { "docid": "fc70c44904fd6a1d1c0665ec47dee10d", "score": "0.6714994", "text": "public function search()\n {\n $query = $this->usedQuery();\n\n $query = $this->configQuery($query);\n\n $results = $this->elasticsearch->search($query);\n\n return new ElasticSearchCollection($results);\n }", "title": "" }, { "docid": "a855206a1786c770b50c619ca8c2e4b0", "score": "0.67126286", "text": "public static function search($args = array()){\n $urlParams = \"\";\n if (isset($args[\"params\"])) {\n foreach ($args[\"params\"] as $key => $val)\n $urlParams .= ($urlParams ? \"&\" : \"\") . $key.\"=\".$val;\n $urlParams = $urlParams ? \"?\".$urlParams : \"\";\n }\n $url = Util::getElasticUrl().self::$entityIndexName.\"/_search\".$urlParams;\n\n $context = stream_context_create(array('http' => array(\n 'method' => \"POST\",\n 'header' => \"Content-Type: application/x-www-form-urlencoded\\r\\n\",\n 'content' => \"\"\n )));\n\n return self::callElastic($url, $context);\n }", "title": "" }, { "docid": "2e0acd7ce2c782da23aa5317b77f1924", "score": "0.6701477", "text": "public function getResults($query)\n {\n return $this->elasticsearch->search($query);\n }", "title": "" }, { "docid": "1ba50b94678b5a023b59cf18370b985e", "score": "0.66499645", "text": "public function grabContent($page,$query,$query_terms) {\r\n\t\t$hmp_elastic = \\Drupal::state()->get('hmp_elastic');\r\n\t\t$url = $hmp_elastic['elastic_server'];\r\n\t\t$username = $hmp_elastic['elastic_username'];\r\n\t\t$password = $hmp_elastic['elastic_password'];\r\n\r\n\t\t$index = $hmp_elastic['elastic_index'];\r\n\t\t$doc_type = 'default';\r\n\t\t$port = 443;\r\n\t\t$json_array = array(\r\n\t\t\t'from' => $page*10,\r\n\t\t\t'size' => 10,\r\n\t\t\t'query' => array(\r\n\t\t\t\t'function_score' => array(\r\n\t\t\t\t\t'query' => array(\r\n\t\t\t\t\t\t'bool' => array(\r\n\t\t\t\t\t\t\t'must' => array(\r\n\t\t\t\t\t\t\t\t/*array(\r\n\t\t\t\t\t\t\t\t\t'multi_match' => array(\t\r\n\t\t\t\t\t\t\t\t\t\t'query' => $query,\r\n\t\t\t\t\t\t\t\t\t\t'fields' => ['title','body','terms'],\r\n\t\t\t\t\t\t\t\t\t\t'operator' => 'and'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t),*/\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'match' => array(\r\n\t\t\t\t\t\t\t\t\t\t'status' => '1'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t/*'should' => array(\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'match' => array(\r\n\t\t\t\t\t\t\t\t\t\t'terms' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t'query' => 'article',\r\n\t\t\t\t\t\t\t\t\t\t\t'boost' => 1\r\n\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\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\t'functions' => array(\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'filter' => array(\r\n\t\t\t\t\t\t\t\t'range' => array(\r\n\t\t\t\t\t\t\t\t\t'created' => array(\r\n\t\t\t\t\t\t\t\t\t\t'gte' => 'now-1y',\r\n\t\t\t\t\t\t\t\t\t\t'lte' => 'now'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),'weight' => 5\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'filter' => array(\r\n\t\t\t\t\t\t\t\t'range' => array(\r\n\t\t\t\t\t\t\t\t\t'created' => array(\r\n\t\t\t\t\t\t\t\t\t\t'gte' => 'now-2y',\r\n\t\t\t\t\t\t\t\t\t\t'lte' => 'now-1y'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),'weight' => 4\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'filter' => array(\r\n\t\t\t\t\t\t\t\t'range' => array(\r\n\t\t\t\t\t\t\t\t\t'created' => array(\r\n\t\t\t\t\t\t\t\t\t\t'gte' => 'now-4y',\r\n\t\t\t\t\t\t\t\t\t\t'lte' => 'now-2y'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t),'weight' => 3\r\n\t\t\t\t\t\t)\r\n\t\t\t\t))\r\n\t\t\t)\r\n\t\t);\r\n\t\tif($query != '') \r\n\t\t\t$json_array['query']['function_score']['query']['bool']['must'][] = array(\r\n\t\t\t\t'multi_match' => array(\t\r\n\t\t\t\t\t'query' => $query,\r\n\t\t\t\t\t'fields' => ['title','body','terms'],\r\n\t\t\t\t\t'operator' => 'and'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\tif($query_terms !== '') {\r\n\t\t\t$json_array['query']['function_score']['query']['bool']['must'][] = array(\r\n\t\t\t\t'multi_match' => array(\t\r\n\t\t\t\t\t'query' => $query_terms,\r\n\t\t\t\t\t'fields' => ['terms']\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\t$json_doc = json_encode($json_array);\r\n\r\n\t//\techo $json_doc;exit;\r\n\t $baseUri = $url.'/'.$index.'/'.$doc_type.'/_search';\r\n\r\n\t $ci = curl_init();\r\n\t curl_setopt($ci, CURLOPT_URL, $baseUri);\r\n\t curl_setopt($ci, CURLOPT_PORT, $port);\r\n\t curl_setopt($ci, CURLOPT_TIMEOUT, 200);\r\n\t curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1);\r\n\t curl_setopt($ci, CURLOPT_FORBID_REUSE, 0);\r\n\t curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'POST');\r\n\t curl_setopt($ci, CURLOPT_POSTFIELDS, $json_doc);\r\n\t curl_setopt($ci, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\r\n\t curl_setopt($ci, CURLOPT_USERPWD, $username . \":\" . $password);\r\n\t $response = curl_exec($ci);\r\n\t $data = json_decode($response);\r\n\t //echo '<pre>';print_r($data);exit;\r\n\t return $data->hits;\r\n\t}", "title": "" }, { "docid": "6001dbb1408ba7f9b63e5a5c263604ef", "score": "0.663908", "text": "function search()\n\t{\n\t\t$ch = curl_init($this->query);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$this->response = curl_exec($ch);\n\t\tcurl_close($ch);\t\n\t}", "title": "" }, { "docid": "e949d6a96ebdf2852651d8e284311b19", "score": "0.66197807", "text": "public function execute() {\n if(is_null($this->client)) {\n $this->client = $this->getConnection();\n }\n if(is_null($this->query)) {\n throw new ElasticException('No query');\n }\n\n list($query_data, $meta) = $this->constructQuery($this->source, $this->query, $this->aggs, $this->post_query, $this->settings);\n\n $results_set = $this->query($query_data, $meta);\n $results = $this->processResults($results_set, $meta);\n $results = $this->postProcessResults($this->post_query, $results, $meta);\n\n return $results;\n }", "title": "" }, { "docid": "70f23a8bbf4e5106f3d8f47fa3e09ed4", "score": "0.66022456", "text": "public function index()\n {\n // use sphinxapi to search by keyword\n $data = Input::json();\n $keyword = $data->get('keyword');\n $rank_mode = $data->get('rank_mode');\n $match_mode = $data->get('match_mode');\n\n\n $cl = new SphinxClient();\n $cl->setServer('127.0.0.1', 9312);\n\n /// match modes\n switch ($match_mode) {\n case \"SPH_MATCH_BOOLEAN\":\n $cl->setMatchMode(SPH_MATCH_BOOLEAN);\n break;\n case \"SPH_MATCH_ANY\":\n $cl->setMatchMode(SPH_MATCH_ANY);\n break;\n case \"SPH_MATCH_ALL\":\n $cl->setMatchMode(SPH_MATCH_ALL);\n break;\n // case \"SPH_MATCH_FULLSCAN\":\n // $cl->setMatchMode(SPH_MATCH_FULLSCAN);\n // break;\n default:\n $cl->setMatchMode(SPH_MATCH_BOOLEAN);\n break;\n }\n\n /// ranking modes (ext2 only)\n switch ($rank_mode) {\n case \"SPH_RANK_PROXIMITY_BM25\":\n $cl->setRankingMode(SPH_RANK_PROXIMITY_BM25);\n break;\n case \"SPH_RANK_NONE\":\n $cl->setRankingMode(SPH_RANK_NONE);\n break;\n case \"SPH_RANK_WORDCOUNT\":\n $cl->setRankingMode(SPH_RANK_WORDCOUNT);\n break;\n case \"SPH_RANK_SPH04\":\n $cl->setRankingMode(SPH_RANK_SPH04);\n break;\n default:\n $cl->setRankingMode(SPH_RANK_WORDCOUNT);\n break;\n }\n\n // can set weight for each attribute\n\n $result = $cl->Query($keyword, 'test1, testrt');\n $idList = array();\n\n if ($result['total_found'] != '0') {\n foreach ($result['matches'] as $key => $val) {\n $idList[] = $key;\n }\n }\n\n return Response::json(['ids' => $idList, 'matchMode' => $match_mode, 'rankMode' => $rank_mode, 'keyword' => $keyword]);\n }", "title": "" }, { "docid": "6dd4c486f3d30ad3a16317d04350e6cd", "score": "0.6586921", "text": "public function getHits(\\Application\\Model\\Search\\Query $search){}", "title": "" }, { "docid": "35d20fc69d513974bf3fd7da6757412d", "score": "0.6509815", "text": "public function & get_search () \n {\n # Request translation and resources for the searched word\n $url = API_SERVER.'/api/analytics/search';\n $data = $this->_curl_request( $url, $this->_params );\n $resources = json_decode( $data, true );\n $this->_params['lang'] = isset( $this->_params['lang'] ) ? $this->_params['lang'] : 'en';\n\n # Celi service not available\n if ( isset( $resources['success'] ) AND !$resources['success'] )\n {\n $results = array( 'success'=>false, 'errcode'=>201, 'message'=>$resources['message'] );\n }\n elseif ( $resources == null )\n {\n // En este caso CLIR está caído y habrá que hacer una búsqueda local\n $results = array( 'success'=>false, 'errcode'=>200, 'message'=>'Search service not available. Try again later.' );\n }\n elseif ( !count( $resources ) )\n {\n $results = array( 'success'=>false, 'errcode'=>100, 'message'=>$resources['message'] );\n }\n # Resources retrieved from Celi\n elseif ( isset( $resources['data']['resources'] ) )\n {\n $res = array();\n foreach ( $resources['data']['resources'] as $resource )\n $res[] = $resource['resource'];\n\n # Get the metadata information of the resource\n $records =& $this->_get_lom_data_of_resources( $res );\n if ( count( $records ) > 0 )\n {\n # Parses the facets for filtering the results\n $results['success'] = true;\n $results['message'] = 'Search results retrieved from Celi Service. ';\n $results['data']['total'] = $resources['data']['total_records'];\n $results['data']['pages'] = ceil( $resources['data']['total_records'] / $this->_params['limit'] );\n $results['data']['resources'] =& $records;\n $this->_parse_facets( $resources, $results['data']['facets'], $this->_params['lang'] );\n foreach ( $results['data']['resources'] as $key => &$value )\n $value['position'] = @++$cont;\n }\n elseif ( count( $resources['data']['resources'] ) <> count( $records ) )\n {\n $results = array( 'success'=> false, 'errcode'=>30, 'message'=>'No results found in the local database (Not Yet Imported).' );\n }\n else\n {\n $results = array( 'success'=> false, 'errcode'=>20, 'message'=>'No results found.' );\n }\n }\n // No results found\n else\n {\n $results = array( 'success'=> false, 'errcode'=>20, 'message'=>'No results found.' );\n }\n\n return $results;\n }", "title": "" }, { "docid": "366c5629e4e1039d7e55fdf11ab17c4f", "score": "0.6501569", "text": "public function getRaw() : array\n {\n $startTime = $this->initMetricStartTime();\n \n $params = [\n 'index' => $this->getEsIndex(),\n 'body' => $this->toDsl()\n ];\n \n if ($this->getEsType()) {\n $params['type'] = $this->getEsType();\n }\n \n $result = ElasticDsl::getEsClient()->search($params);\n \n if ($startTime) {\n $this->setHistogramMetric($startTime, 'search');\n }\n \n return $result;\n }", "title": "" }, { "docid": "e0f794e6cbab86e58188a0aea398e5e4", "score": "0.6483008", "text": "public function setElasticSearchResults($input_array) {\n if ($this->expansionFlag == 1 || $this->query == \" \") {\n // If advanced search\n $search = new BooleanSearch($input_array);\n $this->booleanFlag = True;\n\n\n } else {\n // If simple search\n $search = new ExpansionSearch($input_array);\n //$this->setExpandedQuery($search); // Generate synonyms\n }\n\n $result = $search->getSearchResult();\n $this->setExpandedQuery($search);\n if($this->booleanFlag){\n $this->booleanDetail=$search->search_details;\n //var_dump($search->search_details);\n }\n\n return $result;\n }", "title": "" }, { "docid": "db2d7cfe1dac78a9c0f247cb51901bd8", "score": "0.6455485", "text": "private function elasticSearchQuery($searchBody, $start=0, $count=10) {\n $this->logger->addDebug(\"Searching for a Constellation\");\n\n if (\\snac\\Config::$USE_ELASTIC_SEARCH) {\n\n $body = $searchBody;\n $body[\"from\"] = $start;\n $body[\"size\"] = $count;\n\n $aggs = [\n \"subject\"=> [\n \"terms\"=> [\n \"field\" => \"subject\",\n \"size\" => 10\n ]\n ],\n \"occupation\"=> [\n \"terms\"=> [\n \"field\" => \"occupation\",\n \"size\" => 10\n ]\n ],\n \"activity\"=> [\n \"terms\"=> [\n \"field\" => \"activity\",\n \"size\" => 10\n ]\n ]\n ];\n $body[\"aggregations\"] = $aggs;\n\n $params = [\n 'index' => \\snac\\Config::$ELASTIC_SEARCH_BASE_INDEX,\n 'body' => $body,\n 'from' => $start,\n 'size' => $count\n ];\n\n $this->logger->addDebug(\"Defined parameters for search\", $params);\n\n $results = $this->connector->search($params);\n\n $this->logger->addDebug(\"Completed Elastic Search\", $results);\n\n $return = array ();\n foreach ($results[\"hits\"][\"hits\"] as $i => $val) {\n array_push($return, $val[\"_source\"]);\n }\n\n $aggregations = array();\n if (isset($results[\"aggregations\"])) {\n foreach($results[\"aggregations\"] as $agg => $vals) {\n if (!isset($aggregations[$agg]))\n $aggregations[$agg] = array();\n\n if (isset($vals[\"buckets\"])) {\n foreach ($vals[\"buckets\"] as $term) {\n array_push($aggregations[$agg], [\n \"term\" => $term[\"key\"],\n \"count\" => $term[\"doc_count\"]\n ]);\n }\n }\n }\n }\n\n $response = array();\n $response[\"total\"] = $results[\"hits\"][\"total\"][\"value\"];\n $response[\"results\"] = $return;\n $response[\"aggregations\"] = $aggregations;\n\n if ($response[\"total\"] == 0 || $count == 0) {\n $response[\"pagination\"] = 0;\n $response[\"page\"] = 0;\n } else {\n $response[\"pagination\"] = ceil($response[\"total\"] / $count);\n $response[\"page\"] = floor($start / $count);\n }\n $this->logger->addDebug(\"Created search response to the user\", $response);\n\n return $response;\n }\n\n return array (\n \"notice\" => \"Not Using ElasticSearch\"\n );\n }", "title": "" }, { "docid": "46268259396a56d8c207950773037d8e", "score": "0.64309597", "text": "public function search()\n {\n $this->index();\n }", "title": "" }, { "docid": "15015d6a4f292f08f44824bd88a21081", "score": "0.6403384", "text": "function recently_awesome() {\n // dropped in the Awesome Box)\n \n $request = array();\n\n // Match all items\n $request['query'] = array(\"match_all\" => new stdClass);\n \n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $request['size'] = 9;\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $request['sort'] = array('last_modified' => array('order' => 'desc'));\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n \n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n \n $this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n\n }", "title": "" }, { "docid": "a6eeb8f4bf860361dd3b6c86514eccf3", "score": "0.64002687", "text": "function most_awesome() {\n // the greatest number of times)\n \n $request = array();\n\n // Match all items\n $request['query'] = array(\"match_all\" => new stdClass);\n \n // limit parameter (elasticsearch calls this 'size')\n $request['size'] = 9;\n \n // sort parameter\n $request['sort'] = array('awesomed' => array('order' => 'desc'));\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n \n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n \n $this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n\n }", "title": "" }, { "docid": "7d81146b1c3966acbd5ad55b88e447da", "score": "0.6394403", "text": "public function search()\n {\n return $this->service->searchRaw($this->buildPayload());\n }", "title": "" }, { "docid": "04fa52bef29ea0c20d35ba2037525651", "score": "0.6381977", "text": "function es_wp_query_index_test_data() {\n\t\t$host = ! empty( $_ENV['searchpress_host'] ) ? $_ENV['searchpress_host'] : 'http://localhost:9200';\n\n\t\tSP_Config()->update_settings( array( 'active' => false, 'host' => $host ) );\n\t\tSP_API()->index = 'es-wp-query-tests';\n\n\t\tSP_Config()->flush();\n\t\tSP_Config()->create_mapping();\n\n\t\t$posts = get_posts( array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_type' => 'any',\n\t\t\t'post_status' => array_values( get_post_stati() ),\n\t\t\t'orderby' => 'ID',\n\t\t\t'order' => 'ASC',\n\t\t) );\n\n\t\t$sp_posts = array();\n\t\tforeach ( $posts as $post ) {\n\t\t\t$sp_posts[] = new SP_Post( $post );\n\t\t}\n\n\t\t$response = SP_API()->index_posts( $sp_posts );\n\t\tif ( '200' != SP_API()->last_request['response_code'] ) {\n\t\t\techo( \"ES response not 200!\\n\" . print_r( $response, 1 ) );\n\t\t} elseif ( ! is_object( $response ) || ! is_array( $response->items ) ) {\n\t\t\techo( \"Error indexing data! Response:\\n\" . print_r( $response, 1 ) );\n\t\t}\n\n\t\tSP_Config()->update_settings( array( 'active' => true, 'must_init' => false ) );\n\n\t\tSP_API()->post( '_refresh' );\n\t}", "title": "" }, { "docid": "6f8e95b5056d56b9b56f927e5c9a3478", "score": "0.6373666", "text": "public function search($query = []) {\n\t\t// articles/search?title='value1'&author.name='value1'\n\t\t// Here while doing the api call, care is to be taken to invoke regular expression for each search term\n\t\tif(empty($query['fullText_text'])) {\n\t\t\t$query = array_filter($query); unset($query['submit']);\n\n\t\t\t$page = 1;\n\n\t\t\tif(isset($query['lpage']))\n\t\t\t\t$page = $query['lpage'];\n\n\t\t\tforeach ($query as $key => $value){\n\n\t\t\t\tif($key != 'lpage')\n\t\t\t\t\t$query[$key] = '@' . $value;\n\t\t\t}\n\n\t\t\t$filterString = $this->model->filterArrayToString($query);\n\n\t\t\t$url = BASE_URL . 'api/articles?' . $filterString;\n\t\t\t// $result = json_decode($this->model->getDataFromApi($url), true);\n\t\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t\t// var_dump($result);\n\t\t\t$result['pageTitle'] = SEARCH_RESULTS;\n\t\t\t$result['fullTextSearch'] = (isset($query['fullText_text']))? preg_replace('/^@/', '', $query['fullText_text']): false;\n\t\t\tif($page == '1')\n\t\t\t\t($result['articles'] != 'noData') ? $this->view('articles/searchResult', json_encode($result)) : $this->view('error/noResults');\n\t\t\telse\n\t\t\t\techo json_encode($result);\n\t\t} else {\n\t\t\t// this api call to get number of searches to display all the search results.\n\t\t\t$query = array_filter($query); unset($query['submit']);\n\t\t\t$urlQuery['q'] = \"text:\" . $query['fullText_text'];\n\t\t\t$filterString = $this->model->filterArrayToString($urlQuery);\n\t\t\t$url = SOLR_URL . SEARCH_COLLECTION .'/select?' . $filterString;\n\t\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t\tif($result['response']['numFound'] == 0) {\n\t\t\t\t $this->view('error/noResults');\n\t\t\t} else {\n\t\t\t\t// getting all the search results from solr.\n\t\t\t\t$total_result = $result['response']['numFound'];\n\t\t\t\t$urlQuery['rows'] = $total_result;\n\t\t\t\t$filterString = $this->model->filterArrayToString($urlQuery);\n\t\t\t\t$url = SOLR_URL . SEARCH_COLLECTION . '/select?' . $filterString;\n\n\t\t\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t\t\t$booksAndPageNo = array();\n\t\t\t\tfor($i = 0;$i<$total_result;$i++) {\n\t\t\t\t\tarray_push($booksAndPageNo,$result['response']['docs'][$i]['pageid'][0]);\n\t\t\t\t}\n\t\t\t\t$booksAndPageNo = array_unique($booksAndPageNo);\n\t\t\t\t$books = array();\n\t\t\t\tfor($i = 0; $i < count($booksAndPageNo); $i++) {\n\t\t\t\t\tarray_push($books,preg_split('/\\|/',$booksAndPageNo[$i])[0]);\n\t\t\t\t}\n\t\t\t\t$books = array_unique($books);\n\t\t\t\t$books = array_values($books);\n\t\t\t\tfor($i = 0; $i < count($books); $i++) {\n\t\t\t\t\t$book = $books[$i];\n\t\t\t\t\t$pageNo = array();\n\t\t\t\t\tfor($j = 0; $j < count($booksAndPageNo); $j++) {\n\t\t\t\t\t\t$info = preg_split('/\\|/',$booksAndPageNo[$j]);\n\t\t\t\t\t\tif($book == $info[0]) {\n\t\t\t\t\t\t\tarray_push($pageNo,$info[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$searchInfo[$book]['pageInfo'] = $pageNo;\n\t\t\t\t}\n\n\t\t\t\tfor($i = 0; $i < count($books);$i++) {\n\t\t\t\t\t$url = API_URL . 'getBookDetails?details.bookId=' . $books[$i];\n\t\t\t\t\t$result = $this->model->getDataFromApi($url);\n\t\t\t\t\t$searchInfo[$books[$i]]['titleInfo'] = $result;\n\t\t\t\t}\n\t\t\t\t$searchText = $query['fullText_text'];\n\t\t\t\t$search['info'] = $searchInfo;\n\t\t\t\t$search['text'] = $searchText;\n\t\t\t\t$this->view('book/searchResult',$search);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "880ec0f482518c2d62d9a94d66b02fcd", "score": "0.6330204", "text": "public function launchSearch($search) {\r\n\t\t//Return empty array if empty query\r\n\t\tif($search == '')\r\n\t\t\treturn; \r\n\r\n\t\t//Opens the index\r\n\t\t$this->initialize();\r\n\r\n\t\t//The same token analyzer should be used both when searching and/or creating the document index\r\n\t\tZend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());\r\n\r\n\t\t//Remove the limitations of fuzzy and wildcard searches\r\n\t\tZend_Search_Lucene_Search_Query_Wildcard::setMinPrefixLength(0);\r\n\t\tZend_Search_Lucene_Search_Query_Fuzzy::setDefaultPrefixLength(0);\r\n \r\n //The locale must be explicitly set so that iconv('UTF-8','ASCII//TRANSLIT, $str) does not\r\n //fail to translit characters to their ASCII counterparts.\r\n\t setLocale(LC_CTYPE,'en_US.utf8');\t\r\n\t\t\r\n $query = Zend_Search_Lucene_Search_QueryParser::parse($search,\"UTF-8\");\r\n\t\t\r\n try {\r\n\t\t\t//$hits can't be returned directly as is, because it's an array of Zend_Search_Lucene_Search_QueryHit\r\n\t\t\t//which has far more properties than those the client needs to know\r\n\t\t\t$hits = $this->index->find($query);\r\n\t\t\t//Ensure the fields are stored with the exact names you want them to be returned otherwise this won't work\r\n\t\t\t$fields = $this->index->getFieldNames();\r\n\t\t\t$searchResults = array();\r\n\t\t\tforeach($hits as $hit){\r\n\t\t\t\tforeach($fields as $field){\r\n\t\t\t\t\tif($field == \"exerciseid\"){\r\n\t\t\t\t\t\tarray_push($searchResults, $hit->$field);\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\treturn $searchResults;\r\n\t\t}\r\n\t\tcatch (Zend_Search_Lucene_Exception $ex) {\r\n\t\t\tthrow new Exception($ex->getMessage());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f18d5bd3df30cdccbe006c49bbc816e9", "score": "0.63032806", "text": "function search() {\n $url['action'] = 'result';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "title": "" }, { "docid": "554142d11709fbf1926004f91455d9e9", "score": "0.6285128", "text": "public function searchResults($app)\n\t{\n $data = Cache::getCurrentApiData();\n\n if ( !empty($data) )\n {\n return API::createResponse($data);\n }\n\n\t\t// $defaultLimit = 20;\n\t\t// $defaultOffset = 0;\n\n\t\t$results = array();\n\t\t$hits = 0;\n\n\t\t$products = array();\n\t\t$page = 1;\n\t\t$total_page = 1;\n\t\t$item = 0;\n\t\t$total_item = 0;\n\n\t\t// if (Input::has('q'))\n\t\t// {\n\t\t\t// Get search results from internal api search (Elastic Search)\n\t\t\t// $index = 'pcms';\n\t\t\t$index = $app->slug;\n\t\t\t$type = 'products';\n\n\t\t\t$params = $this->setParams();\n\n\t\t\t$response = API::get(\"/api-search/search/{$index}/{$type}\", $params);\n\n\t\t\t//sd($index, $type, $params, $response);\n\n\t\t\t//$response = json_decode($response, true);\n\n\t\t\t$hits = $response['data']['hits'];\n\t\t\t$results = $response['data']['results'];\n\n\t\t\t// Re-formatting date time\n\t\t\t$countItem = 0;\n\t\t\tforeach ($results as $key=>$val)\n\t\t\t{\n\t\t\t\t$results[$key]['data']['created_at'] = str_replace('T', ' ', $val['data']['created_at']);\n\t\t\t\t$results[$key]['data']['updated_at'] = str_replace('T', ' ', $val['data']['updated_at']);\n\t\t\t\t$results[$key]['data']['published_at'] = str_replace('T', ' ', $val['data']['published_at']);\n\n\t\t\t\t$products[] = $results[$key]['data'];\n\t\t\t\t$countItem++;\n\t\t\t}\n\n\t\t\t$page = floor($params['offset'] / $params['limit']) + 1;\n\t\t\t$total_page = ceil($hits/$params['limit']);\n\t\t\t$item = $countItem;\n\t\t\t$total_item = $hits;\n\t\t// }\n\n\t\t/*\n\t\t$data = array(\n\t\t\t'hits' => $hits,\n\t\t\t'results' => $results,\n\t\t);\n\t\t*/\n\n\t\t$data = array(\n\t\t\t'products' => $products,\n\t\t\t'page' => $page,\n\t\t\t'total_page' => $total_page,\n\t\t\t'item' => $item,\n\t\t\t'total_item' => $total_item,\n\t\t);\n\n\t\t// Set Cache data\n $timeout = ( Config::has('cache.timeout.short') ) ? 5 : Config::get('cache.timeout.short') ;\n Cache::setCurrentApiData($data, $timeout);\n\n\t\treturn API::createResponse($data);\n\t}", "title": "" }, { "docid": "753f50d8c7a3d56fe0a57b33d8b1086a", "score": "0.6267035", "text": "function es_query( array $es_args ): array {\n\tif ( ! isset( $es_args['authenticated_request'] ) ) {\n\t\t$es_args['authenticated_request'] = true;\n\t}\n\n\t$jetpack_search = Jetpack_Search::instance();\n\t$result = $jetpack_search->search( $es_args );\n\tif ( is_wp_error( $result ) ) {\n\t\treturn [];\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "41b184247e6172738731f81eb1a1cc5b", "score": "0.62464523", "text": "abstract public function dataprovider_get_search_results();", "title": "" }, { "docid": "8d2566b5fbaf2a5cca5844b2e6be53f0", "score": "0.6230729", "text": "public function index()\n {\n return response()->json(client::with('agency', 'siccode')->search(request('search'))->get());\n }", "title": "" }, { "docid": "12b5af2cd6bfa06beec2400d7994f182", "score": "0.62013215", "text": "public function searchResult() {\n\n\t\tif($query = Input::get('query', false)) {\n\t\t\t#print $query;\n\t\t\t#print exec(\"curl -XGET 'http://localhost:9200/default/candidate_resumes/_search?fields=_source%2C_timestamp'\", $out, $st);\n\t\t\t#print_r($out);\n\t\t\t#print $st;\n\t\t // Use the Elasticquent search method to search ElasticSearch\n\t\t try{\n\t\t \t$candidate_resumes = CandidateResume::searchByQuery(['match' => ['resume' => $query]]);\n\t\t }catch(Exception $e){\n\t\t \tprint $e->getMessage();\n\t\t }\n\t \t} else {\n\t \t// Show all posts if no query is set\n\t \t$candidate_resumes = CandidateResume::all(); \n\t \t}\n\t \t#return 'Done';\n\t\treturn View::make('search.searchResult')->with(array('title' => 'Search - Headhunting', 'candidate_resumes' => $candidate_resumes));\n\t}", "title": "" }, { "docid": "f050bbbc2cd7336a697f3634cddf5cca", "score": "0.6178172", "text": "public function actionIndex()\n {\n\n // Get Parameters\n $keyword = Yii::app()->request->getParam('keyword', \"\");\n $spaceGuid = Yii::app()->request->getParam('sguid', \"\");\n $mode = Yii::app()->request->getParam('mode', \"normal\");\n $page = (int) Yii::app()->request->getParam('page', 1); // current page (pagination)\n // Cleanup\n $keyword = Yii::app()->input->stripClean($keyword);\n $spaceGuid = Yii::app()->input->stripClean($spaceGuid);\n\n if ($mode != 'quick') {\n $mode = \"normal\";\n }\n\n $limit = HSetting::Get('paginationSize'); // Show Hits\n $hitCount = 0; // Total Hit Count\n $query = \"\"; // Lucene Query\n $append = \" AND (model:User OR model:Space)\"; // Appends for Lucene Query\n $moreResults = false; // Indicates if there are more hits\n $results = array();\n\n // Quick Search shows always 1\n if ($mode == 'quick')\n $limit = 5;\n\n // Load also Space if requested\n $currentSpace = null;\n if ($spaceGuid) {\n $currentSpace = Space::model()->findByAttributes(array('guid' => $spaceGuid));\n }\n \n // Zend Framework files need to have 777 permissions to them (writable by the web service) or the app can't function and it throws an exception\n /*\n * $index = new Zend_Search_Lucene_Interface_MultiSearcher();\n * $index->addIndex(Zend_Search_Lucene::open('search/index1'));\n * $index->addIndex(Zend_Search_Lucene::open('search/index2'));\n * $index->find('someSearchQuery');\n */\n\n // Do Search\n if ($keyword != \"\") {\n\n if ($currentSpace != null) {\n $append = \" AND (model:User OR model:Space OR (belongsToType:Space AND belongsToId:\" . $currentSpace->id . \"))\";\n }\n\n $hits = new ArrayObject(HSearch::getInstance()->Find($keyword . \"* \" . $append));\n $hitCount = count($hits);\n\n\n // Limit Hits\n $hits = new LimitIterator($hits->getIterator(), ($page - 1) * $limit, $limit);\n\n if ($hitCount > $limit)\n $moreResults = true;\n\n // Build Results Array\n foreach ($hits as $hit) {\n\n $doc = $hit->getDocument();\n $model = $doc->getField('model')->value;\n $pk = $doc->getField('pk')->value;\n\n $object = $model::model()->findByPk($pk);\n $results[] = $object->getSearchResult();\n }\n }\n\n // Create Pagination Class\n $pages = new CPagination($hitCount);\n $pages->setPageSize($limit);\n $_GET['keyword'] = $keyword; // Fix for post var\n\n if ($mode == 'quick') {\n $this->renderPartial('quick', array(\n 'keyword' => $keyword,\n 'results' => $results,\n 'spaceGuid' => $spaceGuid,\n 'moreResults' => $moreResults,\n 'hitCount' => $hitCount,\n ));\n } else {\n $this->render('index', array(\n 'keyword' => $keyword,\n 'results' => $results,\n 'spaceGuid' => $spaceGuid,\n 'moreResults' => $moreResults,\n 'pages' => $pages, // CPagination,\n 'pageSize' => $limit,\n 'hitCount' => $hitCount,\n ));\n }\n }", "title": "" }, { "docid": "0fd26cdf5d864a42c0473c33d709dd78", "score": "0.61777896", "text": "public function index()\n\t{\n\t\treturn Response::json(\n\t\t\t\t\tarray('error' => true, 'message' => 'No search query specified',200, array(), JSON_PRETTY_PRINT)\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "75b63af74c8ed114bc84ebb31c664b4f", "score": "0.61445737", "text": "public function extendedSearchAction()\n {\n $objectIdentifiers = $this->documentRepository->getObjectIdentifiers();\n\n $args = $this->request->getArguments();\n $elasticSearch = new \\EWW\\Dpf\\Services\\ElasticSearch();\n // assign result list from elastic search\n $this->view->assign('searchList', $args['results']);\n $this->view->assign('alreadyImported', $objectIdentifiers);\n\n // assign form values\n $this->assignExtraFields($args['extra']);\n\n }", "title": "" }, { "docid": "6aaf9b0c72590e67cce90bdd98f0951b", "score": "0.61348176", "text": "public function indexAction(){\n\t\t\n\t\t//Fetch the parameters\n\t\t$term = $this->getEvent()->getRouteMatch()->getParam('term');\n\t\t\n\t\t//Filter and Validate.\n\t\t\n\t\ttry{\n\t\t\t//Do the search\n\t\t\t$SearchObj = new SearchDao;\n\t\t\t$data = $SearchObj->doSearch($term);\n\t\t\t\n\t\t}\n\t\tcatch(Exception $e){\n\n\t\t\t$data = array();\n\t\t}\n\t\t\n\t\t//Present the data as JSON\n\t\t$results = new JsonModel($data);\n\t\treturn $results;\n\t\t\n\t}", "title": "" }, { "docid": "10d218f9a79594ec8d9308fadde90e3d", "score": "0.6109685", "text": "public function search()\n {\n return $this->Crud->execute('index');\n }", "title": "" }, { "docid": "cd04b06081a42cebd4e0ca6a521e21e1", "score": "0.6106722", "text": "public function searchAllRepo() {\n $input_array = [];\n\n $input_array['query'] = $this->getQuery();\n //$input_array['sort'] = $this->getSort();\n $input_array['aggsFields'] = ['_index'];\n $input_array['facetSize'] = 300;\n $input_array['offset'] = 1;\n $input_array['rowsPerPage'] = 0;\n\n /*\n * generate search results from all repositories\n * */\n $input_array['esIndex'] = $this->ALL_ELASTICSEARCH_INDEXES;\n $input_array['searchFields'] = [\"_all^0.3\",\"dataset.title^0.1\"];#[\"_all\"];#\n if($this->isLinkout=='linkout'){\n $input_array['searchFields'] = ['primaryPublications.ID','primaryPublication.ID','publication.ID','PrimaryPublication.ID'];\n $input_array['esIndex'] = \"bmrb,openfmri,yped,physiobank,peptideatlas\";\n }\n if($this->getYear()!=\"\"){\n $input_array['year'] = $this->getYear();\n }\n\n\n $esResults = $this->setElasticSearchResults($input_array);\n $this->input_array_for_duplicate=$input_array;\n $this->totalRows = $this->setTotalRows($esResults);\n $this->setRepositoryRows($esResults); // set number of rows for each repository\n\n if ($this->getSelectedRepositories() != NULL\n or $this->getSelectedAuth() != NULL\n or $this->getSelectedAccess() != NULL\n or $this->getSelectedDatatypes() != NULL) {\n $this->elasticSearchResults = $esResults;\n $this->selectedTotalRows = $this->totalRows;\n }\n }", "title": "" }, { "docid": "d62b1d1df510ea4f73d69058cc2cb291", "score": "0.6099966", "text": "public function search(Request $request, $query)\n {\n $params = [\n 'index' => $this->index,\n 'type' => $this->type,\n 'body' => [\n 'query' => [\n 'multi_match' => [\n 'query' => $query,\n 'fields' => $this->searchableFields,\n ]\n ]\n ]\n ];\n\n // searching a document\n $elasticResponse = $this->elasticsearch->search($params);\n\n // parse source only\n $products = $this->getSources($elasticResponse);\n\n // prepare response\n $response = [\n 'message' => 'Here is your search results',\n 'data' => $products,\n 'query' => $query,\n ];\n\n return response()->json($response, 200);\n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.608463", "text": "public function search();", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.608463", "text": "public function search();", "title": "" }, { "docid": "e5e4bf44a3c91ec33b9d27f8f348b94e", "score": "0.60713094", "text": "public function execute()\n {\n \\Analog\\Analog::log(\"SearchRequest->execute() - \".print_r($this->params, true), \\Analog\\Analog::DEBUG);\n\n $finalQuery = $this->composeFinalQuery();\n\n if (isset($this->params['index']))\n $index = implode(',', $this->params['index']);\n else\n $index = '';\n\n if (isset($this->params['type']))\n $type = implode(',', $this->params['type']);\n else\n $type = '';\n\n if (isset($this->params['search_type']))\n $queryParams[] = $this->params['search_type'];\n\n if (isset($this->params['routing']))\n $queryParams[] = $this->params['routing'];\n\n if (isset($queryParams)) {\n $queryParams = '?' . implode(\"&\", $queryParams);\n } else\n $queryParams = '';\n\n $uri = 'http://'.$this->node['host'].':'.$this->node['port'].'/'.$index.'/'.$type.'/_search'.$queryParams;\n\n //required since PHP doesn't allow argument differences between\n //parent and children under Strict\n $this->_uri = $uri;\n $this->_data = $finalQuery;\n\n //Guzzle doesn't allow GET with request body, use post\n $this->_action = 'post';\n\n return parent::execute();\n }", "title": "" }, { "docid": "60ed6c7e434b993b53b157c524e422fc", "score": "0.60668844", "text": "public function getSearch();", "title": "" }, { "docid": "a68809d91b17913a41c9982f83c7bd5d", "score": "0.6057679", "text": "public function read()\n {\n $data = array();\n\n $params = [\n 'index' => 'my_index',\n 'type' => 'vacancy',\n 'body' => [\n 'query' => [\n 'match_all' => []\n ]\n ]\n ];\n\n $response = $this->connection->search($params);\n foreach($response['hits']['hits'] as $row)\n {\n $entity = new Vacancy($row['_source']);\n $data[] = $entity;\n }\n\n return $data;\n }", "title": "" }, { "docid": "059de2d4362cf434cafff0cb7259e35d", "score": "0.6053705", "text": "function results($data = null, $form = null){\n\t\t$query = $this->data()->getQuery();\n\n\t\t$term = isset($_GET['Search']) ? Convert::raw2xml($_GET['Search']) : '';\n\n\t \t$data = array(\n\t \t'Results' => $query ? $query->getDataObjects() : new DataObjectSet(),\n\t \t'Query' => $term,\n\t \t'Title' => 'Search Results'\n\t \t);\n\n\t \treturn $this->customise($data)->renderWith(array('SolrSearchPage_results', 'SolrSearchPage', 'Page'));\n\t}", "title": "" }, { "docid": "8c026315c70eed6db4be54bd88ef516e", "score": "0.6051264", "text": "function get_docs_from_es_response($es_response) {\n\n $docs = array();\n if (!empty($es_response)) {\n // Build the response to use our preferred vocab\n foreach ($es_response['hits']['hits'] as $result) {\n $doc = array();\n if (!empty($result['_source']['title'])) {\n $doc['title'] = $result['_source']['title'];\n }\n if (!empty($result['_source']['creator'])) {\n $doc['creator'] = $result['_source']['creator'];\n }\n if (!empty($result['_source']['isbn'])) {\n $doc['isbn'] = $result['_source']['isbn'];\n }\n if (!empty($result['_source']['library'])) {\n $doc['library'] = $result['_source']['library'];\n }\n if (!empty($result['_source']['format'])) {\n $doc['format'] = $result['_source']['format'];\n }\n if (!empty($result['_source']['poster'])) {\n $doc['poster'] = $result['_source']['poster'];\n }\n if (!empty($result['_source']['scanning_library'])) {\n $doc['scanning_library'] = $result['_source']['scanning_library'];\n }\n if (!empty($result['_source']['hollis_id'])) {\n $doc['hollis_id'] = $result['_source']['hollis_id'];\n }\n if (!empty($result['_source']['checked_in'])) {\n $doc['checked_in'] = $result['_source']['checked_in'];\n }\n if (!empty($result['_source']['id'])) {\n $doc['id'] = $result['_source']['id'];\n }\n if (!empty($result['_source']['awesomed'])) {\n $doc['awesomed'] = $result['_source']['awesomed'];\n }\n if (!empty($result['_source']['last_modified'])) {\n $doc['last_modified'] = $result['_source']['last_modified'];\n }\n array_push($docs, $doc);\n }\n }\n \n return $docs;\n }", "title": "" }, { "docid": "659d24f9df2162170dd0e7e6a24c6da0", "score": "0.60421795", "text": "public function searchSingleRepo() {\n $repository = $this->repositories->getRepository($this->selectedRepositories[0]);\n\n unset($input_array);\n $input_array = [];\n $input_array['esIndex'] = $repository->index;\n $input_array['esType'] = $repository->type;\n $input_array['query'] = $this->getQuery();\n $input_array['sort'] = $this->getSort();\n\n $input_array['sort_field']= $repository->sort_field;\n $input_array['searchFields'] = [\"_all^0.3\",\"dataset.title^0.1\"];//['_all'];//array_merge($repository->searchFields,['_all']);\n\n $input_array['aggsFields'] = $repository->facetsFields;\n $input_array['filterFields'] = ($this->getSelectedFilters() != NULL) ? $this->selectedFilters : [];\n $input_array['offset'] = $this->getOffset();\n $input_array['rowsPerPage'] = $this->getRowsPerPage();\n if($this->isLinkout=='linkout'){\n $input_array['searchFields'] = ['primaryPublications.ID','primaryPublication.ID','publication.ID','PrimaryPublication.ID'];\n }\n\n if($this->getYear()!=\"\"){\n $input_array['year'] = $this->getYear();\n }\n\n\n $this->setSingleRepoElasticSearchResults($this->setElasticSearchResults($input_array));\n $this->selectedTotalRows = $this->getSingleRepoElasticSearchResults()['hits']['total'];\n $this->sort_field = $repository->sort_field;\n // Search without filters\n $input_array['filterFields'] = [];\n\n $this->setSingleRepoResultsNoFilter($this->setElasticSearchResults($input_array));\n }", "title": "" }, { "docid": "65ffbd70a95c54de2b20b0759ceb5912", "score": "0.599014", "text": "function get_search_results(\n\t\t$query,\n\t\t$start=null,\n\t\t$per_page=null,\n\t\t$domain=null,\n\t\t$search_url=\"http://google.cc.ucf.edu/search\"\n\t){\n\t$start = ($start) ? $start : 0;\n\t$per_page = ($per_page) ? $per_page : 10;\n\t$domain = ($domain) ? $domain : $_SERVER['SERVER_NAME'];\n\t$results = array(\n\t\t'number' => 0,\n\t\t'items' => array(),\n\t);\n\t$query = trim($query);\n\t$per_page = (int)$per_page;\n\t$start = (int)$start;\n\t$query = urlencode($query);\n\t$arguments = array(\n\t\t'num' => $per_page,\n\t\t'start' => $start,\n\t\t'ie' => 'UTF-8',\n\t\t'oe' => 'UTF-8',\n\t\t'client' => 'default_frontend',\n\t\t'output' => 'xml',\n\t\t'sitesearch' => $domain,\n\t\t'q' => $query,\n\t);\n\n\tif (strlen($query) > 0){\n\t\t$query_string = http_build_query($arguments);\n\t\t$url = $search_url.'?'.$query_string;\n\t\t$response = wp_remote_retrieve_body( wp_remote_get( $url ) );\n\n\t\tif ($response){\n\t\t\t$xml = simplexml_load_string($response);\n\t\t\t$items = $xml->RES->R;\n\t\t\t$total = $xml->RES->M;\n\n\t\t\t$temp = array();\n\n\t\t\tif ($total){\n\t\t\t\tforeach($items as $result){\n\t\t\t\t\t$item = array();\n\t\t\t\t\t$item['url'] = str_replace('https', 'http', $result->U);\n\t\t\t\t\t$item['title'] = $result->T;\n\t\t\t\t\t$item['rank'] = $result->RK;\n\t\t\t\t\t$item['snippet'] = $result->S;\n\t\t\t\t\t$item['mime'] = $result['MIME'];\n\t\t\t\t\t$temp[] = $item;\n\t\t\t\t}\n\t\t\t\t$results['items'] = $temp;\n\t\t\t}\n\t\t\t$results['number'] = $total;\n\t\t}\n\t}\n\n\treturn $results;\n}", "title": "" }, { "docid": "27a310daee57b2bf204bcba723d6205c", "score": "0.59880203", "text": "private function _buildSearch()\n {\n $hits = (integer) $this->response->SearchResult->Statistics->TotalHits;\n $queryString = (string)$this->response->SearchRequestGet->QueryString;\n $records = array();\n $queries = array();\n \n if ($this->response->SearchRequestGet->SearchCriteriaWithActions->QueriesWithAction) {\n $queriesWithAction = $this->response->SearchRequestGet->SearchCriteriaWithActions->QueriesWithAction->QueryWithAction;\n foreach ($queriesWithAction as $queryWithAction) {\n $queries[]=array(\n 'query' => (string)$queryWithAction->Query->Term,\n 'removeAction'=> (string) $queryWithAction->RemoveAction\n );\n }\n }\n \n if ($hits > 0) {\n $records = $this->_buildRecords();\n //$facets = $this->_buildFacets();\n }\n\n $results = array(\n 'recordCount' => $hits,\n 'queryString' => $queryString,\n 'queries' => $queries,\n 'records' => $records,\n );\n\n return $results;\n }", "title": "" }, { "docid": "e3586509744218fc4c914c657aa221fa", "score": "0.59865457", "text": "function rare_curate_elastic_search( $post_searchname = '', $limits = 6 ){\r\n\t\r\n\t$search_host = '10.132.22.123';\r\n\t$search_port = '9200';\r\n\t$index_name = 'onescdvoice-content';\r\n\t$numberof_posts_curate = 0; // for returning total number of posts (used in global search).\r\n\t\r\n\tif ( 'evidenceeducation' == $post_searchname ) {\r\n\t\t\r\n\t\t$type = 'evidenceeducation';\r\n\t\t$query = '\r\n\t\t\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"must\": [{\r\n\t\t\t\t\t\t\"match_all\": {}\r\n\t\t\t\t\t}]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}\r\n\t\t\r\n\t\t';\r\n\t\t$responds = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $responds->hits->total;\r\n\t\t$results = $responds->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 0;\r\n\t\t$drg_class = '-evidence';\r\n\t\t$section_title = 'evidence & education';\r\n\t\t\r\n\t\t$msg = get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t} elseif ( 'newsmeetings' == $post_searchname ) {\r\n\t\t$type = 'news-meeting';\r\n\t\t$query = '\r\n\t\t\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"must\": [{\r\n\t\t\t\t\t\t\"match_all\": {}\r\n\t\t\t\t\t}]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}\r\n\t\t\r\n\t\t';\r\n\t\t$responds = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $responds->hits->total;\r\n\t\t$results = $responds->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 0;\r\n\t\t$drg_class = 'news-meetings-tab';\r\n\t\t$section_title = 'news & meetings';\r\n\t\t\r\n\t\t$msg = get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\r\n\t} else {\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t//evidenceeducation\r\n\t\t\r\n\t\t$type = 'evidance-education';\r\n\t\t$query = '\r\n\t\t\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"source_evidence\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"organization_evidence\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"author_evidence\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"doi\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"abstract_source\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"language\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"full_text_source\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"source_pmc\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 0;\r\n\t\t$drg_class = '-evidence';\r\n\t\t$section_title = 'evidence & education';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// news-meeting\r\n\t\t\r\n\t\t$type = 'news-meeting';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"news_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 1;\r\n\t\t$drg_class = 'news-meetings-tab';\r\n\t\t$section_title = 'news & meetings';\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class,$section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t//people\r\n\t\t\r\n\t\t$type = 'people';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_first_name\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_middle_name\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_last_name\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_qualification\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_specialities\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_primary_role\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_street_address\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_city\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_state\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_countrypeople\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_phone\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_affiliationinfo\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_image\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_affiliationinfo\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_afflitaion_type\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_type_of_expert\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_online_profile\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_additional_links\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"person_information_source\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 2;\r\n\t\t$drg_class = 'people';\r\n\t\t$section_title = 'people';\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class,$section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t// place\r\n\t\t\r\n\t\t\r\n\t\t$type = 'place';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_address\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_image\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_email\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_phone\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_phone_additional\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_official_website\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_city\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_state\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_country\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_url_1\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_url_2\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_url_3\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_orphanet_url\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_country_state_city\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_further_details_1\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_further_details_2\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_further_details_3\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"place_information_source\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 3;\r\n\t\t$drg_class = 'place';\r\n\t\t$section_title = 'places';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// video-visual\r\n\t\t\r\n\t\t$type = 'video-visual';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"video_date\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"video_description\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"video_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 4;\r\n\t\t$drg_class = 'rare-videos';\r\n\t\t$section_title = 'videos & visuals';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t// photo\r\n\t\t\r\n\t\t$type = 'photo';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"photo_url\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"photo_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 5;\r\n\t\t$drg_class = 'rc_socia_entry';\r\n\t\t$section_title = 'photo';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t\r\n\t\t//website \r\n\t\t\r\n\t\t$type = 'website';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"website_url\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"website_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 6;\r\n\t\t$drg_class = 'rc_socia_entry';\r\n\t\t$section_title = 'websites';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t// fundraising\r\n\t\t\r\n\t\t\r\n\t\t$type = 'fundraising';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"fundraise_url\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"fundraise_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t\t\r\n\t\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 7;\r\n\t\t$drg_class = 'rc_socia_entry';\r\n\t\t$section_title = 'fundraising';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t\t\r\n\t\t// Social and media.\r\n\t\t\r\n\t\t$type = 'media-social';\r\n\t\t\r\n\t\t$query = '\r\n\t\t{\r\n\t\t\t\"query\": {\r\n\t\t\t\t\"bool\": {\r\n\t\t\t\t\t\"should\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"title\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"content\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"social_url\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"social_company\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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{\r\n\t\t\t\t\t\t\t\"query_string\": {\r\n\t\t\t\t\t\t\t\t\"default_field\": \"social_information_sourse\",\r\n\t\t\t\t\t\t\t\t\"query\": \"'.$post_searchname.'\"\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\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"size\": 50\r\n\t\t}';\r\n\t//echo '<pre>';var_dump($query);echo '</pre>';\r\n\t\t\r\n\t\t$results = onevoice_elastic_search_function( $search_host,$search_port,$index_name,$query,$type );\r\n\t\t\r\n\t\t$total_resulsts = $results->hits->total;\r\n\t\t$results = $results->hits->hits;\r\n\t\t$numberof_posts_curate += $total_resulsts;\r\n\t\t$i = 8;\r\n\t\t$drg_class = 'rc_socia_entry';\r\n\t\t$section_title = 'social';\r\n\t\t\r\n\t\t$msg .= get_curate_search_message( $i, $total_resulsts , $drg_class, $section_title, $results, $limits );\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t$return['posts'] = $msg;\r\n\t$return['total_results'] = $numberof_posts_curate;\r\n\treturn $return;\r\n}", "title": "" }, { "docid": "6d7e95dbf7e412cd536937768af30cbb", "score": "0.59858793", "text": "function search() {\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/products/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k=>$v){\n foreach ($v as $kk=>$vv){\n $url[$k.'.'.$kk]=$vv;\n }\n }\n\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "title": "" }, { "docid": "dfb85bc7ffb7a2beb335506e4ee310fe", "score": "0.5983967", "text": "function search() {\r\n $url['action'] = 'index';\r\n\r\n // build a URL will all the search elements in it\r\n // the resulting URL will be\r\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\r\n foreach ($this->data as $k => $v) {\r\n foreach ($v as $kk => $vv) {\r\n $url[$k . '.' . $kk] = $vv;\r\n }\r\n }\r\n\r\n // redirect the user to the url\r\n $this->redirect($url, null, true);\r\n }", "title": "" }, { "docid": "882df1357315f4740eaba00e6eb2c417", "score": "0.59837097", "text": "public function searchAction()\n {\n $query = str_replace(\"_\", \" \", $this->getParams('q'));\n\n if (!empty($result = $this->prepareResult($query))) {\n $this->view('content/search', ['searchResult' => $result, 'imgHost' => Config::get('site')['imageLink']]);\n } else {\n $this->view('content/search', ['notFound' => 'Nothing found by query: ' . $query . '']);\n }\n }", "title": "" }, { "docid": "7ec2fb30804a90bd4a886028590c34a1", "score": "0.5976705", "text": "public function searchPage() {\r\n\t\t\\Drupal::service('page_cache_kill_switch')->trigger();\r\n\t\t$hmp_elastic = \\Drupal::state()->get('hmp_elastic');\r\n\t\t$terms = explode(',',$hmp_elastic['elastic_filters']);\r\n\t\t$output = '';\r\n\t\t$output .= \"<form id='elastic-search-form'><div id='elastic-searh-input'><input placeholder='Search' id='elastic-search-terms' type='text' name='search-terms'>\";\r\n\t\tif($terms[0] != '') {\r\n\t\t\t$output .= \"<select id='elastic-filter-terms'>\";\r\n\t\t\t$output .= '<option value=\"\">--Select Filter--</option>';\r\n\t\t\tforeach($terms as $term) {\r\n\t\t\t\t$option = explode('|',$term);\r\n\t\t\t\t$output .= \"<option value='\" . $option[0] . \"'>\" . $option[1] . \"</option>\";\r\n\t\t\t}\r\n\t\t\t$output .= \"</select>\";\r\n\t\t}\r\n\t\t$output .= \"</div><input type='button' name='submit' value='Search' id='elastic-search-submit'>\";\r\n\t\t$output .=\"</form>\";\r\n\t\treturn array(\r\n\t\t\t'#type' => 'markup',\r\n\t\t\t'#markup' => t(\"<h1>Search Page</h1>$output<div id='elastic-search-results'></div>\"),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "4b1f26fe64e01deba6c7987fe3bc2044", "score": "0.597623", "text": "public function postindex()\n\t{\n\n // Make sure terms are entered\n\n $terms = Input::get('terms');\n if (!$terms) {\n $response = array(\n 'success' => 0,\n 'message' => 'Cannot request data without input'\n );\n return Response::json($response);\n }\n\n // array of terms\n $terms = (New termsProcessor($terms))->terms();\n\n $results = [];\n foreach ($terms as $key => $term) {\n $result = (New termLookup($term))->lookup();\n $results = array_merge($results, $result);\n }\n\n return Response::json($results);\n\t}", "title": "" }, { "docid": "e89ccdb6229720b17ff82182ffce8530", "score": "0.5975369", "text": "public function index()\n {\n $results = null;\n\n $results = $this->search->search(request()->all());\n\n if ($results->count()) {\n return view($this->_config['view'])->with('results', $results);\n } else {\n return view($this->_config['view'])->with('results', null);\n }\n\n }", "title": "" }, { "docid": "386d13fed44c268ba0f82db2e1e60184", "score": "0.5973759", "text": "public function query($search_terms);", "title": "" }, { "docid": "4228703e34c5d7d346a452585c6e1c92", "score": "0.59720254", "text": "public function minimalSearchAction()\n {\n \n $request = $this->get('request');\n \n $title = $request->request->get('search_field');\n $repository = $this->getDoctrine()->getRepository('IJVRPublishBundle:Article');\n $articles=$repository->getArticlesByTitle($title);\n $issueTitle=null ;\n $date=null;\n $issues = array();\n $authors=array();\n $keywords=array();\n $dates=array();\n\n foreach($articles as $article)\n {\n array_push($dates,$article->getDate()->format('Y'));\n array_push($issues, $article->getIssue()->getTitle());\n foreach($article->getAuthors() as $author)\n {\n array_push($authors, $author->getName());\n }\n foreach($article->getKeywords() as $keyword)\n {\n array_push($keywords, $keyword->getKeyword());\n }\n\n }\n\n\n $dates=array_unique($dates);\n $issues=array_unique($issues);\n $authors=array_unique($authors);\n $keywords=array_unique($keywords);\n return $this->render('IJVRSearchBundle:Default:searchResult.html.twig',array('articles' => $articles ,'title' => $title, 'issueTitle'=>$issueTitle,\n 'date'=>$date, 'issues'=>$issues, 'authors'=> $authors, 'keywords'=>$keywords, 'dates' => $dates));\n \n \n }", "title": "" }, { "docid": "f8933510f31ee4199e088f082842acf5", "score": "0.59703857", "text": "public function searchMainIndexAdvanced($query, $entityType=null, $start=0, $count=10, $parameters=null, $fullSearch=false) {\n\n $searchBody = [\n /* This query uses a full-word matching search */\n 'query' => [\n 'function_score' => [\n 'query' => [\n 'bool' => [\n 'must' => [\n 'simple_query_string' => [\n 'fields' => ['nameEntry'],\n 'query' => $query,\n 'default_operator' => 'and'\n ]\n ],\n \"filter\" => [\n ]\n ]\n ],\n 'field_value_factor' => [\n 'field' => 'resources',\n 'modifier' => 'log1p',\n 'factor' => 1.5\n ],\n 'boost_mode' => \"multiply\",\n 'max_boost' => 3\n ]\n ]\n ];\n if ($fullSearch !== false) {\n unset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"must\"]);\n $searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"should\"] = [\n [\n 'simple_query_string' => [\n 'fields' => ['nameEntry', 'biogHist'],\n 'query' => $query,\n 'default_operator' => 'and'\n ]\n ]\n ];\n $searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"minimum_should_match\"] = 1;\n }\n if ($entityType !== null) {\n array_push($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"filter\"], [\n 'term' => [\n 'entityType' => $entityType\n ]\n ]);\n }\n\n if ($parameters !== null && is_array($parameters) && !empty($parameters)) {\n // Allow an empty query that will just return whatever (as long as there are parameters\n if ($query == \"\" ) {\n if (isset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"must\"]))\n unset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"must\"]);\n if (isset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"should\"]))\n unset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"should\"]);\n if (isset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"minimum_should_match\"]))\n unset($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"minimum_should_match\"]);\n $searchBody[\"sort\"] = [\n [ \"nameEntry\" => \"asc\" ],\n \"_score\"\n ];\n }\n foreach ($parameters as $type=>$values) {\n foreach ($values as $value) {\n array_push($searchBody[\"query\"][\"function_score\"][\"query\"][\"bool\"][\"filter\"], [\n 'match' => [\n $type => [\n 'query' => $value\n ]\n ]\n ]);\n }\n }\n }\n\n\n\n return $this->elasticSearchQuery($searchBody, $start, $count);\n }", "title": "" }, { "docid": "eb7ddb5e29c835c45e30980dae738959", "score": "0.59624755", "text": "public function search()\n\t{\n//\t\t// don't know how to do this...\n\t\t$this->index();\n//\t\thad stuff but got rid of it\n\t}", "title": "" }, { "docid": "418c0d0c65df1d9585bd286f3d62c5eb", "score": "0.5957268", "text": "public function get_index(){\n return Response::eloquent(Slendertag::order_by('name', 'asc')->get());\n }", "title": "" }, { "docid": "c24e94505861b48e658c3fbc3ec444a2", "score": "0.5950259", "text": "public function searchSelectedRepo() {\n\n // prepare parameters for the search instance\n $input_array = [];\n\n $input_array['query'] = $this->getQuery();\n //$input_array['sort'] = $this->getSort();\n $input_array['aggsFields'] = ['_index'];\n if ($this->getRowsPerPage() == 0) {\n $input_array['facetSize'] = 300;\n $input_array['offset'] = 1;\n $input_array['rowsPerPage'] = 20;\n } else {\n $input_array['facetSize'] = 300;\n $input_array['offset'] = $this->getOffset();\n $input_array['rowsPerPage'] = $this->getRowsPerPage();\n /*if($size){\n $input_array['rowsPerPage']=$size;\n }*/\n }\n\n $input_array['timelineFlag'] = $this->timelineFlag;\n if($this->apiFlag){\n $input_array['highlight']=[];\n }\n $input_array['esIndex'] = $this->getElasticSearchIndexes();\n $input_array['searchFields'] = [\"_all^0.3\",\"dataset.title^0.1\"];//[\"_all\"];\n if($this->isLinkout=='linkout'){\n $input_array['searchFields'] = ['primaryPublications.ID','primaryPublication.ID','publication.ID','PrimaryPublication.ID'];\n $input_array['esIndex'] = \"bmrb,openfmri,yped,physiobank,peptideatlas\";\n }\n\n if($this->getYear()!=\"\" && $this->timelineFlag==false){\n $input_array['year'] = $this->getYear();\n }\n\n // generate elasticsearch results\n //var_dump($input_array);\n $this->elasticSearchResults = $this->setElasticSearchResults($input_array);\n $this->input_array_for_duplicate=$input_array;\n $this->selectedTotalRows = $this->setTotalRows($this->getElasticSearchResults());\n\n $this->setAggByDate($this->elasticSearchResults);\n }", "title": "" }, { "docid": "0ff8b3f736610a7726382506a639ca36", "score": "0.59271526", "text": "public function getSearchResult() {\n return $this->result;\n }", "title": "" }, { "docid": "c1de4fab541ebe4f33217492d129cfa9", "score": "0.59228057", "text": "private function readItem() {\n $input_array = ['esIndex' => $this->getCurrentRepository()->index, 'searchFields' => ['_id'], 'query' => $this->itemId];\n $search = new ElasticSearch($input_array);\n $search->setSearchResult();\n $result = $search->getSearchResult();\n\n $row = $result['hits']['hits'][0]['_source'];\n $this->searchResults = $row;\n //var_dump($this->searchResults);\n }", "title": "" }, { "docid": "76c02ef747ee703cbcbb635a65a450c9", "score": "0.59225845", "text": "public function search() {\r\n if ($this->questions == \"\")\r\n return null;\r\n $kenexa = new SoapClient(self::$searchUrl);\r\n $soapRequest = self::$soapRequest;\r\n\r\n // Insert the questions into the request.\r\n $soapRequest = str_replace(\"<Questions>\", \"<Questions>\" . $this->questions, $soapRequest);\r\n\t\t$soapRequest = str_replace(\"<PageNumber>\", \"<PageNumber>\" . $this->pageNumber, $soapRequest);\r\n\t\tif($this->hotJobs){\n \t\t $soapRequest = str_replace(\"<HotJobs>\", \"<HotJobs>Yes\", $soapRequest);\n\t\t}\r\n\t\tif($this->datePosted != \"All\") $soapRequest = str_replace(\"<DatePosted/>\", \"<DatePosted><Date>\" . $this->datePosted.\"</Date></DatePosted>\", $soapRequest);\r\n\t\t$soapRequest = str_replace(\"<DatePosted/>\", \"\" , $soapRequest);\r\n $result = $kenexa->route(array('inputXml' => $soapRequest));\r\n $xml = simplexml_load_string($result->routeResult);\r\n return $xml->Unit->Packet->Payload->ResultSet;\r\n }", "title": "" }, { "docid": "90535af38af655fbffa362283bfe793e", "score": "0.59182835", "text": "public function getResults()\n {\n\n return $this->_search_results;\n\n }", "title": "" }, { "docid": "d226147895df946b764093d0c9b70804", "score": "0.5906421", "text": "function _do_search($params) {\n\t\tif (!empty($_GET['action']) && $_GET['action'] === 'sro_search_results') {\n\n\t\t\t// Do the altmetrics search at SRO in CSV\n\t\t\tif ($params['send_to'] == 'download' && $params['export_format'] == 'altmetrics') {\n\n\t\t\t\t$options = get_option(\n\t\t\t\t\t'server_altmetrics_url',\n\t\t\t\t\tarray('server_altmetrics_url' => 'http://staff.research.si.edu/search-api/altmetrics_pubs.cfm', 'query_extra' => '')\n\t\t\t\t);\n\n\t\t\t\t$results = $this->_execute_query($options['server_altmetrics_url'], array());\n\t\t\t\treturn $results;\n\t\t\t}\t\t\t\t\t\n\n\t\t\t// Do the search at SRO in JSON\n\t\t\t$results = null;\n\t\t\tif (!empty($params['search_term']) || !empty($params['dept'])) {\n\t\t\t\t$query = array(\n\t\t\t\t\t'search' => $params['search_term'],\n\t\t\t\t\t'limit' => $params['limit'],\n\t\t\t\t\t'exact' => $params['exact'],\n\t\t\t\t\t'year' => $params['date'],\n\t\t\t\t\t'dept' => $params['dept'],\n\t\t\t\t\t'count' => $params['perpage'],\n\t\t\t\t\t'pagenum' => $params['page'],\n\t\t\t\t\t'sort' => $params['sort']\n\t\t\t\t);\t\t\t\t\n\t\t\t\t$results = $this->_execute_query($params['server_url'], $query);\n\t\t\t\treturn $results;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "efc48dc14f7f30844218ee69b9b1cb53", "score": "0.59063655", "text": "#[InternalActionAttribute]\n #[Route(\"get-results\", name: \"get_results\", methods: [Request::METHOD_POST])]\n public function getSearchResults(Request $request): JsonResponse\n {\n $json = $request->getContent();\n json_decode($request->getContent());\n if( JSON_ERROR_NONE !== json_last_error() ){\n $message = \"Invalid json was provided\";\n $this->services->getLoggerService()->getLogger()->critical($message, [\n \"requestContent\" => $request->getContent(),\n ]);\n throw new Exception($message);\n }\n\n $searchParametersDto = SearchParametersDTO::fromJson($json);\n $searchResultsJsons = $this->searchController->getSearchResults($searchParametersDto);\n\n $response = new SearchResultsDTO();\n $response->setResultsJsons($searchResultsJsons);\n $response->prefillBaseFieldsForSuccessResponse();\n\n return $response->toJsonResponse();\n }", "title": "" }, { "docid": "cd39a494ae37eb0b94b92fc2aea39e2c", "score": "0.58953387", "text": "public function searchAction() {\n //get model name\n $modelName = $this->modelName;\n\n //extracting parameterrs\n $params = array();\n for ($i = 3; $i < count($this->params); $i++) {\n $params[$this->params[$i]] = $this->params[++$i];\n }\n\n //building the query \n $query = '$model = \\\\' . $modelName . \"::query()\";\n $query .= \"->where(\\\"1=1\\\")\"; //where default\n foreach ($params as $key => $value) {\n //if order by\n if ($key == \"order\") {\n $query .= \"->orderBy(\\\"\" . $value . \"\\\")\";\n break;\n //if condition is IN\n } else if (strpos($value, \"(IN)\") !== false) {\n $value = substr($value, strpos($value, \"(IN)\") + 4);\n $query .= \"->andWhere(\\\"$key IN ($value)\\\")\";\n } else {\n $query .= \"->andWhere(\\\"$key = '$value'\\\")\";\n }\n }\n $query .= \"->execute();\";\n eval($query);\n\n //extracting data from resultset after query executed\n $model->setHydrateMode(Resultset::HYDRATE_ARRAYS);\n $result = array();\n foreach ($model as $key => $value) {\n $result[] = $value;\n }\n\n $this->response->setJsonContent($result);\n\n return $this->response;\n }", "title": "" }, { "docid": "2c1aaa282069af8489416b9e90f761a7", "score": "0.58913916", "text": "public function getCurrentElasticResult()\n {\n return $this->elasticResult;\n }", "title": "" }, { "docid": "16b33f490ca98cb51cd5bd13cc6a40cd", "score": "0.5890151", "text": "public function search(): Response\n {\n return $this->requestBuilder->build($this);\n }", "title": "" }, { "docid": "7006d14ecf4e97a9153c000b229227d6", "score": "0.5886371", "text": "function generate_results($search)\n\t{\n\t\t$result = array();\n\n\t\t$sql = \"SELECT *, MATCH(keywords) AGAINST (?) AS relevance\n\t\t\t\tFROM \".ee()->db->dbprefix('cp_search_index').\"\n\t\t\t\tWHERE MATCH(keywords) AGAINST (?)\n\t\t\t\tORDER BY relevance DESC\";\n\n\t\t$query = ee()->db->query($sql, array($search, $search));\n\n\t\tforeach($query->result() as $row)\n\t\t{\n\t\t\t// Don't show things they cannot use\n\t\t\tif ($row->access != 'all' && ee()->session->userdata['group_id'] != 1 && ee()->session->userdata[$row->access] != 'y')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$url = BASE.AMP.'C='.$row->controller.AMP.'M='.$row->method;\n\t\t\t$name = $this->_get_description($row->controller, $row->method);\n\n\t\t\t$result[] = array('url' => $url, 'name' => $name);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "37703b67ffac134dc2bc8f438631894c", "score": "0.58847815", "text": "function get_search_results(\n\t\t$query,\n\t\t$start=null,\n\t\t$per_page=null,\n\t\t$domain=null,\n\t\t$search_url=\"http://google.cc.ucf.edu/search\"\n\t){\n\t$start = ($start) ? $start : 0;\n\t$per_page = ($per_page) ? $per_page : 10;\n\t$domain = ($domain) ? $domain : $_SERVER['SERVER_NAME'];\n\t$results = array(\n\t\t'number' => 0,\n\t\t'items' => array(),\n\t);\n\t$query = trim($query);\n\t$per_page = (int)$per_page;\n\t$start = (int)$start;\n\t$query = urlencode($query);\n\t$arguments = array(\n\t\t'num' => $per_page,\n\t\t'start' => $start,\n\t\t'ie' => 'UTF-8',\n\t\t'oe' => 'UTF-8',\n\t\t'client' => 'default_frontend',\n\t\t'output' => 'xml',\n\t\t'sitesearch' => $domain,\n\t\t'q' => $query,\n\t);\n\t\n\tif (strlen($query) > 0){\n\t\t$query_string = http_build_query($arguments);\n\t\t$url = $search_url.'?'.$query_string;\n\t\t$response = file_get_contents($url);\n\t\t\n\t\tif ($response){\n\t\t\t$xml = simplexml_load_string($response);\n\t\t\t$items = $xml->RES->R;\n\t\t\t$total = $xml->RES->M;\n\t\t\t\n\t\t\t$temp = array();\n\t\t\t\n\t\t\tif ($total){\n\t\t\t\tforeach($items as $result){\n\t\t\t\t\t$item = array();\n\t\t\t\t\t$item['url'] = str_replace('https', 'http', $result->U);\n\t\t\t\t\t$item['title'] = $result->T;\n\t\t\t\t\t$item['rank'] = $result->RK;\n\t\t\t\t\t$item['snippet'] = $result->S;\n\t\t\t\t\t$item['mime'] = $result['MIME'];\n\t\t\t\t\t$temp[] = $item;\n\t\t\t\t}\n\t\t\t\t$results['items'] = $temp;\n\t\t\t}\n\t\t\t$results['number'] = $total;\n\t\t}\n\t}\n\t\n\treturn $results;\n}", "title": "" }, { "docid": "3dd8a30f4c4940e52353913842b6521e", "score": "0.58826035", "text": "public function get_all_results(){\n $this->get_response($this->url);\n $this->decode_response($this->response);\n }", "title": "" }, { "docid": "f159e57bb88c4f1bec939edd07883355", "score": "0.58723444", "text": "public function getSearchResult(): SearchResult\n {\n return new \\Spatie\\Searchable\\SearchResult(\n $this,\n $this->member_id,\n // $url\n );\n }", "title": "" }, { "docid": "5721c16c32c7f490e1728f4ae609b88d", "score": "0.58583003", "text": "function query($query)\r\n {\r\n\r\n Zend_Search_Lucene_Search_Query_Fuzzy::setDefaultPrefixLength(3);\r\n $index =& $this->getIndex();\r\n $results = $index->find($query);\r\n //print_r($results);\r\n return $results;\r\n\r\n /* //print_r($index);\r\n $results = $index->getFieldNames($query);\r\n //$topResult = $this->$index->find('first', array('conditions' => array($query)));\r\n //print_r($results);\r\n $query = Zend_Search_Lucene_Search_QueryParser::parse($query,'utf-8');\r\n\r\n try {\r\n $hits = $index->getFieldNames($query);\r\n //print_r('hi>>>>');\r\n // print_r($hits);\r\n }\r\n catch (Zend_Search_Lucene_Exception $ex) {\r\n //print_r($ex);\r\n $hits = array();\r\n $results = array();\r\n var_dump($ex);\r\n\r\n }\r\n\r\n return $results;*/\r\n }", "title": "" }, { "docid": "247ab10ca975da084d3a0ec52f562a50", "score": "0.5857335", "text": "public function getSearchAll() {\n\n $json = file_get_contents('php://input');\n $filter = json_decode($json);\n $pattern = $filter->sPattern;\n $page = $filter->page;\n $regionId = $filter->regionId;\n $cityId = $filter->cityId;\n $categoryId = $filter->categoryId;\n $minPrice = $filter->minPrice;\n $maxPrice = $filter->maxPrice;\n $onlyPremium = $filter->onlyPremium;\n $onlyPhotos = $filter->onlyPhotos;\n\n $mSearch = new Search();\n\n if($pattern){\n $mSearch->addPattern($pattern);\n $mSearch->addJoinTable(0, DB_TABLE_PREFIX.'t_item_resource res', DB_TABLE_PREFIX.'t_item.pk_i_id = res.fk_i_item_id', 'INNER');\n $mSearch->addGroupBy(sprintf(\" %st_item.pk_i_id \", DB_TABLE_PREFIX));\n } else {\n $mSearch->addJoinTable(0, DB_TABLE_PREFIX.'t_item_resource res', DB_TABLE_PREFIX.'t_item.pk_i_id = res.fk_i_item_id', 'INNER');\n $mSearch->addJoinTable(1, DB_TABLE_PREFIX.'t_item_description d', DB_TABLE_PREFIX.'t_item.pk_i_id = d.fk_i_item_id', 'INNER');\n $mSearch->addConditions(\"res.fk_i_item_id = d.fk_i_item_id\");\n $mSearch->addGroupBy(sprintf(\" %st_item.pk_i_id \", DB_TABLE_PREFIX));\n }\n\n if($regionId){\n $mSearch->addRegion($regionId);\n }\n\n if($cityId){\n $mSearch->addCity($cityId);\n }\n\n if($categoryId){\n $mSearch->addCategory($categoryId);\n }\n\n if($minPrice){\n $mSearch->priceMin($minPrice);\n }\n\n if($maxPrice){\n $mSearch->priceMax($maxPrice);\n }\n\n if($onlyPremium){\n $mSearch->onlyPremium($onlyPremium);\n }\n\n if($onlyPhotos){\n $mSearch->withPicture($onlyPhotos);\n }\n\n\n $mSearch->addField('res.pk_i_id as id_imagem');\n $mSearch->addField('res.s_path as path');\n $mSearch->addField('res.s_extension as extension');\n $mSearch->addField('d.s_title as title');\n\n $mSearch->page($page);\n\n $items = $mSearch->doSearch(FALSE,TRUE);\n\n return $items;\n }", "title": "" }, { "docid": "5219184b46bbbf63b165f7b14c8bc98e", "score": "0.585729", "text": "public function viewAction()\n {\n $postFinder = $this->get('fos_elastica.finder.website.post');\n $query = $this->get('request')->query->get('query');\n $page = $this->get('request')->query->get('page', 1);\n $limit = 20;\n\n $posts = [];\n if ($query) {\n $paginator = $this->get('knp_paginator');\n $posts = $paginator->paginate(\n $postFinder->createPaginatorAdapter($query),\n $page,\n $limit\n );\n }\n\n return [\n 'query' => $query,\n 'posts' => $posts,\n 'limit' => $limit,\n 'title' => $this->get('translator')->trans(\n 'Search: \"query\"',\n ['query' => $query]\n )\n ];\n }", "title": "" }, { "docid": "e08c989d73c246ee3097989a2f07edaf", "score": "0.585601", "text": "function search($q, $params = array()){\n $default = array(\n 'q' => $q,\n 'wskey' => Config::get('WORLDCAT'),\n 'format' => 'atom', // atom|rss\n 'start' => 1,\n 'count' => 10,\n //'cformat' => 'apa', // apa, chicago, harvard, mla, turabian\n );\n\n // http://worldcat.org/webservices/catalog/search/opensearch?q=[query]&format=[atom|rss]&start=[start position]&count=[maximum number of records to return]&cformat=[citation format]&wskey=[your key] \n $this->opensearch('http://www.worldcat.org/webservices/catalog/search/opensearch', array_merge($default, $params));\n \n foreach ($this->xpath->query('atom:entry') as $entry){ \n $item = array(\n 'title' => $this->xpath->query('atom:title', $entry)->item(0)->textContent,\n 'author' => $this->xpath->query('atom:author/atom:name', $entry)->item(0)->textContent,\n 'link' => $this->xpath->query('atom:link/@href', $entry)->item(0)->textContent,\n 'identifier' => array(),\n );\n \n foreach ($this->xpath->query('dc:identifier', $entry) as $identifier)\n $item['identifier'][] = $identifier->textContent;\n \n $this->results[] = $item;\n } \n }", "title": "" }, { "docid": "2f15ebfefa78f2e24353046f4ba2a6e2", "score": "0.5849492", "text": "function index_search()\n\t{\n\t $this->load->library(\"zend_search\");\n\t $this->zend_search->create_index();\n\t}", "title": "" }, { "docid": "98cc7d7e66604b9409ff7c080e61c5a5", "score": "0.5848443", "text": "public function search() {\n \n }", "title": "" }, { "docid": "56a2abb80e6de7b211d3a5d8217cec47", "score": "0.5841421", "text": "public function results();", "title": "" }, { "docid": "56a2abb80e6de7b211d3a5d8217cec47", "score": "0.5841421", "text": "public function results();", "title": "" }, { "docid": "84556f55f0b6e8e96d9bbdf8f9d65dac", "score": "0.58393997", "text": "public function searchMainIndex($query, $start=0, $count=10) {\n $this->logger->addDebug(\"Searching for a Constellation\");\n\n if (\\snac\\Config::$USE_ELASTIC_SEARCH) {\n\n $params = [\n 'index' => \\snac\\Config::$ELASTIC_SEARCH_BASE_INDEX,\n 'body' => [\n /* This query uses a keyword search\n 'query' => [\n 'query_string' => [\n 'fields' => [\n \"nameEntry\"\n ],\n 'query' => '*' . $input[\"term\"] . '*'\n ]\n ],\n 'from' => $start,\n 'size' => $count*/\n\n /* This query uses a full-phrase matching search\n 'query' => [\n 'match_phrase_prefix' => [\n 'nameEntry' => [\n 'query' => $query,\n 'slop' => 20\n ]\n ]\n ],*/\n 'query' => [\n 'filtered' => [\n 'query' => [\n 'match_phrase_prefix' => [\n 'nameEntry' => [\n 'query' => $query,\n 'slop' => 20\n ]\n ]\n ],\n 'filter' => [\n 'bool' => [\n 'must' => [\n 'term' => [\n 'subject' => 'women sculptors'\n ]\n ]\n ]\n ]\n ]\n ],\n 'from' => $start,\n 'size' => $count\n ]\n ];\n $this->logger->addDebug(\"Defined parameters for search\", $params);\n\n $results = $this->connector->search($params);\n\n $this->logger->addDebug(\"Completed Elastic Search\", $results);\n\n $return = array ();\n foreach ($results[\"hits\"][\"hits\"] as $i => $val) {\n array_push($return, $val[\"_source\"]);\n }\n\n $response = array();\n $response[\"total\"] = $results[\"hits\"][\"total\"][\"value\"]; // ES 7 syntax adds [\"value\"]\n $response[\"results\"] = $return;\n\n if ($response[\"total\"] == 0 || $count == 0) {\n $response[\"pagination\"] = 0;\n $response[\"page\"] = 0;\n } else {\n $response[\"pagination\"] = ceil($response[\"total\"] / $count);\n $response[\"page\"] = floor($start / $count);\n }\n $this->logger->addDebug(\"Created search response to the user\", $response);\n\n return $response;\n }\n\n return array (\n \"notice\" => \"Not Using ElasticSearch\"\n );\n }", "title": "" }, { "docid": "1adf8fce450fa70b806ab1e97d6ed47b", "score": "0.58312595", "text": "public function results()\r\n\t{\r\n\t\t\r\n\t\t$source = $this->request->getProperty(\"source\");\r\n\t\t\r\n\t\tif ( $source != \"local\" )\r\n\t\t{\r\n\t\t\t$objRestrict = new Xerxes_Framework_Restrict($this->request);\r\n\t\t\t$objRestrict->checkIP();\r\n\t\t}\r\n\t\t\r\n\t\t// @todo factor this out to the framework\r\n\t\t\r\n\t\t$this->addAdvancedSearchLink();\r\n\r\n\t\tparent::results();\r\n\t}", "title": "" }, { "docid": "ff5ba1ad5912999641cb4b165b0c1c05", "score": "0.58286476", "text": "public function actionResult($q): string\n {\n if (!empty($q)) {\n $q = Html::encode($q);\n\n /** @var SearchIndex $search_index */\n $search_index = \\Yii::createObject(SearchIndex::class);\n $results = $search_index->find($q);\n } else {\n $results = [];\n }\n\n return $this->render('result', \\compact('q', 'results'));\n }", "title": "" }, { "docid": "6f4ae60f77af230cc70c039686654fa4", "score": "0.5827504", "text": "public function index(Request $request)\n {\n $filters = [\n 'subject' => $request->query->get('subject'),\n 'creator' => $request->query->get('creator'),\n ];\n\n if($request->query->get('q')){\n $query = [\n 'bool'=>[\n 'should' => [\n 'simple_query_string' => [\n 'query' => $request->query->get('q'),\n 'fields' => [\n 'title^5', \n 'description', \n 'subject^2', \n 'creator'\n ],\n ]\n ],\n 'minimum_should_match' => 1,\n ]\n ];\n }else{\n $query = [\n 'bool'=>[\n 'should' => [\n 'match_all'=>new \\stdClass()\n ],\n 'minimum_should_match' => 1,\n ]\n ];\n }\n\n $query['bool']['filter'][] = ['term' => ['status' => 'published']];\n\n $query['bool']['filter'] = array_merge($query['bool']['filter'], $this->_getFilterQueries($filters));\n\n //Call elasticsearch service\n $result = $this->elasticSearchService->search($query);\n\n return $this->render('home/index.html.twig', [\n 'result' => $result,\n 'debug' => $query,\n 'q' => $request->query->get('q', ''),\n 'filters' => $filters\n ]);\n }", "title": "" }, { "docid": "05262082503f3df46f2f08e4bf03e820", "score": "0.58269876", "text": "public function getSphinxResult()\n {\n return $this->results;\n }", "title": "" }, { "docid": "c8e3fb1ea516b749187f62be209d4fb6", "score": "0.58152324", "text": "function getResults();", "title": "" }, { "docid": "b728f7baa31a1fb90f69776ece2636e0", "score": "0.5814425", "text": "public function indexAction()\n {\n\t\tif(!isset($_SERVER['REDIRECT_uid'])) \n\t\t{\n\t\t\t$this->redirect()->toUrl('https://campuslife.rit.edu/Shibboleth.sso/Login?target=' . 'https://' . $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n\t\t}\n\t\t\n try\n {\n $c = new \\Solr\\SolrClient('127.0.0.1', '8080', '/solr/');\n $client = $c->getSolrClient();\n \n // get a select query instance\n $q = $client->createSelect();\n \n $q->setStart($this->params()->fromQuery('start', 0));\n $q->setRows(10);\n \n $dismax = $q->getDisMax();\n $dismax->setQueryParser('edismax');\n $dismax->setQueryFields('applicant_resume_text applicant_essay_personal_qualities applicant_essay_prior_experiences');\n $dismax->setQueryAlternative('*:*');\n //$dismax->setMinimumMatch('100');\n $dismax->setPhraseFields('applicant_resume_text applicant_essay_personal_qualities applicant_essay_prior_experiences');\n \n $hl = $q->getHighlighting();\n $hl->setFields('*'); //fix me\n $hl->setUseFastVectorHighlighter('true');\n $hl->setBoundaryScannerType('breakIterator');\n $hl->setBoundaryScannerType('SENTENCE');\n $hl->setFragSize('350'); //change me - must be less than preview cut-off\n \n //fix frag size issue tag getting cut off at \n $hl->setMergeContiguous('true');\n $hl->setRequireFieldMatch('true');\n \n $q->setQuery($this->params()->fromQuery('q', '*:*'));\n\n $nSU = new \\Solr\\Url\\SolrSearchUrl();\n $nSU->importQueryString($_SERVER['QUERY_STRING']);\n // error_log(\"STRING QUERY: \" + $_SERVER['QUERY_STRING']);\n $q->addSorts($nSU->getSort());\n\n foreach($nSU->getFilterQueries() as $fqText)\n {\n $fq = $q->createFilterQuery();\n $fq->setKey($fqText);\n $fq->setQuery($fqText);\n $q->addFilterQuery($fq);\n }\n\n // get the facetset component\n $facetSet = $q->getFacetSet();\n\n // create a facet query instance and set options\n $facetSet->createFacetField('applicant_position_name')\n ->setField('applicant_position_name')\n ->setMinCount('1');\n\n // this executes the query and returns the result\n \t \t// error_log(\"Query\\n\");\n\t\t\t// error_log(print_r($q), true);\n $resultSet = $client->select($q);\n \t \t// error_log(\"Result Set\\n\");\n\t\t\t// error_log(print_r($resultSet), true);\n $facet = $resultSet->getFacetSet()->getFacet('applicant_position_name');\n \n $flatFacet = new \\Solr\\Facet\\SolrFlatFacet('applicant_position_name', $facet);\n \n $breadCrumbs = new \\Solr\\BreadCrumb\\SolrBreadCrumb($nSU);\n \n $r = new \\Solr\\GAR\\Search\\SearchResultCollection($resultSet);\n \n //construct pager with result count only\n $paginator = new \\Zend\\Paginator\\Paginator(new \\Zend\\Paginator\\Adapter\\Null($r->getNumberOfDocumentsFound()));\n \n //set the maximum number of items to display per page\n $paginator->setItemCountPerPage(10);\n\n //set the current page number\n $paginator->setCurrentPageNumber($this->params()->fromQuery('page', 1));\n\n return new ViewModel(\n array(\n 'numberOfDocumentsFound' => $r->getNumberOfDocumentsFound(),\n 'searchDocuments' => $r->getSearchResultCollection(),\n 'testFacet' => $flatFacet,\n 'q' => $this->params()->fromQuery('q'),\n 'breadCrumbs' => $breadCrumbs->getBreadCrumbs(),\n 'paginator' => $paginator,\n 'rows' => $q->getRows()\n )\n );\n } catch(\\Exception $e)\n {\n throw new ControllerException('Error Loading Search', $e);\n }\n }", "title": "" }, { "docid": "c1ff55f7987ea389aced38a26f10e8a5", "score": "0.5812113", "text": "public function googleSearch()\n {\n $search = new \\Municipio\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }", "title": "" }, { "docid": "29218ef6cbb3da3665cf41c2bb617e35", "score": "0.58061767", "text": "public function search()\n {\n return response()->json(EmployeeCategory::search(request('search'))->get());\n }", "title": "" }, { "docid": "9fbd63e7fb40011cadaa17306ff0f198", "score": "0.58055305", "text": "public function index()\n {\n try {\n $temp = $this->client;\n\n $query = $temp->createQuery($temp::QUERY_SELECT);\n $resultset = $temp->execute($query);\n\n return View::make('solr.index')->with(['results' => $resultset, 'title' => 'Solr - List of Indexed Documents']);\n } catch(Solarium\\Exception $e) {\n return View::make('solr.index')->with('result', $e->message());\n }\n }", "title": "" }, { "docid": "9520ccbda141ebb240db7b60f6652ba7", "score": "0.57952255", "text": "public function search_endpoint_loads()\n\t{\n\t\t$response = $this->client->get('/search/CROOKED%20FROGMEN');\n\n $this->assertEquals(200, $response->getStatusCode());\n\t}", "title": "" }, { "docid": "ad2403ab24bbbfebbdc38d3296a320e6", "score": "0.5794851", "text": "abstract public function searchContent($searchTerm = '*', $filters = array(), $fields = array(), $sort = array(array('_score' => 'desc'), array('date_revised' => 'desc')), $options = array());", "title": "" }, { "docid": "74e1b4b7715dcb4c23affd3f8379a74e", "score": "0.5794779", "text": "abstract protected function getIndexResponse();", "title": "" }, { "docid": "de1a1d9468bc0826565aff39e1d0fb30", "score": "0.57916766", "text": "public function search() {\r\n }", "title": "" }, { "docid": "de1a1d9468bc0826565aff39e1d0fb30", "score": "0.57916766", "text": "public function search() {\r\n }", "title": "" }, { "docid": "2bd98707fff37388abce1a96da0cc208", "score": "0.57880384", "text": "function get_single() {\n // TODO: Some request and ES response validation\n\n $url = $this->get('ELASTICSEARCH_URL') . $this->get('PARAMS.item_id');\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n\n $results = curl_exec($ch);\n curl_close($ch);\n \n $this->set('results', json_decode($results, true));\n $path_to_template = 'api/templates/direct_access_json.php';\n echo $this->render($path_to_template);\n }", "title": "" }, { "docid": "d57b920a134cfe4bebe8553d1613be14", "score": "0.5759499", "text": "public function indexAction() {\n\t$form = new SolrForm();\n $form->removeElement('thumbnail');\n $form->q->setLabel('Search SMR list: ');\n $form->q->setAttribs(array('placeholder' => 'Try barrow for instance'));\n $this->view->form = $form;\n\n $params = $this->_getAllParams();\n\n $search = new Pas_Solr_Handler();\n $search->setCore('beogeodata');\n $search->setFields(array('*'));\n $search->setFacets(array('county', 'district'));\n\n if($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())\n && !is_null($this->_getParam('submit'))){\n\n if ($form->isValid($form->getValues())) {\n $params = $form->getValues();\n\tunset($params['csrf']);\n $this->_helper->Redirector->gotoSimple('index','smr','datalabs',$params);\n } else {\n $form->populate($form->getValues());\n $params = $form->getValues();\n }\n } else {\n\n $params = $this->_getAllParams();\n $form->populate($this->_getAllParams());\n\n\n }\n\n if(!isset($params['q']) || $params['q'] == ''){\n $params['q'] = '*';\n }\n $params['source'] = 'smrdata';\n $params['sort'] = 'id';\n $params['direction'] = 'asc';\n $search->setParams($params);\n $search->execute();\n $this->view->paginator = $search->createPagination();\n $this->view->results = $search->processResults();\n $this->view->facets = $search->processFacets();\n }", "title": "" }, { "docid": "2f6fc578539a4e7dda104f53bd489bca", "score": "0.57594556", "text": "public function index()\n {\n $data = Input::all();\n $theme = Theme::uses('margo')->layout('margo');\n $theme->setTitle('iNewGen :: Search');\n $theme->setDescription('Search description');\n\n $client = new Client(Config::get('url.inewgen-api'));\n $page = array_get($data, 'page', '1');\n $perpage = array_get($data, 'perpage', '15');\n $order = array_get($data, 'order', 'tagables.updated_at');\n $sort = array_get($data, 'sort', 'desc');\n\n // News\n $parameters = array(\n 'page' => $page,\n 'perpage' => $perpage,\n 'order' => $order,\n 'sort' => $sort,\n );\n\n isset($data['s']) ? $parameters['s'] = $data['s'] : '';\n $param = '';\n isset($data['s']) ? $param['s'] = $data['s'] : '';\n\n $results = $client->get('tags/search', $parameters);\n $results = json_decode($results, true);\n $news = array_get($results, 'data.record', array());\n\n $view = array(\n 'data' => $news,\n 'param' => $param,\n );\n\n //Pagination\n if ($pagination = getDataArray($results, 'data.pagination')) {\n $view['pagination'] = getPaginationsMake($pagination, $news);\n }\n\n $script = $theme->scopeWithLayout('search.jscript_index', $view)->content();\n $theme->asset()->container('inline_script')->usePath()->writeContent('custom-inline-script', $script);\n\n return $theme->scopeWithLayout('search.index', $view)->render();\n }", "title": "" }, { "docid": "5429d08ed1cbb1c537a9f97f9d44b51a", "score": "0.57573074", "text": "public function index(Request $request)\n {\n\n $discovery = new EDSAPI(\n env('EDS_USERID'),\n env('EDS_PASSWORD'),\n env('EDS_PROFILE'),\n env('EDS_ORG')\n );\n\n $result = $discovery->search($request);\n $items = $result['items'];\n $source_types = $result['source_types'];\n $subjects = $result['subjects'];\n\n return view('search.results', compact('items', 'source_types', 'subjects'));\n\n }", "title": "" }, { "docid": "e5459de5ee12222c94a2b43e59f926fb", "score": "0.57482946", "text": "function getResults() { \n return $this->results; \n }", "title": "" } ]
360dbe51995fbc5c54819aa903ea1c14
Returns table name mapped in the model.
[ { "docid": "0b8de4f71dbaab52b84faa7704fa1d41", "score": "0.0", "text": "public function getSource()\n {\n return 'product';\n }", "title": "" } ]
[ { "docid": "de47d8658fa016248414474b89cf36f4", "score": "0.83204544", "text": "public function getTableName() {\n\t\treturn strtolower(str_replace('\\\\', '_', trim(preg_replace('/^model/i', '', get_class($this)), '\\\\')));\n\t}", "title": "" }, { "docid": "de47d8658fa016248414474b89cf36f4", "score": "0.83204544", "text": "public function getTableName() {\n\t\treturn strtolower(str_replace('\\\\', '_', trim(preg_replace('/^model/i', '', get_class($this)), '\\\\')));\n\t}", "title": "" }, { "docid": "16ec26724959817eb9fa13aaf2453a22", "score": "0.8142704", "text": "public static function getTableName() {\n // init model and get the table name\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "a02af4ab4716098af23809a0bc216dc0", "score": "0.8084299", "text": "protected function actualTableName()\r\n\t{\r\n\t\tif (isset($this->actualTable)) {\r\n\t\t\treturn $this->actualTable;\r\n\t\t}\r\n\t\t$groupModel = $this->getGroup();\r\n\t\tif ($groupModel->isJoin()) {\r\n\t\t\t$joinModel = $groupModel->getJoinModel();\r\n\t\t\treturn $joinModel->getJoin()->table_join;\r\n\r\n\t\t}\r\n\t\t$listModel = $this->getListModel();\r\n\t\t$this->actualTable = $listModel->getTable()->db_table_name;\r\n\t\treturn $this->actualTable;\r\n\t}", "title": "" }, { "docid": "e5ed0084b7dd598510436b6714aad00c", "score": "0.8070924", "text": "public static function getTableName(): string\n {\n return static::instance()->getTable();\n }", "title": "" }, { "docid": "ae7276c9cace3e9d4f8c4bb21174bfcd", "score": "0.8027598", "text": "public function getTableName()\n {\n return $this->orm['tableName'];\n }", "title": "" }, { "docid": "924d35720a81100b5d523c636480076c", "score": "0.794606", "text": "function getTableName(){\n\t\treturn strtolower(get_class($this).\"s\");\n\t}", "title": "" }, { "docid": "1a4b3ca752894c9501b6992d858eba5c", "score": "0.79459447", "text": "public static function getTableName()\n {\n return static::$table;\n }", "title": "" }, { "docid": "07e1b2848d498da59a82a08e7ef14003", "score": "0.7937933", "text": "public static function getTableName() {\n return static::$table_name;\n }", "title": "" }, { "docid": "e6c1c3b3b3340217b86f18b8240f0e16", "score": "0.791658", "text": "private function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "title": "" }, { "docid": "3ad5a72d4a9dd9888528f0818ec212ff", "score": "0.7894858", "text": "public function getTable() {\n $objAnnotations = new class_reflection($this);\n $arrTargetTables = $objAnnotations->getAnnotationValuesFromClass(class_orm_mapper::STR_ANNOTATION_TARGETTABLE);\n if(count($arrTargetTables) != 0) {\n $arrTable = explode(\".\", $arrTargetTables[0]);\n return _dbprefix_.$arrTable[0];\n }\n\n //legacy code\n return $this->getArrModule(\"table\");\n }", "title": "" }, { "docid": "fa29d6f8c41c7a0f4caaef63c74cd854", "score": "0.7885598", "text": "public function getTable() {\n\t\tif (isset($this->table)) {\n\n\t\t\t// table name is explicitly defined\n\t\t\t//\n\t\t\treturn $this->table;\n\t\t} else {\n\n\t\t\t// table name is derived from class name\n\t\t\t//\n\t\t\treturn BaseModel::getTableName(class_basename($this));\n\t\t}\n\t}", "title": "" }, { "docid": "cf6a40356ea01d99056a77f889894123", "score": "0.78815776", "text": "public function getTableName() {\n\t\treturn 'models';\n\t}", "title": "" }, { "docid": "a60af29e017edbe67201f84d7aecbd5e", "score": "0.7879831", "text": "private function _get_table_name_from_class()\n\t{\n\t\treturn strtolower(substr(get_class($this), 0, strrpos(get_class($this), '_model')));\n\t}", "title": "" }, { "docid": "14a8c2626fb74e9ae793aedfa7818bd5", "score": "0.78728586", "text": "public function getTableName() {\n return self::TABLE_PREFIX . self::TABLE_NAME;\n }", "title": "" }, { "docid": "670953ce6879d9a94148dc34afe6b34e", "score": "0.7865598", "text": "public static function getTableName(){\n return static::$table_name;\n }", "title": "" }, { "docid": "e9767ca3f881028fbb176328eda2ebf3", "score": "0.78599894", "text": "public static function getTableName() {\r\n return @static::$tableName ? static::$tableName : strtolower(basename(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, get_called_class())));\r\n }", "title": "" }, { "docid": "073160eaa6b692c2f202a213a0955ac5", "score": "0.78509533", "text": "public function getTableName ()\n {\n return $this->getDbTable()->info('name');\n }", "title": "" }, { "docid": "5796a4bbacfeff7b4ac52e01c39afc0f", "score": "0.7839457", "text": "public function getTableName() {\n global $wpdb;\n\n return apply_filters( \"frosso_pluginh/model/{$this->table}/table_name\", $wpdb->prefix . $this->table, $this );\n }", "title": "" }, { "docid": "acb22710a32f4189b4499a1b1cd8f351", "score": "0.78287834", "text": "private function modelName(): string\n {\n return App::shortName(get_class($this->table), 'Model/Table', 'Table');\n }", "title": "" }, { "docid": "fb1e407b1bed1c0d3f8ddc04b60d8ebd", "score": "0.7828705", "text": "public static function modelTableName()\n {\n return static::$MODEL_TB;\n }", "title": "" }, { "docid": "055d0931594b1fce618cbbba00555ac6", "score": "0.7820403", "text": "protected function getTableName()\r\n\t{\r\n\t\t$listModel = $this->getListModel();\r\n\t\t$table = $listModel->getTable();\r\n\t\t$groupModel = $this->getGroup();\r\n\t\tif ($groupModel->isJoin()) {\r\n\t\t\t$joinModel = $groupModel->getJoinModel();\r\n\t\t\t$join = $joinModel->getJoin();\r\n\t\t\t$name = $join->table_join;\r\n\t\t} else {\r\n\t\t\t$name = $table->db_table_name;\r\n\t\t}\r\n\t\treturn $name;\r\n\t}", "title": "" }, { "docid": "e8fa9c82ebe63b82afa303109667b634", "score": "0.77992624", "text": "public function getTableName()\n {\n return $this->table;\n }", "title": "" }, { "docid": "a0e47416ad4fb0fa74f964f44c34f3b8", "score": "0.7785981", "text": "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "title": "" }, { "docid": "81463e4a1ca2d52f1aa1801b9d8488de", "score": "0.77840483", "text": "public function getTable()\n {\n if (! isset(self::$tableName)) {\n $splitter = new Splitter(static::getClassName());\n\n $splittedString = $splitter->format();\n\n self::$tableName = Inflect::pluralize($splittedString);\n }\n\n return self::$tableName;\n }", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.7781298", "text": "public function getTableName();", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.7781298", "text": "public function getTableName();", "title": "" }, { "docid": "f39fc8455d36276ed8b663e2b3877d41", "score": "0.77789646", "text": "public function getTableName()\n {\n return $this->_tbl;\n }", "title": "" }, { "docid": "a8058eb3f79a4ad2dda45b5427c879c9", "score": "0.7767552", "text": "private function getTableName() {\n\n $objName = str_replace('Service', 'Table', get_class($this));\n return $objName;\n }", "title": "" }, { "docid": "f0ec84619b4240aca80ce92421257c11", "score": "0.7767321", "text": "public function getTableName() {\n return $this->table;\n }", "title": "" }, { "docid": "45f8581c23a1caec452ce11bd4933700", "score": "0.7765399", "text": "protected function getTableSingular(): string\n {\n return Str::singular($this->newModel()->getTable());\n }", "title": "" }, { "docid": "ca1d370b71030a2a011bd834db3a9a4c", "score": "0.7764687", "text": "protected function getTableName(): string\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.776287", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "b5f65ecba982d8f73c5a270af7b41eb3", "score": "0.77481073", "text": "private static function __getTableName() {\n return static::$tableName ? static::$tableName : strtolower(get_called_class());\n }", "title": "" }, { "docid": "186a732b4fb8bf14245c4bc78d0f6e3b", "score": "0.7747845", "text": "public function getNameTable()\n\t{\n\t\treturn $this->comvertNameTable(get_class($this));\t\t\n\t}", "title": "" }, { "docid": "7bf4cbcfee5eaba650c8902ac44b2047", "score": "0.77430624", "text": "public function getModelName()\n {\n return $this->getModel()->getTable();\n }", "title": "" }, { "docid": "d45f78b33e3ef7c78674e19a2d42a3b5", "score": "0.77427477", "text": "public function getName(): string {\n return $this->table_name;\n }", "title": "" }, { "docid": "775f6fdbd7309459a05d5ee5ebf43065", "score": "0.77261907", "text": "public function getTableName() {\n\t\treturn static::$tableName;\n\t}", "title": "" }, { "docid": "d95e29172cecc270b60a33680d8b34f2", "score": "0.7717323", "text": "public function getTableName(): string\n {\n return $this->TableName;\n }", "title": "" }, { "docid": "63ceeb6d6b86c89d7c4fe4508a51730e", "score": "0.7695623", "text": "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.7690683", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "0189b8f4ce25d672dd789523d67c5237", "score": "0.7645846", "text": "public function table_name(): string{\n return $this->table;\n }", "title": "" }, { "docid": "1aa4092324ad736bbde8abe31fac2104", "score": "0.7629148", "text": "public function getTableName(): string\n {\n return self::TABLENAME;\n }", "title": "" }, { "docid": "3dc4de9ae6de175d03af64a8e2196c28", "score": "0.762665", "text": "function getTableName()\n {\n return $this->dbTableName;\n }", "title": "" }, { "docid": "542c23156c75f6663dd8be16364088f0", "score": "0.7624739", "text": "public function getName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "bfe1d34252d2b280959fed31a48ae5df", "score": "0.76218605", "text": "public function getTableName(){\n return $this->tableName;\n }", "title": "" }, { "docid": "83f55d5534c4951dfdbe53a4eab2a924", "score": "0.7617118", "text": "public function tableName()\n {\n return static::modelTableName();\n }", "title": "" }, { "docid": "d8cfe3a9fc4f4635a58866ec42544f0e", "score": "0.7593783", "text": "public static function getTableName(): string\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "e0e522ece924548757eec45c78e2598a", "score": "0.75927943", "text": "public static function getTableName()\n {\n $splitter = new Splitter(self::getClassName());\n $tableName = $splitter->format();\n $tableName = Inflect::pluralize($tableName);\n return $tableName;\n }", "title": "" }, { "docid": "7e689bec162d2d6f5375f65c3c0ecf96", "score": "0.75817513", "text": "public static function tableName(): string\n\t{\n\t\treturn self::$tableName;\n\t}", "title": "" }, { "docid": "25878ca8b44be6a1f167ac734e13920d", "score": "0.75771785", "text": "public function getTableName(): string\n {\n if (empty($this->table_name)) {\n $this->table_name = $this->pool->getTypeTable($this->getRegisteredType());\n }\n\n return $this->table_name;\n }", "title": "" }, { "docid": "8b2b91788726d4a9ecd9f676a36ed6c9", "score": "0.7570174", "text": "public function getDbTableName() {\n return $this->table;\n }", "title": "" }, { "docid": "d8c4f170f0d73762f2906807e7346a07", "score": "0.75696456", "text": "public static function GetTableName()\r\n {\r\n return self::$_table;\r\n }", "title": "" }, { "docid": "98337bc82ae93a0faea89b9bcc7edcf9", "score": "0.75652695", "text": "public function getFieldName(){\n\t\treturn \"Table\";\n\t}", "title": "" }, { "docid": "49357289dd352eec05d15c1d8f682482", "score": "0.75553894", "text": "protected function getModelName()\n {\n return ucwords(str_singular(camel_case($this->meta['table'])));\n }", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.7552552", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.7552552", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "eb8206b97827d2df19710c4042fe5e2c", "score": "0.7550126", "text": "public function tableName()\n {\n if (empty($this->table)) {\n $attribute = $this->attribute();\n if ($attribute->isStatic()) {\n $this->table = $attribute->entityType()->entityTableName();\n } else {\n $this->table = $this->type();\n }\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "9e34fa08516ad874f9d0497864eacb4a", "score": "0.7543832", "text": "public static function getTableName() {\n return (new static)->getTable();\n }", "title": "" }, { "docid": "cfbb31881501be9a579089a9ee990cdd", "score": "0.7543656", "text": "public function getTableName() {\n return $this->_name;\n }", "title": "" }, { "docid": "87310cfc09a8706368a1651bd6c5db47", "score": "0.7537593", "text": "public function getTable()\n {\n return $this->model->getTable();\n }", "title": "" }, { "docid": "8bf69e9bab701774f55e38124c9a020f", "score": "0.7533058", "text": "protected function getTable(): string {\n return $this->table;\n }", "title": "" }, { "docid": "8bf69e9bab701774f55e38124c9a020f", "score": "0.7533058", "text": "protected function getTable(): string {\n return $this->table;\n }", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.752035", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "fcc594d528298915544e5d143bff0e30", "score": "0.7516909", "text": "public function getTableName(): string\n {\n $parts = explode('\\\\', $this->entityName);\n $tableName = end($parts);\n $tableName = lcfirst($tableName);\n if (ctype_lower($tableName)) {\n return $tableName;\n }\n $pieces = preg_split('/(?=[A-Z])/', $tableName);\n $tableName = $pieces[0] . '_' . lcfirst($pieces[1]);\n\n return $tableName;\n }", "title": "" }, { "docid": "9a50b3f17ca3301ded4d5890fd236c54", "score": "0.7511224", "text": "protected function getTableName(){ return get_class($this); }", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75104177", "text": "public function getTableName(): string;", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75104177", "text": "public function getTableName(): string;", "title": "" }, { "docid": "f4c4efa1a9c8fdfaf64ad04c44e1002b", "score": "0.750857", "text": "public function getTableName(): string\n {\n return $this->rawData['tableName'] ?? '';\n }", "title": "" }, { "docid": "84c04c1cb68f3d88f3b0d5301690f567", "score": "0.7506094", "text": "protected function _getDefaultTable() {\n $model = get_called_class();\n $model = explode('\\\\', $model);\n $class = array_pop($model);\n $matches = [];\n if (!preg_match('/^(.+)Model$/', $class, $matches)) {\n throw new Exception('wrong class');\n }\n $table = $matches[1];\n $table = preg_replace('/([a-z0-9])([A-Z])/', '${1}_${2}', $table);\n $table = strtolower($table);\n return \"`{$table}`\";\n }", "title": "" }, { "docid": "d1ca9c74a722771a66138945bac3f9b8", "score": "0.7498831", "text": "protected function name()\n\t{\n\t\treturn $this->__name ? $this->__name : ucfirst($this->Model->table);\n\t}", "title": "" }, { "docid": "cdf53f8756229964c10d723f0ec87124", "score": "0.74864674", "text": "public function getTableName() {\r\n\t return $this->_tableName;\r\n\t}", "title": "" }, { "docid": "b4765205e3b6b760f7805f25043b7468", "score": "0.7477183", "text": "private function generateTableName() {\r\n\t\t$name = explode('\\\\' , get_called_class());\r\n\t\t$name = $name[count($name)-1];\r\n\t\t$name = self::filterToDb($name);\r\n\t\treturn $name . 's';\r\n\t}", "title": "" }, { "docid": "b12a63fd608d07488a466c7d4320746c", "score": "0.7476748", "text": "public function table() {\n return Dbase::tables[$this->name()];\n }", "title": "" }, { "docid": "fa40875c2601fcebd1f9246d8c4d9755", "score": "0.74596614", "text": "protected function compute_table_name()\n\t{\n\t\tif ( ! $this->table_name)\n\t\t{\n\t\t\t$this->table_name = plural(preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))));\n\t\t}\n\t}", "title": "" }, { "docid": "7d404db25cfd97529603dbc5233e587e", "score": "0.7457342", "text": "public function getTable()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "c5bed8fc2e3098a9bec8e55db740d5c3", "score": "0.7445221", "text": "public function get_table_name()\n\t{\n\t\tif ($this->table === NULL)\n\t\t{\n\t\t\t$this->set_table_name($this->_get_table_name_from_class());\n\t\t}\n\t\t\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "5d9212d0b29a62a99e53ed58341c36bf", "score": "0.7439621", "text": "public static function TABLE_NAME () { return(self::TABLE_NAME); }", "title": "" }, { "docid": "8c65e6381b6be1fce4447dc9e9ebd9a9", "score": "0.74376017", "text": "function table_name()\n\t{\n\t\treturn ($this->schema != '') ? $this->schema . '.' . $this->table : $this->table;\n\t}", "title": "" }, { "docid": "ba1bd54f0fc60b566fcb4b7c9dccbab7", "score": "0.74361503", "text": "public function getName(): string\n {\n return $this->schema->getTableName();\n }", "title": "" }, { "docid": "5bfd4cd3d7965b662c8659f61ba72440", "score": "0.7425111", "text": "public function getTableDbName()\n {\n return $this->orm['tableNameDb'];\n }", "title": "" }, { "docid": "be369d93d1c8a34017566714a5f9f454", "score": "0.74214214", "text": "protected function get_table_name() {\n\t\treturn Yoast_Model::get_table_name( 'Indexable_Meta' );\n\t}", "title": "" }, { "docid": "b9f551326a2853873f00d1e150625b40", "score": "0.7421302", "text": "protected static function guessTableName()\n {\n $ref = new ReflectionClass(static::class);\n\n if(isset($ref->getDefaultProperties()['table'])){\n return $ref->getDefaultProperties()['table'];\n }\n return strtolower($ref->getShortName()). 's';\n }", "title": "" }, { "docid": "c6b1a8018afc54d2e63b0bb83d716986", "score": "0.7418288", "text": "protected function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "bb488e516788738947306cf54f7559f9", "score": "0.7414958", "text": "function table () {\n\t\treturn ($this->_table_name);\n\t}", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74092925", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74092925", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "3a57208c473d35c53572d6d60c39a2cd", "score": "0.7404001", "text": "public function getTable() {\n if (!is_array($this->tables)) // TODO: colocar para buscar entre os joins também\n $this->tables = array();\n $table = reset($this->tables);\n return $table['#name'];\n }", "title": "" }, { "docid": "49749b9d9050267dd4829dffbe105356", "score": "0.7403286", "text": "protected function get_meta_table_name() {\n\t\t\treturn $this->_meta_table_name;\n\t\t}", "title": "" }, { "docid": "c6428d640a97a926c9fc77e73289de89", "score": "0.7397267", "text": "public function getTableName()\n {\n global $wpdb;\n if (is_object($wpdb)) { \n return $wpdb->prefix . $this->config['table'];\n }\n }", "title": "" }, { "docid": "24b6bda224090156ca4655526f3b715c", "score": "0.7388501", "text": "public function tableName(){\n $file = Storage::migrations()->path($this->migration . '.php');\n if($file !== false)\n {\n require_once $file;\n\n // get the file name of the current file without the extension\n // which is essentially the class name\n $class = '\\Showcase\\Database\\Migrations\\\\' . basename($file, '.php');\n if (class_exists($class))\n {\n $table = new $class;\n $table->handle();\n return $table->name;\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "8a46aaafcd3e3f7ad3795426ee0a20c5", "score": "0.73777974", "text": "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable' );\n\t}", "title": "" }, { "docid": "122406ae66530d875dcf43179d48d221", "score": "0.7363128", "text": "final function _get_table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "4c6a0d54fca2dc453868080f1330f49b", "score": "0.73613095", "text": "public function getTable()\n {\n return $this->entityMap->getTable();\n }", "title": "" }, { "docid": "5f2ac012ad343879d46e323f77fa4699", "score": "0.7355329", "text": "public function getDbTableName() : string {\n\t\t\treturn $this->dbTable->data() ?? '';\n\t\t}", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.7353781", "text": "abstract public function getTableName();", "title": "" }, { "docid": "406ab2fd5b1de7b65aa3eb0bfff698cd", "score": "0.73467344", "text": "public function metaTableName()\r\n\t{\r\n\t\t$tblName = self::tableName();\r\n\r\n\t\t// Add _meta prefix to parent table name\r\n\t\t$tblName = str_replace('}}', '_meta}}', $tblName);\r\n\r\n\t\t// Resolve the actual name of the meta table\r\n\t\t$tblName = str_replace('{{%', Yii::$app->db->tablePrefix ?: '', $tblName);\r\n\t\t$tblName = str_replace('}}', '', $tblName);\r\n\r\n\t\treturn $tblName;\r\n\t}", "title": "" }, { "docid": "44417da61b55a3de1b9a808c7750c18a", "score": "0.7346493", "text": "public function getTable() : string\n\t{\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "04ab0cb0df7fad3bc72924e302434c9b", "score": "0.7326672", "text": "protected function getUserTable(): string\n {\n return table_name(Satifest::getUserModel());\n }", "title": "" } ]
4539a31323b2d65c2449b73895bb755c
Returns the primary key for this object (row).
[ { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7904276", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" } ]
[ { "docid": "379e9f45c0c8a3fbc023dcb03a418f7f", "score": "0.854174", "text": "public function get_primary_key(){\r\n\t\t\treturn $this->column_primary_key;\r\n\t\t}", "title": "" }, { "docid": "595aeba520f61456697983870d7c79c9", "score": "0.8492658", "text": "public function getPrimaryKey($row)\n\t{\n\t\t$primary_key = $this->primary_key;\n\t\t\n\t\treturn $row->$primary_key;\n\t}", "title": "" }, { "docid": "ebadb485f6fa959a7b7f2fd4aad7ee7a", "score": "0.8331092", "text": "public function get_primary_key_value()\n\t{\n\t\t// return $this->_n_obj;\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "f87057dc8f6593358ae5c104786bffab", "score": "0.8265146", "text": "public function getPrimaryKey()\r\n\t{\r\n\t\treturn $this->_primaryKey;\r\n\t}", "title": "" }, { "docid": "2fa82722cf6eec185779b1634c66dd3b", "score": "0.8240534", "text": "public function getPrimaryKey()\n {\n return $this->_primaryKey;\n }", "title": "" }, { "docid": "86268543a322551c6fe170954341116a", "score": "0.81769425", "text": "public function getPrimaryKey(): string\n\t{\n\t\treturn $this->primaryKey;\n\t}", "title": "" }, { "docid": "101cc89b253585cbb7639ccb2a6fe2f2", "score": "0.81765753", "text": "public function getPrimaryKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "101cc89b253585cbb7639ccb2a6fe2f2", "score": "0.81765753", "text": "public function getPrimaryKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "101cc89b253585cbb7639ccb2a6fe2f2", "score": "0.81765753", "text": "public function getPrimaryKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "5314b8a1a4d18b295e6121efeac05e00", "score": "0.81569946", "text": "function pk() {\n return $this->_primary_key;\n }", "title": "" }, { "docid": "bd4a611f1dfd6e104c23510c1a2e2b45", "score": "0.81567496", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->primaryKey;\n\t}", "title": "" }, { "docid": "230d0cf7a3c3c080e0cbf814808785a5", "score": "0.81557953", "text": "public function getPrimaryKey() {\n\t\treturn $this->primaryKey;\n\t}", "title": "" }, { "docid": "5e6fe28661ad9ed116b75e394e28416d", "score": "0.81142527", "text": "public function getPrimaryKey()\n {\n $primary_key = $this->getPrimaryKeyName();\n\n if (is_array($primary_key)) {\n $result = array();\n foreach ($primary_key as $key) {\n $result[$key] = $this->$key;\n }\n\n return $result;\n } else {\n return $this->$primary_key;\n }\n\n }", "title": "" }, { "docid": "0456aeed13f1aaa2de1e93b9e2d78295", "score": "0.80743665", "text": "public function getPrimaryKey() {\n\n return $this->table->getPrimaryKey();\n\n }", "title": "" }, { "docid": "3d95989cf2d8aaab3248362dd47616cb", "score": "0.8059128", "text": "public function getPrimaryKey()\n {\n return $this->getInhdnbr();\n }", "title": "" }, { "docid": "530e7fc6c4691e9848b22feb54ca3103", "score": "0.80472714", "text": "public function getPrimaryKey()\n {\n return $this->_pkValue;\n }", "title": "" }, { "docid": "905095eeccf12c42cea9e454748a528e", "score": "0.8039776", "text": "public function getPk() {\n\t\treturn $this->data[$this->pkColumn];\n\t}", "title": "" }, { "docid": "f0250d86e5bf63c323b7e0531d48562b", "score": "0.80254537", "text": "public function getPrimaryKey()\n\t{\n\t\tif(empty($this->primaryKey))\n\t\t{\n\t\t\tforeach($this->getSchema() as $field)\n\t\t\t{\n\t\t\t\tif($field[\"Key\"] == \"PRI\")\n\t\t\t\t{\n\t\t\t\t\t$this->setPrimaryKey($field[\"Field\"]);\n\t\t\t\t\treturn $this->getPrimaryKey();\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new Recipe_Exception_Generic(\"Table <b>\".$this->getName().\"</b> has no primary key defined.\");\n\t\t}\n\t\treturn $this->primaryKey;\n\t}", "title": "" }, { "docid": "b1f2031982e2f73f6568885fe3da6522", "score": "0.7986273", "text": "public function PrimaryKey() {\n\t\t\treturn $this->strListaCursoId;\n\t\t}", "title": "" }, { "docid": "9e3d06a5bdd4a3c9806a18e97761f915", "score": "0.797348", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getGruCodigo();\n\t}", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.79680234", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.79680234", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.79680234", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.79680234", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.79680234", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "91fa934eb4387192ad533365acf4fa8d", "score": "0.79500884", "text": "public function primaryKey()\n {\n return $this->_primaryKey;\n }", "title": "" }, { "docid": "0a911dad57877df775cb1911214ed9b2", "score": "0.7941207", "text": "function getPrimaryKey()\r\n\t{\r\n\t\t// Primary key field for the composite object is the primary key field of the outermost object.\r\n\t\t\r\n\t\treturn $this->__objects[0]->getPrimaryKey();\r\n\t}", "title": "" }, { "docid": "c94cf0e41489b7937735e041045b735c", "score": "0.7929523", "text": "public function get_primary_key(): string;", "title": "" }, { "docid": "c53dc1cf6ad6a291316d88d707af3d8e", "score": "0.79145336", "text": "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7905908", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7905908", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7905908", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "5eb0526dfdc22d701384f85649f46867", "score": "0.7882419", "text": "protected function getPrimaryKeyValue()\n {\n return $this->getValue($this->getPrimaryKeyColumnName());\n }", "title": "" }, { "docid": "85c632ec1f11436006032ca08135e976", "score": "0.78717494", "text": "public function getPrimaryKey()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "376a32fb114ca4aaeb8c2c89748bee50", "score": "0.7871208", "text": "function getPrimaryKey() {\n\t\treturn parent::getPrimaryKey();\n\t}", "title": "" }, { "docid": "376a32fb114ca4aaeb8c2c89748bee50", "score": "0.7871208", "text": "function getPrimaryKey() {\n\t\treturn parent::getPrimaryKey();\n\t}", "title": "" }, { "docid": "f8665052fdd20760860181742dbea202", "score": "0.7870529", "text": "public function getKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "d9e39b72cfdac619cc8c1b0e6bf7472a", "score": "0.7828624", "text": "public function get_pk_column ( /* void */ )\n {\n if (!isset($this->__pk))\n {\n throw new Logicoder_Model_Exception(\"Primary key not set.\");\n }\n return $this->__pk;\n }", "title": "" }, { "docid": "422967609534bae56353f530c73c773f", "score": "0.78104556", "text": "public function getID() {\n\t\treturn $this->_primaryKey;\n\t}", "title": "" }, { "docid": "dde76ce04522b7bf40001dcabdc177df", "score": "0.7808662", "text": "public function getPrimaryKey()\n {\n if (empty($this->indexes['PRIMARY'])) {\n return false;\n }\n\n $pk = $this->indexes['PRIMARY']->fields;\n\n return is_array($pk) && count($pk) > 1 ? $pk : array_shift($pk);\n }", "title": "" }, { "docid": "c052aaba3e52287a5c77cd4e2ac4c82f", "score": "0.7808164", "text": "public function getPrimaryKey()\n {\n $pk = array();\n foreach($this->getAttributes() as $name => $attribute /* @var Attribute $attribute */) {\n if ($attribute->isPrimaryKey)\n $pk[] = $name;\n }\n $count = count($pk);\n if (!$count)\n return 'id';\n else if ($count == 1)\n return $pk[0];\n else\n return $pk;\n }", "title": "" }, { "docid": "8154a533cd8be2aa5ff06c5e0825f78b", "score": "0.78027344", "text": "public function getPrimaryKeyValue(): mixed\n\t{\n\t\treturn $this->columns[$this->primaryKey];\n\t}", "title": "" }, { "docid": "13cd25ab830324dd0499e72d49e29c24", "score": "0.78027046", "text": "public function getPrimaryKeyField(){\n return $this->primaryKeyField;\n }", "title": "" }, { "docid": "b8ab9153c03068ed1b13de733f953364", "score": "0.7785715", "text": "public function primaryKey()\n {\n if (is_null($this->primaryKey)) {\n foreach ($this->columns() as $column => $data) {\n if (true === $data['primary']) {\n $this->primaryKey = $column;\n break;\n }\n }\n }\n\n return $this->primaryKey;\n }", "title": "" }, { "docid": "441e24beef3f28baa6264d1c1d7b3233", "score": "0.77695346", "text": "public function getPrimaryKey()\n {\n return $this->getSekolahId();\n }", "title": "" }, { "docid": "95a39e33d975ce6b1bdb0b5586299cf9", "score": "0.774608", "text": "public function getPrimaryKeyField(){\n return $this->oIterator->getItem()->getPrimaryKeyField();\n }", "title": "" }, { "docid": "e2a1440b3adccdc33704c015a2bf6e5c", "score": "0.7681469", "text": "public static function GetPrimaryKey () {}", "title": "" }, { "docid": "eb4196e17bab16a1cc2d8af869ca82c2", "score": "0.76618946", "text": "abstract public function getPrimaryKey();", "title": "" }, { "docid": "b9cea1aa7e79e2012a108677139c6617", "score": "0.7646954", "text": "static public function primaryKey()\n {\n return (new static())->getKeyName();\n }", "title": "" }, { "docid": "fd993a92829fb671a6a3197ffe51ecdf", "score": "0.7635528", "text": "public function getPK();", "title": "" }, { "docid": "7c5f3460dfc02e59ef7c4d7bea61d2b9", "score": "0.7629461", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoClasificacion();\n\t}", "title": "" }, { "docid": "2ef8654eb89092046f76873d99657c41", "score": "0.76281", "text": "protected function getPrimaryKey()\n {\n if (!$this->primaryKey) {\n throw new \\Exception('PrimaryKey is not defined in the mapper ' . get_class($this));\n }\n\n return $this->primaryKey;\n }", "title": "" }, { "docid": "055b96309697552725a6ad7a5011f91a", "score": "0.7626273", "text": "public function getPk()\n\t{\n\t\treturn $this->offsetGet( $this->getTable()->getPkField() );\n\t}", "title": "" }, { "docid": "ee1d64aafbd26a95167b790b028f7747", "score": "0.76204276", "text": "public function key ( /* void */ )\n {\n /*\n The key is the primary key.\n */\n return $this->__record[$this->__pk];\n }", "title": "" }, { "docid": "d0f99faef98615b274cbe45f00d68b7d", "score": "0.76151603", "text": "protected function _primaryKey()\n\t{\n\t\treturn $this->repo->getModel()->getKeyName();\n\t}", "title": "" }, { "docid": "337c75e041e9e749cac41cc9d7b0eb75", "score": "0.76110184", "text": "public function PK() {\n $returnvalue = '';\n $returnvalue .= $this->getCollectionObjectAttributeID();\n return $returnvalue;\n }", "title": "" }, { "docid": "236fad4bdda52f417da100ff73935765", "score": "0.7594949", "text": "public function getPrimaryKey() {\n if ($this->getDriver() instanceof \\Titon\\Db\\Mongo\\MongoDriver) {\n return '_id';\n }\n\n return parent::getPrimaryKey();\n }", "title": "" }, { "docid": "04f6e330e457bfd1ad498e98d656390c", "score": "0.75714356", "text": "abstract protected function getPrimaryKey();", "title": "" }, { "docid": "f5f3eb2399a13b00df2b296bc01f6903", "score": "0.7557426", "text": "static function getPrimaryKey() {\n\t\treturn Session::$_primaryKey;\n\t}", "title": "" }, { "docid": "b4c69c212fee9dd974ebb31f4ff106e9", "score": "0.75422865", "text": "public function getPrimaryKey()\n {\n return $this->getUserId();\n }", "title": "" }, { "docid": "f0a885cd5358b3ecb06fa333af2956ae", "score": "0.75382316", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item' => $this->iid_item);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "5036a2d98bc88d8477179ec991a1bf77", "score": "0.7527983", "text": "public function get_primary_column() {}", "title": "" }, { "docid": "604f8c64396af0d020cbf1d3a36b839e", "score": "0.7507214", "text": "public function getPrimaryKeyName() : string\n {\n return $this->primaryKeyName;\n }", "title": "" }, { "docid": "07599121e9a8570313272582d96ad69b", "score": "0.7505292", "text": "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('LanguagesTranslationsModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('LanguagesTranslationsModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "a216f3b194595565d3fe8d1ae6108c8f", "score": "0.7496217", "text": "public function getPrimaryKeyName()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "0ac73b46f3fa7b809b80416e4b01bf98", "score": "0.74780226", "text": "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('LinksUrlsModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('LinksUrlsModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "8414c3ea8bc27e9d3fbee11ba2947c00", "score": "0.74762005", "text": "public function getId()\n\t{\n\t\treturn isset($this[$this->_primary_key]) ? $this[$this->_primary_key] : null;\n\t}", "title": "" }, { "docid": "24a3104c2b3698786ce8d7ad823bd3a9", "score": "0.74623364", "text": "public static function getPrimaryKey()\n {\n $class = get_called_class();\n\n return (new $class())->getKeyName();\n }", "title": "" }, { "docid": "5005ec074534eaa8bf0dc614d9aa05c6", "score": "0.74572664", "text": "public function getPrimaryKeyName()\n {\n return $this->getMapper()->getDbTable()->getPrimaryKeyName();\n }", "title": "" }, { "docid": "5cdbf9b12028089f3a38fbce4060d1d9", "score": "0.743648", "text": "public function getId()\n {\n return $this->row_id;\n }", "title": "" }, { "docid": "4b4b0cb8732fe481866e0455d4230d18", "score": "0.7433615", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item_ex' => $this->iid_item_ex, 'id_enc' => $this->iid_enc);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "f78278c63a9ba74a0f7b78a6255d4d18", "score": "0.74308443", "text": "public function getKeyName(): string\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "641fc7cea78e0ee0d3d3f7c5aa03ba81", "score": "0.74230504", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item' => $this->iid_item, 'id_enc' => $this->iid_enc, 'id_nom' => $this->iid_nom);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "5c257f6b58d37ef2034857b88d0f978a", "score": "0.7419421", "text": "public function key()\n {\n return $this->row;\n }", "title": "" }, { "docid": "428f99d22f74446013817adba2531b9e", "score": "0.74192446", "text": "public function getPrimaryKey() {\n foreach ($this->schema as $column => $type) {\n if ($type['type'] === 'id') {\n return $column;\n }\n }\n }", "title": "" }, { "docid": "27871e3fd01a58d9cc29fccd2af65521", "score": "0.74079865", "text": "public function primaryKey(): string;", "title": "" }, { "docid": "4ce7d23177e94a63ae24b520fa86d1ac", "score": "0.7407018", "text": "public function getPrimaryKey() {\r\n\t\tforeach($this->fields as $index => $content) {\r\n\t\t\tif($content['field']['options']['primary'] == true) {\r\n\t\t\t\treturn $content;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$modelName = get_class($this->modelObj);\r\n\t\tPhpBURN_Message::output(\"<b>$modelName</b> [!has no Primary Key. How did you did it?!]\", PhpBURN_Message::EXCEPTION);\r\n\t}", "title": "" }, { "docid": "797d4311f302a2b2a44abbb3a012648f", "score": "0.7380048", "text": "public function getId() {\n return $this->get(static::$table_primary_key, null, false);\n }", "title": "" }, { "docid": "8b3600a3f3ba8a366912f0ed031fafb9", "score": "0.73663527", "text": "public function primaryColumn()\n {\n foreach($this->schema() as $column => $properties){\n if(key_exists(GlobalSystem::ExpPrimaryKey, $properties)){\n return $column;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "1e08531bbb1ab1ee395a6654e942b599", "score": "0.73661286", "text": "public function getPrimaryKey()\n {\n return $this->getDudiId();\n }", "title": "" }, { "docid": "1674543f6982daf67331ff0b7594bebe", "score": "0.7347994", "text": "public function get_primary_column()\n {\n }", "title": "" }, { "docid": "eae2f806fcee500896efb04c79e397a8", "score": "0.7339811", "text": "function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }", "title": "" }, { "docid": "eae2f806fcee500896efb04c79e397a8", "score": "0.7339811", "text": "function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }", "title": "" }, { "docid": "eae2f806fcee500896efb04c79e397a8", "score": "0.7339811", "text": "function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }", "title": "" }, { "docid": "c1aac79ba24cf3aafe1daaf6eca6a459", "score": "0.73348373", "text": "public static function getPrimaryKeyColumn() {\n\t\treturn self::getInstance()->cols['id'];\n\t}", "title": "" }, { "docid": "d22f853eaf484d66b7e2c84d4837a466", "score": "0.73304296", "text": "protected static function primaryKey(): string\n {\n return 'id';\n }", "title": "" }, { "docid": "85db337f963a8fc61a3514b79d921a9c", "score": "0.73262405", "text": "public function getId()\n {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "85db337f963a8fc61a3514b79d921a9c", "score": "0.73262405", "text": "public function getId()\n {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "a2eeb32ec685c997f4c77ca2935e8d52", "score": "0.73172075", "text": "public function getPrimaryKey()\n {\n return $this->getParticipantid();\n }", "title": "" }, { "docid": "955a8b16925c3e28ce7ffc12e596bfd8", "score": "0.7316606", "text": "public function getId() {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "29736b84e1e917603b2e87064ed5f5bb", "score": "0.7305639", "text": "public function getPrimary()\r\n\t{\r\n\t if (isset($this->_infos['primary']))\r\n\t return $this->_infos['primary'];\r\n\t else\r\n\t return $this->_table.'pk';\r\n\t}", "title": "" }, { "docid": "8c41b40a59d0611e74bcca0be3f57a29", "score": "0.72650945", "text": "private function getFirstPk()\r\n\t{\r\n\t\t$keys = array_keys($this->table['PK']);\r\n\t\treturn $keys[0];\r\n\t}", "title": "" }, { "docid": "a9353328f7b93c9aaa570d5924c48133", "score": "0.72561055", "text": "public function getId()\n\t{\n\t\treturn $this->getPrimaryKey();\n\t}", "title": "" }, { "docid": "0405880727cedfbe2e6d4267019e4df9", "score": "0.7247464", "text": "public function getId() {\n\t\treturn $this->getKey();\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "61c170e26c8a5b22c9ebe047044b52a1", "score": "0.0", "text": "public function store(Request $request)\n {\n\n if (isset($request->id_laboratorio)) {\n foreach ($request->id_laboratorio['laboratorios'] as $key => $laboratorio) {\n if (!is_null($laboratorio['laboratorio'])) {\n\n\n \n $req = new PagosPersonal();\n $req->id_personal = $laboratorio['laboratorio'];\n $req->monto = $request->monto_abol['laboratorios'][$key]['abono'];\n $req->usuario = Auth::user()->id;\n $req->fecha = date('Y-m-d');\n $req->sede = $request->session()->get('sede');\n $req->save();\n\n } \n }\n }\n\n \n\n\n return redirect()->route('pagosp.index')\n ->with('success','Creado Exitosamente!');\n\n\n }", "title": "" } ]
[ { "docid": "3ca36acd1130c145fec3824dfbb00135", "score": "0.6494459", "text": "public function store(Request $request, $resource)\n {\n $command = $this->translator->getCommandFromResource($resource, 'store');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request);\n\n $this->fireEventForResource($resource, 'store', $data);\n\n return $this->success($data, 201);\n }", "title": "" }, { "docid": "00155c41d87c9c0387e4babe3e9a9ae9", "score": "0.6454226", "text": "public function save()\n {\n $this->storage->write($this);\n }", "title": "" }, { "docid": "7356d03f49eac7d05de240c473d2bfe9", "score": "0.6448581", "text": "public function save()\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "5903d0dda7e3d80629ad4f3dc0709b1e", "score": "0.63630116", "text": "public function store()\n {\n $request = app($this->store_request);\n $this->service->create($request->all());\n\n return back()->with('success', 'Record Created Successfully');\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
6edca2929ea28bad57a26f72c2ce9d7d
Set Wistia video hashed ID.
[ { "docid": "04c47bdfc42937d3fb30640efcfecb15", "score": "0.6450568", "text": "public function set_video_hashed_id($tester_id, $video_hashed_id, $id = null) {\n if (!($id = $this->require_id($id))) {\n return false;\n }\n\n $tb = tb('project_tester');\n $hash = array(\n 'tester_id' => $tester_id,\n 'wistia_video_hashed_id' => $video_hashed_id\n );\n $where_str = \"project_id = '$id' AND tester_id = :tester_id\";\n $this->db()->update_record($hash, $tb, $where_str);\n\n return true;\n }", "title": "" } ]
[ { "docid": "602da4e09adce216110c24f752056716", "score": "0.5976722", "text": "public function setVideoID($value)\n {\n return $this->set('VideoID', $value);\n }", "title": "" }, { "docid": "602da4e09adce216110c24f752056716", "score": "0.5976722", "text": "public function setVideoID($value)\n {\n return $this->set('VideoID', $value);\n }", "title": "" }, { "docid": "602da4e09adce216110c24f752056716", "score": "0.5976722", "text": "public function setVideoID($value)\n {\n return $this->set('VideoID', $value);\n }", "title": "" }, { "docid": "602da4e09adce216110c24f752056716", "score": "0.5976722", "text": "public function setVideoID($value)\n {\n return $this->set('VideoID', $value);\n }", "title": "" }, { "docid": "602da4e09adce216110c24f752056716", "score": "0.5976722", "text": "public function setVideoID($value)\n {\n return $this->set('VideoID', $value);\n }", "title": "" }, { "docid": "fd61b31627429e09608a0ab11beec94a", "score": "0.5930643", "text": "public function getVideoId();", "title": "" }, { "docid": "dc9d8d441e3e98ef1d3c7448b37c20b8", "score": "0.58325213", "text": "protected function setUUID()\n {\n $this->id = preg_replace('/\\./', '', uniqid('bpm', true));\n }", "title": "" }, { "docid": "f8bfcf0279f10fe37774a45a60074b20", "score": "0.5754664", "text": "public function setHash( $hashval );", "title": "" }, { "docid": "53d555ce230275d83b1aeeb7c314198d", "score": "0.57231593", "text": "public function setVideoId($video_id);", "title": "" }, { "docid": "aa6ed7044b26e073d7fcd82ff716b83a", "score": "0.55218506", "text": "public function videoID() {\r\n preg_match('/(?<=\\?v=).{11}/', $this->_url,$id);\r\n if (empty($id)) return false;\r\n return $id[0];\r\n }", "title": "" }, { "docid": "c493167b944c1ac34e1194434bd81842", "score": "0.54436535", "text": "public function getVideoId()\n {\n return substr($this->getUrl(), strpos($this->getUrl(), 'youtube.com/watch?v=')+20, 11);\n }", "title": "" }, { "docid": "108391c43ab248c60965e7c1370db949", "score": "0.54375744", "text": "private function setFacebookId(): void\n {\n $this->facebookId = config('socializer.buffer_profile_ids.facebook');\n }", "title": "" }, { "docid": "58c7eb05c151f5afbb80eed697ac1493", "score": "0.54101664", "text": "function steam_activation_f_setsteam($steamID) {\r\n\tsteam_activation_f_debug(\"Function: setsteam()\");\r\n\tglobal $mybb, $db;\r\n\r\n\tsteam_activation_f_debug(\"Setting your steamid to \".$steamID);\r\n\t$db->update_query(\"users\", array(\"steam_activation_steamid\" => $steamID), \"uid=\".$mybb->user['uid']);\r\n\r\n\t//Update the userfield\r\n\tsteam_activation_f_setuserfield($steamID);\r\n}", "title": "" }, { "docid": "44bb0433ef304b65f1730762e6c58e1b", "score": "0.53364015", "text": "function setLeagueHashId($leagueHashId) {\n\t\t$this->leagueHashId = $leagueHashId;\n\t}", "title": "" }, { "docid": "41754c6327a0e5b6627b3588f2c46367", "score": "0.5318191", "text": "public function setId($value)\n {\n $urldata = parse_url($value);\n\n if(! isset($urldata['query'])) {\n throw new YoutubeException('no query found', YoutubeException::NO_QUERY_FOUND);\n }\n\n parse_str($urldata['query'], $query);\n\n if(! isset($query['v'])) {\n throw new YoutubeException('no query param v found', YoutubeException::NO_QUERY_PARAM_FOUND);\n }\n\n $this->id = $query['v'];\n }", "title": "" }, { "docid": "9c99951617cc2abdf7ef9ead2fde5287", "score": "0.5316611", "text": "protected function _setTableHashId ( $sTableHashId = \"\" ) {\n\t\tif ( empty($sTableHashId) && empty($this->_sTableHashId) ) {\n\t\t\t// create new panel hash id\n\t\t\t$sHash = md5( uniqid(NULL, FALSE).\"_\".uniqid(NULL, TRUE) );\n\t\t} else if ( empty($sTableHashId) && !empty($this->_sTableHashId) ) {\n\t\t\t// apply previously set hash id\n\t\t\t$sHash = $this->_sTableHashId;\n\t\t} else {\n\t\t\t// set given hash id\n\t\t\t$sHash = $sTableHashId;\n\t\t}\n\t\t$this->_sTableHashId = $sHash;\n\t\t$this->_oTableConfig[\"hash\"] = $this->_sTableHashId;\n\t\t//$this->getSession();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6238dcf6afb53dd994eadf278992691b", "score": "0.53141", "text": "function setTBsession($ll_id, $sessionID) {\n $ll_id = escape($ll_id);\n good_query(\"UPDATE livelec_cache SET video_key = '$sessionID' WHERE lid = $ll_id\");\n return 1;\n}", "title": "" }, { "docid": "74c21be8febfaf3003aea9981df3030c", "score": "0.5308571", "text": "function auth_mumie_get_hashed_id($id) {\n return hash(\"sha512\", $id . substr(get_config('auth_mumie', 'mumie_api_key'), 0, 10));\n}", "title": "" }, { "docid": "3f9b6f322b5deaf6e2a3c1d87ad3125d", "score": "0.5303411", "text": "public function setSessId()\n\t{\n\t\t$data = [\n\t\t\tself::SESS_ID => bin2hex(session_id())\n\t\t];\n\n\t\t$this->set(self::APP, $data);\n\t}", "title": "" }, { "docid": "b38a2f9dc1c3ef4e4e7ba1849c056633", "score": "0.52965695", "text": "function setFeatured($videoID) {\n }", "title": "" }, { "docid": "9d9edee3ead6bdd87ea1fd647c42cd03", "score": "0.52528334", "text": "function steam_activation_f_setuserfield($steamID) {\r\n\tsteam_activation_f_debug(\"Function: setuserfield()\");\r\n\tglobal $mybb, $db;\r\n\r\n\t$link = \"http://steamcommunity.com/profiles/\".$steamID;\r\n\t$fieldValue = \"[b][url=\".$link.\"]\".$steamID.\"[/url][/b]\";\r\n\r\n\tsteam_activation_f_debug(\"Changing the userfield to: \".$fieldValue);\r\n\t$db->update_query(\"userfields\", array(\"fid\".$mybb->settings[\"steam_activation_userfieldID\"] => $fieldValue), \"ufid=\".$mybb->user['uid']);\r\n}", "title": "" }, { "docid": "e19e68873be4dbf9c65bfa728cf29901", "score": "0.5245344", "text": "function setRemoteID( &$value )\r\n {\r\n $this->RemoteID = $value;\r\n }", "title": "" }, { "docid": "0f32214e0756f7b16af4c0c3b9dc0e21", "score": "0.5228606", "text": "public function setVideoId($videoId) {\n $this->videoId = $videoId;\n $this->url->setPart(PHP_URL_PATH, $this->url->getPath() . $videoId);\n $this->setAttribute('src', $this->url->getHtml());\n return $this;\n }", "title": "" }, { "docid": "6d8351d5da295580038266a618bc1bc7", "score": "0.521404", "text": "public function setHash($hash)\n {\n $this->hash = $hash;\n }", "title": "" }, { "docid": "d62a54814af77b0179b74fb4bd5c5f72", "score": "0.52132386", "text": "function filter_poodll_update_placeholdervideohash() {\n //set the default content hash\n $contenthash = poodlltools::VIDEO_PLACEHOLDER_HASH;\n $config = get_config('filter_poodll');\n\n //get file details\n $syscontext = \\context_system::instance();\n $component = 'filter_poodll';\n $itemid = 0;\n $filepath = '/';\n $filename = $config->placeholdervideofile;\n\n if ($filename) {\n $fs = get_file_storage();\n $thefile = $fs->get_file($syscontext->id, $component, poodlltools::CUSTOM_PLACEHOLDERVIDEO_FILEAREA, $itemid, $filepath,\n $filename);\n if ($thefile) {\n $contenthash = $thefile->get_contenthash();\n }\n }\n set_config('placeholdervideohash', $contenthash, 'filter_poodll');\n}", "title": "" }, { "docid": "4591cb748a576e30e97b5b172f8c6d65", "score": "0.51779306", "text": "public function setWebId($value)\n {\n return $this->setWebsiteId($value);\n }", "title": "" }, { "docid": "eb703b4560ea380d3505c27fc22af268", "score": "0.5165162", "text": "private function setTwitterId(): void\n {\n $this->twitterId = config('socializer.buffer_profile_ids.twitter');\n }", "title": "" }, { "docid": "34ecb69817e14b156d280fbc555c0bee", "score": "0.51527596", "text": "public function setSiteId(?string $value): void {\n $this->getBackingStore()->set('siteId', $value);\n }", "title": "" }, { "docid": "122dc45f52a9c38ac5d9ce78dbfcd940", "score": "0.5126908", "text": "function setSessionId($id)\n {\n $this->sid = $id;\n }", "title": "" }, { "docid": "a4a1fa3a80a4556b64ff0970307dc22c", "score": "0.5106912", "text": "function setUID()\n {\n $rawid = (string) $this->startdate . 'plus' . $this->summary;\n $this->uid = (string) md5($rawid);\n }", "title": "" }, { "docid": "e0560d2dac9f517be64fba235b1f7e5d", "score": "0.5090119", "text": "public function setID($_id);", "title": "" }, { "docid": "3877de47654bbc7df0a7955dbd88a77b", "score": "0.5089133", "text": "public static function getHashtag()\n {\n return '#videos@' . G_URL;\n }", "title": "" }, { "docid": "1782f7998ed0ebaa2c4daabb456d5fb7", "score": "0.5086869", "text": "public function setShareId(?string $value): void {\n $this->getBackingStore()->set('shareId', $value);\n }", "title": "" }, { "docid": "d1e2d8cf404b1bd424fe913daf39bad5", "score": "0.5068087", "text": "private function _init_url_id() {\n $this->_picture_url_id = bin2hex(random_bytes(4));\n }", "title": "" }, { "docid": "004c35eac6c8704482486061ffe9579a", "score": "0.5058294", "text": "public function extractVideoId($str)\n {\n if (preg_match('/[a-z0-9_-]{11}/i', $str, $matches)) {\n return $matches[0];\n }\n return false;\n }", "title": "" }, { "docid": "93cbd3ab032d7d63eed7b69f9c101edd", "score": "0.5031608", "text": "public static function setHash(string $hash): void\n {\n static::$hashType = $hash;\n }", "title": "" }, { "docid": "4f6cd552c8c8f5024f45d2cd5001f80d", "score": "0.5031448", "text": "public function getSiteVideoId()\n {\n if (is_null($this->siteVideoId))\n {\n // Extract video id\n \n $m = array();\n\n // http://www.youtube.com/watch?v=JtxH4oYdTXk\n preg_match('/[\\\\?&]v=([^&]+)/i', $this->pageUrl, $m)\n\n // http://youtu.be/JtxH4oYdTXk\n or preg_match('/youtu.be\\\\/([^\\\\?&#]+)$/', $this->pageUrl, $m)\n\n // http://www.youtube.com/user/hotforwords#p/u/10/XbFUtfHZbyo\n or preg_match('#p/u/[0-9]+/(.+)$#', $this->pageUrl, $m);\n\n $this->siteVideoId = $m[1];\n }\n\n return $this->siteVideoId;\n }", "title": "" }, { "docid": "3cfafd7ea3532cb4ab81aabb856802e5", "score": "0.5019238", "text": "private function setCollectionID()\n {\n $media_id = end($this->entity_ids['media']);\n $coll_id = end($this->entity_ids['collection']);\n $stm = \"SELECT collection_id FROM media\";\n $stm .= \" WHERE id = \".$media_id;\n $result = $this->db->query($stm);\n $this->handleDbError($result);\n while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {\n $this->handleDbError($row);\n if ($row['collection_id']){\n $stm = \"UPDATE media\";\n $stm .= \" SET collection_id = array_append(collection_id,CAST(\".$coll_id.\" AS BIGINT))\";\n $stm .= \" WHERE id = \".$media_id;\n } else {\n $stm = \"UPDATE media\";\n $stm .= \" SET collection_id = '{\".$coll_id.\"}'\";\n $stm .= \" WHERE id = \".$media_id;\n }\n }\n $result = $this->db->query($stm);\n $this->handleDbError($result);\n }", "title": "" }, { "docid": "170f33e7aa7aad6ba3256277d10cb39e", "score": "0.50187266", "text": "function setid_hv($val){ return $this->id_hv=$val;}", "title": "" }, { "docid": "1774e8d03e65f037c307f35a9fed2378", "score": "0.50136316", "text": "function set_id_evento_session($id) {\n\t\t$this->session->set_userdata ( 'id_eve', $id );\n\t}", "title": "" }, { "docid": "00d78aaaf61d3eea75d9045deb124fc8", "score": "0.5012108", "text": "public function setCallbackId()\n {\n if ( null === $this->_callbackId ) {\n $this->_callbackId = md5( uniqid( rand(), true ) );\n }\n }", "title": "" }, { "docid": "ec625c8a7b78bca88f5d00b92bc95e5e", "score": "0.500798", "text": "public static function setId($id) { self::$_id = $id; }", "title": "" }, { "docid": "22d871b7c07a82305291479f8c121e3e", "score": "0.5007546", "text": "public function set_id($value){}", "title": "" }, { "docid": "be75af837228113cd7b6ce086720d214", "score": "0.49950048", "text": "public function setVideo(?string $video) : self\n {\n $this->initialized['video'] = true;\n $this->video = $video;\n return $this;\n }", "title": "" }, { "docid": "1256b214e519b35f7892f172b9407ca3", "score": "0.49925202", "text": "public function setUserHash(string $hash): void\n {\n $this->set($this->HASHCOLUMN, $hash);\n }", "title": "" }, { "docid": "590b8c6d26cbff2ce012234334da1a90", "score": "0.49922976", "text": "function set_trackerid($track_id) {\n\t\tif ($_SESSION ['track_id']) {\n\t\t\tunset ( $_SESSION ['track_id'] );\n\t\t\t$_SESSION ['track_id'] = $track_id;\n\t\t}\n\t\t$this->track_id = $track_id;\n\t}", "title": "" }, { "docid": "99b51f01596de6be6d10044762e277b5", "score": "0.49879125", "text": "function _setUvalue()\n {\n $padding = $this->_pad('',32);\n if ($this->enc_security_handler == 2)\n {\n $encrypted = ARCFOUR($this->enc_key, $padding);\n }\n else\n {\n $id = $this->_md5_16($this->id);\n $hash = $this->_md5_16($padding.$id);\n $encrypted = ARCFOUR($this->enc_key, $hash);\n for ($i=1; $i<=19; $i++)\n {\n $key = '';\n for ($j=0; $j<$this->enc_key_len; $j++)\n {\n $key .= chr( ord($this->enc_key[$j]) ^ $i );\n }\n $encrypted = ARCFOUR($key, $encrypted);\n }\n $encrypted = $this->_pad($encrypted, 32);\n }\n $this->Uvalue = $encrypted;\n }", "title": "" }, { "docid": "29606129977f6ffcd4226e192802f559", "score": "0.49784902", "text": "public function generatePlayerHash(): string\n {\n return hash('sha256', uniqid(), false);\n }", "title": "" }, { "docid": "fbc1839d88bd1e3fd02027cb8d888edb", "score": "0.49647802", "text": "function setWikiId( $wikiId )\n {\n $this->wikiId = $wikiId;\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.4960839", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "33f77217864e68f6b237c97c7ceae32f", "score": "0.49529916", "text": "public function set_id( $id = '' ) {\n\n\t\tif ( '' === $id ) {\n\t\t\t$id = uniqid( '', false );\n\t\t} elseif ( 0 === $id || ! is_string( $id ) ) {\n\t\t\t$id = '';\n\t\t} else {\n\t\t\t$id = sanitize_text_field( $id );\n\t\t}\n\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "e6a6d064227eb35d7dcb2b039550029e", "score": "0.4933122", "text": "public function setAnonymousIDSupport($shallwe) {\n $this->databaseHandle->exec(\"UPDATE profile SET use_anon_outer = \" . ($shallwe === true ? \"1\" : \"0\") . \" WHERE profile_id = $this->identifier\");\n }", "title": "" }, { "docid": "259ab26a542c099295addf81bf73db38", "score": "0.49257296", "text": "public function setHash()\n {\n // Hash algorithm to use for the session. (use hash_algos() to get a list of available hashes.)\n $session_hash = 'sha512';\n\n // Check if hash is available\n if (in_array($session_hash, hash_algos())) {\n // Set the has function.\n ini_set('session.hash_function', $session_hash);\n }\n // How many bits per character of the hash.\n // The possible values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, \"-\", \",\").\n ini_set('session.hash_bits_per_character', 5);\n }", "title": "" }, { "docid": "9fe5fb82cf462bce9770c5b0db8a842a", "score": "0.49242324", "text": "public function setId($id)\n {\n $this->id = $id ? $id : uniqid();\n }", "title": "" }, { "docid": "59d5b99781a79cb5b4b58145775e55c2", "score": "0.4908879", "text": "public function getSteamID()\n {\n return get_steam_id($this->identifier);\n }", "title": "" }, { "docid": "f5c8b8ab3aed2e83f87ade1657dc7a82", "score": "0.49085766", "text": "function setSessionId($session_id);", "title": "" }, { "docid": "282645b0b4740f28d24c0b6a44f67304", "score": "0.49003693", "text": "public function setId($_id) { $this->id = $_id; }", "title": "" }, { "docid": "b390d234e34ab31002299bbfb92abcfb", "score": "0.48998457", "text": "public function setID($id)\n\t{\n\t\t$this->_id = One_Form_Helper::mangle(trim($id));\n\t}", "title": "" }, { "docid": "ceaf82383c16c932a2e68ead9b24598b", "score": "0.4895865", "text": "public function set( string $id, $value );", "title": "" }, { "docid": "fe78e0a1792cef300897bb1f3aeffad8", "score": "0.48894945", "text": "protected function setTestHashKey()\n {\n $this->redis_client->hmset($this->test_data['hash']['key'], $this->test_data['hash']['value']);\n }", "title": "" }, { "docid": "46e9fe5cfd583a32ee4335b909ccd66c", "score": "0.4887263", "text": "public function test_it_sets_the_twitterId_attribute()\n {\n $meta = New Meta;\n $myId = '@myTwitterId';\n $meta->setTwitterId($myId);\n $this->assertContains('<meta name=\"twitter:site\" content = \"' . $myId . '\"/>', $meta->getTwitterId());\n }", "title": "" }, { "docid": "85faa3b4a232792d6f990f76767d3535", "score": "0.4886546", "text": "public function getSteamid()\n {\n return $this->steamid;\n }", "title": "" }, { "docid": "45825e12f9f12f92a8bf2ea66ad276b3", "score": "0.48844862", "text": "public function testSetFacebookUID()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "2957f873510c08bf09805f821a22ae7f", "score": "0.48825938", "text": "function videoSimCacheName($id)\n {\n return 'media_sim_'.$id;\n }", "title": "" }, { "docid": "caf2af009a94b3ace6c80d8607f5f461", "score": "0.4882096", "text": "public function testSetTwitterUID()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "1d125c0172c54de1c437b644017438b3", "score": "0.48744676", "text": "public function getHashAttribute()\n {\n return Hashids::encode($this->attributes['id']);\n }", "title": "" }, { "docid": "e5f5b2eed68e8b340d1acbce4efc5af0", "score": "0.48730353", "text": "function set_hashkey_by_id ( $lead_id ) \n\t{\n\t\tglobal $wpdb;\n\n\t\t$q = $wpdb->prepare(\"SELECT hashkey FROM $wpdb->li_leads WHERE lead_id = %d\", $lead_id);\n\t\t$this->hashkey = $wpdb->get_var($q);\n\t\t\n\t\treturn $this->hashkey;\n\t}", "title": "" }, { "docid": "5c8ff0ebb04e2784c7bb95b44ff57853", "score": "0.48724404", "text": "protected function set_what(string $value):void{\n\t\t$this->what = md5($value);\n\t}", "title": "" }, { "docid": "01bdb71bd2cd95a22d7b88ec4da2d93c", "score": "0.4863292", "text": "public function testGetAndSetPluginWrapperId()\n {\n $id = 4;\n\n $this->pluginWrapper->setPluginWrapperId($id);\n\n $actual = $this->pluginWrapper->getPluginWrapperId();\n\n $this->assertEquals($id, $actual);\n }", "title": "" }, { "docid": "9cdb50d62ef21a1a5a29f849af8e8cbd", "score": "0.4855427", "text": "function setRandomPasswordById($id, $length);", "title": "" }, { "docid": "4755798a2c02f3b2c464d87eecbed340", "score": "0.48522854", "text": "public function save_api_key() {\n $data = $this->pages_model->user_name($this->ion_auth->user()->row()->id);\n //for hash take 2 arguments\n $randNum = rand(5, 15);\n $random = intval($randNum)*intval($this->ion_auth->user()->row()->id)/100;\n $hasres = $data->username.\"\".$data->email.\"\".strval($random);\n //use ripemd160 coding\n $hash = hash('ripemd160',$hasres);\n\n //save new hash in DB\n $this->pages_model->save_hash($this->ion_auth->user()->row()->id,$hash);\n }", "title": "" }, { "docid": "5382ddd37b8a555dc8a2edb2c0183bc7", "score": "0.4846534", "text": "public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }", "title": "" }, { "docid": "5382ddd37b8a555dc8a2edb2c0183bc7", "score": "0.4846534", "text": "public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }", "title": "" }, { "docid": "5382ddd37b8a555dc8a2edb2c0183bc7", "score": "0.4846534", "text": "public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }", "title": "" }, { "docid": "62ec35a2d1a65df70dc89ced5c2f3dbc", "score": "0.4837984", "text": "public function set($params = array()) {\n $this->id = $params['id'];\n }", "title": "" }, { "docid": "812b55b2a803dcbe4dd505d42bf71c9f", "score": "0.4837077", "text": "public function getVideoID()\n {\n if (!isset($this->videoId)) {\n preg_match(\n \"@/talks/subtitles/id/(\\d*)/lang/@\",\n $this->getPage(),\n $matches\n );\n $this->videoId = (int) $matches[1];\n }\n\n return $this->videoId;\n }", "title": "" }, { "docid": "b235e856994856442f08636646980da9", "score": "0.48362473", "text": "public function setId( $id ) {\n session_id( $id );\n }", "title": "" }, { "docid": "0d4c4a33814cd70d6f5026bb315c7a3f", "score": "0.48355433", "text": "private function set_id($id) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "b823faf76d31fc0ef9b9f29f8e1d5f7f", "score": "0.48347256", "text": "function set_id($id) {\n\t\t$this -> id = $id;\n\t}", "title": "" }, { "docid": "ba320fb34ed6e9b3b0a8d77b348f9c62", "score": "0.48304674", "text": "public function setId(string $sessionId): void\n {\n }", "title": "" }, { "docid": "29f2ddc9621d6af565f27fa7d254bba3", "score": "0.4826204", "text": "public function setIdentifier($id);", "title": "" }, { "docid": "d4f43a51e8550567427bd7c16156c9af", "score": "0.4811987", "text": "public function set_cache_id($id);", "title": "" }, { "docid": "092c46e9f77216aed95498d2531ce28d", "score": "0.4810571", "text": "final function setSession_id($value) {\n\t\treturn $this->setSessionId($value);\n\t}", "title": "" }, { "docid": "092c46e9f77216aed95498d2531ce28d", "score": "0.4810571", "text": "final function setSession_id($value) {\n\t\treturn $this->setSessionId($value);\n\t}", "title": "" }, { "docid": "c5906efbfb8990585678d20f60002a63", "score": "0.4809715", "text": "function unique_id() {\n return md5($this->original_string);\n }", "title": "" }, { "docid": "83cffbda0992749f354d96c04c6790ce", "score": "0.48086312", "text": "public static function id ($data) {\n $hash = base64_encode(hash('sha256', $data, TRUE));\n // Modify the hash so it's safe to use in URLs.\n return strtr($hash, array('+' => '-', '/' => '_', '=' => ''));\n }", "title": "" }, { "docid": "f7525d932ce3a1c0dbd8021bdf7102aa", "score": "0.4808553", "text": "private function setSlugParam(): void\n {\n $this->request->addParams(['pass' => [$this->getIdentity()->slug]]);\n }", "title": "" }, { "docid": "8ef641563693d8bacaac38bac183617d", "score": "0.48079884", "text": "public function setId($value)\n {\n session_id($value);\n }", "title": "" }, { "docid": "28bfd063bcd44ba141fead054a3a2106", "score": "0.48059133", "text": "public function getId()\n {\n $re = '#.*\\/([\\d]{6,}).*#i';\n return preg_replace($re, '$1', $this->getMediaUrl());\n }", "title": "" }, { "docid": "b4529a098ac6f25878226d24f72bd001", "score": "0.4804058", "text": "public function setId($id){\n $this->_id = $id;\n }", "title": "" }, { "docid": "ad2abc7c27abcfdf0b4211564690fcb1", "score": "0.47984198", "text": "function setId($id) {\r\n\t\t$this->userid=$id;\r\n\t}", "title": "" }, { "docid": "b9c92c0e44987a2876f04140ec82a20e", "score": "0.4794337", "text": "public function InitializeID($id) {$this->id = $id;}", "title": "" }, { "docid": "06ef26690f9dd6a35a6e29efcefeea1d", "score": "0.4782423", "text": "public function setId($a){\n $this->_id=$a;\n}", "title": "" }, { "docid": "1ef4dd41fb38f1fa9d10d934d8110480", "score": "0.47799888", "text": "function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "11412d19f576bee89b8be4b92e50e8fd", "score": "0.47755164", "text": "public function changeSessionIdentifier();", "title": "" }, { "docid": "2bb9d97cb83ee061c29d4729b2563a6e", "score": "0.4771154", "text": "function setVariables($id)\n\t{\n\t\tsession_regenerate_id();\n\t\t$this->createSessionAuthKey();\n\t\t$_SESSION['authorid'] = $id;\n\t\t$_SESSION['fingerprint'] = $this->user_agent;\n\t\tunset($_SESSION['challenge']);\n\n\t}", "title": "" }, { "docid": "245d74f9ded3436ec7beb3653912e470", "score": "0.47691494", "text": "public function setIdReserver($idReserver) {\n\t\t$Config = new Config();\n\t\t$this->idReserver = $Config->encrypt($idReserver, 'decrypt');\n\t}", "title": "" }, { "docid": "b5f2445d7acaa14b636da85cf9334e94", "score": "0.4761845", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "title": "" }, { "docid": "6c6f62e1a60c218d1a1ba8e9977f3a0d", "score": "0.47593752", "text": "public function setPasswordHash($v)\n\t{\n\t\tif (!is_null($v) && !is_string($v))\n\t\t{\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->password !== $v)\n\t\t{\n\t\t\t$this->_set('password', $v);\n\t\t}\n\t}", "title": "" }, { "docid": "58b23fbcb2ff3db07c994a074d127f62", "score": "0.4757358", "text": "function setID($id) {\n $this->id = $id;\n }", "title": "" } ]
1aeea890ad12f56e006601f7fcdc1596
Rachitha:This function will return no of completed,inprogress, not started users of all courses present in particular category.
[ { "docid": "b9e3d2e7f8df9484c1d22cd94b77a828", "score": "0.70858955", "text": "function course_completion_stats($startdt=null,$enddt=null,$sitecat=null,$siteloc=null){\n global $DB;\n $sql=\"\";\n $categoryname='';\n $sql.=\"SELECT DISTINCT (c.id) \n FROM {course} c\n JOIN {context} ct ON c.id = ct.instanceid\n JOIN {role_assignments} ra ON ra.contextid = ct.id\n JOIN {user} u ON u.id = ra.userid\n JOIN {role} r ON r.id = ra.roleid \n WHERE c.visible = 1 AND c.id != 1\";\n if(!empty($sitecat)){\n $sql.=\" AND c.category = '$sitecat'\";\n $categoryname=$DB->get_field('course_categories', 'name', array('id'=>$sitecat));\n }\n if(!empty($siteloc)){\n $sql.=\" AND u.city = '$siteloc'\";\n }\n $courses=$DB->get_records_sql($sql);\n $compcount=0;\n $inprocount=0;\n $notstcount=0;\n if(!empty($courses)){\n foreach ($courses as $course) {\n //calculating not started users.\n $sql='';\n $sql.=\"SELECT cc.* FROM {course_completions} cc\n JOIN {user} u ON cc.userid = u.id\n JOIN {course} c ON c.id = cc.course \n WHERE c.visible = 1 AND c.id != 1 AND c.id = '$course->id' AND cc.timeenrolled IS NOT NULL AND cc.timestarted = 0 AND cc.timecompleted is null \";\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \";\n }\n if(!empty($siteloc)){\n $sql.=\" AND u.city = '$siteloc'\";\n }\n $notstarted=$DB->get_records_sql($sql);\n $notstartedcount=count($notstarted);\n //calculating inprogress users.\n $inprogresssql='';\n $inprogresssql.=\"SELECT cc.* FROM {course_completions} cc\n JOIN {user} u ON cc.userid = u.id\n JOIN {course} c ON c.id = cc.course \n WHERE c.visible = 1 AND c.id != 1 AND c.id = '$course->id' AND cc.timeenrolled IS NOT NULL AND cc.timestarted != 0 AND cc.timecompleted is null\";\n\n if(!empty($startdt) && !empty($enddt)){\n $inprogresssql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \";\n }\n if(!empty($siteloc)){\n $inprogresssql.=\" AND u.city = '$siteloc'\";\n }\n $inprogress=$DB->get_records_sql($inprogresssql);\n $inprogresscount=count($inprogress);\n //calculating completed users.\n $completesql='';\n $completesql.=\"SELECT cc.* FROM {course_completions} cc\n JOIN {user} u ON cc.userid = u.id\n JOIN {course} c ON c.id = cc.course \n WHERE c.visible = 1 AND c.id != 1 AND c.id = '$course->id' AND cc.timecompleted IS NOT NULL\";\n\n if(!empty($startdt) && !empty($enddt)){\n $completesql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \";\n }\n if(!empty($siteloc)){\n $completesql.=\" AND u.city = '$siteloc'\";\n }\n $completed=$DB->get_records_sql($completesql);\n $completedcount=count($completed);\n\n $compcount = $compcount + $completedcount;\n $inprocount= $inprocount + $inprogresscount;\n $notstcount=$notstcount + $notstartedcount;\n }\n return array($compcount,$inprocount,$notstcount,$categoryname);\n}\n}", "title": "" } ]
[ { "docid": "05d6388aef0c14515c9a04442b3f834e", "score": "0.7329954", "text": "function user_course_count($userid,$startdate,$enddate,$city){\n global $DB;\n $sql='';\n $sql.=\"SELECT DISTINCT(c.id)\n FROM {course} c\n JOIN {context} ct ON c.id = ct.instanceid\n JOIN {role_assignments} ra ON ra.contextid = ct.id\n JOIN {user} u ON u.id = ra.userid\n JOIN {role} r ON r.id = ra.roleid\n where c.visible = 1 \";\n if($userid > 1){\n $sql.=\" AND u.id = '$userid'\";\n }\n if(!empty($startdate) && !empty($enddate)){\n $sql.=\" AND ra.timemodified BETWEEN \".$startdate.\" AND \".$enddate.\" \";\n }\n if(!empty($city)){\n $sql.=\" AND u.city = '$city'\";\n }\n $courses = $DB->get_records_sql($sql);\n if(!empty($courses)){\n return count($courses); \n }else{\n return false;\n} \n}", "title": "" }, { "docid": "fa484f1a15890f6ac2afa9458f8b6262", "score": "0.69650674", "text": "public function getUserCourseCount(){\n $userCourseCount = $this->getViewState('UserCourseCount');\n if (is_null($userCourseCount)){\n $userCourseCount = UserCourseRecord::finder()->countAvailable(\n $this->User->UserId,\n true\n );\n\n $this->setViewState('UserCourseCount', $userCourseCount);\n }\n return $userCourseCount;\n }", "title": "" }, { "docid": "f92bdad0d5e421ce83d5b669383da49e", "score": "0.6910725", "text": "function course_complition_count($startdt,$enddt,$courseloc,$courseid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id\n FROM {course_completions} cc\n INNER JOIN {user} u ON u.id = cc.userid\n WHERE u.deleted != 1 AND cc.timecompleted IS NOT NULL\";\n if($courseid > 1){\n $sql.=\" AND cc.course = '$courseid'\";\n }\n if(!empty($startdate) && !empty($enddate)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdate.\" AND \".$enddate.\" \";\n }\n if(!empty($courseloc)){\n $sql.=\" AND u.city = '$courseloc'\";\n }\n $courses=$DB->get_records_sql($sql);\n if(!empty($courses)){\n return count($courses); \n }else{\n return false;\n } \n}", "title": "" }, { "docid": "93de07caf0ffa6df842980bd174d907c", "score": "0.681055", "text": "function enrolled_users_count_course($startdate,$enddate,$location,$courseid){\n global $DB;\n $enrollsql='';\n $enrollsql.=\"SELECT cc.id,cc.timeenrolled FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timeenrolled IS NOT NULL\";\n if($courseid > 1){\n $enrollsql.=\" AND cc.course = '$courseid' \"; \n }\n\n if(!empty($startdate) && !empty($enddate)){\n $enrollsql.=\" AND cc.timeenrolled BETWEEN \".$startdate.\" AND \".$enddate.\" \"; \n }\n\n if(!empty($location)){\n $enrollsql.=\" AND u.city = '$location'\"; \n }\n\n $courses = $DB->get_records_sql($enrollsql);\n if(!empty($courses)){\n return count($courses); \n }else {\n return false;\n}\n}", "title": "" }, { "docid": "21d4bb63917455ed3df0b5a05c7fda6c", "score": "0.6775821", "text": "function user_course_completion($userid,$startdate,$enddate,$city){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id\n FROM {course_completions} cc\n INNER JOIN {user} u ON u.id = cc.userid\n WHERE u.deleted != 1 AND cc.timecompleted IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND u.id = '$userid'\";\n }\n if(!empty($startdate) && !empty($enddate)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdate.\" AND \".$enddate.\" \";\n }\n if(!empty($city)){\n $sql.=\" AND u.city = '$city'\";\n }\n $courses=$DB->get_records_sql($sql);\n if(!empty($courses)){\n return count($courses); \n }else{\n return false;\n }\n}", "title": "" }, { "docid": "ed9b80333c0d7e7482ef3bc662c32edb", "score": "0.67646414", "text": "function get_yearwisecategory_info($startdt,$enddt,$siteloc,$categoryid){\n global $DB;\n $sql=\"\";\n $sql.=\"SELECT DISTINCT (c.id) \n FROM {course} c\n JOIN {context} ct ON c.id = ct.instanceid\n JOIN {role_assignments} ra ON ra.contextid = ct.id\n JOIN {user} u ON u.id = ra.userid\n JOIN {role} r ON r.id = ra.roleid \n WHERE c.visible = 1 AND c.id != 1\";\n if(!empty($categoryid)){\n $sql.=\" AND c.category = '$categoryid'\";\n }\n if(!empty($siteloc)){\n $sql.=\" AND u.city = '$siteloc'\";\n }\n $courses = $DB->get_records_sql($sql);\n $enrolled=[];\n $complition=[];\n if(!empty($courses)){\n foreach ($courses as $course) {\n $result = get_yearwisegraph($course->id, $startdt, $enddt, $siteloc);\n foreach ($result as $rkey => $rvalue) {\n if($rkey=='enrolldata'){\n foreach ($rvalue as $rrkey => $rrvalue) {\n if(array_key_exists($rrkey, $enrolled)){\n $enrolled[$rrkey] += $rrvalue;\n }else{\n $enrolled[$rrkey]=$rrvalue;\n\n }\n\n }\n\n }\n if($rkey=='completiondata'){\n foreach ($rvalue as $ckey => $cvalue) {\n if(array_key_exists($ckey, $complition)){\n $complition[$ckey] += $cvalue;\n }else{\n $complition[$ckey]=$cvalue;\n }\n\n }\n }\n }\n\n }\n }\n return array('enrol'=>$enrolled,'complete'=>$complition);\n}", "title": "" }, { "docid": "220b43d0e8e6815f675f6cb05e0f9558", "score": "0.676003", "text": "public function countActiveUsersByGroup(): array {\n $this->submitty_db->query(\n \"WITH A as (SELECT DISTINCT ON(user_id) user_id, user_group FROM courses_users JOIN courses\n on courses.course = courses_users.course\n and courses.term = courses_users.term\n WHERE courses.status = 1\n ORDER BY user_id, courses_users.user_group ASC)\n SELECT A.user_group, COUNT(A.user_group) FROM A GROUP BY A.user_group\"\n );\n $result = [];\n foreach ($this->submitty_db->rows() as $row) {\n if ($row['user_group'] == 1) {\n $result['instructor'] = $row['count'];\n }\n elseif ($row['user_group'] == 2) {\n $result['full_access'] = $row['count'];\n }\n elseif ($row['user_group'] == 3) {\n $result['limited_access'] = $row['count'];\n }\n else {\n $result['student'] = $row['count'];\n }\n }\n $this->submitty_db->query(\n \"SELECT COUNT(user_access_level) FROM users WHERE user_access_level <= 2\"\n );\n $result['faculty'] = $this->submitty_db->row()['count'];\n return $result;\n }", "title": "" }, { "docid": "10cf322a61a3bc6785293a0d67d62de7", "score": "0.6751499", "text": "public function get_all_courses_count() {\n\t\t$this->db->select('id');\n\t\t$this->db->from(\"course\");\n\t\treturn $this->db->get()->num_rows();\n\t}", "title": "" }, { "docid": "7590bfedc4a4d9cce7d6202980ca4698", "score": "0.6511429", "text": "public function getCoursesCompleted() {\n\n $courses_completed = 0;\n\n foreach($this->grades as $grade) {\n\n if ($grade->getNumGrade() > 0) {\n $courses_completed++;\n }\n }\n\n return $courses_completed;\n\n }", "title": "" }, { "docid": "c17dd54587cb027122b78d385effbd24", "score": "0.6463863", "text": "function get_number_of_users()\n{\n\t// Database table definition\n\t$user_table = Database::get_main_table(TABLE_MAIN_USER);\n\t$course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);\n\t$tbl_session_rel_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);\n\t$table_user_field_values = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);\n\n $courseCode = api_get_course_id();\n $sessionId = api_get_session_id();\n\n\tif (isset($_REQUEST['type']) && $_REQUEST['type'] === 'teacher') {\n\t\tif (api_get_session_id() != 0) {\n\t\t\t$sql = \"SELECT COUNT(u.id)\n\t\t\t\t\tFROM $user_table u\n\t\t\t\t\tLEFT JOIN $tbl_session_rel_course_user cu\n\t\t\t\t\tON\n\t\t\t\t\t\tu.user_id = cu.user_id AND\n\t\t\t\t\t\tc_id = '\".api_get_course_int_id().\"' AND\n\t\t\t\t\t\tsession_id ='\".$sessionId.\"'\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tcu.user_id IS NULL AND\n\t\t\t\t\t\tu.status = 1 AND\n\t\t\t\t\t\t(u.official_code <> 'ADMIN' OR u.official_code IS NULL) \";\n\n if (api_is_multiple_url_enabled()) {\n $url_access_id = api_get_current_access_url_id();\n if ($url_access_id !=-1) {\n $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $tbl_session_rel_course_user cu\n ON\n u.user_id = cu.user_id AND cu.c_id = '\".api_get_course_int_id().\"' AND\n session_id ='\".$sessionId.\"'\n INNER JOIN $tbl_url_rel_user as url_rel_user\n ON (url_rel_user.user_id = u.user_id)\n WHERE\n cu.user_id IS NULL AND\n access_url_id= $url_access_id AND\n u.status = 1 AND\n (u.official_code <> 'ADMIN' OR u.official_code IS NULL)\n \";\n }\n }\n } else {\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $course_user_table cu\n ON u.user_id = cu.user_id and c_id='\".api_get_course_int_id().\"'\n WHERE cu.user_id IS NULL AND u.status<>\".DRH.\" \";\n\n if (api_is_multiple_url_enabled()) {\n $url_access_id = api_get_current_access_url_id();\n if ($url_access_id !=-1) {\n $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);\n\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $course_user_table cu\n ON u.user_id = cu.user_id AND c_id='\".api_get_course_int_id().\"'\n INNER JOIN $tbl_url_rel_user as url_rel_user\n ON (url_rel_user.user_id = u.user_id)\n WHERE cu.user_id IS NULL AND u.status<>\".DRH.\" AND access_url_id= $url_access_id \";\n }\n }\n }\n } else {\n // students\n if ($sessionId != 0) {\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $tbl_session_rel_course_user cu\n ON\n u.user_id = cu.user_id AND\n c_id='\".api_get_course_int_id().\"' AND\n session_id ='\".$sessionId.\"'\n WHERE\n cu.user_id IS NULL AND\n u.status<>\".DRH.\" AND\n (u.official_code <> 'ADMIN' OR u.official_code IS NULL) \";\n\n if (api_is_multiple_url_enabled()) {\n $url_access_id = api_get_current_access_url_id();\n if ($url_access_id !=-1) {\n $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $tbl_session_rel_course_user cu\n ON\n u.user_id = cu.user_id AND\n c_id='\".api_get_course_int_id().\"' AND\n session_id ='\".$sessionId.\"'\n INNER JOIN $tbl_url_rel_user as url_rel_user\n ON (url_rel_user.user_id = u.id)\n WHERE\n cu.user_id IS NULL AND\n u.status<>\".DRH.\" AND\n access_url_id= $url_access_id AND\n (u.official_code <> 'ADMIN' OR u.official_code IS NULL) \";\n }\n }\n } else {\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $course_user_table cu\n ON u.user_id = cu.user_id AND c_id='\".api_get_course_int_id().\"'\";\n\n // we change the SQL when we have a filter\n if (isset($_GET['subscribe_user_filter_value']) &&\n !empty($_GET['subscribe_user_filter_value']) &&\n api_get_setting('ProfilingFilterAddingUsers') === 'true'\n ){\n $field_identification = explode('*',$_GET['subscribe_user_filter_value']);\n $sql .=\t\"\n LEFT JOIN $table_user_field_values field_values\n ON field_values.item_id = u.user_id\n WHERE\n cu.user_id IS NULL AND\n u.status <> \".DRH.\" AND\n field_values.field_id = '\".intval($field_identification[0]).\"' AND\n field_values.value = '\".Database::escape_string($field_identification[1]).\"'\n \";\n } else\t{\n $sql .=\t\"WHERE cu.user_id IS NULL AND u.status <> \".DRH.\" \";\n }\n\n if (api_is_multiple_url_enabled()) {\n $url_access_id = api_get_current_access_url_id();\n\n if ($url_access_id !=-1) {\n $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);\n $sql = \"SELECT COUNT(u.id)\n FROM $user_table u\n LEFT JOIN $course_user_table cu \n ON u.user_id = cu.user_id AND c_id='\".api_get_course_int_id().\"'\n INNER JOIN $tbl_url_rel_user as url_rel_user\n ON (url_rel_user.user_id = u.id)\n WHERE cu.user_id IS NULL AND access_url_id= $url_access_id AND u.status <> \".DRH.\" \";\n }\n }\n }\n }\n\n // when there is a keyword then we are searching and we have to change the SQL statement\n if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {\n $keyword = Database::escape_string(trim($_REQUEST['keyword']));\n $sql .= \" AND (\n firstname LIKE '%\".$keyword.\"%' OR\n lastname LIKE '%\".$keyword.\"%' OR\n email LIKE '%\".$keyword.\"%' OR\n username LIKE '%\".$keyword.\"%' OR\n official_code LIKE '%\".$keyword.\"%'\n )\";\n\n // we also want to search for users who have something in their profile fields that matches the keyword\n if (api_get_setting('ProfilingFilterAddingUsers') === 'true') {\n $additional_users = search_additional_profile_fields($keyword);\n }\n\n // getting all the users of the course (to make sure that we do not display users that are already in the course)\n if (!empty($sessionId)) {\n $a_course_users = CourseManager:: get_user_list_from_course_code(\n $courseCode,\n $sessionId\n );\n } else {\n $a_course_users = CourseManager:: get_user_list_from_course_code(\n $courseCode,\n 0\n );\n }\n foreach ($a_course_users as $user_id => $course_user) {\n $users_of_course[] = $course_user['user_id'];\n }\n }\n $sql .=\" AND u.status <> \".ANONYMOUS.\" \";\n $res = Database::query($sql);\n $count_user = 0;\n\n if ($res) {\n $row = Database::fetch_row($res);\n $count_user = $row[0];\n }\n\n\treturn $count_user;\n}", "title": "" }, { "docid": "a1eea930b63e03b10b3b5aa292ca5450", "score": "0.6384365", "text": "public function getCourseTotal()\n {\n $this->db->from('course');\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "ac972768a28feb48c9863e4336c451a7", "score": "0.6363754", "text": "function getCourseCounts($db){\n\t$count = $db->getValue (\"course\", \"count(*)\");\n\n\treturn $count;\n}", "title": "" }, { "docid": "aa93b7988e9acc1870cadc922f44dc7c", "score": "0.6277594", "text": "function attemptCount($course) {\n\t\t$user =& JFactory::getUser();\n\t\t$userid = $user->id;\n\t\t$query = 'SELECT rec_attempt FROM #__ce_records WHERE rec_user = '.$userid.' && rec_course = '.$course.' ORDER BY rec_attempt DESC';\n\t\t$db =& JFactory::getDBO();\n\t\t$db->setQuery( $query );\n\t\t$ac = $db->loadResult();\n\t\treturn $ac;\n\t}", "title": "" }, { "docid": "606881de7e6ba6fb1c017bc7256d7bb8", "score": "0.62286216", "text": "function get_number_of_users (){\r\n\t\tif (empty($session_id)) {\r\n\t\t\t// Registered students in a course outside session.\r\n\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id());\r\n\t\t} else {\r\n\t\t// Registered students in session.\r\n\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id(), true, api_get_session_id());\r\n\t\t}\r\n\t\treturn count($a_students);\r\n\t}", "title": "" }, { "docid": "7a5c9556a2aa2c1fe9a74642f3b4ca82", "score": "0.6224318", "text": "function get_user_course_completion($completions){\n\t$activities = array();\n\t$activities_complete = 0;\n\n\t$activities_tacked = array();\n\n\t// For aggregating course prerequisites\n\t$prerequisites = array();\n\t$prerequisites_complete = 0;\n\n\t// Flag to set if current completion data is inconsistent with\n\t// what is stored in the database\n\t$pending_update = false;\n\n\t// Loop through course criteria\n\tforeach ($completions as $completion) {\n\n\n\n\t\t$criteria = $completion->get_criteria();\n\t\t$complete = $completion->is_complete();\n\n\t\t$activities_tacked[$criteria->moduleinstance] = true;\n\n\t\tif (!$pending_update && $criteria->is_pending($completion)) {\n\t\t\t$pending_update = true;\n\t\t}\n\n\t\t// Activities are a special case, so cache them and leave them till last\n\t\tif ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {\n\n\t\t\tif ($complete) {\n\t\t\t\t$activities[$criteria->moduleinstance] = $complete;\n\t\t\t\t$activities_complete++;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Prerequisites are also a special case, so cache them and leave them till last\n\t\tif ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {\n\t\t\t$prerequisites[$criteria->courseinstance] = $complete;\n\n\t\t\tif ($complete) {\n\t\t\t\t$prerequisites_complete++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t}\n\t$result = array(\"activities\" => $activities, \"activities_completed\" => $activities_complete, \"tracked_activities\" => $activities_tacked);\n\n\treturn $result;\n}", "title": "" }, { "docid": "9c1b52c4c1f171d0d6a1420932720b70", "score": "0.61881405", "text": "function get_number_of_users (){\n\t\t\tif (empty($session_id)) {\n\t\t\t\t// Registered students in a course outside session.\n\t\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id());\n\t\t\t} else {\n\t\t\t// Registered students in session.\n\t\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id(), true, api_get_session_id());\n\t\t\t}\n\n\t\t\treturn count($a_students);\n\t\t}", "title": "" }, { "docid": "2d6836ac3d7d3dfb9d864afd9cbd7258", "score": "0.61708677", "text": "function get_number_of_courses()\r\n{\r\n\t$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);\r\n $diplomas_course_table = Database :: get_main_table(TABLE_DIPLOMAS_COURSES);\r\n $sql = \"SELECT COUNT(c.code) AS total_number_of_items FROM $course_table c where c.code not in (select course_code from $diplomas_course_table)\";\r\n\t// $sql = \"SELECT COUNT(code) AS total_number_of_items FROM $course_table where code not in (select course_code from $diplomas_course_table)\";\r\n\tif (isset ($_GET['keyword']))\r\n\t{\r\n\t\t$keyword = Database::escape_string($_GET['keyword']);\r\n\t\t$sql .= \" and c.code LIKE '%\".$keyword.\"%'\";\r\n\t}\r\n\telseif (isset ($_GET['keyword_code']))\r\n\t{\r\n\t\t$keyword_code = Database::escape_string($_GET['keyword_code']);\r\n\t\t$sql .= \" and c.code LIKE \";\r\n\t}\r\n\t$res = api_sql_query($sql, __FILE__, __LINE__);\r\n\t$obj = Database::fetch_object($res);\r\n\treturn $obj->total_number_of_items;\r\n}", "title": "" }, { "docid": "b9a7375cbf0a75cfa93abc1593fd7e39", "score": "0.6145143", "text": "function get_user_course_categories()\r\n{\r\n\tglobal $_user;\r\n\r\n\t$output = array();\r\n\t$table_category = Database::get_user_personal_table(TABLE_USER_COURSE_CATEGORY);\r\n\t$sql = \"SELECT * FROM \".$table_category.\" WHERE user_id='\".$_user['user_id'].\"'\";\r\n\t$result = api_sql_query($sql,__FILE__,__LINE__);\r\n\twhile ($row = mysql_fetch_array($result))\r\n\t{\r\n\t\t$output[$row['id']] = $row['title'];\r\n\t}\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "79969794db972a01518f08f5abc18b69", "score": "0.6110431", "text": "public function allCourses()\n {\n $this->db->where('status','active');\n $query = $this->db->get('course')->result();\n if (!empty($query)) {\n $d[] = 'Choose Course';\n foreach ($query as $value) {\n $d[$value->id] = $value->name;\n }\n return $d;\n }\n return '0';\n }", "title": "" }, { "docid": "6902fb19be302b0b70be78d71b4aad6e", "score": "0.6103191", "text": "public function getUserOptionCategoryCount() {\r\n\t\treturn $this->getCache(ProjectUserOptionCategoryCacheBuilder::getInstance(), 'count');\r\n\t}", "title": "" }, { "docid": "2e86deb549e39fdb36be7f6dea21cd5b", "score": "0.6059408", "text": "function lnNoOfLearning($uid,$cid) {\r\n\r\n\tlist($dbconn) = lnDBGetConn();\r\n\t$lntable = lnDBGetTables();\r\n\r\n\t$course_enrollstable = $lntable['course_enrolls'];\r\n\t$course_enrollscolumn = &$lntable['course_enrolls_column'];\r\n\t$course_submissionstable = $lntable['course_submissions'];\r\n\t$course_submissionscolumn = &$lntable['course_submissions_column'];\r\n\t$course_trackingtable = $lntable['course_tracking'];\r\n\t$course_trackingcolumn = &$lntable['course_tracking_column'];\r\n\r\n\t$query = \"SELECT COUNT($course_trackingcolumn[lid])\r\n\t\t\t\t\t\tFROM $course_trackingtable, $course_enrollstable, $course_submissionstable \r\n\t\t\t\t\t\tWHERE $course_trackingcolumn[eid]=$course_enrollscolumn[eid] AND $course_enrollscolumn[sid]=$course_submissionscolumn[sid] AND $course_submissionscolumn[cid]='\". lnVarPrepForStore($cid) .\"' AND $course_enrollscolumn[status]='\"._LNSTATUS_STUDY.\"' AND $course_enrollscolumn[uid] = '\".lnVarPrepForStore($uid).\"' GROUP BY $course_trackingcolumn[lid]\";\r\n\r\n\t$result = $dbconn->Execute($query);\r\n\r\n\t$sum_lesson = $result->PO_RecordCount();\r\n\r\n\treturn $sum_lesson;\r\n}", "title": "" }, { "docid": "e629e57e05e458a1267f99a9443c10d2", "score": "0.6059272", "text": "function htmlresource_count_in_courses($data) {\n global $DB;\n $sql = 'SELECT count(*) FROM {htmlresource} r\n WHERE r.resource_html_id = ?';\n $count = $DB->get_field_sql($sql, array($data->id));\n return $count;\n}", "title": "" }, { "docid": "6ca17088bebc1280c191b81bb2f946b4", "score": "0.60542274", "text": "public function getTotalActiveUsers()\n {\n $conn = $this->em->getConnection();\n\n $sql = \"SELECT \n count(DISTINCT(ru.user_id)) as total_active_users \n FROM\n room_user as ru\n INNER JOIN conference_session_user as csu\n ON \n csu.user_id = ru.user_id\n WHERE \t\n csu.is_kp = 0 AND \n csu.data_start is not null and\n csu.data_end is not null \n ;\";\n\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n\n $activeUsers = $stmt->fetch();\n\n return $activeUsers;\n }", "title": "" }, { "docid": "13e27bb946e9cdbba44045df40bd50f0", "score": "0.60230047", "text": "function module_getSubjectCoursesCount($id,$params) {\n\n\t\t$db = new DB_Sql();\n\t\t$cnt = 0;\n\t\t\t\t\t\n\t\tswitch($params['page_id']) {\n\t\t\tcase 4424:\t\n\t\t\t\t$query = \"SELECT COUNT(id) as cnt FROM tblunits WHERE (Description LIKE ('%Pre Apprenticeship%') AND id NOT LIKE ('AP%')) OR id LIKE ('AP%')\";\n\t\t\t\t$db->query($query);\t\n\t\t\t\t$db->next_record();\n\t\t\t\t$cnt = $db->Record[\"cnt\"];\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 4378:\n\t\t\t\t$query = \"SELECT COUNT(id) as cnt FROM tblunits WHERE Description LIKE '%Housing%' AND id NOT LIKE 'AP%'\";\n\t\t\t\t$db->query($query);\t\n\t\t\t\t$db->next_record();\n\t\t\t\t$cnt = $db->Record[\"cnt\"];\t\t\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$data = array();\n\t\t\t\tsubject_checkboxgroup_getData($params['page_id'],$data);\n\t\t\t\t\n\t\t\t\tif(isset($data['SUBJECT']['text'])) {\n\n\t\t\t\t\t$subjects = $data['SUBJECT']['text']; \n\t\t\t\t\t\n\t\t\t\t\t// nkowald - modified 22/06/2009 - need to removed multiple subject values in array\n\t\t\t\t\t$subjects = array_unique($subjects);\n\t\t\t\t\t\n\t\t\t\t\tforeach($subjects as $current_subject) {\n\t\t\t\t\t\t$query = \"SELECT id FROM tblunits WHERE Subject_ID='$current_subject'\";\n\t\t\t\t\t\t$rp = $db->query($query);\n\t\t\t\t\t\twhile($db->next_record(MYSQL_ASSOC)) {\n\t\t\t\t\t\t\t$cnt++; // how many courses\n\t\t\t\t\t\t}//while\n\t\t\t \n\t\t\t\t\t} //foreach\n\t\t\t\t} //if\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif ($cnt == 0) {\n\t\t\t$output = '';\n\t\t} else if ($cnt == 1) {\n\t\t\t$output = '1 course';\n\t\t} else {\n\t\t\t$output = $cnt.' courses';\n\t\t}\n\t\t\n\t\treturn $output;\t\n\t}", "title": "" }, { "docid": "27f104752c297e3e3d874c53ff061db0", "score": "0.60088414", "text": "function count_student_in_course()\r\n{\r\n\tglobal $nbStudents;\r\n\treturn $nbStudents;\r\n}", "title": "" }, { "docid": "88c43148bbd0ac7edd39c37a666ef423", "score": "0.59714156", "text": "function mdl_teacher_with_course($muID,$disName,$course){\n\t$return_arr = array();\n\n\t$mysqli = new mysqli('localhost', 'db_lms_main3v', 'HmE7nlFGZGT9zASf', 'db_lms_main3v_1819');\n\t\tif (mysqli_connect_errno()) {\n \t\t\techo json_encode(array('mysqli' => 'Failed to connect to MySQL: ' . mysqli_connect_error()));\n \t\t\texit;\n\t\t}\n\t\t$mysqli->set_charset(\"utf8\");\n\n\t\n\t\t$arrvalue = $mysqli->query(\"SELECT\n\t\t\t\t\t\t\t\t\t(SELECT COUNT(ccomp.userid) FROM mdl_course_completions ccomp WHERE ccomp.course=c.id AND ccomp.reaggregate > UNIX_TIMESTAMP(curdate())) AS ccompletedstudent\n\t\t\t\t\t\t\t\t\tFROM \n \t\t\t\t\t\t\t\t\t\tmdl_user u, mdl_role_assignments r, mdl_context cx, mdl_course c, mdl_course_categories mcc \n\t\t\t\t\t\t\t\t\tWHERE \n \t\t\t\t\t\t\t\t\t\tu.id = r.userid \n \t\tAND r.contextid = cx.id\t\n \t\tAND cx.instanceid = c.id\n\t\t\t\t\t\t\t\t\t\tAND r.roleid IN (3,4)\t\n \t\tAND cx.contextlevel =50 \t\n \t\tAND c.category =mcc.id\n \t\t\t\t\t\t\t\t\t\tAND u.id=$muID \n AND mcc.name='2019-2020' \n \t\tAND c.fullname LIKE '$disName %'\n AND c.fullname LIKE '%$course%'\n \");\n\t\t\n\t\twhile($row = $arrvalue->fetch_assoc()){\n \t$return_arr = $row['ccompletedstudent'];\n }\n\t\nreturn $return_arr;\n\n\n}", "title": "" }, { "docid": "c2d7b45a2bf331770ac42df5db0d5ced", "score": "0.59678006", "text": "function getClassesTaken($user_id, &$classesTaken)\n{\n\ttry\n {\n\t\t$db = openDBConn();\n\t\t$db->beginTransaction();\n\t\t\n\t\t$statement = $db->prepare(\"SELECT course_id FROM Courses_Taken WHERE user_id = $user_id GROUP BY course_id;\");\n\t\t$statement->execute();\n\t\t\n\t\t$result = $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\t$count = 0;\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$mult_course_id = $row['course_id'];\n\t\t\t$statement = $db->prepare(\"SELECT grade FROM Courses_Taken WHERE user_id = $user_id AND course_id = $mult_course_id\n\t\t\t\tORDER BY timestamp_taken DESC LIMIT 1\");\n\t\t\t$statement->execute();\n\t\t\t\t\n\t\t\t$result2 = $statement->fetch(PDO::FETCH_ASSOC);\n\t\t\t$classesTaken[$count]['grade'] = $result2['grade'];\n\t\t\t\t\t\n\t\t\t$statement = $db->prepare(\"SELECT * FROM Courses WHERE course_id = '$mult_course_id'\");\n\t\t\t$statement->execute();\n\t\t\t\t\n\t\t\t$result3 = $statement->fetch(PDO::FETCH_ASSOC);\n\t\t\t$classesTaken[$count]['term'] = $result3['term'];\n\t\t\t$classesTaken[$count]['year'] = $result3['course_year'];\n\t\t\t$instructor_id = $result3['user_id'];\n\t\t\t\n\t\t\t$statement = $db->prepare(\"SELECT dept_name, course_num FROM Course_Info WHERE course_info_id = \" . $result3['course_info_id']);\n\t\t\t$statement->execute();\n\t\t\n\t\t\t$result4 = $statement->fetch(PDO::FETCH_ASSOC);\n\t\t\t$classesTaken[$count]['dept_name'] = $result4['dept_name'];\n\t\t\t$classesTaken[$count]['course_num'] = $result4['course_num'];\n\t\t\t\n\t\t\t$statement = $db->prepare(\"SELECT first_name, last_name FROM Users WHERE user_id = '$instructor_id'\");\n\t\t\t$statement->execute();\n\t\t\n\t\t\t$result5 = $statement->fetch(PDO::FETCH_ASSOC);\n\t\t\t$classesTaken[$count]['teacher_first'] = $result5['first_name'];\n\t\t\t$classesTaken[$count]['teacher_last'] = $result5['last_name'];\n\t\t\t\n\t\t\t$count++;\n\t\t}\n\t\t\n\t\t$db->commit();\n }\n catch(PDOException $e)\n\t{\n\t\treportDBError($e);\n\t}\n}", "title": "" }, { "docid": "00f978748a79d9ce822138f590d7fb50", "score": "0.5953006", "text": "public function getUsersCountByRotatingSections() {\n $this->course_db->query(\n \"\n SELECT rotating_section, count(*) as count\n FROM users\n WHERE registration_section IS NOT NULL\n GROUP BY rotating_section\n ORDER BY rotating_section\"\n );\n return $this->course_db->rows();\n }", "title": "" }, { "docid": "7e193006bb1f22a8adb66098b7f28563", "score": "0.59466255", "text": "function kiraTotalAccsInactive() {\n\t\t$total = 0;\n\t\t$total = $this->find('count', array(\n\t\t\t'conditions' => array('Mt4User.GROUP LIKE' => '%Z%')\n\t\t));\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "e10c9bb121faca72dad0b70a4c57329f", "score": "0.5946532", "text": "function get_enrolled_course_yearly($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timeenrolled FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timeenrolled IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n $year=$DB->get_records_sql($sql);\n $emptyarray=[];\n foreach ($year as $yearenrolled) {\n $singleyear=$yearenrolled->timeenrolled;\n $emptyarray[] = date('Y',$singleyear);\n }\n $years = array_count_values($emptyarray);\n return $years; \n}", "title": "" }, { "docid": "bb0ff018b1305ad375e591ee1b425b42", "score": "0.5916536", "text": "function get_course_cerficatescount($startdt,$enddt,$courseloc,$courseid){\n global $DB;\n if(!empty($courseid)){\n $sql='';\n $sql.=\"SELECT c.id,u.id \n FROM {course} AS c \n JOIN {simplecertificate} AS sc ON c.id=sc.course\n JOIN {simplecertificate_issues} AS si ON si.certificateid=sc.id\n JOIN {user} AS u ON u.id=si.userid\n WHERE c.visible=1\";\n if($courseid > 1){\n $sql.=\" AND u.id = '$courseid'\";\n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.= \" AND si.timecreated BETWEEN '$startdt' AND '$enddt'\";\n }\n if(!empty($courseloc)){\n //here adding this query to main query.\n $sql.=\" AND u.city = '$courseloc'\";\n }\n $certificates=$DB->get_records_sql($sql);\n if(!empty($certificates)){\n return count($certificates);\n }else{\n return false;\n }\n }\n}", "title": "" }, { "docid": "af998c7b740bc976d840ccef1ce7ec2f", "score": "0.58992594", "text": "function getCategoriesandItems($courseid)\n{\n\n global $DB;\n\n $sql_query = \"SELECT {user_enrolments}.userid AS id\n FROM {enrol} INNER JOIN {user_enrolments} ON ({user_enrolments}.enrolid ={enrol}.id)\n WHERE courseid=\" . $courseid . \"\n LIMIT 1;\";\n\n $userid = $DB->get_record_sql($sql_query)->id;\n $context = context_course::instance($courseid);\n //print_r($userid);\n\n $gpr = new grade_plugin_return(array('type' => 'report', 'plugin' => 'user', 'courseid' => $courseid, 'userid' => $userid));\n $report = new grade_report_user($courseid, $gpr, $context, $userid);\n reduce_table_categories($report);\n if ($report->fill_table()) {\n return print_table_categories($report);\n }\n}", "title": "" }, { "docid": "1f9c26a75b3314178ba7367b690620d5", "score": "0.58932924", "text": "protected function count_courses( $branch )\n\t{\n\t\t$this_total = 0;\n\t\tif ( !$branch ) { return 0; }\n foreach ($branch as $b)\n {\n\t \tif ($b->courses)\n\t \t{\n\t \t$this_total += count($b->courses);\n\t\t }\n\t\t if ( $b->categories )\n\t\t {\n\t\t\t\t$this_total += $this->count_courses($b->categories); \n\t \t}\n }\n\t\treturn $this_total;\n }", "title": "" }, { "docid": "370a9151a1ed28d3707bea017ef1b10f", "score": "0.5855526", "text": "function all_student_progress($Course_ID,$class_id,$con) {\r\n\t\techo \"Number of students obtained each skill:<br>\";\r\n\t\t$skill_id_list = skillsForAClass($Course_ID,$con);\r\n\t\t$total_skill=sizeof($skill_id_list);\r\n\t\tforeach ($skill_id_list as $skill_id) {\r\n\t\t\t$result = mysqli_query($con,\"SELECT Skill_Name FROM Skills WHERE Skill_ID=$skill_id\");\r\n\t\t\t$row = mysqli_fetch_row($result);\r\n\t\t\t$num = how_many_obtained_the_skill($skill_id,$class_id,$con);\r\n\t\t\techo '<li>'.$row[0].': '.$num.' </li>';\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1e1779a63484e59aad8ea600c77b30f1", "score": "0.58548796", "text": "function get_user_yearly_completion($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timecompleted FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timecompleted IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n\n $year=$DB->get_records_sql($sql);\n $emptyarray=[];\n foreach ($year as $yearcompleted) {\n $singleyear=$yearcompleted->timecompleted;\n $emptyarray[] = date('Y',$singleyear);\n }\n $years = array_count_values($emptyarray);\n return $years;\n}", "title": "" }, { "docid": "3792b527d4140934c4e0012b7e039acd", "score": "0.58531994", "text": "public function getUserGroupOptionCategoryCount() {\r\n\t\treturn $this->getCache(ProjectUserGroupOptionCategoryCacheBuilder::getInstance(), 'count');\r\n\t}", "title": "" }, { "docid": "25e9a3737fc366ba231370dcbc01525b", "score": "0.5853049", "text": "public function checkuserCourse($email){\n $this->db->where('Email_Address',$email);\n return $this->db->count_all_results('applicants_course_details');\n }", "title": "" }, { "docid": "78150f9a5a6d48c325cdba21a796c827", "score": "0.57791245", "text": "static function countActiveClassrooms()\n {\n $classrooms = Classroom::all();\n $counter = 0;\n foreach ($classrooms as $classroom)\n {\n if($classroom->active == 1)\n {\n $counter++;\n }\n }\n return $counter;\n }", "title": "" }, { "docid": "cb00ef00241ba5546a314c4eade20c33", "score": "0.5769032", "text": "public function testgetNbUsersbyDiscipline() {\n $this->assertNotNull($this->modelMetrics->getNbUsersbyDiscipline(\"Agricultural Sciences\"), \"no result on call [getNbUsersbyDiscipline] for 'Agricultural Sciences' disciplines\");\n }", "title": "" }, { "docid": "ea6f74aef9d9102050e0c243d9a8a3cb", "score": "0.5752635", "text": "function get_course_completion($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timecompleted FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timecompleted IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n\n // here getting enrolement time. \n $information=$DB->get_records_sql($sql);\n $abc=[];\n //here getting single value.\n foreach($information as $info){\n $singleinfo=$info->timecompleted ;\n $abc[]=date(\"m\",$singleinfo);\n }\n // this function is used to count the array value.\n $months = array_count_values($abc);\n $montharray=[];\n $marray = array('Jan','Feb','Mar','Apl','May','Jun','Jul','Aug','Sep','Act','Nov','Dec');\n for ($i=01; $i < 13; $i++) { \n if($i <= 9){\n $i = '0'.$i;\n }\n // this function is used to check whether a specified key is present in an array or not. \n if (array_key_exists($i,$months)){\n $montharray[$marray[$i-1]] = $months[$i];\n }else{\n $montharray[$marray[$i-1]] = 0;\n }\n }\n return $montharray;\n}", "title": "" }, { "docid": "b3538bb45b13b4237e5cd9972b51a3a1", "score": "0.5733378", "text": "function countTotalThreads($category)\n{\n require(\"db_con.php\");\n $sql = \"select count(*) from thread where category_id='$category';\"; \n\n $result = mysqli_query($link, $sql);\n\n mysqli_close($link);\n \n $data = mysqli_fetch_assoc($result);\n return $data['count(*)'];\n}", "title": "" }, { "docid": "6ab51912917682bd56c471f474fe99d9", "score": "0.5732314", "text": "public function test_get_course_memberships() {\n global $DB;\n\n // get 'student' role\n $student_roleid = $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n ));\n\n // create 'tutor' role\n $tutor_roleid = $this->getDataGenerator()->create_role(array(\n 'name' => 'Tutor',\n 'shortname' => 'tutor',\n ));\n\n // a course with a non-empty idnumber\n $course = $this->getDataGenerator()->create_course(array(\n 'name' => 'Course name 001',\n 'idnumber' => '001',\n ));\n $context = context_course::instance($course->id);\n\n // some users who aren't course members\n foreach (range(1, 3) as $i) {\n $this->getDataGenerator()->create_user();\n }\n\n // 5 students\n $students = array();\n foreach (range(1, 5) as $i) {\n $student = $this->getDataGenerator()->create_user();\n $this->getDataGenerator()->role_assign($student_roleid, $student->id, $context->id);\n $students[] = $student;\n }\n\n // 2 tutors\n foreach (range(1, 2) as $i) {\n $tutor = $this->getDataGenerator()->create_user();\n $this->getDataGenerator()->role_assign($tutor_roleid, $tutor->id, $context->id);\n $tutors[] = $tutor;\n }\n\n // one user who has both roles (to ensure they're not counted twice)\n $user_with_student_and_tutor_roles = $this->getDataGenerator()->create_user();\n $this->getDataGenerator()->role_assign($student_roleid, $user_with_student_and_tutor_roles->id, $context->id);\n $this->getDataGenerator()->role_assign($tutor_roleid, $user_with_student_and_tutor_roles->id, $context->id);\n\n // ensure the memberships are as expected\n $memberships = $this->_cut->get_course_memberships();\n $this->assertCount(count($students) + count($tutors) + 1, $memberships);\n\n // students\n foreach ($students as $i => $student) {\n $key = $course->id . '_' . $students[$i]->id . '_student';\n $this->assertArrayHasKey($key, $memberships);\n $this->assertFalse($memberships[$key]->is_tutor);\n }\n\n // tutors\n foreach ($tutors as $i => $tutor) {\n $key = $course->id . '_' . $tutors[$i]->id . '_tutor';\n $this->assertArrayHasKey($key, $memberships);\n $this->assertTrue($memberships[$key]->is_tutor);\n }\n\n // extra tutor with both roles\n $key = $course->id . '_' . $user_with_student_and_tutor_roles->id . '_tutor';\n $this->assertArrayHasKey($key, $memberships);\n $this->assertTrue($memberships[$key]->is_tutor);\n }", "title": "" }, { "docid": "876f7a644df5c895ee1981e2a64a437b", "score": "0.5727467", "text": "function get_uca_mycourses_finished_courses_display()\n{\n return (key_exists('uca_mycourses_display_finished_courses', get_user_preferences())) ? boolval(get_user_preferences('uca_mycourses_display_finished_courses')) : true;\n}", "title": "" }, { "docid": "c8f040268745b8a59ec2af4d2b77f72a", "score": "0.572466", "text": "function shop_course_seats_check_assigned_seats($requiredroles) {\n global $SESSION;\n\n $assigned = 0;\n\n if (!isset($SESSION->shopseats)) {\n return 0;\n }\n\n if ($requiredroles && !empty($SESSION->shopseats->users)) {\n foreach ($SESSION->shopseats->users as $roleassigns) {\n foreach ($roleassigns as $role => $participants) {\n $assigned += count($participants);\n }\n }\n }\n\n return $assigned;\n}", "title": "" }, { "docid": "8355556219ba5d3cda10906776e6f0cc", "score": "0.57204586", "text": "function quest_get_course_students($courseid) {\n $context = context_course::instance($courseid);\n $members = get_users_by_capability($context, 'mod/quest:attempt');\n return $members;\n}", "title": "" }, { "docid": "9900ef7f915d5747a8490516dcad522d", "score": "0.5719983", "text": "function calculateTotalUnitReg(){\n // calculate the total unit registered\n $_total_unit = 0;\n foreach ($_SESSION['course_registration_details'] as $course_to_check_id){\n $_total_unit += $course_to_check_id->CourseUnit;\n }\n return $_total_unit;\n}", "title": "" }, { "docid": "3783b8870bdf6cde9302146d597911ee", "score": "0.5709375", "text": "function getCourses()\n\t\t{\n\t\t\t// Upcoming Courses\n\t\t\t$qry = \"select c.*, u.first_name, u.profile_url, u.subjects, u.qualification, u.profession, u.teach_exp, u.photoid, u.segment, u.fees, u.profile_url\n\t\t\t \n\t\t\t\t from tbl_course c inner join tbl_users u \n\t\t\t\t\ton u.slno=c.tchid where CURDATE() < end_date\";\t\n\t\t\treturn $this->runQuery($qry);\t\t\n\t\t}", "title": "" }, { "docid": "a65f98824f585d103cd1d19ff1afb8f6", "score": "0.5679916", "text": "public function count_students() {\n\t\t\t$count_users = LP()->utils->count_course_users( $this->get_id(), true );\n\t\t\t$total = ! empty( $count_users['total'] ) ? $count_users['total'] : 0;\n\n\t\t\t$append_students = LP()->settings()->get( 'enrolled_students_number' );\n\n\t\t\tif ( ( 'yes' == $append_students ) || ! in_array( $append_students, array( 'yes', 'no' ) ) ) {\n\t\t\t\t$total += $this->get_fake_students();\n\t\t\t}\n\n\t\t\treturn $total;\n\t\t}", "title": "" }, { "docid": "4854a4f087059b16b79c59fe38de0ccf", "score": "0.5675781", "text": "function check_lesson_completed($lesson_id = 0, $course_id = 0)\n{\n if($lesson_id == 0 || $course_id == 0)\n return false;\n\n\n //get tracking pod that matches this logged in user and this course\n $tracking_pods = pods('tracking', array(\n 'where' => 'enrolled_user.ID = \"' . get_current_user_id() . '\" AND completed_lessons.ID = \"' . $lesson_id . '\" '\n));\n \n\n \n \n \n if ( is_object( $tracking_pods ) && 0 < $tracking_pods->total() ) //should return one. one per user\n {\n \n return true;\n \n }\n \n \n return false;\n \n}", "title": "" }, { "docid": "846d420f987112e4debdb41972229b1f", "score": "0.566882", "text": "function get_total_project_count_by_category($categoryId) {\n $query = db_select('node', 'n');\n $query->fields('n', array('nid'));\n $query->join('field_data_field_sw_category', 'c', 'c.entity_id = n.nid');\n $query->condition('n.type', 'student_works', '=');\n $query->condition('c.field_sw_category_tid', $categoryId, '=');\n return $query->execute()->rowCount();\n}", "title": "" }, { "docid": "f1464bfa9fdae0f921992828abd62821", "score": "0.56645054", "text": "protected function sectionprogress($section) {\n global $DB, $USER, $modinfo, $course;\n\n // get all current user's completions on current course\n $usercourseallcmcraw = $DB->get_records_sql(\"\n SELECT\n cmc.*\n FROM\n {course_modules} cm\n INNER JOIN {course_modules_completion} cmc ON cmc.coursemoduleid=cm.id\n WHERE\n cm.course=? AND cmc.userid=?\", array($course->id, $USER->id));\n $usercmscompletions = array();\n foreach ($usercourseallcmcraw as $record) {\n //$usercourseallcmc[$record->coursemoduleid] = (array)$record;\n if ($record->completionstate <> 0) {\n $usercmscompletions[] = $record->coursemoduleid;\n }\n }\n\n // get current course's completable cms\n $ccompetablecms = array();\n $coursefminfo = get_fast_modinfo($course);\n foreach ($coursefminfo->get_cms() as $cm) {\n if ($cm->completion != COMPLETION_TRACKING_NONE && !$cm->deletioninprogress) {\n $ccompetablecms[] = $cm->id;\n }\n }\n\n $completedactivitiescount = 0;\n @$scms = $modinfo->sections[$section->section]; // get current section activities\n if (!empty($scms)) {\n $allcmsinsectioncount = count($scms); // first count all cms in section\n foreach ($scms as $arid=>$scmid) { // for each acivity in section\n if (!in_array($scmid, $ccompetablecms)) {\n unset($scms[$arid]); // unset cms that are not completable\n } else {\n if (in_array($scmid, $usercmscompletions)) {\n $completedactivitiescount++; // if cm is compledted - count it\n }\n }\n }\n $completedcmsinsectioncount = count($scms);\n $csectionpreogress = round($completedcmsinsectioncount/$allcmsinsectioncount*100);\n return $csectionpreogress;\n } else {\n return $csectionpreogress = 0;\n }\n }", "title": "" }, { "docid": "cb1177f8da37ab1d87a9b83b31a85a7e", "score": "0.5662883", "text": "private function countUserLessonCandidates($teacherLessonId) {\r\n $this->UserLesson->recursive = -1;\r\n return $this->UserLesson->find('count', array('conditions'=>array('payment_status' =>array(PAYMENT_STATUS_DONE, PAYMENT_STATUS_NO_NEED),\r\n 'stage' =>USER_LESSON_ACCEPTED,\r\n 'teacher_lesson_id' =>$teacherLessonId),\r\n ));\r\n }", "title": "" }, { "docid": "ba0e11f19ceb1b2dd18d9b7eedcf7b4c", "score": "0.565707", "text": "function get_curriculum_stats_structure($course_id,$user_id){\n\t\t\t$course_status = bp_course_get_user_course_status($user_id,$course_id);\n\t\t\t$data = array();\n\t\t\tif(empty($course_status)){\n\t \t\t$data = array(\n\t \t\t\t'user_id' => $user_id,\n\t\t\t\t\t'course_status' => 0\t\n\t \t\t);\n\t \t\t}else{\n\t \t\t\tglobal $wpdb,$bp;\n \t\t\t$start = $wpdb->get_var($wpdb->prepare(\"SELECT date_recorded FROM {$bp->activity->table_name} WHERE type ='start_course' AND item_id=%d AND component='course' AND user_id=%d ORDER BY id DESC LIMIT 1\", $course_id,$user_id));\n\t \t\t\t$marks=0;\n\t\t if($course_status > 3){\n\t\t \t$marks = get_post_meta($course_id,$user_id,true);\n\t\t \t\tif(empty($marks)){$marks=0;};\n\t\t } \n \t\t\t$total = 0;\n \t\t\t$complete = 0;\n\t\t \t$course_curriculum = bp_course_get_curriculum($course_id);\n\t\t \t$curriculum = array();\n\t\t \tif(!empty($course_curriculum)){\n\t \t\t\tforeach($course_curriculum as $c){\n\t \t\t\t\tif(is_numeric($c)){\n\t \t\t\t\t\t$c = (int)$c;\n\t \t\t\t\t\t$total++;\n\t\t\t $type = bp_course_get_post_type($c);\n\t\t\t\t\t\t\tif($type == 'unit'){\n\t\t\t\t\t\t\t \tif(bp_course_get_user_unit_completion_time($user_id,$c,$course_id)){\n\t\t\t\t\t\t\t \t$complete++;\n\t\t\t\t\t\t\t \t$curriculum[]=array(\n\t\t\t\t\t\t\t \t\t'id' => $c,\n\t\t\t\t\t\t\t \t\t'title'=>get_the_title($c),\n\t\t\t\t\t\t\t \t\t'type' => 'unit',\n\t\t\t\t\t\t\t \t\t'completed' => true\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t}else{\n\t\t\t\t\t\t\t \t\t$curriculum[]=array(\n\t\t\t\t\t\t\t \t\t'id' => $c,\n\t\t\t\t\t\t\t \t\t'title'=>get_the_title($c),\n\t\t\t\t\t\t\t \t\t'type' => 'unit',\n\t\t\t\t\t\t\t \t\t'completed' => false\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}\n\t \t\t\t\t\t\tif($type == 'quiz'){\n\t \t\t\t\t\t\t\t$marks = (int)get_post_meta($c,$user_id,true);\n\t \t\t\t\t\t\t\t$status = (int)bp_course_get_user_quiz_status($user_id,$c);\n\t\t\t \tif(!empty($status) && $status == 4){\n\t\t\t \t$complete++;\n\t\t\t \t$curriculum[]=array(\n\t\t\t\t\t\t\t \t\t'id' => $c,\n\t\t\t\t\t\t\t \t\t'title'=>get_the_title($c),\n\t\t\t\t\t\t\t \t\t'type' => 'quiz',\n\t\t\t\t\t\t\t \t\t'marks' => (int)$marks,\n\t\t\t\t\t\t\t \t\t'status' => $status,\n\t\t\t\t\t\t\t \t\t'completed' => true\n\t\t\t\t\t\t\t \t);\n\t\t\t }else{\n\t\t\t $curriculum[]=array(\n\t\t\t\t\t\t\t \t\t'id' => $c,\n\t\t\t\t\t\t\t \t\t'title'=>get_the_title($c),\n\t\t\t\t\t\t\t \t\t'type' => 'quiz',\n\t\t\t\t\t\t\t \t\t'status' => $status,\n\t\t\t\t\t\t\t \t\t'marks' => $marks,\n\t\t\t\t\t\t\t \t\t'completed' => false\n\t\t\t\t\t\t\t \t);\n\t\t\t }\n\t\t\t }\n\t\t\t }else{\n\t\t\t \t$curriculum[] = array(\n\t\t\t\t\t \t\t'title'=>$c,\n\t\t\t\t\t \t\t'type' => 'section',\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 \tif(empty($complete)){$complete = 0;}\n\t\t\t\t$data = array(\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'curriculum' => $curriculum,\n\t\t\t\t\t'complete' => (int)$complete,\n\t\t\t\t\t'total' => (int)$total,\n\t\t\t\t\t'course_status' => (int)$course_status,\n\t\t\t\t\t'marks' => (int)$marks,\n\t\t\t\t\t'start' => !empty($start)?strtotime($start):0\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn apply_filters('vibe_get_curriculum_stats_structure',$data);\n\t\t}", "title": "" }, { "docid": "ee4bc511e58370ad142e3fe14c24a140", "score": "0.5655758", "text": "public function queryCountRowsCourses(): int\n {\n $sql = \"SELECT COUNT(course_id) FROM courses\";\n $stmt = $this->pdo->query($sql);\n\n return $stmt->fetchColumn();\n }", "title": "" }, { "docid": "f66b99c7dfa5c9bf758b4675550297fc", "score": "0.56501293", "text": "function counting_semsec_handling_by_user($conn,$user):int\r\n{\r\n\t$sql=\"select count(semsec) as c from teaching where empid='$user'\";\r\n\t$res=mysqli_query($conn,$sql);\r\n\r\n\t$cn=\"\";\r\n\tif($res->num_rows>0)\r\n\t{\r\n\t\twhile ($ro=$res->fetch_assoc()) \r\n\t\t{\r\n\t\t\t$cn=$ro['c'];\r\n\t\t}\r\n\t}\r\n\treturn $cn;\r\n}", "title": "" }, { "docid": "5cf3bb829f4539cc1b056c5841582722", "score": "0.5645574", "text": "function mdlCourseCompletions($refSpec){\n\t$return_arr = array();\n\n\t$mysqli = new mysqli('localhost', 'db_lms_main3v', 'HmE7nlFGZGT9zASf', 'db_lms_main3v_1819');\n\t\tif (mysqli_connect_errno()) {\n \t\t\techo json_encode(array('mysqli' => 'Failed to connect to MySQL: ' . mysqli_connect_error()));\n \t\t\texit;\n\t\t}\n\t\t$mysqli->set_charset(\"utf8\");\n\n\t\t$arrvalue = $mysqli->query(\"SELECT COUNT(ccomp.userid) as regstudent\n \t\t\t\t\t\t\t\tFROM mdl_course_completions ccomp, mdl_course c, mdl_user u, mdl_course_categories mcc \n \t\t\t\t\t\t\t\t\tWHERE ccomp.course=c.id AND ccomp.userid = u.id AND mcc.id =c.category AND mcc.name='2019-2020' AND u.aim='\".$refSpec.\"' \");\n\n\t\t\n\t\twhile($row = $arrvalue->fetch_assoc()){\n \t$return_arr = $row['regstudent'];\n }\n\t\nreturn $return_arr;\n\n\n}", "title": "" }, { "docid": "54e26775a84e92618ffa2b9c50442a82", "score": "0.56439024", "text": "function kiraTotalAccs() {\n\t\t$total = 0;\n\t\t$total = $this->find('count', array(\n\t\t\t'conditions' => array('Mt4User.GROUP LIKE' => '%IK%')\n\t\t));\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "613065c0f57f08f7b448e6ad51f23753", "score": "0.5641545", "text": "public function getOrgUserCount($org) {\n\t\t\t$this->verifyOrgAccess($org);\n\n\t\t\t$employeeCount = $this->relaySQLConnection->query(\"\n\t\t\t\t\t\t\tSELECT COUNT(*) AS 'count'\n\t\t\t\t\t\t\t\tFROM \ttblUser, tblUserProfile\n\t\t\t\t\t\t\t\tWHERE \ttblUser.userId = tblUserProfile.usprUser_userId\n\t\t\t\t\t\t\t\tAND \ttblUser.userName LIKE '%@%$org%'\n\t\t\t\t\t\t\t\tAND \ttblUserProfile.usprProfile_profId = \" . $this->relaySQLConnection->employeeProfileId())[0]['count'];\n\n\t\t\t$studentCount = $this->relaySQLConnection->query(\"\n\t\t\t\t\t\t\tSELECT COUNT(*) AS 'count'\n\t\t\t\t\t\t\t\tFROM \ttblUser, tblUserProfile\n\t\t\t\t\t\t\t\tWHERE \ttblUser.userId = tblUserProfile.usprUser_userId\n\t\t\t\t\t\t\t\tAND \ttblUser.userName LIKE '%@%$org%'\n\t\t\t\t\t\t\t\tAND \ttblUserProfile.usprProfile_profId = \" . $this->relaySQLConnection->studentProfileId())[0]['count'];\n\n\t\t\treturn array('total' => $employeeCount + $studentCount, 'employees' => $employeeCount, 'students' => $studentCount);\n\t\t}", "title": "" }, { "docid": "2995b88e37d7353c848d59c2482872b8", "score": "0.5641238", "text": "public function getAllInActiveDebtorsCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalDebtors FROM debtors WHERE USER_ID='$userId' AND DEBTOR_STATUS='0'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalDebtors\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "9701b3c80a791ba56b91079fe1c4cc9f", "score": "0.5626652", "text": "public function count_course_participants($configFilter = null) {\n\t\t$this->db->from($this::ENROLLMENT_TABLE);\n\t\t\n\t\tif (isset($configFilter['id_course'])) {\n\t\t\t$this->db->where(['id_course' => $configFilter['id_course']]);\n\t\t\t$this->db->select('id_schedule AS id_item, COUNT(*) AS participants');\n\t\t\t$this->db->group_by('id_schedule');\n\t\t} else {\n\t\t\t$this->db->select('id_course AS id_item, COUNT(*) AS participants');\n\t\t\t$this->db->group_by('id_course');\n\t\t}\n\t\t\n\t\tif (isset($configFilter['status'])) {\n\t\t\t$this->db->where(['status' => $configFilter['status']]);\n\t\t}\n\t\t\n\t\t$queryResult = $this->db->get();\n\t\tif (!$queryResult) return null;\n\t\t$tmpCountData = $queryResult->result();\n\t\t\n\t\t$countData = [];\n\t\tforeach ($tmpCountData as $itemCountData) {\n\t\t\t$countData[$itemCountData->id_item] = $itemCountData->participants;\n\t\t}\n\t\t\n\t\treturn $countData;\n\t}", "title": "" }, { "docid": "46b3186bfa6255e1a4204b3e4ca790f4", "score": "0.56247723", "text": "function user_course_certificate($userid,$startdate,$enddate,$city){\n global $DB;\n if($userid > 1){\n $sql='';\n $sql=\"SELECT u.id,c.userid FROM {user} AS u INNER JOIN \n {simplecertificate_issues} AS c ON u.id=c.userid WHERE u.id='$userid'\";\n if(!empty($startdate) && !empty($enddate)){\n $sql.= \" AND c.timecreated BETWEEN '$startdate' AND '$enddate'\";\n }\n //here checking userlocation is empty or not.\n if(!empty($city)){\n //here adding this query to main query.\n $sql.=\" AND u.city = '$city'\";\n }\n $certificates=$DB->get_records_sql($sql);\n return count($certificates);\n }else if(!empty($city)){\n $sql=\"SELECT u.id,c.userid FROM {user} AS u INNER JOIN \n {simplecertificate_issues} AS c ON u.id=c.userid WHERE u.city='$city'\";\n if(!empty($startdate) && !empty($enddate)){\n $sql.= \" AND c.timecreated BETWEEN '$startdate' AND '$enddate'\";\n }\n $certificates=$DB->get_records_sql($sql);\n if(!empty($certificates)){\n return count($certificates); \n }\n return false;\n }\n}", "title": "" }, { "docid": "41eda6fb8de0b41e1adc9f0e6bbbe8a9", "score": "0.5621177", "text": "public function getTotalRegisteredUsersCount() {\n $this->course_db->query(\n \"\n SELECT count(*) as count\n FROM users\n WHERE registration_section IS NOT NULL\"\n );\n return $this->course_db->rows()[0]['count'];\n }", "title": "" }, { "docid": "a71b71f75a9f36458939bb7f24e73b5f", "score": "0.5614451", "text": "public function getCountNullUsersRotatingSections() {\n $this->course_db->query(\n \"\nSELECT rotating_section, count(*) as count\nFROM users\nWHERE registration_section IS NULL\nGROUP BY rotating_section\nORDER BY rotating_section\"\n );\n return $this->course_db->rows();\n }", "title": "" }, { "docid": "1a3d7214a5171bf3d3312140703d36f0", "score": "0.5612682", "text": "public function fetchUsersCount()\n {\n return $this->user->where('status', 1)\n ->where('role', 2)\n ->count();\n }", "title": "" }, { "docid": "1a6a700ac1070d14fdfa92e04b5b4bed", "score": "0.56114674", "text": "public function getActiveCautionCount();", "title": "" }, { "docid": "06a46952c34eaf07b63e2888bc5fd936", "score": "0.55924475", "text": "public function notUsedAll(){\n\t\t\t $agenciesimplemented=\"2698,2702,2705,2698,2707,2712,2713, 6887,6889,6890,6917,6920,6921,6922,6929,6930,6931,6934,6935,6936\";\n $result = $this->db->query(\"SELECT COUNT(*) as count FROM bpas_user_profiles p\n LEFT JOIN bpas_attendance_log a ON p.cid = a.userid AND a.date='\".date('Y/m/d').\"' WHERE a.status='Absent' AND AgencyID IN (\".$agenciesimplemented.\")\");\n foreach ($result->result() as $row){\n $count = $row->count;\n }\n return $count;\n\n\t\t\n\t}", "title": "" }, { "docid": "c748c2908875f98d0495b3eae5d1c702", "score": "0.55888397", "text": "public function getCoursesFailed() {\n return count($this->grades) - $this->getCoursesCompleted();\n }", "title": "" }, { "docid": "6673d77bbca8229285b912ace801a0ed", "score": "0.5588711", "text": "function allActive_User(){\n\t\t$activeuser=User::where('user_verify',1)->where('block',0)->where('role',null)->get();\n\t\treturn count($activeuser);\n\t}", "title": "" }, { "docid": "a12e5d5e5a9649340061d36b5ae56f96", "score": "0.55803895", "text": "public function getAllInActiveRemindersCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalReminders FROM reminders WHERE USER_ID='$userId' AND \tREMINDER_STATUS='0'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalReminders\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "6399db4dfc55226b966be8ee501861e3", "score": "0.5577557", "text": "function how_many_obtained_the_skill($skill_id,$cid,$con){\r\n\t\t$count = 0;\r\n\t\t$sql = \"SELECT Student_ID FROM Student_Classes WHERE Student_Classes.Class_ID= $cid\";\r\n\t\t$result = $con->query($sql);\r\n\t\tif ($result->num_rows > 0) {\r\n \t\twhile($row = $result->fetch_assoc()) {\r\n\t\t\t\t$student_id= $row[\"Student_ID\"]; \r\n\t\t\t\tif (isAcquired($student_id,$skill_id,$con)) { //If all the questions of this skill are answered correctly, the skill is obtained.\r\n\t\t\t\t\t$count++;//update \r\n\t\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $count;\r\n\t}", "title": "" }, { "docid": "a27efe8b73a9e4ff5284999ccd96551c", "score": "0.55756235", "text": "function get_course_enrolled_info($startdt,$enddt,$userloc,$userid){\n global $DB;\n $sql='';\n $sql.=\"SELECT cc.id,cc.timeenrolled FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timeenrolled IS NOT NULL\";\n if($userid > 1){\n $sql.=\" AND cc.userid = '$userid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($userloc)){\n $sql.=\" AND u.city = '$userloc'\"; \n }\n // here getting enrolement time. \n $information=$DB->get_records_sql($sql);\n $abc=[];\n //here getting single value.\n foreach($information as $info){\n $singleinfo=$info->timeenrolled ;\n $abc[]=date(\"m\",$singleinfo);\n }\n // this function is used to count the array value.\n $months = array_count_values($abc);\n $montharray=[];\n $marray = array('Jan','Feb','Mar','Apl','May','Jun','Jul','Aug','Sep','Act','Nov','Dec');\n for ($i=01; $i < 13; $i++) { \n if($i <= 9){\n $i = '0'.$i;\n }\n // this function is used to check whether a specified key is present in an array or not. \n if (array_key_exists($i,$months)){\n $montharray[$marray[$i-1]] = $months[$i];\n }else{\n $montharray[$marray[$i-1]] = 0;\n }\n }\n return $montharray;\n}", "title": "" }, { "docid": "5fce67faadfe8d9f028a9844cf1d79a2", "score": "0.55691713", "text": "public function student_count($u_id){\n\t\t$this->db->select('*')->from('time_slot');\n\t\t$this->db->where('time_slot.teacher',$u_id);\n\t\t$this->db->group_by('time_slot.class_id');\n\t\t$return= $this->db->get()->result_array();\n\t\tforeach($return as $list){\n\t\t\t$student_list[]=$this->get_student_list($list['class_id']);\n\t\t\t\n\t\t}\n\t\tif(!empty($student_list)){\n\t\t\treturn $student_list;\n\t\t}\n\t//echo '<pre>';print_r($student_list);exit;\n\t\n\t}", "title": "" }, { "docid": "e4c044d44e625ca0376d3094012621a3", "score": "0.556895", "text": "public function total_resources() {\n if ($this -> lti_object -> isInstructor)\n return 0;\n\n $type = $this -> lti_object -> is_solution_request() ? 'S' : 'P';\n\n ee() -> db -> select('lti_member_resources.id, lti_member_resources.display_name');\n ee() -> db -> join('lti_member_contexts', 'lti_member_contexts.id = lti_member_resources.internal_context_id');\n ee() -> db -> where(array(\"lti_member_resources.internal_context_id\" => $this -> lti_object -> internal_context_id, 'type' => $type));\n ee() -> db -> from('lti_member_resources');\n $total = ee() -> db -> count_all_results();\n\n return $total;\n }", "title": "" }, { "docid": "709b02fd454cb168d558f14551776291", "score": "0.55645865", "text": "function _activeUsers() {\r\n\t\tglobal $CFG;\r\n\r\n\t\t$activeUsersStartTime = time() - ( $CFG->block_ministats_active_users_days * 3600 * 24); // timestamp for user activity start time\r\n\t\treturn count_records_select('user', 'lastaccess >= '.$activeUsersStartTime );\r\n\t}", "title": "" }, { "docid": "2b06b8901bbc28e124432326c6e61b42", "score": "0.55625826", "text": "function getInprogress() {\n\t\t$permission = FlexicontentHelperPerm::getPerm();\n\t\t$user = &JFactory::getUser();\n\t\t$allitems\t= !JAccess::check($user->id, 'core.admin', 'root.1') ? $permission->DisplayAllItems : 1;\n\n\t\t$query = 'SELECT SQL_CALC_FOUND_ROWS c.id, c.title, c.catid, c.created_by'\n\t\t\t\t. ' FROM #__content as c'\n\t\t\t\t. ' LEFT JOIN #__categories as cat ON c.catid=cat.id'\n\t\t\t\t. ' WHERE c.state = -5'\n\t\t\t\t. ' AND cat.extension=\"'.FLEXI_CAT_EXTENSION.'\" ' //AND cat.lft >= ' . $this->_db->Quote(FLEXI_LFT_CATEGORY) . ' AND cat.rgt <= '. $this->_db->Quote(FLEXI_RGT_CATEGORY)\n\t\t\t\t. ($allitems ? '' : ' AND c.created_by = '.$user->id)\n\t\t\t\t. ' ORDER BY c.created DESC'\n\t\t\t\t;\n\n\t\t$this->_db->SetQuery($query, 0, 5);\n\t\t$genstats = $this->_db->loadObjectList();\n\t\t\n\t\treturn $genstats;\n\t}", "title": "" }, { "docid": "25208cab2b84a43f0ff0378000045248", "score": "0.5558583", "text": "function fetch_category_listing_question_count($cid = 0, $cattype = '')\r\n {\r\n global $ilance, $myapi;\r\n \r\n $count = 0;\r\n \r\n\t\t$pid = $ilance->db->fetch_field(DB_PREFIX . \"categories\", \"cid = '\" . intval($cid) . \"'\", \"parentid\");\r\n $var = $ilance->categories->fetch_children_ids($cid, $cattype);\r\n\t\t$var2 = $ilance->categories->fetch_parent_ids($cid);\r\n $extracids = \"AND (FIND_IN_SET(cid, '$cid,$var,$var2') AND recursive = '1' OR cid = '-1')\";\r\n unset($explode, $var);\r\n\t\t\r\n if ($cattype == 'service')\r\n {\r\n $sql = $ilance->db->query(\"\r\n SELECT COUNT(*) AS count\r\n FROM \" . DB_PREFIX . \"project_questions\r\n WHERE visible = '1'\r\n $extracids\r\n \", 0, null, __FILE__, __LINE__);\r\n $res = $ilance->db->fetch_array($sql);\r\n \r\n $count = (int)$res['count'];\r\n }\r\n else if ($cattype == 'product')\r\n {\r\n $sql = $ilance->db->query(\"\r\n SELECT COUNT(*) AS count\r\n FROM \" . DB_PREFIX . \"product_questions\r\n WHERE visible = '1'\r\n $extracids\r\n \", 0, null, __FILE__, __LINE__);\r\n $res = $ilance->db->fetch_array($sql);\r\n \r\n $count = (int)$res['count'];\r\n }\r\n \r\n return $count;\r\n }", "title": "" }, { "docid": "39e91ea0865ec9ff1b92b424de1f557f", "score": "0.5552012", "text": "function get_my_courses_list($all = true) {\n global $USER;\n\n // Get courses from a core moodle function.\n $my_courses = enrol_get_my_courses('enddate', 'fullname ASC,visible DESC,sortorder ASC');\n $to_exclude = explode(',', get_config('block_uca_mycourses', 'roles_to_exclude'));\n\n foreach ($my_courses as $key => $course) {\n $to_unset = false;\n\n // Check if the course is visible (unless necessary management capability ?).\n if (!$course->visible && !can_manage_course($course) && !$all) {\n $to_unset = true;\n }\n // Check if the course is finished. If it is we do not display it anymore.\n if (!get_uca_mycourses_finished_courses_display() && $course->enddate != 0 && $course->enddate < time()) {\n $to_unset = true;\n }\n\n $course->is_bookmark = course_bookmarked($course);\n\n // We don't want all user courses.\n if (!$all && count($to_exclude) > 0) {\n $context = context_course::instance($course->id, true);\n $roles = get_user_roles($context, $USER->id, true);\n foreach ($roles as $role) {\n if (in_array($role->roleid, $to_exclude)) {\n $to_unset = true;\n break;\n }\n }\n }\n\n if ($to_unset) {\n unset($my_courses[$key]);\n }\n }\n\n return $my_courses;\n}", "title": "" }, { "docid": "3e12e292aaf5abff4ddfa243ef71989f", "score": "0.5546823", "text": "function eventreg_userapi_countcategories()\n{\n // not then set an appropriate error message and return\n // Get datbase setup - note that both pnDBGetConn() and pnDBGetTables()\n // return arrays but we handle them differently. For pnDBGetConn() we\n // currently just want the first item, which is the official database\n // handle. For pnDBGetTables() we want to keep the entire tables array\n // together for easy reference later on\n list($dbconn) = pnDBGetConn();\n $pntable = pnDBGetTables(); \n // It's good practice to name the table and column definitions you are\n // getting - $table and $column don't cut it in more complex modules\n $categoriestable = $pntable['eventreg_categories'];\n $categoriescolumn = &$pntable['eventreg_categories_column']; \n // Get item - the formatting here is not mandatory, but it does make the\n // SQL statement relatively easy to read. Also, separating out the sql\n // statement from the Execute() command allows for simpler debug operation\n // if it is ever needed\n $sql = \"SELECT COUNT(1)\n FROM $categoriestable\";\n $result = $dbconn->Execute($sql); \n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _COUNTCATEGORYSQLFAILED . $sql . $eventable);\n return false;\n } \n // Obtain the number of items\n list($numitems) = $result->fields;\n\n if (!$numitems) {\n $numitems = 0;\n } \n // All successful database queries produce a result set, and that result\n // set should be closed when it has been finished with\n $result->Close(); \n // Return the number of items\n return $numitems;\n}", "title": "" }, { "docid": "41e4acac2bb1f121c70a03e91fa386b7", "score": "0.55457115", "text": "public function getAllActiveDebtorsCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalDebtors FROM debtors WHERE USER_ID='$userId' AND DEBTOR_STATUS='1'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalDebtors\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "dabe8f36ae7373d777ccf0d34d522fd5", "score": "0.5526364", "text": "public function countNumCategories();", "title": "" }, { "docid": "3c64bfd9ea4356fbdbd583899a9ee3bc", "score": "0.55166024", "text": "public function getNumberOfApprovedCourses() {\n return $this->data->numberOfApprovedCourses;\n }", "title": "" }, { "docid": "f6b8aee57dbfd22a713c4b299cf49f56", "score": "0.5509015", "text": "function getAssignCounts($db, $c_id){\n\t$db->where (\"as_c_id\", $c_id);\n\t$count = $db->getValue (\"assignments\", \"count(*)\");\n\n\treturn $count;\n\t\n}", "title": "" }, { "docid": "f6cc9883f3e25a0ec5e4cc0ce9701fe0", "score": "0.55080307", "text": "function allusers_report($startdt,$enddt){\n global $DB;\n $topcards=allusers_topcards_report($startdt,$enddt,null,null);\n $ycomplete=get_user_yearly_completion($startdt,$enddt,null,null);\n $temp1=1;\n $ydata='';\n $ylabel='';\n foreach ($ycomplete as $ykey => $yvalue) {\n if($temp1 == 1){\n $ydata = $yvalue;\n $ylabel = \"'\".$ykey.\"'\";\n }else{\n $ydata = $ydata.','.$yvalue;\n $ylabel = $ylabel.','.\"'\".$ykey.\"'\";\n }\n $temp1++;\n }\n $yenrol=get_enrolled_course_yearly($startdt,$enddt,null,null);\n $temp2=1;\n $crdata='';\n $crlabel='';\n if(!empty($yenrol)){\n foreach ($yenrol as $crkey => $crvalue) {\n if($temp2 == 1){\n $crdata = $crvalue;\n $crlabel = \"'\".$crkey.\"'\";\n\n }else{\n $crdata = $crdata.','.$crvalue;\n $crlabel = $crlabel.','.\"'\".$crkey.\"'\";\n }\n $temp2++;\n }\n }\n $yearlygraph=filter_yearly_enrol_completiongraph($crlabel,$crdata,$ylabel,$ydata);\n $infoenroll = get_course_enrolled_info($startdt,$enddt,null,null);\n $count = 1;\n $menrol = '';\n foreach ($infoenroll as $mkey => $mvalue) {\n if($count == 1){\n $menrol = $mvalue;\n }else{\n $menrol =$menrol.','.$mvalue;\n }\n $count++;\n }\n\n $completion=get_course_completion($startdt,$enddt,null,null);\n $temp=1;\n $mcomplete='';\n foreach ($completion as $ckey => $cvalue) {\n if($temp == 1){\n $mcomplete = $cvalue;\n }else{\n $mcomplete =$mcomplete.','.$cvalue;\n }\n $temp++;\n }\n $montlygraph=filter_monthly_enrol_completiongraph($menrol,$mcomplete);\n $usertabledata=userdatatable_report($startdt,$enddt,null,null);\n $usertable=site_datatable($usertabledata);\n $html=\"\";\n $html.=$topcards;\n $html.=$yearlygraph;\n $html.=$montlygraph;\n $html.=$usertable;\n echo $html;\n\n\n}", "title": "" }, { "docid": "8e561554194cc93affcc76bf319c1ec0", "score": "0.55058616", "text": "public function countDiscontinued() {\n\tglobal $qqc;\n\treturn $qqc->getValue('mod/prodmain::countdiscontinued');\n}", "title": "" }, { "docid": "0aa3412f91f30b283c6e34fa43f228f1", "score": "0.5503978", "text": "public function getAllActiveRemindersCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalReminders FROM reminders WHERE USER_ID='$userId' AND \tREMINDER_STATUS='1'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalReminders\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "c902de422f00db738bbb102f0957935a", "score": "0.5501229", "text": "public function countParticipations(){\n\t\t$counter = array();\n\t\t\n\t\t$counter['all'] = $this->resultRepository->countAllForPid($this->storagePid);\n\t\t$counter['finished'] = $this->resultRepository->countFinishedForPid($this->storagePid);\n $counter['connected'] = $this->resultRepository->countConnectedForPid($this->storagePid);\n\t\t$counter['not'] = $counter['all']-$counter['finished'];\n\t\t\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "71edda9b7db8f7878642dffb96890add", "score": "0.54955757", "text": "public function getAllInActiveTransactionsCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalTransactions FROM transaction WHERE USER_ID='$userId' AND TRANSACTION_STATUS='0'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalTransactions\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "f6e883442e84ae72a4d3388686491e1c", "score": "0.54931754", "text": "public function purchase_report_category_wise_count() {\n \n }", "title": "" }, { "docid": "844ebc2f919ffde833b446197b978061", "score": "0.5492838", "text": "public function test_fetcher_courses() {\n\n global $CFG;\n\n $currentgroup = null;\n $now = time();\n $timetoshowusers = $CFG->block_online_users_timetosee * 60;\n $context = context_course::instance($this->data['course1']->id);\n $courseid = $this->data['course1']->id;\n $onlineusers = new fetcher($currentgroup, $now, $timetoshowusers, $context, false, $courseid);\n\n $usercount = $onlineusers->count_users();\n $users = $onlineusers->get_users();\n $this->assertEquals($usercount, count($users), 'There was a problem counting the number of online users in course 1');\n $this->assertEquals(9, $usercount, 'There was a problem counting the number of online users in course 1');\n\n $courseid = $this->data['course2']->id;\n $onlineusers = new fetcher($currentgroup, $now, $timetoshowusers, $context, false, $courseid);\n\n $usercount = $onlineusers->count_users();\n $users = $onlineusers->get_users();\n $this->assertEquals($usercount, count($users), 'There was a problem counting the number of online users in course 2');\n $this->assertEquals(0, $usercount, 'There was a problem counting the number of online users in course 2');\n }", "title": "" }, { "docid": "686f1a2b63c65407dd2daf92d12380e9", "score": "0.5486032", "text": "function feedback_get_completeds_group_count($feedback, $groupid = false, $courseid = false, $and_clause = false) {\n global $CFG;\n\n if ($and_clause !== false && $and_clause != '') {\n // nkowald - added this and_clause\n $query = 'SELECT DISTINCT fbc.*\n FROM '.$CFG->prefix . 'feedback_completed AS fbc, '.$CFG->prefix . 'feedback_value AS fbv\n WHERE fbc.id = fbv.completed\n AND fbc.feedback = '.$feedback->id . \n $and_clause . ' \n ORDER BY random_response';\n if ($values = get_records_sql($query)) {\n $record_count = count($values);\n return $record_count;\n } else {\n return 0;\n } \n }\n\n if($courseid > 0 AND !$groupid <= 0) {\n $sql = 'SELECT id, COUNT( item ) ci\n FROM '.$CFG->prefix . 'feedback_value \n WHERE course_id = '.$courseid.'\n GROUP BY item ORDER BY ci DESC';\n if($foundrecs = get_records_sql($sql)) {\n $foundrecs = array_values($foundrecs);\n return $foundrecs[0]->ci;\n }\n return false;\n }\n if($values = feedback_get_completeds_group($feedback, $groupid)) {\n return sizeof($values);\n }else {\n return false;\n }\n}", "title": "" }, { "docid": "1e8a532b85a7594d198302c792d1e88f", "score": "0.5476837", "text": "public function getTotalStudent() {\r\n \r\n \r\n $STM2 = $this->connect->Prepare(\"SELECT COUNT(*) AS TOTAL FROM tpoly_students WHERE STATUS='Continuing Student' OR STATUS='Fresh' \");\r\n $row= $this->connect->Execute($STM2);\r\n if($row){\r\n $a= $row->FetchNextObject();\r\n\t\t return $a->TOTAL;\r\n }\r\n\t\telse{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n }", "title": "" }, { "docid": "f96c6175ae7ec47553591bb752ff35e2", "score": "0.5464662", "text": "public function countCategories(){\n\t\t\t$total = $this->find('all');\n\t\t\treturn count($total);\n\t\t}", "title": "" }, { "docid": "b1e9e5d7f59732506631f0ac40859bc8", "score": "0.5463264", "text": "public function GetCountUserProgressTickets($userId)\n {\n $sql = \"SELECT p.proj_name,sel.NO FROM projects p,(SELECT project_id,COUNT(*) as 'NO' FROM tickets WHERE status = 'IN_PROGRESS' AND user_id = :userId GROUP BY project_id) sel where sel.project_id = p.id ORDER BY NO DESC LIMIT 5\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindparam(\":userId\", $userId);\n try {\n $stmt->execute();\n if ($stmt->rowCount()) {\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $result;\n }\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "2fa3bab677d47a0849e698bda079aad3", "score": "0.546282", "text": "public function get_course_memberships() {\n global $DB;\n $uniqueid = $DB->sql_concat('c.id', \"'_'\", 'u.id', \"'_'\", 'r.shortname');\n $sql = <<<SQL\n SELECT $uniqueid AS uniqueid,\n u.username AS username,\n c.idnumber AS vle_course_id,\n r.shortname AS shortname\n FROM {course} c\n INNER JOIN {context} ctx\n ON ctx.instanceid = c.id\n AND ctx.contextlevel = :context_course\n INNER JOIN {role_assignments} ra\n ON ra.contextid = ctx.id\n INNER JOIN {role} r\n ON r.id = ra.roleid\n AND r.shortname IN (:role_student, :role_tutor)\n INNER JOIN {user} u\n ON u.id = ra.userid\n AND u.deleted = 0\n WHERE c.id != :siteid\n AND LENGTH(c.idnumber) > 0\n ORDER BY vle_course_id, username\nSQL;\n $params = array(\n 'context_course' => CONTEXT_COURSE,\n 'role_student' => 'student',\n 'role_tutor' => 'tutor',\n 'siteid' => SITEID,\n );\n $rows = $DB->get_records_sql($sql, $params);\n\n // if the user is both a student and a tutor (an unlikely edge case, admittedly) then discard the student row\n $rows = array_filter($rows, function ($row) use ($rows) {\n if ($row->shortname == 'tutor') {\n return true;\n }\n if (array_key_exists(str_replace('_student', '_tutor', $row->uniqueid), $rows)) {\n return false;\n }\n return true;\n });\n\n // replace the role shortname (either 'student' or 'tutor') with an 'is_tutor' boolean\n $rows = array_map(function ($row) {\n $row->is_tutor = $row->shortname == 'tutor';\n unset($row->shortname);\n return $row;\n }, $rows);\n\n // return collection\n return $rows;\n }", "title": "" }, { "docid": "d3cf217b76b08a701750bd5b5facc852", "score": "0.54592675", "text": "public function getNotEnrolledCourses()\n {\n $userId = $this->input->post(\"userId\");\n $result = $this->User_Model->getNotEnrolledCourses($userId);\n echo json_encode($result);\n }", "title": "" }, { "docid": "18b0de2dc95a6816c4056157189a303f", "score": "0.54571986", "text": "function ticketed_user_count()\n{\n\t$sql = \"select distinct UserId from Transactions where Status in ('Posted', 'Settled')\";\n\t \n\t$result = mysql_query($sql);\t\n\tif (!$result)\n\t\treturn display_mysql_error ('Cannot execute query', $sql);\n\t\n\treturn (mysql_num_rows($result));\n}", "title": "" }, { "docid": "f40b0bfac8a95a3f078e27b2208428cb", "score": "0.54545075", "text": "public function get_all_courses(){\r\n\t\t$this->db->where('crs_deleted_status','0');\r\n\t\t$this->db->order_by('crs_name','asc');\r\n\t\t$res = $this->db->get('aicp_courses');\r\n\t\treturn $res->result();\r\n\t}", "title": "" }, { "docid": "290bf39cdb23879a3bf6ece540ffce44", "score": "0.54525673", "text": "public function getAllActiveTransactionsCount(){\n $userId = $_SESSION[\"user_auth_id\"];\n $sql=\"SELECT count(*) as totalTransactions FROM transaction WHERE USER_ID='$userId' AND TRANSACTION_STATUS='1'\";\n $result = $this->conn->query($sql);\n if($row= $result->fetch_assoc()){\n return $row[\"totalTransactions\"];\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "026ba6c38c895bae464a7456a6195f5f", "score": "0.5449045", "text": "public function paymentsInvoice_count() {\n $tenant_id = TENANT_ID;\n $userid = $this->session->userdata('userDetails')->user_id;\n $this->db->select('cc.class_id');\n $this->db->from('course_class cc');\n $this->db->join('class_enrol ce', 'cc.class_id = ce.class_id');\n $this->db->join('enrol_invoice ei', 'ce.pymnt_due_id = ei.pymnt_due_id');\n //$where = \"(ce.enrolled_by = $userid or ce.user_id = $userid )\";\n $where = \"(ce.user_id = $userid )\";\n $this->db->where($where);\n $this->db->where('cc.tenant_id', $tenant_id);\n $result = $this->db->get();\n return $result->num_rows();\n }", "title": "" }, { "docid": "08d400d6a17043a12ecd7478056ec1b1", "score": "0.544532", "text": "function get_not_run_tc_count_per_build($build_id, $all_types = false, $user_id = 0) \r\n {\r\n $count = 0;\r\n \r\n $types = $this->get_available_types();\r\n $tc_execution_type = $types['testcase_execution']['id'];\r\n $type_sql = ($all_types) ? \"\" : \" AND UA.type = {$tc_execution_type} \";\r\n $user_sql = ($user_id && is_numeric($user_id)) ? \"AND UA.user_id = {$user_id} \" : \"\";\r\n \r\n $sql = \" SELECT UA.id as assignment_id,UA.user_id,TPTCV.testplan_id,\" .\r\n \" TPTCV.platform_id,BU.id AS BUILD_ID,E.id AS EXECID, E.status \" .\r\n \" FROM \".$this->db->get_table('user_assignments').\" UA \" .\r\n \" JOIN \".$this->db->get_table('builds').\" BU ON UA.build_id = BU.id \" .\r\n \" JOIN \".$this->db->get_table('testplan_tcversions').\" TPTCV \" .\r\n \" ON TPTCV.testplan_id = BU.testplan_id \" .\r\n \" AND TPTCV.id = UA.feature_id \" .\r\n \" LEFT OUTER JOIN \".$this->db->get_table('executions').\" E \" .\r\n \" ON E.testplan_id = TPTCV.testplan_id \" . \r\n \" AND E.tcversion_id = TPTCV.tcversion_id \" .\r\n \" AND E.platform_id = TPTCV.platform_id \" .\r\n \" AND E.build_id = UA.build_id \" .\r\n \" WHERE UA.build_id = {$build_id} AND E.status IS NULL {$type_sql} {$user_sql} \"; \r\n \r\n \r\n if (isset($build_id) && is_numeric($build_id)) {\r\n $count = count($this->db->fetchRowsIntoMap($sql, 'assignment_id'));\r\n }\r\n \r\n return $count;\r\n }", "title": "" } ]
3b60aab9d24dd842d7d9d6bc9bdebfa7
Ensure use of the correct relative path when determining the JavaScript file names.
[ { "docid": "96edf2ddd2ba8b2047d91eebe837e714", "score": "0.5267822", "text": "public static function fix_script_relative_path( $relative, $src ) {\n\n\t\t// Note relevant in AMP responses. See note above.\n\t\tif ( Jetpack_AMP_Support::is_amp_request() ) {\n\t\t\treturn $relative;\n\t\t}\n\n\t\t$strpos = strpos( $src, '/wp-includes/' );\n\n\t\t// We only treat URLs that have wp-includes in them. Cases like language textdomains\n\t\t// can also use this filter, they don't need to be touched because they are local paths.\n\t\tif ( false === $strpos ) {\n\t\t\treturn $relative;\n\t\t}\n\t\treturn substr( $src, 1 + $strpos );\n\t}", "title": "" } ]
[ { "docid": "508a858e68d5d87e7344a89abec2203e", "score": "0.65661305", "text": "function js_path(string $name = ''): string\n {\n if (! empty($name)) {\n $name = DS . ltrim($name, '/\\\\');\n }\n\n return WEBROOT . 'js' . str_replace('/', DS, $name);\n }", "title": "" }, { "docid": "30c1779c1704bbaf22b20f966adc4779", "score": "0.64444417", "text": "public function getAdditionalJavaScriptFiles();", "title": "" }, { "docid": "5ef64ba8ef3af46fa0dca5a47693170d", "score": "0.63383883", "text": "function loadJS() {\r\n \tglobal $root;\r\n \tglobal $javascript_files;\r\n \tbuildJS();\r\n \t$h = \"\";\r\n \tforeach ($javascript_files as $j) {\r\n \t\t$mtime = @filemtime(\"$root/$j\");\r\n \t\tif ($mtime) $h .= \"<script src=\\\"$j?t=$mtime\\\"></script>\\n\";\r\n \t}\r\n \treturn $h;\r\n }", "title": "" }, { "docid": "5ba1f6513201b2cf5932fb63e220e9ed", "score": "0.62847155", "text": "public function neededLoadJSFiles() \n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4d64db092421469b3b96244f08081990", "score": "0.6227136", "text": "function js_folder($script = '', $basepath = false)\n {\n if ($basepath)\n {\n $filename = TEMPLATEPATH . '/assets/js/' . trim($script, '/');\n }\n else\n {\n $filename = get_template_directory_uri() . '/assets/js/' . trim($script, '/');\n }\n return $filename;\n }", "title": "" }, { "docid": "f020c6d785ee91368c11aa2409abab0f", "score": "0.6149527", "text": "protected function _initFiles()\n {\n $layout = $this->getResource('layout');\n $view = $layout->getView();\n $view->headScript()->appendFile('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')\n ->appendFile('http://code.jquery.com/ui/1.8.20/jquery-ui.min.js')\n ->appendFile('/js/jquery.tablesorter.min.js')\n ->appendFile('/js/site.js')\n ->appendFile('/js/jquery-ui-timepicker-addon.js')\n ->appendFile('/js/date.js')\n ->appendFile('/js/jquery.livequery.js');\n }", "title": "" }, { "docid": "f756344beb280d02d74bdbf074e57f57", "score": "0.60533285", "text": "function getJSSources() {\n global $jsFiles;\n $js = \"\";\n\n foreach($jsFiles as $file) {\n $js .= readJSSourceFile($file) . PHP_EOL;\n }\n\n echo processJS($js);\n}", "title": "" }, { "docid": "20b856984faf973ddf650ed768dbe052", "score": "0.59631294", "text": "private function injectJSFiles() {\n if (count($this->jsFiles) == 0) return '';\n\n $result = array();\n $result[] = '<script>';\n\n foreach ($this->jsFiles as $jsFileName) {\n $jsFileName = TPLDIR . '/' . $this->templateName . '/' . $this->moduleName . '/js/' . $jsFileName . '.js';\n $content = file_get_contents($jsFileName);\n $result[] = $content;\n }\n\n $result[] = '</script>';\n\n return implode(' ', $result);\n }", "title": "" }, { "docid": "f7e61096dbc2dafcb039dafe5383539b", "score": "0.5955886", "text": "function getJS($filename) { return '<script type=\"text/javascript\" src=\"JS/' . $filename . '.js\"></script>'; }", "title": "" }, { "docid": "8e14334a3a4e9ddf8a2f0e5a972b6fd9", "score": "0.5911723", "text": "function jsPath($file) {\n $hrefPath = $this->defaultPath . 'assets/js/'. $file;\n return $hrefPath;\n }", "title": "" }, { "docid": "7218fbdfb9f0bbfd13a75c7fe35181ae", "score": "0.5908397", "text": "function js_path($file = NULL, $module = NULL, $absolute = NULL)\n{\n\t$CI = _get_assets();\n\treturn $CI->asset->js_path($file, $module, $absolute);\n}", "title": "" }, { "docid": "57bd9fea84e074559b67b30b0754e2a5", "score": "0.58953196", "text": "function load_admin_js_files ($js_files){\n\t$ci \t\t\t= &get_instance(); \n\tarray_unshift($js_files,\"prototype.js\",\"validation.js\",\"common.js\", \"email.js\");\n\t$js_files\t\t=\tarray_unique($js_files);\n\t\n\t$con_name\t\t= $ci->uri->segment (1);\n\t$fun_name\t\t= $ci->uri->segment (2);\n\t\n\t$js_file_path\t\t= $ci->config->item ('js_path'); \n\t$js_dest_file_path = $ci->config->item ('js_path_parsed'); \n\t\n\t$act_filename\t= 'adhi_'.$con_name.'_'.$fun_name.'.js';\n\t$filename\t\t= $js_dest_file_path.$act_filename;\n @unlink($filename);\n\tif (file_exists($filename) ){\n\t\treturn $act_filename;\n\t}else{\n\t\t@unlink($filename);\n\t\tforeach ($js_files as $files ){\n\t\t\t$file_to_open\t= $js_file_path.$files;\t\t\t \n\t\t\t$file_contents\t= file_get_contents($file_to_open,true);\t\t\t\t \n\t\t\tfile_put_contents($filename,$file_contents,FILE_APPEND);\n\t\t}\n\t\t\n\t\t$yui_minifier_path\t= $ci->config->item('yuicompressor_path');\n\t\t$java_path\t\t\t= $ci->config->item('java_path');\n\t\texec($java_path.' -jar '.$yui_minifier_path.' '.$filename.' -o '.$filename);\n\t\treturn $act_filename;\n\t}\n\t\n}", "title": "" }, { "docid": "ff54a72a1ac688103c40bd69c2926ccc", "score": "0.5878259", "text": "public function getJsFilesToInclude()\r\n {\r\n return array(\r\n 'Document/js/Models.js',\r\n 'Document/js/Backend.js',\r\n 'Document/js/DocumentsPanel.js',\r\n 'Document/js/AdminPanel.js'\r\n );\r\n }", "title": "" }, { "docid": "9459cd387bb2f4c757823a7874b92d47", "score": "0.5877214", "text": "static function scripts(){\n return '/js?file=';\n }", "title": "" }, { "docid": "6d7e37cd78052284e38710aad26679f4", "score": "0.58543414", "text": "function includeJavaScriptFilesFromDir($dirName, $excludeFiles=array())\n\t{\n\t\t$dir = opendir(\"client/\".$dirName);\n\t\t$files = array();\n\t\t$names = array();\n\t\t\n\t\twhile(($file = readdir($dir)) !== false)\n\t\t{\t\n\t\t\tif (substr($file,1,1)!=\".\" && !in_array($file,$excludeFiles) && substr($file,-3)==\".js\"){\n\t\t\t\t$files[] = \"client/\".$dirName.\"/\".$file;\n\t\t\t\t$names[] = $file;\n\t\t\t}\n\t\t}\n\t\t\n\t\tincludeFiles(\"js\", $files);\n\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "29ffdd585c56a7f453b7bfd01abae619", "score": "0.584075", "text": "public function testSymlinkJs()\n {\n $this->exec('glaze');\n $this->assertOutputContains('Glazing complete.');\n $this->assertOutputContains('Symlinking js');\n $scannedJs = array_diff(scandir($this->zurbDirectory . 'dist' . DIRECTORY_SEPARATOR . 'js'), ['..', '.']);\n foreach ($scannedJs as $js) {\n $this->assertFileExists(WWW_ROOT . 'js' . DIRECTORY_SEPARATOR . 'foundation' . DIRECTORY_SEPARATOR . $js);\n }\n }", "title": "" }, { "docid": "7e31a82b4c74d277573acd21df253a16", "score": "0.58206743", "text": "private function getResourcePath($name)\n {\n return sprintf('%s/%s.js', self::ROOT, $name);\n }", "title": "" }, { "docid": "a7c55a07569763f83becefa0cb739afd", "score": "0.57884306", "text": "public function loadJSFile($fileName)\n {\n $jsFolderPath = \"\";\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { //Local Dev on Windows\n $jsFolderPath = dirname(__DIR__) . \"\\\\frontend\\\\js\\\\\";\n } else {\n $jsFolderPath = dirname(__DIR__) . \"/frontend/js/\";\n }\n\n\n if (file_exists($jsFolderPath . \"$fileName\")) {\n array_push($this->JSFiles, $fileName);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "05d31aabc6ad9b4e8c1fc36d6cb340bb", "score": "0.573792", "text": "function getScripts () {\r\n return array('js/js.js');\r\n }", "title": "" }, { "docid": "1e828ddbf5c6725821059d1c940576e1", "score": "0.57274735", "text": "private function readScriptFiles( array $scripts ) {\n\t\tif ( empty( $scripts ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$js = '';\n\t\tforeach ( array_unique( $scripts, SORT_REGULAR ) as $fileName ) {\n\t\t\t$localPath = $this->getLocalPath( $fileName );\n\t\t\tif ( !file_exists( $localPath ) ) {\n\t\t\t\tthrow new MWException( __METHOD__ . \": script file not found: \\\"$localPath\\\"\" );\n\t\t\t}\n\t\t\t$contents = $this->stripBom( file_get_contents( $localPath ) );\n\t\t\t$js .= $contents . \"\\n\";\n\t\t}\n\t\treturn $js;\n\t}", "title": "" }, { "docid": "7fbb5df6011f6d7449777e1c565575a4", "score": "0.5726864", "text": "public function load_js_templates() {\n foreach ( glob( A2ZPM_PATH . \"/assets/src/components/**/*.php\") as $filename ) {\n $dirname = basename( dirname( $filename ) );\n a2zpm_get_js_template( $filename, 'a2zpm-' . $dirname );\n }\n }", "title": "" }, { "docid": "690f6c6084f219f01d12bd01390d5e0f", "score": "0.5719542", "text": "function js_url(string $name): string\n {\n $name = explode('?', $name)[0];\n $name = str_replace(site_url() . 'js/', '', htmlspecialchars($name));\n\n if (is_localfile($name)) {\n $name .= (! preg_match('#\\.js$#i', $name) ? '.js' : '');\n $filename = WEBROOT . 'js' . DS . $name;\n\n return site_url() . 'js/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');\n }\n\n return $name . (! preg_match('#\\.js$#i', $name) ? '.js' : '');\n }", "title": "" }, { "docid": "3c2193b591762bf6b6576352af1bfa59", "score": "0.57017785", "text": "function getScripts() {\r\n return array('js/js.js');\r\n }", "title": "" }, { "docid": "667bd1a4e278508319176983b4646dda", "score": "0.5696523", "text": "function update_fc_jquery_fname(){\n\t$path = drupal_get_path('module', 'content_reservation') \n\t\t. \"/lib/fullcalendar/jquery\";\n\t$pattern = \"/^jquery-\\d+.*\\.js/\";\n\tforeach(scandir($path) as $file){\n\t\tif (preg_match($pattern, $file, $matches)){\n\t\t\tvariable_set(\"fc_jquery_filename\", $file);\n\t\t\treturn $file;\n\t\t}\n\t}\n\treturn -1;\n}", "title": "" }, { "docid": "9f208ef9674380d6e08b721a4363ee51", "score": "0.56631577", "text": "function jsFile($params) {\n // This stops styles inadvertently clashing with the main site.\n if (strpos($_SERVER['REQUEST_URI'], $this->getPluginPath()) === 0) {\n \t$GLOBALS['HTML']->includeCalendarScripts();\n echo '<script type=\"text/javascript\" src=\"/scripts/scriptaculous/scriptaculous.js\"></script>'.\"\\n\";\n }\n }", "title": "" }, { "docid": "1ce1beca94fd28bf9545eae871150efe", "score": "0.565609", "text": "public function print_js( )\n {\n $importurl = \"./import.php\";\n print \"<script type='text/javascript' src='\".$importurl.\"' ></script>\\n\";\n\n /* load case and case dependents*/\n $ps = explode( '/' , $this->name );\n //读取helper\n foreach(Config::$helperFiles as $f){\n array_pop( $ps );\n array_push( $ps , $f );\n if ( file_exists( $this->testPath . implode( '/' , $ps ) ) ) {\n print '<script type=\"text/javascript\" src=\"' . $this->testPath . implode( '/' , $ps ) . '\"></script>' . \"\\n\";\n }\n }\n print '<script type=\"text/javascript\" src=\"' . $this->testPath. $this->name . '.js\"></script>' . \"\\n\";\n }", "title": "" }, { "docid": "bdb7cff03e5e7f57fccc561af2542f86", "score": "0.5646548", "text": "protected function computePaths()\n {\n if (!$this->hasBasePath() && !$this->hasScriptPath()) {\n return;\n }\n\n $this->fixPaths();\n\n $entry = basename($this->basePath);\n $baseFolder = dirname($this->basePath);\n\n if (substr($this->path, 0, strlen($baseFolder)) !== $baseFolder) {\n $this->basePath = null;\n $this->scriptPath = null;\n return;\n }\n\n if (substr($this->path, strlen($baseFolder) + 1, strlen($entry)) === $entry) {\n $this->scriptPath = substr($this->path, strlen($this->basePath));\n } else {\n $this->basePath = $baseFolder;\n $this->scriptPath = substr($this->path, strlen($baseFolder));\n }\n\n if ($this->scriptPath === false) {\n $this->scriptPath = '/';\n }\n }", "title": "" }, { "docid": "a20c96e8988e711ab73c0f6f9c4c6c2e", "score": "0.5644035", "text": "public static function js(){\n if(!\\method_exists(static::get_class(), 'js_path')){\n throw new \\SYSTEM\\LOG\\ERROR('Function js_path not implemented in '.static::get_class());}\n return static::js_path();}", "title": "" }, { "docid": "4fd92e9f028bbc33fba69beeea27776f", "score": "0.55993086", "text": "private static function _required_javascripts_compute() {\n\t\tforeach (self::$_javascripts_required_per_page as $script => $pages) {\n\t\t\tif (preg_match('#(?:' . $pages . ')[^/]*/?$#', $_SERVER['REQUEST_URI'])) {\n\t\t\t\tself::$_protected_resources .= \"|\" . $script;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9e06f0d2784e30dc27d64a2fed834468", "score": "0.5597017", "text": "public static function scripts_initializing()\n {\n $config=new Configure();\n $inst=new Initializer();\n $paths=[];\n $inst->get_all_files(site_dir.DIRECTORY_SEPARATOR.'Appearance','js',$paths);\n\n $return_string=\"\";\n foreach ($paths as $path){\n $path=str_replace(site_dir.DIRECTORY_SEPARATOR,$inst->read_need_file()['site_url'],$path);\n $return_string.=\"<script class='page-scripts' type='text/javascript' src='$path' ></script>\";\n }\n return $return_string;\n }", "title": "" }, { "docid": "04f67a546925340466ba02136b27c22c", "score": "0.55678445", "text": "protected function _GetJsFilesQueryString($arrFilenames)\n\t{\n\t\t$strFiles\t= '';\n\t\t$strMd5\t\t= '';\n\t\t\n\t\tVixenRequire('html/ui/javascript_builder.php');\n\t\t\n\t\tforeach ($arrFilenames as $strFilename)\n\t\t{\n\t\t\t$strFilename .= \".js\";\n\t\t\t$strFiles .= \"File[]=$strFilename&amp;\";\n\t\n\t\t\t// If nothing has been requested, return FALSE;\n\t\t\tif (trim($strFilename) == \"\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t// Try and find the javascript file\n\t\t\tif (HasJavascriptFile($strFilename, LOCAL_BASE_DIR . \"javascript\"))\n\t\t\t{\n\t\t\t\t// A local js file has been found. Include it\n\t\t\t\t$strMd5 .= md5_file(LOCAL_BASE_DIR. \"javascript/$strFilename\");\n\t\t\t}\n\t\t\telse if (HasJavascriptFile($strFilename, FRAMEWORK_BASE_DIR . \"javascript\"))\n\t\t\t{\n\t\t\t\t// The file has been found in the framework. Include it\n\t\t\t\t$strMd5 .= md5_file(FRAMEWORK_BASE_DIR. \"javascript/$strFilename\");\n\t\t\t}\n\t\t}\n\t\treturn $strFiles . 'v=' . md5($strMd5);\n\t}", "title": "" }, { "docid": "7be200ded31de8f5ffd4a4ab905f562b", "score": "0.55507785", "text": "public static function assets_js() {\n\n\t\tglobal $wp_scripts, $wp_version;\n\n\t\t$assets = self::$configs['assets']['js']; extract($assets); // config, inlines, enqueue\n\n\t\tforeach( $enqueue as $handle => $params ) {\n\t\t\t//pr( $params );\n\t\t\tif ( file_exists($params['path']) ) {\n\t\t\t\t$version = (isset($config['timestamp']) && $config['timestamp']) ? filemtime( $params['path'] ) : $wp_version;\n\t\t\t\twp_register_script( $handle, $params['src'], $params['deps'], $version, $params['in_footer'] );\n\t\t\t\twp_enqueue_script( $handle );\n\t\t\t\tif ( array_key_exists('extra', $params) && $params['extra'] ) {\n\t\t\t\t\t/* used when loading IE conditional javascripts */\n\t\t\t\t\tforeach( $params['extra'] as $k => $v ) {\n\t\t\t\t\t\t/* not fully supported yet */\n\t\t\t\t\t\t$wp_scripts->add_data( $handle, $k, $v );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "156eeaa3e80cd4b20adfbaa623a926da", "score": "0.5544902", "text": "public function script($files = null) {\n // nothing?\n if(is_null($files))\n return;\n\n // string? convert to array\n if(is_string($files))\n $files = [$files];\n\n // not array?\n if(!is_array($files))\n return;\n\n // unique check\n foreach($files as $file)\n if(in_array($file, $this->js['extern']))\n return false;\n\n // add each file to group with www_root\n $group = [];\n foreach($files as $url)\n $group[] = $this->path($url, ['pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js']);\n\n // filter\n $group = array_filter($group);\n\n // array merge\n $this->js['intern'] = array_merge($group, $this->js['intern']);\n $this->js['extern'] = array_merge($files, $this->js['extern']);\n }", "title": "" }, { "docid": "2514ccdd8b95cc6a0fed8edd9d1d41d5", "score": "0.5522046", "text": "public function getJsFiles()\n\t{\n\t\t$this->run();\n\t\treturn $this->js;\n\t}", "title": "" }, { "docid": "bb63fe3b97687bee291b6c79524e44f6", "score": "0.5521356", "text": "public static function path_to_javascript($source){\n\t\treturn static::javascript_path($source);\n\t}", "title": "" }, { "docid": "bf19dbda8fa9092a9bc1180fa8e084ca", "score": "0.5515574", "text": "public function getScriptPaths() {\r\n return array('script' => $this->_smarty->template_dir);\r\n }", "title": "" }, { "docid": "36f1d3ac74c2fb7967ebc5f888b3fe37", "score": "0.5509157", "text": "public static function getStaticScript( $filename ){\n\t\t\n\t\t$filenames = func_get_args();\n\t\t\n\t\t$hash = md5( implode( $filenames ) );\n\t\t$script = APPLICATION_PATH. '/../public/js/static/'.$hash.'.js';\n\t\t\n\t\t//if( ! file_exists( $script ) ){\n\t\t\tfile_put_contents( $script, self::load( $filenames ) );\n\t\t//}\n\t\t\n\t\treturn Anta_Core::getBase().'/js/static/'.$hash.'.js';\n\t}", "title": "" }, { "docid": "580e3965a53dc646c02a930a1ea5ec26", "score": "0.54802006", "text": "function html_javascript($file, $scripts_as_root = true) {\n $a_file = explode('/', $file);\n $tpl = end($a_file);\n $tpl_escaped = str_replace('.', '\\.', $tpl);\n $path = preg_replace('/' . $tpl_escaped . '$/isU', '', $file);\n if (strpos($tpl, '.php') === false) {\n $path .= $tpl . '.js';\n } else {\n $path .= $tpl;\n }\n $src = ($scripts_as_root ? 'scripts/' : '') . $path;\n return '<script type=\"text/javascript\" src=\"' . $src . '\"></script>';\n}", "title": "" }, { "docid": "5635f48fce2aa0e2544dcd66f3e6e758", "score": "0.5478298", "text": "public static function assets_js_way_point() {\n\t\t\n\t\t$type = 'js';\n\t\t\n\t\techo self::$configs['assets'][$type]['config']['relocate']; // e.g. '<!-- JS ASSETS TO RELOCATE -->';\n\n\t\t/* if we have any inline scripts that we've detected */\n\t\tif ( isset(self::$configs['assets'][$type]['inlines']) && self::$configs['assets'][$type]['inlines'] ) {\n\t\t\tforeach( self::$configs['assets'][$type]['inlines'] as $inline_script ) {\n\t\t\t\techo $inline_script, \"\\n\";\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "f5effe900e01f4f1444a95fa6d20def8", "score": "0.54745203", "text": "function javascripts()\n\t\t{\n\t\t\t// Get our list of files from the uri\n\t\t\t$segments = $this->uri->segment_array();\n\n\t\t\t// Our file contents holder. This aggregates everything into one file.\n\t\t\t$file = '';\n\n\t\t\tforeach ($segments as $segment)\n\t\t\t{\n\t\t\t\t$filepath = \"./\" . $this->config->item('OCU_javascript_path') . $segment . \".js\";\n\t\t\t\tif (file_exists($filepath))\n\t\t\t\t{\n\t\t\t\t\t$file .= file_get_contents($filepath);\n\t\t\t\t}\n\t\t\t}\n\t\t\techo header('Content-type: text/javascript');\n\t\t\techo $file;\n\t\t}", "title": "" }, { "docid": "8823e03db5957e43165dab5eb4bdc084", "score": "0.5470686", "text": "public function testCleanJs()\n {\n $this->exec('glaze -c');\n $this->assertOutputContains('Glazing complete.');\n $this->assertOutputContains('Cleaning js');\n $scannedJs = array_diff(scandir($this->zurbDirectory . 'dist' . DIRECTORY_SEPARATOR . 'js'), ['..', '.']);\n foreach ($scannedJs as $js) {\n $this->assertFileNotExists(WWW_ROOT . 'js' . DIRECTORY_SEPARATOR . 'foundation' . DIRECTORY_SEPARATOR . $js);\n }\n }", "title": "" }, { "docid": "0dec36cb8ca9a97b1324b57f54357eb5", "score": "0.546352", "text": "public static function compileJsAutoloader(){\n\t\t// declarations\n\t\t$app = JFactory::getApplication();\n\t\t$template = $app->getTemplate();\n\t\t$path = JPATH_SITE . \"/templates/$template/js/autoloader/\";\n\n\t\tif(JFolder::exists($path)){\n\t\t\t// List js files\n\t\t\t$files = JFolder::files($path, '.js');\n\t\t\t\n\t\t\t// Remove autoloader.js\n\t\t\t$files = array_diff($files, array(\"autoloader.js\"));\n\t\t\t\n\t\t\t// Apply ordering if exist\n\t\t\t$files = self::applyOrdering($path, $files);\n\t\t\t\n\t\t\t// Apply excludes if exist\n\t\t\t$files = self::applyExcludes($path, $files);\n\n\t\t\t// Compile autoloader file\n\t\t\tif (count($files)){\n\t\t\t\t$content = \"\";\n\t\t\t\tforeach($files as $file){\n\t\t\t\t\tif($file == \"autoloader.js\") continue;\n\t\t\t\t\t\n\t\t\t\t\t$content .= \"\\n\\n\\n\";\n\t\t\t\t\t$content .= \"// File: $file\\n\";\n\t\t\t\t\t$content .= \"\\n\";\n\t\t\t\t\t$content .= trim(file_get_contents(\"$path/$file\")).\"\\n\\n\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(JFile::exists(\"$path/autoloader.js\")){\n\t\t\t\t\t$oldContent = file_get_contents(\"$path/autoloader.js\");\n\t\t\t\t}else{\n\t\t\t\t\t$oldContent = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($oldContent != $content){\n\t\t\t\t\tJFile::write(\"$path/autoloader.js\", $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d095f9d79c4fa6f95aa5b904ab2084f1", "score": "0.54564136", "text": "static public function loadJs()\n\t{\t\n\t\tHTMLHelper::_('script', 'modernizr.js', ['version' => 'auto', 'relative' => true]);\n\t\t//HTMLHelper::_('script', 'nunjucks.js', ['version' => 'auto', 'relative' => true]);\n\t\tHTMLHelper::_('script', 'nhsuk-5.0.0.min.js', ['version' => 'auto', 'relative' => true]);\n\t\tHTMLHelper::_('script', 'template.js', ['version' => 'auto', 'relative' => true]);\n\t\t\n\t\tHTMLHelper::_('script', 'iframeResizer.contentWindow.js', ['version' => 'auto', 'relative' => true],['defer'=>\"defer\"]);\n\t\tHTMLHelper::_('script', 'nhsuk-frontend.js', ['version' => 'auto', 'relative' => true],['defer'=>\"defer\"]);\n\n\t}", "title": "" }, { "docid": "12f4764e0d5385c8fe48b209ee10c0f0", "score": "0.54366046", "text": "protected function getCombinedJsFilename()\n {\n if (is_multisite()) {\n return sprintf('quform.%d.js', get_current_blog_id());\n }\n\n return 'quform.js';\n }", "title": "" }, { "docid": "f03ee59a4a79ad83c39802d4151e234e", "score": "0.543595", "text": "protected function _source_path ()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "03290e25edc7b3d47b7b1f77dbb39b45", "score": "0.5425235", "text": "protected function RenderDeferJavaScriptFiles() {\n\t\t$ArrayCode = \"['\" . implode(\"', '\", $this->DeferJavaScriptFiles) . \"']\";\n\t\techo <<<SCRIPT\n<script type=\"text/javascript\">\nvar windowonload = window.onload;\nwindow.onload = function() {\n\tvar include = function(files) {\n\t\tvar onload;\n\t\tvar script = document.createElement('script');\n\t\tvar file = files.shift();\n\t\tif (typeof files == 'string') files = [files];\n\t\tscript.setAttribute('type', 'text/javascript');\n\t\tscript.setAttribute('src', file);\n\t\tdocument.body.appendChild(script);\n\t\tif (files.length > 0) {\n\t\t\tonload = function() { include(files); }\n\t\t\tscript.onreadystatechange = onload;\n\t\t\tscript.onload = onload;\n\t\t} else {\n\t\t\tif (typeof windowonload == 'function') windowonload();\n\t\t}\n\t}\n\tinclude($ArrayCode);\n}\n</script>\nSCRIPT;\n\t}", "title": "" }, { "docid": "b58c7d530dfdee678be48fd350815a39", "score": "0.54141843", "text": "function find_asset_file_path( $template_directory, $relative_path, $file_name, $file_ext ) {\n\n\t$relative_path_file_name = trim( $relative_path, DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . trim( $file_name, DIRECTORY_SEPARATOR );\n\n\t$minified = $template_directory . DIRECTORY_SEPARATOR . $relative_path_file_name . '.min.' . $file_ext;\n\t$standard = $template_directory . DIRECTORY_SEPARATOR . $relative_path_file_name . '.' . $file_ext;\n\n\t$file_path = '';\n\n\tif ( is_local() && file_exists( $standard ) ) {\n\t\t$file_path = DIRECTORY_SEPARATOR . $relative_path_file_name . '.' . $file_ext;\n\t} elseif ( file_exists( $minified ) ) {\n\t\t$file_path = DIRECTORY_SEPARATOR . $relative_path_file_name . '.min.' . $file_ext;\n\t} elseif ( file_exists( $standard ) ) {\n\t\t$file_path = DIRECTORY_SEPARATOR . $relative_path_file_name . '.' . $file_ext;\n\t}\n\n\treturn $file_path;\n}", "title": "" }, { "docid": "f39381613f9f3fcf1708438c21fdcd36", "score": "0.54107815", "text": "public function loadJS()\n\t{\n\t\tJHtml::_('script', 'media/com_fabrik/js/head/head.min.js');\n\t\t$plugins = JFolder::folders(JPATH_SITE . '/plugins/fabrik_element', '.', false, false);\n\t\t$files = array();\n\t\tforeach ($plugins as $plugin)\n\t\t{\n\t\t\t$files[] = JPATH_SITE . '/plugins/fabrik_element/' . $plugin . '/' . $plugin . '.js';\n\t\t}\n\t\tforeach ($files as $f)\n\t\t{\n\t\t\t$f = str_replace(\"\\\\\", \"/\", str_replace(JPATH_SITE, '', $f));\n\t\t\t$file = basename($f);\n\t\t\t$folder = dirname($f);\n\t\t\t$folder = FabrikString::ltrimword($folder, '/') . '/';\n\t\t\tFabrikHelperHTML::script($folder . $file);\n\t\t}\n\t}", "title": "" }, { "docid": "dc53ee5ee00c2c00774922930be10926", "score": "0.5398221", "text": "private function findDocumentRootInScriptFileName()\n {\n\n $filename = $this->server->get('SCRIPT_FILENAME') ?: false;\n if (false === $filename) {\n return false;\n }\n $parse = explode('/', $filename);\n $count = count($parse);\n if ($count && $count > 1) {\n $path = array_slice($parse, 0, $count-1);\n return $this->removeLastSlash(join('/', $path));\n } else {\n return '/';\n }\n\n }", "title": "" }, { "docid": "a1916f71d7bbd8393b9a7bc2dc4302ad", "score": "0.5391161", "text": "final protected function setJS(): void\n {\n if (file_exists(sprintf('%sjs/%s.js', DOCUMENT_ROOT, APP_CONTROLLER))) {\n $this->VIEW->addJS(APP_CONTROLLER);\n }\n if (file_exists(sprintf('%sjs/%s/common.js', DOCUMENT_ROOT, APP_CONTROLLER))) {\n $this->VIEW->addJS(APP_CONTROLLER . '/common');\n }\n if (file_exists(sprintf('%sjs/%s/%s.js', DOCUMENT_ROOT, APP_CONTROLLER, APP_ACTION))) {\n $this->VIEW->addJS(APP_CONTROLLER . '/' . APP_ACTION);\n }\n }", "title": "" }, { "docid": "2b95a243856213e0f3b584e7be136346", "score": "0.5390171", "text": "public function getUniqueJsIncludes()\n {\n $includes = array();\n foreach ($this->getPopups() as $popup) {\n foreach ($popup->getRules() as $rule) {\n $includes[] = $rule->getJsFilePath();\n }\n }\n\n return array_unique($includes);\n }", "title": "" }, { "docid": "9e2c0e695b44559b115cf8930d884072", "score": "0.5388047", "text": "function loadFiles($inputFiles) { // @param Array:\r\n global $catfood;\r\n\r\n $js = '';\r\n foreach ($inputFiles as $src) {\r\n $js .= loadSource($src);\r\n }\r\n if (function_exists('autoInclude')) {\r\n $js = autoInclude($js);\r\n }\r\n\r\n // create \"../js/catfood.js\"\r\n $fp = fopen($catfood, 'w') or die($catfood . \" file open fail\");\r\n\r\n fwrite($fp, $js);\r\n fwrite($fp, \"\\n\");\r\n fclose($fp);\r\n}", "title": "" }, { "docid": "29060b569e10d8adaa1129acc3cd2b33", "score": "0.5383287", "text": "public function getJavaScripts()\n {\n $assetsUrl = $this->modx->getOption('fileinput.assets_url', null, MODX_ASSETS_URL . 'components/fileinput/');\n return array(\n $assetsUrl . 'js/file.input.js',\n );\n }", "title": "" }, { "docid": "3c9db7ec46237d9259c8525a7738f59d", "score": "0.5380028", "text": "public static function getJsFile($sPath, $sFileName = PH7_LANG_CODE)\n {\n if (is_file($sPath . $sFileName . '.js'))\n {\n return $sFileName . '.js';\n }\n else if (is_file($sPath . PH7_DEFAULT_LANG_CODE . '.js'))\n {\n return PH7_DEFAULT_LANG_CODE . '.js';\n }\n else\n {\n throw new Exception('Language file \\'' . $sPath . PH7_DEFAULT_LANG_CODE . '.js\\' not found.');\n }\n }", "title": "" }, { "docid": "23c55afb59f5ac7362416eaf28c2d8fb", "score": "0.5377331", "text": "function lib_js_url(string $name): string\n {\n $name = explode('?', $name)[0];\n $name = str_replace(site_url() . 'lib/', '', htmlspecialchars($name));\n\n if (is_localfile($name)) {\n $name .= (! preg_match('#\\.js$#i', $name) ? '.js' : '');\n $filename = WEBROOT . 'lib' . DS . $name;\n\n return site_url() . 'lib/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');\n }\n\n return $name . (! preg_match('#\\.js$#i', $name) ? '.js' : '');\n }", "title": "" }, { "docid": "22f6ccb763e876131ee0ab5d61180381", "score": "0.53766423", "text": "function js($file) {\n\treturn \"<script type=\\\"text/javascript\\\" src=\\\"\".APPBASE.\"html/_js/\".$file.\"\\\"></script>\\n\";\n}", "title": "" }, { "docid": "71d311cf28e18ff4b9c895580485504f", "score": "0.53747976", "text": "function js_exist(string $name = ''): bool\n {\n return file_exists(js_path($name));\n }", "title": "" }, { "docid": "85d90967f6986c1402cbd88f23f48bd6", "score": "0.5373007", "text": "function load_scripts($path, $flags=0)\n{\n\t$wildcard_i = strcspn($path, '*?');\n\tif ($wildcard_i < strlen($path))\n\t{\n\t\tif (strpos($path, '/', $wildcard_i + 1) !== FALSE)\n\t\t\tdie('Can\\'t handle wildcards in parent components.');\n\n\t\t$pattern = basename($path);\n\t\t$path = dirname($path);\n\t}\n\telse $pattern = '*.js';\n\n\tforeach (list_dir($path, $pattern, ListDirPathType::RELATIVE_TO_SITE_ROOT, $flags) as $file)\n\t\tload_script($file);\n}", "title": "" }, { "docid": "fc28c3b9e01057e1ac9f38e22e0597f7", "score": "0.5366317", "text": "function readJSSourceFile($file) {\n global $jsRoot;\n\n return file_get_contents($jsRoot . DIRECTORY_SEPARATOR . $file);\n}", "title": "" }, { "docid": "8aee42b5cf4decb86ee115670d29c8f3", "score": "0.5363634", "text": "public static function includeScripts() {\n foreach (self::$scripts as $path) {\n printf('<script type=\"text/javascript\" src=\"%s\"></script>', $path);\n }\n }", "title": "" }, { "docid": "e1ea1940de0666ca6b935261a90c3ae9", "score": "0.5362169", "text": "private function base_url_for_js()\n {\n }", "title": "" }, { "docid": "6effc3083f76baeff7abe974e5ea9f57", "score": "0.53613436", "text": "function acquirer_scripts() {\n $jsFilePath = glob( get_template_directory() . '/js/build/app.min.*' );\n $jsFileURI = get_template_directory_uri() . '/js/build/' . basename($jsFilePath[0]);\n wp_enqueue_script( 'site_main_js', $jsFileURI , null , null , true );\n}", "title": "" }, { "docid": "e1ea1940de0666ca6b935261a90c3ae9", "score": "0.536085", "text": "private function base_url_for_js()\n {\n }", "title": "" }, { "docid": "d55985f6d376e8a2481146fb8a37242c", "score": "0.5355952", "text": "public function get_scripts_folder_relative() {\n\t\treturn $this->scripts_folder_relative;\n\t}", "title": "" }, { "docid": "e7ef79818c1523cd67ee5708ba46932c", "score": "0.5354578", "text": "public static function url_js( $script_name = '' ) {\n\t\t\t$url = WPEventsTest::$PLUGIN_DIR_URL . 'assets/js';\n\t\t\tif ( $script_name ) {\n\t\t\t\t$url .= '/' . $script_name . self::SCRIPT_SUFFIX() . '.js';\n\t\t\t}\n\n\t\t\treturn $url;\n\t\t}", "title": "" }, { "docid": "09345553ec78156271b13d20f66bfde5", "score": "0.53410196", "text": "protected static function _directoryJs( $path, $return=array() )\n\t{\n\t\t$path = rtrim( $path, '/' );\n\t\t$contents = array();\n\t\t\n\t\tforeach ( new \\DirectoryIterator( $path ) as $file )\n\t\t{\n\t\t\tif ( $file->isDot() || mb_substr( $file->getFilename(), 0, 1 ) === '.' )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $file->isDir() )\n\t\t\t{\n\t\t\t\t$return = static::_directoryJs( $path . '/' . $file->getFileName(), $return );\n\t\t\t}\n\t\t\telse if ( mb_substr( $file->getFileName(), -3 ) === '.js' )\n\t\t\t{\n\t\t\t\t$contents[] = str_replace( \\IPS\\ROOT_PATH, trim( \\IPS\\Settings::i()->base_url, '/' ), $path ) . '/' . $file->getFileName();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count( $contents ) )\n\t\t{\n\t\t\t/* Check to see if 'ips.{dir}.js' exists and if so, put that first */\n\t\t\t$parentDir = preg_replace( '#^(.*)/([^\\/]+?)$#', '\\2', $path );\n\t\t\t\t\n\t\t\t$reordered = array();\n\t\t\t\t\n\t\t\tforeach( $contents as $url )\n\t\t\t{\n\t\t\t\tif ( mb_strstr( $url, '/' . $parentDir . '/' ) AND mb_strstr( $url, '/' . $parentDir . '/ips.' . $parentDir . '.js' ) )\n\t\t\t\t{\n\t\t\t\t\t$reordered[] = $url;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$return = array_merge( $reordered, array_diff( $contents, $reordered ), $return );\n\t\t}\n\t\t\n\t\t$reordered = array();\n\t\t\n\t\tif ( is_dir( $path ) AND \\file_exists( $path . '/order.txt' ) )\n\t\t{\n\t\t\t$order = \\file( $path . '/order.txt' );\n\t\t\t\n\t\t\tforeach( $order as $item )\n\t\t\t{\n\t\t\t\tforeach( $return as $url )\n\t\t\t\t{\n\t\t\t\t\t$item = trim( $item );\n\t\t\t\t\t\n\t\t\t\t\tif ( mb_substr( $item, -3 ) === '.js' )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( mb_substr( $url, -(mb_strlen( $item ) ) ) == $item )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$reordered[] = $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( mb_substr( str_replace( \\IPS\\Settings::i()->base_url . ltrim( str_replace( \\IPS\\ROOT_PATH, '', $path ), '/' ), '', $url ), 1, (mb_strlen( $item ) ) ) == $item )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$reordered[] = $url;\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\t\n\t\tif ( count( $reordered ) )\n\t\t{\n\t\t\t/* Add in items not specified in the order */\n\t\t\t$diff = array_diff( $return, $reordered );\n\t\t\t\t\n\t\t\tif ( count( $diff ) )\n\t\t\t{\n\t\t\t\tforeach( $diff as $url )\n\t\t\t\t{\n\t\t\t\t\t$reordered[] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $reordered;\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "a90c86c2e115a56eaf919b6eb3fc1ce0", "score": "0.53298396", "text": "public function getRelativeScriptURL() {\n\t\t$scriptURL = $this->path . '/' . $this->script;\n\t\treturn($scriptURL);\n\t}", "title": "" }, { "docid": "1dd2d2becb8df1ffa63affbc73f6540f", "score": "0.5321183", "text": "function js($file) {\r\n\treturn '<script type=\"text/javascript\" src=\"'.HTML_PATH.'/public/js'.$file.'\"></script>'.\"\\n\";\r\n}", "title": "" }, { "docid": "7e19e4787955ee49f379ad7a820673fa", "score": "0.53083235", "text": "protected function _includeViewJs() {\n\t\tif (!$this->autoInclude) {\n\t\t\treturn;\n\t\t}\n\t\t$files = array(\n\t\t\t$this->params['controller'] . '.js',\n\t\t\t$this->params['controller'] . DS . $this->params['action'] . '.js'\n\t\t);\n\n\t\tforeach ($files as $file) {\n\t\t\t$includeFile = JS . $this->options['autoIncludePath'] . DS . $file;\n\t\t\tif (file_exists($includeFile)) {\n\t\t\t\t$this->Html->script(\n\t\t\t\t\tstr_replace(DS, '/', $this->options['autoIncludePath'] . '/' . $file),\n\t\t\t\t\tarray('inline' => false)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "848b9ee51f456448b665194d9e09cdb0", "score": "0.53001845", "text": "public static function getRealPath($path){\n $path=trim($path,\"/\");\n if(!preg_match(\"#\\.php$#\",$path)){\n $path.=\".php\";\n }\n foreach(array_reverse(self::$possiblesPath) as $base){\n $scriptPath = $base.\"/\".$path;\n if(file_exists($scriptPath)){\n return $scriptPath;\n }\n }\n return false;\n }", "title": "" }, { "docid": "f32be88454387b2996eedad862ad2158", "score": "0.52836937", "text": "private function loadFiles()\n {\n $files = Finder::findFiles('*.js', '*.css')->from($this->getOutputDir());\n\n foreach ($files as $file => $fileInfo) {\n $this->files[] = $file;\n }\n }", "title": "" }, { "docid": "ea910d8e781827273d9f79fd88faa0d4", "score": "0.5277137", "text": "public static function javascript_path($source){\n\t\treturn static::asset_paths()->compute_public_path($source, 'javascript_path', array('ext' => 'js'));\n\t}", "title": "" }, { "docid": "ae684a28ac441fa09fa10e218dc9967a", "score": "0.52744025", "text": "public function testBaseUrlIsCorrectingFilePath()\n {\n $baseUrls = array(\n '' => '/file.js',\n '/subdir' => '/subdir/file.js',\n '/sub/sub/dir' => '/sub/sub/dir/file.js',\n );\n\n foreach ($baseUrls as $baseUrl => $val) {\n Zend_Controller_Front::getInstance()->setBaseUrl($baseUrl);\n $helper = new Zym_View_Helper_BaseUrl();\n\n $this->assertEquals($val, $helper->baseUrl('file.js'));\n }\n }", "title": "" }, { "docid": "692412184be9bb759785994c5040f539", "score": "0.5267122", "text": "function okrelative($fn) {\n\t\tif (preg_match('|^[a-z0-9\\040\\-\\_.\\/]+$|i', $fn) && substr($fn, 0, 1) <> ' ' && substr($fn, -1) <> ' ' && strlen($fn) != 0 && $fn[0] != '/') {\n\t\t\treturn true;\n\t\t} else { return false; }\n\t}", "title": "" }, { "docid": "0e9c3f0e68911cce499fa0db49e1fe05", "score": "0.5257959", "text": "public function getBasename();", "title": "" }, { "docid": "0e9c3f0e68911cce499fa0db49e1fe05", "score": "0.5257959", "text": "public function getBasename();", "title": "" }, { "docid": "4cfca7c41f9eb8bfe59ae58c980398a9", "score": "0.52529496", "text": "function get_required_files() {}", "title": "" }, { "docid": "22a4fdbf1766962f2d8bb9031325a483", "score": "0.52499676", "text": "public function get_js_linked()\n {\n // where this module is created. The JavaScript for this module\n // needs YUI libraries for managing the DOM and doing animation.\n // Presumably, the module's own JavaScript resides in sitewide.js.\n return array\n (\n \"yahoo-dom-event.js\",\n \"animation.js\",\n \"sitewide.js\"\n );\n }", "title": "" }, { "docid": "84b3dd1b15b2d15fbf6c74e6006a427e", "score": "0.52498215", "text": "function register_scripts_and_styles() {\n \t\t$this->load_file( self::slug . '-js', '/js/' . self::slug . '.js', true );\n \t\t$this->load_file( self::slug . '-css', '/css/' . self::slug . '.css' );\n\t}", "title": "" }, { "docid": "1831dab06700ab34aceca9f1c9787fb5", "score": "0.5249139", "text": "public function get_javascript_file() {\r\n // Compression is on by default\r\n $compression = false; //true;\r\n\r\n $paths = array( VIEW_PATH . 'js/', LIB_PATH . 'js/' );\r\n\r\n // We can take adding random files if we need to\r\n $javascript_files = func_get_args();\r\n\r\n if ( 0 == count( $javascript_files ) ) {\r\n $javascript_files = $this->_javascript;\r\n } else {\r\n $compression = false;\r\n }\r\n\r\n $files = array();\r\n\r\n // Find the CSS files and combine them\r\n foreach ( $javascript_files as $file ) {\r\n foreach ( $paths as $path ) {\r\n $full_path = $path . $file . '.js';\r\n \r\n // Make sure it exists\r\n if ( is_file( $full_path ) )\r\n $files[] = $full_path;\r\n }\r\n }\r\n\r\n // Get the cache path\r\n $cached_file = md5( implode( '|', $files ) ) . '.js';\r\n $cached_file_path = CACHE_PATH . 'js/' . $cached_file;\r\n\r\n // If a cache does not exist, create it, otherwise, read it\r\n if ( !LIVE || !file_exists( $cached_file_path ) ) {\r\n // Declare variables\r\n $js = '';\r\n\r\n // Combine the JS\r\n foreach ( $files as $file ) {\r\n $js .= file_get_contents( $file );\r\n }\r\n\r\n if ( $compression )\r\n $js = compress::javascript( $js );\r\n\r\n // Write to file\r\n if ( $fh = fopen( $cached_file_path, 'w' ) ) {\r\n fwrite( $fh, $js );\r\n fclose( $fh );\r\n }\r\n }\r\n\r\n return $cached_file;\r\n }", "title": "" }, { "docid": "52b6e101fdfea154bc2a1106c343e0cb", "score": "0.52407783", "text": "function myRealPath($path) {\n // if it isnt concat with script path\n if (strpos($path,\"/\") !== 0) {\n $base=dirname($_SERVER['SCRIPT_FILENAME']);\n $path=$base.\"/\".$path;\n }\n \n // canonicalize\n $path=explode('/', $path);\n $newpath=array();\n for ($i=0; $i<sizeof($path); $i++) {\n if ($path[$i]==='' || $path[$i]==='.') continue;\n if ($path[$i]==='..') {\n array_pop($newpath);\n continue;\n }\n array_push($newpath, $path[$i]);\n }\n $finalpath=\"/\".implode('/', $newpath);\n\n // check then return valid path or filename\n if (file_exists($finalpath)) {\n return ($finalpath);\n }\n else return FALSE;\n }", "title": "" }, { "docid": "2aca62e28a6a017392ab33c00d482ec6", "score": "0.5226872", "text": "public function getThemeJSDir() : string {\n if ($this->isThemeLoaded()) {\n $loadedTheme = $this->getTheme();\n\n return 'assets/'.$loadedTheme->getDirectoryName().'/'.$loadedTheme->getJsDirName();\n }\n\n return '';\n }", "title": "" }, { "docid": "0f28fae5e32b45a617736eb004678035", "score": "0.52226657", "text": "function libraries_folder($script = '')\n {\n $filename = TEMPLATEPATH . '/libraries/' . trim($script, '/');\n\n return $filename;\n }", "title": "" }, { "docid": "b092ee1b128003eaf3f71f09bda7e33d", "score": "0.5220639", "text": "public function getPathToMinified($file);", "title": "" }, { "docid": "d8532a5fe1ca2bc52e0f24997bdc581b", "score": "0.5214299", "text": "public function testGetPath()\n {\n\n $theme = Theme::load('test');\n $assetClass = new Asset($theme);\n $themeDir = $theme->getPath();\n\n // Direct paths\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/script1.js'),\n $assetClass->getFilePath('js/script1.js')\n );\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/script1.js'),\n $assetClass->getFilePath('/js/script1.js')\n );\n\n // Direct path to a directory\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/subdir'),\n $assetClass->getFilePath('/js/subdir')\n );\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/subdir'),\n $assetClass->getFilePath('/js/subdir/')\n );\n\n // Relative paths\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/script2.js'),\n $assetClass->getFilePath('./js/script2.js')\n );\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/script2.js'),\n $assetClass->getFilePath('/js/subdir/../script2.js')\n );\n\n // Missing file, but valid directory (allows for new files)\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/missing.js'),\n $assetClass->getFilePath('/js/missing.js')\n );\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/missing.js'),\n $assetClass->getFilePath('js/missing.js')\n );\n\n // Missing file and missing directory (new directories are created as needed)\n $this->assertEquals(\n str_replace('/', DIRECTORY_SEPARATOR, $themeDir . '/assets/js/missing/missing.js'),\n $assetClass->getFilePath('/js/missing/missing.js')\n );\n\n // Ensure we cannot get paths outside of the assets directory\n $this->assertFalse(\n $assetClass->getFilePath('../../../../js/helpers/fakeDom.js')\n );\n $this->assertFalse(\n $assetClass->getFilePath('../content/html-content.htm')\n );\n $this->assertFalse(\n $assetClass->getFilePath('../../../../../config/database.php')\n );\n }", "title": "" }, { "docid": "55f6bd44ca82fcbdb70f8d7ebcbec576", "score": "0.5211402", "text": "function getJsPath() {\n\t\t$plugin =& $this->getMarkupPlugin();\n\t\treturn $plugin->getJsPath();\n\t}", "title": "" }, { "docid": "c50d025d00f3a05e20fbb51c57ecbd8e", "score": "0.5205732", "text": "public function enqueue_gulp_hashed_scripts() {\n\t\t$dirJS = new DirectoryIterator( untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/assets/dist/js');\n\n\t\tforeach ($dirJS as $file) {\n\n\t\t\tif (pathinfo($file, PATHINFO_EXTENSION) === 'js') {\n\t\t\t $fullName = basename($file);\n\t\t\t $name_arr = explode(\"-\", $fullName, 2);\n\t\t\t $name = $name_arr[0];\n\t\t\t \n\t\t\t switch($name) {\n\n\t\t\t case 'app':\n\t\t\t $deps = array('jquery');\n\t\t\t break;\n\n\t\t\t default:\n\t\t\t $deps = null; \n\t\t\t break;\n\n\t\t\t }\n\n\t\t\t wp_enqueue_script( $name, plugins_url( '/assets/dist/js/' . $fullName, __FILE__ ), $deps, null, true );\n\t\t\t\twp_localize_script( $name, 'mhshop_' . $name, array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "fb05b665d698b688a5bab687ec7033be", "score": "0.520241", "text": "protected function generateCombinedJsFile()\n {\n $path = $this->getCachePath($this->getCombinedJsFilename());\n $scripts = $this->getScripts();\n\n $fp = fopen($path, 'w');\n\n foreach($scripts as $script) {\n if ( ! is_file($script['path']) || ! ($contents = file_get_contents($script['path']))) {\n continue;\n }\n\n fwrite($fp, $contents . PHP_EOL);\n }\n\n fclose($fp);\n }", "title": "" }, { "docid": "3f39db824f97f3b004de39e430146758", "score": "0.5198421", "text": "protected function getScriptPath()\n {\n $script = null;\n\n $traces = debug_backtrace();\n $file = __FILE__;\n\n for ($i = 0; $i < count($traces) && $file == __FILE__; ++$i)\n {\n $file = $traces[$i]['file'];\n }\n\n if (!is_file($file))\n {\n throw new RuntimeException('The script name from the traces is not valid: '.$file);\n }\n\n return $file;\n }", "title": "" }, { "docid": "966f9e44fe4ff0a82457a442882bc93a", "score": "0.5196995", "text": "function outputJavascriptIncludes() \n {\n // BC support - currently 1 project still relies on this.. (MO portal)\n $ff = HTML_FlexyFramework::get();\n $o = isset($ff->Pman_Core) ? $ff->Pman_Core : array();\n if (isset($o['packseed'])) {\n return $this->outputJavascriptIncludesBC();\n }\n \n \n $mods = $this->modulesList();\n \n \n $is_bootstrap = in_array('BAdmin', $mods);\n \n foreach($mods as $mod) {\n // add the css file..\n \n if ($is_bootstrap) {\n if (!file_exists($this->rootDir.\"/Pman/$mod/is_bootstrap\")) {\n echo '<!-- missing '. $this->rootDir.\"/Pman/$mod/is_bootstrap - skipping -->\";\n continue;\n }\n \n }\n \n $this->outputJavascriptDir(\"Pman/$mod/widgets\", \"*.js\");\n $this->outputJavascriptDir(\"Pman/$mod\", \"*.js\");\n \n }\n \n if (empty($this->disable_jstemplate)) {\n // and finally the JsTemplate...\n echo '<script type=\"text/javascript\" src=\"'. $this->baseURL. '/Core/JsTemplate\"></script>'.\"\\n\";\n }\n \n $this->callModules('outputJavascriptIncludes', $this);\n return '';\n }", "title": "" }, { "docid": "1e12110ad6b1257fa9369e2e2098172f", "score": "0.5192906", "text": "function js_asset_url($path = NULL, array $params = NULL)\n{\n $isJs = true;\n // $useMin = isProduction();\n $useMin = js_asset_min();\n $prefix = 'scripts/';\n if ($useMin) {\n $ext = '.' . get_package()->version . '.min.js';\n } else {\n $ext = '.js';\n }\n $filename = $path;\n\n\n return site_url('assets/' . $prefix . $filename . $ext, $params);\n}", "title": "" }, { "docid": "75c920e9216d21bce09e241d709d3afb", "score": "0.519105", "text": "private function includeJS($fname){\n array_push($this->js, sprintf('<script type=\"text/javascript\" src=\"%s\"/></script>',$fname));\n }", "title": "" }, { "docid": "4950da11e28c31ce1f9caaf74a8f27b3", "score": "0.51806855", "text": "public function getBasename(): string;", "title": "" }, { "docid": "0ddcce9381ef7845241381f49e9cc8dd", "score": "0.51706845", "text": "function get_include_path() {}", "title": "" }, { "docid": "1e96771bd138e52ed109fefb65a6db28", "score": "0.5164213", "text": "abstract public function registerJSFile(string $filePath, int $position = self::POSITION_HEAD, array $props = array()): bool;", "title": "" }, { "docid": "b34840c3fbda148830f2c821c1fd6ed6", "score": "0.5153982", "text": "private static function loadFiles()\n {\n foreach (self::$fileMap as $fileName => $filePath) {\n if (file_exists($filePath)) {\n require_once $filePath;\n }\n }\n }", "title": "" }, { "docid": "35414eaf4064d4e300be48ff3f6325a7", "score": "0.5150927", "text": "public function getLoadedJSFiles()\n {\n return $this->JSFiles;\n }", "title": "" }, { "docid": "6ee4a696cd41e8fb036e3085941848ad", "score": "0.5148966", "text": "function get_included_files() {}", "title": "" }, { "docid": "47feadfeda966722dd86b9560ddf5490", "score": "0.51362514", "text": "function css_folder($script = '', $basepath = false)\n {\n if ($basepath)\n {\n $filename = TEMPLATEPATH . '/assets/css/' . trim($script, '/');\n }\n else\n {\n $filename = get_template_directory_uri() . '/assets/css/' . trim($script, '/');\n }\n return $filename;\n }", "title": "" }, { "docid": "c7bf438bcfd861311966aa6c638da59d", "score": "0.5130521", "text": "function getJSDependencies()\n {\n $factory = \\NDB_Factory::singleton();\n $baseURL = $factory->settings()->getBaseURL();\n $deps = parent::getJSDependencies();\n return array_merge(\n $deps,\n array(\n $baseURL . \"/media/js/mediaIndex.js\",\n )\n );\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "052edc379f178da3bc9936ef223b6ef8", "score": "0.64856714", "text": "public function remove() {\n Storage::disk('public')->delete($this->getPath());\n $this->delete(); //Remove db record\n }", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "5881486a94aded91c41895b5d1b51444", "score": "0.6238561", "text": "public function delete($resource) {\r\n\t\t\t\r\n\t\t$url = $this->_path . '/api/v2' . $resource;\r\n\t\t\r\n\t\t$curl = curl_init();\r\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\r\n\t\t$headers = substr($response, 0, $header_size);\r\n\t\t$body = substr($response, $header_size);\r\n\t\tself::http_parse_headers($headers);\t \r\n\t\tcurl_close ($curl);\r\n\t\tif ($http_status == 204) {\r\n\t \treturn $http_status . ' DELETED';\r\n\t\t } else {\r\n\t\t \t$this->error($body, $url, null, 'DELETE');\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "ece2955e505228c5979763b54ea0ee46", "score": "0.6066214", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void\n {\n $hash = $this->hash($right, $resource, $user, $parentResource);\n $this->storage->remove($hash);\n }", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.5802033", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "818914cdd28df643181e6a2330bc11c4", "score": "0.5789049", "text": "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 }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "d1f7c96fed94f01bef33d5bc03b96940", "score": "0.5735748", "text": "public function hardDelete();", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "40f1e1a14810f5eceacb200ffe7aeb20", "score": "0.5696079", "text": "public function destroy(Request $request)\n {\n $slider=Slider::where('id', '=', $request->id)->first();\n if($slider!=null){\n $mi_imagen = public_path().'/'.$slider->url;\n unlink($mi_imagen);\n $slider->delete();\n return 1;\n }else{\n return 0;\n }\n// Lo eliminamos de la base de datos\n\n\n\n }", "title": "" }, { "docid": "60a2181c36b7592447d90a90fcadbe74", "score": "0.5695835", "text": "public function delete($record) {\n $this->fileDataSource->delete($this->resourceName, $record->id);\n $this->afterDelete($record);\n }", "title": "" }, { "docid": "7ef5024136aac86c4c004ee1e7edea43", "score": "0.56815386", "text": "public function drop(): void {\n $disk = Storage::disk($this->scope);\n if ($disk->exists($this->filepath)) {\n $disk->delete($this->filepath);\n }\n }", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "af7a37a01e344ca75b406caaaa916b45", "score": "0.56741655", "text": "private function removeOldIcon($resource)\n {\n $icon = $resource->getIcon();\n\n if ($icon->getIconType()->getIconType() == IconType::CUSTOM_ICON) {\n $pathName = $this->container->getParameter('claroline.param.thumbnails_directory')\n . DIRECTORY_SEPARATOR . $icon->getIconLocation();\n if (file_exists($pathName)) {\n unlink($pathName);\n }\n }\n }", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "ea306158775b698c5435960d49c257ab", "score": "0.56042147", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "13866f5828119bb8aae429440b86e949", "score": "0.55884856", "text": "public function destroy($id)\n {\n\n $imga = Image::find($id);\n Storage::disk('public')->delete('img/' . $imga->src);\n $imga->delete();\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24ef05d1335abf0bd48387e294875133", "score": "0.5576293", "text": "public function delete($fireStorageEvents = true);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "2d72bcdac1bcdd14301b9a6ad301fae7", "score": "0.5572793", "text": "public function actionPatientremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/patient';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "65ec7f8ef3c165ae2d123008792c4d10", "score": "0.55707175", "text": "public function delete()\n {\n \\File::delete([\n $this->path,\n $this->thumbnail_path,\n\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "ead6a9412215d17945f8769860e1b262", "score": "0.5569038", "text": "public function remove($file) {\n\t\t$this->emitCache('put', $file);\n\t\tparent::remove($file);\n\t}", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "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 }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
a1e5c604504c7334f16fdbb3056e13e1
to view editorial board page
[ { "docid": "ff3769e8fa80c082d47e13ef71499f22", "score": "0.85118985", "text": "public function editorial_board(){\n\t\t// set title\n\t\t$this->session->set_userdata('title','Editorial board');\n\t\t//get editorial board list\n\t\t$editorial_list = $this->AdminModel->get_editorial_list();\n\n\t\t$this->load->view('start_page_editorial_board',['editorial_list'=>$editorial_list]);\n\t}", "title": "" } ]
[ { "docid": "de2d070d5df90bc8a90fbf051725c9a4", "score": "0.6817364", "text": "public function editorDashboard()\n { \n if($this->userSession->checkEditor()) {\n $posts = $this->postDAO->getPosts();\n } else {\n $this->userSession->redirection();\n }\n require '../Views/admin/editorDashboard.php';\n }", "title": "" }, { "docid": "16a60ddcb40d2f33c55557a2ca1635e8", "score": "0.66940737", "text": "public function view()\n {\n\tinclude_once 'Modules/Chatroom/classes/class.ilChatroom.php';\n\n\tilChatroom::checkUserPermissions( 'read', $this->gui->ref_id );\n\n\t$this->gui->switchToVisibleMode();\n\n\tself::_checkSetup();\n\n\t$this->editSmiliesObject();\n }", "title": "" }, { "docid": "2003eb3abdf5540db2dd73464e76a433", "score": "0.66699654", "text": "function editView ()\n {\n //init configs\n $cfg = new CFG\\Config();\n\n //start html\n ?>\n <!DOCTYPE html>\n <html>\n <head>\n <title>Web Sheets</title>\n </head>\n <body>\n\n <h1><a href=\"index.php\">Web Sheets</a>: </h1><div>Sheet name </div>\n <!--Edit Url-->\n <h2>Edit URL: </h2>\n <textarea rows=\"1\" cols=\"53\" readonly><?php echo $cfg::BASE_URL . \"c=main&m=landing\"; ?>\n </textarea>\n \n <!--Read Url-->\n <h2>Read URL: </h2> \n <textarea rows=\"1\" cols=\"53\" readonly><?php echo $cfg::BASE_URL . \"c=main&m=landing\"; ?>\n </textarea>\n \n <!--File Url-->\n <h2>File URL: </h2> \n <textarea rows=\"1\" cols=\"53\" readonly><?php echo $cfg::BASE_URL . \"c=main&m=landing\"; ?>\n </textarea>\n </body>\n </html>\n <?php\n //end html\n }", "title": "" }, { "docid": "080a7a3c268e0f492e229fa1105c812d", "score": "0.6668725", "text": "function actionViewEditor()\r\n {\r\n $this->phpTree = ProjectEditor::php_file_tree(APP_DIRECTORY, '/projectEditor/list_file/?file=[link]');\r\n $this->view();\r\n }", "title": "" }, { "docid": "7c5035b9f45a29a5724fda5462dee8f6", "score": "0.6661435", "text": "public function show()\n {\n // the board string is used in the view\n $data = $this->getBoardAsString();\n require VIEW_PATH.'console.php';\n }", "title": "" }, { "docid": "35212dde7507f921722194f99bebd8fb", "score": "0.6604212", "text": "public function action_index()\n\t{\n\t\t$view = View::factory('leaderboard');\n\t\t$view->boards = DB::select('community')->from('leaderboards')->group_by('community')->execute()->as_array();\n\t\t$this->template->content = $view;\n\t}", "title": "" }, { "docid": "064e07221665141e35c28f197ededb39", "score": "0.6600743", "text": "public function indexAction() {\n\t$this->view->contents = $this->_help->getContentAdmin($this->_getParam('page'));\n\t}", "title": "" }, { "docid": "9da3dbbce42bcc3e1b00adadd7579c31", "score": "0.6564868", "text": "function board_list() {\n\tglobal $core, $document, $db;\n\t$query = $db->make_query(\"boards\");\n\t$query->set_order(\"board_order ASC\");\n\t$boards_object = $query->execute();\n\n\t$document->append_template(\"simple_template\",array('title'=>\"Board List\",'text'=>\"All boards on this website\"));\t\n\t$listhtml = '<a href=\"$siteurl/admin.php/boards/add\">Add new board</a><br/><br/>';\n\n//Fetch all boards from database\n\twhile($board = $boards_object->fetch_assoc()) {\n\t\t$listhtml .= $document->get_template(\"admin_board_item\",$board);\n\t}\n\n\t//Make pretty\n\t$listhtml = $document->get_template(\"admin_board_list\",array('boards'=>$listhtml));\n\t$document->append_template(\"window\",array('title'=>\"Boards\",'content'=>$listhtml));\n}", "title": "" }, { "docid": "390133d5340c735850956063788a2b46", "score": "0.6554176", "text": "function preview() {\n\n\t\t$this->authentication->is_admin_logged_in(true);\n\n\t\t$this->mcontents['title'] \t\t= 'View Sitepage';\n\t\t$this->mcontents['selected_tab']\t= 'sitepage';\n\t\t$this->mcontents['page_heading']\t= 'View Sitepage';\n\t $page_id \t\t\t\t\t\t\t= $this->uri->segment(3);\n\n\t if( !is_numeric($page_id) ) {\n\n\t $this->session->set_flashdata (\"error_message\",\"No sitepage found\");\n\n\t }else{\n\n\t\t $this->mcontents['site_page']\t\t= $this->sitepage_model->getSingleSitepage($page_id);\n\t\t if( empty($this->mcontents['site_page']) ) {\n\n \t $this->session->set_flashdata (\"error_message\",\"No sitepage found\");\n\t\t }\n\n\t }\n\n\t\tloadAdminTemplate('page/view_sitepage');\n\t}", "title": "" }, { "docid": "c6e6ca4b371a5605311493df3112c297", "score": "0.6525824", "text": "public function index()\n {\n $contents = DB::table('free_boards')->paginate(10);\n return view('free_board.freeBoard',['contents'=>$contents]);\n }", "title": "" }, { "docid": "d51d64b31051521244289b6035787878", "score": "0.6503333", "text": "public function show(Board $board)\n {\n //\n }", "title": "" }, { "docid": "d465a62faa9d9487429348b673a1e675", "score": "0.64245933", "text": "function index()\n {\n $this->_view_edit('view');\n }", "title": "" }, { "docid": "5b114205be38bf20e344da8d8b2b1343", "score": "0.63929874", "text": "public function index()\n {\n $editor = EditorModel::all();\n $i=0;\n return view('admin.editor.index',compact('editor', 'i'));\n }", "title": "" }, { "docid": "06279c8854c73f98543268b28bf3fae9", "score": "0.6331667", "text": "function onView () {\n\n switch (parent::getAction()) {\n case \"edit\":\n if (Context::hasRole(\"pinboardMap.edit\")) {\n $this->printEditView();\n }\n break;\n case \"createPinboard\":\n case \"newPinboard\":\n \tif (Context::hasRole(\"pinboardMap.create\")) {\n \t\t$this->printNewPinboardView();\n \t}\n break;\n default:\n \tif (parent::param(\"hide\"))\n \t\tbreak;\n $this->printMainView();\n }\n }", "title": "" }, { "docid": "6560b548753110a6fb7bf1fdf5457d1c", "score": "0.62902945", "text": "function preview()\n\t{\n\t\t$this->ctrl->setCmdClass(\"ilLMPageGUI\");\n\t\t$this->ctrl->setCmd(\"preview\");\n\t\t$this->executeCommand();\n//\t\t$this->setTabs();\n\t}", "title": "" }, { "docid": "0bfe89e99f43c3f22f36d6269329a4e0", "score": "0.62613267", "text": "public function indexAction() {\n\n if (!$this->_helper->requireAuth()->setAuthParams('sitevideo_channel', null, 'view')->isValid()) {\n return;\n }\n\n //OPEN TAB IN NEW PAGE\n if ($this->renderWidgetCustom())\n return;\n\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "4b508b9fb54c03a20dd358b95aebdbee", "score": "0.62382865", "text": "public function index() {\n $paginatedBoards = Banca::where('status', Banca::STATUS_PENDING)->paginate(7);\n\n return view('coordinator.boards.index', [ 'boards' => $paginatedBoards ]);\n }", "title": "" }, { "docid": "52c09271294cc064609fce3e1b9d5c0e", "score": "0.6167669", "text": "public function index()\n {\n $boards = Board::latest()->get();\n\n return view('boards.index', compact('boards'));\n }", "title": "" }, { "docid": "be2baa706462ffc41cc7fd49bdc27930", "score": "0.6159976", "text": "function template_wap_boardindex()\n{\n\tglobal $context, $settings, $options, $scripturl;\n\n\t// This is the \"main\" card...\n\techo '\n\t<card id=\"main\">\n\t\t<p><b>', $context['forum_name'], '</b><br /></p>';\n\n\t// Show an anchor for each category.\n\tforeach ($context['categories'] as $category)\n\t\techo '\n\t\t<p><anchor>', $category['name'], '<go href=\"#', $category['id'], '\" /></anchor><br /></p>';\n\n\t// Okay, that's it for the main card.\n\techo '\n\t</card>';\n\n\t// Now fill out the deck of cards with the boards in each category.\n\tforeach ($context['categories'] as $category)\n\t{\n\t\t// Begin the card, and make the name available.\n\t\techo '\n\t<card id=\"', $category['id'], '\">\n\t\t<p><b>', $category['name'], '</b><br /></p>';\n\n\t\t// Now show a link for each board.\n\t\tforeach ($category['boards'] as $board)\n\t\t\techo '\n\t\t<p><anchor>', $board['name'], '<go href=\"', $scripturl, '?board=', $board['id'], '.0;wap\" /></anchor><br /></p>';\n\n\t\techo '\n\t</card>';\n\t}\n}", "title": "" }, { "docid": "7544efaef3114500dd609c03190a96cd", "score": "0.6136885", "text": "public function viewAction()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0d22a1ed17592dee9b4b4cedbd740b86", "score": "0.6114748", "text": "public function index(){\n $boards = boards::orderBy('created_at', 'desc')->get();\n return view('bbs.boards', ['boards' => $boards]);\n }", "title": "" }, { "docid": "22f5b38a4dc102bf848219f629d7bf42", "score": "0.6111783", "text": "public function index()\n {\n\n $this->title = 'News editor';\n\n $news = $this->getNews();\n\n $this->content =view(env('THEME').'.admin.content.news_content')->with(['news'=> $news,'title'=>$this->title])->render();\n\n return $this->renderOutput();\n }", "title": "" }, { "docid": "f77b16a9f29908d51cd86f5b86ea2a91", "score": "0.6099694", "text": "public function actionIndex()\n {\n $board = new Board();\n $board->name = 'd';\n $board->description = 'd';\n $v = $board->save();\n var_dump($v);\n }", "title": "" }, { "docid": "8d3551aa8be5756a1d5bda4eca26cb30", "score": "0.606686", "text": "public function action_board($id)\r\n\t{\r\n\t\t$forum = Forum::find($id);\r\n\r\n\t\tif (!$forum)\r\n\t\t{\r\n\t\t\treturn Redirect::to('forum');\r\n\t\t}\r\n\r\n\t\t$data = array(\r\n\t\t\t'forum' => $forum,\r\n\t\t\t'threads' => Thread::where_forum_id($id)\r\n\t\t\t\t->order_by('updated_at', 'desc')\r\n\t\t\t\t->get()\r\n\t\t);\r\n\r\n\t\t$view = View::of_default()->nest('body', 'forum.board', $data);\r\n\t\t$view->title = $data['forum']->name;\r\n\r\n\t\treturn $view;\r\n\t}", "title": "" }, { "docid": "4c39593e92cf9d4b3e87e0586cb82c34", "score": "0.60099256", "text": "function view_default() {\r\n\tglobal $pec_localization, $pec_session;\r\n\t\r\n $area_data = array();\r\n $area_data['title'] = str_replace('{%VERSION%}', PEC_VERSION, $pec_localization->get('LABEL_GENERAL_WELCOMETITLE'));\r\n \r\n $area_data['content'] = '\r\n \t<div class=\"float_left\">\r\n ';\r\n \r\n // Overview Start\r\n $area_data['content'] .= '\r\n\t \t<div class=\"options_box_2\" style=\"width: 350px;\">\r\n\t \t\t<h3>' . $pec_localization->get('LABEL_OVERVIEW') . '</h3>\r\n\t \t\t<table class=\"overview_table\" cellspacing=\"0\">\r\n\t \t\t\t<tbody>';\r\n \r\n if ($pec_session->get('pec_user')->get_permission('permission_articles') > PERMISSION_NONE) {\r\n\t\t$article_count = count(PecArticle::load());\r\n\t $area_data['content'] .= '\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column thin_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=articles\">' . $article_count . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=articles\">' . $pec_localization->get('LABEL_GENERAL_ARTICLES') . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>';\r\n }\r\n \r\n if ($pec_session->get('pec_user')->get_permission('permission_texts') > PERMISSION_NONE) {\r\n\t\t$text_count = count(PecSidebarText::load());\r\n\t $area_data['content'] .= '\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column thin_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=texts\">' . $text_count . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=texts\">' . $pec_localization->get('LABEL_GENERAL_TEXTS') . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>';\r\n }\r\n \r\n if ($pec_session->get('pec_user')->get_permission('permission_blogposts') > PERMISSION_NONE) {\r\n\t\t$blogpost_count = count(PecBlogPost::load());\r\n \t$area_data['content'] .= '\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column thin_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-posts\">' . $blogpost_count . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-posts\">' . $pec_localization->get('LABEL_GENERAL_BLOGPOSTS') . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>';\r\n }\r\n \r\n if ($pec_session->get('pec_user')->get_permission('permission_blogcomments') > PERMISSION_NONE) {\r\n \t$comments = PecBlogComment::load();\r\n\t\t$blogcomment_count = count($comments);\r\n \t$area_data['content'] .= '\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column thin_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-comments\">' . $blogcomment_count . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-comments\">' . $pec_localization->get('LABEL_GENERAL_BLOGCOMMENTS') . '</a>\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>';\r\n }\r\n \r\n $area_data['content'] .= '\r\n\t \t\t\t</tbody>\r\n\t \t\t</table>\r\n\t \t</div>\r\n ';\r\n // Overview End\r\n \r\n // Latest Comments Start\r\n $area_data['content'] .= '\r\n\t \t<div class=\"options_box_2\" style=\"width: 350px;\">\r\n\t \t\t<h3>' . $pec_localization->get('LABEL_OVERVIEW_LATESTCOMMENTS') . '</h3>\r\n\t \t\t<table class=\"overview_table\" cellspacing=\"0\">\r\n\t \t\t\t<tbody>';\r\n \r\n if ($pec_session->get('pec_user')->get_permission('permission_blogcomments') > PERMISSION_NONE) {\r\n \t$comments = array_reverse($comments);\r\n \t$max_count = 3;\r\n \t$count = 0;\r\n \tforeach ($comments as $c) {\r\n \t\tif ($count < $max_count) {\r\n\t \tif (PecBlogPost::exists('id', $c->get_post_id())) {\r\n\t\t $post = $c->get_post();\r\n\t\t $post_title = $post->get_title();\r\n\t\t }\r\n\t\t else {\r\n\t\t $post_title = '-';\r\n\t\t }\r\n\t\t \r\n\t\t $content_cut = strlen($c->get_content()) > 50 ? substr($c->get_content(), 0, 50) . '...' : $c->get_content();\r\n\t\t \r\n\t\t \t$area_data['content'] .= '\r\n\t\t \t\t\t\t<tr class=\"view_row\">\r\n\t\t\t \t\t\t\t<td class=\"normal_column\">\r\n\t\t\t \t\t\t\t\t<h2 class=\"overview_comment_heading\">\r\n\t\t\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-comments&amp;view=edit&amp;id=' . $c->get_id() . '\">' . $c->get_title() . '</a>\r\n\t\t \t\t\t\t\t\t</h2>\r\n\t\t\t \t\t\t\t\t<span class=\"overview_comment_meta\">\r\n\t\t\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_COMMENTS_AUTHOR') . ': ' . $c->get_author() . ' - ' . $pec_localization->get('LABEL_GENERAL_POST') . ': \r\n\t\t\t \t\t\t\t\t\t<a href=\"' . ADMIN_MAIN_FILE . '?' . ADMIN_AREA_VAR . '=blog-posts&amp;view=edit&amp;id=' . $c->get_post_id() . '\">' . $post_title . '</a>\r\n\t\t \t\t\t\t\t\t</span><br />\r\n\t\t\t \t\t\t\t\t<p class=\"overview_comment_content\">' . $content_cut . '</p>\r\n\t\t\t \t\t\t\t</td>\r\n\t\t\t \t\t\t</tr>\r\n\t\t \t';\r\n\t\t \t$count++;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n } \r\n \r\n $area_data['content'] .= '\r\n\t \t\t\t</tbody>\r\n\t \t\t</table>\r\n\t \t</div>\r\n ';\r\n // Latest Comments End\r\n \r\n \r\n $area_data['content'] .= '\r\n \t</div>\r\n \t<div class=\"float_left\" style=\"margin-left: 10px;\">\r\n ';\r\n \r\n $counter_data = get_counter_data();\r\n \r\n $area_data['content'] .= '\r\n \t\t<div class=\"options_box_2\" style=\"width: 350px;\">\r\n\t \t\t<h3>' . $pec_localization->get('LABEL_OVERVIEW_VISITSTATS') . '</h3>\r\n \t\t\t<table class=\"overview_table\" cellspacing=\"0\">\r\n\t \t\t\t<tbody>\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_TODAY') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t' . $counter_data['today'] . '\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_WEEK') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t' . $counter_data['week'] . '\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_MONTH') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t' . $counter_data['month'] . '\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_YEAR') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t' . $counter_data['year'] . '\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t\t<tr class=\"view_row\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\" style=\"border-top: 1px solid #c2c2c2;\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_TOTAL') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\" style=\"border-top: 1px solid #c2c2c2;\">\r\n\t \t\t\t\t\t\t' . $counter_data['all'] . '\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t\t<tr class=\"view_row\" style=\"background: #f2f2f2;\">\r\n\t \t\t\t\t\t<td class=\"normal_column medium_column\">\r\n\t \t\t\t\t\t\t' . $pec_localization->get('LABEL_OVERVIEW_STATS_RECORD') . ':\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t\t<td class=\"normal_column\">\r\n\t \t\t\t\t\t\t' . $counter_data['record'] . ' (' . date('d.m.Y', $counter_data['record_date']) . ')\r\n\t \t\t\t\t\t</td>\r\n\t \t\t\t\t</tr>\r\n\t \t\t\t</tbody>\r\n \t\t\t</table>\r\n \t\t</div>\r\n ';\r\n \r\n $area_data['content'] .= '\r\n \t</div>\r\n \t<div style=\"clear: left;\"></div>\r\n '; \r\n \r\n return $area_data;\r\n}", "title": "" }, { "docid": "34f465c6d9ba47c0de10c8f3c025d109", "score": "0.5996882", "text": "function vShowInsertCompPanel() {\n $page = file_get_contents(\"views/admin/insertCompPanel.html\");\n echo $page;\n}", "title": "" }, { "docid": "4a2159dadb64ae6f95965c6c8e05d3a0", "score": "0.59958714", "text": "public function renderBoards() {\n\t\t// get unread threads\n\t\t$this->readUnreadThreads();\n\t\t\n\t\t// get boards\n\t\t$this->readBoards();\n\n\t\t// assign data\n\t\tWCF::getTPL()->assign('boards', $this->boards);\n\t\tWCF::getTPL()->assign('unreadThreadsCount', $this->unreadThreadsCount);\n\t\t\n\t\t// show newest posts\n\t\tif (BOARD_LIST_ENABLE_LAST_POST) {\n\t\t\t$lastPosts = WCF::getCache()->get('boardData', 'lastPosts');\n\t\t\t\n\t\t\tif (is_array($lastPosts)) {\n\t\t\t\t$visibleLanguages = false;\n\t\t\t\tif (count(WCF::getSession()->getVisibleLanguageIDArray())) {\n\t\t\t\t\t$visibleLanguages = WCF::getSession()->getVisibleLanguageIDArray();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($lastPosts as $boardID => $languages) {\n\t\t\t\t\tforeach ($languages as $languageID => $row) {\n\t\t\t\t\t\tif (!$languageID || !$visibleLanguages || in_array($languageID, $visibleLanguages)) {\n\t\t\t\t\t\t\t$this->lastPosts[$row['boardID']] = new DatabaseObject($row);\n\t\t\t\t\t\t\tcontinue 2;\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\t\n\t\t\tWCF::getTPL()->assign('lastPosts', $this->lastPosts);\n\t\t}\n\t\t\n\t\t// stats\n\t\tif (BOARD_LIST_ENABLE_STATS) {\n\t\t\tWCF::getTPL()->assign('boardStats', WCF::getCache()->get('boardData', 'counts'));\n\t\t}\n\t}", "title": "" }, { "docid": "de36fafe750c98c202e06a61764aaaf8", "score": "0.59900033", "text": "public function show_board($id){\n $project = project::find($id);\n $ended = project_board_items::where('category', 4)->get();\n $inwork = project_board_items::where('category', 3)->get();\n $forlater = project_board_items::where('category', 2)->get();\n $bug= project_board_items::where('category', 1)->get();\n return view('admin.project.board', ['project'=>$project, 'endeds' =>$ended, \"inworks\" =>$inwork, \"forlaters\"=>$forlater,'bugs'=>$bug]);\n }", "title": "" }, { "docid": "96b62003fc5fe2da0bc3b0b169b6be4f", "score": "0.5967743", "text": "function run(){ \n\t\t$this->url .= 'find::CkeditorImageFind::'.$this->field; \n\t\t$data['url'] = $this->url; \n\t\techo $this->view('CkeditorImage',$data);\n\t}", "title": "" }, { "docid": "56a348d43c3db545bcbac808747ed286", "score": "0.595829", "text": "function preview(){\r\n $this->reg->config->set('page_title', 'Preview Post');\r\n\r\n // display content if page could be found\r\n if($this->reg->url->is_set('id')){\r\n\r\n $this->reg->template->assign('preview', $this->model->preview($this->reg->url->get('id')));\r\n }else{\r\n $_SESSION['SYSTEM']['MESSAGES']['error'][] = '<p>The content you requested could not be found. Please try again.</p>';\r\n }\r\n }", "title": "" }, { "docid": "825d43b1c11ad911db5f224d3b86f447", "score": "0.5957694", "text": "public function overview() {\n $data = array();\n $this->load->view('game/overview', $data);\n }", "title": "" }, { "docid": "aab78a9355a94dac07f3006841d9139f", "score": "0.59558773", "text": "public function index()\n\t{\n\t\treturn view('admin/editorials/editorials')\n\t\t\t->with('title', 'Editorials')\n\t\t\t->with('Editorials', Editorial::all());\n\t}", "title": "" }, { "docid": "0f77da4a2e8556dbed76a6e5b4ab5008", "score": "0.59520584", "text": "function tourney_game_page_view($game) {\n return $game->view('full', NULL, TRUE);\n}", "title": "" }, { "docid": "0384e7fd85aab2bacfb3b4e421b7ee07", "score": "0.5948217", "text": "public function edit(Board $board)\n {\n //\n }", "title": "" }, { "docid": "be373a384781952840f89a6272d2f869", "score": "0.594003", "text": "function theEditor(){\n $idChapter = $_GET['idChapter'];\n $adminManager = new AdminManager();\n $post = $adminManager -> editChapter($idChapter);\n require('views/backend/edition.php');\n}", "title": "" }, { "docid": "56f56d6e67d03d0ab68562fa5b7ceb6c", "score": "0.5936722", "text": "function view()\n{\n\tstartOfPage();\n\tusers_renderLoginForm();\n\th1(\"Controllers :\");\n\techo '<a href=\"index.php?option=course&view=list\">';\n\tp(\"Course Controller\");\n\techo '</a>';\n\techo '<a href=\"index.php?option=user&view=list\">';\n\tp(\"User Controller\");\n\techo '</a>';\n}", "title": "" }, { "docid": "342cab15e6aa6e0e5ad2ca330725fbfb", "score": "0.5935996", "text": "public function loadTechLeaderboard()\n {\n $comp_id = getLoggedCompanyID();\n $this->load->model('widgets_model');\n $data['tech_leaderboard'] = $this->widgets_model->loadTechLeaderboard($comp_id);\n $this->load->view('widgets/tech_leaderboard_details', $data);\n }", "title": "" }, { "docid": "a00b11bfac0c54060da05f5465abe01f", "score": "0.59259987", "text": "public function action_view()\n\t{\n\t\t$view = View::factory('player_view');\n\t\t$view->id = $this->request->param('id');\n\t\t$communities_id = DB::select()->from('membership')->where('user','=',$view->id)->execute()->as_array('community','community');\n\t\tif(!empty($communities_id)) {\n\t\t\t$view->communities = DB::select()->from('communities')->where('communities_id','IN',$communities_id)->execute()->as_array();\n\t\t} else {\n\t\t\t$view->communities = array();\n\t\t}\n\t\tif($view->id == $this->user)\n\t\t{\n\t\t\t$view->edit = \"<a href=\\\"\" . URL::base() . \"player/edit/\" . $this->user . \"\\\">Edit your profile</a>\";\n\t\t} else {\n\t\t\t$view->edit = \"\";\n\t\t}\n\t\t$this->template->content = $view;\n\t}", "title": "" }, { "docid": "ae03ac7a0064e73dc03bd7d58eda513c", "score": "0.59135616", "text": "function edit() {\n $this->load->view('includes/header');\n $this->load->view('includes/top_header');\n $this->load->view('includes/left_panel');\n //$this->load->view('article/edit_article');\n $id = $this->uri->segment(3);\n $data['twiter_data'] = $this->twiter_model->sel_data_up($id);\n $this->load->view('twiterseo/edit', $data);\n $this->load->view('includes/footer');\n }", "title": "" }, { "docid": "8729bd64c338a332dce8f0a61b8d823f", "score": "0.59102476", "text": "function developers_theme_preview_controller($page) {\n\tif (!isset($page[0])) {\n\t\tforward('theme_preview/general');\n\t}\n\n\t$pages = array(\n\t\t'general', \n\t\t'navigation', \n\t\t'forms', \n\t\t'objects', \n\t\t'grid', \n\t\t'widgets', \n\t\t'icons',\n\t);\n\t\n\tforeach ($pages as $page_name) {\n\t\telgg_register_menu_item('page', array(\n\t\t\t'name' => $page_name,\n\t\t\t'text' => elgg_echo(\"theme_preview:$page_name\"),\n\t\t\t'href' => \"theme_preview/$page_name\",\n\t\t));\n\t}\n\n\t$title = elgg_echo(\"theme_preview:{$page[0]}\");\n\t$body = elgg_view(\"theme_preview/{$page[0]}\");\n\n\techo elgg_view_page($title, $body, 'theme_preview');\n}", "title": "" }, { "docid": "7e1ab6348e44069262301da31864ce59", "score": "0.5908306", "text": "public function index()\n {\n return view('forum.index', [\n 'boards' => Board::orderBy('order')->get(),\n ]);\n }", "title": "" }, { "docid": "15a433e68766cb82c7d9ef07b212999c", "score": "0.5906804", "text": "function pageBrowser($view) {//view is disbled as command\n\t if (GetReq('editmode'))\n\t $edmode = '&editmode=1';\n\t else\n\t $edmode = null; \t\n\t\t\n\t\t$gr = urlencode(GetReq('g'));\t\t\n\t $p = GetReq('p');\t\n\t\t$pl = GetReq('pl');\t\t\t\n\t\t\n\t\t$view = $view?$view:GetReq('t');//view style is not a command anymore, so t=command\t\t\n\t\t//echo '>',$view; \t\t\n\n\t\t$grouppager = 2;\n $ptext = localize('_PAGE',getlocal()) . \" :\";\n\n if ($this->page>0) {\n\n //initialize page\n\t if (!$p) $p = $this->selpage;\n \n $groupprev = (($p-1) - $grouppager); \n\t\t if ($groupprev<=0) $groupprev = 0;\n\t\t else $markstart = \"...\"; \n\t\t $groupnext = (($p-1) + $grouppager); \n\t\t if ($groupnext>$this->page) $groupnext = $this->page;\n\t\t else $markend = \"...\";\n\n //prev buttons\n\t\t $prevpage = $p-1;\n $data .= seturl(\"t=$view&a=&g=$gr&p=1&pl=$pl\".$edmode, $this->start_b) . \"&nbsp;\";\n\t\t if ($prevpage>0) $data .= seturl(\"t=$view&a=&g=$gr&p=$prevpage&pl=$pl\".$edmode, $this->prev_b);\n\t\t else $data .= $this->prev_b;\n\n $data .= $markstart;\n\t\t $data .= \" \" . $this->outpoint . \" \";\n\n\t\t for ($i=$groupprev; $i<=$groupnext; $i++) {\n $pp = $i+1;\n if ($pp==$p) {\n\t\t\t $data .= seturl(\"t=$view&a=&g=$gr&p=$pp&pl=$pl\".$edmode,\"<B>\" . $pp . \"</B>\") . \"&nbsp;\" . $this->outpoint . \"&nbsp;\";\n\t\t }\n\t\t else {\n $data .= seturl(\"t=$view&a=&g=$gr&p=$pp&pl=$pl\".$edmode,$pp) . \"&nbsp;\" . $this->outpoint . \"&nbsp;\";\t\t\t \n\t\t }\n }\n\t\t $data .= $markend;\n \n //next buttons\n\t\t $nextpage = $p+1;\n\t\t if ($nextpage<=$this->page+1) $data .= seturl(\"t=$view&a=&g=$gr&p=$nextpage&pl=$pl\".$edmode , $this->next_b);\t\n\t\t else $data .= $this->next_b; \n $data .= \"&nbsp;\" . seturl(\"t=$view&a=&g=$gr&p=\" . ($this->page+1) . \"&pl=$pl\".$edmode , $this->end_b );\n\n //buttons browser\n\t\t $mydata[] = $data;\n\t\t $myattr[] = \"left;50%;\";\n\t\t \n\t\t //page length\n\t\t $mydata[] = $this->pagelength();\n $myattr[] = \"center;30%;\";\n\t\t \n //page number\n\t\t $mydata[] = \"$ptext $p / \" . ($this->page+1);\n\t\t $myattr[] = \"right;20%;\";\n\t\t\n\t\t $winb = new window('',$mydata,$myattr);\n\t\t $out = $winb->render(\"center::100%::0::group_dir_title::right::0::0::\");\n\t\t unset ($winb);\n }\n\n\t\treturn ($out);\n }", "title": "" }, { "docid": "cb30ce8bc27c89c9c0c0ed3bb644c1d8", "score": "0.5903491", "text": "function editor(){\n\t\tswitch($this->EditPageNr){\n\t\t\tdefault:\n\t\t\t\t$_SESSION['weS']['EditPageNr'] = $this->EditPageNr = we_base_constants::WE_EDITPAGE_PROPERTIES;\n\t\t\tcase we_base_constants::WE_EDITPAGE_PROPERTIES:\n\t\t\t\treturn 'we_editors/we_editor_properties.inc.php';\n\t\t\tcase we_base_constants::WE_EDITPAGE_IMAGEEDIT:\n\t\t\t\treturn 'we_editors/we_image_imageedit.inc.php';\n\t\t\tcase we_base_constants::WE_EDITPAGE_INFO:\n\t\t\t\treturn 'we_editors/we_editor_info.inc.php';\n\t\t\tcase we_base_constants::WE_EDITPAGE_CONTENT:\n\t\t\t\treturn 'we_editors/we_editor_binaryContent.inc.php';\n\t\t\tcase we_base_constants::WE_EDITPAGE_WEBUSER:\n\t\t\t\treturn 'we_editors/editor_weDocumentCustomerFilter.inc.php';\n\t\t\tcase we_base_constants::WE_EDITPAGE_VERSIONS:\n\t\t\t\treturn 'we_editors/we_editor_versions.inc.php';\n\t\t}\n\t}", "title": "" }, { "docid": "a94f641fe5ca6e3718557369a0127663", "score": "0.59016573", "text": "public function gridAction(){\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('connector/adminhtml_content_cmsPage_grid')\n ->toHtml()\n ); \n }", "title": "" }, { "docid": "137ec2f9581c71f50fdbca77e78f6969", "score": "0.5901579", "text": "function printQuestionsEditor(){\n\t\t\n\t\t$link = connect();\n\t\t\n\t\t$q = \"SELECT * FROM \". QUESTIONS_TABLE;\n\t\t$result = mysql_query($q) or mysql_err($q);\n\n\t\twhile ( $row = mysql_fetch_array($result) ) {\n\t\t \tprintEditor($row);\n\t\t}\n\t}", "title": "" }, { "docid": "3c8d94c11666f4500696d9348f6b69bd", "score": "0.5899393", "text": "public function indexAction()\n {\n /*\n View::render('Home/index.php', [\n 'name' => 'Dave',\n 'colours' => ['red', 'green', 'blue']\n ]);\n */\n if(isset($_POST['name'])){\n // return $this->postHome();\n Post::insertPost();\n $content = $_POST['editor1'];\n\n \n }\n $posts = Post::getAll();\n // View::renderTemplate('Home/index2.php', [\n // 'name' => 'Dave',\n // 'colours' => ['red', 'green', 'blue'],\n // 'posts' => $posts \n // ]);\n\n View::render('Home/index2.php', [\n 'name' => 'Dave',\n 'colours' => ['red', 'green', 'blue'],\n 'posts' => $posts \n ]);\n\n //die($posts[4]['content']);\n }", "title": "" }, { "docid": "9ea341da1d71d3c10e5ba5437183c625", "score": "0.5890591", "text": "function getEditURL()\n {\n return UNL_ENews_Controller::getURL().'?view=preview&id='.$this->id;\n }", "title": "" }, { "docid": "cebec79f67cb7d586ecc815d8f7fb06a", "score": "0.5885325", "text": "public function index_get() {\n // CHECK COOKIES\n if (!$this->session->userdata('uname')) {\n redirect(base_url(), 'location');\n } else {\n if (!$this->session->userdata('cfguser')) {\n $this->BoardInterface->loadCFG($this->session->userdata('uname'));\n $this->load->view('MainBoard', true);\n } else {\n $this->load->view('MainBoard', true);\n }\n }\n }", "title": "" }, { "docid": "92f11915dfb67b1bd9f5885ba692b81c", "score": "0.5884426", "text": "function edit()\n\t{\n//echo \"<br>umschuss\";\n\t\t$this->ctrl->setCmdClass(\"ilLMPageGUI\");\n\t\t$this->ctrl->setCmd(\"edit\");\n\t\t$this->executeCommand();\n\t\t//$this->setTabs();\n\t}", "title": "" }, { "docid": "2f551d1170f85330843460bef8aaea33", "score": "0.588276", "text": "public function index()\n\t{\n\t\t$rows = $this->edit->get_data_sitio();\n\t\t$data = array(\n\t\t\t\"row\"=>$rows,\n\t\t);\n\t\t$extras = array(\n\t\t\t\"css\"=>array(\n\t\t\t\t0 => 'admin/libs/dropify/dropify.min.css'\n\t\t\t),\n\t\t\t\"js\"=>array(\n\t\t\t\t0 => 'admin/libs/dropify/dropify.min.js',\n\t\t\t\t1 => 'admin/js/funciones/funciones_edicion_pagina.js',\n\t\t\t),\n\t\t);\n\t\tlayout('admin/page_edit/page_config',$data,$extras);\n\t}", "title": "" }, { "docid": "e5e40340262c1610b0fd04e613a9ed47", "score": "0.58781606", "text": "public function show(Board $board)\n {\n // todo: implement show() method\n }", "title": "" }, { "docid": "f295e11d3385430dfcbfe9aee06aadcc", "score": "0.5855463", "text": "public function displayBoard() {\n \n\tif ($this->objSecondCard == NULL){\n\t $blnShowCardLink = TRUE;\n\t}\n\telse {\n\t $blnShowCardLink = FALSE;\t \n\t} \n \n for ($i=0; $i<sizeof($this->arrCards); $i++){\n\t\n\t $iModulus = $i % 6;\n\t \n\t if ($iModulus == 0){\n\t \n\t if ($i != 0)\n\t\t echo $this->strRowMarkupEnd.\"\\n\";\n\t\t \n\t\techo $this->strRowMarkupStart.\"\\n\";\n\t \n\t }\n\t \n\t echo $this->strCardMarkupStart;\n\t echo $this->arrCards[$i]->getCardHTML($blnShowCardLink);\n\t echo $this->strCardMarkupEnd.\"\\n\";\t \n\t}\n\t\n\techo $this->strRowMarkupEnd;\n\t\n }", "title": "" }, { "docid": "f9fc2a2e2c887c9f4617b1f8d88ab29d", "score": "0.58476317", "text": "public function index()\n {\n $messagesOnBoard = MessageBoard::where('comment_id', '=', 0)->latest()->get();\n $commentsOnBoard = MessageBoard::where('comment_id', '>', 0)->get();\n return view('messageBoard.index', compact('messagesOnBoard', 'commentsOnBoard'));\n }", "title": "" }, { "docid": "bb78b4d98f2a484afaa338caef34c1aa", "score": "0.5845716", "text": "function gui()\n\t{\n\t\tcheck_specific_permission('view_content_history');\n\n\t\t$member_id=get_param_integer('member_id',-1);\n\t\t$post_id=get_param_integer('post_id',-1);\n\t\t$topic_id=get_param_integer('topic_id',-1);\n\n\t\t$where=array();\n\t\tif ($member_id!=-1)\n\t\t{\n\t\t\t$where['h_owner_member_id']=$member_id;\n\t\t\t$title=get_page_title('POST_HISTORY_MEMBER');\n\t\t}\n\t\tif ($post_id!=-1)\n\t\t{\n\t\t\t$where['h_post_id']=$post_id;\n\t\t\t$title=get_page_title('POST_HISTORY_POST');\n\t\t}\n\t\tif ($topic_id!=-1)\n\t\t{\n\t\t\t$where['h_topic_id']=$topic_id;\n\t\t\t$title=get_page_title('POST_HISTORY_TOPIC');\n\t\t}\n\t\tif (count($where)==0)\n\t\t{\n\t\t\t$where=NULL;\n\t\t\t$title=get_page_title('POST_HISTORY');\n\t\t}\n\n\t\trequire_code('templates_internalise_screen');\n\t\t$test_tpl=internalise_own_screen($title);\n\t\tif (is_object($test_tpl)) return $test_tpl;\n\n\t\t$start=get_param_integer('start',0);\n\t\t$max=get_param_integer('max',40);\n\n\t\t$max_rows=$GLOBALS['FORUM_DB']->query_value('f_post_history','COUNT(*)',$where);\n\n\t\t$posts=$GLOBALS['FORUM_DB']->query_select('f_post_history',array('*'),$where,'ORDER BY h_action_date_and_time DESC',$max,$start);\n\t\t$content=new ocp_tempcode();\n\t\tforeach ($posts as $post)\n\t\t{\n\t\t\t$create_date_and_time=get_timezoned_date($post['h_create_date_and_time']);\n\t\t\t$action_date_and_time=get_timezoned_date($post['h_action_date_and_time']);\n\t\t\t$owner_member=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($post['h_owner_member_id']);\n\t\t\t$alterer_member=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($post['h_alterer_member_id']);\n\n\t\t\t// Action/Link\n\t\t\t$topic_exists=$GLOBALS['FORUM_DB']->query_value_null_ok('f_topics','id',array('id'=>$post['h_topic_id']));\n\t\t\tif (!is_null($topic_exists))\n\t\t\t{\n\t\t\t\tif (($post['h_action']=='EDIT_POST'))\n\t\t\t\t{\n\t\t\t\t\t$relates_to=build_url(array('page'=>'topicview','type'=>'findpost','id'=>$post['h_post_id']),get_module_zone('topicview'));\n\t\t\t\t\t$relates_to->attach('#post_'.strval($post['h_post_id']));\n\t\t\t\t\t$relates_text=do_lang_tempcode('VIEW_POST');\n\t\t\t\t\t$relates_tooltip='post#'.strval($post['h_post_id']);\n\t\t\t\t}\n\t\t\t\telseif (($post['h_action']=='DELETE_POST'))\n\t\t\t\t{\n\t\t\t\t\t$relates_to=build_url(array('page'=>'topicview','id'=>$post['h_topic_id']),get_module_zone('topicview'));\n\t\t\t\t\t$relates_text=do_lang_tempcode('VIEW_TOPIC');\n\t\t\t\t\t$relates_tooltip='topic#'.strval($post['h_topic_id']);\n\t\t\t\t}\n\t\t\t\t$link=hyperlink($relates_to,$relates_text,false,true,$relates_tooltip);\n\t\t\t} else $link=new ocp_tempcode();\n\t\t\t$action=do_lang($post['h_action']);\n\n\t\t\t// Buttons\n\t\t\t$buttons=new ocp_tempcode();\n\t\t\tif (has_specific_permission(get_member(),'delete_content_history')) // Delete permanently\n\t\t\t{\n\t\t\t\t$url=build_url(array('page'=>'_SELF','type'=>'delete','h_id'=>$post['id']),'_SELF',NULL,true);\n\t\t\t\t$buttons->attach(do_template('SCREEN_ITEM_BUTTON',array('_GUID'=>'11c9f9ef4a646493544cb29778134960','IMMEDIATE'=>true,'URL'=>$url,'IMG'=>'delete','TITLE'=>do_lang_tempcode('DELETE_HISTORY_POST'))));\n\t\t\t}\n\t\t\tif ((has_specific_permission(get_member(),'restore_content_history')) && (!is_null($topic_exists)) && ($post['h_action']=='DELETE_POST')) // Restore\n\t\t\t{\n\t\t\t\t$url=build_url(array('page'=>'_SELF','type'=>'restore','h_id'=>$post['id']),'_SELF',NULL,true);\n\t\t\t\t$buttons->attach(do_template('SCREEN_ITEM_BUTTON',array('_GUID'=>'49623e00065f488bb27097bb722232dc','IMMEDIATE'=>true,'URL'=>$url,'IMG'=>'restore','TITLE'=>do_lang_tempcode('RESTORE_HISTORY_POST'))));\n\t\t\t}\n\t\t\tif ((has_specific_permission(get_member(),'restore_content_history')) && (!is_null($topic_exists)) && ($post['h_action']=='EDIT_POST')) // Restore\n\t\t\t{\n\t\t\t\t$url=build_url(array('page'=>'_SELF','type'=>'revert','h_id'=>$post['id']),'_SELF',NULL,true);\n\t\t\t\t$buttons->attach(do_template('SCREEN_ITEM_BUTTON',array('_GUID'=>'3f41d4d399676972c01ebb14f6ee56db','IMMEDIATE'=>true,'URL'=>$url,'IMG'=>'choose','TITLE'=>do_lang_tempcode('REVERT_HISTORY_POST'))));\n\t\t\t}\n\n\t\t\t$content->attach(do_template('OCF_HISTORY_POST',array('_GUID'=>'f3512689a8b3fcf4215f63f9f340cdac','LABEL'=>do_lang_tempcode('BEFORE_ACTION'),'RAND'=>uniqid(''),'LINK'=>$link,'BUTTONS'=>$buttons,'ACTION'=>$action,'ACTION_DATE_AND_TIME'=>$action_date_and_time,'ACTION_DATE_AND_TIME_RAW'=>strval($post['h_action_date_and_time']),'CREATE_DATE_AND_TIME_RAW'=>strval($post['h_create_date_and_time']),'CREATE_DATE_AND_TIME'=>$create_date_and_time,'OWNER_MEMBER'=>$owner_member,'ALTERER_MEMBER'=>$alterer_member,'BEFORE'=>$post['h_before'])));\n\t\t}\n\t\tif ((count($posts)!=0) && ($post_id!=-1))\n\t\t{\n\t\t\t$original_post=$GLOBALS['FORUM_DB']->query_select('f_posts',array('*'),array('id'=>$post_id),'',1);\n\t\t\tif (array_key_exists(0,$original_post))\n\t\t\t{\n\t\t\t\t$action=do_lang('CURRENT');\n\t\t\t\t$link=hyperlink(build_url(array('page'=>'topicview','type'=>'findpost','id'=>$post_id),get_module_zone('topicview')),do_lang_tempcode('VIEW_POST'),false,true);\n\t\t\t\t$buttons=new ocp_tempcode();\n\t\t\t\t$action_date_and_time='';\n\t\t\t\t$action_date_and_time_raw='';\n\t\t\t\t$owner_member=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($original_post[0]['p_poster']);\n\t\t\t\t$alterer_member=new ocp_tempcode();\n\t\t\t\t$before=get_translated_text($original_post[0]['p_post'],$GLOBALS['FORUM_DB']);\n\t\t\t\t$create_date_and_time=get_timezoned_date($original_post[0]['p_time']);\n\t\t\t\t$create_date_and_time_raw=strval($original_post[0]['p_time']);\n\t\t\t\t$content2=do_template('OCF_HISTORY_POST',array('_GUID'=>'a3512689a8b3fcf4215f63f9f340cdac','LABEL'=>do_lang_tempcode('CURRENT_STATUS'),'RAND'=>uniqid(''),'LINK'=>$link,'BUTTONS'=>$buttons,'ACTION'=>$action,'ACTION_DATE_AND_TIME'=>$action_date_and_time,'ACTION_DATE_AND_TIME_RAW'=>$action_date_and_time_raw,'CREATE_DATE_AND_TIME_RAW'=>$create_date_and_time_raw,'CREATE_DATE_AND_TIME'=>$create_date_and_time,'OWNER_MEMBER'=>$owner_member,'ALTERER_MEMBER'=>$alterer_member,'BEFORE'=>$before));\n\t\t\t\t$content2->attach($content);\n\t\t\t\t$content=$content2;\n\t\t\t}\n\t\t}\n\n\t\trequire_code('templates_results_browser');\n\t\t$results_browser=results_browser(do_lang_tempcode('POST_HISTORY'),NULL,$start,'start',$max,'max',$max_rows,NULL,'misc',true);\n\n\t\treturn do_template('OCF_HISTORY_SCREEN',array('_GUID'=>'7dd45ce985fc7222771368336c3f19e4','RESULTS_BROWSER'=>$results_browser,'TITLE'=>$title,'CONTENT'=>$content));\n\t}", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.5841459", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "7d0d125869cd68be617a3fadd08757b9", "score": "0.58404815", "text": "function getShowBoardweb()\n {\n $user = JFactory::getUser();\n $id = $user->id;\n $db = JFactory::getDbo();\n $sqk = \" select id, title from #__tz_pinboard_boards where created_user_id=$id\";\n $db->setQuery($sqk);\n $row = $db->loadObjectList();\n return $row;\n }", "title": "" }, { "docid": "94a4f23586ce76484c4e56de561513d5", "score": "0.58396083", "text": "public function action_index()\n {\n\t\t$this->template->title = 'Uservoice';//Set the title of the page\n $idea = new Model_Idea();//The blank model \n\t\t//Set the view for content box\n $this->template->content = View::factory('home');\n //Similarly set the sidebar for home page\n $this->template->sidebar = View::factory('sidebar/home');\n $this->template->content->ideasRender = View::factory('ideas');//This view renders multiple ideas\n $this->template->content->ideasRender->ideas=$idea->find_all(); //And the data that it will use. \n \n }", "title": "" }, { "docid": "e646441bdcbaac426a6b7b992e2061c7", "score": "0.5834553", "text": "static public function view_page() {\n\t\tinclude( CHIEF_SFC_PATH . 'admin/partials/settings-page.php' );\n\t}", "title": "" }, { "docid": "fc41f25f3fc61ed08f6c22f8e6a4bfe1", "score": "0.58307046", "text": "function mainPage()\n\t{\n\t\t$IsEmpty = $this->ConfigModel->IsEmpty();\n\t\t$Exercises = $this->ConfigModel->getAllExercises();\n\t\t$primera_vez = $this->ConfigModel->primera_vez();\n\t\trequire('views/config/mainpage.php');\n\t}", "title": "" }, { "docid": "1c711402845faafe119343a31104d356", "score": "0.58253354", "text": "public function index(): string\n {\n $adminManager = new BoardManager();\n $boardMembers = $adminManager->selectAll('firstname');\n\n return $this->twig->render('Admin/Board/index.html.twig', ['boardMembers' => $boardMembers]);\n }", "title": "" }, { "docid": "1f10366be472aa474e9eb2bd96485152", "score": "0.58199346", "text": "public function view()\n\t{\n\t}", "title": "" }, { "docid": "1f10366be472aa474e9eb2bd96485152", "score": "0.58199346", "text": "public function view()\n\t{\n\t}", "title": "" }, { "docid": "e37cf055bae317e1e21aff84d0e7ce10", "score": "0.58177966", "text": "public function viewAction()\n {\n $post_id = filter_var($this->route_params['isbn'], FILTER_SANITIZE_NUMBER_INT);\n if($post_id)\n {\n $post = Post::getPostByID($post_id);\n $writer = User::findByID($post->user_id);\n $points = Post::calculatePoints($post->id);\n $book = Book::getBookByISBN($post->isbn);\n $replies = Reply::getRepliesByPostID($post->id);\n View::renderTemplate('Admin/Posts/view.html.twig',\n [\n 'post' => $post,\n 'writer' => $writer,\n 'up_points' => $points[0],\n 'down_points' => $points[1],\n 'book' => $book,\n 'replies' => $replies,\n ]);\n }\n else\n {\n Flash::addMessage('Post specified was not found!', Flash::DANGER);\n $this->redirect('/admin/posts');\n }\n }", "title": "" }, { "docid": "5d672dd4e18354ebc4a62dada5b1e42f", "score": "0.5810849", "text": "public function index()\n\t{\n $this->data['pagebody'] = 'post';\n $this->render();\n\t}", "title": "" }, { "docid": "789fd233cd5fbd8283d9094993c38d27", "score": "0.58090204", "text": "public function view()\n {\n $this->layouter->render(\"contests/view\");\n }", "title": "" }, { "docid": "19b6f3a03d4a2826e181cfabfd93afbc", "score": "0.5806353", "text": "function board_edit($id) {\n\tglobal $core, $document, $db;\n\n\t//Get board to edit\n\t$query = $db->make_query(\"boards\");\n\t$query->add_condition(\"board_id\",\"=\",$id);\n\t$query->set_limit(1);\n\t$boards = $query->execute();\n\t$board = $boards->fetch_assoc();\n\n\t//Get categories\n\t$query = $db->make_query(\"categories\");\n\t$query->set_order(\"category_order ASC\");\n\t$categories_object = $query->execute();\n\t$category_html = \"\";\n\twhile ($category = $categories_object->fetch_assoc()) {\n\t\t$selected = \"\";\n\t\tif ($category['category_id'] == $board['category_id']) { $selected = \"selected=selected\"; }\n\t\t$category_html .= '<option value=\"' . $category['category_id'] . '\" ' . $selected . '>' . $category['category_name'] . '</option>';\n\t}\n\n\t//Main options\n\t$token=make_token();\n\t$_SESSION['token']=$token;\n\t$form = $document->make_form(\"editboard\",\"editboard\",\"/admin.php/boards/edit2\",$token);\n\t$form->start_fieldset(\"options\",\"Editing board: \" . $board[\"board_name\"]);\n\t$form->add_element_only(\"board_id\",\"ID\",\"hidden\",$board[\"board_id\"]);\n\t$form->add_element(\"board_name\",\"Title\",\"text\",$board[\"board_name\"],\"Title of the board\");\n\t$form->add_element(\"category_id\",\"Category\",\"list\",$category_html,\"Category of the board\");\n\t$form->add_element(\"board_description\",\"Content\",\"textarea\",make_safe(\"text\",$board[\"board_description\"]),\"Description of the board\");\n\t$form->end_fieldset();\n\n\t//Other options\n\t$form->start_fieldset(\"moreoptions\",\"Other options\");\n\t$form->add_element(\"board_order\",\"Order\",\"number\",$board[\"board_order\"],\n\t\t\"Ordering of board\");\n\t$form->end_fieldset();\n\n\t//End\n\t$form->append('<div class=\"center\">');\n\t$form->add_element_only(\"submit\",\"Submit\",\"submit\",\"Save\");\n\t$form->append('</div>');\n\t$formhtml = $form->output();\n\n\t$document->append_template(\"title\",array('title'=>\"Admin: Edit Board\"));\n\t$document->append_template(\"window\",array('title'=>\"Edit Board\",'content'=>$formhtml));\n}", "title": "" }, { "docid": "be3d2fddd9c762419da45fdc9e58a782", "score": "0.5802315", "text": "public function index()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_operator_auth();\n\t\t$CI->load->library('lochapter');\n\t\t$CI->load->model('operator/Chapters');\n\n $content = $CI->lochapter->chapter_list();\n $sub_menu = array(\n\t\t\t\tarray('label'=> display('manage_chapter'), 'url' => 'operator/Ochapter', 'class' =>'active'),\n\t\t\t\tarray('label'=> display('add_chapter'), 'url' => 'operator/Ochapter/add_chapter_form')\n\t\t\t);\n\t\t$this->template->full_operator_html_view($content,$sub_menu);\n\t}", "title": "" }, { "docid": "3c0c60a82391aee409b4317a6b96f183", "score": "0.5802169", "text": "public function index()\n {\n return \\view('flickr-editor::editor');\n }", "title": "" }, { "docid": "e5db70e3b960f28eb0fccd23605a4f64", "score": "0.5800894", "text": "function display(){\n\t\t\techo '<h1 align=\"center\">COMP 4711 LAB 1</h1>';\n\t\t\t$tied=$this->tieGame();\n\t\t\tif($this->isWinner || $tied ){\n\t\t\t\t$link = '?board='.'---------';\n\t\t\t\techo '<div align=\"center\"><a href=\"'.$link.'\"><button class=\"button\" align=\"center\">Play Again?</button></a></div>';\n\t\t\t\techo '</br>';\n\t\t\t}\n\t\t\techo '<table cols=\"3\" col width=\"130\" align=\"center\" style=\"font-size:large; font-weight:bold\">';\n\t\t\techo '<tr>';\n\t\t\tfor ($pos=0; $pos<9; $pos++){\n\t\t\t\techo $this->show_cell($pos);\n\t\t\t\tif ($pos%3 ==2)\n\t\t\t\t\techo '</tr><tr>';\t\n\t\t\t}\n\t\t\techo '</tr>';\n\t\t\techo '</table>';\n\t\t}", "title": "" }, { "docid": "246af71ff966bc80b095c1335be4659d", "score": "0.57977235", "text": "public function index()\n {\n $this->locate($this->createLink('issue', 'browse'));\n }", "title": "" }, { "docid": "47bf30efeaf258650651fcf2f598a50c", "score": "0.5792742", "text": "public function show($id) {\n $board = Banca::find($id);\n\n return view('coordinator.boards.show', ['board' => $board]);\n }", "title": "" }, { "docid": "33ee08dfd2b21d2410549c3ba6b7fbbd", "score": "0.57916826", "text": "public function indexAction() {\n \t$this->view->object = jcms\\Frontend::getCurrentObject();\n }", "title": "" }, { "docid": "147a6b82d71b59b7b777a3a2accb73be", "score": "0.57889616", "text": "public function index(){\r\n $this->display();\r\n }", "title": "" }, { "docid": "61130b4303496ff99d293355a7c16024", "score": "0.5780635", "text": "public function show($id) {\n \n try {\n $Board = $this->board->findForView($id);\n if (!$Board) {\n return abort(404);\n }\n $this->data['board'] = $Board;\n return $this->_view('boards.view');\n } catch (\\Exception $ex) {\n return abort(400);\n }\n }", "title": "" }, { "docid": "bb4fd89c4ac8172d6c85b184e0207bbc", "score": "0.57800543", "text": "function editor(){\n\t\tglobal $we_responseText,$we_JavaScript;\n\n\t\tswitch($this->EditPageNr){\n\t\t\tcase WE_EDITPAGE_PROPERTIES:\n return \"we_templates/we_editor_properties.inc.php\";\n\n\t\t\tcase WE_EDITPAGE_INFO:\n return \"we_templates/we_editor_info.inc.php\";\n\n\t\t\tcase WE_EDITPAGE_WEBUSER:\n\t\t\t\treturn \"we_modules/customer/editor_weDocumentCustomerFilter.inc.php\";\n\n\t\t\tcase WE_EDITPAGE_DOCLIST:\n\t\t\t\treturn \"we_doclist/we_editor_doclist.inc.php\";\n\n\t\t\tdefault:\n $this->EditPageNr = WE_EDITPAGE_PROPERTIES;\n $_SESSION[\"EditPageNr\"] = WE_EDITPAGE_PROPERTIES;\n return \"we_templates/we_editor_properties.inc.php\";\n\t\t}\n\t}", "title": "" }, { "docid": "9c0ed88758c18260a881b6c68c896e9e", "score": "0.57799387", "text": "public function showAdminPanel()\n {\n $this->msg = 'Hello Admin';\n $this->p = '';\n $comments = $this->commentManager->getNbCommentAdmin();\n\n require 'view/adminView.php';\n }", "title": "" }, { "docid": "41035ea62f4e78bab2eb31edcb9bfffd", "score": "0.57789594", "text": "public function showIndex()\r\n {\r\n $msg = $this->model->getMsg();\r\n $this->template->assign('page_title','Test title');\r\n $this->template->assign('page_content',$msg);\r\n $this->template->display('layout.tpl');\r\n }", "title": "" }, { "docid": "1fd882fad73dd46377b3d151d46e2462", "score": "0.5775888", "text": "function display()\r\n\t\t{\r\n\t\t\t// We override the JController default display method which expects a view\r\n\t\t\t// named boxoffice. We want a view of 'revues' that uses the 'default' layout. \r\n\t\t\t// Set the view and the model \r\n\t\t\t$view =& $this->getView( JRequest::getVar( 'view', 'revues' ), 'html' );\r\n\t\t\t$model =& $this->getModel( 'revues' ); \r\n\t\t\t$view->setModel( $model, true ); \r\n\t\t\t\r\n\t\t\t// Use the View display method\r\n\t\t\t$view->display(); \r\n\t\t}", "title": "" }, { "docid": "1d9e7a4a2092f93afcf1bc29ea939c02", "score": "0.5770919", "text": "public function index()\n {\n return view('texttools.sudoku',\n ['data' =>\n ['page' => 'texttools']\n ]);\n }", "title": "" }, { "docid": "dd6ee80d7d7385268709bd5188673b21", "score": "0.5768533", "text": "public function index()\n {\n $editoras = Editora::all();\n return view('editoras.index' , ['itens' => $editoras]);\n }", "title": "" }, { "docid": "b2fb80afc5f69826eb84d34a77779e96", "score": "0.57651794", "text": "public function displayBoard($idBoard){\n\n if(!isset($_SESSION)){\n session_start();\n }\n\n if(isset($_SESSION[\"id\"])) {\n\n $user = $_SESSION[\"id\"];\n\n $board = new Board();\n\n $selectBoard = $board->showBoard($idBoard);\n\n $listeManager = new Liste();\n\n $listes= $listeManager->showListes($idBoard);\n\n $cardManager= new Card();\n\n $arrayListe =[];\n\n foreach($listes as $liste){\n $cards=$cardManager->showCards($liste[\"id\"]);\n array_push($liste, $cards);\n array_push($arrayListe, $liste);\n }\n\n $listes=$arrayListe;\n\n\n $this->view(\"board.php\", [\n \"board\" =>$selectBoard,\n \"listes\" => $listes\n ]);\n }\n }", "title": "" }, { "docid": "4badfc9738630bb658839f79fa539686", "score": "0.5761471", "text": "public static function showPage() {\n\t\t\tglobal $wpdb, $connections;\n\n\t\t\t// Set the action if an entry ID was found.\n\t\t\t$action = self::$userID <= 0 ? 'add' : 'edit';\n\n\t\t\tinclude_once CNLNK_BASE_PATH . '/submenus/manage.php';\n\t\t\tconnectionsLinkManage( $action, self::$userID );\n\n\t\t}", "title": "" }, { "docid": "07a124f5f0f38f81e74f004d850979a1", "score": "0.57505614", "text": "public function editor(){\n if ($this->aReg->auth->loggedIn($this->aReg->db)){\n if ($_SESSION['userTypeID'] === 1 || $_SESSION['userTypeID'] === 2 ) {\n $jsArray = $this->aReg->firstJS;\n $ckeditorJS = \"ckeditor/ckeditor.js\";\n // $ckconfigJS = \"ckeditor/config.main.js\";\n $ckconfigJS = \"ckeditor/ckeditor.php\";\n array_push($jsArray, $ckeditorJS, $ckconfigJS);\n $this->aReg->firstJS = $jsArray;\n $NewlastCSS = $this->aReg->lastCSS;\n $ckeditorCSS = PHP_EOL.\"<link rel='stylesheet' type='text/css' href='\".AMS_URL.\"ckeditor/css/neo.css' />\";\n $extraCSS = PHP_EOL.\"<link rel='stylesheet' type='text/css' href='\".AMS_URL.\"ckeditor/css/extra.css' />\";\n $dashcss = PHP_EOL.\"<link rel='stylesheet' type='text/css' href='\".AMS_URL.\"templates/base/static/src/css/dashboard.css' />\";\n array_push($NewlastCSS, $ckeditorCSS, $extraCSS);\n $this->aReg->lastCSS = $NewlastCSS;\n $this->aReg->template->show('editor');\n } else {\n $this->prime();\n }\n } else {\n $this->prime();\n }\n }", "title": "" }, { "docid": "3dfcd14e0b63262b2dedb40f2e0e7442", "score": "0.5750419", "text": "public function display() {\r\n if(!isset($_GET['tab']))\r\n {\r\n $_GET['tab'] = 1;\r\n }\r\n \r\n echo \"viewing: \" . $this->config['tabs'][0][1] . \" <- here\";\r\n $display = new $this->config['tabs'][0][1];\r\n $display->settings();\r\n }", "title": "" }, { "docid": "8dd342c884dac687eeb3aac2d47d3593", "score": "0.5749825", "text": "public function actionViewPage() {\n if (Yii::app()->request->getParam('id')\n && ( $model = WikiPages::model()->findByPk(Yii::app()->request->getParam('id')) )\n && ($revisionModel = WikiPagesRev::model()->find('pageid=:pageid AND revisionid=:revisionid', array(':pageid' => $model->id, ':revisionid' => $model->workingrevision)))) {\n $title = CHtml::encode($model->title);\n $this->pageTitle[] = $title;\n $this->render('show', array('title' => $title, 'model' => $model, 'revisionModel' => $revisionModel));\n } else {\n Functions::setFlash(Yii::t('wiki', 'Sorry, we could not find that page.'));\n $this->redirect(array('/wiki'));\n }\n }", "title": "" }, { "docid": "d20f301681d89b0cbbf10fed8534b5b8", "score": "0.57475454", "text": "private function previewPage()\r\n {\r\n $previewPage = $_GET['url'];\r\n $previewMessage = $_GET['message'];\r\n $this->_template->assign('previewPage', $previewPage);\r\n $this->_template->assign('previewMessage', $previewMessage);\r\n $this->_template->display('./modules/settings/PreviewPage.tpl');\r\n }", "title": "" }, { "docid": "02564dfe5c83287e26a58e9d4c0de016", "score": "0.5740572", "text": "function vShowAdmin() {\n $page = file_get_contents(\"views/admin/adminPanel.html\");\n echo $page;\n}", "title": "" }, { "docid": "8e72941a8df1429d4a22979544ccb155", "score": "0.5738192", "text": "public function indexAction() {\n// $this->view->expeditions = $expeditions->fetchAll();\n }", "title": "" }, { "docid": "2765a72dc080a818cf38ac42003b2a92", "score": "0.57368106", "text": "public function index()\n\t{\n\n\t\t// session_start();\n\n\t\t// $sesh = $_SESSION['oauth_token_secret'];\n\n\t\t// dd($sesh);\n\n\n\t\t// $key = Config::get('trello.api_key');\n\t\t// $secret = Config::get('trello.api_secret');\n\t\t// $trello = new \\Trello\\Trello($key, $secret);\n\n\t\t// $trello->authorize(array(\n\t\t// \t'expiration' => '1hour',\n\t\t// \t'scope' => array(\n\t\t// \t 'read' => true,\n\t\t// \t),\n\t\t// \t'name' => Config::get('trello.app_name'),\n\t\t// \t'success' => 'onAuthorizeSuccessful'\n\t\t// ));\n\n\t\t// function onAuthorizeSuccessful() {\n\t\t// \tdd(\"die!\");\n\t\t// }\n\t\t\n\n\t\t// $boards = $trello->members->get('my/boards');\n\n\t\t// return View::make('index', array(\n\t\t// \t'boards' => $boards,\n\t\t// ));\n\n\t\treturn View::make('index');\n\t}", "title": "" }, { "docid": "42278e3f459ac2cb4376fd733c48beae", "score": "0.57365924", "text": "public function BiayaAdminPage()\n {\n $this->load->view('master/list_biaya_admin');\n }", "title": "" }, { "docid": "6e44048469c4588a1bbb8a804e4a503d", "score": "0.5724869", "text": "function actionPreview()\r\n {\r\n\t\t//so we only need presentation_id here to export\r\n\t\t$pid = $_GET['presentation_id'];\r\n\t\t$modelPres =& new Presentations();\r\n\t\t$row = $modelPres->findByField(\"presentation_id\",$pid);\r\n\t\t//print_r($row);\r\n $smarty =& $this->_getView();\r\n /* @var $smarty Smarty */\r\n $smarty->assign('link_prefix', '../../s5-files/');\r\n $smarty->assign('presentation',$row);\r\n $smarty->display('preview.html');\r\n }", "title": "" }, { "docid": "6c568f17905b1e4180071b7194696e03", "score": "0.57217574", "text": "protected function displayContent(){\n\t\tif(!$_SESSION['userType']||$_SESSION['userType']=='user'){//if only user rights, send to front page\n\t\t\t header('Location: index.php');\n\t\t\texit;\t\n\t\t}else{\n\t\t $this->generated=new Generate();\n\t\t $this->model=new Model();\n\t\t if(isset($_GET['gameStatus'])){\n\t\t\t\t$gameStatus=$this->model->getGameStatus($_GET['gameID']);\n\t\t\t\t$this->changeGameStatus($gameStatus);\t\t\t\t\n\t\t\t\tif($gameStatus==\"accepted\"){\n\t\t\t\t\t$otherStatus=\"pending\";\n\t\t\t\t}else{\n\t\t\t\t\t$otherStatus=\"accepted\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$url='<a href=\"index.php?pageName=admin&gameID='.$_GET['gameID'].\"&amp;gameStatus=\";\n\t\t\t\t\t$url.=$otherStatus;\n\t\t\t\t\t$url.='&amp;js=true\" class=\"buttonImg '.$otherStatus.'\" title=\"';\n\t\t\t\t\t$url.=$otherStatus.': change to '.$gameStatus.'?\">'.$otherStatus.'</a>';\n\t\t\t\t\techo $url;\n\t\t\t\t\texit;\n\t\t\t\t\n\t\t\t\theader('Location: index.php?pageName=admin');\n\t\t\t\t\t\texit;\n\t\t }else if(isset($_GET['userType'])){\n\t\t \t\tif($_GET['userType']=='mod'){\n\t\t\t\t\t$this->model->updateUserType($_GET['userID'], 'mod');\n\t\t\t\t}else{\n\t\t\t\t \t$this->model->updateUserType($_GET['userID'], 'user');\n\t\t\t\t}\n\t\t }\n\t\t if(isset($_GET['edit'])){\n\t\t \t\tif($_GET['edit']=='userReg'){\n\t\t \t\t\t$html=$this->userRegAdmin();\n\t\t \t\t\t//updateUserType\n\t\t \t\t}else{\n\t\t\t\t\t$form=$this->editGameAdmin();\n\t\t\t\t\techo $form;\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(isset($_GET['download'])&&$_GET['download']==\"reg\"){\n\t\t\t\t\t\t$this->getRegCSV();\n\t\t\t\t\t\theader('Location: index.php?pageName=admin');\n\t\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\tif(isset($_GET['download'])&&$_GET['download']==\"games\"){\n\t\t\t\t\t\t$this->getGamesCSV();\n\t\t\t\t\t\theader('Location: index.php?pageName=admin');\n\t\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html.=$this->displayLeftContent(); \t\t\t\t \n\t\t \t\t$html.=$this->displayRightContent();\n $html.='<div class=\"clear\"></div>';\n\t\t \t\t \n\t\t\t} \n\t\t}\t\n\t\t return $html;\n\t }", "title": "" }, { "docid": "5682f7d3fc40915206b56cdc36583eda", "score": "0.57153696", "text": "public function Index() {\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('AKP: Admin KontrollPanel')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(), 'primary')\n ->AddInclude(__DIR__ . '/../adminsidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "title": "" }, { "docid": "2c4792e86d58ab96f72e3de3b2f575a4", "score": "0.57125115", "text": "function instant_ide_site_preview() {\n \n?>\n <div id=\"instant-ide-site-preview-container\"></div>\n<?php\n\t\n}", "title": "" }, { "docid": "df521b63715333158f887f3f2a502dd4", "score": "0.571247", "text": "function editPage() {\n\t\n}", "title": "" }, { "docid": "7fd5dd721165d7e58dfcc8c921d23725", "score": "0.57123727", "text": "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink(static::MODULE_ADMIN_CONTROLLER));\n }", "title": "" }, { "docid": "5f1dcc85b65115559f66d3fd58b909a0", "score": "0.5709933", "text": "public function run() {\n $data_all_room = Yii::app()->db->createCommand()->select('hotel_room_name, hotel_room_id')->from('hotel_room')->queryAll();\n $this->render('view_widget_room_menu', array('data' => $data_all_room));\n }", "title": "" }, { "docid": "5363fef4b01de61774e2cc0944c67031", "score": "0.5707985", "text": "public function viewEditPost()\n {\n $id = (int) $_GET['chapitre'];\n\n $post = $this->postManager->getPost($id)->fetch();\n require 'viewAdmin/viewCreateUpdatePost.php';\n }", "title": "" }, { "docid": "282f18ac9d653c9d90ecca201ce3b54e", "score": "0.5705961", "text": "public function viewPosts()\n {\n $this->view->set('URL_INI', $this->route['URL_INI']);\n $this->view->set('introPosts', $this->objArt->selectArticleAll(\"viewUser\"));\n $this->view->set('adminData', $this->objAdmin->returnPersonInfo());\n $this->view->render($this->route['BLOG_DIR'].$this->route['ARTIGO_ALL']);\n }", "title": "" }, { "docid": "b8746c8bc34f14aa4babf3efe52d6e6b", "score": "0.56973267", "text": "function select_editor()\r\n\t{\r\n\t\tif(!isset($_SESSION['adminUserName']) || $_SESSION['adminUserName'] =='')\r\n\t\t{\r\n\t\t\tredirect('instance/login', 'location');\r\n\t\t}\r\n\t\telse if($this->input->post('Submit'))\r\n\t\t{\r\n\t\t\t$this->load->model('dal/identity_db_manager');\r\n\t\t\t$objIdentity\t= $this->identity_db_manager;\r\n\t\t\t\r\n\t\t\t$editorIdAdv = $this->input->post('editor_adv');\r\n\t\t\t$editorIdSimple = $this->input->post('editor_simple');\r\n\t\t\t$objIdentity->updateEditorStatus($editorIdAdv,$editorIdSimple,1);\r\n\t\t\tredirect('instance/home/select_editor', 'location');\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->load->model('dal/identity_db_manager');\r\n\t\t\t$objIdentity\t\t\t= $this->identity_db_manager;\t\r\n\t\t\t$data['editorDetails'] \t= $objIdentity->getEditors();\r\n\t\t\tif($_COOKIE['ismobile'])\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 $this->load->view('instance/select_editor_for_mobile', $data);\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t $this->load->view('instance/select_editor', $data);\t\r\n\t\t\t} \r\n\t\t}\r\n\t}", "title": "" } ]
7c02a328b5415de70cb33108f2fe3112
Gets the deliveryFrequency property value. The deliveryFrequency property
[ { "docid": "a77a4da26a89fe1b04253161e5b19096", "score": "0.7355086", "text": "public function getDeliveryFrequency(): ?NotificationDeliveryFrequency {\n $val = $this->getBackingStore()->get('deliveryFrequency');\n if (is_null($val) || $val instanceof NotificationDeliveryFrequency) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deliveryFrequency'\");\n }", "title": "" } ]
[ { "docid": "4422fb13eb09ba622a7685cbf2f2d3f9", "score": "0.72831017", "text": "public function getDelivery()\n {\n $value = $this->get(self::delivery);\n return $value === null ? (double)$value : $value;\n }", "title": "" }, { "docid": "10cebaaff82d8765ac48353f8a266b6f", "score": "0.7029653", "text": "public function getFrequency()\n {\n return $this->get(self::_FREQUENCY);\n }", "title": "" }, { "docid": "10cebaaff82d8765ac48353f8a266b6f", "score": "0.7029653", "text": "public function getFrequency()\n {\n return $this->get(self::_FREQUENCY);\n }", "title": "" }, { "docid": "ee70c7bb3badf3774a059b4197d9bcf0", "score": "0.6834432", "text": "public function getDelivery()\n {\n return $this->delivery;\n }", "title": "" }, { "docid": "d56c34353cfde9aeea73ce37bc005475", "score": "0.6824092", "text": "public function getFixedTimeDelivery() {\n return $this->_fixedTimeDelivery;\n }", "title": "" }, { "docid": "5af3c33e1fa75689f036b8e2fc30cf2c", "score": "0.6672697", "text": "public function getPriceDelivery()\n {\n return $this->priceDelivery;\n }", "title": "" }, { "docid": "af6d16717dcaa43b1bf733624d568a36", "score": "0.6668825", "text": "public function getFrequencyId()\n {\n return $this->frequency_id;\n }", "title": "" }, { "docid": "faf6a54d941b6b5c0c407407b7d0832f", "score": "0.6623732", "text": "public function setDeliveryFrequency(?NotificationDeliveryFrequency $value): void {\n $this->getBackingStore()->set('deliveryFrequency', $value);\n }", "title": "" }, { "docid": "38a2f62091bae9f64939720c7d637646", "score": "0.6573551", "text": "public function getFirmDelivery()\n {\n return $this->firmDelivery;\n }", "title": "" }, { "docid": "39ab71a07498f2645af89f6ef5148d9a", "score": "0.6428171", "text": "public function getTimeDelivery()\n {\n return $this->timeDelivery;\n }", "title": "" }, { "docid": "c0fd45e1402064d55105ed0a6d30e9ee", "score": "0.6271648", "text": "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "title": "" }, { "docid": "c0fd45e1402064d55105ed0a6d30e9ee", "score": "0.6271648", "text": "public function getDeliveryId()\n {\n return $this->deliveryId;\n }", "title": "" }, { "docid": "7ffab6ab0ae63e8c658920d80f140b94", "score": "0.62547183", "text": "public function getFrequency(): ?Frequency\n {\n if (is_array($this->{self::FREQUENCY}))\n $this->setFrequency(new Frequency($this->{self::FREQUENCY}));\n\n return $this->{self::FREQUENCY};\n }", "title": "" }, { "docid": "2ca520f5b8ef1906180e3a212eec0cba", "score": "0.6243043", "text": "public function getAlertFrequency(){\n\t\treturn($this->alertFrequency);\n\t}", "title": "" }, { "docid": "79a20b3548f9fee158d33c9cdcfacd75", "score": "0.62189513", "text": "public function getDeliveredCount()\n {\n return $this->deliveredCount;\n }", "title": "" }, { "docid": "b4741b354f6f8b9e68cb4623c347a967", "score": "0.6162296", "text": "public function getIdDelivery()\n {\n return $this->idDelivery;\n }", "title": "" }, { "docid": "3dee52c553f274284c61db26694208e0", "score": "0.6090739", "text": "public function getDeliveryMode() {\n return $this->delivery_mode;\n }", "title": "" }, { "docid": "98454e7aa885b8fb053f5ec6f9d3b5fe", "score": "0.60714245", "text": "public function getActualDeliveryTime()\n {\n return $this->actualDeliveryTime;\n }", "title": "" }, { "docid": "ff0189bc1f4fdf9f9dd74cc94fbdb125", "score": "0.6051469", "text": "public function getRequestedDeliveryPeriod()\n {\n return $this->requestedDeliveryPeriod;\n }", "title": "" }, { "docid": "1451289c27f5cadc0148c57840a19823", "score": "0.60480344", "text": "public function getShippingFeeAttribute(): float\n\t{\n\t\treturn $this->rental_period->shipping_fee;\n\t}", "title": "" }, { "docid": "4c1bf24e15e07c806b2213f26f33c519", "score": "0.6033661", "text": "public function getDeliveryDeadline() {\n return $this->_deliveryDeadline;\n }", "title": "" }, { "docid": "13872836e2d5ca2bc772c046708e8d8d", "score": "0.6017843", "text": "public function getDeliveryNumber() {\n return $this->params[\"original\"][\"delivery_number\"];\n }", "title": "" }, { "docid": "ac55b3b30f89fcceb619d05ba630ab96", "score": "0.5990319", "text": "function getFrequency() { return $this->readStep(); }", "title": "" }, { "docid": "ea43c6977dae559509a220c43baf71dc", "score": "0.5983866", "text": "public function getHalfWorkDayDelivery() {\n return $this->_halfWorkDayDelivery;\n }", "title": "" }, { "docid": "1df5d76be1a2e3603bf3402c06124a7b", "score": "0.5947736", "text": "public function get_deliveredEnergyMeter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::DELIVEREDENERGYMETER_INVALID;\n }\n }\n $res = $this->_deliveredEnergyMeter;\n return $res;\n }", "title": "" }, { "docid": "4e17de1603c5f1c923ab3f7ebd1ef87e", "score": "0.5933043", "text": "public function getMaxDeliveryAmount()\n {\n return $this->_dMaxDeliveryAmount;\n }", "title": "" }, { "docid": "2d1ebbbd14e283f0ffa7a0e9ece7de1e", "score": "0.59280235", "text": "public function getOrderSyncFrequency() {\n return Mage::getStoreConfig(static::XML_PATH_ORDER_SYNC_FREQUENCY);\n }", "title": "" }, { "docid": "46dd9df44a74f2ad053b272d550628ff", "score": "0.5904949", "text": "public function getFee()\n {\n return $this->fee;\n }", "title": "" }, { "docid": "46dd9df44a74f2ad053b272d550628ff", "score": "0.5904949", "text": "public function getFee()\n {\n return $this->fee;\n }", "title": "" }, { "docid": "c979cb0fe0977ad75450a5226025b1e3", "score": "0.58941656", "text": "public function getDeliveryIncluded()\n {\n return $this->deliveryIncluded;\n }", "title": "" }, { "docid": "dd24baac419eddf3a6c54f9a29ef2ed0", "score": "0.5891531", "text": "public function getPromisedDeliveryPeriod()\n {\n return $this->promisedDeliveryPeriod;\n }", "title": "" }, { "docid": "4362554470ee8f64a8369529524e5096", "score": "0.5846735", "text": "public function getDeliveryParty()\n {\n return $this->deliveryParty;\n }", "title": "" }, { "docid": "c5a4cb024cddf3bf896487ad5444244e", "score": "0.58437717", "text": "public function getChangeFrequency()\n {\n return $this->changeFrequency;\n }", "title": "" }, { "docid": "96b9c94bf781297d5bf1339d8f5be931", "score": "0.58289903", "text": "public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }", "title": "" }, { "docid": "9a70fd6d9182c36d783fa32540dce1ff", "score": "0.58231556", "text": "public function getOrderDelivery()\n {\n return $this->hasOne(Delivery::class, ['id' => 'order_delivery_id']);\n }", "title": "" }, { "docid": "acc80bcbda161b6e150e099d4a5b3b5a", "score": "0.58204", "text": "public function getFee(){\r\n\t\treturn $this->fee;\r\n\t}", "title": "" }, { "docid": "f61ffecc2acaab78eae498969fecb8dc", "score": "0.57817084", "text": "public function getEstimatedDeliveryPeriod()\n {\n return $this->estimatedDeliveryPeriod;\n }", "title": "" }, { "docid": "e7a13afd6cf5aab2b133bff2deef0455", "score": "0.57606256", "text": "public function getShippingFaxNo()\r\n {\r\n return $this->_shippingFaxNo;\r\n }", "title": "" }, { "docid": "5e45af990b983a250e64be78e087b57d", "score": "0.57553816", "text": "public function getProductSyncFrequency() {\n return Mage::getStoreConfig(static::XML_PATH_PRODUCT_SYNC_FREQUENCY);\n }", "title": "" }, { "docid": "1150eed32e3d80670c876d8185176876", "score": "0.57514244", "text": "public function getDeliveryLocation()\n {\n return $this->deliveryLocation;\n }", "title": "" }, { "docid": "e6dab18ef086e293e512a58ed2bbb68c", "score": "0.57283986", "text": "public function getDeliveryMode(): int\n {\n }", "title": "" }, { "docid": "bcc05aa12e322e199b4c1bf9531e4113", "score": "0.5717433", "text": "public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }", "title": "" }, { "docid": "bcc05aa12e322e199b4c1bf9531e4113", "score": "0.5717433", "text": "public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }", "title": "" }, { "docid": "76f574a4af8181ddbc4cd3e1af875e68", "score": "0.5711087", "text": "public function getDeliveryMode()\n {\n }", "title": "" }, { "docid": "eaf5f29068b248ad27ac4efd8b8efdc2", "score": "0.56943107", "text": "public function getPublicationFrequency()\n {\n return $this->getFieldArray('310', ['a', 'b']);\n }", "title": "" }, { "docid": "ddff6ddbf7fa7c3e7300ac522501badd", "score": "0.5684158", "text": "public function getDeferredDeliveryWorkDays() {\n return $this->_deferredDeliveryWorkDays;\n }", "title": "" }, { "docid": "9a2595a849d852f9a6454a30f6cd696f", "score": "0.5659152", "text": "public function getDeliverydesc()\n {\n return $this->deliverydesc;\n }", "title": "" }, { "docid": "53ed81feedcdd75258706b8c16e9b519", "score": "0.5657739", "text": "public function getDeliveryMode();", "title": "" }, { "docid": "142bfbe28e514f9f500b50827d1f2d3f", "score": "0.5653422", "text": "public function getDeliveryTag() {\n return $this->delivery_tag;\n }", "title": "" }, { "docid": "f99fc5bdcb6adbd6aa70bb90546e072e", "score": "0.5628452", "text": "public function getDeliveryType()\n {\n return $this->promotional ? self::PROMOTIONAL_SMS_TYPE : self::TRANSACTIONAL_SMS_TYPE;\n }", "title": "" }, { "docid": "2d70a1bfa12de7c28f9d7580ed4b6414", "score": "0.5627451", "text": "public function getTotalDeliveredQuantity()\n {\n return $this->totalDeliveredQuantity;\n }", "title": "" }, { "docid": "6be04b93f44631ac8cd4a69757514f12", "score": "0.5622805", "text": "public function getClockFrequency()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_CLOCK_FREQUENCY, $payload);\n\n $payload = unpack('V1frequency', $data);\n\n return IPConnection::fixUnpackedUInt32($payload, 'frequency');\n }", "title": "" }, { "docid": "8125c9a56861ad50fc45a9a2257510e9", "score": "0.56098837", "text": "public function getDeliveryTag()\n {\n return $this->deliveryTag;\n }", "title": "" }, { "docid": "e6e669049310daa1a80142b1ce10598f", "score": "0.5599475", "text": "public function getShippingDiscountAmount()\n {\n return $this->shippingDiscountAmount;\n }", "title": "" }, { "docid": "eb0842715eaaffa979d72d55ca6bad9f", "score": "0.55970645", "text": "public function getLatestDeliveryTime()\n {\n return $this->latestDeliveryTime;\n }", "title": "" }, { "docid": "df879021419a678efba8acfe82e9378c", "score": "0.55525035", "text": "public function getfrequency() {\n return['1' => 'Frequency 1', '2' => 'Frequency 2', '3' => 'Frequency 3', '4' => 'Frequency 4'];\n }", "title": "" }, { "docid": "2f8753afd713dba934f589a579f43dc6", "score": "0.5535989", "text": "public function getDeliveryOrder();", "title": "" }, { "docid": "24f3d649ac2962ea0ff777580ebdea47", "score": "0.5534012", "text": "public function getCalculatedShippingDiscount()\n {\n return $this->calculatedShippingDiscount;\n }", "title": "" }, { "docid": "509888e994b1cb24aabdb843bab6d454", "score": "0.5531753", "text": "public function getDeliveryName()\n {\n return $this->_deliveryName=='' ? $this->getBasename() : $this->_deliveryName;\n \n }", "title": "" }, { "docid": "0d6afe4671321493d115a2e8bfccd1c6", "score": "0.55255693", "text": "public function getDeliveryTypeCode()\n {\n return $this->deliveryTypeCode;\n }", "title": "" }, { "docid": "b4dc4602197483cbc2264bca0d16198a", "score": "0.5500022", "text": "public function setFrequency($value)\n {\n return $this->set(self::_FREQUENCY, $value);\n }", "title": "" }, { "docid": "b4dc4602197483cbc2264bca0d16198a", "score": "0.5500022", "text": "public function setFrequency($value)\n {\n return $this->set(self::_FREQUENCY, $value);\n }", "title": "" }, { "docid": "bb355e8ef0a1649c6aea723bf240705b", "score": "0.54901546", "text": "public function getUpdateFrequency()\n {\n return Mage::getStoreConfig(self::XML_PATH_UPDATE_FREQUENCY);\n }", "title": "" }, { "docid": "e48210057c45376b2df971c6c817d821", "score": "0.54752463", "text": "public function getFlatShippingDiscount()\n {\n return $this->flatShippingDiscount;\n }", "title": "" }, { "docid": "86d8085a2c61ccc1da7a617e47ccad42", "score": "0.5466838", "text": "public function setNotificationFrequency($notificationFrequency)\n {\n $this->notificationFrequency = $notificationFrequency;\n return $this;\n }", "title": "" }, { "docid": "d5a9545c85d13dfcb9b63e71f1c5f136", "score": "0.54512185", "text": "public function getSpecialDeliveryId() {\n \treturn $this->_specialDeliveryId;\n }", "title": "" }, { "docid": "6101b48880676a78a97da448067694cc", "score": "0.54476565", "text": "public function getDeliveryAddress()\n {\n return $this->deliveryAddress;\n }", "title": "" }, { "docid": "6101b48880676a78a97da448067694cc", "score": "0.54476565", "text": "public function getDeliveryAddress()\n {\n return $this->deliveryAddress;\n }", "title": "" }, { "docid": "05686ce3b3ef70cae2264392d79b6bb6", "score": "0.5428172", "text": "public function setFrequency(Frequency $frequency): BillingCycle\n {\n $this->offsetSet(self::FREQUENCY, $frequency);\n return $this;\n }", "title": "" }, { "docid": "f0076b33b66c28a1a85f51a1d4f934e9", "score": "0.5408935", "text": "public function getFrequency(ConnectionInterface $con = null)\n {\n if ($this->aFrequency === null && ($this->frequency_id !== null)) {\n $this->aFrequency = FrequencyQuery::create()->findPk($this->frequency_id, $con);\n /* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aFrequency->addBiblios($this);\n */\n }\n\n return $this->aFrequency;\n }", "title": "" }, { "docid": "31102dbdfea778be847b34beffddf180", "score": "0.54004854", "text": "public function getPromotionalShippingDiscountDetails()\n {\n return $this->promotionalShippingDiscountDetails;\n }", "title": "" }, { "docid": "85b3df1c5f4fab753195f793beb0b920", "score": "0.5399171", "text": "public function getDeliveries()\n {\n return $this->deliveries;\n }", "title": "" }, { "docid": "65a874e7c861decff0717abf3ab5e7ba", "score": "0.5384998", "text": "public function getShippingRate();", "title": "" }, { "docid": "8ec2b33d2cde2d2d5c4073a50c0a9997", "score": "0.5384293", "text": "public function getPriceOverrideDelivery()\n {\n $value = $this->scopeConfig->getValue(self::XML_PATH_PRICE_OVERRIDE_DELIVERY, ScopeInterface::SCOPE_WEBSITES);\n if (!strlen($value)) {\n return null;\n }\n\n return $this->localeFormat->getNumber($value);\n }", "title": "" }, { "docid": "10649d6b3ab20559841f70fd67334a5b", "score": "0.5376783", "text": "public function getfilingfee()\n\t{\n\t\t$filingId = $_SESSION['filingId'];\n\t\t$form_type = $_SESSION['formtype'];\n\t\t$result = $this->productpaymentDAO->getfilingfee($filingId, $form_type);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6da144e7e63fee636f281edb5621e57e", "score": "0.53691536", "text": "public function getShippingCost()\r\n {\r\n return $this->shipping_cost;\r\n }", "title": "" }, { "docid": "fef37dee29355bb1441b8010c232a1d7", "score": "0.534201", "text": "public function setDelivery($value)\n {\n return $this->set(self::delivery, $value);\n }", "title": "" }, { "docid": "4a41c84f86682c80e45da8d12267a36a", "score": "0.53327566", "text": "public function getSustainability()\n {\n return $this->sustainability;\n }", "title": "" }, { "docid": "015c680a654642b4a9c8facb7d5d4de0", "score": "0.5315908", "text": "public function getFreeShipping() {\n return $this->item->getFreeShipping();\n }", "title": "" }, { "docid": "e6f3c504e30d8f09f0779120e9457412", "score": "0.53151447", "text": "public function setFrequency($frequency)\n {\n $this->frequency = $frequency;\n }", "title": "" }, { "docid": "f345d1a41570e2405c88f38084c873d6", "score": "0.53147835", "text": "public function getShippingFax()\n {\n return $this->getParameter('shippingFax');\n }", "title": "" }, { "docid": "3c1fa5c0ccbb1213b009fc65ec02b99f", "score": "0.5305675", "text": "public function getLatestDeliveryDate()\n {\n return $this->latestDeliveryDate;\n }", "title": "" }, { "docid": "316b19be367963c13e28c518b4fceb95", "score": "0.5296398", "text": "public function getDeliveryDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->deliveryDate;\r\n\t}", "title": "" }, { "docid": "d103421073c8db68e42fb1f39e9685f7", "score": "0.5292213", "text": "public function getFinanceCharge()\n\t{\n\t\treturn $this->finance_charge;\n\t}", "title": "" }, { "docid": "e068c7357709c836507f86ab84221b65", "score": "0.5287276", "text": "public function getNotificationPeriod() {\n\t\treturn $this->notificationPeriod;\n\t}", "title": "" }, { "docid": "f8a4438f23f0147d2fd3ce4e1c4de61c", "score": "0.5266035", "text": "public function getDeliveryReport();", "title": "" }, { "docid": "70e03c98c6578d43d10b6014f4af0bd5", "score": "0.52557343", "text": "public function getFee(): float;", "title": "" }, { "docid": "50d9b9285996e1e51d60f8ce3723c993", "score": "0.52466434", "text": "public function getFax()\n {\n return $this->getValue('nb_icontact_prospect_fax');\n }", "title": "" }, { "docid": "bceec5560196552cfb192e13b41e3610", "score": "0.5244603", "text": "public function getFreight()\n {\n return $this->freight;\n }", "title": "" }, { "docid": "0ffc16474d3dd898c6f6577da4f9fe98", "score": "0.5243298", "text": "protected function frequency()\n {\n return 'monthly';\n }", "title": "" }, { "docid": "12925738e740e113ac12ed5be43c701f", "score": "0.5230912", "text": "public function getDeliveryDateTime() {\n return $this->params[\"original\"][\"delivery_datetime\"];\n }", "title": "" }, { "docid": "a863f5eea1c4e7c368913b3ea3e320d4", "score": "0.52119714", "text": "public function get_sign_up_fee() {\n\t\twcs_deprecated_function( __METHOD__, '2.2.0', 'WC_Subscriptions_Product::get_sign_up_fee( $this )' );\n\t\treturn WC_Subscriptions_Product::get_sign_up_fee( $this );\n\t}", "title": "" }, { "docid": "74bb70c51b2b9be702ddaa37e0464bbf", "score": "0.52099335", "text": "public function getFlightPrice()\n {\n return $this->flight_price;\n }", "title": "" }, { "docid": "ad2e6db638ab47758f085968b72b0e39", "score": "0.51826733", "text": "public function getDeliverySuggestionCode()\n {\n return $this->_deliverySuggestionCode;\n }", "title": "" }, { "docid": "1fba5b2334a5e36220f13c90c479d64e", "score": "0.5174641", "text": "public function setBillingFrequency( $frequency ) {\n\t\t$this->billingFrequency = $frequency;\n\t}", "title": "" }, { "docid": "d4bf8ce38e3e8600d3791e2bc2c9a849", "score": "0.51550573", "text": "public function getDeliveryDateService()\n {\n if (!$this->deliveryDateService) {\n $this->setDeliveryDateService(new DeliveryDateService($this));\n }\n\n return $this->deliveryDateService;\n }", "title": "" }, { "docid": "e52b75e70afb08c39a398909f4abf89e", "score": "0.5153667", "text": "public function getDistribution()\n {\n return $this->distribution;\n }", "title": "" }, { "docid": "e1d0400c6389e473dae65c4d5acea20b", "score": "0.51367074", "text": "public function getShipping()\r\n {\r\n return $this->shipping;\r\n }", "title": "" }, { "docid": "f9a6a46e9e034eb3604bf5b255fc7876", "score": "0.5135129", "text": "public function getAvailableDeliveryMethod() {\n\t\treturn $this->availableDeliveryMethod;\n\t}", "title": "" }, { "docid": "f275d02dd9863505edec83ad42a75d55", "score": "0.5133627", "text": "public function getFax()\n {\n return $this->fax;\n }", "title": "" } ]
8b02120266d36b2398e13a7ffadaa8f3
Converts a recursive array into a flat one
[ { "docid": "8a1d1075007249d54ee24f180d63777b", "score": "0.0", "text": "protected function convertToFlat($data, $parent = null, $level = 0)\n {\n $orderby = 0;\n foreach ($data as $key => $node) {\n unset($data[$key]);\n $item = $node;\n // clear out data to unsure structure\n unset($item[$this->_node_id], $item[$this->_node_parent], $item[$this->_node_sort], $item[$this->_node_children], $item[$this->_node_level], $item[$this->_node_breadcrumbs]);\n $item[$this->_node_id] = $node[$this->_node_id];\n $item[$this->_node_parent] = $parent;\n if ($this->_node_sort) {\n $item[$this->_node_sort] = $orderby;\n }\n\n $item[$this->_node_level] = $level;\n // save current node\n $this->_data[$item[$this->_node_id]] = $item;\n unset($item);\n // add child nodes\n if (isset($node[$this->_node_children]) && is_array($node[$this->_node_children])) {\n $id = $node[$this->_node_id];\n $children = $node[$this->_node_children];\n unset($node);\n $this->convertToFlat($children, $id, $level + 1);\n unset($id, $children);\n }\n unset($node);\n $orderby++;\n }\n unset($orderby, $level, $parent);\n }", "title": "" } ]
[ { "docid": "f01fe18583310735af646d718e12cd85", "score": "0.7745958", "text": "function array_flat($array) { \n $out=array();\n foreach($array as $k=>$v){ \n if(is_array($array[$k])) { $out=array_merge($out,$this->array_flat($array[$k])); }\n else { $out[]=$v; }\n } \n return $out;\n }", "title": "" }, { "docid": "220d4004567a8e75cd4953790ab3edca", "score": "0.7533573", "text": "private function array_flat($array)\n {\n $tmp = [];\n foreach ($array as $a) {\n if (is_array($a)) {\n $tmp = array_merge($tmp, $this->array_flat($a));\n } else {\n $tmp[] = $a;\n }\n }\n\n return $tmp;\n }", "title": "" }, { "docid": "e30c857ade570ee5f4ee238928ff8738", "score": "0.73666716", "text": "function array_flatten(array $array)\n{\n $flattened_array = [];\n\n array_walk_recursive($array, function ($a) use (&$flattened_array) {\n $flattened_array[] = $a;\n });\n\n return $flattened_array;\n}", "title": "" }, { "docid": "7df936731d351c1bd49087c0df54347d", "score": "0.7349668", "text": "public static function flat(array $arr)\r\n\t{\r\n\t\t$newArr = [];\r\n\t\t$fkey = [];\r\n\t\tself::recursion($arr, $fkey, $newArr);\r\n\r\n\t\treturn $newArr;\r\n\t}", "title": "" }, { "docid": "77beb8ade4b9576519eb888e5744bedf", "score": "0.733233", "text": "public function convertToFlatternArray($array){\n $this->flatterArray($array);\n $return = $this->flatternArray;\n $this->flatternArray = array();\n return $return;\n }", "title": "" }, { "docid": "e36d5211f4bed976f33893c7f55a015b", "score": "0.72851515", "text": "function gp_array_flatten( $array ) {\n $res = array();\n foreach( $array as $value ) {\n $res = array_merge( $res, is_array( $value )? gp_array_flatten( $value ) : array( $value ) );\n }\n return $res;\n}", "title": "" }, { "docid": "442932919dc551a2479e66c634e8742b", "score": "0.72499627", "text": "function array_flatten($array) {\n $return = array();\n array_walk_recursive($array, function($x) use (&$return) {\n $return[] = $x;\n });\n return $return;\n }", "title": "" }, { "docid": "35f97114191a3e4af999e2b8dd8a926e", "score": "0.7249821", "text": "function array_flatten(array $array) {\n $return = array();\n array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; });\n return $return;\n }", "title": "" }, { "docid": "3efd636bc5aaf38dd8b7af57014b43e7", "score": "0.7245844", "text": "function array_flat( $a, $s = array( ), $l = 0 )\n {\n if( !is_array( $a ) ) return $s;\n \n # go through the array values\n foreach( $a as $k => $v )\n {\n # check if the contained values are arrays\n if( !is_array( $v ) )\n {\n # store the value\n $s[ ] = $v;\n \n # move to the next node\n continue;\n \n }\n \n # increment depth level\n $l++;\n \n # replace the content of stored values\n $s = array_flat( $v, $s, $l );\n \n # decrement depth level\n $l--;\n \n }\n \n # get only unique values\n if( $l == 0 ) $s = array_values( array_unique( $s ) );\n \n # return stored values\n return $s;\n \n }", "title": "" }, { "docid": "6f9ec148e6bc6c4dc4db4190e365a055", "score": "0.7242545", "text": "function flatten_array($array){\n if (!$array) return false;\n $flat = array();\n $RII = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));\n foreach ($RII as $value) $flat[$RII::key] = $value;\n return $flat;\n}", "title": "" }, { "docid": "b4bcfe7f14ea94ebfd5ed53dcbcc3d3c", "score": "0.7231903", "text": "public function flattenRecursive(): array\n {\n $flat = [];\n\n foreach (new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->getArrayCopy())) as $value) {\n $flat[] = $value;\n }\n\n return $flat;\n }", "title": "" }, { "docid": "fa70c58cf9e8f0248e891e2b8370caef", "score": "0.7178481", "text": "function array_flatten($array)\n {\n $return = array();\n\n array_walk_recursive($array, function($x) use (&$return) { $return[] = $x; });\n\n return $return;\n }", "title": "" }, { "docid": "7fe31dd18eb9dcfde0a15f48b9a0227e", "score": "0.7173551", "text": "public function array_flattener($array=array(),$levels=4) { \n\t if (empty($array)) { \n\t\treturn FALSE; \n\t }\n\n \tif (count($array) != count($array, COUNT_RECURSIVE))\n \t{\t\n \t\tfor ($i=0; $i <$levels ; $i++) { \n \t\t\t$array=$this->array_single_level_flattener($array);\n \t\t}\n \t \t \n \t}\n\n\t return $array; \n\t}", "title": "" }, { "docid": "58e787e1cf49256e2d8a7be926891fa9", "score": "0.7154146", "text": "static function flat($arr){\n\t\tif(!empty($arr)){\n\t\t\treturn call_user_func_array (\"array_merge\", $arr);\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "76c3f5d6eb65ffd814f4aef0fd1ce042", "score": "0.7140279", "text": "private function array_flatten( $array ) {\n\t\tif( !is_array($array) ) return null;\n\t\t$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));\n\t\t$final = array();\n\t\tforeach( $it as $v ) {\n\t\t\t$final[] = $v;\n\t\t}\n\n\t\treturn $final;\n\t}", "title": "" }, { "docid": "55031608ac4cf7e6470f884b0c5bc39d", "score": "0.7117318", "text": "protected function flatten($array) {\n\t\treturn iterator_to_array(new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($array)), false);\n\t}", "title": "" }, { "docid": "5fef467888431f681af38c61c131b3e2", "score": "0.707051", "text": "public static function flatten($array) {\r\n $return = [];\r\n\r\n array_walk_recursive($array, function ($x) use (&$return) {\r\n $return[] = $x;\r\n });\r\n\r\n return $return;\r\n }", "title": "" }, { "docid": "3ef2fa9fed661d54d0dd760745c5fef9", "score": "0.70528173", "text": "public static function flat( $array, $result = array() )\n\t{\n\t\tforeach( $array as $value ) {\n\t\t\tif ( is_array( $value ) ) $result = self::flat( $value, $result );\n\t\t\telse $result[] = $value;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f5a8b45873348ac8ba26647b8a1514ca", "score": "0.7033549", "text": "function array_flatten($array) {\n $flattened = [];\n foreach ($array as $v) {\n if (is_array($v))\n $flattened = array_merge($flattened, array_flatten($v));\n else\n $flattened[] = $v;\n }\n return $flattened;\n}", "title": "" }, { "docid": "a367337c4d426c5daec6a04994936b24", "score": "0.70136386", "text": "function array_flatten(array $array): array\n {\n $return = [];\n\n array_walk_recursive(\n $array,\n function ($x) use (&$return) {\n $return[] = $x;\n }\n );\n\n return $return;\n }", "title": "" }, { "docid": "9799c21630dce9da8f5d1587f59c495a", "score": "0.7008933", "text": "function array_flatten($array)\r\n {\r\n return Arr::flatten($array);\r\n }", "title": "" }, { "docid": "648eaf706dc87eb3b8ee5fce37004e07", "score": "0.7002572", "text": "private function flatten(array $array)\n {\n $single = array();\n if (isset($array['hier'])) {\n unset($array['hier']);\n }\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n foreach ($this->flatten($value) as $key => $value) {\n $single[$key] = $value;\n }\n } else {\n $single[$key] = $value;\n }\n }\n\n return $single;\n }", "title": "" }, { "docid": "461737eb771174771b6a179c997f7e53", "score": "0.6981873", "text": "function flattenArray($array) {\n $flatArray = array();\n foreach($array as $key => $value) {\n if(is_array($value)) {\n $value = flattenArray($value);\n }\n if(is_array($value)) {\n $flatArray = array_merge($value, $flatArray);\n }\n else {\n $flatArray[] = $value;\n }\n }\n return $flatArray;\n}", "title": "" }, { "docid": "b557a8461f03e21f44f26d5b63b4caeb", "score": "0.696556", "text": "static public function flatten($array)\n\t{\n\t\tif(! is_array($array) && ! $array instanceof Traversable)\n\t\t{\n\t\t\treturn array($array);\n\t\t}\n\n\t\t$result = array();\n\n\t\tforeach($array AS $a)\n\t\t{\n\t\t\t$b = static::flatten($a);\n\t\t\tforeach($b AS $c)\n\t\t\t{\n\t\t\t\t$result[] = $c;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c74ba7acdcab0d3aa29101b9ebfd0f8c", "score": "0.6960725", "text": "public function flatify($arr)\n {\n if (empty($arr) || !is_array($arr)) {\n return $arr;\n }\n\n $path = [];\n foreach ($arr as $key => $value) {\n if (!is_string($key) && is_string($value)) {\n $key = $value;\n $value = '';\n } elseif(!is_string($key)) {\n continue;\n }\n\n $path[] = $this->_flatify($key, $value);\n }\n\n $ret = [];\n array_walk_recursive($path, function($item, $key) use(&$ret) {\n $ret[$key] = $item;\n });\n\n return $ret;\n }", "title": "" }, { "docid": "2aa79543afdc1c6d819c5496d7da9f61", "score": "0.69405526", "text": "public function allFlat(): array\n {\n $iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->all()), \\RecursiveIteratorIterator::SELF_FIRST);\n $path = array();\n $flatArray = array();\n \n foreach ($iterator as $key => $value) {\n $path[$iterator->getDepth()] = $key;\n \n if (!is_array($value)) {\n $flatArray[implode('.', array_slice($path, 0, $iterator->getDepth() + 1))] = $value;\n }\n }\n return $flatArray;\n }", "title": "" }, { "docid": "6788f044addb72bae690ab2c4133f6dc", "score": "0.6929847", "text": "function array_flatten($array)\n\t{\n\t\treturn Arr::flatten($array);\n\t}", "title": "" }, { "docid": "d7dab0141d458e348f77c7757e3899f3", "score": "0.68895066", "text": "function array_flatten_recursive($arr)\n{\n $result = array();\n foreach ($arr as $key => $value) {\n if (is_array($value)) {\n // Flatten nested arrays\n $value = array_flatten_recursive($value);\n foreach ($value as $inner_key => $inner_value) {\n $result[$key . \".\" . $inner_key] = $inner_value;\n }\n } else {\n // Leave scalar values 'as is'\n $result[$key] = $value;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "77a4c36d504d5bec7fa3c120a924f9a9", "score": "0.6816815", "text": "function array_flatten($array) {\n \n\t $return = array();\n\t foreach ($array as $key => $value) {\n\t if (is_array($value)){ $return = array_merge($return, array_flatten($value));}\n\t else {$return[$key] = $value;}\n\t }\n\t return $return;\n\n}", "title": "" }, { "docid": "3fbeb8bcf4ab2e2ff3f4a978240ea58e", "score": "0.6765703", "text": "private function flattenArray($array)\n\t{\n\t\t$ritit = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));\n\t\t$result = array();\n\n\t\tforeach ($ritit as $leafValue) {\n\t\t\t$keys = array();\n\t\t\tforeach (range(0, $ritit->getDepth()) as $depth) {\n\t\t\t\t$keys[] = $ritit->getSubIterator($depth)->key();\n\t\t\t}\n\t\t\t$result[ join(':', $keys) ] = $leafValue;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7a1355af9417e51f018b361f4fdf33eb", "score": "0.6756219", "text": "public static function flat( $array, $result = array() )\n\t{\n\t\treturn ArrayTool::flat( $array, $result );\n\t}", "title": "" }, { "docid": "90270a1a18a8fd17c4724050b1eb6521", "score": "0.6756195", "text": "function array_flatten($array) { \n\tif (!is_array($array)) { \n\t return FALSE; \n\t} \n\t$result = array(); \n\tforeach ($array as $key => $value) { \n\t if (is_array($value)) { \n\t\t$result = array_merge($result, array_flatten($value)); \n\t } \n\t else { \n\t\t$result[$key] = $value; \n\t } \n\t} \n\treturn $result; \n}", "title": "" }, { "docid": "d3d0aed8fd1b06fa33e7d35fb6272684", "score": "0.67533386", "text": "public static function flatten($array, $depth = INF)\n {\n $result = [];\n foreach ($array as $item) {\n $item = ($item instanceof Collection) ? $item->all() : $item;\n\n if (!is_array($item)) {\n $result[] = $item;\n } else {\n $values = (1 === $depth)\n ? array_values($item)\n : static::flatten($item, $depth - 1);\n\n foreach ($values as $value) {\n $result[] = $value;\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "e932d854c046d024e94f04e2a34d7ba6", "score": "0.6739734", "text": "public static function flatten($array, $depth = INF)\n {\n if ($array instanceof ArrayAble) {\n $array = $array->toArray();\n }\n return array_reduce($array, function ($result, $item) use ($depth) {\n if (!is_array($item)) {\n return array_merge($result, [$item]);\n } else if($depth === 1) {\n return array_merge($result, array_values($item));\n } else {\n return array_merge($result, static::flatten($item, $depth - 1));\n }\n }, []);\n }", "title": "" }, { "docid": "49b8756f749996266990c5ffff389246", "score": "0.67392534", "text": "public function flatten();", "title": "" }, { "docid": "49b8756f749996266990c5ffff389246", "score": "0.67392534", "text": "public function flatten();", "title": "" }, { "docid": "265677be5a10d31f7b7c53737788b433", "score": "0.6729284", "text": "private function flatterArray($array){\n foreach($array as $key => $value){\n if(is_array($value)){\n $this->flatterArray($array[$key]);\n }\n else{\n $this->flatternArray[\"key_\".$this->key] = $value;\n $this->key++;\n }\n }\n return;\n }", "title": "" }, { "docid": "4765e8b9d669c46bf2492ca5e392cb3e", "score": "0.6724216", "text": "public static function flatten($array, $depth = INF)\n {\n return array_reduce($array, function ($result, $item) use ($depth) {\n $item = $item instanceof Collection ? $item->all() : $item;\n\n if (! is_array($item)) {\n return array_merge($result, [$item]);\n } elseif ($depth === 1) {\n return array_merge($result, array_values($item));\n } else {\n return array_merge($result, static::flatten($item, $depth - 1));\n }\n }, []);\n }", "title": "" }, { "docid": "a45820922b37bc2c0cc108b582d5deb6", "score": "0.6721161", "text": "public static function flatten($array, $depth = INF)\n {\n return array_reduce($array, function ($result, $item) use ($depth) {\n $item = $item instanceof Collection ? $item->all() : $item;\n\n if (!is_array($item)) {\n return array_merge($result, [$item]);\n } else if ($depth === 1) {\n return array_merge($result, array_values($item));\n } else {\n return array_merge($result, static::flatten($item, $depth - 1));\n }\n }, []);\n }", "title": "" }, { "docid": "3a9130c2b7e580c15a2fad18af63752c", "score": "0.67004204", "text": "function array_flatten($array) {\n if (!is_array($array)) {\n return FALSE;\n }\n $result = array();\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $result = array_merge($result, $this->array_flatten($value));\n } else {\n $result[] = $value;\n }\n }\n\n return array_unique($result);\n }", "title": "" }, { "docid": "a16cd1f8134023d3ea6a77d49110cc81", "score": "0.6700394", "text": "function tree2flat($arr, $parent_id = 'root', $parent = 'parent', $child_name = 'children', $level = 50, $currtnt = 0) {\r\n if ($level == $currtnt || !is_array($arr)) return false;\r\n foreach ($arr as $k => $v) {\r\n $arr[$k][$parent] = $parent_id;\r\n if ($v[$child_name]) {\r\n $r = self::tree2flat($v[$child_name], $k, $parent, $child_name, $level, $currtnt + 1);\r\n unset($arr[$k][$child_name]);\r\n if ($r) $arr = self::extend($arr, $r);\r\n }\r\n }\r\n return $arr;\r\n }", "title": "" }, { "docid": "983e5b0397ba59f7b3380983c1f9c321", "score": "0.6700009", "text": "public static function flatten(array $array) {\n $flat = array();\n array_walk_recursive($array, function ($v, $k) use (&$flat) {\n is_numeric($k) ? $flat[] = $v : $flat[$k] = $v;\n });\n return $flat;\n }", "title": "" }, { "docid": "449a1fa68935145971a587361190b629", "score": "0.6672502", "text": "public function arrayFlattenRecursive($arr) {\n\t\t$out = array();\n\t\tforeach ($arr as $e) {\n\t\t\tif (is_array($e)) {\n\t\t\t\t$out = array_merge($out, $this->arrayFlattenRecursive($e));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$out[] = $e;\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "7cbd7cc41d0acb5078fcd52c0eb8dfc5", "score": "0.66523933", "text": "public function flatten(array $array): array\n {\n $results = [];\n\n array_walk_recursive($array, function ($val) use (&$results) {\n $results[] = $val;\n });\n\n return $results;\n }", "title": "" }, { "docid": "1c7f9d5efabdd0f046cdd695ed7c7d60", "score": "0.66418", "text": "function array_flatten($array) {\n if (!is_array($array)) {\n return FALSE;\n }\n $result = array();\n foreach ($array as $key => $value) {\n if (is_array($value) ) {\n $result = array_merge($result, array_flatten($value));\n }\n else {\n $result[$key] = $value;\n }\n }\n return $result;\n}", "title": "" }, { "docid": "356edfc558f71f5866f6a33fdaa2944f", "score": "0.6626661", "text": "function toFlattenedArray() : array;", "title": "" }, { "docid": "12fbbef78ae5904d5d5dd928736b6f02", "score": "0.6585683", "text": "function array_unique_recursive($array){\n $result = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $array)));\n foreach ($result as $key => $value)\n {\n if (is_array($value)) {\n $result[$key] = array_unique_recursive($value);\n }\n }\n return $result;\n}", "title": "" }, { "docid": "36e44783260fd23d5c45f2a6fa0e2bba", "score": "0.6583134", "text": "public static function flattenArray($array) \n {\n $output = implode('|', array_map(\n function ($v, $k) {\n if (is_array($v)) {\n return sprintf(\"%s|%s\", $k, self::flattenArray($v));\n } else {\n return sprintf(\"%s|%s\", $k, $v);\n }\n },\n $array,\n array_keys($array)\n ));\n return $output;\n }", "title": "" }, { "docid": "dfd1047a6695d31af0287c270c7ecc3f", "score": "0.6570769", "text": "protected function ensureFlatArray(array $array)\n {\n $flat = array();\n\n while ($array) {\n $value = array_shift($array);\n\n if (is_array($value)) {\n $array = array_merge($value, $array);\n continue;\n }\n\n $flat[] = $value;\n }\n\n return $flat;\n }", "title": "" }, { "docid": "b45dafca25d28e973c37af513c82d089", "score": "0.65695167", "text": "function array_flatten (array $array, $removeChildren = false, $preserveKeys = false) {\n\t$result = array();\n\tforeach ($array as $key => $value) {\n\n\t\t// Value isn't child array\n\t\tif (!is_array($value)) {\n\n\t\t\t// Preseve keys if possible\n\t\t\tif ($preserveKeys) {\n\t\t\t\tif (!isset($result[$key])) {\n\t\t\t\t\t$result[$key] = $value;\n\t\t\t\t}\n\n\t\t\t// Ditch keys\n\t\t\t} else {\n\t\t\t\t$result[] = $value;\n\t\t\t}\n\n\t\t// Flatten child arrays if they're kept\n\t\t} else if (!$removeChildren) {\n\t\t\t$result = array_merge($result, array_flatten($value, $removeChildren, $preserveKeys));\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "9ead99a64339ccbf4e2c439ac6d9b377", "score": "0.6569276", "text": "function arrayCastRecursive($array)\n {\n if (is_array($array)) {\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $array[$key] = $this->arrayCastRecursive($value);\n }\n if ($value instanceof stdClass) {\n $array[$key] = $this->arrayCastRecursive((array)$value);\n }\n }\n }\n if ($array instanceof stdClass) {\n return $this->arrayCastRecursive((array)$array);\n }\n return $array;\n }", "title": "" }, { "docid": "c218b7c01c484c1aeccdfccdfc4cb0ca", "score": "0.6565565", "text": "public static function flatten($arr)\n {\n if (!is_array($arr)) {\n $arr = array($arr);\n }\n\n $result = array();\n foreach ($arr as $element) {\n // Merge element to $result if it is an array.\n if (is_array($element)) {\n $result = array_merge($result, self::flatten($element));\n } else {\n // Add element to $result.\n $result[] = $element;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d106feec627fd1e17cb52ca1843fd98a", "score": "0.6556109", "text": "public static function array_flatten( $array ) {\n\t\tif ( ! is_array( $array ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$result = array();\n\t\tforeach ( $array as $key => $value ) {\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t// flat all layout\n// $result = array_merge($result, $this->array_flatten($value));\n\t\t\t\t//flat one layout;\n\t\t\t\t$result = array_merge( $result, $value );\n\t\t\t} else {\n\t\t\t\t$result[ $key ] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b018b264d230b8ca2835c78a33a7cd49", "score": "0.65352243", "text": "private function unflattenArray(array $flatArray)\n {\n $flatArray = array_reverse($flatArray);\n $refs = [];\n $result = [];\n\n while (count($flatArray) > 0) {\n for ($i = count($flatArray) - 1; $i >= 0; $i--) {\n if (!isset($flatArray[$i]['children'])) {\n $flatArray[$i]['children'] = [];\n }\n\n if (!$flatArray[$i]['parent_id']) {\n $result[$flatArray[$i]['menu_id']] = $flatArray[$i];\n $refs[$flatArray[$i]['menu_id']] = &$result[$flatArray[$i]['menu_id']];\n unset($flatArray[$i]);\n $flatArray = array_values($flatArray);\n } elseif ($flatArray[$i]['parent_id'] != 0) {\n if (array_key_exists($flatArray[$i]['parent_id'], $refs)) {\n $o = $flatArray[$i];\n $refs[$flatArray[$i]['menu_id']] = $o;\n $refs[$flatArray[$i]['parent_id']]['children'][] = &$refs[$flatArray[$i]['menu_id']];\n unset($flatArray[$i]);\n $flatArray = array_values($flatArray);\n }\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "220f864b026abecb4bca7d53a880a370", "score": "0.65346825", "text": "function array_flatten( $array ){\n\n\tif ( !is_array( $array ) ){\n\n\t\treturn FALSE;\n\n\t}\n\n\t$result = array();\n\n\t//echo 'analisando o array' . \"\\n\";\n\tforeach ( $array as $key => $value ){\n\n\t\t//echo 'analisando ' . $key . ' => ' . $value . \"\\n\";\n\n\t\tif ( is_array( $value ) ){\n\n\t\t\t$result = array_merge( $result, array_flatten( $value ) );\n\n\t\t}\n\t\telse{\n\n\t\t\t$result[ $key ] = $value;\n\n\t\t}\n\n\t}\n\n\treturn $result;\n\n}", "title": "" }, { "docid": "3a20fec9deadb0a278e7ad28b1288746", "score": "0.6531357", "text": "public static function flatten(array $array)\n {\n $results = [];\n\n array_walk_recursive($array, function($x) use (&$results) {\n $results[] = $x;\n });\n\n return $results;\n }", "title": "" }, { "docid": "8ab4169935573637bbac9312bab5e063", "score": "0.6525982", "text": "function flatten_array(array $array = array(), $prefix = NULL) {\n $flat = array();\n foreach ($array as $key => $item) {\n $new_key = isset($prefix) ? concat($prefix, $key) : $key;\n if (is_array($item)) {\n $flat += flatten_array($item, $new_key);\n }\n else {\n $flat[$new_key] = $item;\n }\n }\n\n return $flat;\n}", "title": "" }, { "docid": "59549a5e6b29c89ce86fd3c03d0c1b14", "score": "0.6506993", "text": "public function flatten()\n {\n $data = [];\n \n foreach ($this->data as $item) {\n if (is_array($item) || $item instanceof self) {\n foreach ($item as $subItem) {\n $data[] = $subItem;\n }\n }\n else {\n $data[] = $item;\n }\n }\n \n return self::make($data);\n }", "title": "" }, { "docid": "a9e067bc0aeebea495e40aa368c7db77", "score": "0.6487817", "text": "public function flatten( $array ) {\n\t\t\t$result = array();\n\t\t\tforeach ( $array as $element ) {\n\t\t\t\tif ( is_array( $element ) ) {\n\t\t\t\t\tarray_push( $result, ...$this->flatten( $element ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[] = $element;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "9d67e9a7904658f050146bc7470c51af", "score": "0.64804363", "text": "public function flatten()\n {\n \n //Initialize variables.\n $output = [];\n $input = $this->toArray();\n \n //Flattening action!\n array_walk_recursive($input, function($a)use(&$output){\n $output[] = $a;\n });\n \n //Wrap and return.\n return new self($output);\n \n }", "title": "" }, { "docid": "492083eaf3e030c4ebb3cfa26f363c68", "score": "0.64677066", "text": "static public function flatten(array $array)\n\t{\n\t\t$result = $array;\n\n\t\tforeach ($array as $key => &$value)\n\t\t{\n\t\t\tself::flatten_callback($result, '', $key, $value);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d7997d0d92e4bd8da02abddd48197ea3", "score": "0.64596355", "text": "public function array_flatten($array) {\r\n\t\tif (!is_array($array)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$result = array();\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (is_array($value)) {\r\n\t\t\t\t$result = array_merge($result, $this->array_flatten($value));\r\n\t\t\t} else {\r\n\t\t\t\t$result = array_merge($result, array($key => $value));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "0e9fa03b70b26f0cfa8db35867f21f52", "score": "0.6448368", "text": "function array_values_recursive($array) {\n $arrayValues = array();\n foreach ($array as $value) {\n if (is_scalar($value) OR is_resource($value)) {\n $arrayValues[] = $value;\n }\n elseif (is_array($value)) {\n $arrayValues = array_merge($arrayValues, array_values_recursive($value));\n }\n }\n return $arrayValues;\n}", "title": "" }, { "docid": "911f02128503d5c12b6b506cd1a7d5fe", "score": "0.64370775", "text": "public function buildArrayFromFlat($array)\n {\n $r = array();\n foreach ($array as $v) {\n $this->pushToArray($r, $v[0], $v[1], $v[2], $v[3]);\n }\n\n $this->sortMultiArrayByKeys($r);\n\n return $r;\n }", "title": "" }, { "docid": "7221140966dd3d6674631e7d4d09a618", "score": "0.639576", "text": "public function fromFlatArray(array $data)\n {\n // Clear Data\n $this->clearData();\n // Sort the array by parent\n uasort($data, [$this, 'nodeSort']);\n // Init arrays\n $this->_temp = array_values($data);\n // Parse tree\n $this->addNodes();\n // Generate Breadcrumbs\n $this->generateBreadcrumbs();\n // Temporary flat array no longer needed.\n $this->_temp = null;\n }", "title": "" }, { "docid": "4d1ced3d3b081c3251db0427c1ab5cb3", "score": "0.639096", "text": "function array_flatten(array $data, int $level = 1): array\n {\n if (!$level) {\n return $data;\n }\n\n $output = [];\n foreach ($data as $arr) {\n $arr = (array)$arr;\n $output = array_merge($output, $arr);\n }\n\n return array_flatten($output, $level - 1);\n }", "title": "" }, { "docid": "5af08aedab175a34501869db395f2730", "score": "0.63886833", "text": "function array_inflate($array, $model_name, $remove_extra = false) {\n\t\t$inflated = Set::combine($array, '/'.$model_name.'/id', '/.');\n\n\t\tforeach ($inflated as $key => $node) {\n\t\t\tif ( ! $node[$model_name]['parent_id']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! isset($inflated[$node[$model_name]['parent_id']]['Child'.$model_name])) {\n\t\t\t\t$inflated[$node[$model_name]['parent_id']]['Child'.$model_name] = array( );\n\t\t\t}\n\n\t\t\t$inflated[$node[$model_name]['parent_id']]['Child'.$model_name][] =& $inflated[$key];\n\t\t}\n\n\t\tif ($remove_extra) {\n\t\t\tforeach ($inflated as $key => $node) {\n\t\t\t\tif ( ! empty($node[$model_name]['parent_id'])) {\n\t\t\t\t\tunset($inflated[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $inflated;\n\t}", "title": "" }, { "docid": "f409ce25bd566c14cae13ad7e62576e5", "score": "0.63858175", "text": "public static function flatten($array, $delimiter = '.', $depth = 0, $prefix = null) {\n $temp = [];\n\n foreach (static::toArray($array, false) as $k => $v) {\n $key = $prefix !== null ? $prefix . $delimiter . $k : $k;\n\n if (($depth === 0 || $depth > 1) && (is_object($v) || is_array($v))) {\n $temp[] = static::flatten($v, $delimiter, $depth === 0 ? $depth : $depth - 1, (string) $key);\n } else {\n $temp[] = [$key => $v];\n }\n }\n\n // Prevent resource-greedy loop.\n // @see https://github.com/dseguy/clearPHP/blob/master/rules/no-array_merge-in-loop.md\n if (count($temp)) {\n return array_merge(...$temp);\n }\n\n return [];\n }", "title": "" }, { "docid": "007f91431948062b657a9bbcd9a01363", "score": "0.6372187", "text": "public static function flatten($arr)\n {\n if (! is_array($arr)) {\n $arr = array(\n $arr\n );\n }\n\n $result = array();\n foreach ($arr as $element) {\n // Merge element to $result if it is an array.\n if (is_array($element)) {\n $result = array_merge($result, self::flatten($element));\n } else {\n // Add element to $result.\n $result[] = $element;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d27603cbbe3e91569a31f6777a8e88ac", "score": "0.63690966", "text": "public static function flat(array $elements) {\n $flat = [];\n $tmp = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($elements));\n foreach($tmp as $v) {\n $flat[] = $v;\n }\n return $flat;\n }", "title": "" }, { "docid": "8f18cfab489cbbe1d2a6f49fb7b42815", "score": "0.6360617", "text": "static function flatten(array $items){\n $result = [];\n foreach ($items as $item) {\n if (!is_array($item)) {\n $result[] = $item;\n } else {\n $result = array_merge($result, array_values($item));\n }\n }\n return $result;\n }", "title": "" }, { "docid": "97462e8decb4576ca05a3fb186376df7", "score": "0.63589704", "text": "function array_values_recursive($arr){\n $arr2=[];\n foreach ($arr as $key => $value)\n {\n if(is_array($value))\n { \n $arr2[] = $this->array_values_recursive($value);\n }else{\n $arr2[] = $value;\n }\n }\n return $arr2;\n }", "title": "" }, { "docid": "3a8b47304624a4bac5c2c32daf19c6d6", "score": "0.63252676", "text": "function array_flatten($x) \r\n{\r\n\tif (!is_array($x)) \r\n\t\treturn FALSE;\r\n\t\r\n\t$result = array();\r\n\tforeach ($x as $key => $val) \r\n\t\tif (is_array($val)) \r\n\t\t\t$result = array_merge($result, array_flatten($val));\t\t\r\n\t\telse \r\n\t\t\t$result[$key] = $val;\r\n\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "444f51619d492adc928d061d4bebd3d9", "score": "0.6318377", "text": "private static function flatten($data, $flatArray = array())\n {\n if (is_string($data)) {\n return $data;\n }\n\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $flatArray[$key] = null;\n $flatArray = array_merge(self::flatten($value, $flatArray), $flatArray);\n } else {\n $flatArray[$key] = $value;\n }\n }\n\n return $flatArray;\n }", "title": "" }, { "docid": "94354cc8205a618a969c849055ee4188", "score": "0.63159484", "text": "public function flatData();", "title": "" }, { "docid": "3c7fc6d5d12df6e8c8a8d4c318a986a2", "score": "0.6313536", "text": "protected static function flattenFromXml( $array ) {\n foreach ( $array as $k => $value ) {\n if ( is_array( $value )) {\n // get singular name of node\n $s = Str::singular( $k );\n\n // if the singular child node is present, is the only child and is an array\n if ( isset( $array[$k][$s] ) && is_array( $array[$k][$s] ) && count( $array[$k] ) == 1 )\n // remove the wrapping child\n $array[$k] = $array[$k][$s];\n\n // perform a deep traverse\n $array[$k] = self::flattenFromXml( $array[$k] );\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "f7ef63f88618f65be3d9747a2fe87fdd", "score": "0.63056016", "text": "public static function array_filter_recursive($array)\n {\n if (!is_array($array))\n {\n return $array;\n }\n\n foreach ($array as &$value)\n {\n if (is_array($value))\n {\n $value = self::array_filter_recursive($value);\n }\n }\n unset($value);\n\n return array_filter($array);\n }", "title": "" }, { "docid": "2f7b7a9450736edbb4ad17315bf13aa9", "score": "0.630046", "text": "static function deepFlatten($items){\n $result = [];\n foreach ($items as $item) {\n if (!is_array($item)) {\n $result[] = $item;\n } else {\n $result = array_merge($result, self::deepFlatten($item));\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d7c4bcd58ba1b8f05338fe9d8e06af25", "score": "0.62949824", "text": "public static function flatten($data)\n\t{\n\t\tif ( ! $data OR ! is_array($data))\n\t\t\treturn array();\n\n\t\treturn self::_flatten($data);\n\t}", "title": "" }, { "docid": "718543c3df4a1a3fef0e4ceec6c774a1", "score": "0.6294472", "text": "private function recursiveTreeStrip(array $data)\n {\n if (count($data) === 1 && !empty($data[0]['children'])) {\n return $this->recursiveTreeStrip($data[0]['children']);\n }\n\n return $data;\n }", "title": "" }, { "docid": "6d28fd2d3cf861e0533be06c728b79db", "score": "0.6268247", "text": "function array_filter_recursive($array)\n {\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $array[$key] = array_filter_recursive($array[$key]);\n\n if (empty($array[$key])) {\n unset($array[$key]);\n }\n }\n\n if (is_null($value)) {\n unset($array[$key]);\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "33fdfa82b60b23404ca03a876cbe0a8c", "score": "0.6268165", "text": "function flatten($collection, $depth = 1)\n{\n $result = [];\n\n foreach ($collection as $value) {\n if (is_array($value) && $depth > 0) {\n $result = array_merge($result, flatten($value, $depth - 1));\n } else {\n $result[] = $value;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "8d1c29c0828dc90eb14515040ca0c080", "score": "0.6267807", "text": "function array_collapse($array) //待改进\n\t{\n static $tmp = [] ;\n if(is_array($array)){\n foreach($array as $key => $val)\n {\n if(is_array($val))\n {\n $arr = array_collapse($val);\n } else {\n $tmp[] = $val;\n }\n }\n\n if(!empty($arr) && !empty($tmp))\n {\n $result = array_merge($arr , $tmp);\n } else if(!empty($arr)) {\n $result = $arr;\n } else if(!empty($tmp)) {\n $result = $tmp;\n }\n return array_unique($result);\n }\n\t}", "title": "" }, { "docid": "cf86b037484f255654c30daf6d66fb7f", "score": "0.6266505", "text": "public function fromRecursiveArray(array $data)\n {\n // Clear Data\n $this->clearData();\n // Create tree\n $this->convertToFlat($data);\n $this->addMetaData();\n // Generate Breadcrumbs\n $this->generateBreadcrumbs();\n // temp array is no longer needed\n $this->_temp = null;\n }", "title": "" }, { "docid": "bc451df2298996b6185deeef537a6886", "score": "0.62512255", "text": "public abstract function flatten(): ArrayList;", "title": "" }, { "docid": "84e56e83af9ce3def1ecc8bac04dddfa", "score": "0.6223359", "text": "function wpv_recursive_flatten_post_relationships( $relations_array, $low_level = '', $parent_sep = '>', $adjacent_sep = ',' ) {\n\t$my_aux = array();\n\tforeach ( $relations_array as $my_key => $my_value ) {\n\t\tif ( empty( $low_level ) ) {\n\t\t\t$my_aux[$my_key] = $my_key;\n\t\t} else {\n\t\t\t$my_aux[$my_key] = $my_key . $parent_sep . $low_level;\n\t\t}\n\t\tif ( !empty( $my_value ) ) {\n\t\t\t$my_aux[$my_key] = wpv_recursive_flatten_post_relationships( $my_value, $my_aux[$my_key], $parent_sep, $adjacent_sep );\n\t\t}\n\t}\n\t$flatten = implode( $adjacent_sep, $my_aux );\n\treturn $flatten;\n}", "title": "" }, { "docid": "92f0ae9c553ef5182a0f37120e022e40", "score": "0.6200974", "text": "public function flatten() {\n\t\treturn Arr::paths($this->getArrayCopy());\n\t}", "title": "" }, { "docid": "92f0ae9c553ef5182a0f37120e022e40", "score": "0.6200974", "text": "public function flatten() {\n\t\treturn Arr::paths($this->getArrayCopy());\n\t}", "title": "" }, { "docid": "66007e594f3aad2b9d553da4f109cd05", "score": "0.6198956", "text": "static public function flatten($array, $spec = '.')\n {\n static::doFlatten($array, $spec);\n\n return $array;\n }", "title": "" }, { "docid": "ccad76ee9eddeff4e65b09ec04907cb5", "score": "0.61967444", "text": "public function flatten_array(array $arr) : array\r\n\t{\r\n\t\t$return = array();\r\n\t\tarray_walk_recursive($arr, function($a) use (&$return) { $return[] = $a; });\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "05fcee4f39c2c04118a07ccc9e61c817", "score": "0.6189688", "text": "function flattenList(array $data, $separator = '.')\n{\n $result = array();\n $stack = array();\n $path = null;\n\n reset($data);\n while (!empty($data)) {\n $key = key($data);\n $element = $data[$key];\n unset($data[$key]);\n\n if (is_array($element) && !empty($element)) {\n if (!empty($data)) {\n $stack[] = array($data, $path);\n }\n $data = $element;\n reset($data);\n $path .= $key . $separator;\n } else {\n if (is_bool($element)) {\n $element = (int)$element;\n }\n $result[] = $path . $element;\n }\n\n if (empty($data) && !empty($stack)) {\n list($data, $path) = array_pop($stack);\n reset($data);\n }\n }\n return $result;\n}", "title": "" }, { "docid": "06650cd7e45bb74692e3fdcc90b50f8f", "score": "0.6186972", "text": "function flatten() {\n\t\t\n\t\t$result = array();\n\t\t\n\t\t// flatten the children and collect the results\n\t\tforeach($this->children as $child) {\n\t\t\t$result = array_merge($result, $child->flatten());\n\t\t\t\n\t\t}\n\t\t\n\t\t// prepend this node (minus the children) to the results\n\t\t$current_node = $this;\n\t\t$current_node->children = array();\n\t\tarray_unshift($result, $current_node);\n\t\t\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6e95dc3888a9afb0163ef765ee2a3ebe", "score": "0.6164847", "text": "function fancybox_array_flatten($array) {\n $result = array();\n if (is_array($array)) {\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $result += fancybox_array_flatten($value);\n }\n else {\n $result[$key] = $value;\n }\n }\n }\n return $result;\n}", "title": "" }, { "docid": "e03906e903d79294458c8b28eed83649", "score": "0.61529624", "text": "public function flatten(): self;", "title": "" }, { "docid": "60efd5c145511a9d09b21a4fa1607d8f", "score": "0.61524075", "text": "public static function flip_flatten($array)\n\t{\n\t\tif (empty($array))\n\t\t\treturn $array();\n\n\t\t$ret = array();\n\t\tforeach($array as $k => $v)\n\t\t{\n\t\t\tif ( ! is_array($v))\n\t\t\t\t$v = array($v);\n\n\t\t\t$values = array_values($v);\n\t\t\t$this_flip = array_fill_keys($values, $k);\n\n\t\t\t$ret = array_merge($ret, $this_flip);\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "e260cab41013428dbc51e1520dfc0664", "score": "0.6140578", "text": "public function stripslashesRecursive($array)\n {\n $new = array();\n foreach ($array as $key => $value) {\n $key = stripslashes($key);\n if (is_array($value)) {\n $new[$key] = $this->stripslashesRecursive($value);\n } else {\n $new[$key] = stripslashes($value);\n }\n }\n return $new;\n }", "title": "" }, { "docid": "5dc43da9d9f5f69af4aa2817d0ce4bc4", "score": "0.6135712", "text": "function arrayToTree(array $flat, int $root = 0): array\n {\n if (isTreeArray($flat)) {\n // if parent_id not exist, set them to zero\n $allIds = array_column($flat, 'id');\n $flat = array_map(function ($row) use ($allIds) {\n // parent_id < 0 means self-config, ignore\n if ($row['parent_id'] > 0 && !in_array($row['parent_id'], $allIds)) {\n $row['parent_id'] = 0;\n }\n\n return $row;\n }, $flat);\n\n $parents = [];\n foreach ($flat as $a) {\n $parents[$a['parent_id']][] = $a;\n }\n\n // if root does not exist\n if (!isset($parents[$root])) {\n return [];\n }\n\n return createTreeBranch($parents, $parents[$root]);\n }\n\n return [];\n }", "title": "" }, { "docid": "a50e13e1588576fe6a57817ad0fcc512", "score": "0.61205363", "text": "public static function flatten_(array &$arr, $depth = 999999, $topLevel = true) {\n\t\t$newArr = array();\n\t\tif($depth > 0) {\n\t\t\tforeach($arr as $key => &$value) {\n\t\t\t\tif(is_array($value) && $depth > 0) {\n\t\t\t\t\tforeach($value as $sKey => &$sVal) {\n\t\t\t\t\t\tif(is_array($sVal) && $depth > 1) {\n\t\t\t\t\t\t\t$newArr = array_merge($newArr, self::flatten($sVal, $depth-1, false));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$newArr[] = $sVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$newArr[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($topLevel) {\n\t\t\tif($arr != $newArr) {\n\t\t\t\t$arr = $newArr;\n\t\t\t\treturn $arr;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "d71dbda33609c1f2d84a0947e764019a", "score": "0.6104932", "text": "public function nestedToSingle(array $array) {\r\n\t\t$singleDimArray = [];\r\n\r\n\t\tforeach ($array as $item) {\r\n\t\t\tif (is_array($item)) {\r\n\t\t\t\t$singleDimArray = array_merge($singleDimArray, $this->nestedToSingle($item));\r\n\t\t\t} else {\r\n\t\t\t\t$singleDimArray[] = $item;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $singleDimArray;\r\n\t}", "title": "" }, { "docid": "94beca38bfb31400387efd422d869dea", "score": "0.6099703", "text": "protected static function flatten($array)\n {\n $result = [];\n\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $result = array_merge($result, static::flatten($value), [$key]);\n } else {\n $result[] = $value;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "66cf464069a5dcb2d3032133e5749f63", "score": "0.60992354", "text": "function array_replace_recursive($array, $array1)\n {\n $args = func_get_args();\n $array = $args[0];\n if (!is_array($array))\n {\n return $array;\n }\n for ($i = 1; $i < count($args); $i++)\n {\n if (is_array($args[$i]))\n {\n $array = recurse($array, $args[$i]);\n }\n }\n return $array;\n }", "title": "" } ]
591845f8994e65b27e91966714c1a975
TODO: Implement getVerbosity() method.
[ { "docid": "5d9dd29b2c00f6019a9cdb8da85260d4", "score": "0.8255348", "text": "public function getVerbosity()\n {\n }", "title": "" } ]
[ { "docid": "df3b6fb98b157d7a97f66f731e0bb38d", "score": "0.8146058", "text": "public function getVerbosity();", "title": "" }, { "docid": "d1bca25deae5fe197a382bc0dbc4eb8e", "score": "0.7576677", "text": "public function getOutputVerbosity();", "title": "" }, { "docid": "0f4afd214ee08cb6724047780a5c0d65", "score": "0.72740525", "text": "public function getVerbosity() {\n\t\treturn $this->verbosity;\n\t}", "title": "" }, { "docid": "cbfc2f44b803dbc77cac81606790a51c", "score": "0.71843076", "text": "public function getVerbosity()\n {\n return $this->decoratedOutput->getVerbosity();\n }", "title": "" }, { "docid": "d83c1c73b420d1ef08a15e23c06f68ae", "score": "0.68100286", "text": "public function currentVerbosity(): int\n {\n return $this->verbosity;\n }", "title": "" }, { "docid": "3c1af69d3dc8d8a0af7e93041a6ec022", "score": "0.67256343", "text": "function getVerbosity()\n {\n $this->methodExpectsRequest(__METHOD__);\n return $this->getRequest()->getVerbosity();\n }", "title": "" }, { "docid": "c2c42eabc5403a82d2fbf0db65dc8a77", "score": "0.59727776", "text": "protected function _determineVerbosity()\n\t\t{\n\t\t\t$nReporting = ini_get( \"error_reporting\" );\n\t\t\tif ( E_STRICT & $nReporting )\n\t\t\t\treturn 4; // Debug - Very strict, al lot of information\n\t\t\telse if ( E_ALL & $nReporting )\n\t\t\t\treturn 3; // All - A lot of information\n\t\t\telse if ( E_NOTICE & $nReporting )\n\t\t\t\treturn 2; // Info - Much information\n\t\t\telse if ( E_WARNING & $nReporting )\n\t\t\t\treturn 1; // Only warnings - less informative\n\t\t\telse if ( E_ERROR & $nReporting )\n\t\t\t\treturn 0; // Only critial information - least informative\n\n\t\t\treturn 3;\n\t\t}", "title": "" }, { "docid": "1daedb1c3cc15754fa93f9a8d9b800c0", "score": "0.5921037", "text": "public function setVerbosity(int $level);", "title": "" }, { "docid": "59d1fb689c8c23c2aaeb52e2a8f156cd", "score": "0.58671033", "text": "public function setVerbosity($level)\n {\n }", "title": "" }, { "docid": "eb00ae956d2da676c97e85bde2685123", "score": "0.57458484", "text": "protected function getVerbosityLevel()\n {\n // If `null`, is not yet set\n if (null === $this->verbosityLevel) {\n // Set the global verbosity level that is set as NORMAL by the TreeBuilder in Configuration\n $level = strtoupper($this->getContainer()->getParameter('liip_functional_test.command_verbosity'));\n $verbosity = '\\Symfony\\Component\\Console\\Output\\StreamOutput::VERBOSITY_'.$level;\n\n $this->verbosityLevel = constant($verbosity);\n }\n\n // If string, it is set by the developer, so check that the value is an accepted one\n if (is_string($this->verbosityLevel)) {\n $level = strtoupper($this->verbosityLevel);\n $verbosity = '\\Symfony\\Component\\Console\\Output\\StreamOutput::VERBOSITY_'.$level;\n\n if (!defined($verbosity)) {\n throw new \\OutOfBoundsException(\n sprintf('The set value \"%s\" for verbosityLevel is not valid. Accepted are: \"quiet\", \"normal\", \"verbose\", \"very_verbose\" and \"debug\".', $level)\n );\n }\n\n $this->verbosityLevel = constant($verbosity);\n }\n\n return $this->verbosityLevel;\n }", "title": "" }, { "docid": "3020509c8e29846a6e7c7863f39e2a01", "score": "0.571879", "text": "public function isVerbose()\n {\n }", "title": "" }, { "docid": "68a4306872f2657efbb4f9271b19be9e", "score": "0.5696919", "text": "public function isVerbose();", "title": "" }, { "docid": "68a4306872f2657efbb4f9271b19be9e", "score": "0.5696919", "text": "public function isVerbose();", "title": "" }, { "docid": "1f0b3394f82990c25ef66862f39ac0a3", "score": "0.5635157", "text": "private function getImportErrorsVerbosity() {\n\n return $this->input->getOption('skip-errors')\n ? OutputInterface::VERBOSITY_NORMAL\n : OutputInterface::VERBOSITY_QUIET;\n }", "title": "" }, { "docid": "d67c5ec915276c91dde05c50a5398cbe", "score": "0.5621351", "text": "public function isVeryVerbose();", "title": "" }, { "docid": "4737aa686350b689d75949d49cb403fe", "score": "0.5583433", "text": "public function isVeryVerbose()\n {\n }", "title": "" }, { "docid": "779f76824eeb0916c5fdee9b82f951bf", "score": "0.541747", "text": "public function setOutputVerbosity($level);", "title": "" }, { "docid": "0a9c0c185a7413e86a6aafbd5127114b", "score": "0.5392999", "text": "public function isVerbose()\n {\n return $this->decoratedOutput->isVerbose();\n }", "title": "" }, { "docid": "58ecda11889bf157042d9e05ab4e0bc8", "score": "0.5243503", "text": "public function summary();", "title": "" }, { "docid": "727d63eb7915665ea9db4d62a829911a", "score": "0.5207238", "text": "public function getPriority()\n {\n }", "title": "" }, { "docid": "61e298181e9da87be4ad99af4def8655", "score": "0.5164619", "text": "public function isVeryVerbose()\n {\n return $this->decoratedOutput->isVeryVerbose();\n }", "title": "" }, { "docid": "a92ad151bf3ac856a72015deb3dbd903", "score": "0.5135878", "text": "public function setVerbosity($verbosity)\n {\n $this->verbosity = (integer)$verbosity;\n }", "title": "" }, { "docid": "63740c9de6383723915e4257b8d28874", "score": "0.5117108", "text": "public function getSeverity() {}", "title": "" }, { "docid": "63740c9de6383723915e4257b8d28874", "score": "0.5116849", "text": "public function getSeverity() {}", "title": "" }, { "docid": "f6fd52fa32bdf77820ba50b4eaa14090", "score": "0.51051474", "text": "function dumpContents()\r\n {\r\n\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n //TODO [Perez][JLeon] Do we leave this method?\r\n // call the OnShow event if assigned so the Text property can be changed\r\n if ($this->_onshow != null)\r\n {\r\n $this->callEvent('onshow', array());\r\n }\r\n\r\n $avalue = $this->_text;\r\n $avalue=str_replace('\"','&quot;',$avalue);\r\n $type = \"progress\";\r\n if ($this->_type == pbsMeterBar)\r\n $type = \"meter\";\r\n echo \"<$type id=\\\"$this->_name\\\" value=\\\"$avalue\\\" $attributes>$this->_text</$type>\";\r\n\r\n }", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5073159", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5073159", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5073159", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5073159", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5073159", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5072104", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5072104", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5072104", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071981", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071981", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071981", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071981", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071981", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "e0755ad6aa53e7703633a8506dd77c45", "score": "0.5071577", "text": "public function getPriority() {}", "title": "" }, { "docid": "fee6cdb283575f11b21b12646ccf494b", "score": "0.5052791", "text": "public function getOutput() {}", "title": "" }, { "docid": "1ccd554e2052d5f9b00d21bd490f7513", "score": "0.50425136", "text": "public function getConsoleOutput()\n {\n return $this->readOneof(56);\n }", "title": "" }, { "docid": "b4cb43b2179dd58c320bf310f425280a", "score": "0.5023453", "text": "public function setVerbosity( $nLevel=null )\n\t\t{\n\t\t\tif ( $nLevel === null )\n\t\t\t\t$nLevel = $this->_determineVerbosity();\n\t\t\t$this->_verbositylevel = $nLevel;\n\t\t}", "title": "" }, { "docid": "482661fcf45b1dcf6f66514f740618a9", "score": "0.50164413", "text": "public function getPriority()\n {\n return 10;\n }", "title": "" }, { "docid": "8840376d67ab10b456d00a801e31904f", "score": "0.50140864", "text": "function __toString() {\n return $this->name . \" says \" . $this->sound . \" give me some \" . $this->favoriteFood . \" my id is \" . $this->id . \"<br>Total animals: \" . Animal::$numberOfAnimals . \"<br><br>\";\n }", "title": "" }, { "docid": "38a1eb9841acc1ee164f04b1af6bb4dd", "score": "0.5009893", "text": "function __toString(): string\n {\n return $this->lineWidth->toString() . \" w\\n\";\n }", "title": "" }, { "docid": "e1331e7b430477df6ceb22f01d5add13", "score": "0.49940735", "text": "public function getPriority()\n {\n return 80;\n }", "title": "" }, { "docid": "2e12c2781086c27ff9b833d9a92c9c5e", "score": "0.49869537", "text": "public function getPrintFlag() {}", "title": "" }, { "docid": "a0c3d758c5c7187475ac9332612a32bf", "score": "0.4982379", "text": "public function setVerbosity($level)\n {\n $this->decoratedOutput->setVerbosity($level);\n }", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.49579382", "text": "public function output() {}", "title": "" }, { "docid": "50f29f3e378511de06886066d9179f10", "score": "0.4953948", "text": "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "title": "" }, { "docid": "ee9aeabfe001315362473f1fb6f22922", "score": "0.49143746", "text": "public function depth() {\n return $this->depth;\n }", "title": "" }, { "docid": "6a4d96a0a014802f04426d41308971fc", "score": "0.48986864", "text": "public function getVerbosity($level = null): int\n {\n if ($level === null) {\n return $this->verbosity;\n }\n\n if (isset($this->verbosityMap[$level])) {\n return $this->verbosityMap[$level];\n }\n\n return (int) $level;\n }", "title": "" }, { "docid": "41d939faa17054a11aebbd98558bea7a", "score": "0.48961693", "text": "public function writeTop()\n {\n }", "title": "" }, { "docid": "b16954ccc7fca64af34dc2126b82c973", "score": "0.48946893", "text": "public function preview()\n {\n $message = $this->get('message');\n if ($message) {\n $this->console->output($message);\n }\n }", "title": "" }, { "docid": "012bf8edb416575f313233a0b888dd57", "score": "0.48915625", "text": "public function getPriority()\n {\n return 75;\n }", "title": "" }, { "docid": "6b9be074c4d7dad7ecb718cc58b0acef", "score": "0.48875672", "text": "public function getDebugOutput()\n {\n }", "title": "" }, { "docid": "3e442ed94918e093b6a9c6c8abb22a5a", "score": "0.4886982", "text": "function getPriority()\n {\n return $this->instance->getPriority();\n }", "title": "" }, { "docid": "33f6724a5c3fab59140baa7d5b4aa541", "score": "0.48748377", "text": "function get_summary() {\n return $this->summary;\n }", "title": "" }, { "docid": "e72324057dbe3604fe8c52111ab90728", "score": "0.48746726", "text": "public function getDepth() {}", "title": "" }, { "docid": "e72324057dbe3604fe8c52111ab90728", "score": "0.4873819", "text": "public function getDepth() {}", "title": "" }, { "docid": "1f9c9044f3deefa2a941ef8acbc6ceac", "score": "0.48678586", "text": "public function getDepth():int;", "title": "" }, { "docid": "7ba3dc53af09168d7ed2bf8a3b9cb65b", "score": "0.48650897", "text": "function __toString() {\n\n\t\t\treturn $this->name . \" says \" . $this->sound . \" give me some \" . $this->favorite_food . \" my id is \" . $this->id . \" total animals = \" . Animal::$number_of_animals . \"</br> </br>\";\n\n\t\t}", "title": "" }, { "docid": "d20cf80f9b7fd98d4cb80f8b98e2657d", "score": "0.48636252", "text": "function getQuality() {return $this->_quality;}", "title": "" }, { "docid": "3da2f271f8f96ab5ae55233fe4ca3627", "score": "0.4862608", "text": "public function recap(){\n\t\techo \"----- INFO\" . $this->getNom() . \" ----- <br>\";\n\t\techo $this->getNom() . \" a \" . $this->getVie() . ' points de vie <br>';\n\t}", "title": "" }, { "docid": "4670897f51e1c2b764bdaf1a2f7c84f2", "score": "0.485245", "text": "function print_count() {\r\n $span = '<span class=\"count\">' . number_format($this->result_count) . '</span> result';\r\n if ($this->result_count > 1) {\r\n $span .= 's';\r\n }\r\n return $span;\r\n }", "title": "" }, { "docid": "e00e1ac79187e55b49e72aebf7d706fd", "score": "0.48524034", "text": "function trace(){\n\t\techo($this->get_trace()/(1024*1024).\" MB\");\n\t}", "title": "" }, { "docid": "8daab7f51ead59d1d2e7a1c9f99e287b", "score": "0.48504364", "text": "public function getPriority(): int\n {\n return -15;\n }", "title": "" }, { "docid": "80d31379bddb733729001df8485def9c", "score": "0.48415858", "text": "static public function getPriority() {\n return 0;\n }", "title": "" }, { "docid": "c85190f522a93a89b441f1c881048b88", "score": "0.4840648", "text": "function __toString () {\n \n \n \n }", "title": "" }, { "docid": "cf59edf17362cb8ea635ed04f3dc82d5", "score": "0.4831974", "text": "public function stats()\n {\n }", "title": "" }, { "docid": "4231122b72525a1d26b48e30cfd2a9ae", "score": "0.48196083", "text": "public function setVerbosity($level): void\n {\n $this->verbosity = $this->getVerbosity($level);\n }", "title": "" }, { "docid": "15c6745f20ba7da1e7c953e6bff98030", "score": "0.48143378", "text": "public static function output() {}", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.48041785", "text": "public function getSummary();", "title": "" }, { "docid": "5bcd2a2cf998a72f771693705d5ff808", "score": "0.48011422", "text": "public function __toString()\n {\n return \"<b>\" . $this->_name . \"</b> => <br />Tanks: \" . $this->_stats[\"tank\"] . PHP_EOL .\n \"<br />Aircrafts: \" . $this->_stats[\"airplane\"] . PHP_EOL .\n \"<br />Helicopters: \" . $this->_stats[\"hellicopter\"] . PHP_EOL .\n \"<br />Ships: \" . $this->_stats[\"ship\"] . PHP_EOL .\n \"<br />Soldiers: \" . $this->_stats[\"soldier\"] . \"<br />\" . PHP_EOL;\n }", "title": "" }, { "docid": "ecc055f7a157d0e1a92470b92826832d", "score": "0.4799322", "text": "private function print() {\n\t\tvar_dump($this->getParams());\n\t}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47986972", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47986972", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47986972", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47986972", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47986972", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47980946", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47980946", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47980946", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.47977757", "text": "public function printContent() {}", "title": "" } ]
eecd176a3c59ac4280cd9b3ab857907a
calcular precio total del pedido
[ { "docid": "41b8f065105a35417571b7d73640c69d", "score": "0.7232917", "text": "public function PrecioTotalPedido($ID){\n\t\t$ID_Pedido=desencriptar($ID);\n\t\t$preciomenu= $this->Configuracion_model->verPrecioMenu();\n\t\t$venta_list = $this->Pedido_model->verVenta($ID_Pedido);\n\t\t$total=0;\n\t\tforeach ($venta_list->result() as $aux){\n\t\t\t$ID_Almacen = desencriptar($_SESSION['ID_Almacen']);\n\t\t\t$ID_Perfil = desencriptar($_SESSION['ID_Perfil']);\n\t\t\tif($aux->ID_Almacen == 1){\n\t\t\t\tif(($aux->EsMenu==1 && $aux->ID_Familia==2 )|| ($aux->EsMenu==0)){\n\n\t\t\t\t\tif($aux->EsMenu==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$precioUnitario = $preciomenu;\n\t\t\t\t\t\t$total = $total + $preciomenu * $aux->Cantidad;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$precioUnitario = $aux->Precio;\n\t\t\t\t\t\t $total = $total + $aux->Precio * $aux->Cantidad;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( $aux->ID_Almacen == 2){\n\t\t\t\tif(($aux->EsMenu2==1 && $aux->ID_Familia==2 )|| ($aux->EsMenu2==0)){\n\n\t\t\t\t\tif($aux->EsMenu2==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$precioUnitario = $preciomenu;\n\t\t\t\t\t\t$total = $total + $preciomenu * $aux->Cantidad;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$precioUnitario = $aux->Precio;\n\t\t\t\t\t\t $total = $total + $aux->Precio * $aux->Cantidad;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($aux->ID_Almacen == 3){\n\t\t\t\tif(($aux->EsMenu3==1 && $aux->ID_Familia==2 )|| ($aux->EsMenu3==0)){\n\n\t\t\t\t\tif($aux->EsMenu3==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$precioUnitario = $preciomenu;\n\t\t\t\t\t\t$total = $total + $preciomenu * $aux->Cantidad;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$precioUnitario = $aux->Precio;\n\t\t\t\t\t\t $total = $total + $aux->Precio * $aux->Cantidad;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn number_format($total,2);\n\t}", "title": "" } ]
[ { "docid": "b6941df768f7183c154e2d458952995b", "score": "0.7450254", "text": "public function total()\n {\n $pedido = \\Session::get('pedido');\n $total = 0;\n $subtotal = $this->subtotal();\n $iva = $this->iva();\n foreach ($pedido as $item) {\n $total += $subtotal + $iva;\n }\n return $total;\n }", "title": "" }, { "docid": "c26a798e08158e79907cc41f6559507a", "score": "0.7356456", "text": "public function porcentagemDistancia() {\r\n\t\tglobal $DB;\r\n\t\t$curso_id = $this->_cursolv->getConfiguracao()->id_curso;\r\n\t\t$soma = $DB->get_record('tarefalv', array('course'=>$curso_id), 'SUM(porcentagem) as total');\r\n\t\r\n\t\treturn $soma->total;\r\n\t}", "title": "" }, { "docid": "a619fe73379eb8798060a4d16e8a7371", "score": "0.720038", "text": "public function subtotal()\n {\n $pedido = \\Session::get('pedido');\n $subtotal = 0;\n foreach ($pedido as $item) {\n $subtotal += $item->precio + $item->precio_users + $item->precio_servicio;\n }\n return $subtotal;\n }", "title": "" }, { "docid": "26bdc3350d974023136f61ea4c867d9a", "score": "0.710883", "text": "function getTotal()\n {\n $total = 0;\n for ($i = 0; $i < count($_SESSION['panier']); $i++) {\n $total += $_SESSION['panier'][$i]->getQuantity() * $_SESSION['panier'][$i]->getPrice();\n }\n $this->totalPrice = round($total, 2);\n return $this->totalPrice;\n }", "title": "" }, { "docid": "64c4baf79bce823273cb94c961daab59", "score": "0.7098615", "text": "function calcularPorcentajePlanEstudiante(){\n $setenta=$this->consultarPorcentajePlan($this->codigoEstudiante);\n if(is_array($setenta)&&isset($setenta[0]['CREDITOS_PLAN']))\n {\n switch (trim($setenta[0]['TIPO_ESTUDIANTE'])){\n case 'S':\n $porcentaje=($setenta[0]['CREDITOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n case 'N':\n $porcentaje=($setenta[0]['ESPACIOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n default :\n $porcentaje=0;\n break;\n }\n $porcentaje=floor($porcentaje);\n }elseif(!is_array($setenta))\n {\n $porcentaje=0;\n }\n else\n {\n if(strlen($this->codigoEstudiante)>10&&substr($this->codigoEstudiante, -11,5)>=20112)\n {\n $porcentaje=0;\n }else{$porcentaje='';}\n }\n return $porcentaje;\n\t}", "title": "" }, { "docid": "2d61c14ea79771debb2b2373f86ba63c", "score": "0.7085482", "text": "function subtotal($linea_pedido){\r\n $totalIVA = 0;\r\n foreach($linea_pedido as $carro){\r\n if($carro[\"iva_r\"] == 0){\r\n $totalIVA += $carro[\"precio\"]+($carro[\"precio\"]*0.21);\r\n }\r\n else{\r\n $totalIVA += $carro[\"precio\"]+($carro[\"precio\"]*0.10);\r\n }\r\n }\r\n return $totalIVA;\r\n }", "title": "" }, { "docid": "37d944ce87d934985fc7e2d65ba3a199", "score": "0.7085392", "text": "function calcularPorcentajePlanEstudiante(){\n $setenta=$this->consultarPorcentajePlan($this->codigoEstudiante);\n if(is_array($setenta)&&isset($setenta[0]['CREDITOS_PLAN']))\n {\n switch (trim($setenta[0]['TIPO_ESTUDIANTE'])){\n case 'S':\n $porcentaje=($setenta[0]['CREDITOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n case 'N':\n $porcentaje=($setenta[0]['ESPACIOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n default :\n $porcentaje=0;\n break;\n }\n $porcentaje=floor($porcentaje);\n }elseif(!is_array($setenta))\n {\n $porcentaje=0;\n }\n else\n {\n if(strlen($this->codigoEstudiante)>10&&substr($this->codigoEstudiante, -11,5)>=20112)\n {\n $porcentaje=0;\n }else{$porcentaje=0;}\n }\n return $porcentaje;\n\t}", "title": "" }, { "docid": "65bb9f6578c8d7110f6d26941ed49455", "score": "0.70386726", "text": "public function total(){\n $prix = 0;\n $ids = array_keys($_SESSION['panier']);\n if(empty($ids)){\n $products = array();\n }else{\n $products = $this->BDD->req('SELECT id, prix_produit FROM produit WHERE id IN ('.implode(',', $ids).')');\n }\n foreach ($products as $product) {\n $prix += $product->prix_produit * $_SESSION['panier'][$product->id];\n }\n return $prix;\n }", "title": "" }, { "docid": "95342f774d1c7f4048ea72ea12c0c5b5", "score": "0.7032358", "text": "public function getTotalPrice(){\n $orders = $this->data->orders;\n $total_price=0;\n for ($i = 0; $i < sizeof($orders); $i++) {\n $total_price = $total_price+$orders[$i]->final_price;\n $total_price = round($total_price,2);\n }\n\n return $total_price;\n }", "title": "" }, { "docid": "d81a970b1b84577fc8d5ddab7cf8babc", "score": "0.7024453", "text": "function montantTotal()\n{\n $total = 0;\n // La boucle FOR tourne autant de fois qu'il y a d'id_produit dans la session, donc autant qu'il y a de produits dans le panier\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n // 3 50\n $total += $_SESSION['panier']['quantite'][$i] * $_SESSION['panier']['prix'][$i];\n // 15 + 17 + 150\n }\n return round($total, 2); // on arrondi le total à 2 chiffres après la vrigule\n}", "title": "" }, { "docid": "b94027dfd35ef52351f5a30a3417776e", "score": "0.6985076", "text": "function pmonto_total($Sesion){\n\treturn $Sesion->get_var(\"pmonto_total\");\n}", "title": "" }, { "docid": "0cf4d51f84a927d9b79161e0762cf3c8", "score": "0.6942558", "text": "public function dameSueldoTotal(): float{\n //return $this->getSueldo() + $this->incentivo;// no hace falta porque el modificar de acceso de sueldo de la clase padre es protected\n return $this->sueldo + $this->incentivo;\n }", "title": "" }, { "docid": "03b663d8922aeb07b07e1d56803dd7d1", "score": "0.6908748", "text": "function calculaTotalPedidoListaProductos ($resultadoConsulta) {\n\t$total = 0;\n\n\twhile ($producto = mysql_fetch_array($resultadoConsulta, MYSQL_ASSOC)) {\n\t\t$cantidad = $producto['CANTIDAD'];\n\t\t$cantidadRevisada = $producto['CANTIDAD_REVISADA'];\n\t\t$peso_por_unidad = $producto['PESO_POR_UNIDAD'];\n\n\t\t$subtotalRevisado = 0;\n\t\t\n\t\tif (!isset($cantidad) || $cantidad==0) {\n\t\t\tif (isset($cantidadRevisada) && $cantidadRevisada>=0) {\n\t\t\t\tif (isset($peso_por_unidad) && $peso_por_unidad>0) {\n\t\t\t\t\t$precio_por_kg = $producto['PRECIO'] / $peso_por_unidad;\n\t\t\t\t\t$subtotalRevisado = round(($precio_por_kg * $cantidadRevisada), 2);\n\t\t\t\t} else {\n\t\t\t\t\t$subtotalRevisado = round(($producto['PRECIO'] * $cantidadRevisada), 2);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$subtotalRevisado = round(($producto['PRECIO'] * $cantidad), 2);\n\t\t}\n\n\t\t$total += $subtotalRevisado;\n\t}\n\n\treturn $total;\n}", "title": "" }, { "docid": "cc245268bd1f980891d73f5813890cd9", "score": "0.69047695", "text": "function calculaSaldoPendienteUsuario ($usuario) {\n\t$consulta2 = \"select * from (\n\t\tselect ID_PEDIDO, FECHA_PEDIDO AS FECHA, CONCAT('COMPRA LOTE ', LOTE) as CONCEPTO, '0' AS IMPORTE, '1' AS ESDEBE, RE\n\t\tFROM PEDIDOS WHERE ID_USUARIO = '\".$usuario.\"' AND ESTADO = 'PREPARACION'\n\t) tabla order by FECHA\";\n\t\n\t$resUsuarios = consulta($consulta2);\n\t$total = 0;\n\t\n\twhile ($filaUsuarios = extraer_registro($resUsuarios)) {\n\t\t// Calcular importe real de pedido de usuario\n\t\t$totalRevisado = 0;\n\t\t$tieneRE = $filaUsuarios['RE'] == '1';\n\t\t\n\t\t$resProductos = consulta(\"select PP.* from PEDIDOS_PRODUCTOS PP where ID_PEDIDO='\".$filaUsuarios['ID_PEDIDO'].\"'\");\n\t\twhile ($filaProd = extraer_registro($resProductos)) {\n\t\t\t$cantidad = $filaProd['CANTIDAD'];\n\t\t\t\n\t\t\t$cantidadRevisada = $filaProd['CANTIDAD_REVISADA'];\n\t\t\t$peso_por_unidad = $filaProd['PESO_POR_UNIDAD'];\n\t\t\t\n\t\t\tif (isset($cantidadRevisada) && $cantidadRevisada>=0) {\n\t\t\t\tif (isset($peso_por_unidad) && $peso_por_unidad>0) {\n\t\t\t\t\t$precio_por_kg = $filaProd['PRECIO'] / $peso_por_unidad;\n\t\t\t\t\t$subtotalRevisado = round(($precio_por_kg * $cantidadRevisada), 2);\n\t\t\t\t} else {\n\t\t\t\t\t$subtotalRevisado = round(($filaProd['PRECIO'] * $cantidadRevisada), 2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (isset($peso_por_unidad) && $peso_por_unidad>0) {\n\t\t\t\t\t$precio_por_kg = $filaProd['PRECIO'] / $peso_por_unidad;\n\t\t\t\t\t$cantidadRevisada = round(($cantidad * $peso_por_unidad), 2);\n\t\t\t\t\t$subtotalRevisado = round(($precio_por_kg * $cantidadRevisada), 2);\n\t\t\t\t} else {\n\t\t\t\t\t$cantidadRevisada = $cantidad;\n\t\t\t\t\t$subtotalRevisado = round(($filaProd['PRECIO'] * $cantidadRevisada), 2);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$totalRevisado += $subtotalRevisado;\n\t\t}\n\t\t$total += $totalRevisado;\n\t\t\n\t\tif ($tieneRE) { //SUMAMOS AL DEBE EL R.E.\n\t\t\t$total += calculaREPedido($filaUsuarios['ID_PEDIDO']);\n\t\t}\n\t} \n\t\n\treturn $total;\n}", "title": "" }, { "docid": "b2682fc29dcd842137bd32546fa309df", "score": "0.6896201", "text": "public function getTotal(){\n\t\t$products = BuyProductData::getAllByBuyId($this->ID_COMPRA);\n\t\t$total=0;\n\t\tforeach ($products as $px) {\n\t\t\t$p = ProductData::getById($px->PRODUCTO_ID);\n\t\t\t$total+=$p->PRECIO*$px->Q;\n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "70a04369c39d456413358caf0479e168", "score": "0.6895891", "text": "function monto_total($Sesion){\n\treturn $Sesion->get_var(\"cmonto_total\") - $Sesion->get_var(\"pmonto_total\");\n}", "title": "" }, { "docid": "64aae247adb09c6154bd0c95a7fb8e69", "score": "0.68448967", "text": "function MontantTotal() {\n \n \n /// creer une variable total , initialiser à 0 \n $total = 0 ; \n \n /// on parcours le panier \n \n for ($i=0; $i <count($_SESSION['panier']['libelleProduit']); $i++) \n {\n /// on additionne le montant de chaque produit , on multiplie le prix par la quantite de chaque produit\n \n $total += $_SESSION['panier']['quantiteProduit'][$i] * $_SESSION['panier']['prixProduit'][$i]; \n \n }\n /// on retourne le montant total \n return $total ; \n }", "title": "" }, { "docid": "6f25006dbca4708894c054935ce3bcf2", "score": "0.6826935", "text": "function getTotalDescuentos($idCaja)\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\t\t$ci->db->select('SUM(descuento) as total');\n\t\t$ci->db->from('ventas');\n\t\t$ci->db->where('caja_id',$idCaja);\n\t\t$ci->db->group_by('caja_id');\n\t\t$query = $ci->db->get();\n\t\tif ($query->num_rows() > 0 ) {\n\t\t\treturn number_format($query->row()->total, 2, '.', '');\n\t\t}\n\t\treturn '0.00';\n\t \n\t}", "title": "" }, { "docid": "5801e8c63d27ccac7b814036433b69e7", "score": "0.67776024", "text": "public function total()\n {\n return number($this->sum('discount'));\n }", "title": "" }, { "docid": "ac88464376d01b32a2106ea19aca1053", "score": "0.67687833", "text": "public function getPeso(): float;", "title": "" }, { "docid": "da844cb9518f75f3be0dfb691dd28e03", "score": "0.67653793", "text": "private function calcTotalAmount()\n\t{\n\n\t\t$total = 0;\n\t\tforeach ($this->products as $product) {\n\t\t\t$total += $product->getPrice();\n\t\t}\n\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "750794124a65dd3541addefe13890678", "score": "0.67327267", "text": "function cmonto_total($Sesion){\n\treturn $Sesion->get_var(\"cmonto_total\");\n}", "title": "" }, { "docid": "9d7129368cfffa9e6dd52c717380fe31", "score": "0.6717132", "text": "public function getMontoPagado() {\n\t\t$total = $this->getMontoPagadoCheque ();\n\t\t$total = $total + Pago::model ()->getTotalMontoTransfenrencia ( $this->id_pago );\n\t\t$total = $total + Pago::model ()->getTotalMontoEfectivo ( $this->id_pago );\n\t\t$total = $total + Pago::model ()->getTotalMontoTarjeta ( $this->id_pago );\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "3646aa3950ce5c78314b2b03bc67aad2", "score": "0.67014915", "text": "public function get_total_cost()\n\t{\n\t\t$num = '0.00';\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\t// se há items para mostrar\n\t\t\t\n\t\t\t// busca os id's dos produtos\n\t\t\t$ids = $this->get_ids();\n\t\t\t\n\t\t\t// busca os preços dos produtos\n\t\t\tglobal $Products;\n\t\t\t$prices = $Products->get_prices($ids);\n\t\t\t\n\t\t\t// faz o loop, adicionando o custo de cada item * o nº de item no carrinho ao $num cada vez que faz o loop\n\t\t\tif ($prices != NULL)\n\t\t\t{\n\t\t\t\tforeach($prices as $price)\n\t\t\t\t{\n\t\t\t\t\t$num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}", "title": "" }, { "docid": "859968863a5318cd33faf2dfaacd0c6f", "score": "0.67011505", "text": "public function get_total()\n {\n //$query = $this->connection->query(\"SELECT count(*) as cantidad FROM producto s Inner Join impuestos i on s.id_impuesto = i.id_impuesto\");\n $query = $this->connection->query(\"SELECT count(*) as cantidad FROM producto s\");\n return $query->row()->cantidad; \n }", "title": "" }, { "docid": "533d5b5dce3be1ef8bc6d3e2793ee754", "score": "0.66977495", "text": "public function montoTotal($mes,$anio);", "title": "" }, { "docid": "7d26d33d714c87e95b9d649a84ba0d1f", "score": "0.66843957", "text": "public function getFreteTotal()\n {\n //frete total\n $frete_total = 0;\n \n //loop em todos os itens do pedido\n foreach( $this->getItem() as $item )\n {\n $frete_total += $item->getFreteValor();\n }\n \n return $frete_total;\n }", "title": "" }, { "docid": "014067abd19a192f282ce994742a0057", "score": "0.6672901", "text": "public function total(){\n return $this->contenido_carrito['total_carrito'];\n }", "title": "" }, { "docid": "929336f5ada6043e464d862057004698", "score": "0.66706574", "text": "function calcularTotalRevisadoProveedorCompradoPorUsuariosSinRecargo ($idProveedor, $totalesPorProveedor) {\n\t$total = 0.00;\n\t\n\ttry {\n\t\t// Recorrer el array y sumar el total de precio * cantidad_pedida_usuario, si corresponde al proveedor\n\t\tforeach ($totalesPorProveedor as $array_total_producto) {\n\t\t\t$id_proveedor_actual = $array_total_producto[0];\n\t\t\t$id_producto = $array_total_producto[1];\n\t\t\t$precio = $array_total_producto[2];\n\t\t\t$cantidad_pedida_usuario = $array_total_producto[3];\n\t\t\t$cantidad_pedida_proveedor = $array_total_producto[4];\n\t\t\t\t\n\t\t\tif ($id_proveedor_actual == $idProveedor) {\n\t\t\t\t$recargo = calculaRecargoProducto($id_producto);\n\t\t\t\tif ($recargo && $recargo>0.01) {\n\t\t\t\t\t//Precio sin recargo\n\t\t\t\t\t//$precio = round(($precio - ($precio * $recargo / 100)), 2);\n\t\t\t\t\t$precio = round( (($precio*100)/($recargo+100)), 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$total += round(($precio * $cantidad_pedida_usuario), 2);\n\t\t\t}\n\t\t}\n\t} catch ( Exception $ex ) {\n\t\t$total = -1;\n\t}\n\t\n\t@mysql_close($conexion);\n\t\n\treturn $total;\n\t\n\t$error = 0; //variable para detectar error\n\t$total = 0.00;\n\t\n\ttry {\n\t\t$cajaActual = consultarCajaActual ();\n\t\n\t\t$conexion = conectar();\n\t\t\t\n\t\tif ($conexion==FALSE) {\n\t\t\t$error = 1;\n\t\t}\n\t\n\t\tif (!$error) {\n\t\t\t$res = mysql_query(\"select distinct PP.*\n\t\t\t\t\t\tfrom PEDIDOS P, PEDIDOS_PRODUCTOS PP, PRODUCTOS PR\n\t\t\t\t\t\twhere P.ID_PEDIDO=PP.ID_PEDIDO and PP.ID_PRODUCTO=PR.ID_PRODUCTO\n\t\t\t\t\t\tand (PR.PROVEEDOR_1='$idProveedor')\n\t\t\t\t\t\tand PR.ID_SUBCATEGORIA<>'-10' and P.LOTE='$lote'\", $conexion); // || (PR.CANTIDAD_ILIMITADA='0' && PR.PROVEEDOR_2='$idProveedor')\n\t\t\tif (!$res) {\n\t\t\t\t$error = \"Error\";\n\t\t\t} else {\n\t\t\t\t$total = calculaTotalRevisadoListaProductosSinRecargo ($res);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$total = \"Error\";\t\n\t\t}\n\t} catch ( Exception $ex ) {\n\t\tmysql_query ( \"ROLLBACK\", $conexion );\n\t\t$total = \"Error\";\n\t}\n\t\n\t@mysql_close($conexion);\n\t\n\treturn $total;\n}", "title": "" }, { "docid": "025d3904aa25022230f3061bf3ebb7d3", "score": "0.66644186", "text": "public function total() : float\n {\n return $this->content()->total();\n }", "title": "" }, { "docid": "40d8a5a990229c2c8d0755acb7b24eef", "score": "0.6655915", "text": "static function getTotalIn() {\n $result = DB::table('movimentacoes')\n ->select(DB::raw('sum(valor) as total'))\n ->where([ 'tipo' => 'E' ])\n ->first();\n return $result->total ? $result->total : 0;\n }", "title": "" }, { "docid": "7a82115c817678113e99aaa833f175fb", "score": "0.66447544", "text": "public function montoCargadoPartidaProducto($id){\n\t\t\t// Validando la suma de los productos de la partida\n \t\t$total = 0;\n \t\t//Nacionales\n\t\t\tif($this->presupuestoProductos)\n\t\t\t\tforeach ($this->presupuestoProductos as $key => $presupuestoProducto) {\n\t\t\t\t\tif($presupuestoProducto->producto_id == $id)\n\t\t\t\t\t\t$total += $presupuestoProducto->monto_presupuesto;\t\n\t\t\t\t}\n\t\t//Importados\n\t\t\tif($this->presupuestoImportacion)\n\t\t\t\tforeach ($this->presupuestoImportacion as $key => $presupuestoImportacion) {\n\t\t\t\t\tif($presupuestoImportacion->producto_id == $id)\n\t\t\t\t\t\t$total += ($presupuestoImportacion->cantidad*$presupuestoImportacion->monto_presupuesto*$presupuestoImportacion->divisa->tasa->tasa);\n\t\t\t\t}\n \t\treturn $total;\n \t}", "title": "" }, { "docid": "955003340588d1e17aa8242ad43066f5", "score": "0.663917", "text": "public function getTotal()\n {\n //soma todos os valores\n $total = 0;\n \n //loop em todos os itens\n foreach( $this->getItem() as $item )\n {\n $total += $item->getPreco() * $item->getQuantidade();\n }\n \n return $total;\n }", "title": "" }, { "docid": "784f2d264a06f5791b4a21657c9a6fd2", "score": "0.6630823", "text": "public function total();", "title": "" }, { "docid": "19287dd9ea597201f2c2bbeebd56ff13", "score": "0.6621538", "text": "function montantTotal(){\n $total = 0;\n\n for ($i =0; $i < count($_SESSION['panier']['id_produit']); $i++){\n $total += $_SESSION['panier']['quantite'][$i] * $_SESSION['panier']['prix'][$i]; // on multiplie la quantité par le prix à chaque tour de boucle que l'on ajoute dans $total avec l'opérateur += pour ne pas écraser la dernière valeur.\n }\n\n return $total; // pour sortir la valeur de $total de la fonction et la retourner à l'endroit où on appelle cette fonction (dans le panier).\n}", "title": "" }, { "docid": "05969e510d25a94a963a82ad505955f5", "score": "0.6618823", "text": "function getMontoVentas($idCaja)\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\t\t$ci->db->select('SUM(total) as total');\n\t\t$ci->db->from('ventas');\n\t\t$ci->db->where('caja_id',$idCaja);\n\t\t$ci->db->group_by('caja_id');\n\t\t$query = $ci->db->get();\n\t\tif ($query->num_rows() > 0 ) {\n\t\t\treturn number_format($query->row()->total, 2, '.', '');\n\t\t}\n\t\treturn '0.00';\n\t \n\t}", "title": "" }, { "docid": "3157106c61c1b99ff15431c17cf39af2", "score": "0.6617633", "text": "function getTotalPanier(){\n\n\t$total = 0;\n\n\tif(isset($_SESSION['panier'])){\n\t\tforeach ($_SESSION['panier'] as $produit) {\n\t\t\t$total += $produit['prix'] * $produit['quantite'];\n\t\t}\n\t}\n\n\treturn $total;\n}", "title": "" }, { "docid": "6fabe4bfc04d37f560d3fcebb7c68a71", "score": "0.66113925", "text": "function montantTotal(){\n $total=0;\n\n for ($i=0; $i<count($_SESSION['panier']['id_produit']);$i++){\n $total+=$_SESSION['panier']['quantite'][$i]*$_SESSION['panier']['prix'][$i];\n // on multiplie la quantité par le prix à chaque tour de boucle que l'on ajoute dans $total avec += pour ne pas écraser la dernière valeur\n }\n return $total;\n\n}", "title": "" }, { "docid": "ef28bcbf28a917080aa050046b690390", "score": "0.6606996", "text": "public function getPromotionTotal()\n {\n $promotionAmount = 0.00;\n if (!is_null($this->promo_code_id)) {\n $promotion = $this->promotion()->first();\n if ('percentage' === $promotion->type) {\n $promotionAmount = ($this->unit_price * $this->quantity * $promotion->discount_percent);\n } else if ('amount' === $promotion->type) {\n $promotionAmount = ($this->quantity * $promotion->discount_amount);\n }\n }\n\n return $promotionAmount;\n }", "title": "" }, { "docid": "dbd6cbb0f102edc0f1169bb478655985", "score": "0.6603543", "text": "public function getTotalPrice()\n {\n $total = 0;\n\n foreach ($this->orders as $order) {\n $total += $order['total_price'];\n }\n\n return $total;\n }", "title": "" }, { "docid": "98c3d058aac8db5fc7513747fe266f4e", "score": "0.660154", "text": "function calcularTotalRevisadoProveedor ($idProveedor, $lote) {\n\t$error = 0; //variable para detectar error\n\t$total = 0.00;\n\n\ttry {\n\t\t$cajaActual = consultarCajaActual ();\n\n\t\t$conexion = conectar();\n\t\t\t\n\t\tif ($conexion==FALSE) {\n\t\t\t$error = 1;\n\t\t}\n\n\t\tif (!$error) {\n\t\t\t// SUMAR TOTAL\n\t\t\t$res = mysql_query(\"select TOTAL_REVISADO from PEDIDOS_PROVEEDORES where ID_PROVEEDOR='$idProveedor' and LOTE='$lote'\", $conexion);\n\t\t\tif (!$res) {\n\t\t\t\t$error = 1;\n\t\t\t} else {\n\t\t\t\twhile ($fila = mysql_fetch_array($res, MYSQL_ASSOC)) {\n\t\t\t\t\t$valor = $fila['TOTAL_REVISADO'];\n\t\t\t\t\tif ($valor && $valor!=NULL) {\n\t\t\t\t\t\t$total += $valor;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!$total || $total==0|| $total==NULL) {\n\t\t\t\t\t\t$total = 0.00;\n\t\t\t\t\t\t$consulta2 = \"SELECT * FROM PEDIDOS_PROVEEDORES_PROD\n\t\t\t\t\t\tWHERE ID_PEDIDO_PROVEEDOR IN (select ID_PEDIDO_PROVEEDOR from PEDIDOS_PROVEEDORES where LOTE='$lote' and ID_PROVEEDOR='$idProveedor')\";\n\t\t\t\t\t\t$resProductos = mysql_query($consulta2, $conexion);\n\t\t\t\t\t\n\t\t\t\t\t\tif (!$resProductos) {\n\t\t\t\t\t\t\t$error = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\twhile ($producto= extraer_registro ( $resProductos ) ) {\n\t\t\t\t\t\t\t$cantidad = $producto ['CANTIDAD'];\n\t\t\t\t\t\t\t$cantidad_rev = $producto ['CANTIDAD_REV'];\n\t\t\t\t\t\t\tif ($cantidad_rev == NULL) {\n\t\t\t\t\t\t\t\t$cantidad_rev = $cantidad;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$subtotal = round ( ($producto ['PRECIO'] * $cantidad_rev), 2 );\n\t\t\t\t\t\t\t$total += $subtotal;\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\t\tif ($error) {\n\t\t\t\tmysql_query ( \"ROLLBACK\", $conexion );\n\t\t\t\t$total = \"No se ha podido finalizar el pedido del proveedor.\";\n\t\t\t} else {\n\t\t\t\tmysql_query ( \"COMMIT\", $conexion );\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$total = \"Error\";\t\n\t\t}\n\t} catch ( Exception $ex ) {\n\t\tmysql_query ( \"ROLLBACK\", $conexion );\n\t\t$total = \"Error\";\n\t}\n\t\n\t@mysql_close($conexion);\n\t\n\treturn $total;\n}", "title": "" }, { "docid": "89862b112763b4df6e5b4f820b6d9e3d", "score": "0.65952444", "text": "public function sumaTodasPropiedades()\n {\n $this->total = 0;\n $this->total += $this->a;\n $this->total += $this->b;\n }", "title": "" }, { "docid": "8812a0d2f88e9346c4c5cb4890eefd26", "score": "0.65936935", "text": "function montantTotal(){\n\n $total = 0;\n\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++){ // tant que $i est inférieur au nombre de produit dans le panier, on additione le prix du produit multiplié par sa quantité\n\n $total += $_SESSION['panier']['quantite'][$i] * $_SESSION['panier']['prix'][$i]; // on ajoute dans la variable $total avec l'opérateur += le résultat de la quantité par le prix de chaque produit.\n\n }\n \n return $total; // on retourne le résultat du calcul à l'ndroit où la fonction est appelée\n}", "title": "" }, { "docid": "f4b34be20ae4f40bb94d49cdf176bcd3", "score": "0.6593663", "text": "public function calculateTotalAmount();", "title": "" }, { "docid": "827d98c2d60caad3658801c6e7c17761", "score": "0.6593618", "text": "public function total()\n {\n return $this->totalPrice();\n }", "title": "" }, { "docid": "a22e2d4dd6b5ddc32d3bf900075823b0", "score": "0.65808934", "text": "function getTotalAbonosProveedores($idCuenta)\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\n\t\t$ci->db->where('cuenta_pagar_id',$idCuenta);\n\t\t$query = $ci->db->get('pagos');\n\t\t$total = 0;\n\t\tforeach ($query->result() as $row) {\n\t\t\t$total = $total + $row->monto;\n\t\t}\n\n\t\treturn $total;\n\t \n\t}", "title": "" }, { "docid": "d57f55a6c239825198bf308f71b24e36", "score": "0.6565836", "text": "function get_total_price($order);", "title": "" }, { "docid": "9a2a09fd9e4e8a6ab037c6a91b0aacd8", "score": "0.6555776", "text": "public function getMontoPagadoCheque() {\n\t\t$montoTotalCheque = 0.00;\n\t\t$resultados = PagoCheque::model ()->searchWithPagoOO ( $this->id_pago );\n\t\tif (sizeof ( $resultados ) > 0) {\n\t\t\tforeach ( $resultados as $value ) {\n\t\t\t\tif (! $value->cheque->anulado) {\n\t\t\t\t\t$montoTotalCheque = $montoTotalCheque + LGHelper::functions ()->unformatNumber ( $value->cheque->Importe );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $montoTotalCheque;\n\t}", "title": "" }, { "docid": "70757a971740891bdaac393a6f4bedad", "score": "0.6551256", "text": "public function totalSuaraMasukDuaStat(){\r\n $totalSuaraMasuk = $this->totalSuaraMasukDua();\r\n $totalPemilih = $this->totalSuaraMasuk();\r\n return round($totalSuaraMasuk / $totalPemilih * 100);\r\n }", "title": "" }, { "docid": "e14e84a48f510eca85069aef68a7e6ac", "score": "0.65504885", "text": "public function dar_costos(){\n\t\t$valor = $this->get_precio();\n\t\treturn $valor;\n\t}", "title": "" }, { "docid": "272f1f4fc1bacf34a6c3cc0b044cad13", "score": "0.65412813", "text": "public function getTotalLiquidado()\r\n \t{\r\n \t\t$query = self::getFindSolicitudDeclaracion();\r\n \t\t$rows = $query->all();\r\n \t\t$suma = 0;\r\n\r\n \t\tforeach ( $rows as $row ) {\r\n \t\t\t$suma += self::getMontoLiquidacion($row['tipo_declaracion'] - 1,\r\n \t\t\t\t\t\t\t\t\t\t\t $row['ano_impositivo'],\r\n \t\t\t\t\t\t\t\t\t\t\t $row['id_contribuyente']);\r\n \t\t}\r\n\r\n \t\treturn $suma;\r\n \t}", "title": "" }, { "docid": "b158388b79f64cb26bcdacd1a197d4a3", "score": "0.653807", "text": "public function obtenerPrecio();", "title": "" }, { "docid": "ae2fb70cdb0257f37e25313d00509563", "score": "0.6531594", "text": "public static function getTotalPrice() {\n $price = 0;\n foreach (static::getCard() as $order) {\n $price += ($order['price'] * $order['amount']);\n }\n return $price;\n }", "title": "" }, { "docid": "5d5233cad10850b714243898cea7f867", "score": "0.65277785", "text": "public function total()\n {\n $total = 0;\n\n $cust = $this->getCustomer();\n $type = $cust->getType();\n\n $total = Promo::checkPromotion($type, $this->getItems());\n\n return number_format($total, 2, '.', '');\n }", "title": "" }, { "docid": "828954aa113e46d988b596bf589dea02", "score": "0.6523248", "text": "function cantidadProductosVendidosTotal()\n{\n $sql = \"SELECT SUM(cantidad) AS cantidad FROM ventas;\";\n $statement = conexion()->prepare($sql);\n $statement->execute();\n $resultado = $statement->fetch();\n return $resultado;\n}", "title": "" }, { "docid": "3a55cce02c76b19db34bfc7dade7eb56", "score": "0.6523069", "text": "public function totalPrice()\n {\n $total = 0;\n\n $cart = $this->getCart();\n\n if ($cart->isEmpty())\n {\n return $total;\n }\n\n foreach ($cart as $row)\n {\n $total += $row->qty * $row->price;\n }\n\n return $total;\n }", "title": "" }, { "docid": "e042ff7b596ddb6383d129cf10aaf8a1", "score": "0.65228754", "text": "public function get_total(){\n\t\t$total = 0;\n\t\t$price_col = $this->config['price'];\n\t\tforeach($this->items as $item){\n\t\t\t$total += $item['qty'] * $item['object']->$price_col; \n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "98f81add37a7b327408d63a3b06dce39", "score": "0.650598", "text": "public function totalPrice(){\r\n return $this->getCart()->totalPrice;\r\n }", "title": "" }, { "docid": "98a6cc951c61c272c2a077fe71a26dbd", "score": "0.6505596", "text": "function totalcompras($carrinhoCompras){\n\t\t\t$total=0;\n\t\t\tforeach ($carrinhoCompras as $livro) {\n\t\t\t\t//Vou fazer o total do preco dos livros\n\t\t\t\t$total += $livro->getPrice();\n\t\t\t}\n\t\t\t//retorno o total dos preços\n\t\t\treturn $total;\n\t\t\t}", "title": "" }, { "docid": "62ff303141b462205351180e86e76e82", "score": "0.6485785", "text": "function getTotalTarjeta($idCaja,$idTarjeta)\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\t\t$ci->db->select('SUM(monto_tarjeta) as total');\n\t\t$ci->db->from('ventas');\n\t\t$ci->db->where('caja_id',$idCaja);\n\t\t$ci->db->where('tarjeta_id',$idTarjeta);\n\t\t$ci->db->group_by('caja_id');\n\t\t$query = $ci->db->get();\n\t\tif ($query->num_rows() > 0 ) {\n\t\t\treturn number_format($query->row()->total, 2, '.', '');\n\t\t}\n\t\treturn '0.00';\n\t \n\t}", "title": "" }, { "docid": "f43a95c5f911e5ce73b44bdd0f62f30f", "score": "0.6485733", "text": "public function porcentajeproyecto($idproyecto){\n\n //actividades\n $em=$this->em;\n \n $dql = \"select x from ProyectoBundle:Objetivo x where x.proyecto= :idproyecto\";\n $query = $em->createQuery($dql);\n $query->setParameter('idproyecto',$idproyecto);\n $objetivos = $query->getResult(); \n \n $suma=0;$contador=0;\n if(!empty($objetivos)):\n foreach ($objetivos as $o) {\n\n $suma=$suma+$o->getPorcentaje();\n\n $contador++;\n }\n endif;\n\n if($suma!=0 && $contador!=0)\n $porcentaje=($suma * 100) / ($contador*100);\n else $porcentaje=0;\n\n $proyecto = $em->getRepository('ProyectoBundle:Proyecto')->find($idproyecto);\n $proyecto->setPorcentaje(number_format($porcentaje,0));\n $em->flush();\n\n\n }", "title": "" }, { "docid": "ae4fd2ea41d432b50486a52009d3715f", "score": "0.6484462", "text": "public function getTotalAmount();", "title": "" }, { "docid": "b591cf53d1853325b857d7737d9fd7e1", "score": "0.64820296", "text": "public function getTotal(): int\r\n {\r\n return $this->product->getPrice() * $this->qty;\r\n }", "title": "" }, { "docid": "24f7f03f9926fc376b5050c493c027df", "score": "0.6481606", "text": "public function doprinosNezaposlenostPoslodavac() {\n return round($this->osnovicaDoprinosa() * $this->payment->getValue('stopaNezaposlenostPoslodavac') / 100, 2);\n }", "title": "" }, { "docid": "531a4561075809ab8dbbf5c081d4695c", "score": "0.6475974", "text": "public function getPaymentTotal(): float;", "title": "" }, { "docid": "bb4a4aff786b472250a0b067011b6ee4", "score": "0.647109", "text": "public function totalSuaraMasukStat(){\r\n $totalSuaraMasuk = $this->totalSuaraMasuk();\r\n $totalPemilih = $this->totalPemilih();\r\n return round($totalSuaraMasuk / $totalPemilih * 100);\r\n }", "title": "" }, { "docid": "3cfc582df37470ba50eb13fe34b6c496", "score": "0.64690316", "text": "public function doprinosPIOPoslodavac() {\n return round($this->osnovicaDoprinosa() * $this->payment->getValue('stopaPIOPoslodavac') / 100, 2);\n }", "title": "" }, { "docid": "cc1e26ce97924efebf1e7034ef4b5b72", "score": "0.64660096", "text": "public function sumatoriaTotalPagos($id_venta){\n $this->db->select(\"SUM(monto) as sumaPagos\");\n $this->db->from(\"pagos\");\n $this->db->where(\"id_venta\", $id_venta);\n $resultados = $this->db->get();\n return $resultados->row();\n }", "title": "" }, { "docid": "4a87418a0b6a8fb1b0e683a69c291349", "score": "0.64624476", "text": "public function calculaDesconto(Pedido $pedido): float\n {\n return $pedido->calculaValor() * 0.9;\n }", "title": "" }, { "docid": "66c26bf8346be9cb44ff00b1fb8da91a", "score": "0.64611775", "text": "function porcentajes_unidad($unidad,$nivel){\n\t\tswitch($unidad){\n\t\t\tcase 1: $porcentaje = 0.30; break;\n\t\t\tcase 2: $porcentaje = 0.30; break;\n\t\t\tcase 3: $porcentaje = 0.40; break;\n\t\t}\n\t\treturn $porcentaje;\n\t}", "title": "" }, { "docid": "faeac6e54bfe7659adc477bbef2c5165", "score": "0.64581305", "text": "function calcula_precio_transporte ($id_prod, $total_cesta) {\n\n\t$resC = consulta(\"select PRECIO, DEPENDE_CESTA, PRECIO_CESTA_1, PRECIO_CESTA_2, PRECIO_1, PRECIO_2, PRECIO_3 from PRODUCTOS where ID_PRODUCTO='$id_prod'\");\n\t$filaC = extraer_registro($resC);\n\t$precio = $filaC['PRECIO'];\n\t$precio1 = $filaC['PRECIO_1'];\n\t$precio2 = $filaC['PRECIO_2'];\n\t$precio3 = $filaC['PRECIO_3'];\n\t$precioCesta1 = $filaC['PRECIO_CESTA_1'];\n\t$precioCesta2 = $filaC['PRECIO_CESTA_2'];\n\t$dependeCesta = $filaC['DEPENDE_CESTA'];\n\n\tif ($dependeCesta==1) {\n\t\tif (0<=$total_cesta && $total_cesta<$precioCesta1) {\n\t\t\t$precio = $precio1;\n\t\t} else if ($precioCesta1<=$total_cesta && $total_cesta<$precioCesta2) {\n\t\t\t$precio = $precio2;\n\t\t} else {\n\t\t\t$precio = $precio3;\n\t\t}\n\t}\n\n\treturn $precio;\n}", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6446968", "text": "public function getTotalPrice();", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6446968", "text": "public function getTotalPrice();", "title": "" }, { "docid": "46ab7e82cba32ec82a97856d0ec9cf6a", "score": "0.6426265", "text": "function ptotal_impuestos($Sesion){\n\treturn $Sesion->get_var(\"ptotal_impuestos\");\n}", "title": "" }, { "docid": "9bfdfb2e53861685db42164b95c77e6d", "score": "0.64116436", "text": "function calculateTotalPrice()\n {\n return round(self::$tax + self::$total_price, 2);\n }", "title": "" }, { "docid": "dfd88a01c8e502b2d23e27e3c09da5d6", "score": "0.640876", "text": "public function getMonto() {\n\t\t$resultados = PagoOrdenPago::model ()->searchWithPagoOO ( $this->id_pago );\n\t\t$montoTotalPAGAR = 0;\n\t\tif (sizeof ( $resultados ) > 0) {\n\t\t\tforeach ( $resultados as $value ) {\n\t\t\t\t$montoTotalPAGAR = $montoTotalPAGAR + $value->ordenPago->getMonto ();\n\t\t\t}\n\t\t}\n\t\treturn $montoTotalPAGAR;\n\t}", "title": "" }, { "docid": "c042e54541157de6ebc20973a2369322", "score": "0.6405756", "text": "public function getTotal_price()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "bab3973e2446d4154d991cffddc9dcfc", "score": "0.63942015", "text": "public function total(): int;", "title": "" }, { "docid": "f53082e1ceff854d3265d8e1b6bfe8fa", "score": "0.6391131", "text": "public function TotalPrice() {\n\n\t\t$amount = $this->Total();\n\t\t$this->extend('updatePrice', $amount);\n\t\treturn $amount;\n\t}", "title": "" }, { "docid": "5cae351ffe503ca6c8617d700096fb27", "score": "0.638672", "text": "function getMontos($campo,$idCaja)\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\t\t$ci->db->select('SUM('.$campo.') as total');\n\t\t$ci->db->from('ventas');\n\t\t$ci->db->where('caja_id',$idCaja);\n\t\t$ci->db->group_by('caja_id');\n\t\t$query = $ci->db->get();\n\t\tif ($query->num_rows() > 0 ) {\n\t\t\treturn number_format($query->row()->total, 2, '.', '');\n\t\t}\n\t\treturn '0.00';\n\t \n\t}", "title": "" }, { "docid": "c8341ad773de9ff879a729f8c2288c3e", "score": "0.63804567", "text": "public function obtenerTotalFijo()\n {\n $total = self::obtenerSubtotalFijo();\n $this->totalFijo = array_sum($total);\n\n return $this->totalFijo;\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.6375331", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "ee3af9b479ce4b8b6346b17a52f3dd36", "score": "0.6374095", "text": "public function monto()\n {\n $sql = \"SELECT SUM(monto) FROM cobros WHERE pago_id = {$this->pagoId}\";\n $this->Util()->DB()->setQuery($sql);\n $monto = $this->Util()->DB()->GetSingle();\n return $monto > 0 ? $monto : 0;\n }", "title": "" }, { "docid": "9591e1858ad3ec6459b1e5aac5d34adc", "score": "0.63720196", "text": "public function getCalculateTotal(){\n\n\n //metodo para atualizar o frete\n $this->updateFreight();\n\n //necessario pegar as informacoes do carrinho\n \n $totals = $this->getProductsTotal();//metodo que traz todos os valores do carrinho\n\n $this->setvlsubtotal($totals['vlprice']);\n $this->setvltotal($totals['vlprice'] + (float)$this->getvlfreight()); //calcular o valor do produto com o frete\n\n }", "title": "" }, { "docid": "c3cfc1b6432641efb762ff42b1dcf175", "score": "0.63706726", "text": "function TotalPaid() {\n\t $paid = 0;\n\t \n\t if ($this->Payments()) foreach ($this->Payments() as $payment) {\n\t if ($payment->Status == 'Success') {\n\t $paid += $payment->Amount->getAmount();\n\t }\n\t }\n\t \n\t $totalPaid = new Money();\n\t $totalPaid->setAmount($paid);\n\t $totalPaid->setCurrency($this->Total->getCurrency());\n\t \n\t return $totalPaid;\n\t}", "title": "" }, { "docid": "f134fbd31ebb0c1868c9d93dcd25b12f", "score": "0.6370059", "text": "public function getMontoTotal()\n {\n $total = 0;\n foreach($this->items as $item) {\n $total += $item->getSubtotal();\n }\n return $total;\n }", "title": "" }, { "docid": "c41f53e0ceac7749500d7a00c15d30b7", "score": "0.6368617", "text": "function calcularTotalRevisadoProveedorCompradoPorUsuarios ($idProveedor, $totalesPorProveedor) {\n\t$total = 0.00;\n\t\n\ttry {\n\t\t// Recorrer el array y sumar el total de precio * cantidad_pedida_usuario, si corresponde al proveedor\n\t\tforeach ($totalesPorProveedor as $array_total_producto) {\n\t\t\t$id_proveedor_actual = $array_total_producto[0];\n\t\t\t$id_producto = $array_total_producto[1];\n\t\t\t$precio = $array_total_producto[2];\n\t\t\t$cantidad_pedida_usuario = $array_total_producto[3];\n\t\t\t$cantidad_pedida_proveedor = $array_total_producto[4];\n\t\t\t\n\t\t if ($idProveedor == '-1' || $id_proveedor_actual == $idProveedor) {\n\t\t \t$total += round(($precio * $cantidad_pedida_usuario), 2);\n\t\t }\n\t\t}\n\t} catch ( Exception $ex ) {\n\t\t$total = -1;\n\t}\n\t\n\t@mysql_close($conexion);\n\t\n\treturn $total;\n}", "title": "" }, { "docid": "ffb68b38e98c8f6ae2dc7108373a2abc", "score": "0.6367986", "text": "public function getTotalMontoTransfenrencia($idPago) {\n\t\t$montoTotalTrans = 0.00;\n\t\t$resultados = TransferenciaPago::model ()->searchWithPagoOO ( $idPago );\n\t\tif (sizeof ( $resultados ) > 0) {\n\t\t\tforeach ( $resultados as $value ) {\n\t\t\t\t$montoTotalTrans = $montoTotalTrans + LGHelper::functions ()->unformatNumber ( $value->monto );\n\t\t\t}\n\t\t}\n\t\treturn $montoTotalTrans;\n\t}", "title": "" }, { "docid": "d0b7ea67adc4ff89b94efd48aece2e31", "score": "0.63665587", "text": "public function getPrecio()\r\n {\r\n return $this->precio;\r\n }", "title": "" }, { "docid": "2aece4de86ee0f7b95c9a11f5b833ee9", "score": "0.63650763", "text": "public function sumaTodasPropiedades()\n {\n $this->total = 0;\n foreach($this as $propiedad => $valor) {\n if ($propiedad == 'total') {\n continue;\n }\n $this->total += $valor;\n }\n }", "title": "" }, { "docid": "92d3fcedd0a3b336e2c7588794cdc343", "score": "0.6360706", "text": "public function get_total(){\n $total = 0;\n if(!empty($this->items)){\n foreach($this->items as $item){\n $total += $item['quantity'] * $item['price'];\n }\n }\n return $total;\n }", "title": "" }, { "docid": "b6a6ecbd75c24d508f51b7f045b0c4f5", "score": "0.63580656", "text": "public function get_total_price() {\r\r\n return $this->total_price;\r\r\n }", "title": "" }, { "docid": "43cda36b528b3e29f179c923e7a93bfb", "score": "0.63497144", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "43cda36b528b3e29f179c923e7a93bfb", "score": "0.63497144", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "2deeca940b9e10c3a5bdcbe805a7a739", "score": "0.6347072", "text": "public function getTotal()\n\t{\n\t\t$this->total = $this->calculateHotel();\n\n\t\t// Calculate the golf cost\n\t\t$this->total += $this->calculateGolf();\n\n\t\t// Add in the package percentage\n\t\t$this->total *= (1 + $this->quote->percent_package);\n\n\t\treturn (float) ceil($this->total);\n\t}", "title": "" }, { "docid": "284c5edd8e28bf0de2df925a0e5172b1", "score": "0.6334634", "text": "public function getTotalPrice()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "e6cfbdf588403d21f1debba2ae0da34f", "score": "0.63310945", "text": "public function buyTotal() {\n $total = 0;\n $dadosProduto = $this->getBuyProducts();\n\n foreach ($dadosProduto as $value) {\n foreach ($value as $val) {\n $total += $val['preco'];\n }\n }\n\n echo 'R$ ' . $total . ',00';\n }", "title": "" }, { "docid": "04a5f12d9893231724d8cdb2d40d2464", "score": "0.6330082", "text": "public function getPrecioMasBajo(bool $sumaComicion = true)\n {\n $ret = 0;\n $idProducto = $this->getIdproducto(); \n $filtros = [\n ['idProducto', $idProducto],\n ['fsalida', date('Y-m-d'), '>=']\n ];\n $ordenados = [['precioProveedor']];\n $limitar = [1];\n $productoC = new ProductoController;\n $productoFechaRefs = $productoC->getProductoFechaRefPDO($filtros, $ordenados, $limitar);\n \n if(!empty($productoFechaRefs)){\n $precio = $productoFechaRefs[0]->getPrecioProveedor();\n if($sumaComicion){\n $comision = $productoFechaRefs[0]->getComision();\n $precio += ($precio * $comision) / 100;\n }\n $ret = $precio;\n }\n \n // TODO: cambiar el retorno de esta funcion por Util::moneda()\n return number_format($ret, $decimals = 2, \",\", \".\");\n }", "title": "" }, { "docid": "ca95fd017813f95db4c36f20199d9ef1", "score": "0.6328935", "text": "static function getTotalOut() {\n $result = DB::table('movimentacoes')\n ->select(DB::raw('sum(valor) as total'))\n ->where([ 'tipo' => 'S' ])\n ->first();\n return $result->total ? $result->total : 0;\n }", "title": "" }, { "docid": "0b024f438f14a1efd31cd604e2f04af6", "score": "0.63159937", "text": "public function getDiscountTotal(): float;", "title": "" } ]
31c1f334ad919a32a8203e2e7b444cb3
Purpose: open overgiven file Output : true/false
[ { "docid": "c007b41b7bbff2c6ebae75bde3075317", "score": "0.52354914", "text": "function Open( $filename, $mode )\n\t{\n\t\tif( !$this->hFile )\n\t\t{\n\t\t\tif( file_exists($filename) )\n\t\t\t$this->size = filesize($filename);\n\t\t\tif( !($this->hFile=@fopen( $filename, $mode )) )\n\t\t\t\treturn 0;\n\t\t\treturn 1;\n\t\t}else return 0;\n\t}", "title": "" } ]
[ { "docid": "37e383b88aab4cefe2f915b5d3706a4b", "score": "0.677034", "text": "private function isOpen()\n {\n $bReturn = FALSE;\n if( isset($this->m_pFile) && is_resource($this->m_pFile) )\n {\n $bReturn=TRUE;\n }//if( isset(...\n return $bReturn;\n }", "title": "" }, { "docid": "d4a06d8da2f7b2a7875cfe1206112253", "score": "0.64759636", "text": "public function open() : bool;", "title": "" }, { "docid": "fa66b7c2967e0d51b3957ba40cea0bb1", "score": "0.6308707", "text": "public function open($mode = \"r\") {\n\n global $filelogger;\n\n if(Validator::isa($mode,\"string\") \n && Validator::matches($mode,\"/^(r|w|a|x|c)\\+{0,1}$/\"))\n $this->fres = fopen($this->file, $mode); \n\n if(!Validator::isa($filelogger,\"null\")) \n $filelogger->log(\"mode=%, fres=%, isres=%, match=%\", \n array($mode,$this->fres,is_resource($this->fres),\n Validator::matches($mode,\"/(r|w|a|x|c)[+]/\")));\n\n return (is_resource($this->fres) ? true : false);\n\n }", "title": "" }, { "docid": "b9bdf5a4c91a7f23b15ec86a73b8b910", "score": "0.63023245", "text": "public function openFile() {\n\n $handle = fopen($this->filename, \"rb\");\n if ($handle === false) {\n return false;\n }\n\n return $handle;\n }", "title": "" }, { "docid": "726643a4e2583f54c0f757a166333349", "score": "0.61699873", "text": "public function openFile() {\n\t\t$name = $this->step->site->rootDir .\n\t\t\t'/' . $this->step->rawUrl .\n\t\t\t'/' . $this->tag . '.php';\n\t\treturn @fopen($name, \"r\");\n\t}", "title": "" }, { "docid": "29ec2d24edca63e3b0d65b7755890aeb", "score": "0.6150343", "text": "abstract protected function open($file);", "title": "" }, { "docid": "dcc5bae5d9eceeeb3bd4f527633c2ee3", "score": "0.61070013", "text": "abstract public function open();", "title": "" }, { "docid": "db52584ee89c12fd591afcbd48f6912b", "score": "0.60656476", "text": "private function _openLog() {\n\t\tif($this->_logFd) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->_logFd = @fopen($this->_logFile, 'a+');\n\t\treturn $this->_logFd;\n\t}", "title": "" }, { "docid": "430d5b1cfb9ee493067747f3b090825a", "score": "0.60464853", "text": "function stream_open($path, $mode, $options, &$opened_path) {\n return true;\n }", "title": "" }, { "docid": "40c87543e80866cf343ef17f9587f247", "score": "0.6040218", "text": "public function open(string $filename): bool\n {\n if ($this->file = new SplFileObject($filename, 'r')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3aced3575d1d6980b04f33217b74a9de", "score": "0.5992357", "text": "function ot_file_open( $handle, $mode ) {\n\n $func = 'f' . 'open';\n return @$func( $handle, $mode );\n \n}", "title": "" }, { "docid": "9f5e19f31955a3c4892e6f26e919912a", "score": "0.5939093", "text": "function open($filename = '', $mode = 'w') {\n\t\tif ('' == $filename) return false;\n\t\tif ($this->gzip()) {\n\t\t\t$fp = @gzopen($filename, $mode);\n\t\t} else {\n\t\t\t$fp = @fopen($filename, $mode);\n\t\t}\n\t\treturn $fp;\n\t}", "title": "" }, { "docid": "830d77aacd5342834d3ba5f13556a12b", "score": "0.5931265", "text": "public function open($mode = self::MODE_APPEND) {\n\n\n if ($this->_handle = @fopen($this->getName(), $mode)) {\n return true;\n } else {\n $this->_error_message = 'Can\\'t open file';\n }\n }", "title": "" }, { "docid": "d21ef0ea85b726a7bfc6f8e2b882c75b", "score": "0.5918075", "text": "function createFile()\n\t\t{\n\t\t\tif(!file_exists($this->pth) && $this->urlPth===false)\n\t\t\t{\n\t\t\t\t$f = fopen($this->pth, \"w\");\n\t\t\t\tfwrite($f, \"\");\n\t\t\t\tfclose($f);\n\t\t\t\treturn(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4ef95fc8795965327c060f09973e1088", "score": "0.58916867", "text": "function open($arg_str_save_path, $arg_str_session_name) \r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "1e71e9183b157d26c97ec6b0eec61a21", "score": "0.58780843", "text": "public function allowsNewFileOpening()\n {\n return 'r' !== $this->base;\n }", "title": "" }, { "docid": "d4e8fa6effc039dfad8557281829823f", "score": "0.58657765", "text": "function open($filename, $mode = \"r\") {\n\t\t$success = false;\n\t\tif(!$this->connected) {\n\t\t\t$this->handleID = fopen($filename, $mode);\n\t\t\tif($this->handleID !== false) {\n\t\t\t\t$this->filename = $filename;\n\t\t\t\t$this->fileOpenMode = $mode;\n\t\t\t\t$this->connected = true;\n\t\t\t\t$success = true;\n\t\t\t}\n\t\t}\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "bf2c253172eacb0617c5ddb4e89f0d5f", "score": "0.58641696", "text": "function stream_open($path, $mode, $options, &$opened_path) {\n $this->uniqueid_array_update_time = time(); // set to current time\n $this->journey_daycount = 1;\n $this->load_uniqueid_array();\n return true;\n }", "title": "" }, { "docid": "35c16e0e02dbf18b5872b05bdac93b66", "score": "0.5815701", "text": "public function allowsExistingFileOpening()\n {\n return 'x' !== $this->base;\n }", "title": "" }, { "docid": "c21e5cebfa769dcec72ffe15af42d3ce", "score": "0.58081955", "text": "private function _openLog()\r\r\n\t{\r\r\n\t\t// Only open if not already opened...\r\r\n\t\tif (is_resource($this->_file)) {\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\r\r\n\t\timport('imag.utilities.dateobject');\r\r\n\t\t$now = new DateObject();\r\r\n\t\t$date = $now->toMySQL();\r\r\n\r\r\n\t\tif (!file_exists($this->_path))\r\r\n\t\t{\r\r\n\t\t\timport(\"imag.filesystem.folder\");\r\r\n\t\t\tif (!Folder :: create(dirname($this->_path))) {\r\r\n\t\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\t$header[] = \"#<?php die('Direct Access To Log Files Not Permitted'); ?>\";\r\r\n\t\t\t$header[] = \"#Version: 1.0\";\r\r\n\t\t\t$header[] = \"#Date: \" . $date;\r\r\n\r\r\n\t\t\t// Prepare the fields string\r\r\n\t\t\t$fields = str_replace(\"{\", \"\", $this->_format);\r\r\n\t\t\t$fields = str_replace(\"}\", \"\", $fields);\r\r\n\t\t\t$fields = strtolower($fields);\r\r\n\t\t\t$header[] = \"#Fields: \" . $fields;\r\r\n\r\r\n\t\t\timport(\"imag.version\");\r\r\n\t\t\t// Prepare the software string\r\r\n\t\t\t$version = new Version();\r\r\n\t\t\t$header[] = \"#Software: \" . $version->getLongVersion();\r\r\n\r\r\n\t\t\t$head = implode(\"\\n\", $header);\r\r\n\t\t} else {\r\r\n\t\t\t$head = false;\r\r\n\t\t}\r\r\n\r\r\n\t\tif (!$this->_file = fopen($this->_path, \"a\")) {\r\r\n\t\t\treturn false;\r\r\n\t\t}\r\r\n\t\tif ($head)\r\r\n\t\t{\r\r\n\t\t\tif (!fputs($this->_file, $head)) {\r\r\n\t\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// If we opened the file lets make sure we close it\r\r\n\t\tregister_shutdown_function(array(&$this,'closeLog'));\r\r\n\t\treturn true;\r\r\n\t}", "title": "" }, { "docid": "4538bf493c8b054565c1ea7e44449add", "score": "0.58034396", "text": "public function isReadable(): bool {\r\n return true === is_readable($this -> file);\r\n }", "title": "" }, { "docid": "8dafa54cda59c512c860de80e2744246", "score": "0.5784463", "text": "public function create(): bool {\r\n\r\n if(false === $this -> exists()) {\r\n return false !== @fopen($this -> file, 'w+');\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "5e74d974e3966a2cad4dbf75aa17a5c8", "score": "0.57435036", "text": "function File($filename = \"\", $fileOpenMode = \"r\") {\n\t\t$success = true;\n\t\t$this->filename = $filename;\n\t\t$this->fileOpenMode = $fileOpenMode;\n\t\t$this->fileOpenModeRead = \"r\";\n\t\t$this->fileOpenModeReadWrite = \"r+\";\n\t\t$this->fileOpenModeWrite = \"w\";\n\t\t$this->fileOpenModeWriteRead = \"w+\";\n\t\t$this->fileOpenModeAppend = \"a\";\n\t\t$this->fileOpenModeAppendRead = \"a+\";\n\t\t$this->connected = false;\n\t\t$this->handleID = false;\n\t\tif($this->filename != \"\") {\n\t\t\t$success = $this->open($this->filename, $this->fileOpenMode);\n\t\t}\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "ab1c2fad9c007c92cc14831ca9a75eba", "score": "0.5731805", "text": "public abstract function open ();", "title": "" }, { "docid": "1c9e5a2bf27a0b85e62b601c4b7ea676", "score": "0.5719249", "text": "function open($file)\n\t{\n\t\tif (!file_exists($file))\n\t\t\tthrow new Exception('File does not exist '.$file);\n\n\t\t$this->isOpen = true;\n\t\t$this->file = $file;\n\t\treturn $this->isOpen;\n\t}", "title": "" }, { "docid": "53ca06deb844643a241645147e5a421d", "score": "0.57174724", "text": "public function open();", "title": "" }, { "docid": "53ca06deb844643a241645147e5a421d", "score": "0.57174724", "text": "public function open();", "title": "" }, { "docid": "1c58224c673042df097fbde70e46d2c2", "score": "0.5676488", "text": "function checkFile() {\r\n\t\t$file = __DIR__ . DIRECTORY_SEPARATOR . '.botinfo';\r\n\t\tif ( ! file_exists( $file ) ) {\r\n\t\t\t$myFile = fopen( $file, \"w\" ) or die( \"Unable to open file!\" );\r\n\t\t\tfwrite( $myFile, \"{}\" );\r\n\t\t\tfclose( $myFile );\r\n\t\t}\r\n\r\n\t\treturn $file;\r\n\t}", "title": "" }, { "docid": "a4464e359322286f9ed29c3eb3210251", "score": "0.56724626", "text": "protected function openFile($fileName)\n\t\t{\n\t\t\tif(trim($fileName) == '')\n\t\t\t{\n\t\t\t\t$this->simpleDebug('no Mapping File given!', 'yb_videoplayer');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn fopen($fileName, 'r');\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "f9610413a2e397dbb8ae6aef7b4d47f7", "score": "0.5666866", "text": "public function validFile(){\n return ( is_readable( $this->sourceFile ) );\n }", "title": "" }, { "docid": "46eefc11fcfbd5120d3fdfc187c82766", "score": "0.5655805", "text": "function open_file($strFile)\n\t{\n\t\tif ($this->boolFile)\n\t\t{\n\t\t\t$this->strFile = $strFile;\n\t\t\tif (file_exists($strFile) && filesize($strFile) != 0)\n\t\t\t{\n\t\t\t\tif(!$fileRead = fopen($strFile, \"r\"))\n\t\t\t\t{\n\t\t\t\t\techo 'cannot read file '.$strFile.'<br />';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->strTemplate = fread($fileRead, filesize($strFile));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'File Does Not Exist, or File is empty : '.$strFile;\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->strTemplate = $strFile;\n\t\t}\n\t}", "title": "" }, { "docid": "1da590aa110b96af8e031f539b432dfd", "score": "0.56539744", "text": "public function stream_open();", "title": "" }, { "docid": "1065ce8a7e5403865d362b2b86a392fb", "score": "0.5633094", "text": "abstract public function isReadable(string $filename): bool;", "title": "" }, { "docid": "068f686aa175a33481c22b5b4efb2e5f", "score": "0.5633014", "text": "private function open($mode=\"a\")\n\t{\n if ($this->checkDir()) \n\t return $this->stream = fopen($this->path, $mode);\n //or die(\"Cannot write to file '$this->path', please ensure '$this->path' is writable.\");\n\t}", "title": "" }, { "docid": "ed73f44e1153feeb2d57f2341fa31808", "score": "0.5621714", "text": "public function file($filename){\n if(!file_exists($filename)){\n echo \"File does not exist\";\n return false;\n } elseif(!is_readable($filename)){\n echo \"File is not readable\";\n return false;\n }\n $this->filename = $filename;\n return true;\n }", "title": "" }, { "docid": "6f742a9bf45f728a7d1b007465c45aaa", "score": "0.5620361", "text": "function file_open($filename) {\n\n\tif (!is_readable($filename)) {\n\t\t$error = \"File '$filename' does not exist or is not readable!\";\n\t\tthrow new Exception($error);\n\t}\n\n\t$retval = fopen($filename, \"r\");\n\n\tif (!$retval) {\n\t\tthrow new Exception(\"Unable to open file '$filename'\");\n\t}\n\n\treturn($retval);\n\n}", "title": "" }, { "docid": "823c74f1de7db748930ac04982167eec", "score": "0.5573698", "text": "public abstract function open($path, $filename);", "title": "" }, { "docid": "f79448b82864f451683d4d502428c39c", "score": "0.5571841", "text": "public function TypeSpecificOpen()\n {\n if (file_exists($this->logfile))\n {\n if ($this->mode == \"ARCHIVE\")\n {\n rename($this->logfile, $this->logfile.date(\"Ymd-Gis\"));\n }\n }\n if ($this->file_pointer = fopen ($this->logfile, \"a+\"))\n {\n $entry[\"MSG_TIME\"] = date(\"r\");\n $entry[\"MSG_CATEGORY\"] = \"LOGS\";\n $entry[\"MSG_SEVERITY\"] = Krai::LOG_INFO;\n $entry[\"MSG_MSG\"] = \"LOG OPENED, REQUESTED BY APPLICATION \".$this->parent_application;\n $this->TypeSpecificOutputMsg($entry);\n }\n else\n {\n $log_error_msg = \"Unable to open log file \".$this->filename;\n parent::WriteLog($log_error_msg);\n return (false);\n }\n return (true);\n }", "title": "" }, { "docid": "341d81b13af7d07f804a1ab099e9b57d", "score": "0.5566259", "text": "function file_readable($fileLocation){\n \n $file = new FileHandler($fileLocation);\n\n if($file->is_readable()){\n $message = \"Success: (\".$file->fileName.\") is readable\";\n $this->add_to_log($message);\n return true;\n }\n \n else{\n $message = \"Error: (\".$file->fileName.\") is not readable\";\n $this->add_to_log($message); \n return false;\n }\n \n }", "title": "" }, { "docid": "beecf28ce570420e10bf68e254ffb373", "score": "0.55501276", "text": "protected function openLog(): bool\n {\n if (!is_resource($this->logHandle)) {\n $this->logHandle = @fopen($this->logFile, 'a+');\n if ($this->logHandle) {\n // track the file info for later\n clearstatcache();\n $stat = fstat($this->logHandle);\n $this->logNode = $stat['ino']; // will always be 0 on Windows\n $this->logSize = $stat['size'];\n return true;\n }\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "babfc45cc380b58f6e17b5ec3042c859", "score": "0.5549342", "text": "private function close()\n {\n $bReturn = TRUE;\n if( $this->isOpen()===TRUE )\n {\n $bReturn = fclose( $this->m_pFile );\n $this->m_pFile = NULL;\n }//if( $this->IsOpen(...\n return $bReturn;\n }", "title": "" }, { "docid": "1d53fc65ec9ab96d384a4483ad1d89c1", "score": "0.5537773", "text": "public function openTA()\n\t{\n\t$this->TA = simplexml_load_file($this->path.self::TA);\n\n\treturn $this->TA == false ? false : true;\n\t}", "title": "" }, { "docid": "1f3791d1cb5f4e2f31150a60efc4ed82", "score": "0.5535392", "text": "static function logOpen( $stLogFileName ) {\n\tglobal $util_logFd;\n\t$fd = fopen( $stLogFileName, \"w+\" );\n\n\tif( $fd == false ) { return false; }\n\n\t$util_logFd = $fd;\n\n\treturn true;\n}", "title": "" }, { "docid": "e0c5a670ee776f137645a62fb475a398", "score": "0.55305195", "text": "public function open($mode = 'a', $force = false)\n {\n if (!$force && is_resource($this->handle)) \n return true;\n\n if ($this->exists() === false) \n return false;\n\n $this->handle = fopen($this->file, $mode);\n return is_resource($this->handle);\n }", "title": "" }, { "docid": "cf85af4cb20369e513c8d47a2e404e5f", "score": "0.5522532", "text": "public function open() {\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "3e458746a417823c15027dba608f96c4", "score": "0.5512059", "text": "public function isFile()\n {\n return ($this->hasExtentsion()) ? true : false;\n }", "title": "" }, { "docid": "667d7dfd12e44675bcbffa32756d9f97", "score": "0.54887426", "text": "public function canRead($pFilename);", "title": "" }, { "docid": "2ac901a08cbc055aeb684d80c299c18b", "score": "0.54666823", "text": "public function isReadable(){\n\t\treturn is_readable($this->path());\n\t}", "title": "" }, { "docid": "4b9644e68275aa416e96fdf31268a50a", "score": "0.5462158", "text": "public function isReadable() : bool\n {\n return is_readable($this->file);\n }", "title": "" }, { "docid": "701f9a6d2d2db626e38d29c80c0ce596", "score": "0.54562706", "text": "function write_file($file,$content,$mode=\"w\")\r\n\t\t{\r\n\t\t\t//echo 'write_file entered!<br>';\r\n\t\t\t$fp=@fopen($file,$mode);\r\n\t\t\tif(!is_resource($fp)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfwrite($fp,$content);\r\n\t\t\tfclose($fp); \r\n\t\t\t//file_put_contents ($file, $content);\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "9c7b1386c73428b8d9e1a1b79f57e120", "score": "0.5448086", "text": "public function open(string $path, string $name): bool\n {\n return true;\n }", "title": "" }, { "docid": "13f566b0837f33109bb004c425b226be", "score": "0.543022", "text": "private function infoFile() {\r\n\t\t$filename = $this->getFilePath();\r\n\t\tif(file_exists($filename)) {\r\n\t\t\tprint(filesize($filename));\r\n\t\t} else {\r\n\t\t\tprint(\"-1\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "edb154848a763bf8b277e0551eeaf07b", "score": "0.5424239", "text": "function read($file=NULL) {\n\t\t$file = fra_var[\"files_path\"].\"\".$file;\n\t\tif(file_exists($file)) {\n\t\t\t$return = file_get_contents($file);\n\t\t\treturn $return;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "3e84c67ef6f3e4324809e891ca3569c0", "score": "0.5406317", "text": "protected function read() {\n\t\t\n\t\t$this->content = file_get_contents( $this->path );\n\t\t\t\t\n\t\treturn ($this->content !== false);\n\t}", "title": "" }, { "docid": "d99c9daebddf3dd51f4000c41f0ab5d8", "score": "0.5396873", "text": "function isFile();", "title": "" }, { "docid": "f09983acb508236266d3a738d001a3a1", "score": "0.5393816", "text": "private function checkInputFile(): bool\n {\n return true;\n }", "title": "" }, { "docid": "6465f11c0bd0f8d62d329232a7f23296", "score": "0.5392911", "text": "public function hasFilePath() : bool ;", "title": "" }, { "docid": "a3aac310a8d760aa33734714c259c6b2", "score": "0.53837925", "text": "protected function shouldWrite()\n {\n return $this->overwrite ?: ! file_exists($this->output);\n }", "title": "" }, { "docid": "5afaed6a2a5507a2877ac6826a1625bb", "score": "0.53549165", "text": "private function closeFileIfNeeded() {\n\t\tif (!feof($this->handleFopenConnection)) {\n\t\t\tfclose($this->handleFopenConnection);\n\t\t}\n\t}", "title": "" }, { "docid": "4418fb5b32c40302157ae7e0ab1d7ac3", "score": "0.53518295", "text": "function existing_file()\r\n\t{\r\n\t $file_name = trim($this->file_name);\r\n\t $upload_dir = $this->get_upload_directory();\r\n\r\n\t if ($upload_dir == \"ERROR\")\r\n\t \t\treturn true;\r\n\t else\r\n\t {\r\n\t $file = $upload_dir . $file_name;\r\n\t if (file_exists($file))\r\n\t \treturn true;\r\n\t else\r\n\t \treturn false;\r\n\r\n\t }\r\n\t}", "title": "" }, { "docid": "a989c4f6f9b06aa8283c58f54e9bedae", "score": "0.534927", "text": "public function FetchFile()\n {\n if (self::IsFile()) {\n return file_get_contents($this->file);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1d1c694ffeaaf6f2ae724423d2f12c1a", "score": "0.5347251", "text": "public function testOpenReadFile()\n {\n // setup\n /** @var HDFSClient $hdfs */\n $hdfs = $this->hdfs;\n $hdfs->create($this->remoteFile, $this->localFile);\n $expectedResult = file_get_contents($this->localFile);\n\n // test\n $result = $hdfs->open($this->remoteFile);\n\n // cleanup\n $hdfs->delete($this->remoteFile);\n\n // asserts\n $this->assertEquals($result, $expectedResult, \"Local File and Remote File were not the same.\");\n }", "title": "" }, { "docid": "81ece22ec6d9ee296e068d153e8ced4f", "score": "0.53419274", "text": "function create_file($namafile=\"\"){\r\n\t\t\t$ses=session_id();\r\n\t\t\tif(strlen($namafile)>0):\r\n\t\t\t\t$this->data[\"namafile\"]=$ses.\".\".$namafile.\".prn\";\r\n\t\t\telse:\r\n\t\t\t\t$this->data[\"namafile\"]=$ses.\".prn\";\r\n\t\t\tendif; #if(strlen($namafile)>0):\r\n\r\n\t\t\t$file2create=$this->data[\"namafile\"];\r\n\t\t\t$fp=@fopen($file2create,\"w\");\r\n\t\t\tif($fp):\r\n\t\t\t\t$this->data[\"filepointer\"]=$fp;\r\n\t\t\t\t$this->data[\"filestatus\"]=\"open\";\r\n\t\t\t\treturn $fp;\r\n\t\t\telse:\r\n\t\t\t\t$this->data[\"error\"]=\"Gagal Create File : \".$file2create;\r\n\t\t\t\treturn false;\r\n\t\t\tendif; #if($fp):\r\n\t\t}", "title": "" }, { "docid": "d745832f7fc97c264eddcc6764858a57", "score": "0.53397554", "text": "private function open()\r\n\t\t\t{\r\n\t\t\t\tif (!($this->stream = fopen($this->path, 'rb')))\r\n\t\t\t\t\tdie('Could not open stream for reading');\r\n\t\t\t}", "title": "" }, { "docid": "6b5fc1506fdea867f15cc28d8b7def0e", "score": "0.5336937", "text": "public function open($file) {\n\t\tif ($this->isOpen())$this->reset();\n\t\tif (!is_file($file)) {throw new FileNotFoundException($file);}\n\t\t$this->FILE = fopen($file, 'r');\n\t\tif (!$this->FILE) {throw new IOException(\"fopen failed for $file.\");}\n\t\t$this->ISOPEN=true;\n\t\tif($this->fetch_type == self::FETCH_ASSOC){\n\t\t\t$this->HEADERS=$this->next();\n\t\t\tif ($this->HEADERS===false) {$this->STATE=self::STATE_EOF; throw new IOException(\"Error reading the headers.\");}\n\t\t$this->header_count = count($this->HEADERS);\n\t\t$this->DEFAULTS = array_fill(0, $this->header_count, $this->default_value);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3827e574ae579519ddbd7d4df699929c", "score": "0.5335243", "text": "public function openFile($mode, $filename);", "title": "" }, { "docid": "43c71877f59eb237585dc135cca836ec", "score": "0.5333484", "text": "public function isSeekable()\n {\n }", "title": "" }, { "docid": "8165188d5b5fdd055aaa00774c03d147", "score": "0.5322165", "text": "public function fileExists()\n {\n if ( !is_file($this->_sourceFile) || !is_readable($this->_sourceFile)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "3ac6dd17d99862ad39d8cfa530cdf34b", "score": "0.53173274", "text": "public function open($descriptionFile);", "title": "" }, { "docid": "f93e954a3aa37a5c96428871542940a9", "score": "0.53142005", "text": "private function readFile(){\n $file = file_get_contents($_SERVER['DOCUMENT_ROOT'].\"/hangout-reader/json/Hangouts.json\");\n if($file === false){\n return false;\n }\n return $file;\n }", "title": "" }, { "docid": "872c9f0dd05011863c9eda8f8c1702d0", "score": "0.53046227", "text": "public function hasFile()\n {\n return $this->hasFile;\n }", "title": "" }, { "docid": "b1275e7f1bdf69a002b622480c53a05d", "score": "0.53012955", "text": "function open()\n\t{\n\t\tif (is_resource($this->db_link))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "7207e8116f32842e9d410758348966a0", "score": "0.5298593", "text": "function create_logfile ($file)\r\n\t{\r\n\t\t$file_handle = fopen($file, 'w');\r\n\t\tif($file_handle)\r\n\t\t{\r\n\t\t\tfclose($file_handle);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "cfd8a71a8cf811c2e312c38215196e7b", "score": "0.52936196", "text": "function fileIsReadable($f){\n\t//get the file brower object\n\t$browser = get_file_browser();\n\t$thecontext = context::instance_by_id($f->get_contextid());//get_context_instance_by_id($f->get_contextid());\n\t$fileinfo = $browser->get_file_info($thecontext, $f->get_component(),$f->get_filearea(), $f->get_itemid(), $f->get_filepath(), $f->get_filename());\n\t//if we have insuff permissions to delete. Exit.\n\tif(!$fileinfo || !$fileinfo->is_readable()){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "4d437b0635af59bcfa80e37487a91e4e", "score": "0.5287908", "text": "public function stream_open($path, $mode, $options, &$opened_path): bool\n {\n self::$autoloadLocatedFile = $path;\n\n // @infection-ignore-all FalseValue\n return false;\n }", "title": "" }, { "docid": "6966a04b288044e31fdc087983027e5d", "score": "0.5267367", "text": "public function open($save_path, $name)\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6966a04b288044e31fdc087983027e5d", "score": "0.5267367", "text": "public function open($save_path, $name)\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b54345a742cba072564819605a745729", "score": "0.5262741", "text": "public function hasFilePath(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "3b13eecc4cec97e50cdc8babf50509b5", "score": "0.5262053", "text": "public function read() :bool\n {\n return true;\n }", "title": "" }, { "docid": "6a7a0a2c249853cd0fd5d9de80002fe2", "score": "0.52593803", "text": "public static function isReadable($filename) {\n if (!$fh = @fopen($filename, 'r', true)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "64901f104e59ae207c844aac4505f7c1", "score": "0.52542406", "text": "protected function openCurrentFile()\n {\n if($this->files->valid()) {\n $this->resource = fopen($this->files->current(), 'r');\n }\n }", "title": "" }, { "docid": "7be2231865ffd2e47d2e1b10b21bef90", "score": "0.52525103", "text": "public function isFile() : bool\n {\n return is_file( $this->path );\n }", "title": "" }, { "docid": "774e637c6b86023ae3bddd48ebc1e0d7", "score": "0.52495027", "text": "public function openFile($path, $mode = 'w');", "title": "" }, { "docid": "a6885daadf6f44877308a0fe87b17a18", "score": "0.52487373", "text": "public function isSeekable(): bool;", "title": "" }, { "docid": "c4e693e4b8e50141051e54fd4f4ac030", "score": "0.5236933", "text": "public function isFile()\n {\n return $this['kind'] === 'FILE';\n }", "title": "" }, { "docid": "55cf041e3681dfd30fcda4a0c8f99d24", "score": "0.52341485", "text": "function PLG_showDownloadStatus($fileName)\n{\n $file=fopen($fileName,\"r\");\n $counter=0;\n while (!feof($file))\n \t{\n\t $line=fgets($file,10000);\n\t if (strlen(trim($line))==0) break;\n\t $counter++;\n\t}\n fclose($file);\n if ($counter > 2)\n \treturn(FALSE);\n\telse\n\treturn(TRUE);\n}", "title": "" }, { "docid": "f341b49b924ea630dbf7b30a630bde27", "score": "0.52325404", "text": "public function isOpen();", "title": "" }, { "docid": "7f58ae38df06ac362aa68afb390f081f", "score": "0.522945", "text": "public function modeBoth($file,$path) {\n if (preg_match(\"/.src/\",$file)) {\n $this->tmpFile->newFile();\n $pathOut = $this->tmpFile->getFilePath();\n $src = $file;\n\n $rc = str_replace(\".src\",\".rc\",$file);\n if (!file_exists(($path.\"/\".$rc))) {\n $rcFile = fopen($path.\"/\".$rc,\"w+\");\n $txt = \"0\";\n fwrite($rcFile, $txt);\n fclose($rcFile);\n }\n\n $out = str_replace(\".src\",\".out\",$file);\n if (!file_exists($path.\"/\".$out)) {\n $outFile = fopen($path.\"/\".$out,\"w\");\n fclose($outFile); \n }\n \n $in = str_replace(\".src\",\".in\",$file);\n if (!file_exists($path.\"/\".$in)) {\n $inFile = fopen($path.\"/\".$in,\"w\");\n fclose($inFile); \n }\n\n $rcFlag = 0;\n $outFlag = 0;\n\n exec('php7.4 '.$this->parsePath.' < ' . $path . \"/\" . $src ,$parserOut,$parseReturn);\n $this->tmpFile->writeContent($parserOut);\n\n exec('python3.6 '.$this->interpretPath.' --source='.$this->tmpFile->getFilePath().' --input='.$path.'/'.$in, $interpretOut,$interpretReturn);\n \n $this->tmpFile->flushContent();\n $this->tmpFile->writeContent($interpretOut);\n\n $sampleReturn = file_get_contents($path . \"/\" . $rc);\n if ($interpretReturn == $sampleReturn) {\n $rcFlag = 1;\n }\n if ($sampleReturn == 0) {\n exec('diff ' . $this->tmpFile->getFilePath() . ' ' . $path.\"/\".$out,$diffOut,$diffReturn); \n $this->tmpFile->flushContent(); \n if ($diffReturn == 0) {\n $outFlag = 1;\n }\n }\n else {\n $outFlag = 1;\n }\n if ($rcFlag == 1 and $outFlag == 1) {\n $this->htmlGenerator->tableRow($file,$interpretReturn,$sampleReturn,\"MATCH\",1);\n $this->passedCount ++;\n }\n else {\n $this->htmlGenerator->tableRow($file,$interpretReturn,$sampleReturn,\"DO NOT MATCH\",0);\n $this->failedCount++;\n }\n }\n }", "title": "" }, { "docid": "6abf254e90e0bd87b81d8027ff3baf9b", "score": "0.52271324", "text": "function io()\n{ // ==========================================================\n // r Lesen Anfang Nein\n // r+ Lesen und Schreiben Anfang Nein\n // w Schreiben Anfang Ja\n // w+ Lesen und Schreiben Anfang Ja\n // a Schreiben Ende Ja\n // a+ Lesen und Schreiben Ende Ja\n\n\n $fp = fopen( 'file.txt', 'w+' ); // Open file.txt for reading from beginning\n //$fp = fopen('/usr/local/data/file.txt', 'w+'); // Open a file in another directory for writing and clear its contents\n //$fp = fopen('http://www.yahoo.com/', 'r'); // Open a webpage for reading. Only works if HTTP wrappers are\n //$fp = fopen(\"list.txt\", \"a+\") or die(\"Couldn't create new file\");\n\n //$read = fread($fp, 1024); // Read 1024 bytes from the file pointer\n //$read = fgets($fp, 2048); // Read up to 2048 bytes, unless EOL or EOF is found.\n\n fwrite( $fp, 'This is some text' ); // Writes to the file pointer\n //if (!fwrite($fp, �This is some text�)) {} // This conditional checks to see if we could not write to the file pointer\n\n fclose( $fp );\n}", "title": "" }, { "docid": "5cd317577c2ad404c6ca527697ca8262", "score": "0.52248675", "text": "public function reopenFile()\n {\n $this->openFileImpl(true);\n }", "title": "" }, { "docid": "f9172ceb823e40dd3d1a2f2355bb6537", "score": "0.5223097", "text": "public function open ($mode=null, $flags=null)\n {\n if ($this->open)\n { // Close the open stream.\n if (!$this->close())\n {\n return false;\n }\n }\n $this->stream = $this->file->openStream($mode, $flags);\n $this->open = true;\n return true;\n }", "title": "" }, { "docid": "5bf4725c95562ca1e69f0915bdfb402c", "score": "0.5222829", "text": "protected function openTargetFile() \n {\n if ( ( $this->targetHandle = fopen( $this->targetFile, \"w+\" ) ) === false ) \n {\n throw new \\RuntimeException( \"Definition target file '{$this->targetFile}' could not be opened for writing.\" );\n }\n }", "title": "" }, { "docid": "e8c5db9ff246da18f6ad8f00e2c27b33", "score": "0.5222333", "text": "protected function _open()\n\t{\n\t\t$mime = $this->_mimetype($file);\n/*\t\techo \"****************Content-Type: \".$file.\"****************\";*/\n\t\t\n\t\tif (isset($_GET['current'])) { // read file\n\t\t\tif (empty($_GET['current']) \n\t\t\t|| empty($_GET['target'])\n\t\t\t|| false == ($dir = $this->_findDir(trim($_GET['current'])))\n\t\t\t|| false == ($file = $this->_find(trim($_GET['target']), $dir))\n\t\t\t|| is_dir($file)\n\t\t\t) {\n\t\t\t\theader('HTTP/1.x 404 Not Found'); \n\t\t\t\texit('File not found');\n\t\t\t}\n\t\t\tif (!$this->_isAllowed($dir, 'read') || !$this->_isAllowed($file, 'read')) {\n\t\t\t\theader('HTTP/1.x 403 Access Denied'); \n\t\t\t\texit('Access denied');\n\t\t\t}\n\t\t\t\n\t\t\tif (filetype($file) == 'link') {\n\t\t\t\t$file = $this->_readlink($file);\n\t\t\t\tif (!$file || is_dir($file)) {\n\t\t\t\t\theader('HTTP/1.x 404 Not Found'); \n\t\t\t\t\texit('File not found');\n\t\t\t\t}\n\t\t\t\tif (!$this->_isAllowed(dirname($file), 'read') || !$this->_isAllowed($file, 'read')) {\n\t\t\t\t\theader('HTTP/1.x 403 Access Denied'); \n\t\t\t\t\texit('Access denied');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$mime = $this->_mimetype($file);\n\t\t\t$parts = explode('/', $mime);\n\t\t\t$disp = $parts[0] == 'image' || $parts[0] == 'text' ? 'inline' : 'attachments';\n\t\t\t\n\t\t\theader(\"Content-Type: \".$mime);\n\t\t\theader(\"Content-Disposition: \".$disp.\"; filename=\".basename($file));\n\t\t\theader(\"Content-Location: \".str_replace($this->_options['root'], '', $file));\n\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\theader(\"Content-Length: \".filesize($file));\n\t\t\theader(\"Connection: close\");\n\t\t\treadfile($file);\n\t\t\texit();\n\t\t\t\n\t\t} else { // enter directory\n\t\t\t$path = $this->_options['root'];\n\t\t\tif (!empty($_GET['target'])) {\n\t\t\t\tif (false == ($p = $this->_findDir(trim($_GET['target'])))) {\n\t\t\t\t\tif (!isset($_GET['init'])) {\n\t\t\t\t\t\t$this->_result['error'] = 'Invalid parameters';\n\t\t\t\t\t}\n\t\t\t\t} elseif (!$this->_isAllowed($p, 'read')) {\n\t\t\t\t\tif (!isset($_GET['init'])) {\n\t\t\t\t\t\t$this->_result['error'] = 'Access denied';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$path = $p;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_content($path, isset($_GET['tree']));\n\t\t}\n\t}", "title": "" }, { "docid": "1aa1b944287dde4c534430db349d3e4f", "score": "0.5213265", "text": "function file_read($xml_file){\r\n\t\tif(file_exists($xml_file)){\r\n\t\t\t$this->_xml_data=implode(\"\",file($xml_file));\r\n\t\t\treturn 1;\r\n\t\t}else{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "b0e8635fe321a536eacf70a26829a4f3", "score": "0.5207103", "text": "abstract function readfile();", "title": "" }, { "docid": "e1e06e150f83422a78dc2d4e389fa13c", "score": "0.5204291", "text": "function writeToFile($contents)\n\t\t{\n\t\t if($this->urlPth===false)\n\t\t {\n \t\t\tif(file_exists($this->pth))\n \t\t\t{\n \t\t\t\t$f = fopen($this->pth, \"w\");\n \t\t\t\tfwrite($f, $contents);\n \t\t\t\tfclose($f);\n \t\t\t\t$this -> fw = true;\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t if($this->createFile())\n \t\t\t {\n \t\t\t $f2 = fopen($this->pth, \"w\");\n \t\t\t fwrite($f2, $contents);\n \t\t\t fclose($f2);\n \t\t\t $this -> fw = true;\n \t\t\t }\n \t\t\t else\n \t\t\t {\n \t\t\t $this -> fw = false;\n \t\t\t }\n \t\t\t}\n\t\t }\n\t\t else\n\t\t {\n\t\t $this -> fw = false;\n\t\t }\n\t\t return($this -> fw);\n\t\t}", "title": "" }, { "docid": "511c383b95a0906629801ff35906cfbb", "score": "0.5202634", "text": "protected function _open($savePath, $sessionName)\n {\n return true;\n }", "title": "" }, { "docid": "ced1b7ca198b4309b1f0454c8c521676", "score": "0.52022076", "text": "function readfromfile(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3e440872f8c90ddf342fe0a40fffc882", "score": "0.5199814", "text": "public function isFile() {\n return is_file($this->__full_path);\n }", "title": "" }, { "docid": "28f4ab41a244f1035f9d4b30669a7d1c", "score": "0.51967746", "text": "function file_writable($fileLocation){\n \n $file = new FileHandler($fileLocation);\n\n if($file->writable_file()){\n $message = \"Success: (\".$file->fileName.\") is writeable\";\n $this->add_to_log($message);\n return true;\n }\n \n else{\n $message = \"Error: (\".$file->fileName.\") is not writeable\";\n $this->add_to_log($message); \n return false;\n }\n \n }", "title": "" } ]
93684fce423c5649f964507bf9af3dd4
Name we assigned to class when we binded it into the service container
[ { "docid": "2e5a46af67cd641335345fe18dcf1fdf", "score": "0.0", "text": "protected static function getFacadeAccessor()\n\t{\n\t\treturn 'form-builder';\n\t}", "title": "" } ]
[ { "docid": "05b85497688302131eab4bbea0284b8f", "score": "0.7223986", "text": "public function getName(){\n return __CLASS__;\n }", "title": "" }, { "docid": "ea96e7453aaa35be13879efdef4d6c40", "score": "0.69478154", "text": "public function getName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "5a5c5b74ab76dc528941d27829b8cdcb", "score": "0.68159485", "text": "public function className() {}", "title": "" }, { "docid": "f116996f6c3ad73709f7745d4b3ceed5", "score": "0.6571293", "text": "private function getContainerClass(): string\n {\n $class = str_replace('\\\\', '_', $this::class);\n $class .= ucfirst($this->environment);\n $class .= $this->debug ? 'Debug' : '';\n $class .= 'Container';\n\n return $class;\n }", "title": "" }, { "docid": "ef1cb04cd99c73bc556c8f4582c2b758", "score": "0.6538384", "text": "public function getClass()\r\n {\r\n return $this->name;\r\n }", "title": "" }, { "docid": "a97da7f07c3265df84a6440b25062673", "score": "0.6535675", "text": "public function getName()\n {\n return static::CLASS;\n }", "title": "" }, { "docid": "47cdb6e486b2fd885741f7b57dbd7d56", "score": "0.6529197", "text": "public function getClassname(): string;", "title": "" }, { "docid": "1713a25925f9adb82c07a92d66b87bc0", "score": "0.6512316", "text": "public function getClass(){\n return $this->class_name;\n }", "title": "" }, { "docid": "2b7e653b50dde56197df13b65f8f38c0", "score": "0.65049744", "text": "private function __get_class_name()\n {\n $this->__class = CONTROLLER_CLASS;\n }", "title": "" }, { "docid": "0f6f1ba00da43076731a8c35354b8c85", "score": "0.64652175", "text": "public function getClassName(){\n\t\treturn $this->className;\t\t\n\t}", "title": "" }, { "docid": "cf6870c04f7e73a4aaace56f44d9db5c", "score": "0.64637053", "text": "public function getName()\n {\n return \\get_class($this);\n }", "title": "" }, { "docid": "70a9fc60675772c51897b46a1c4ef768", "score": "0.64205223", "text": "public function className(){\n $class_name = get_class($this);\n $class_name = substr($class_name, strrpos($class_name, '\\\\') + 1);\n\n return $class_name;\n }", "title": "" }, { "docid": "92400b742b73692912f6ea97c8b5a302", "score": "0.6411874", "text": "public function __construct($class)\n {\n $this->name = $class;\n }", "title": "" }, { "docid": "573a3694aa6c4e004ba26795ee9fbad5", "score": "0.6409098", "text": "public function getName() {\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.6372082", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6370486", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6370486", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6370486", "text": "public function getClassName();", "title": "" }, { "docid": "20df715e1a569cec43bac201d45bfd07", "score": "0.63677204", "text": "public function getServiceName()\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "5db04ca9ba5ad87ba4f32c170b97753c", "score": "0.63450515", "text": "public function getClassName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "74ba637c6ae6965f890e8f1c051efb97", "score": "0.6334159", "text": "public function getClassName() : string;", "title": "" }, { "docid": "441a889a51a7091e8f05490c1123d7d7", "score": "0.63248235", "text": "public function getClassName(){\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "cfc58e61e706b7891eba32a3fb175797", "score": "0.63129413", "text": "public function className();", "title": "" }, { "docid": "d1de9033365c7e68978c9a6a497c5fed", "score": "0.63039297", "text": "function getClassName () {\r\n return $this->_classname;\r\n }", "title": "" }, { "docid": "8c6eaaa524f3e49fcd67abeab90116a1", "score": "0.6251242", "text": "public function getClassName()\n {\n return get_class();\n }", "title": "" }, { "docid": "8c6eaaa524f3e49fcd67abeab90116a1", "score": "0.6251242", "text": "public function getClassName()\n {\n return get_class();\n }", "title": "" }, { "docid": "ec454595ea1b19cae578e911d74a3cb1", "score": "0.6245322", "text": "public function getClass() {\n\n return $this::NAME;\n }", "title": "" }, { "docid": "d5210117ba5b6dcf56e0ca779e2378c0", "score": "0.6232825", "text": "public function __construct($class, $name)\n {\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.62310636", "text": "public function getClassName(): string;", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.62310636", "text": "public function getClassName(): string;", "title": "" }, { "docid": "7db4839ed568bb0dbd4f476a1ffd23d8", "score": "0.6197142", "text": "public function getName()\n {\n $clazz = get_class($this);\n $namespaceBreak = strrpos($clazz, '\\\\');\n if ($namespaceBreak !== false) {\n $clazz = substr($clazz, $namespaceBreak + 1);\n }\n return $clazz;\n }", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.6183517", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "8c8a84d957a72ffda2c923ee8683d451", "score": "0.61655223", "text": "public static function get_class(){return \\get_class();}", "title": "" }, { "docid": "fee3cec9d46cadce53938592d794c9db", "score": "0.61618435", "text": "public function getClassname()\n {\n return $this->_classname;\n }", "title": "" }, { "docid": "b8b608475b143053e71ff0762925db37", "score": "0.6152605", "text": "public function getClassname()\n {\n return $this->classname;\n }", "title": "" }, { "docid": "5e0790b4de8ad9f6b6bcf8848cbcff00", "score": "0.61109066", "text": "function getClassName()\n {\n return \"ProductBundleRepository\";\n }", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.6108485", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "4be163cf19d0e5a86219375a6f504430", "score": "0.610191", "text": "public function getClassName(): string\n {\n return $this->sClassName;\n }", "title": "" }, { "docid": "ac21a7cc746031c92c4b28e649d1f318", "score": "0.6090119", "text": "public function class_name() {\n\n\t\treturn strtolower( get_class( $this ) );\n\t}", "title": "" }, { "docid": "d06641fd7817ce8622e1c26669d3ed97", "score": "0.60891503", "text": "public function get_name() {\r\n\t\treturn 'eblog-ourservices';\r\n\t}", "title": "" }, { "docid": "e0878957c6d619f0e04916f5a5cdba95", "score": "0.6087412", "text": "public function defineName()\n\t{\n\t\t$this->name['unit'] \t\t= strtolower( get_called_class() );\n\t\t$this->name['collection'] \t= $this->name['unit'] . 's';\n\t}", "title": "" }, { "docid": "5d851c2c5de26e98bc148c636113ae0c", "score": "0.6082997", "text": "public function __construct()\n\t{\n\t\t// Build class instance\n\t\tpreg_match('/App\\\\\\System\\\\\\Service\\\\\\(.*)Service/i', get_class($this), $matches);\n\t\t$this->_classInstance = \"App\\System\\Entity\\\\\" . $matches[1];\n\t}", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.60723764", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "b831d4e58ed5700f7b8acfdaf31345ba", "score": "0.60691744", "text": "public function name() {\n\t\t\n\t\tif(!isset($this->_name)){\n\t\t\t$className = get_class($this);\n\n\t\t\t$arr = explode('\\\\', $className);\n\t\t\t$this->_name=strtolower($arr[1]);\n\t\t}\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "bd1bd893b93fe5f50812620264d0eae8", "score": "0.6065458", "text": "function ServiceType (){\r\n\t}", "title": "" }, { "docid": "6e5305a31a4749f08491f086bf063bad", "score": "0.6062813", "text": "public function getClassName(): string\n {\n return \"js-store-\".$this->getName();\n }", "title": "" }, { "docid": "9cec9f089d2c9b88d3e3c9cf6ce72df7", "score": "0.6046717", "text": "public function getName()\n {\n return class_basename($this);\n }", "title": "" }, { "docid": "55f7ae747c8634ad23a65697b0b08293", "score": "0.60401976", "text": "function getName()\n \t{\n \t\t$name = $this->_name;\n\n \t\tif (empty( $name )) {\n\n \t\t\t$r = null;\n\n \t\t\tif (!preg_match( '/Com(.*)/i', get_class( $this ), $r)) {\n throw new AnErrorException(\n \"Can't get or parse the class name.\",\n KHttpResponse::INTERNAL_SERVER_ERROR\n );\n \t\t\t}\n\n \t\t\t$name = strtolower( $r[1] );\n \t\t}\n\n \t\treturn $name;\n \t}", "title": "" }, { "docid": "6af01c56ef23e8d69cf5df92d40817e8", "score": "0.6036716", "text": "public function className(): string\n {\n return $this->class->getName();\n }", "title": "" }, { "docid": "d10d9b0de1f8f0b4c0e967d91cb156dd", "score": "0.60263556", "text": "protected function getClassName() {\n // get class name with namespace\n return \"\\\\modules\\\\$this->name\\\\\".ucfirst($this->name);\n }", "title": "" }, { "docid": "d689a5eaa6a67994899af0fa2733137d", "score": "0.60229635", "text": "protected function getClass(): string\n {\n return $this->config->className(\n static::ELEMENT,\n (string)$this->argument('name')\n );\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.6010829", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.6010829", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.6010829", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "406996e42ed55070064248f32ee1ae61", "score": "0.60096204", "text": "protected function getCalledClassName()\n {\n //Use for all it derived class\n return 'QdProduct';\n }", "title": "" }, { "docid": "924a7447b654d32ae069850901a5fea3", "score": "0.5988126", "text": "public function class()\n {\n return $this->class;\n }", "title": "" }, { "docid": "53c05d58273723e1aa401496d03ce1ad", "score": "0.5983713", "text": "public static function __name(): string\n {\n return (new ReflectionClass(\\get_class(new static())))->getShortName();\n }", "title": "" }, { "docid": "b4305d0c0ede7a08dd0f07b94f8f2766", "score": "0.5977745", "text": "public function getClassName() \n {\n return 'Widget_Context';\n }", "title": "" }, { "docid": "3bcd60bd42ca92eeda3e801f33cf2733", "score": "0.5976685", "text": "public function getClassName($class);", "title": "" }, { "docid": "6a5fe810f33aafb21ffc3b52248b0871", "score": "0.5970949", "text": "public function getClass()\n {\n return $this->className;\n }", "title": "" }, { "docid": "9097376a422e356fb3df91d114e2fd58", "score": "0.5953982", "text": "public function getClassName()\n {\n return $this->_class->getName();\n }", "title": "" }, { "docid": "17a2769f859aa106511f7695605a8b1a", "score": "0.5952205", "text": "protected function getClass(): string\n {\n return self::class;\n }", "title": "" }, { "docid": "9bcec2fc0c78ab6e98c194a2a9bdeb1f", "score": "0.59326184", "text": "public function getName ()\n {\n $class = get_class($this);\n return \"{$this->getPrefix()}_{$class}\";\n }", "title": "" }, { "docid": "057f224af4b08df6ecb7efdf48f2a307", "score": "0.5932542", "text": "private function _configure() {\n //\"FW_Config_Handler_\",$class);\n $class = get_called_class();\n $class = substr($class,18);\n $name = strtolower($class);\n $this->_name = $name; \n }", "title": "" }, { "docid": "bbc15703f99493608706b07753f573ad", "score": "0.5931719", "text": "private function get_class_name(): string\n {\n $class = null;\n\n try {\n $class = new ReflectionClass( $this->settings );\n } catch ( Exception $e ) {\n print $e;\n }\n\n return $class->getShortName();\n }", "title": "" }, { "docid": "a91168099b0ea1847cad6fbc7b3f75aa", "score": "0.5928494", "text": "protected function getCalledClassName()\n {\n //Use for all it derived class\n return 'QdPro2Pro';\n }", "title": "" }, { "docid": "ae2dfec08d3360baea82ff88d80cb699", "score": "0.59185207", "text": "public function getClassName()\n\t{\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "8dc173f5533127a10505fdea52871c16", "score": "0.59168464", "text": "private function _setClassName(string $name)\n {\n $this->_addCompileData('class_name', $this->uppercase_first($this->camelcase($name)));\n }", "title": "" }, { "docid": "f264501ed50ee5e5ff3b2459983a522f", "score": "0.59153146", "text": "public function getClassName() {\n return get_class($this);\n }", "title": "" }, { "docid": "393d5b00fbbfbcef5be945979ec24088", "score": "0.59112835", "text": "public function handle($class_name){\n \n \n \n \n }", "title": "" }, { "docid": "49df58ef0b6394657411dc8662f77ba1", "score": "0.5902701", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "49df58ef0b6394657411dc8662f77ba1", "score": "0.5902701", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "e424b1e7ff077dd8d748411fef540643", "score": "0.5894257", "text": "public function getName()\n {\n if (!$this->name) {\n $class = get_class($this);\n $className = substr($class, -1 * strrpos($class, '\\\\'));\n $this->name = strtolower($className);\n }\n\n return $this->name;\n }", "title": "" }, { "docid": "93a72076a123f3bb87153261e0f7ac21", "score": "0.5893438", "text": "protected function getContainerExtensionClass(): string\n {\n $basename = preg_replace('/Bundle$/', '', $this->getName());\n return $this->getNamespace() . '\\\\DependencyInjection\\\\' . $basename . 'Extension';\n }", "title": "" }, { "docid": "da256f94c8a1c03123b5c4c7e95bf282", "score": "0.58872515", "text": "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "title": "" }, { "docid": "31a31d99a6381d05ffa91f95915a9088", "score": "0.58771974", "text": "abstract protected function providerClass(): string;", "title": "" }, { "docid": "66588991bdda3997eb15e69462888cc3", "score": "0.5871603", "text": "public function __toString() \r\n {\r\n return $this->getClassName();\r\n }", "title": "" }, { "docid": "b14eddce181502fcbb9526601239c2a4", "score": "0.58676904", "text": "public function classname() {\n return $this->_classname;\n }", "title": "" }, { "docid": "8aab3fa5996071c3293301b70f58b64d", "score": "0.586705", "text": "public function genClassService() {\r\n $service = new ZendClassGenerator();\r\n $service->setNamespaceName('Magere\\\\' . $this->nameModule . '\\Service')\r\n ->addUse('Agere\\Db\\Query\\Where')\r\n ->addUse('Agere\\Service\\AbstractService')\r\n ->addUse('Agere\\Service\\Factory\\Helper', 'ServiceFactoryHelper')\r\n ->setName($this->nameModule . 'Service')\r\n ->setExtendedClass('AbstractService')\r\n ->addMethods(array(\r\n // Method passed as concrete instance\r\n new MethodGenerator(\r\n 'getItem',\r\n array(\"id\"),\r\n MethodGenerator::FLAG_PUBLIC,\r\n '$mapper = $this->getMapper(\\'' . $this->getLowercase($this->nameModule) . '/' . $this->getLowercase($this->nameModule) . '\\');' . \"\\n\" .\r\n '$' . $this->getLowercase($this->nameModule) . '= $mapper->find($id);' . \"\\n\\n\" .\r\n 'if (!$' . $this->getLowercase($this->nameModule) . ') {' . \"\\n\\t\" .\r\n '$' . $this->getLowercase($this->nameModule) . ' = $mapper->getObjectFactory()->createObject(array()); // create fake object' . \"\\n\" .\r\n '}' . \"\\n\" .\r\n 'return $' . $this->getLowercase($this->nameModule) . ';',\r\n DocBlockGenerator::fromArray(array(\r\n 'shortDescription' => 'Get user object by id',\r\n 'longDescription' => 'Return valid ' . $this->nameModule . ' object otherwise non valid object',\r\n 'tags' => array(\r\n new Tag\\ParamTag(array(\r\n 'datatype' => 'int $id'\r\n )),\r\n new Tag\\ReturnTag(array(\r\n 'datatype' => '\\Magere\\\\' . $this->nameModule . \"\\\\Model\\\\\" . $this->nameModule . \"\\\\\" . $this->nameModule,\r\n )),\r\n ),\r\n ))\r\n ),\r\n // Method passed as concrete instance\r\n new MethodGenerator(\r\n 'getItemCollection',\r\n array(new ParameterGenerator('where', 'Where')),\r\n MethodGenerator::FLAG_PUBLIC,\r\n '$mapper = $this->getMapper(\\'' . $this->getLowercase($this->nameModule) . '/' . $this->getLowercase($this->nameModule) . '\\');' . \"\\n\\n\" .\r\n '$collection = $mapper->limit(0)' . \"\\n\\t\" .\r\n '->findWhere($where);' . \"\\n\\n\" .\r\n 'return $collection;',\r\n DocBlockGenerator::fromArray(array(\r\n 'longDescription' => null,\r\n 'tags' => array(\r\n new Tag\\ParamTag(array(\r\n 'datatype' => 'Where $where'\r\n )),\r\n new Tag\\ReturnTag(array(\r\n 'datatype' => '\\Magere\\\\' . $this->nameModule . \"\\\\Model\\\\\" . $this->nameModule . \"\\\\Mapper\\\\\" . $this->nameModule . \"DeferredCollection\",\r\n )),\r\n ),\r\n ))\r\n ),\r\n ));\r\n\r\n return $service->generate();\r\n }", "title": "" }, { "docid": "5d72782e1160a4cd5e880df191429775", "score": "0.58428305", "text": "public function getClassName(){\r\n return array_pop(explode('\\\\', get_class($this)));\r\n }", "title": "" }, { "docid": "d1991a96ac7d8b9a5982b5f099d1084a", "score": "0.5840684", "text": "private static function getClass(){\n $array = explode('\\\\', strtolower(get_called_class()));\n $string = array_pop($array);\n return substr($string, -1) === \"s\" ? $string : $string.\"s\";\n }", "title": "" }, { "docid": "3fd827d63421e5d83c9bff736ca158d4", "score": "0.58381927", "text": "public function getName(): string\n {\n return $this->reflectionClass->getName();\n }", "title": "" }, { "docid": "55e7ce72c990d8166f1b20b6118450e2", "score": "0.58375275", "text": "public function getClassName() {\r\n\t\t\treturn $this->className;\r\n\t\t}", "title": "" }, { "docid": "e8ec505adb27c4621a4e9bc87c1e92a5", "score": "0.5836056", "text": "function __construct() {\n\t\t$this -> instanceName = 'default';\n\t}", "title": "" }, { "docid": "2a560aa65a5d26a5e349d202a37e8ed0", "score": "0.5833434", "text": "public function GetClassName() {\n\t\treturn \"DBObj_\".$this->extname.\"_\".$this->tblname;\n\t}", "title": "" }, { "docid": "41c252c8ff220972794bfd9baf67f5b7", "score": "0.58332694", "text": "public function getClass(): string;", "title": "" }, { "docid": "41c252c8ff220972794bfd9baf67f5b7", "score": "0.58332694", "text": "public function getClass(): string;", "title": "" }, { "docid": "41c252c8ff220972794bfd9baf67f5b7", "score": "0.58332694", "text": "public function getClass(): string;", "title": "" }, { "docid": "41c252c8ff220972794bfd9baf67f5b7", "score": "0.58332694", "text": "public function getClass(): string;", "title": "" }, { "docid": "e932767cf1f05144365f8a08068f8cb6", "score": "0.58269554", "text": "public function get_name() {\n\t\tif ( defined( 'static::NAME' ) ) {\n\t\t\treturn static::NAME;\n\t\t}\n\n\t\tthrow new RuntimeException( 'Service Provider does not define `NAME` constans.' );\n\t}", "title": "" }, { "docid": "0661f826a03f7fc974a78c503dafc5d3", "score": "0.582377", "text": "protected static function getServicesClass()\n {\n return Services::class;\n }", "title": "" }, { "docid": "881b1c59006cec0dc6f98fb706f6ff9e", "score": "0.5800769", "text": "public static function getName()\n {\n $className = get_called_class();\n $baseClass = substr(strrchr($className, '\\\\'), 1);\n return lcfirst($baseClass);\n }", "title": "" }, { "docid": "78ca16889064d06748925411e9eed531", "score": "0.5798296", "text": "protected final static function className() {\n\t\t\treturn get_called_class();\n\t\t}", "title": "" }, { "docid": "2276e015e06f604ade259444ab130dc5", "score": "0.5797433", "text": "public function getFullClassName(): string\n {\n return $this->getData()['class'];\n }", "title": "" }, { "docid": "37b64b458eb73ca17b2b917e1a422b17", "score": "0.57920164", "text": "public function getClass()\n {\n return class_basename($this->argument($this->argumentName));\n }", "title": "" }, { "docid": "5424300f32a99c69c22cf5b25169ef78", "score": "0.5789594", "text": "public function testFunctionClassToName()\n {\n $this->assertSame('eraple-core-test-unit-data-stub-sampleservice', $this->app->classToName(SampleService::class));\n $this->assertSame('test-----testing', $this->app->classToName('test --- testing'));\n }", "title": "" }, { "docid": "61d5382e5e9be476878630a52bbc90bc", "score": "0.5775282", "text": "private function setName(){\n $name = str_replace('App','',str_replace('\\\\', '', str_replace('Controller','',get_class($this))));\n return $name;\n }", "title": "" }, { "docid": "7ea45c954e863a9f97c97d675efe1a55", "score": "0.57610416", "text": "public static function class_name($type, $name)\n\t{\n\t\t$prefix = isset(Yada::$_prefix[$type])\n\t\t\t? Yada::$_prefix[$type]\n\t\t\t: 'yada_'.$type.'_';\n\t\treturn strtolower($prefix.$name);\n\t}", "title": "" }, { "docid": "cf076fd277739385556cbcb770253a64", "score": "0.5759119", "text": "public function replicationClassName() {}", "title": "" }, { "docid": "c5feda633a6c9925864e2e76ccbff8eb", "score": "0.57547784", "text": "protected function getContainerClass()\n {\n $class = \\get_class($this);\n $class = 'c' === $class[0] && 0 === strpos($class, \"class@anonymous\\0\") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class;\n $class = str_replace('\\\\', '_', $class).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container';\n if (!preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $class)) {\n throw new \\InvalidArgumentException(sprintf('The environment \"%s\" contains invalid characters, it can only contain characters allowed in PHP class names.', $this->environment));\n }\n\n return $class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.57350636", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" } ]
a36a2fe406bfcbf93bec6fbe844c98a5
Takes the body from the SpiderTracks response and returns an array of stdClass objects with appropriate response data
[ { "docid": "79ae21c80a89f17e191041ed976cb781", "score": "0.53369707", "text": "public static function format($response_body) {\n $xml = simplexml_load_string($response_body);\n \n $output = array();\n foreach ($xml->posList->acPos as $position) {\n $output[] = (object) array(\n 'imei' => (string) $position['esn'],\n 'date' => new DateTime((string) $position['dateTime']),\n 'latitude' => (float) $position->Lat,\n 'longitude' => (float) $position->Long,\n 'altitude' => (float) $position->altitude,\n 'speed' => (float) $position->speed,\n 'heading' => (float) $position->heading\n );\n }\n \n return $output;\n }", "title": "" } ]
[ { "docid": "575648884775c990495c02a9a5137fa2", "score": "0.60734373", "text": "private function parseResponse() {\r\n\t\treturn json_decode($this->response, true);\r\n\t}", "title": "" }, { "docid": "97f57b7c96469f14bb5bdad097fd928c", "score": "0.60733914", "text": "public function parseResponse();", "title": "" }, { "docid": "a7299c1d54b6e475c50647d5e75d1c8e", "score": "0.58494973", "text": "abstract public function parseResponse();", "title": "" }, { "docid": "eda3e64791943cc72c1ab394df7c27ed", "score": "0.5729709", "text": "abstract public function parseResponse(array $responseBody);", "title": "" }, { "docid": "9da11335321acf395c29053234abf60f", "score": "0.56315607", "text": "public function getData()\n {\n return json_decode($this->response);\n }", "title": "" }, { "docid": "63f8a58c1acc889c39e3636b9ac372a1", "score": "0.5624186", "text": "public function body()\n {\n return (array) json_decode((string) $this->response->getBody(), true);\n }", "title": "" }, { "docid": "711f9f585b5901f068985e73b26b8c80", "score": "0.55401736", "text": "public function asArray() : array {\r\n\t\t\treturn json_decode($this->getBody(), true);\r\n\t\t}", "title": "" }, { "docid": "8d2350dcf808e6e7619624c2902c2c20", "score": "0.5506043", "text": "private function getResponse()\n {\n return json_decode($this->response->getBody(), true);\n }", "title": "" }, { "docid": "dcf923eeb5f5a64437fec62afdd3eef8", "score": "0.55024636", "text": "public function get_many_sample_api_response() {\n return json_decode(\n file_get_contents( sprintf(\"%s/gBooksResponse.json\", base_path()) )\n );\n }", "title": "" }, { "docid": "ebebfd97d747c06b7c6fbb51b86d64e1", "score": "0.54885787", "text": "protected function parseDataFromResponse()\n {\n $xml = simplexml_load_string($this->rawResponse->body); \n $encodingType = isset($xml->EncodingType) ? strval($xml->EncodingType) : \"\";\n $objectVersionList = $this->parseObjecVersionList($xml, $encodingType);\n $deleteMarkerList = $this->parseDeleteMarkerList($xml, $encodingType);\n $prefixList = $this->parsePrefixList($xml, $encodingType);\n $bucketName = isset($xml->Name) ? strval($xml->Name) : \"\";\n $prefix = isset($xml->Prefix) ? strval($xml->Prefix) : \"\";\n $prefix = OssUtil::decodeKey($prefix, $encodingType);\n $keyMarker = isset($xml->KeyMarker) ? strval($xml->KeyMarker) : \"\";\n $keyMarker = OssUtil::decodeKey($keyMarker, $encodingType);\n $nextKeyMarker = isset($xml->NextKeyMarker) ? strval($xml->NextKeyMarker) : \"\";\n $nextKeyMarker = OssUtil::decodeKey($nextKeyMarker, $encodingType);\n $versionIdMarker = isset($xml->VersionIdMarker) ? strval($xml->VersionIdMarker) : \"\";\n $nextVersionIdMarker = isset($xml->NextVersionIdMarker) ? strval($xml->NextVersionIdMarker) : \"\";\n $maxKeys = isset($xml->MaxKeys) ? intval($xml->MaxKeys) : 0;\n $delimiter = isset($xml->Delimiter) ? strval($xml->Delimiter) : \"\";\n $delimiter = OssUtil::decodeKey($delimiter, $encodingType);\n $isTruncated = isset($xml->IsTruncated) ? strval($xml->IsTruncated) : \"\";\n\n return new ObjectVersionListInfo($bucketName, $prefix, $keyMarker, $nextKeyMarker, \n $versionIdMarker, $nextVersionIdMarker,$maxKeys, $delimiter, $isTruncated,\n $objectVersionList, $deleteMarkerList, $prefixList);\n }", "title": "" }, { "docid": "0830d5a0ff133dcf927e2e1db69c6f34", "score": "0.5486434", "text": "public function toArray()\n {\n $body = $this->getBody();\n // Base64 encode when binary\n if (\n strpos($this->getContentType(), 'application/x-gzip') !== false\n || strpos($this->getContentType(), '/mpeg') !== false\n || $this->getHeader('Content-Transfer-Encoding') == 'binary'\n ) {\n $body = base64_encode($body);\n }\n\n return array_filter(\n array(\n 'status' => $this->status,\n 'headers' => $this->getHeaders(),\n 'body' => $body\n )\n );\n }", "title": "" }, { "docid": "243039349c7c0258526d7e6d9421773f", "score": "0.5446503", "text": "public function getResponse()\n {\n if (!$this->response) {\n return array();\n }\n $headers['response_code'] = $this->response->status_code;\n foreach ($this->response->headers as $key => $value) {\n $headers[$key] = $value;\n }\n $response['headers'] = $headers;\n return array_merge($response, json_decode($this->response->body, true));\n }", "title": "" }, { "docid": "6393a7ef725b297d9242198850290cf7", "score": "0.5435247", "text": "public function providerParseCurlResponse()\n {\n return [\n 'when body contains HTTP header then separate header and body' => [\n [\n 'header' => \"HTTP/1.1 200 OK\\r\\nCache-Control: private, max-age=0\\r\\nContent-Length: 61936\\r\\n\\r\\n\",\n 'body' => \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><soap:Envelope xmlns:soap=\\\"http://www.w3.org/2003/05/soap-envelope\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\"><soap:Body><DemandHistoryResponse xmlns=\\\"http://api.ris.itmh.local/B2CRegress/\\\"><Mem> 46.48.112.193 - - [01/Sep/2013:15:08:47 +0200] \\\"POST wp-login.php HTTP/1.0\\\" 301 555 \\\"referer-domain.tld\\\" \\\"Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20130101 Firefox/19.0\\\"\\r\\n\\r\\n</Mem></DemandHistoryResponse></soap:Body></soap:Envelope>\"\n ],\n \"HTTP/1.1 200 OK\\r\\nCache-Control: private, max-age=0\\r\\nContent-Length: 61936\\r\\n\\r\\n<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><soap:Envelope xmlns:soap=\\\"http://www.w3.org/2003/05/soap-envelope\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\"><soap:Body><DemandHistoryResponse xmlns=\\\"http://api.ris.itmh.local/B2CRegress/\\\"><Mem> 46.48.112.193 - - [01/Sep/2013:15:08:47 +0200] \\\"POST wp-login.php HTTP/1.0\\\" 301 555 \\\"referer-domain.tld\\\" \\\"Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20130101 Firefox/19.0\\\"\\r\\n\\r\\n</Mem></DemandHistoryResponse></soap:Body></soap:Envelope>\"\n ]\n ];\n }", "title": "" }, { "docid": "778dd1e88a0ceaf7757ad9747e118dd1", "score": "0.54227597", "text": "public function toArray()\n {\n $content = $this->body();\n\n if (preg_match('/\\bjson\\b/i', $this->getHeaderLine('Content-Type'))) {\n $content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING);\n\n return $content;\n }\n\n if (preg_match('/\\bxml\\b/i', $this->getHeaderLine('Content-Type'))) {\n $previous = libxml_disable_entity_loader(true);\n $values = json_decode(json_encode(simplexml_load_string($content, \\SimpleXMLElement::class, LIBXML_NOCDATA)), true);\n libxml_disable_entity_loader($previous);\n\n return $values;\n }\n }", "title": "" }, { "docid": "7619d7de9db41689eeaf7827f8cbc6e5", "score": "0.54164726", "text": "public function parse($responseBody)\n {\n $return = [\n 'measurements' => [],\n 'measurement_events' => []\n ];\n $trips = $this->consumeTrips($responseBody);\n\n foreach ($trips['events'] as $measurementEvent) {\n $measurementEventObj = new MeasurementEvent();\n $eventTime = new \\DateTime($measurementEvent['event_time']);\n $measurementEventObj->setEventTime($eventTime);\n $this->persist->persist($measurementEventObj);\n $return['measurement_events'][] = $measurementEventObj;\n\n $measurement = $measurementEvent['measurements'];\n // Store drive distance\n $distance = $measurement['distance'];\n $measurementObj = new Measurement();\n $unitType = $this->unitTypes\n ->findOneBy(['slug' => UnitType::METERS]);\n $measurementType = $this->measurementTypes\n ->findOneBy(['slug' => MeasurementType::DRIVE_DISTANCE]);\n $measurementObj->setMeasurementEvent($measurementEventObj)\n ->setMeasurementType($measurementType)\n ->setUnitType($unitType)\n ->setUnits($distance);\n $this->persist->persist($measurementObj);\n $return['measurements'][] = $measurementObj;\n\n // Store drive time\n $driveTime = $measurement['drive_time'];\n $measurementObj = new Measurement();\n $unitType = $this->unitTypes\n ->findOneBy(['slug' => UnitType::SECONDS]);\n $measurementType = $this->measurementTypes\n ->findOneBy(['slug' => MeasurementType::DRIVE_TIME]);\n $measurementObj->setMeasurementEvent($measurementEventObj)\n ->setMeasurementType($measurementType)\n ->setUnitType($unitType)\n ->setUnits($driveTime);\n $this->persist->persist($measurementObj);\n $return['measurements'][] = $measurementObj;\n }\n return $return;\n }", "title": "" }, { "docid": "6c3494e53e8f220a668989cce7439578", "score": "0.53962135", "text": "public function getInfo()\n {\n $response = $this->getResponse();\n if (isset($response['response']['status']) && $response['response']['status'] == 'OK') {\n $popularHTags = array_slice($response['response']['serviceJson']['hashtags'], 0, 5, true);\n array_shift($popularHTags);\n return array(\n \"nTweets\" => $response['response']['serviceJson']['f_tweets'],\n \"popularHTags\" => $popularHTags,\n \"nTweetsForDay\" => $response['response']['serviceJson']['tweets'],\n \"nUsers\" => $response['response']['serviceJson']['userSize'],\n \"date\" => $response['response']['date'],\n \"query\" => $response['response']['query']\n );\n }\n return null;\n }", "title": "" }, { "docid": "6c678f7ee3e2949facc99bf42fdacc23", "score": "0.53957164", "text": "public function toApi()\n {\n $response = $this->getResponse();\n\n if (isset($response['error'])) {\n return $this->getErrorReponse($response);\n }\n\n return [\n 'success' => $response['@attributes']['success'] ?? null,\n 'time' => $response['@attributes']['time'] ?? null,\n 'session' => $response['@attributes']['session'] ?? null,\n 'cancellation' => $response['cancellation']['@attributes']['status'] ?? null,\n ];\n }", "title": "" }, { "docid": "7db61c8d7e7fcef661ccd455ea49a54b", "score": "0.53889537", "text": "private function prepareResponseData()\n {\n $responseData = [];\n $responseData['version'] = self::ALEXA_RESPONSE_VERSION;\n $response = [];\n\n //Check to see if a speech, card, or reprompt object are set and if so\n //add them to the data object\n if (!is_null($this->speech) && $this->speech instanceof OutputSpeech) {\n $response = $this->speech->toArray();\n }\n\n if (!is_null($this->card) && $this->card instanceof Card) {\n $response['card'] = $this->card->toArray();\n }\n\n if (!is_null($this->reprompt) && $this->reprompt instanceof Reprompt && trim($this->reprompt->getValue()) != \"\") {\n $response['reprompt'] = $this->reprompt->toArray();\n }\n\n if (!is_null($this->directives)) {\n foreach ($this->directives as $directive) {\n $response['directives'][] = $directive->toArray();\n }\n }\n\n if(!is_null($this->shouldSessionEnd)) {\n $response['shouldEndSession'] = $this->shouldSessionEnd;\n }\n\n $sessionAttributes = $this->getSessionData();\n $sessionAttributes = array_merge($sessionAttributes, $this->sessionAttributes);\n\n if ($sessionAttributes && count($sessionAttributes) > 0) {\n $responseData['sessionAttributes'] = $sessionAttributes;\n }\n\n $responseData['response'] = $response;\n\n return $responseData;\n }", "title": "" }, { "docid": "79be24238c0751edd3ab46e0fb0f7abe", "score": "0.53839165", "text": "public function fromResponse(object $response): array\n {\n $this->shipmentNumber = $response->shipmentNumber ?? '';\n\n $this->label = (new LabelStructure())\n ->setLabelType($response->label->labelType ?? '')\n ->setLabelFormat($response->label->labelFormat ?? '')\n ->setLabelContent($response->label->labelContent ?? '')\n ->setLabelName($response->label->labelName ?? '')\n ->structure();\n\n return $this->structure();\n }", "title": "" }, { "docid": "5f475f76bb196284f48dcf10114cd6a7", "score": "0.53793937", "text": "public function getResponses(): array\n {\n // This is first encoded and then decoded to stay consistent with Laravel's model's array casting.\n return json_decode(json_encode($this->responses), true);\n }", "title": "" }, { "docid": "edfadad7a963d7127684c03d909848a9", "score": "0.5372848", "text": "protected function parseResponse(Response $response)\n\t{\n\t\tif ($response->getStatusCode() > 199 && $response->getStatusCode() < 299) {\n if ($body = json_decode($response->getBody()->getContents(), 1)) {\n \treturn new Collection($body);\n }\t\t\t\n\t\t}\n\t\t\n return new Collection;\t\t\n\t}", "title": "" }, { "docid": "c8d4a565e40a09447a2e981ced77411d", "score": "0.5367229", "text": "abstract public function parseResponse($response);", "title": "" }, { "docid": "0526ad28d83906fb6d27cd6bd9df2caa", "score": "0.53546435", "text": "function getResponseData(): array;", "title": "" }, { "docid": "80d33ef3834cc8aa376cb309e0756ed9", "score": "0.53513443", "text": "public function getResponseInfo(): array;", "title": "" }, { "docid": "d8ecd7bd0a61d42eecd7317a63b88932", "score": "0.5349243", "text": "protected function _parseXmlTrackingResponse($trackings, $response)\n {\n $errorTitle = Mage::helper('usa')->__('Unable to retrieve tracking');\n $resultArr = array();\n $errorArr = array();\n $trackingserror = array();\n $tracknum = '';\n if (strlen(trim($response)) > 0) {\n if (strpos(trim($response), '<?xml') === 0) {\n $xml = simplexml_load_string($response);\n if (is_object($xml)) {\n $trackxml = $xml->Track;\n if (\n is_object($xml->Faults)\n && is_object($xml->Faults->Fault)\n && is_object($xml->Faults->Fault->Code)\n && is_object($xml->Faults->Fault->Description)\n && is_object($xml->Faults->Fault->Context)\n ) {\n $code = (string)$xml->Faults->Fault->Code;\n $description = $xml->Faults->Fault->Description;\n $context = $xml->Faults->Fault->Context;\n $errorTitle = Mage::helper('usa')->__('Error #%s : %s (%s)', $code, $description, $context);\n } elseif (is_object($trackxml) && is_object($trackxml->Shipment)) {\n foreach ($trackxml->Shipment as $txml) {\n $rArr = array();\n\n if (is_object($txml)) {\n $tracknum = (string)$txml->TrackingNbr;\n if ($txml->Fault) {\n $code = (string)$txml->Fault->Code;\n $description = $txml->Fault->Description;\n $errorArr[$tracknum] = Mage::helper('usa')->__('Error #%s: %s', $code, $description);\n } elseif ($txml->Result) {\n $code = (int)$txml->Result->Code;\n if ($code === 0) {\n /*\n * Code 0== airbill found\n */\n $rArr['service'] = (string)$txml->Service->Desc;\n if (isset($txml->Weight))\n $rArr['weight'] = (string)$txml->Weight . \" lbs\";\n if (isset($txml->Delivery)) {\n $rArr['deliverydate'] = (string)$txml->Delivery->Date;\n $rArr['deliverytime'] = (string)$txml->Delivery->Time . ':00';\n $rArr['status'] = Mage::helper('usa')->__('Delivered');\n if (isset($txml->Delivery->Location->Desc)) {\n $rArr['deliverylocation'] = (string)$txml->Delivery->Location->Desc;\n }\n } elseif (isset($txml->Pickup)) {\n $rArr['deliverydate'] = (string)$txml->Pickup->Date;\n $rArr['deliverytime'] = (string)$txml->Pickup->Time . ':00';\n $rArr['status'] = Mage::helper('usa')->__('Shipment picked up');\n } else {\n $rArr['status'] = (string)$txml->ShipmentType->Desc\n . Mage::helper('usa')->__(' was not delivered nor scanned');\n }\n\n $packageProgress = array();\n if (isset($txml->TrackingHistory) && isset($txml->TrackingHistory->Status)) {\n\n foreach ($txml->TrackingHistory->Status as $thistory) {\n $tempArr = array();\n $tempArr['activity'] = (string)$thistory->StatusDesc;\n $tempArr['deliverydate'] = (string)$thistory->Date; //YYYY-MM-DD\n $tempArr['deliverytime'] = (string)$thistory->Time . ':00'; //HH:MM:ss\n $addArr = array();\n if (isset($thistory->Location->City)) {\n $addArr[] = (string)$thistory->Location->City;\n }\n if (isset($thistory->Location->State)) {\n $addArr[] = (string)$thistory->Location->State;\n }\n if (isset($thistory->Location->CountryCode)) {\n $addArr[] = (string)$thistory->Location->Country;\n }\n if ($addArr) {\n $tempArr['deliverylocation'] = implode(', ', $addArr);\n } elseif (isset($thistory['final_delivery'])\n && (string)$thistory['final_delivery'] === 'true'\n ) {\n /*\n * if the history is final delivery, there is no informationabout\n * city, state and country\n */\n $addArr = array();\n if (isset($txml->Receiver->City)) {\n $addArr[] = (string)$txml->Receiver->City;\n }\n if (isset($thistory->Receiver->State)) {\n $addArr[] = (string)$txml->Receiver->State;\n }\n if (isset($thistory->Receiver->CountryCode)) {\n $addArr[] = (string)$txml->Receiver->Country;\n }\n $tempArr['deliverylocation'] = implode(', ', $addArr);\n }\n $packageProgress[] = $tempArr;\n }\n $rArr['progressdetail'] = $packageProgress;\n\n }\n $resultArr[$tracknum] = $rArr;\n } else {\n $description = (string)$txml->Result->Desc;\n if ($description)\n $errorArr[$tracknum] = Mage::helper('usa')->__('Error #%s: %s', $code, $description);\n else\n $errorArr[$tracknum] = Mage::helper('usa')->__('Unable to retrieve tracking');\n }\n } else {\n $errorArr[$tracknum] = Mage::helper('usa')->__('Unable to retrieve tracking');\n }\n\n }\n }\n\n }\n }\n } else {\n $errorTitle = Mage::helper('usa')->__('Response is in the wrong format');\n }\n }\n\n $result = Mage::getModel('shipping/tracking_result');\n if ($errorArr || $resultArr) {\n foreach ($errorArr as $t => $r) {\n $error = Mage::getModel('shipping/tracking_result_error');\n $error->setCarrier('dhl');\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setTracking($t);\n $error->setErrorMessage($r);\n $result->append($error);\n }\n\n foreach ($resultArr as $t => $data) {\n $tracking = Mage::getModel('shipping/tracking_result_status');\n $tracking->setCarrier('dhl');\n $tracking->setCarrierTitle($this->getConfigData('title'));\n $tracking->setTracking($t);\n $tracking->addData($data);\n\n $result->append($tracking);\n }\n } else {\n foreach ($trackings as $t) {\n $error = Mage::getModel('shipping/tracking_result_error');\n $error->setCarrier('dhl');\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setTracking($t);\n $error->setErrorMessage($errorTitle);\n $result->append($error);\n\n }\n }\n $this->_result = $result;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "7443095f87f9507f2a80deb06d5aa3d6", "score": "0.5349128", "text": "public function toArray()\n {\n return $this->response;\n }", "title": "" }, { "docid": "dc36c3b6e819cfefb94bb6bcca559935", "score": "0.5308771", "text": "protected function parseResponse(Crawler $crawler){\n\t\t$responseData = [];\n\n\t\t$crawler->filter('ol.repo-list li')->each(function($node) use (&$responseData) {\n\n\t\t\t// e.g. facebook / react\n\t\t\t$title = $this->toString($node->filter('h3')->extract('_text'));\n\n\t\t\t// Strip all whitepace from the title e.g. facebook/react\n\t\t\t$nameAndRepo = str_replace(' ', '', $title);\n\t\t\t// Change the NameAndRepo to an array e.g. ['facebook', 'react']\n\t\t\t$nameAndRepoArray = explode(\"/\", $nameAndRepo);\n\n\t\t\t$starLink = '/' . $nameAndRepo . '/stargazers';\n\t\t\t$starHrefAttr = '[href=\"' . $starLink . '\"]';\n\n\t\t\t$forkLink = '/' . $nameAndRepo . '/network';\n\t\t\t$forkHrefAttr = '[href=\"' . $forkLink . '\"]';\n\n\t\t\t$description = $this->toString($node->filter('.py-1 > p')->extract('_text')) ?: '';\n\t\t\t$language = $this->toString($node->filter('[itemprop=programmingLanguage]')->extract('_text'));\n\n\t\t\t$stars = $this->toString($node->filter($starHrefAttr)->extract('_text')) ?: \"0\";\n\t\t\t$forks = $this->toString($node->filter($forkHrefAttr)->extract('_text')) ?: \"0\";\n\n\t\t\t$starsToday = $this->toString($node->filter('span.d-inline-block.float-sm-right')->extract('_text'));\n\n\t\t\t$data = [\n\t\t\t\t'author' => $nameAndRepoArray[0],\n\t\t\t\t'name' => $nameAndRepoArray[1],\n\t\t\t\t'url' => \"https://github.com/\" . $nameAndRepo,\n\t\t\t\t'description' => $description,\n\t\t\t\t'language' => $language,\n\t\t\t\t'stars' => $stars,\n\t\t\t\t'forks' => $forks,\n\t\t\t\t'starsToday' => $starsToday,\n\t\t\t];\n\n\t\t\tarray_push($responseData, $data);\n\n\t\t});\n\n\t\treturn $responseData;\n\t}", "title": "" }, { "docid": "abeb485714ff0191bd246930464ce10c", "score": "0.5305493", "text": "public function response() :array\n {\n $response = [\n 'status' => $this->status(),\n 'title' => $this->title(),\n 'detail' => $this->message(),\n 'source' => $this->source()\n ];\n\n return [ array_filter($response) ];\n }", "title": "" }, { "docid": "5da7f3d8ed8e4bf0faa5dd65346e1803", "score": "0.52993906", "text": "public static function getAllResponseData()\n {\n $objects = static::getAll();\n $data = array();\n\n if (count($objects) >= 1)\n {\n foreach ($objects as $object)\n {\n $data[] = $object->getResponseData();\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "d2d967d6ca5f2af0e595ec021cc0ad8d", "score": "0.52972186", "text": "public function parse_response($data)\n\t{\n\t\treturn json_decode($data);\n\t}", "title": "" }, { "docid": "543d557372065ec58948459857c41eb3", "score": "0.52757025", "text": "private function parse_response() {\n\t\t$xml_object = simplexml_load_string($this->feed_response, 'SimpleXMLElement', LIBXML_NOCDATA);\n\n\t\t$xml_array = json_decode(json_encode($xml_object), TRUE);\n\n\t\t$this->response['response']['language'] = $xml_array['channel']['language'] ? $xml_array['channel']['language'] : \"\";\n\n\t\tforeach($xml_array['channel']['item'] as $entry) {\n\t\t\t$curr_entry = array();\n\t\t\t$curr_entry['date'] = date(\"F d, Y\", strtotime($entry['pubDate']));\n\t\t\t$curr_entry['title'] = $entry['title'];\n\t\t\t$curr_entry['excerpt'] = $entry['description'];\n\t\t\t$this->response['response']['item'][] = $curr_entry;\n\t\t}\n\t\t$this->respond(200);\n\t}", "title": "" }, { "docid": "1bbb8a633e80f6cbe4e9f1f6db1e131a", "score": "0.52748615", "text": "public function decodeBodyToArray()\n {\n $result = json_decode($this->body, true);\n\n return !empty($result) ? $result : array();\n }", "title": "" }, { "docid": "2b7a5e8cc7d21873ce1dedd04582a8f3", "score": "0.5272486", "text": "public function parseResponse()\n {\n $this->separateHeadersAndBody();\n\n $this->parseRawHeader();\n }", "title": "" }, { "docid": "2a3093c68697ce42ffd64ba8b6a32307", "score": "0.52466077", "text": "protected function parseResponse($response) {\n // TODO: implement\n \n }", "title": "" }, { "docid": "7f5f36630fa34199cc3104ba8c7da4da", "score": "0.52432567", "text": "private function getFacts()\n {\n try {\n $json = json_decode(file_get_contents($this->endPoint), true);\n return isset($json['result']) ? $json['result'] : [];\n } catch (Exception $ex) {\n return [];\n }\n }", "title": "" }, { "docid": "93fd499a61341c32081f4b858beedc42", "score": "0.5224173", "text": "private function getUserTracks()\n {\n// $user = $this->request->user()->info;\n// $artist = DB::table('artists')->where('user_id', $user->id)->first();\n// return !is_null($artist) ? DB::table('artists')->where('user_id', $user->id)->get() : array();\n return $this->request->user()->tracks()->pluck('tracks.id')->toArray();\n }", "title": "" }, { "docid": "d8873f8c299dde1cc09377c0fd0fc0e2", "score": "0.52103484", "text": "private function data()\n {\n $result = json_decode($this->response->getBody());\n return $result->data;\n }", "title": "" }, { "docid": "3d4e049826d6a5e8b964e9df9f3f201a", "score": "0.5205509", "text": "public function object(): object|array\n {\n return json_decode($this->body(), false);\n }", "title": "" }, { "docid": "d993db002bdd4f9c5be3f84360cc5c85", "score": "0.51800406", "text": "private function getAPICorona()\n {\n $suspect = collect(Http::get('https://data.covid19.go.id/public/api/prov.json')->json());\n \n return $suspect;\n }", "title": "" }, { "docid": "9771d4e6cb8387ff5aec59fad3dda527", "score": "0.5173854", "text": "public function getBody()\n\t{\n\t\t$objData = Json::decode($this->objResponse->{__FUNCTION__}(), Json::TYPE_OBJECT);\n\n\t\t//extract generic hypermedia data and add to data\n\t\tif (isset($objData->hypermedia))\n\t\t{\n\t\t\t$arr_data = (array) $objData->data;\n\t\t\t$arr_data[\"hypermedia\"] = $objData->hypermedia;\n\t\t\t$objData->data = (object) $arr_data;\n\t\t\tunset($objData->hypermedia);\n\t\t}//end if\n\n\t\treturn $objData;\n\t}", "title": "" }, { "docid": "c1dee6405c73aee586fa15f3008f5e9d", "score": "0.51329714", "text": "protected function parseResponse(array $response)\n {\n return Kitten::parse($response);\n }", "title": "" }, { "docid": "84a74e0415e58ab9f0e92d87a8b3bd81", "score": "0.51173836", "text": "private function parse($body)\n {\n $xmlObject = simplexml_load_string($body);\n foreach ($xmlObject as $key => $value) {\n $response[$key] = (string) $value;\n }\n\n return $response;\n }", "title": "" }, { "docid": "1a35df58723867f4cafe8b4b6ff487d4", "score": "0.51145905", "text": "protected function process()\n {\n if ($this->apiType == 'soap') {\n\n $cleanXML = $this->removeNamespaceFromXML($this->response);\n\n $this->response = json_decode(json_encode(simplexml_load_string($cleanXML)));\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "d4ad67387322e79fce5c5589c30896d0", "score": "0.5108973", "text": "private function parseResponse(array $response) {\n if (empty($response['price-quotes'])) {\n return [];\n }\n\n $rates = [];\n foreach ($response['price-quotes']['price-quote'] as $rate) {\n $service_code = $rate['service-code'];\n $service_name = $rate['service-name'];\n $price = new Price((string) $rate['price-details']['due'], 'CAD');\n\n $shipping_service = new ShippingService(\n $service_code,\n $service_name\n );\n $rates[] = new ShippingRate(\n $service_code,\n $shipping_service,\n $price\n );\n }\n\n return $rates;\n }", "title": "" }, { "docid": "847f36dfee69cba21fcece4efd9511c1", "score": "0.51035917", "text": "public function getParserToFetch()\n {\n $mockParser = $this->createMock(ResponseParserInterface::class);\n\n $mockParser\n ->expects($this->once())\n ->method('toArray')\n ->with($mockEntry = $this->createMock(Entry::class))\n ->willReturn($result = [uniqid()]);\n\n return [\n [null],\n [$mockParser, $result]\n ];\n }", "title": "" }, { "docid": "1062229b1a8c1c58631f2ce18909e21f", "score": "0.50746", "text": "public function getRealArrayResponse()\n {\n if ($this->json === null) {\n return null;\n } else {\n return json_decode(json_encode($this->json), true);\n }\n }", "title": "" }, { "docid": "4e7afad7f4f2765174356fb14025acec", "score": "0.507306", "text": "public function parseResponse($response){\n\t\t$parsed_response = array();\n\t\tforeach ($response as $i => $value)\n\t\t{\n\t\t $tmpAr = explode(\"=\", $value);\n\t\t if(sizeof($tmpAr) > 1) {\n\t\t $parsed_response[$tmpAr[0]] = $tmpAr[1];\n\t\t }\n\t\t}\n\t\t\n\t\treturn $parsed_response;\n\t}", "title": "" }, { "docid": "b0090a8d4ae3c8466660e8ccbc660f7c", "score": "0.50715804", "text": "protected function parseInformation() {\n // Grab address\n $this->getAddress();\n\n // Grab metadata\n if($this->pullMetaData) {\n $this->getMetaData();\n }\n\n // Grab sold info\n $this->getSold();\n\n // Grab estimated values\n $this->getEstimatedValues();\n\n // If we have photos then pull the photos\n if($this->pullPhotos) {\n $this->getPhotos();\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "cc3f7891ddd0f769c75188e89935d5db", "score": "0.5065411", "text": "public function getPosts()\n {\n $spItems = $this->simplePie->get_items();\n $items = [];\n\n foreach ($spItems as $spItem) {\n /**\n * $item values to read:\n * - get_id()\n * - get_title()\n * - get_content() <-> get_description()\n * - get_categories()\n * - get_authors()\n * - get_date('Y-m-d H:i:s') <-> get_gmdate('Y-m-d H:i:s')\n * - get_link() <-> get_permalink()\n * - get_enclosures() - Podcast files etc\n */\n\n /**\n * Build object to return\n */\n $item = (object) [\n 'id' => $spItem->get_id(true),\n 'title' => $spItem->get_title(),\n 'link' => $spItem->get_permalink(),\n 'date' => $spItem->get_gmdate('Y-m-d H:i:s'),\n 'content' => $spItem->get_content(),\n 'categories' => [],\n 'authors' => []\n ];\n\n /**\n * Get categories, loop trough them and add their label to the item\n */\n $spCategories = $spItem->get_categories();\n if (null !== $spCategories) {\n foreach ($spCategories as $spCategory) {\n $item->categories[] = $spCategory->get_label();\n }\n }\n\n /**\n * Get authors, loop trough them and add them to the item\n */\n $spAuthors = $spItem->get_authors();\n if (null !== $spAuthors) {\n foreach ($spAuthors as $spAuthor) {\n $item->authors[] = $spAuthor->get_name();\n }\n }\n\n /**\n * Ignoring enclosures for now, might do something with it later\n */\n #var_dump($spItem->get_enclosures());\n\n $items[] = $item;\n }\n\n return $items;\n }", "title": "" }, { "docid": "8b537f8950b19f721f2e20fb88b0f95a", "score": "0.5064595", "text": "private function parse($body)\n {\n $xml = simplexml_load_string($body);\n $response = array();\n\n $response['receipt_id'] = (string) $xml->receipt->ReceiptId;\n $response['reference_num'] = (string) $xml->receipt->ReferenceNum;\n $response['response_code'] = (string) $xml->receipt->ResponseCode;\n $response['iso'] = (string) $xml->receipt->ISO;\n $response['auth_code'] = (string) $xml->receipt->AuthCode;\n $response['trans_time'] = (string) $xml->receipt->TransTime;\n $response['trans_date'] = (string) $xml->receipt->TransDate;\n $response['trans_type'] = (string) $xml->receipt->TransType;\n $response['complete'] = (string) $xml->receipt->Complete;\n $response['message'] = (string) $xml->receipt->Message;\n $response['trans_amount'] = (string) $xml->receipt->TransAmount;\n $cardtype = (string) $xml->receipt->CardType;\n $response['card_type'] = isset($this->credit_card_types[$cardtype]) \n ? $this->credit_card_types[$cardtype] \n : null;\n $response['transaction_id'] = (string) $xml->receipt->TransID;\n $response['timed_out'] = (string) $xml->receipt->TimedOut;\n $response['bank_totals'] = (string) $xml->receipt->BankTotals;\n $response['ticket'] = (string) $xml->receipt->Ticket;\n $response['avs_result_code']= (string) $xml->receipt->AvsResultCode;\n $response['cvd_result_code']= (string) $xml->receipt->CvdResultCode;\n \n if ($response['avs_result_code'] == 'null') {\n $response['avs_result_code'] = null;\n }\n\n return $response;\n }", "title": "" }, { "docid": "dd250d9a6b11134881d49b88b3c0c393", "score": "0.5063035", "text": "public function getResponseArray() \n {\n return $this->getArray($this->fcporequestlog__fcpo_response->rawValue);\n }", "title": "" }, { "docid": "f64658f0637b84a5b653e5ea4f7c75a9", "score": "0.5057538", "text": "protected function getResponse()\n {\n return json_decode($this->curl->rawResponse, true);\n }", "title": "" }, { "docid": "3d0e9b869ea3328272a412052bf08a5d", "score": "0.5051192", "text": "function getApiData($token){\n\n //get data from api\n $ch=curl_init(\"http://api.deezer.com/user/me/tracks?access_token=\".$token);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n $answer = curl_exec($ch);\n\n //close curl\n curl_close($ch);\n\n\n\n //get json data\n $resArr = array();\n $resArr = json_decode($answer,true);\n\n return $resArr;\n }", "title": "" }, { "docid": "1f94cf79602c21d18add5b3117e0f105", "score": "0.50444865", "text": "public function toArray()\n {\n $response = array();\n\n $response['status'] = $this->_status;\n\n foreach ($this->_headers as $header => $value) {\n $response[$header] = $value;\n }\n\n $response['body'] = $this->_body;\n\n return $response;\n }", "title": "" }, { "docid": "f97ee8acc20a62a1d21fae438b155912", "score": "0.5037179", "text": "public static function getData()\n {\n\n $client = new Client(['base_uri' => self::BASE_URL]);\n\n //@TODO add error handler\n $response = $client->request('GET', 'api',\n [\n 'query' => self::DEFAULT_QUERY_PARAMETERS\n ]\n );\n if($response->getBody()){\n\n $items = json_decode((string) $response->getBody(), true);\n\n if(count($items['results'])){\n return $items['results'];\n }\n }\n\n return [];\n\n }", "title": "" }, { "docid": "1575c253f0dbf2699cdcb64b26a5afd9", "score": "0.5036088", "text": "public function getRawResponse(): array\n {\n return $this->rawResponse;\n }", "title": "" }, { "docid": "33054a5d57b699b784fab2a5c6f9c858", "score": "0.50071", "text": "protected function parseResponse(ResponseInterface $response, $queryParameters, $pathParameters)\n {\n $results = json_decode($response->getBody(), true);\n\n return Detail::createFromArray($results, $queryParameters, $pathParameters);\n }", "title": "" }, { "docid": "58fb008c37f6a584b16074edcfb84424", "score": "0.49980098", "text": "public function getData()\n {\n $response = $this->getResponse();\n if (isset($response['response']['status']) && $response['response']['status'] == 'OK') {\n $returnArr = array();\n foreach ($response['response']['serviceJson']['tweet'] as $arr) {\n $date = \\DateTime::createFromFormat('jmY His', $arr['time']);\n array_push($returnArr, array(\n 'dateString' => $date->format('Y-m-d H:i' ),//$this->getRandomTimeOfDay($this->getQueryDate()),\n 'class' => 'tweet',\n 'screen_name' => $arr['screen_name'],\n 'text' => $arr['text'],\n 'image' => $arr['image']\n ));\n }\n return $returnArr;\n }\n return null;\n }", "title": "" }, { "docid": "ae558d1daa313829f14b76bf94dca064", "score": "0.49966773", "text": "public function parseResponse(Response $response, $convertObjectsToArray = false) {\n $body = $response->getBody();\n $contentType = $response->getHeader('Content-Type');\n\n $posSemiColon = strpos($contentType, ';');\n if ($posSemiColon !== false) {\n $contentType = trim(substr($contentType, 0, $posSemiColon));\n }\n\n switch($contentType) {\n case 'text/javascript':\n case 'application/json':\n $data = json_decode($body);\n\n if (gettype($data) == 'object' && $convertObjectsToArray) {\n $response = array();\n foreach ($data as $property => $value) {\n $response[$property] = $value;\n }\n } else {\n $response = $data;\n }\n\n break;\n case 'application/x-www-form-urlencoded':\n case 'text/plain':\n case 'text/html':\n parse_str($body, $response);\n\n break;\n default:\n $response = $body;\n\n break;\n }\n\n return $response;\n }", "title": "" }, { "docid": "dc0060b9150903bffd86239ed718a2ac", "score": "0.49963847", "text": "public static function toArray($data) {\n $array = array();\n\n // transfer overlays\n if ($data->overlays) {\n $array['overlays'] = $data->overlays;\n }\n // transfer crawlers\n if ($data->crawlers) {\n $array['crawlers'] = array();\n foreach ($data['crawlers'] as $k=>$v) {\n $array[$k] = $v->items;\n }\n }\n // transfer pip\n if (isset($data->pip)) {\n $pip = array();\n $pip['url'] = $data->pip->url;\n $pip['x_location'] = $data->pip->x_location;\n $pip['y_location'] = $data->pip->y_location;\n $pip['width'] = $data->pip->width;\n $pip['height'] = $data->pip->height;\n $pip['play'] = $data->pip->play;\n\n $array['pip'] = $pip;\n }\n // transfer click url\n if (is_set($data->click_url)) {\n $array['click_url'] = $data->click_url->url;\n }\n }", "title": "" }, { "docid": "876ad0afa31079e31575f060a100ebd0", "score": "0.49656048", "text": "public function parse_passages_response($jsonstr, $refs) {\n $json = json_decode($jsonstr);\n if (! $json) {\n # Then something is wrong; we didn't receive any JSON.\n return [];\n }\n $passages = $json->response->search->result->passages;\n $fums_tid = $json->response->meta->fums_tid;\n \n # A container to keep all our copyright information.\n $copyright_obj = array();\n \n foreach ($passages as $passage) {\n $return_text = \"\";\n $version = $passage->version_abbreviation;\n\n $copyright = $passage->copyright;\n # Strip the API's HTML from copyright data; we are going\n # to format it otherwise.\n $copyright = preg_replace('/<\\/?p>/', '', $copyright);\n $copyright = trim($copyright);\n # We only need the copyright info once per version.\n # This saves a good many bytes in the response.\n $copyright_obj[$version] = $copyright;\n \n # Reformat the HTML in the returned text.\n # This probably wastes some bytes in the response, but it's\n # easier to deal with stylistically.\n $text = $passage->text;\n $text = preg_replace('/\\s+/', \" \", $text);\n $text = preg_replace('/class=\"(?:p|m)\"/',\n \"class=\\\"scriptureText\\\"\", $text);\n $text = preg_replace('/class=\"s1\"/',\n \"class=\\\"scriptureHeading\\\"\", $text);\n $text = preg_replace('/class=\"q1\"/',\n \"class=\\\"scriptureText scripturePoetry1\\\"\", $text);\n $text = preg_replace('/class=\"q2\"/',\n \"class=\\\"scriptureText scripturePoetry2\\\"\", $text);\n $title = $passage->display;\n $return_text .= \"<h2 class=\\\"scriptureVerseHead\\\">$title \" .\n \"<span class=\\\"version\\\">($version)</span></h2>\\n\";\n $return_text .= $text;\n $return_text .= \"<script>_BAPI.t('$fums_tid');</script>\";\n\n # This is why we wanted an array of the requests: so we could\n # search through it and make sure the passages we received\n # are the ones we were expecting. If there's an unfamiliar\n # one, then it's possible the API is calling something by a\n # different name (e.g. Ecclesiasticus == Sirach).\n if (! array_search($title, $refs)) {\n # If we don't recognize the title as one we requested,\n # load the book tables and try to convert it to\n # something canonical.\n $title = ScriptureRequest::to_canonical($title);\n }\n \n # Package the text for return.\n $passage_obj = array(\n 'title' => $title,\n 'text' => $return_text,\n 'version' => $version,\n );\n # Put it in the object buffer.\n $this->buffer[$title] = $passage_obj;\n }\n # Store the aggregated copyright data.\n $this->copyright = $copyright_obj;\n }", "title": "" }, { "docid": "317cb3803b387f3796df7a8e307b1ae1", "score": "0.4962922", "text": "public function parse(array $content, string $model): array\n {\n $parsedResponse = $content;\n\n switch ($model) {\n case Response::MODEL_ERROR_DEV:\n case Response::MODEL_ERROR:\n $parsedResponse = $this->parseError($content);\n break;\n\n case Response::MODEL_SESSION:\n $parsedResponse = $this->parseSession($content);\n break;\n case Response::MODEL_SESSION_LIST:\n $parsedResponse = $this->parseSessionList($content);\n break;\n\n case Response::MODEL_FILE:\n $parsedResponse = $this->parseFile($content);\n break;\n case Response::MODEL_FILE_LIST:\n $parsedResponse = $this->parseFileList($content);\n break;\n\n case Response::MODEL_FUNCTION:\n $parsedResponse = $this->parseFunction($content);\n break;\n case Response::MODEL_FUNCTION_LIST:\n $parsedResponse = $this->parseFunctionList($content);\n break;\n\n case Response::MODEL_DEPLOYMENT:\n $parsedResponse = $this->parseDeployment($content);\n break;\n case Response::MODEL_DEPLOYMENT_LIST:\n $parsedResponse = $this->parseDeploymentList($content);\n break;\n\n case Response::MODEL_EXECUTION:\n $parsedResponse = $this->parseExecution($content);\n break;\n case Response::MODEL_EXECUTION_LIST:\n $parsedResponse = $this->parseExecutionList($content);\n break;\n\n case Response::MODEL_USAGE_BUCKETS:\n $parsedResponse = $this->parseUsageBuckets($content);\n break;\n\n case Response::MODEL_USAGE_STORAGE:\n $parsedResponse = $this->parseUsageStorage($content);\n break;\n\n case Response::MODEL_TEAM:\n $parsedResponse = $this->parseTeam($content);\n break;\n case Response::MODEL_TEAM_LIST:\n $parsedResponse = $this->parseTeamList($content);\n break;\n\n case Response::MODEL_DOCUMENT_LIST:\n case Response::MODEL_COLLECTION_LIST:\n case Response::MODEL_INDEX_LIST:\n case Response::MODEL_USER_LIST:\n case Response::MODEL_LOG_LIST:\n case Response::MODEL_BUCKET_LIST:\n case Response::MODEL_MEMBERSHIP_LIST:\n case Response::MODEL_RUNTIME_LIST:\n case Response::MODEL_BUILD_LIST:\n case Response::MODEL_PROJECT_LIST:\n case Response::MODEL_WEBHOOK_LIST:\n case Response::MODEL_KEY_LIST:\n case Response::MODEL_PLATFORM_LIST:\n case Response::MODEL_DOMAIN_LIST:\n case Response::MODEL_COUNTRY_LIST:\n case Response::MODEL_CONTINENT_LIST:\n case Response::MODEL_LANGUAGE_LIST:\n case Response::MODEL_CURRENCY_LIST:\n case Response::MODEL_PHONE_LIST:\n case Response::MODEL_METRIC_LIST:\n case Response::MODEL_ATTRIBUTE_LIST:\n $parsedResponse = $this->parseList($content);\n break;\n }\n\n return $parsedResponse;\n }", "title": "" }, { "docid": "8f339a2fed8301e3ae32f57d11106348", "score": "0.49618274", "text": "public function apiArray() {\n $ret = new \\ArrayObject();\n\n // Adult\n if (isset($this->adult)) {\n $ret['adult'] = $this->adult;\n }\n\n // Participants\n if (isset($this->participants) && is_array($this->participants) && count($this->participants) > 0) {\n $ret['participants'] = $this->participants;\n }\n\n // Guardian\n if (isset($this->guardian)) {\n $ret['guardian'] = $this->guardian;\n }\n\n // Address Line One\n if (isset($this->addressLineOne) && $this->addressLineOne != '') {\n $ret['addressLineOne'] = $this->addressLineOne;\n }\n\n // Address Line Two\n if (isset($this->addressLineTwo) && $this->addressLineTwo != '') {\n $ret['addressLineTwo'] = $this->addressLineTwo;\n }\n\n // Address Country\n if (isset($this->addressCountry) && $this->addressCountry != '') {\n $ret['addressCountry'] = $this->addressCountry;\n }\n\n // Address State\n if (isset($this->addressState) && $this->addressState != '') {\n $ret['addressState'] = $this->addressState;\n }\n\n // Address Zip\n if (isset($this->addressZip) && $this->addressZip != '') {\n $ret['addressZip'] = $this->addressZip;\n }\n\n // Email\n if (isset($this->email) && $this->email != '') {\n $ret['email'] = $this->email;\n }\n\n // Emergency Contact Name\n if (isset($this->emergencyContactName) && $this->emergencyContactName != '') {\n $ret['emergencyContactName'] = $this->emergencyContactName;\n }\n\n // Emergency Contact Phone\n if (isset($this->emergencyContactPhone) && $this->emergencyContactPhone != '') {\n $ret['emergencyContactPhone'] = $this->emergencyContactPhone;\n }\n\n // Insurance Carrier\n if (isset($this->insuranceCarrier) && $this->insuranceCarrier != '') {\n $ret['insuranceCarrier'] = $this->insuranceCarrier;\n }\n\n // Insurance Policy Number\n if (isset($this->insurancePolicyNumber) && $this->insurancePolicyNumber != '') {\n $ret['insurancePolicyNumber'] = $this->insurancePolicyNumber;\n }\n\n // Driver's License State\n if (isset($this->driversLicenseState) && $this->driversLicenseState != '') {\n $ret['driversLicenseState'] = $this->driversLicenseState;\n }\n\n // Driver's License Number\n if (isset($this->driversLicenseNumber) && $this->driversLicenseNumber != '') {\n $ret['driversLicenseNumber'] = $this->driversLicenseNumber;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "0e6a2b4487ea086f50f1af8f7e23cbc8", "score": "0.49611008", "text": "public function data(): array\n {\n $result = [];\n array_walk($this->response, function ($row) use (&$result) {\n /** @var array<string,array<string|int|array<mixed>>> $row */\n array_push($result, ...$row['events']);\n });\n\n return $result;\n }", "title": "" }, { "docid": "60e15c437b19aaa17c64cac0068c3cae", "score": "0.49443695", "text": "public function process()\n {\n $json = file_get_contents(\"./data/apiResponse\" . date('m-d-Y') . '.json', true);\n $jsonArray = json_decode($json, true);\n return $jsonArray[\"data\"][\"children\"];\n }", "title": "" }, { "docid": "a2e0e8153fdaa192e9811fed428aa829", "score": "0.49428096", "text": "public function parseResponse($items)\n {\n $mappedResponse = array();\n foreach ($items as $item) {\n $mappedResponse[$item->getASIN()] = $item;\n }\n return $mappedResponse;\n }", "title": "" }, { "docid": "939a3da08f49ace2e42acb58320a6acb", "score": "0.49410057", "text": "protected function getGuzzleResponseArray($response)\n {\n $body = (String) $response->getBody();\n return json_decode($body, true) ?? [];\n }", "title": "" }, { "docid": "69657e007d7d1425465a79abe0433d1e", "score": "0.49358326", "text": "public function transform(stdClass $object) : array\n {\n $playlist = [];\n $playlist['name'] = $this->get($object, 'name');\n $playlist['owner_id'] = $this->get($object->owner, 'id');\n $playlist['playlist_url'] = $this->get($object->external_urls, 'spotify');\n $playlist['owner_profile_url'] = $this->get($object->owner->external_urls, 'spotify');\n $playlist['playlist_thumbnail_url'] = $this->get($object->images, 'url');\n\n $playlist['tracks'] = collect($object->tracks->items)\n ->map(function ($track) {\n return [\n 'title' => $this->get($track->track, 'name'),\n 'album' => $this->get($track->track->album, 'name'),\n 'artist' => $this->get($track->track->album->artists, 'name'),\n 'duration' => $this->get($track->track, 'duration_ms'),\n 'spotify_url' => $this->get($track->track->external_urls, 'spotify'),\n 'spotify_track_id' => $this->get($track->track, 'id'),\n 'spotify_preview_url' => $this->get($track->track, 'preview_url'),\n 'spotify_thumbnail_url' => $this->get($track->track->album->images, 'url'),\n ];\n });\n\n return $playlist;\n }", "title": "" }, { "docid": "cb74686bae9bbae85c7594c189e3d98b", "score": "0.49344373", "text": "public function getApiModelsData() {\n $models = array();\n $store = Mage::app()->getStore();\n $fullPath = 'stores/' . $store->getCode() . '/vidtest';\n\n $node = Mage::getConfig()->getNode($fullPath);\n\n if ($node && is_array($node->asArray())) {\n foreach ($node->asArray() as $key => $value) {\n if (is_array($value)) {\n $model = new Varien_Object($value);\n if ($model->getIsApiModel() && $model->getApiModelCode()) {\n $model->setCode($model->getApiModelCode());\n $models[] = $model;\n }\n }\n }\n }\n return $models;\n }", "title": "" }, { "docid": "8210f3f9ee498d9395b17bbc1fa7b414", "score": "0.4932139", "text": "private function parse_response($response)\n\t{\n\t\t\n\t\t$results = explode('&',urldecode($response));\n\t\tforeach($results as $result)\n\t\t{\n\t\t\tlist($key, $value) = explode('=', $result);\n\t\t\t$response_array[$key]=$value;\n\t\t}\n\t\t\n\t\t$return_object = array();\n\t\t\n\t\t//Set the response status\n\t\t\n\t\t($response_array['ACK'] == 'Success' ? $success = TRUE : $failure = TRUE );\n\n\t\tif(isset($failure)){\n\t\t\t$return_object[] = array('status'=>'failure') + array('response'=>$response_array['L_LONGMESSAGE0']);\n\t\t}\n\t\tif(isset($success)){\n\t\t\t$return_object[] = array('status'=>'success') + array('response'=>$response_array);\n\t\t}\n\t\t\n\t\treturn (object) $return_object[0];\n\t\t\n\t}", "title": "" }, { "docid": "30f7a197973561ab3d59f9a2aa275655", "score": "0.4929754", "text": "public function testGetResponseReturnsObject()\n {\n \n $state = $this->ts->getResponse() instanceof TrackingResponse;\n \n $this->assertTrue($state);\n \n }", "title": "" }, { "docid": "6499aa3937d7dd91a4df1bd8e74d7a7f", "score": "0.4924955", "text": "public function getPostResponse($response)\n {\n return json_decode($response->getContent());\n }", "title": "" }, { "docid": "6829c3060f9d43999c24d6682889bd1a", "score": "0.49213514", "text": "public function getStudies() {\n\t\t$rawStudies = $this->APIGetStudies();\n\t\t$studies = array();\n\n\t\t// iterate through studies\n\t\ttry {\n\t\t\tforeach ($rawStudies->{'studies'} as $key=>$rawStudy) {\n\t\t\t\t// instantiate a study\n\t\t\t\t$study = new GSCFStudy();\n\t\t\t\t$study->api = $this;\n\n\t\t\t\t// and set the variables\n\t\t\t\tforeach ($rawStudy as $key=>$val) {\n\t\t\t\t\t$study->$key = $val;\n\t\t\t\t}\n\n\t\t\t\tarray_push($studies, $study);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// just ignore the exception, we have\n\t\t\t// no studies\n\t\t}\n\n\t\treturn $studies;\n\t}", "title": "" }, { "docid": "a743374e1c82ddc7ba6ae7d92c9795f1", "score": "0.49165466", "text": "public function get_trailer_info(){\n\t\t$trailer_url = get_post_meta( $this->id, '_vimeo_url', true );\n\t\tif( empty( $trailer_url ) ) return array();\n\n\t\t$trailer_vimeo_id = explode( 'vimeo.com/', $trailer_url )[1];\n\t\t$lib = $this->get_vimeo_lib();\n\t\t$vimeo_response = $lib->request('/me/videos/' . $trailer_vimeo_id . '?fields=embed.html,pictures.sizes' , array(), 'GET');\n\n\t\tif( ! isset( $vimeo_response['body']['embed'] ) ){\n\t\t\terror_log( 'no jala dev' );\n\t\t\t$lib = $this->get_vimeo_lib( 'stage' );\n\t\t\t$vimeo_response = $lib->request('/me/videos/' . $trailer_vimeo_id . '?fields=embed.html,pictures.sizes' , array(), 'GET');\n\t\t}\n\n\t\tif( ! isset( $vimeo_response['body']['embed'] ) ){\n\t\t\terror_log( 'no jala stage' );\n\t\t\treturn array();\n\t\t}\n\n\t\t$info = array(\n\t\t\t'iframe' \t=> $vimeo_response['body']['embed']['html'],\n\t\t\t'thumbnail' => $vimeo_response['body']['pictures']['sizes'][5]['link'],\n\t\t);\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "c06c1b38b2f6d977dc8d08fa11bec812", "score": "0.49097595", "text": "public function get_data() {\n\n\t\t$ch = curl_init();\n\n\t\t// Make GET request\n\t\tcurl_setopt($ch, CURLOPT_URL, 'http://www.ebi.ac.uk/ebisearch/ws/rest/'.$this->_vars['domain'].'/entry/'.implode(',', $this->_vars['ids']).'?format='.$this->_vars['format'].'&fields='.implode(',', $this->_vars['fields'][$this->_vars['domain']]));\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t// Execute and receive server response\n\t\t$response = json_decode(curl_exec($ch), true);\n\t\t$_response = array();\n\t\tcurl_close($ch);\n\n\t\t// Since Interpro IDs are unique, use them as keys\n\t\tif(!empty($response['entries'])) {\n\t\t\tforeach($response['entries'] as $entry) {\n\t\t\t\t$_response[$entry[$this->_vars['id'][$this->_vars['domain']]]] = $entry;\n\n\t\t\t\t// Map keys\n\t\t\t\tif($this->_vars['domain'] === 'pfam') {\n\t\t\t\t\tforeach($_response as &$e) {\n\t\t\t\t\t\t$e['short_name'] = $e['id'];\n\t\t\t\t\t\t$e['id'] = $e['acc'];\n\t\t\t\t\t\tunset($e['acc']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $_response;\n\n\t}", "title": "" }, { "docid": "2bc66210b31eb24a7a509ded0b796fc0", "score": "0.4906416", "text": "protected function parseDataFromResponse()\n {\n $content = $this->rawResponse->body;\n $config = new LifecycleConfig();\n $config->parseFromXml($content);\n return $config;\n }", "title": "" }, { "docid": "262ab2bf0adaf8f3d9b366fcd7f221b2", "score": "0.49058065", "text": "protected function buildResponse($response)\n {\n $htmlContent = $this->extractResponseTextFromXml($response);\n\n $track = new Track();\n $event = new Event();\n $event->setDate($this->parseDate($htmlContent));\n $event->setStatus($this->parseStatus($htmlContent));\n $event->setLocation($this->parseLocation($htmlContent));\n\n $track->addEvent($event);\n $track->addAdditionalDetails('weight', $this->parseWeight($htmlContent));\n foreach ($this->parseDetails($htmlContent) as $key => $value )\n {\n $track->addAdditionalDetails($key, $value);\n }\n\n return $track->sortEvents();\n }", "title": "" }, { "docid": "ed3e19a0fc751e480f4a02bd5ade0b35", "score": "0.49052545", "text": "function parseResponse() {\n list($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->response, 2);\n\n\t// check for HTTP/1.1 100 Continue\n\tif (substr($headers, 0, 12) == \"HTTP/1.1 100\") {\n\t list($headers, $body) = explode(\"\\r\\n\\r\\n\", $body, 2);\n\t}\n\n $header_lines = explode(\"\\r\\n\", $headers);\n\n // First line of headers is the HTTP response code\n $this->http_response_line = array_shift($header_lines);\n if (preg_match('@^HTTP/[0-9]\\.[0-9] ([0-9]{3})@', $this->http_response_line, $matches)) {\n $this->code = $matches[1];\n }\n\n // put the rest of the headers in an array\n $this->headers = array();\n foreach($header_lines as $header_line) {\n list($header, $value) = explode(': ', $header_line, 2);\n $this->headers[strtolower($header)] = $value;\n }\n\n $this->body = $body;\n }", "title": "" }, { "docid": "be18cdae9f0b197910d1dadfd868262e", "score": "0.4903606", "text": "public function get_1_sample_api_response() {\n return json_decode(\n file_get_contents( sprintf(\"%s/1gBookResponse.json\", base_path()) )\n );\n }", "title": "" }, { "docid": "4229ec221f6c6cb11481aaa5356a32bd", "score": "0.49025926", "text": "public function getResponse() {\n\t\treturn json_decode($this->_response, true);\n\t\t}", "title": "" }, { "docid": "fc940b428e3b5cfa1d085ee6356efd8e", "score": "0.4897311", "text": "public function parseResponse($data) { // UPDATE: done! Zool 2011\n return strlen($data) > 0 ? explode(' ', $data) : array();\n //return $data;\n }", "title": "" }, { "docid": "71fd7798c9f92b8adb476d3eaeda7160", "score": "0.48957306", "text": "public function getResponseArray()\n {\n return $this->responseArray;\n }", "title": "" }, { "docid": "056c1aaabfba64e29f51a706dbf483be", "score": "0.4895335", "text": "private function get_remote_surveys()\n {\n $sm = $this->get_survey_monkey_object();\n\n $params = array(\n \"fields\" => array(\n \"title\",\n \"analysis_url\",\n \"date_created\",\n \"date_modified\",\n \"question_count\",\n \"num_responses\"\n )\n );\n\n // Make API call\n $data = $sm->getSurveyList($params);\n\n // Get array of surveys\n $data = json_encode($data);\n $data = json_decode($data);\n $surveys = $data->data->surveys;\n\n // Add current timestamp to each survey\n foreach($surveys as $survey)\n {\n $survey->last_updated = date('Y-m-d H:i:s', time());\n }\n\n // Filter out surveys that don't start with \"Staff\" or \"staff\"\n for ($i=0; $i < count($surveys); $i++)\n {\n if ((substr($surveys[$i]->title, 0,5) != \"Staff\") && (substr($surveys[$i]->title, 0,5) != \"staff\"))\n {\n unset($surveys[$i]);\n }\n }\n\n return array_values($surveys);\n }", "title": "" }, { "docid": "8ce9a1b674644cd26062cc20c487b9e8", "score": "0.4890428", "text": "public function getResponses(): array\n {\n return (array)$this->responses;\n }", "title": "" }, { "docid": "f5d7dac8f47ddfcb90ffb3bc71ddcfee", "score": "0.48857215", "text": "public function getResponseCollect()\n {\n return $this->marsWeatherInfos->collect();\n }", "title": "" }, { "docid": "093ea3bf521ec16e0ca52506e6bdaa4d", "score": "0.4865988", "text": "static protected function parseResponse($response)\n {\n $list = explode(', ', $response);\n\n $data = [];\n foreach ( $list as $iter ) {\n list($key, $value) = explode('=', $iter);\n $data[$key] = $value;\n }\n\n return $data;\n }", "title": "" }, { "docid": "e1a08623118b480b07521872a494a0e9", "score": "0.4855638", "text": "public function steps(): array\n {\n return json_decode($this->results, true);\n }", "title": "" }, { "docid": "716ab73bc1bcc174355095314db07268", "score": "0.485155", "text": "public function asObject() : \\stdClass {\r\n\t\t\treturn json_decode($this->getBody());\r\n\t\t}", "title": "" }, { "docid": "e2eef3bd5bf9dc3eb09dacf23b820f2b", "score": "0.48482472", "text": "protected function parseDataFromResponse()\n {\n $content = $this->rawResponse->body;\n $config = new LifecycleConfig();\n $config->parseFromXml($content);\n\n return $config;\n }", "title": "" } ]
48f3d42289c8d0357625801577dcc8d5
/ Adds JavaScript to pages with the comment form to support sites with threaded comments (when in use).
[ { "docid": "0d40dd8b3d29a4dad5670cb0fe3daec7", "score": "0.6715762", "text": "function twentytwelve_scripts_styles()\n{\n if (is_singular() && comments_open() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n}", "title": "" } ]
[ { "docid": "410696ba5a55bd609f5f89a32dc8ad3e", "score": "0.7248074", "text": "function comments_popup_script()\n {\n }", "title": "" }, { "docid": "0285d87adc604d895e2ea63584b41ff7", "score": "0.72102314", "text": "public function load_comment_js() {\n\t\tif ( bp_is_current_component( 'buddyblog' ) && bp_is_current_action( 'my-posts' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "356f612a15f79fa1f3995f4ffb8d35f1", "score": "0.7040973", "text": "function adding_js(){\n\t\t\t\t\n\t\t\t\tif (!current_user_can('edit_private_posts')){\n\t\t\t\t\twp_enqueue_script('jquery');\n\t\t\t\t\t//wp_enqueue_script('myjquery_sohag',plugins_url('/voting-machine/js/voting.js'));\n\t\t\t\t\t// embed the javascript file that makes the AJAX request\n\t\t\t\t\t\n\t\t\t\t\twp_enqueue_script( 'myjquery_sohag_comment',plugins_url('/roles-editors-comments/js/comments.js'),array('jquery'));\n\t\t\t\t\t$nonce=wp_create_nonce('comments-editing');\n\t\t\t\t\t \n\t\t\t\t\t// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)\n\t\t\t\t\twp_localize_script( 'myjquery_sohag_comment', 'CommentAjax', array( \n\t\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t\t'commentnonace' => $nonce,\n\t\t\t\t\t\t'pluginsurl' => plugins_url('/roles-editors-comments/js/comments.js'),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "a60665482e30cc5145b3b99c0f54b521", "score": "0.6941581", "text": "private function enqueue_comments_script() {\n\n\t\tif( is_single() && comments_open() ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "5f8f45995fa8f42b1671bb74332bb7de", "score": "0.69360924", "text": "function morganceken_load_scripts() {\r\n\r\n\t/* Load the comment reply JavaScript. */\r\n\tif ( is_singular() && get_option( 'thread_comments' ) && comments_open() )\r\n\t\twp_enqueue_script( 'comment-reply' );\r\n}", "title": "" }, { "docid": "32cdb054d8f83d9d20e3a15168be9d19", "score": "0.6866237", "text": "function comments_queue_js(){\nif ( (!is_admin()) && is_singular() && comments_open() && get_option('thread_comments') )\n wp_enqueue_script( 'comment-reply' );\n}", "title": "" }, { "docid": "844507fd500868ae0f70a6ec58a71202", "score": "0.6854143", "text": "function oy_queue_js(){\n\tif (!is_admin()){ if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) wp_enqueue_script('comment-reply'); } \n}", "title": "" }, { "docid": "7bafdc06a7c955569cd1569a3605fc74", "score": "0.6824723", "text": "function cackle_output_footer_comment_js() {\n require_once(dirname(__FILE__) . '/counter.php');\n CackleCounter::init();\n}", "title": "" }, { "docid": "fc2669b566e63f238723545277c8bb77", "score": "0.6663331", "text": "function inxboilerplate_scripts() {\n if ( is_singular() ) wp_enqueue_script( \"comment-reply\" );\n}", "title": "" }, { "docid": "1dd37ece015f7bbd55de76378e8e1370", "score": "0.660493", "text": "function safelinking_comment() {\n\techo '\n <br/><p class=\"comment-form-comment\">\n \t<label for=\"safelinking-links\">Secure your links with ' . get_option('safelinking_custom_domain_site_name') . ' <span id=\"safelinking-user\"></span></label>\n\t \t<textarea name=\"\" id=\"safelinking-links\" cols=\"58\" rows=\"6\"></textarea>\n\t \t</p>\n\t \t<p class=\"form-submit\">\n\t\t\t<input name=\"safelinking\" type=\"button\" onclick=\"safelinking_initialise();\" value=\"Insert into comment\" id=\"submit\">\n\t\t</p><br/><br/>\n\t';\n\techo \"<script type='text/javascript'>var safelinkingUrl = '\" . safelinking_get_url() . \"';var safelinkingName = '\" . get_option('safelinking_custom_domain_site_name') . \"';</script>\";\n\techo \"<script type='text/javascript' src='\" . get_bloginfo('wpurl') . \"/wp-content/plugins/safelinking/safelinking.js\" . \"'></script>\";\n}", "title": "" }, { "docid": "17b7c8ca1dc2528f559cf20f98056432", "score": "0.65978694", "text": "function enable_threaded_comments(){\r\n\tif (!is_admin()) { \r\n\t\tif ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1) OR stf_get_setting('enable_comments_on_home')) \t\r\n\t\t\twp_enqueue_script('comment-reply');\r\n\t}\r\n}", "title": "" }, { "docid": "790fc67a7b1a009f353e845214ed2b47", "score": "0.6540752", "text": "function enqueue_comment_hotkeys_js()\n {\n }", "title": "" }, { "docid": "326c48981d1d6c970ad72e2215ff3af4", "score": "0.6528611", "text": "function friendfeed_comments_head() {\r\n\techo \"\\n<!-- WP FF Comments JS -->\\n\";\r\n\techo css_link('friendfeed_comments');\r\n\t// Different WP versions make problem with jquery\r\n\t// wp_enqueue_script('wp_ff_admin', '/wp-content/plugins/wordpress-friendfeed-comments/js/wp_ff_admin.js');\r\n\t// wp_print_scripts();\r\n\t\r\n}", "title": "" }, { "docid": "8d92fa51ba902f2eb62263c26d460e5b", "score": "0.64920247", "text": "function options_discussion_add_js()\n {\n }", "title": "" }, { "docid": "16e8f0e70c1b3c3e0fd6bb4d21042269", "score": "0.6454652", "text": "function mvpwp_scripts() {\n\n wp_enqueue_style( 'mvpwp-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '1.0.0' );\n\n wp_enqueue_script( 'mvpwp-js', get_template_directory_uri() . '/js/dist/scripts.min.js', array( 'jquery' ), '1.0.0', true );\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n}", "title": "" }, { "docid": "2296cb2a0c6754bdd9cfc921f3f05a73", "score": "0.6440776", "text": "public function post_mod_comment()\n {\n require AJAX_DIR . '/post_mod_comment.php';\n }", "title": "" }, { "docid": "626242a371345b643a1bc978e6094e99", "score": "0.64125746", "text": "function add_actions_and_filters()\r\n{\r\n add_action('comment_form', 'add_comment_ajax_comment_form');\r\n //works on comment text to add the link and author name\r\n add_filter('comment_text', 'append_link_to_comment_text', 1000);\r\n //adds URL /text as comment meta information\r\n add_action('comment_post', 'add_url_and_text_as_comment_meta', 1);\r\n //enquue css files\r\n add_action('wp_print_styles', 'enqueue_css_file');\r\n \r\n add_action('wp_enqueue_scripts', 'add_scripts_and_styles');\r\n}", "title": "" }, { "docid": "e39345323abd378af70d591a9434ed89", "score": "0.63180554", "text": "function sos_comment_reply() {\n // on single blog post pages with comments open and threaded comments\n if ( is_singular() && comments_open() ) { \n // enqueue the javascript that performs in-link comment reply fanciness\n wp_enqueue_script( 'comment-reply' ); \n }\n }", "title": "" }, { "docid": "7fb363a52e824b53fd9fab69810bd1e6", "score": "0.6298459", "text": "function the1000th_link_blog_scripts() {\n\twp_enqueue_style( 'the1000th-link-blog-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'the1000th-link-blog-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'the1000th-link-blog-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "ced47124d66600f86f5dd8d79202aff1", "score": "0.62333864", "text": "function Comments() {\n\t\n\t}", "title": "" }, { "docid": "67c5d1730e5c945a6186ecdcb08d16eb", "score": "0.62071216", "text": "function gorsetalk_register_scripts() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' );\n\n\tif ( ( ! is_admin() ) && is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\twp_enqueue_script( 'gorsetalk-js', get_template_directory_uri() . '/assets/js/index.js', array(), $theme_version, false );\n\twp_script_add_data( 'gorsetalk-js', 'async', true );\n\n}", "title": "" }, { "docid": "dd6c1b82f64cb9af48e3df23d0885544", "score": "0.6204897", "text": "function register_block_core_post_comments_form()\n {\n }", "title": "" }, { "docid": "18d8fa2d4e68f55db6a0a7111e97b67a", "score": "0.6180216", "text": "public function tyche_edd_review_enqueue_scripts_js () {\n\n\t\tif ( isset( $_GET [ 'page'] ) && isset( $_GET [ 'edit'] ) && \"true\" == $_GET [ 'edit'] && \"edd-reviews\" == $_GET [ 'page'] ) {\n\n\t\t\t$review_id = absint( $_GET['r'] );\n\t\t\t$review = get_comment( $review_id, OBJECT );\n\n\t\t\t$tyche_get_review_metabox_html = EDD_GF_Integration::tyche_get_review_meta_box_data ( $review ); \n\n\t\t\twp_register_script( 'edd-reviews-add-fields' , plugins_url() . '/edd-review-gf-addon/assets/js/admin/edd-reviews-add-fields.js' );\n \twp_enqueue_script( 'edd-reviews-add-fields' );\n\n \t$tyche_review_data = array(\n \t\t\t'tyche_review_data' => $tyche_get_review_metabox_html,\n \t\t); \n\t\t\twp_localize_script( 'edd-reviews-add-fields', 'tyche_params', $tyche_review_data );\n \t}\n\t}", "title": "" }, { "docid": "712252af0fb9d95e57d18937a8ef72a8", "score": "0.6166071", "text": "function add_scripts_and_styles()\r\n{\r\n //\twp_enqueue_script( 'ballon-disp', CJ_SCRIPTS_URL.'balloon.js', array( 'jquery' ) );\r\n // enqueue and localise scripts: both of them are necessary\r\n wp_enqueue_script('feed-handle', CJ_SCRIPTS_URL . 'feed.js', array('jquery'));\r\n //wp_enqueue_script('ratings-js-handle', CJ_SCRIPTS_URL . 'like.js', array('jquery'));\r\n\r\n wp_localize_script('feed-handle', 'the_ajax_script', array('ajaxurl' =>\r\n admin_url('admin-ajax.php')));\r\n //read_comment_author_rss();\r\n\r\n}", "title": "" }, { "docid": "9bc7a585c43767043342702d8f1182be", "score": "0.61492604", "text": "function blm_basic_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\t\n\twp_enqueue_style('googleFonts', '//fonts.googleapis.com/css?family=Raleway:400,300,600' );\n\n\twp_enqueue_script( 'blm_navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\t\n\twp_enqueue_script( 'blm-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "46b0e42325917b4b09d632b27f21df5b", "score": "0.6090267", "text": "function wrapper(){\r\n\tadd_comments_page('Remarks', 'Remarks', 'manage_options', 'remarks', 'remarks_main');\r\n}", "title": "" }, { "docid": "0a37b5aaf2bec717cd1e5fdf3a706553", "score": "0.60867596", "text": "function wmt_inject_js() {\n global $post;\n $user = wp_get_current_user();\n\n if ( isset( $post ) && $post != null ) {\n \twp_localize_script('wmt-script', 'wmt_script_vars', array(\n\t 'postID' => $post->ID,\n\t 'postType' => $post->post_type,\n\t\t\t\t'postAuthor' => $post->post_author,\n\t\t\t\t'postName' => $post->post_name,\n\t\t\t\t'postTitle' => $post->post_title,\n\t\t\t\t'postDateGMT' => strtotime( $post->post_date_gmt ),\n\t\t\t\t'postContent' => $post->post_content,\n\t\t\t\t'postExcerpt' => $post->post_excerpt,\n\t\t\t\t'postStatus' => $post->post_status,\n\t\t\t\t'postCommentStatus' => $post->comment_status,\n\t\t\t\t'postPingStatus' => $post->ping_status,\n\t\t\t\t'postPassword' => $post->post_password,\n\t\t\t\t'postParent' => $post->post_parent,\n\t\t\t\t'postModifiedGMT' => strtotime( $post->post_modified_gmt ),\n\t\t\t\t'postCommentCount' => $post->comment_count,\n\t\t\t\t'postMenuOrder' => $post->menu_order,\n\t\t\t\t'userID' => $user->ID,\n\t\t\t\t'userCaps' => $user->caps,\n\t\t\t\t'userCapKey' => $user->cap_key,\n\t\t\t\t'userRoles' => $user->roles,\n\t\t\t\t'userAllCaps' => $user->allcaps,\n\t\t\t\t'userFirstName' => $user->first_name,\n\t\t\t\t'userLastName' => $user->last_name\n\t )\n\t );\n } \n}", "title": "" }, { "docid": "f5fa159224ce0dbb786ae14177b4b728", "score": "0.607714", "text": "function wp_ajax_dim_comment()\n {\n }", "title": "" }, { "docid": "c96872bb849387a796c97e5125c990f7", "score": "0.60718966", "text": "function mytheme_enqueue_comment_reply() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t// enqueue the javascript that performs in-link comment reply fanciness\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "74cbb43c80390513bd512faa97c54e13", "score": "0.60663164", "text": "function register_legacy_post_comments_block()\n {\n }", "title": "" }, { "docid": "33179f0c8a4cb762c4380a960bb3220a", "score": "0.60641414", "text": "function get_ajax_comments($url) {\n\n while (have_posts()) : the_post();\n comments_template('/templates/comments.php');\n endwhile;\n}", "title": "" }, { "docid": "bcc0635422ae4d50ad07d624da0c9d84", "score": "0.6043606", "text": "function saturnthemes_industry_entry_comments() {\n if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n echo '<span class=\"comments-link\">';\n comments_popup_link( esc_html__( '0 Comment', 'saturnthemes-industry' ), esc_html__( '1 Comment', 'saturnthemes-industry' ), esc_html__( '% Comments', 'saturnthemes-industry' ) );\n echo '</span>';\n }\n\n }", "title": "" }, { "docid": "0bfb4812bf8aa3e52c366ef51af3e0a9", "score": "0.6040868", "text": "public static function add_js() {\n\t\t$tag = version_compare( $GLOBALS['wp_version'], '4.3', '>=' ) ? 'h1' : 'h2';\n\n\t\techo <<<JS\n\t\t<script type=\"text/javascript\">\n\t\tjQuery(document).ready(function($) {\n\t\t\t$('#admin-post-nav').appendTo($('#wpbody-content .wrap:first {$tag}:first'));\n\t\t\t$('#adminpostnav, label[for=\"adminpostnav-hide\"]').hide();\n\t\t});\n\t\t</script>\n\nJS;\n\t}", "title": "" }, { "docid": "b04f1861bd3bb189509451166bf359b8", "score": "0.6033901", "text": "function wpstrapped_threaded_links() {\n if (is_singular()) :\n wp_enqueue_script('comment-reply');\n endif;\n}", "title": "" }, { "docid": "f3a543d1575e0dbc5b7bb24065c67bc6", "score": "0.6015412", "text": "function jumal_scripts() {\n\n\twp_enqueue_style( 'metro-ui', get_template_directory_uri() . '/css/metro.css', array(), '3.0.7' );\n\twp_enqueue_style( 'metro-icons', get_template_directory_uri() . '/css/metro-icons.css', array(), '3.0.7' );\n\n\t// Load our main stylesheet.\n\twp_enqueue_style( 'jumal-style', get_stylesheet_uri() );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n}", "title": "" }, { "docid": "e22c6f020349caf763a626bccb863d4e", "score": "0.6006058", "text": "function add_theme_scripts() {\r\n /* CSS */\r\n wp_enqueue_style( 'style', get_stylesheet_uri() );\r\n\r\n /* JS */\r\n wp_enqueue_script( 'fontawesome', 'https://kit.fontawesome.com/2ed38fdfce.js', array (), false, true);\r\n wp_enqueue_script( 'swup', 'https://unpkg.com/swup@latest/dist/swup.min.js', array (), false, true);\r\n wp_enqueue_script( 'canvas-background', get_template_directory_uri() . '/js/canvas-background.js', array (), false, true);\r\n wp_enqueue_script( 'sounds', get_template_directory_uri() . '/js/sounds.js', array (), false, true);\r\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array (), false, true);\r\n\r\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n wp_enqueue_script( 'comment-reply' );\r\n }\r\n}", "title": "" }, { "docid": "23988d1b038a311bc5a33705edb04004", "score": "0.59749687", "text": "function loca_scripts() {\n\twp_enqueue_style( 'loca-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'loca-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\n\twp_enqueue_script( 'loca-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "012dad18ea1b902b1f1683dda1c06023", "score": "0.5965993", "text": "function warquest_home_comment_edit_do() {\r\n\r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\t\t \r\n\t/* output */\r\n\tglobal $page;\r\n\t\t\t\r\n\tif ($uid!=0) {\r\n\t\t$query = 'select comment from comment where id='.$uid;\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$data = warquest_db_fetch_object($result);\r\n\t\t\r\n\t\t$comment = $data->comment;\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\t/* Clear input parameters */\r\n\t\t$comment = \"\";\r\n\t}\r\n\t\r\n\t$page .= \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">function limitText(limitField, limitNum) { if (limitField.value.length >= limitNum) { limitField.value = limitField.value.substring(0, limitNum); } } </script>\";\r\n\t\t\r\n\t$page .= '<div class=\"box\">';\t\r\n\t\r\n\t$page .= '<table>';\r\n\t$page .= '<tr>';\r\n\t$page .= '<td width=\"500\">';\r\n\r\n\tif (isset($other->pid)) {\r\n\t\t$tmp = player_format($other->pid, $other->name, $other->country);\r\n\t} else {\r\n\t\t$tmp = t('GENERAL_ALL');\r\n\t}\r\n\t$page .= t('ALLIANCE_COMMENT_TEXT2', $tmp).'<br/>'; \r\n\t\r\n\t$page .= '<textarea style=\"width:100%\" id=\"comment\" name=\"comment\" rows=\"5\" ';\r\n\t$page .= 'onKeyDown=\"limitText(this,400)\">'.$comment.'</textarea><br/>';\r\n\t$page .= warquest_show_smilies();\r\n\t$page .= '<br/><br/>';\r\n\t\r\n\tif (isset($other->pid)) {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&oid='.$other->pid.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t} else {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t}\r\n\t\r\n\tif ($uid!=0) {\r\n\t\t$page .= ' ';\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_DELETE.'&uid='.$uid, t('LINK_DELETE'), 'delete');\r\n\t}\r\n\t\r\n\t$page .= '</td>';\r\n\t$page .= '</tr>';\r\n\t$page .= '</table>';\r\n\r\n\t$page .= '</div>';\t\r\n}", "title": "" }, { "docid": "65d2170f33be1a497e52d386913e313c", "score": "0.59656113", "text": "function emc_scripts() {\r\n\tglobal $post;\r\n\r\n\twp_enqueue_style( 'emc-style', get_stylesheet_uri() );\r\n\r\n\twp_enqueue_script( 'emc-scripts', get_template_directory_uri() . '/js/emc.js', array( 'jquery' ) );\r\n\twp_enqueue_script( 'modal-script', get_template_directory_uri() . '/js/jsmodal.min.js', array() );\r\n\r\n\t//wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );\r\n\twp_enqueue_style( 'fontawsome', get_template_directory_uri() .'/css/font-awesome.min.css');\r\n\t//wp_enqueue_script( 'sharing-js-fe', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 3 );\r\n\r\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n\t\twp_enqueue_script( 'comment-reply' );\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "acbb57a16ef02652256654deb29e6855", "score": "0.59547204", "text": "function company_scripts() {\n\twp_enqueue_style( 'company-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'company-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\n\twp_enqueue_script( 'company-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "db951e9dfd4e6e4cda01b2066ca65ff9", "score": "0.59349287", "text": "public function onRun()\n {\n if (Settings::get('css', true))\n $this->addCss('assets/css/xeor.comments.css');\n\n $this->addJs('assets/vendor/jquery.raty.js');\n $pathToJsFile = 'assets/js/xeor.comments.js';\n $pathToThemePartials = '/themes/' . Theme::getActiveThemeCode() . '/partials/comments/';\n if (File::exists(base_path() . $pathToThemePartials . $pathToJsFile)) {\n $this->addJs($pathToThemePartials . $pathToJsFile);\n }\n else {\n $this->addJs($pathToJsFile);\n }\n\n $this->prepareVars();\n\n $currentPage = $this->property('pageNumber');\n $this->comments = $this->page['comments'] = $this->loadComments($currentPage);\n\n if (!$this->comments)\n return;\n }", "title": "" }, { "docid": "06ba6c30e672bb4f4f54a88f30bd1f86", "score": "0.5928061", "text": "function _comments() {\r\n if (isset($_REQUEST['s'])) {\r\n switch($_REQUEST['s']) {\r\n case 'add':\r\n addcomment(); break;\r\n\r\n case 'removeconfirm':\r\n comments_removeconfirm(); break;\r\n case 'remove':\r\n comments_remove(); break;\r\n\r\n case 'login':\r\n comments_login_form(); break;\r\n case 'dologin':\r\n // Make sure user isn't banned:\r\n if (!isIPbanned()) {\r\n comments_dologin(); break;\r\n }\r\n\r\n case 'register':\r\n comments_register(); break;\r\n case 'doregister':\r\n comments_doregister(); break;\r\n\r\n case 'options':\r\n comments_options(); break;\r\n case 'save':\r\n comments_save(); break;\r\n\r\n case 'banconfirm':\r\n comments_banconfirm(); break;\r\n case 'ban':\r\n comments_banuser(); break;\r\n\r\n case 'login':\r\n comments_login(); break;\r\n case 'logout':\r\n comments_logout(); break;\r\n\r\n default:\r\n showcomments();\r\n }\r\n } else {\r\n showcomments();\r\n }\r\n }", "title": "" }, { "docid": "d6d63263b3c8e95b56899172187a5c02", "score": "0.59174436", "text": "function corona_scripts() {\n\twp_enqueue_script( 'corona-js', get_template_directory_uri() . '/js/dist/script.js', array(), CORONA_THEME_VERSION, true );\n wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/dist/modernizr-3.3.1.min.js', array(), '3.3.1', false);\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "65cba7df73fdce1a74ab989ad8bb202d", "score": "0.59136313", "text": "function options_permalink_add_js()\n {\n }", "title": "" }, { "docid": "dfb5c3da25e3ffab29a7d01cc5a6f43c", "score": "0.5902152", "text": "function twentysixteen_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "dfb5c3da25e3ffab29a7d01cc5a6f43c", "score": "0.5902152", "text": "function twentysixteen_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "bbd690cf4c9da7a75330fdcf711a0cb1", "score": "0.5895764", "text": "function plugin_commentsupport_jtickets() {\n return FALSE;\n}", "title": "" }, { "docid": "2d379a2033655a72a9de3567c235a0e4", "score": "0.5895745", "text": "function wp_ajax_edit_comment()\n {\n }", "title": "" }, { "docid": "ef605db640622c1dae5cdec5f15dc58c", "score": "0.58895487", "text": "function wp_dashboard_recent_comments_control()\n {\n }", "title": "" }, { "docid": "80ab288bc4263c6cca97b10307ca6d3d", "score": "0.5881959", "text": "function be_enqueue_all_script()\n{\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) \n {\n wp_enqueue_script( 'comment-reply' );\n }\n \n \n wp_enqueue_script( 'be-plugins', TW_ASSETS_JS_URL . '/plugins.js', array( 'jquery' ), '', TRUE );\n wp_enqueue_script( 'maps.googleapis', 'https://maps.googleapis.com/maps/api/js?sensor=true', array( 'be-plugins' ), '', TRUE );\n wp_enqueue_script( 'be-theme', TW_ASSETS_JS_URL . '/theme.js', array( 'maps.googleapis'), '', TRUE );\n wp_enqueue_script( 'be-ajax-contact', TW_ASSETS_JS_URL . '/be_ajax_contact.js', array( 'be-theme' ), '', TRUE );\n wp_localize_script( 'be-ajax-contact', 'be_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));\n \n wp_enqueue_script( 'sm-ajax-load-more', TW_ASSETS_JS_URL . '/sm_ajax_load_more.js', array( 'be-theme' ), '', TRUE );\n wp_localize_script( 'sm-ajax-load-more', 'sm_load', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n}", "title": "" }, { "docid": "e43cb7656c560b6816ed1d24f9102a6e", "score": "0.586978", "text": "function register_block_core_comment_content()\n {\n }", "title": "" }, { "docid": "8842abec430614e903574c8ffe0ed181", "score": "0.58688205", "text": "function admin_init()\n\t{\n\t\twp_register_script(\n\t\t\t'comment-timeout-admin',\n\t\t\tplugins_url('/js/admin.js', dirname(__FILE__)),\n\t\t\t'jquery',\n\t\t\tCOMMENT_TIMEOUT_VERSION\n\t\t);\n\t}", "title": "" }, { "docid": "74ea401174df14e4fb2baa616dc8f7ce", "score": "0.58601624", "text": "public static function load()\n {\n P4Cms_PubSub::subscribe('p4cms.content.render.close',\n function($html, $helper)\n {\n $entry = $helper->getEntry();\n\n // if we don't have an entry id or the entry being rendered\n // isn't the default we won't append comments\n if (!$entry->getId()\n || $entry->getId() != $helper->getDefaultEntry()->getId()\n ) {\n return $html;\n }\n\n // let comment view helper take care of the rest.\n $html = $helper->getView()->comments(\n \"content/\" . $entry->getId(),\n (array) $entry->getValue('comments')\n ) . $html;\n\n return $html;\n }\n );\n\n // participate in content editing by providing a subform.\n P4Cms_PubSub::subscribe('p4cms.content.form.subForms',\n function(Content_Form_Content $form)\n {\n return new Comment_Form_Content(\n array(\n 'name' => 'comments',\n 'order' => -10\n )\n );\n }\n );\n\n // provide comment grid (moderate) actions\n P4Cms_PubSub::subscribe('p4cms.comment.grid.actions',\n function($actions)\n {\n $actions->addPages(\n array(\n array(\n 'label' => 'Approve',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickApprove();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowApprove(this);',\n 'order' => '10'\n ),\n array(\n 'label' => 'Reject',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickReject();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowReject(this);',\n 'order' => '20'\n ),\n array(\n 'label' => 'Pend',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickPend();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowPend(this);',\n 'order' => '30'\n ),\n array(\n 'label' => 'Delete',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickDelete();',\n 'order' => '40'\n ),\n array(\n 'label' => '-',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowView(this);',\n 'order' => '50'\n ),\n array(\n 'label' => 'View Content Entry',\n 'onClick' => 'p4cms.comment.grid.Actions.onClickView();',\n 'onShow' => 'p4cms.comment.grid.Actions.onShowView(this);',\n 'order' => '60'\n ),\n )\n );\n }\n );\n\n // provide form to search comments\n P4Cms_PubSub::subscribe('p4cms.comment.grid.form.subForms',\n function(Zend_Form $form)\n {\n return new Ui_Form_GridSearch;\n }\n );\n\n // filter comment list by search term\n P4Cms_PubSub::subscribe('p4cms.comment.grid.populate',\n function(P4Cms_Record_Query $query, Zend_Form $form)\n {\n $values = $form->getValues();\n\n // extract search query.\n $keywords = isset($values['search']['query'])\n ? $values['search']['query']\n : null;\n\n // early exit if no search text.\n if (!$keywords) {\n return;\n }\n\n // add a text search filter to the comment query.\n $filter = new P4Cms_Record_Filter;\n $fields = array('comment', 'user', 'name');\n $filter->addSearch($fields, $keywords);\n $query->addFilter($filter);\n }\n );\n\n // provide form to filter comments by status.\n P4Cms_PubSub::subscribe('p4cms.comment.grid.form.subForms',\n function(Zend_Form $form)\n {\n $form = new P4Cms_Form_SubForm;\n $form->setName('status');\n $form->addElement(\n 'radio',\n 'status',\n array(\n 'label' => 'Status',\n 'multiOptions' => array(\n '' => 'Any State',\n Comment_Model_Comment::STATUS_PENDING => 'Only Pending',\n Comment_Model_Comment::STATUS_APPROVED => 'Only Approved',\n Comment_Model_Comment::STATUS_REJECTED => 'Only Rejected'\n ),\n 'autoApply' => true,\n 'value' => ''\n )\n );\n\n return $form;\n }\n );\n\n // filter comment list by status\n P4Cms_PubSub::subscribe('p4cms.comment.grid.populate',\n function(P4Cms_Record_Query $query, Zend_Form $form)\n {\n $values = $form->getValues();\n\n // extract status filter.\n $status = isset($values['status']['status'])\n ? $values['status']['status']\n : null;\n\n // early exit if no status filter.\n if (!$status) {\n return;\n }\n\n // add a status filter to the comment query.\n $filter = new P4Cms_Record_Filter;\n $filter->add('status', $status);\n $query->addFilter($filter);\n }\n );\n\n // organize comment records when pulling changes.\n P4Cms_PubSub::subscribe(\n 'p4cms.site.branch.pull.groupPaths',\n function($paths, $source, $target, $result)\n {\n $paths->addSubGroup(\n array(\n 'label' => 'Comments',\n 'basePaths' => $target->getId() . '/comments/...',\n 'inheritPaths' => $target->getId() . '/comments/...'\n )\n );\n }\n );\n }", "title": "" }, { "docid": "8dd302bd7df7f8a5c9a4f4b4b33348fb", "score": "0.58519286", "text": "function add_fb_js(){\n\n\t\t$options = get_option( WPC_OPTIONS );\n\n\t\t$protocol = ( isset( $_SERVER['HTTPS'] ) ) ? 'https' : 'http';\n?>\n\t<!-- Wordpress Connect FBJS v<?php echo WPC_VERSION; ?> - START -->\n\t\t<div id=\"fb-root\"></div>\n\t\t<script>\n window.fbAsyncInit = function() {\n if ( FB && FB.init ){\n \t\tFB.init( {appId: '<?php echo $options[ WPC_OPTIONS_APP_ID ]; ?>', status: true, cookie: true, xfbml: true });\n }\n };\n (function() {\n var e = document.createElement('script'); e.async = true;\n e.src = \"<?php echo $protocol; ?>://connect.facebook.net/<?php echo $options[ WPC_OPTIONS_LANGUAGE ]; ?>/all.js\";\n document.getElementById('fb-root').appendChild(e);\n }());\n\t\t</script>\n\t<!-- Wordpress Connect FBJS - END -->\n \t\t\n<?php\n\n\t}", "title": "" }, { "docid": "19074db603918a0f94ec4954f569cfc9", "score": "0.5845191", "text": "function comment_function (){\n\n}", "title": "" }, { "docid": "c0e632004df86aa6e7e32bfd1c09de32", "score": "0.58421737", "text": "function cmsms_comments() {\r\n\tglobal $blog_page_comments;\r\n\t\r\n\tif ($blog_page_comments) { \r\n\t\tcomments_popup_link(__('No Comments', 'cmsmasters'), '1 ' . __('Comment', 'cmsmasters'), '% ' . __('Comments', 'cmsmasters'), 'cmsms_comments', __('Comments Off', 'cmsmasters'));\r\n\t}\r\n}", "title": "" }, { "docid": "35e211b39df6115558f0b8c54617af98", "score": "0.5837952", "text": "public function addComment()\n {\n // Only members allowed to add a comment\n Phpfox::isUser(true);\n\n // Run last_post SPAM check\n if (Phpfox::getLib('spam')->check(array(\n 'action' => 'last_post',\n 'params' => array(\n 'field' => 'time_stamp',\n 'table' => Phpfox::getT('webinar_comment'),\n 'condition' => 'user_id = ' . Phpfox::getUserId(),\n 'time_stamp' => Phpfox::getUserParam('webinar.flood_control_webinar_comments')\n )\n )\n )\n )\n {\n // Reset the shoutbox form\n $this->show('#js_comment_form')\n ->hide('#js_comment_message')\n ->focus('#js_comment_input');\n\n // Send them a message that they failed the flood control\n $this->alert(_p('webinar.please_wait_limit_seconds_before_adding_a_new_comment', array('limit' => Phpfox::getUserParam('webinar.flood_control_webinar_comments'))));\n\n return false;\n }\n\n if (Phpfox::getLib('parse.format')->isEmpty($this->get('comment')))\n {\n $this->show('#js_comment_form')\n ->hide('#js_comment_message')\n ->val('#js_comment_input', '')\n ->focus('#js_comment_input')\n ->alert(_p('webinar.enter_a_comment'));\n\n return false;\n }\n\n // Add the comment\n if ($iId = Phpfox::getService('webinar.comment.process')->add(Phpfox::getUserId(), $this->get('comment'), $this->get('webinar_id', null)))\n {\n // Get all the default user fields we use\n $sFields = Phpfox::getUserField();\n // Create an array of the string fields\n $aFields = explode(',', $sFields);\n\n $aParams = array();\n foreach ($aFields as $sField)\n {\n // Replace database alias\n $sField = trim(str_replace('u.', '', $sField));\n // Cache the fields and get the current users actual value\n $aParams[$sField] = Phpfox::getUserBy($sField);\n }\n\n // Shorten the text\n // Clean the text, we don't allow HTML\n $sText = Phpfox::getLib('parse.output')->replaceHashTags(Phpfox::getLib('parse.output')->split(Phpfox::getLib('parse.output')->clean(Phpfox::getLib('parse.input')->clean($this->get('comment'), 255)), Phpfox::getParam('webinar.comment_wordwrap')));\n\n // Create the needed template variables not defined with $aParams\n $aMessage = array(\n 'comment_id' => $iId,\n 'time_stamp' => PHPFOX_TIME,\n 'text' => $sText\n );\n Phpfox::getService('webinar.process')->updateCounterComment($this->get('webinar_id'));\n // Assign the variables for the template and get the template\n $this->template()->assign(array(\n 'bCommentAjax' => true,\n 'aComment' => array_merge($aMessage, $aParams), // Merge the arrays to create on variable\n 'iCommentWordWrap' => 100\n )\n )->getTemplate('webinar.block.comment.entry');\n\n // Add the message to the shoutbox and reset the shoutbox form\n $this->call('$(\\'.js_comment_messages\\').removeClass(\\'row_first\\');')\n ->prepend('#js_comment_messages', $this->getContent(false))\n ->show('#js_comment_form')\n ->hide('#js_comment_message')\n ->val('#js_comment_input', '')\n ->focus('#js_comment_input');\n }\n }", "title": "" }, { "docid": "75e2403ae9696dd7d05cec8a79ec23ca", "score": "0.5831842", "text": "function wp_load_javascript() {\n\n /*\n * Registers the minified JS\n */\n wp_register_script(\n 'wp-minified-js',\n get_template_directory_uri() . '/assets/js/theme.min.js',\n null,\n false,\n true\n );\n\n // Enable threaded comments\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n /*\n * Loads our minified JS\n */\n wp_enqueue_script( 'wp-minified-js' );\n\n}", "title": "" }, { "docid": "42873f803c7103cc672002866deda591", "score": "0.58284014", "text": "public function comments_html() {\n\t\t\tif($this->get_option($this->prefix.'_show_meta_comments', 'on') == 'on') {\n\t\t\t\tget_template_part('templates/entry-meta/mini', 'comments');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7666f337654a97ba0294af7bf55e9586", "score": "0.58179945", "text": "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }", "title": "" }, { "docid": "8a113f20da51d21e0fb3804210b8e032", "score": "0.5816969", "text": "function add_ordin_widget_scripts() {\n if( ! apply_filters( 'add_ordin_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }", "title": "" }, { "docid": "f002bc2444118df63efc389d7ca9c31c", "score": "0.58155274", "text": "function wpl_add_javascripts()\n{\n\tif( get_option( 'wpl_settings_use_popup' ) != 1 )\n\t{\n\t\treturn null;\n\t}\n\n\tif( ! wp_script_is( 'wpl-widget', 'registered' ) )\n\t{\n\t\twp_register_script( \"wpl-widget\", WORDPRESS_PIXELPIN_LOGIN_PLUGIN_URL . \"assets/js/widget.js\" );\n\t}\n\n\twp_enqueue_script( \"jquery\" );\n\twp_enqueue_script( \"wpl-widget\" );\n}", "title": "" }, { "docid": "6f3733cdad1fed39d4353585abafebf4", "score": "0.58044416", "text": "function enqueue_issue_story_scripts() {\n\tglobal $post;\n\n\tif($post->post_type == 'issue' && ($javascript_url = Issue::get_javascript_url($post)) !== False) {\n\t\tConfig::add_script($javascript_url);\n\t} else if($post->post_type == 'story' && ($javascript_url = Story::get_javascript_url($post)) !== False) {\n\t\tif( ($issue = get_story_issue($post)) !== False && ($issue_javascript_url = Issue::get_javascript_url($issue)) !== False ) {\n\t\t\tConfig::add_script($issue_javascript_url);\n\t\t}\n\t\tConfig::add_script($javascript_url);\n\t}\n}", "title": "" }, { "docid": "de83351dedcc16adb65f598f98418a5c", "score": "0.5794032", "text": "function add_coolform_js_and_css()\r\n{\r\n echo '<script language=\"JavaScript\" src=\"' . get_bloginfo('wpurl') . '/wp-content/plugins/cool-contact-form/js/coolform.js\" type=\"text/javascript\"></script>' . \"\\n\";\r\n echo '<link type=\"text/css\" rel=\"stylesheet\" href=\"' . get_bloginfo('wpurl') . '/wp-content/plugins/cool-contact-form/css/coolform.css\" />' . \"\\n\";\r\n}", "title": "" }, { "docid": "529b72b7d9d528dfbdb320235f47e05c", "score": "0.5790728", "text": "function wtfdivi099_admin_js() { \r\n\t$s = get_current_screen();\r\n\tif(!empty($s->post_type) and $s->post_type!='page' and $s->post_type!='post') { \r\n?>\r\n<script>\r\njQuery(function($){\r\n\t$('#et_pb_layout').insertAfter($('#et_pb_main_editor_wrap'));\r\n});\r\n</script>\r\n<style>\r\n#et_pb_layout { margin-top:20px; margin-bottom:0px }\r\n</style>\r\n<?php\r\n\t}\r\n}", "title": "" }, { "docid": "0a46dbea4c155974fc497f32f4d555dc", "score": "0.5783484", "text": "public function comments();", "title": "" }, { "docid": "0a46dbea4c155974fc497f32f4d555dc", "score": "0.5783484", "text": "public function comments();", "title": "" }, { "docid": "52068bca0725af654dd205960f603a75", "score": "0.57663107", "text": "function addHeadJavascriptVars() {\n\t\techo '<script type=\"text/javascript\">'.\"\\n\";\n\t\techo 'var lepress_student_awaiting_url = \"'.add_query_arg(array('lepress-student-awaiting' => 1), get_bloginfo('siteurl')).'\";'.\"\\n\";\n\t\t$lang_vars = array('submission_for' => __('Submission for', lepress_textdomain),\n\t\t\t\t\t\t\t'hide' => __('Hide', lepress_textdomain), \n\t\t\t\t\t\t\t'expand' => __('Expand', lepress_textdomain));\n\t\techo 'var lepress_lang_vars_student = '.json_encode($lang_vars).';'.\"\\n\";\n\t\techo '</script>'.\"\\n\";\n\t}", "title": "" }, { "docid": "584fb6c71992ee2f63b88f968b3e602f", "score": "0.57537353", "text": "function jsforwp_scripts() {\n wp_enqueue_style( 'jsforwp-likes-css', plugins_url( '/assets/css/jsforwp-style.css', __FILE__ ), [], time(), 'all' );\n // Register the script like this for a plugin:\n wp_enqueue_script( 'jsforwp-likes', plugins_url( '/assets/js/jsforwp-likes.js', __FILE__ ), ['jquery'], time(), true );\n $like_nonce = wp_create_nonce(\"like_nonce\");\n $jsforwp_global = array(\n 'ajaxurl' => admin_url( 'admin-ajax.php'),\n 'nonce' => $like_nonce\n );\n wp_localize_script( 'jsforwp-likes', 'jsforwp_globals', $jsforwp_global );\n\n}", "title": "" }, { "docid": "cc1182cafd4d7043a01a0937b27263ef", "score": "0.57437783", "text": "function thinkup_input_allowcomments() {\n\n\tif ( comments_open() || '0' != get_comments_number() ) {\n\t\tcomments_template( '/comments.php', true );\n\t}\n}", "title": "" }, { "docid": "9a05a17ad3ad459f33e2e70d925864ff", "score": "0.5741788", "text": "public function commenting() {\n if(strlen($this->request->getParameter(\"content\")) > 10)\n {\n $postId = $this->request->getParameter(\"id\");\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n \n $this->comment->addComment($author, $content, $postId);\n $this->redirect('Post','index/'.$postId);\n }\n else {\n echo \"Commentaire trop court\";\n }\n \n // Execute the default action to reload and display the Posts list\n $this->executeAction(\"index\");\n\n }", "title": "" }, { "docid": "f1d628fa4ef49551bb968ea9d95bc791", "score": "0.5734476", "text": "function dp_facebook_comment_box() {\n\tglobal $options, $options_visual;\n\t// Facebook comment\n\tif ( get_post_meta(get_the_ID(), 'dp_hide_fb_comment', true) ) return;\n\n\tif ( ($options['facebookcomment'] && get_post_type() === 'post') || ($options['facebookcomment_page'] && is_page()) ) {\n\t\techo '<div class=\"dp_fb_comments_div\"><h3 class=\"inside-title\"><span class=\"title\">'.htmlspecialchars_decode($options['fb_comments_title']).'</span></h3><div class=\"fb-comments\" data-href=\"'.get_permalink ().'\" data-num-posts=\"'.$options['number_fb_comment'].'\" data-width=\"100%\"></div></div>';\n\t}\n}", "title": "" }, { "docid": "6b305d8693b85e567e872994d144d60f", "score": "0.5731876", "text": "function _s_scripts() {\n\twp_enqueue_style( '_s-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( '_s-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/bootstrap/js/bootstrap.min.js', array( 'jquery' ), 'v3.3.5', true );\n}", "title": "" }, { "docid": "06db0f418d478db87953eb2823e1c66b", "score": "0.57165354", "text": "public function config_page_scripts() {\n\t\twp_enqueue_script( 'yseo-gc-admin-js', HS_DOCS_API_DIR_URL . 'js/admin.min.js', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}", "title": "" }, { "docid": "cc38bfe6880e1524ab10dfa0c56b9c7b", "score": "0.57110465", "text": "function addcomment() {\r\n global $CONFIG;\r\n\r\n if (isIPbanned()) {\r\n exit;\r\n }\r\n\r\n if ($CONFIG['up'] == 5) {\r\n die(displayerror('You have been banned from using this comment system. If you believe this is a mistake, please\r\n contact the <a href=\"mailto:' . $CONFIG['adminmail'] . '\">administrator</a>.'));\r\n }\r\n\r\n // General error checking:\r\n if ($CONFIG['allowcomments'] == 'no') {\r\n die(displayerror('The comment feature is currently disabled.'));\r\n } elseif (strlen($_POST['c_subject']) < 2 || strlen($_POST['c_subject']) > 30) {\r\n die(displayerror('Comment subject must be between 2 and 30 characters.'));\r\n } elseif (strlen($_POST['c_message']) < 4 || strlen($_POST['c_message']) > $CONFIG['maxcomlen']) {\r\n die(displayerror('Comment message must be between 3 and ' . $CONFIG['maxcomlen'] . ' characters.'));\r\n }\r\n\r\n if (!isset($CONFIG['user'])) {\r\n die(displayerror('You are not currently logged in!'));\r\n } else {\r\n $sql = \"INSERT INTO \" . $CONFIG['tblPrefix'] . \"comments (par_id, uID, postedOn, subject, body) VALUES \";\r\n $sql .= \"(\" . $_POST['id'] . \", '\" . $CONFIG['uID'] . \"', '\" . date('Y-m-d h:m:s') . \"', \";\r\n $sql .= \"'\" . addslashes($_POST['c_subject']) . \"', \";\r\n $sql .= \"'\" . addslashes($_POST['c_message']) . \"')\";\r\n\r\n $result = mysql_query($sql) or die(displayerror(mysql_error()));\r\n\r\n $ips = explode('.', $_SERVER['REMOTE_ADDR']);\r\n $ip = $ips[0] . '.' . $ips[1] . '.x.x';\r\n\r\n $sql = \"UPDATE \" . $CONFIG['tblPrefix'] . \"users SET lastIP='$ip' WHERE usn='\" . $CONFIG['user'] . \"'\";\r\n mysql_query($sql) or die(displayerror( mysql_error()));\r\n\r\n $msg = 'Your comment has been added. Click <a href=\"?action=comments&id=' . $_POST['id'] . '\">here</a> to\r\n go back.';\r\n\r\n echo str_replace('<message>', $msg, gettemplate('comments_message'));\r\n }\r\n }", "title": "" }, { "docid": "213cf6661ef56fe1595d9f18a13afd6f", "score": "0.57071316", "text": "public function discussionController_render_before($sender) {\n $sender->addJsFile('informnewcomments.js', 'plugins/InformNewComments');\n $sender->addDefinition(\n 'InformNewComments_RefreshInterval',\n Gdn::config('InformNewComments.RefreshInterval', 60000)\n );\n }", "title": "" }, { "docid": "eb2ecc11cf331e007bea9e00235237ed", "score": "0.5706274", "text": "function add_theme_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\twp_enqueue_style( 'blog_grid_layout', plugin_dir_url(__FILE__) . '/css/blg.css', array(), '1.1', 'all');\n\twp_enqueue_style( 'bootstrap4', plugin_dir_url(__FILE__) . '/css/bootstrap.min.css', array(), '1.1', 'all');\n \n//\twp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);\n \n\t if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t }\n }", "title": "" }, { "docid": "15f0782e2620146c0612f085706e70bf", "score": "0.5705596", "text": "function gwt_wp_scripts() {\r\n\twp_enqueue_style( 'gwt_wp-foundation', get_template_directory_uri() . '/css/foundation.css', array(), '20130729' );\r\n\twp_enqueue_style( 'gwt_wp-style', get_stylesheet_uri(), array(), '20130729' );\r\n\twp_enqueue_script( 'gwt_wp-modernizr', get_template_directory_uri() . '/js/vendor/custom.modernizr.js', array(), '20130729', false );\r\n\twp_enqueue_script( 'gwt_wp-navigation', get_template_directory_uri() . '/js/foundation.min.js', array(), '20130729', true );\r\n\twp_enqueue_script( 'gwt_wp-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\r\n\twp_enqueue_script( 'gwt_wp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\r\n\twp_enqueue_script( 'gwt_wp-theme', get_template_directory_uri() . '/js/theme.js', array(), '20140123', true );\r\n\twp_enqueue_script( 'gwt_functions-js', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150703', true );\r\n\r\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n\t\twp_enqueue_script( 'comment-reply' );\r\n\t}\r\n\r\n\tif ( is_singular() && wp_attachment_is_image() ) {\r\n\t\twp_enqueue_script( 'gwt_wp-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\r\n\t}\r\n}", "title": "" }, { "docid": "1c20a63bede3ed21a9d6ac8b6910d5a1", "score": "0.5702682", "text": "function register_block_core_comments()\n {\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.56945527", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.56945527", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.56945527", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "4a36a34a757df61a771525dcd9e62aba", "score": "0.5693777", "text": "public function enqueue_forum_js() {\n\n\t\tif ( !isset( get_current_screen()->post_type ) || ( bbp_get_forum_post_type() != get_current_screen()->post_type ) )\n\t\t\treturn;\n\n\t\twp_enqueue_script( 'bpbbpst-forum-js', bpbbpst_get_plugin_url( 'js' ) . 'bpbbpst-forum.js', array( 'jquery' ), bpbbpst_get_plugin_version() );\n\t}", "title": "" }, { "docid": "c23c5b4dc5c260d70b9b79d25f6ade4e", "score": "0.56815165", "text": "function fanwood_bbpress_scripts () {\n\n\tif ( bbp_is_topic() ) : ?>\n\n\t<script type='text/javascript'>\n\t\t/* <![CDATA[ */\n\t\tvar ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';\n\t\t/* ]]> */\n\t</script>\n\n\t<?php elseif ( bbp_is_single_user_edit() ) : ?>\n\n\t<script type=\"text/javascript\" charset=\"utf-8\">\n\t\tif ( window.location.hash == '#password' ) {\n\t\t\tdocument.getElementById('pass1').focus();\n\t\t}\n\t</script>\n\n\t<?php endif;\n\n}", "title": "" }, { "docid": "c21ed50cf5700aef68696a104685a985", "score": "0.56804425", "text": "function codepress_footer_js()\n {\n }", "title": "" }, { "docid": "5b744d1be37ac1b6f7e2cf578434b6d4", "score": "0.567693", "text": "function the_comment()\n {\n }", "title": "" }, { "docid": "2aa317bc0b95eb541e9a373fb46b2fbe", "score": "0.56705314", "text": "function zee_tinymce_js() {\r\n\r\n //make sure the user has correct permissions\r\n if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) {\r\n return;\r\n }\r\n \r\n //only add to visual mode\r\n if ( get_user_option('rich_editing') == 'true' ) {\r\n add_filter( 'mce_external_plugins', 'add_js_plugin' );\r\n add_filter( 'mce_buttons', 'register_zee_tinymce_button' );\r\n }\r\n\r\n}", "title": "" }, { "docid": "bd5f8664930c3f230c9a6f75dd16f915", "score": "0.5669634", "text": "function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}", "title": "" }, { "docid": "5c7a667d400a8ecf4a846a78d9e04b17", "score": "0.56673", "text": "function register_block_core_comment_edit_link()\n {\n }", "title": "" }, { "docid": "ddf014ac667488771e24df7963d562f7", "score": "0.5665656", "text": "function FrontendFooter() {\n \tglobal $post;\n\n \t\t// Include social sharing scripts if required\n \t\t$result = $this->CheckIfContentLockRequired(false);\n \t\tif ($this->CheckIfContentLockRequired(false)) {\n\t\t\t?>\n\t\t\t<!-- Facebook Activity -->\n\t \t\t<div id=\"fb-root\"></div>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar postID = '<?php echo $post->ID; ?>';\n\t\t\t\n\t\t\t\t<!--\n\t\t\t var fbAsyncInit = function() {\n\t\t\t var APP_ID = '<?php echo $this->settings['facebookAppID']; ?>';\n\t\t\t \n\t\t\t \t\t// Init\n\t\t\t FB.init({\n\t\t\t appId : APP_ID,\n\t\t\t status : true, // check login status\n\t\t\t cookie : true, // enable cookies to allow the server to access the session\n\t\t\t xfbml : true // parse XFBML\n\t\t\t });\n\n\t\t\t \t\t// User clicks Like\n\t\t\t \t\t// url = URL that has been liked\n\t\t\t FB.Event.subscribe('edge.create', function(url) {\n\t\t\t \tcreateCookie('wp-like-lock-'+postID, 1, 30); \n\t\t\t \tjQuery('div.wp-like-lock-content').removeClass('hidden'); // Show content\n\t\t\t \tjQuery('div.wp-like-lock-box-text').addClass('hidden'); // Hide text\n\t\t\t });\n\t\t\t \n\t\t\t \t\t// User clicks Unlike\n\t\t\t \t\t// url = URL that has been unliked\n\t\t\t FB.Event.subscribe('edge.remove', function(url) {\n\t\t\t \teraseCookie('wp-like-lock-'+postID); \n\t\t\t \tjQuery('div.wp-like-lock-content').addClass('hidden'); // Hide content\n\t\t\t \tjQuery('div.wp-like-lock-box-text').removeClass('hidden'); // Show text\n\t\t\t });\n\t\t\t };\n\t\t\t \n\t\t\t (function() {\n\t\t\t var e = document.createElement('script');\n\t\t\t e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';\n\t\t\t e.async = true;\n\t\t\t document.getElementById('fb-root').appendChild(e);\n\t\t\t }());\n\t\t\t\t//-->\n\t\t\t</script>\n\t\t\t<?php\t\n\t\t}\t\n }", "title": "" }, { "docid": "1a000ee7b42f35b6757994f4353c5322", "score": "0.5659392", "text": "function plugin_commentsupport_ban() \n{\n return false;\n}", "title": "" }, { "docid": "add3b20f063e3d1205d6c943ac88ee23", "score": "0.56577116", "text": "function headerJS() {\n\t\tglobal $use_tooltips;\n\n\t\techo html_e('script', array('type' => 'text/javascript', 'src' => util_make_uri('/js/common.js')), '', false);\n\t\tplugin_hook(\"javascript_file\");\n\n\t\t// invoke the 'javascript' hook for custom javascript addition\n\t\t$params = array('return' => false);\n\t\tplugin_hook(\"javascript\", $params);\n\t\t$javascript = $params['return'];\n\t\tif($javascript) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript')).'//<![CDATA['.\"\\n\";\n\t\t\techo $javascript;\n\t\t\techo \"\\n\".'//]]'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t\thtml_use_storage();\n\t\thtml_use_coolfieldset();\n\t\thtml_use_jqueryui();\n\t\techo $this->getJavascripts();\n\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\techo '\t//<![CDATA[\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\t\t}, 5000);\n\t\t\t});\n\t\t\t//]]>'.\"\\n\";\n\t\techo html_ac(html_ap() -1);\n\t\tif ($use_tooltips) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\t\techo '\t//<![CDATA[\n\t\t\t\tjQuery(document).ready(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tjQuery(document).tooltip();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t//]]>'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t}", "title": "" }, { "docid": "7a66159676a606a5b2efaaf011d20cb9", "score": "0.56552356", "text": "function fresh_text_add_js()\n\t{\n\t\techo '<script>';\n\t\techo require_once 'replacement.php';\n\t\techo '</script>';\n\t}", "title": "" }, { "docid": "2ea8750d3c8a0730db4c9c38cbb42d6b", "score": "0.56531596", "text": "public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }", "title": "" }, { "docid": "914d3f3cbc945c2fa38b8678ad55008e", "score": "0.564993", "text": "function genesisawesome_childtheme_inline_scripts() {\n\n\tif ( is_singular( 'post' ) && genesis_get_option( 'enable_post_social_share', GA_CHILDTHEME_FIELD ) ) {\n\t\t?>\n\t<script src='http://assets.pinterest.com/js/pinit.js' type='text/javascript'></script>\n\t<script type='text/javascript'>\n\t/* <![CDATA[ */\n\t\t!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");\n\t\tfunction run_pinmarklet() {var e=document.createElement('script'); e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r=' + Math.random()*99999999);document.body.appendChild(e);}\n\t\t(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://apis.google.com/js/plusone.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();\n\t\t(function() {var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);})();\n\t\t(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();\n\t/* ]]> */\n\t</script>\n\t\t<?php\n\t}\n\n}", "title": "" }, { "docid": "48777d738a686a81f187d19673659c9a", "score": "0.56298405", "text": "public function enable_comments(){\n\t\t$this->bComment_enable=true;\n\t}", "title": "" }, { "docid": "c77e6b708c163d2f924d0ca78fc53b81", "score": "0.562569", "text": "protected function addOnSubmitJavaScriptCode() {}", "title": "" }, { "docid": "21c8f9c2719368f15ca315d4abdeb6e5", "score": "0.5621927", "text": "public function run(){\n\t\tYii::app()->clientScript->registerScript('enterComment',\"\n\t\t\t$('#Comment_content').live('keypress', function(e){\n\t\t\t if(e.keyCode == 13){\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t//jQuery.ajax({'type':'POST','url':'/comment/comment','cache':false,'data':jQuery(this).parents(\\\"form\\\").serialize(),'success':function(html){jQuery(\\\"#comment-page\\\").html(html)}});$('#Comment_content').attr('disabled', 'disabled');\n\t\t\t\t $('#comment').trigger('click'); \n\t\t\t\t\treturn false;\n\t\t\t\t }\n \t});\", CClientScript::POS_END);\n\t\t\n\t\tYii::app()->clientScript->registerScript('deleteComment',\"\n\t\t\t$('.close > a').live('click', function(e){jQuery.ajax({'type':'GET','success':$('#comment'+$(this).attr('id').substring(1)).hide('slow'),'data':{'id':$(this).attr('id').substring(1)},'url':'\".CHtml::normalizeUrl(array('/comment/deleteComment')).\"','cache':false});return false;\n\t\t});\", CClientScript::POS_END);\n\t\t\n\t\t$this->render('commenting',array(\n\t\t\t'model'=>$this->model,\n\t\t\t'comments'=>$this->comments,\n\t\t));\n }", "title": "" }, { "docid": "c66ca4579f50dfc223c60d2fc5fc55c6", "score": "0.5615657", "text": "function thinkup_input_comments() {\n\t$args = array( \n\t\t'callback' => 'thinkup_input_commenttemplate', \n\t);\n\twp_list_comments( $args );\n}", "title": "" }, { "docid": "a5243999c5336c4cf07906144d01a0e0", "score": "0.5614831", "text": "protected function generateJavascript()\n\t{\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "954ba506b88bb6bbd439050459c01503", "score": "0.0", "text": "public function show($beneficiaire)\n {\n $beneficiaireData=$this->beneficiaireService->read($beneficiaire);\n if($beneficiaireData){\n return response()->json([ 'success' => ['data' => new BeneficiairesResource($beneficiaireData) ]], Response::HTTP_OK);\n }else{\n return response()->json([ 'success' => ['message' => 'Aucun beneficiaire' ]], Response::HTTP_NOT_FOUND);\n }\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "754e1795026ca4c71e3959656a533ca3", "score": "0.77020115", "text": "private function _displayResource() {\n\t\t// determine which action to take\n\t\t$lti_message_type = $this->lti_model->getLtiDataValue('lti_message_type');\n\t\tswitch( $lti_message_type ){\n\t\t\tcase 'ContentItemSelectionRequest' : // take user to the content item selector\n\t\t\t\t$this->_getContentItemSelectionRequest();\n\t\t\t\tbreak;\n\t\t\tcase 'basic-lti-launch-request' : // retrieve the requested resource\n\t\t\tdefault :\n\t\t\t\t// store LTI basic outcomes service details when an outcome is requested\n\t\t\t\t$this->lti_outcomes->saveLtiOutcomesValues();\n\t\t\t\t$this->getContent( $custom_resource_id );\n\t\t}\n\t}", "title": "" }, { "docid": "d77a1cf077ad489eb930bc1facfeb4a7", "score": "0.7348343", "text": "public function show($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "26f38c42099a7c64fba7842c4ce19062", "score": "0.7230476", "text": "public function show(Resource $resource)\n {\n return view('actions.resource.show', compact('resource'));\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "48fb67ee8a54377a224740d572c17cdd", "score": "0.7143722", "text": "public function show(Resource $resource)\n {\n return view('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "50078f2eddc7667a37be0da403d6d3e4", "score": "0.7131298", "text": "function display($resource_name, $cache_id = null, $compile_id = null) {\n // Был старый выхзов, учитывал кеширование\n //$this->fetch($resource_name, $cache_id, $compile_id, true);\n $this->render($resource_name);\n }", "title": "" }, { "docid": "860344e8f85b09bf11e41aa48e928f6e", "score": "0.6776001", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "bc7cbf8f7bf2cdecfc58cc20b4ee76ef", "score": "0.6574996", "text": "public function show($course, Resource $resource)\n {\n\n\n $pageTitle = 'Resource';\n\n return view('resources.resource')->with(compact( 'resource', 'pageTitle'));\n }", "title": "" }, { "docid": "cc94e2329160f202733c635aa4bf0b30", "score": "0.65286446", "text": "public function show($param)\r\n {\r\n\r\n $data['resource_header'] = true;\r\n $user_id = ($this->auth)?$this->auth->id:null;\r\n $data['resource'] = Resource::with(['tags', 'likesCount', 'user', 'downloads', 'category', 'category.resources' => function($q){\r\n $q->limit(4);\r\n }, 'like' => function($q)use($user_id){\r\n $q->where('user_id', $user_id);\r\n }])\r\n ->where('slug', $param)\r\n ->orWhere('id', $param)\r\n ->firstOrFail();\r\n\r\n $author = User::with('profile')\r\n ->where('id', $data['resource']->user_id)\r\n ->get()\r\n ->toArray();\r\n\r\n if(count($author) > 0){\r\n $data['author'] = $author[0];\r\n }\r\n\r\n $data['latestResources'] = Resource::with('category')->orderBy('id', 'desc')->limit(5)->get();\r\n $data['tags'] = Tag::orderBy('id','desc')->get();\r\n\r\n return view('public.resource')->with($data);\r\n }", "title": "" }, { "docid": "69545e83d1d4c03b646757789a897b5b", "score": "0.6515112", "text": "public function show(Resource $resource)\n {\n //\n // $this->authorize('view',Resource::class);\n // $page=Page::all();\n // $resource=Resource::all();\n // return view('resource.show',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "51abeaf13e315e938469da7a51936df5", "score": "0.6467601", "text": "public function show($id)\n {\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n //$resource = Resource::findOrFail($id);\n\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4869655563febeddc21b876b2d3bd399", "score": "0.6464456", "text": "public function showResource(Request $request, $id = 0);", "title": "" }, { "docid": "6e101e96500f24d567e50a803b6d00fb", "score": "0.64562225", "text": "public function show($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Details');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getVisibleLabels());\n\t}", "title": "" }, { "docid": "0bfd2fab1690e405f8ae90f2f671725b", "score": "0.63684106", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/show', compact('resource'));\n\t}", "title": "" }, { "docid": "14f061e926b1904b496ec52586cb2b35", "score": "0.63535744", "text": "public function display() {\n\t\t\ttry {\n\t\t\t\tif(!is_null($this->id)) {\n\t\t\t\t\t$this->returnView($this->model->display($this->id));\n\t\t\t\t} else {\n\t\t\t\t\t$this->error404();\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$this->session->add('error', $e->getMessage());\n\t\t\t\texit(header('Location: '.$_SERVER['HTTP_REFERER']));\n\t\t\t}\n\t\t\t$this->session->sUnset('error');\n\t\t}", "title": "" }, { "docid": "30460e9f10fc35f6066e56c0edf07f11", "score": "0.62772554", "text": "public function resource($resource)\n {\n // TODO: Implement resource() method.\n }", "title": "" }, { "docid": "742c2b4cd2f26a04a82af80f8ee84057", "score": "0.62133056", "text": "public function show()\n {\n $dispatcher = Dispatcher::getSharedDispatcher();\n $dataProvider = $this->getDataProvider();\n $controller = $dataProvider->getControllerClassForPath($this->getPath());\n $action = $this->getIdentifier() . 'Action';\n $controller = GeneralUtility::makeInstance($controller);\n\n if (is_object($controller)) {\n $controller->setRequest($dispatcher->getRequest());\n }\n if (is_numeric($this->getIdentifier())\n && is_object($controller) && method_exists($controller, 'showAction')\n ) {\n $result = $controller->processAction('showAction', $this->getIdentifier());\n } elseif (is_object($controller) && method_exists($controller, $action)) {\n $result = $controller->processAction($action);\n } else {\n $result = false;\n }\n\n return $result ? $this->createResponse($result, 200) : $result;\n }", "title": "" }, { "docid": "f61677388a9b71138fce919e36a82ca0", "score": "0.61413664", "text": "public function show($id)\n {\n #$resource = resource::find($id);\n $resource = Resource::where('slug', '=', $id)->orWhere('id', '=', $id)->firstOrFail();\n\n $related_resources = Resource::where('id', \"!=\", $resource->id)\n ->orWhere('name', 'LIKE', '%' . $resource->name . '%')\n ->orWhere('description', 'LIKE', '%' . $resource->description . '%')->take(8)->get();\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $related_resources,\n ];\n\n return view('resources.show-resource')->with($data);\n }", "title": "" }, { "docid": "404169262f3328542c2f476a8bae067c", "score": "0.6073625", "text": "public function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n $this->fixURI($resource_name);\n\n return parent::fetch($resource_name, $cache_id, $compile_id, $display);\n }", "title": "" }, { "docid": "90a025ba515ea1ffda1792e51f379566", "score": "0.6065236", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show')->with(compact('resource'));\n }", "title": "" }, { "docid": "d4b48f077d182386266a016e1934227a", "score": "0.60600674", "text": "public function render(&$objResource);", "title": "" }, { "docid": "120fe33c517800f7a36fd36a7d8ff2a0", "score": "0.6034755", "text": "public function showAction($id);", "title": "" }, { "docid": "691f9d494ebbd3698416c27402ce6045", "score": "0.6024695", "text": "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "title": "" }, { "docid": "c6f154f853b604d366507e7f3651128c", "score": "0.59881043", "text": "public function index()\n\t{\n\t\t$this->load->view('resource');\n\t}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3411150986f3334a3ae059e3824a705e", "score": "0.59518707", "text": "public function showAction() {\n\n\t\t// ...\n\t\tif(isset($this->externalWebsiteUri)) {\n\t\t\t$this->view->assign('external_website_uri', $this->externalWebsiteUri);\n\t\t}\n\t}", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "7a089792dd9f8cefa56e79369d710cb2", "score": "0.59358656", "text": "public function show(Request $request, string $resource, string $id) {\n if(!Lyra::checkPermission('read', $resource)) abort(403);\n\n if(config('lyra.translator.enabled') && $request->has('lang')) App::setLocale($request->get('lang'));\n\n $resourcesNamespace = Lyra::getResources()[$resource];\n $modelClass = $resourcesNamespace::$model;\n\n if (method_exists($modelClass, 'trashed')) {\n $model = $modelClass::withTrashed()->find($id);\n } else {\n $model = $modelClass::find($id);\n }\n\n if (!Arr::first($model)) return abort(404, \"No query results for model [$modelClass]\");\n $resourceCollection = new $resourcesNamespace(collect([$model]));\n return $resourceCollection->getCollection($request, 'show');\n }", "title": "" }, { "docid": "a5fe9713f7fa35feab808a95acb937a5", "score": "0.59236246", "text": "public function show(Artist $artist)\n {\n\n\n return new ShowArtistResource($artist);\n\n\n }", "title": "" }, { "docid": "4dd721a222d59966f8999c2bf46a1634", "score": "0.5913372", "text": "public function url($resource = self::URL_RESOURCE, array $args = array()) \n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.5910201", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f2800dcfd7234cc6b914253341f2a919", "score": "0.5905734", "text": "public function display()\n {\n $this->getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c6b5201b64b56afc1aba96e7f01df942", "score": "0.5895745", "text": "public function displayAction()\r\n\t\t{\r\n\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_User i')\r\n\t\t\t->where('i.UserName = ?', $this->identity['UserName']);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "e1911719b5dbc5045d62ac4e5e20cd33", "score": "0.587909", "text": "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "title": "" }, { "docid": "9593ec2b031b164d16249f1ae81182ef", "score": "0.58776784", "text": "public function show(Retex $retex)\n {\n //\n }", "title": "" }, { "docid": "093db99e28544f24edb386d2bf2129f0", "score": "0.58682454", "text": "public function display() {\n\t\t$this->displayContent();\n\t}", "title": "" }, { "docid": "95d012dca84499e39b434e04c9f86031", "score": "0.58522356", "text": "public function showAction()\n\t{\n\t\tif (!isset($this->sGlobal->uId) && !Zend_Auth::getInstance ()->hasIdentity ()) {\n\t\t\t$this->_helper->redirector->gotoRoute ( array('action' => 'index', 'controller' => 'auth'), 'default' );\n\t\t}\n\t\t \n\t\t$dbRoutes = new Model_Ride_DbRoutes();\n\t\t\n\t\t$routes = $dbRoutes->getRoutesByUserId($this->sGlobal->uId);\n\t\t\n\t\t$this->view->routes = $routes;\n\t\t\n\t\t$this->view->deleteRideLink = $this->_helper->url->url(array('controller'=>'Ride', 'action'=>'deleteride'), 'default', true);\n\t\t\n\t}", "title": "" }, { "docid": "a6ea4c61d98549d6b82aa6c50e5153c9", "score": "0.58442765", "text": "public function show($id)\n {\n // return \"Show \".$id;\n abort(404);\n }", "title": "" }, { "docid": "57e04be30c8d73c6f1b1f97f0813c951", "score": "0.5839814", "text": "public function show($parm);", "title": "" }, { "docid": "7fa6d8ebb4c7b91b6b1219f34c1ccc2e", "score": "0.5827577", "text": "public function show()\n {\n return $this->resource->transform();\n }", "title": "" }, { "docid": "1f025b0828827877859e8e2f72f5add5", "score": "0.5824839", "text": "public function resourceAction();", "title": "" }, { "docid": "bc8b175839d90931dc37b6d17073534e", "score": "0.5824825", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id)\n ->addWhere('i.DisplayStatus = 1')\n ->addWhere('i.DisplayUntil >= CURDATE()');\n $sql = $q->getSqlQuery();\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n $registry = Zend_Registry::getInstance();\n $this->view->locale = $registry->get('Zend_Locale');\n $this->view->recordDate = new Zend_Date($result[0]['RecordDate']);\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "bcd5d6f048ed9967b2cc42a2b9c646e4", "score": "0.58217233", "text": "public function show($id)\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "062f661f5aa2b0fb00beffc662c406c7", "score": "0.58164716", "text": "public function show($id)\n {\n $catalog_detail = Catalog::where(\"id\", \"=\", $id,)->first();\n\n if (!is_null($catalog_detail)) {\n return $this->ok(\"\", new CatalogResource($catalog_detail));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "e5b312e565cadd216286627cb156afa1", "score": "0.5814938", "text": "public function show() {\n $this->display = true;\n }", "title": "" }, { "docid": "3c83da877de5a8b9a28620cc567e154f", "score": "0.5812585", "text": "public function show($model)\n {\n $model = $this->getModel($model);\n\n $this->authorize('view', $model);\n\n $model = $this->showModel($model);\n\n $resource = resource($model);\n\n return ok($resource);\n }", "title": "" }, { "docid": "8fa3c5aa92241bd98bf245a72087750b", "score": "0.58067733", "text": "public function show($id)\n {\n return Resource::find($id);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7d4b687c2015cbab6585700fbd9fed75", "score": "0.5790671", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/Regions/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "6d0ead3170a91374660511ebe07a7e52", "score": "0.57788694", "text": "public function display($file){\n\t\techo $this->fetch($file);\n\t}", "title": "" }, { "docid": "1ebe558af6c12f3e75c7741d736cd837", "score": "0.5773779", "text": "public function show($id)\n\t{\n\t\t$this->layout->nest('content', $this->view, ['car' => $this->resource]);\n\t}", "title": "" }, { "docid": "ff99e6923e061969deb024f038cd9fd9", "score": "0.5771933", "text": "public abstract function show();", "title": "" }, { "docid": "f37f81a8bf0d836ce01d6e66ee929689", "score": "0.57692647", "text": "public function show()\n {\n $ResourceRepo = new ResouceRepo();\n $res = $ResourceRepo->show();\n $count = $ResourceRepo->getcount();\n\n return view('ViewResource',['resources' => $res,'totalcount' =>$count]);\n }", "title": "" }, { "docid": "23d3f586042fc7ef9f98c33613fd010d", "score": "0.5757193", "text": "public function url($resource = 'instances', array $args = array())\n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "be16c52b6734a0cf50cdaa52b26c8ee0", "score": "0.57546145", "text": "public function show(Resroom $resroom)\n {\n //\n }", "title": "" }, { "docid": "6552a6831d000ffc0b68b09357fd4a3c", "score": "0.5750852", "text": "public function show($id)\n\t{\n\t\techo $id;\n\t}", "title": "" }, { "docid": "58d82a32f57975c44fc660ccacd3a42f", "score": "0.5749565", "text": "public function resource( $resc= '')\n {\n return view('home.resource',['resource'=>$resc]);\n }", "title": "" }, { "docid": "c28bc00a20642b8f45cbb36b8f142bb6", "score": "0.5747548", "text": "public function show( $id );", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.5737612", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c0c57945d6d1643edc1ffb95ae99eef9", "score": "0.5735039", "text": "public function show($id)\n { \n if( $this->checkShowModelRequest($id) ) return abort(404, \"Resource not found\");\n\n if(request()->expectsJson() || $this->onlyJsonResponse) \n return response()->json($this->showModelQueryResponse($id));\n\n return $this->renderView(\n $this->moduleName != null ? Str::plural($this->moduleName) . '.show' : 'show' ,\n $this->showResponse($id)\n );\n }", "title": "" }, { "docid": "1bb2758d3ba7fe86461bda00a9606e3e", "score": "0.5734708", "text": "public function show( $id )\n\t{\n\t\t$model = Input::get( 'model' );\n\n\t\tif ( !class_exists( $model ) ) {\n\t\t\treturn $this->renderResponse( false, \"That model does not exist\" );\n\t\t}\n\n\t\t$item = $model::find( $id );\n\n\t\tif ( !is_null( $item ) ) {\n\t\t\tif ( property_exists( $item, 'eager_relations' ) ) {\n\t\t\t\t$item->load( $item->eager_relations );\n\t\t\t}\n\t\t\treturn $this->renderResponse( true, $item->toArray( true ) );\n\t\t}\n\n\t\treturn $this->renderResponse( false, \"Resource not found\" );\n\t}", "title": "" }, { "docid": "ab8f27385173dda96b8eaafa7aa90f82", "score": "0.5734516", "text": "public function show(Hirtory $hirtory)\n {\n //\n }", "title": "" }, { "docid": "cb0625cb8bda35818012bd67fb011d73", "score": "0.5728958", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, UserActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "09abe18b0f313de0a8ae600fe6626d31", "score": "0.57271934", "text": "public function display() {\r\n\t\techo '<a href=\"' . $this->_link .\r\n\t\t\t\t'\" title=\"' . $this->_text .\r\n\t\t\t\t'\">' . $this->_text . '</a><br/>';\r\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d02c7bae2c97989fe256da11612461c7", "score": "0.5721667", "text": "function display()\n\t{\n\t\t$document \t=& JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\t\n \t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n \t\t$view\t\t=& $this->getView( $viewName , '' , $viewType );\n \t\tif($this->checkPhotoAccess())\n \t\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "3e94f05854b4dbc5a4d900f54aa8043a", "score": "0.5719658", "text": "function index( $request ){\r\n\t\t\r\n\t\t// Look for \"resource\" in request //\r\n\t\t$requestVars = Router :: getRequestVars();\r\n\t\t\r\n\t\t// Show a help page if local //\r\n\t\tif( App :: get()->local ){\r\n\t\t\tif( !isset( $requestVars->resource )){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Hard set the channel to simplify URLs to resource view //\r\n\t\tRouter :: resetChannel( 'resource' );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e2404ea37d0dd7d634ec1a88ba6e0b01", "score": "0.5708454", "text": "public function show() {\n\t\t$author = pick_arg(Author::class);\n\t\treturn $this->viewShow(compact('author'));\n\t}", "title": "" }, { "docid": "695e29ca27ebbcb0a342e19915e00ae9", "score": "0.57076776", "text": "protected function makeDisplayFromResource()\n\t{\n\t\t$query = Query::getQuery();\n\t\t$json = json_encode($this->activeResource);\n\t\tif(isset($query['callback']) && self::$jsonpEnable)\n\t\t{\n\t\t\t$this->mimeType = 'application/javascript';\n\t\t\t$callback = preg_replace('[^A-Za-z0-9]', '', $query['callback']);\n\t\t\treturn $callback . '(' . $json . ')';\n\t\t}else{\n\t\t\treturn $json;\n\t\t}\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" } ]
9f2de98d3c1b55dc3a29cd39494315a9
Uppercase a UTF8 string.
[ { "docid": "30b838a9df43e963792b62c16a248432", "score": "0.6893667", "text": "public function strtoupper($text)\n {\n if (is_array($text)) {\n foreach ((array) $text as $k => $v) {\n $text[$k] = $this->strtoupper($v);\n }\n return $text;\n }\n if ($this->MULTIBYTE == $this->UNICODE_MULTIBYTE) {\n return mb_strtoupper($text);\n }\n // Use C-locale for ASCII-only uppercase\n $text = strtoupper($text);\n // Case flip Latin-1 accented letters\n $text = preg_replace_callback('/\\xC3[\\xA0-\\xB6\\xB8-\\xBE]/', [$this, '_unicode_caseflip'], $text);\n return $text;\n }", "title": "" } ]
[ { "docid": "f34bcb6ecb6353923aaa5951dfb4a3c5", "score": "0.7938856", "text": "public static function upper($s): string\n\t{\n\t\treturn mb_strtoupper((string) $s, 'UTF-8');\n\t}", "title": "" }, { "docid": "55f0316fc5f6524dcefe3efe570724f0", "score": "0.7925778", "text": "public static function upper(string $value): string\n {\n return mb_strtoupper($value, 'UTF-8');\n }", "title": "" }, { "docid": "55f0316fc5f6524dcefe3efe570724f0", "score": "0.7925778", "text": "public static function upper(string $value): string\n {\n return mb_strtoupper($value, 'UTF-8');\n }", "title": "" }, { "docid": "ed5c0744e25a0aee604f528e7aadb0f9", "score": "0.7783368", "text": "public function toUpper($string) {\n\t\tif($string === null) {\n\t\t\treturn $string;\n\t\t}\n\n\t\tif(self::$loadedMbString) {\n\t\t\treturn mb_strtoupper($string, mb_detect_encoding($string));\n\t\t}\n\t\t$string = strtr($string, \"àáâãäåæçèéêëìíîïðñòóôõöøùúûüý\", \"ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ\");\n\t\treturn strtoupper($string);\n\t}", "title": "" }, { "docid": "3fe768267ecd7b54f3abdef92d8810d7", "score": "0.77586", "text": "static public function upper($string)\r\n\t{\r\n\t\t// We get better performance falling back for ASCII strings\r\n\t\tif (!self::detect($string)) {\r\n\t\t\treturn strtoupper($string);\r\n\t\t}\r\n\r\n\t\tif (self::$mbstring_available === NULL) {\r\n\t\t\tself::checkMbString();\r\n\t\t}\r\n\r\n\t\tif (self::$mbstring_available) {\r\n\t\t\t$string = mb_strtoupper($string, 'utf-8');\r\n\t\t\t// For some reason mb_strtoupper misses some character\r\n\t\t\treturn strtr($string, self::$mb_lower_to_upper_fix);\r\n\t\t}\r\n\r\n\t\treturn strtr($string, self::$lower_to_upper);\r\n\t}", "title": "" }, { "docid": "1d284c9d21e9c18e04f81d415a33f7dd", "score": "0.77012205", "text": "public static function uppercase($string){\n return trim(mb_strtoupper($string,'utf-8'));\n }", "title": "" }, { "docid": "6c8aa408b7e040f2856aea8fb8d53e65", "score": "0.7632873", "text": "public static function upper($value)\n {\n return mb_strtoupper($value, 'UTF-8');\n }", "title": "" }, { "docid": "6c8aa408b7e040f2856aea8fb8d53e65", "score": "0.7632873", "text": "public static function upper($value)\n {\n return mb_strtoupper($value, 'UTF-8');\n }", "title": "" }, { "docid": "35622cad3957c366a9477222aadbbe19", "score": "0.75411075", "text": "public static function upper($string)\n {\n return strtr(mb_strtoupper($string), \"àáâãäåæçèéêëìíîïðñòóôõö÷øùüúþÿ\", \"ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÜÚÞß\");\n }", "title": "" }, { "docid": "1b5358e98741530edbfbfc409c286dfc", "score": "0.7519889", "text": "function utf8_strtoupper($string){\r\n if(UTF8_MBSTRING) return mb_strtoupper($string,'utf-8');\r\n\r\n global $UTF8_LOWER_TO_UPPER;\r\n return strtr($string,$UTF8_LOWER_TO_UPPER);\r\n }", "title": "" }, { "docid": "8559175cdc59f27562c87be7b5631f77", "score": "0.74610275", "text": "function ToUpper($str)\n{\n\treturn strtoupper($str);\n //return mb_strtoupper($str, 'utf8');\n}", "title": "" }, { "docid": "551a7e69ca316356444e3bbd501d96a6", "score": "0.7428524", "text": "function _strtoupper($string) {\r\n global $UTF8_LOWER_TO_UPPER;\r\n $uni = $this->toUnicode($string);\r\n for($i = 0; $i < count($uni); $i++) {\r\n if (isset($UTF8_LOWER_TO_UPPER[$uni[$i]]))\r\n $uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]];\r\n }\r\n return $this->toUTF8($uni);\r\n }", "title": "" }, { "docid": "9d4550c999bc25c1b6cd4c3a748a3f9d", "score": "0.7363991", "text": "public function toUpper()\n\t{\t\n\t\t$upper = mb_strtoupper(self::$payload);\n\t\t\n\t\treturn $upper;\n\t}", "title": "" }, { "docid": "f6537f6a5d3424561705303d5440be89", "score": "0.71954274", "text": "public static function upper($value)\n\t{\n\t\tif (function_exists('mb_strtoupper'))\n\t\t{\n\t\t\treturn mb_strtoupper($value, Config::get('application.encoding'));\n\t\t}\n\n\t\treturn strtoupper($value);\n\t}", "title": "" }, { "docid": "67acf77e1d2aac2f036e83484660640c", "score": "0.714039", "text": "function upper($string = null){\n $result = null;\n if ($string !== null) {\n $result = $this->unicode->strtoupper($string);\n }\n return $result;\n }", "title": "" }, { "docid": "cf404c3d50a9b459232c094991250406", "score": "0.71378624", "text": "public static function toUppercase(string $string) {\n return strtoupper($string);\n }", "title": "" }, { "docid": "546ea9cea799538ff871897fc55dce1e", "score": "0.71263164", "text": "function upper($str){\n\treturn strtoupper($str);\n}", "title": "" }, { "docid": "a6de4fab320d25f63512681621956b15", "score": "0.70729816", "text": "function upper(string $string)\n{\n return strtoupper($string);\n}", "title": "" }, { "docid": "1d9bb33c775a8b1ff88d207188745ed6", "score": "0.70499545", "text": "public static function uppercase(string $text)\n {\n return strtoupper($text);\n }", "title": "" }, { "docid": "c2551b1de382ea48b51b915b259f639d", "score": "0.7040347", "text": "function fullUpper($string){\r\n return strtr(strtoupper($string), \"àáâãäåæçèéêëìíîïðñòóôõöøùúüº-_\", \"ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚܺ-_\");\r\n}", "title": "" }, { "docid": "47124e3f008978dcf75aa2772714d6ea", "score": "0.703083", "text": "function capsUpper($value){\n return mb_convert_case($value, MB_CASE_UPPER, \"UTF-8\");\n}", "title": "" }, { "docid": "b9a8603172248c2841052e26a00250d2", "score": "0.69771343", "text": "public function toUpperCase($in){\r\n\t\treturn \"UPPER(\" . $in . \")\";\r\n\t}", "title": "" }, { "docid": "940dc2ffa55eea384b3ee141e6d7b63b", "score": "0.6970139", "text": "public function strtoupper($String) {\n\t if($this->Engine=='mbstring') {\n\t return mb_strtoupper($String, 'UTF-8');\n\t }\n\t $UniStr= $this->ToUnicode($String);\n\t if ($UniStr === false) {\n\t\t return false;\n }\n \tfor ($i=0, $c=count($UniStr); $i<$c; $i++) {\n\t\t if (isset($this->UTF8_LOWER_TO_UPPER[$UniStr[$i]])) {\n\t\t\t$UniStr[$i]= $this->UTF8_LOWER_TO_UPPER[$UniStr[$i]];\n\t\t }\n\t }\n return $this->FromUnicode($UniStr);\n\t}", "title": "" }, { "docid": "b04ca4237446c187204496678fb64ee7", "score": "0.6939837", "text": "private static function charUpper(): string\n {\n return strtoupper(self::charLower());\n }", "title": "" }, { "docid": "d929e39241e857d726ab1e69be4bd8f7", "score": "0.6905371", "text": "function upper($string) {\n\t\t$len=strlen($string);\n\t\t$i=0;\n\t\t$last=\"\";\n\t\t$newstring=\"\";\n\t\t$string=strtoupper($string);\n\t\twhile ($i<$len){\n\t\t\t$char=substr($string,$i,1);\n\t\t\tif (ereg(\"[A-Z]\",$last)){\n\t\t\t\t$new.=strtolower($char);}\n\t\t\telse{\n\t\t\t\t$new.=strtoupper($char);}\n\t\t\t$last=$char;\n\t\t\t$i++;\n\t\t}\n\t\treturn($newstring);\n\t}", "title": "" }, { "docid": "2b072f1dc627c9cbdcc4cb8eae9abbbe", "score": "0.6890289", "text": "function toUpper() {\n\t\treturn new Text(mb_strtoupper($this->text, 'UTF-8'), 'UTF-8');\n\t}", "title": "" }, { "docid": "7ad3560c7a09246bc74b87b1b346ae8d", "score": "0.6812961", "text": "public static function toUpper(/*string*/ $source) {\r\n\t\treturn strtoupper($source);\r\n\t}", "title": "" }, { "docid": "367063adfc23d1b225ee31400e29c9ae", "score": "0.6794552", "text": "public static function str2upper($str) {\n\t $str = strtoupper( $str );\n\t $str = str_replace( \"\\'\", '\\\\\\'', $str );\n\t return $str;\n }", "title": "" }, { "docid": "5ef1ea1c66ea424978e26bf33984677a", "score": "0.6789025", "text": "function toUpperCase($in) {\n\t\treturn 'UPPER(' . $in . ')';\n\t}", "title": "" }, { "docid": "898d6d2f17481ba74af68a2c44069978", "score": "0.67679703", "text": "public function toUpper($string) {\n\t\tif (!is_string($string)) {\n\t\t\treturn $string;\n\t\t}\n\t\t$toUpper = $this->uppermap();\n\t\tforeach ($toUpper as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$toUpper[$key] = $value['full'];\n\t\t\t}\n\t\t}\n\t\treturn strtr($string, $toUpper);\n\t}", "title": "" }, { "docid": "8b1b179050b205d87cef07a77e701e34", "score": "0.6727304", "text": "public static function strtoupper($str)\n\t{\n\t\treturn (strtr($str, $GLOBALS['UTF8_LOWER_TO_UPPER']));\n\t}", "title": "" }, { "docid": "2511e2279a970f44428681d57c346114", "score": "0.6706672", "text": "protected function toUpper($data)\n {\n $len = strlen($data);\n $pos = 0;\n \n while ($pos < $len) {\n $mode = $this->bsObj->getEncodingMode($data, $pos);\n if ($mode == Data::$encodingModes['KJ']) {\n $pos += 2;\n } else {\n if ((ord($data[$pos]) >= ord('a')) && (ord($data[$pos]) <= ord('z'))) {\n $data[$pos] = chr(ord($data[$pos]) - 32);\n }\n $pos++;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "bfad180160e4dffc59e5d346ab1ad2cc", "score": "0.66933924", "text": "public static function ucfirst_utf8(string $str): string\n {\n return mb_substr(mb_strtoupper($str, 'utf-8'), 0, 1, 'utf-8') . mb_substr($str, 1, mb_strlen($str) - 1, 'utf-8');\n }", "title": "" }, { "docid": "795f27460af860eb24b1a82b77c46aee", "score": "0.6663853", "text": "final public static function upper(\n string $text,\n string $encoding = \"UTF-8\"\n ): string {\n return mb_convert_case($text, MB_CASE_UPPER, $encoding);\n }", "title": "" }, { "docid": "026974f88ce50c0e211723745d406257", "score": "0.6616706", "text": "public function strtoupper($str)\n {\n $retval = strtoupper($this->iso($str));\n\n return $this->utf8($retval);\n }", "title": "" }, { "docid": "c0f9b9d6ff0a5d03ae2c22e1d4b549b1", "score": "0.6597323", "text": "public function strtoupper($value)\n {\n if (function_exists('mb_strtoupper') && is_callable('mb_strtoupper')) {\n return mb_strtoupper($value, 'UTF-8');\n } else {\n return strtoupper($value);\n }\n }", "title": "" }, { "docid": "d391e6e45092a97b6aafe8297ee7bf5a", "score": "0.65515214", "text": "public static function toupper($codepoint){}", "title": "" }, { "docid": "1c404afa2cd05ce82d607d9e3283f2d3", "score": "0.6509608", "text": "public function action_convert_to_upper() {\n $str = isset($_GET['str']) ? $_GET['str'] : \"\";\n $str = strtoupper($str);\n return $this->response(array('str' => $str));\n }", "title": "" }, { "docid": "6a2a09212e931e57d1f29d02e313dbe9", "score": "0.6496517", "text": "public function toUpperCase(): Strang\n {\n return new self(mb_strtoupper($this->data, CharacterEncoding::UTF_8));\n }", "title": "" }, { "docid": "edf339fa76a5983828e4ea61712084b6", "score": "0.64621294", "text": "public static function upcase($input)\n {\n return is_string($input) ? IlluminateStr::upper($input) : $input;\n }", "title": "" }, { "docid": "d205d1495e7ebfb9b01823b0e2a050c1", "score": "0.6432582", "text": "function capitalize($string)\n{\n return mb_convert_case($string, MB_CASE_TITLE, 'UTF-8');\n}", "title": "" }, { "docid": "87711d098a22ef50add5c109785c186a", "score": "0.64316547", "text": "function utf8_ucfirst($str){\r\n switch ( utf8_strlen($str) ) {\r\n case 0:\r\n return '';\r\n case 1:\r\n return utf8_strtoupper($str);\r\n default:\r\n \t$matches = array();\r\n preg_match('/^(.{1})(.*)$/us', $str, $matches);\r\n //Something wrong... keep string!\r\n if(sizeof($matches) < 3) {\r\n \treturn $str;\r\n } \r\n return utf8_strtoupper($matches[1]).$matches[2];\r\n }\r\n }", "title": "" }, { "docid": "01e81aa881b3ae6119d445f8dbe67964", "score": "0.6426305", "text": "final public function uppercase(): static\n {\n $value = mb_strtoupper($this->value, 'UTF-8');\n\n return new static($this->output, $value, $this->properties);\n }", "title": "" }, { "docid": "01e81aa881b3ae6119d445f8dbe67964", "score": "0.6426305", "text": "final public function uppercase(): static\n {\n $value = mb_strtoupper($this->value, 'UTF-8');\n\n return new static($this->output, $value, $this->properties);\n }", "title": "" }, { "docid": "1af3141dda34dc9422951dab8bc2230f", "score": "0.64178807", "text": "public function getUpperCase()\n {\n return strtoupper($this->word);\n }", "title": "" }, { "docid": "8764caeb67e35386f0d4c00ea4cdc77b", "score": "0.6408506", "text": "function toUpper($input)\n{\n return strtoupper($input);\n}", "title": "" }, { "docid": "7410234a8ae32c166e0cdc650cb3fca8", "score": "0.63704765", "text": "public static function uppercase($str, $encoding = 'UTF-8') {\n\n\t\tif(function_exists('mb_strtoupper'))\n\t\t\treturn mb_strtoupper($str, $encoding);\n\n\t\treturn strtoupper($str);\n\t}", "title": "" }, { "docid": "f8db00acedb1c610efaa1ea5b742b863", "score": "0.6366364", "text": "public static function capitalize($string){\n return trim(ucwords(mb_strtolower($string,'utf-8')));\n }", "title": "" }, { "docid": "2fe30beefc7955b5c50a19af23a2d64c", "score": "0.6348359", "text": "private static function upperCamelize($string)\n\t{\n\t\treturn self::camelize($string, TRUE);\n\t}", "title": "" }, { "docid": "ea619b7e941418c284c269b01ad379fe", "score": "0.6333414", "text": "private function strToUpper( string $str ) : string\n {\n\n $str = \\html_entity_decode( $str );\n\n if ( \\function_exists( '\\\\mb_strtoupper' ) )\n {\n $str = \\mb_strtoupper( $str, 'UTF-8' );\n }\n else\n {\n $str = \\strtoupper( $str );\n }\n\n return \\htmlspecialchars( $str, \\ENT_COMPAT );\n\n }", "title": "" }, { "docid": "1ceeef6b37d4dc68fa8872b6fdf94452", "score": "0.63057923", "text": "function drupal_strtoupper($text) {\n global $multibyte;\n if ($multibyte == UNICODE_MULTIBYTE) {\n return mb_strtoupper($text);\n }\n else {\n // Use C-locale for ASCII-only uppercase\n $text = strtoupper($text);\n // Case flip Latin-1 accented letters\n $text = preg_replace_callback('/\\xC3[\\xA0-\\xB6\\xB8-\\xBE]/', '_unicode_caseflip', $text);\n return $text;\n }\n}", "title": "" }, { "docid": "b7303a6323b5d9e36d2c72835c8f0258", "score": "0.62996405", "text": "public function toUppercase()\n {\n $this->string = strtoupper($this->string);\n return $this;\n }", "title": "" }, { "docid": "3be802e83c351227c618271a7f380eab", "score": "0.62651324", "text": "public static function uppercase($strWord)\n {\n return strtoupper($strWord);\n }", "title": "" }, { "docid": "5b264093b040f674f9261384f824700c", "score": "0.62401116", "text": "public function selfUpperCase()\n {\n if (is_array($this->attributes)) {\n foreach ($this->attributes as $field => $value) {\n if (is_string($value)) {\n if (property_exists($this, 'guardedCase')) {\n if (!in_array($field, $this->guardedCase)) {\n $this->{$field} = Str::upper($value);\n }\n } else {\n $this->{$field} = Str::upper($value);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "37cb922e0b3f6bb15f26edefee634f97", "score": "0.62103575", "text": "final public static function decapitalize(\n string $text,\n bool $upperRest = false,\n string $encoding = \"UTF-8\"\n ): string {\n $substr = mb_substr($text, 1);\n $suffix = ($upperRest) ? self::upper($substr, $encoding) : $substr;\n\n return self::lower(mb_substr($text, 0, 1), $encoding) . $suffix;\n }", "title": "" }, { "docid": "d873d8c6d8ea63a233bb64e0d177436e", "score": "0.61765593", "text": "public function upper_case_string($emp_name){\n\t\t$let = ucwords($emp_name);\n\t\treturn $let;\t\n\t}", "title": "" }, { "docid": "731aa1c6d0fe2aaa6cfe50e4f8b6a1c3", "score": "0.616116", "text": "private function toUpper( string $str ) : string\n {\n\n // string can contain HTML tags\n $chunks = \\preg_split( '/(<[^>]*>)/', $str, null, \\PREG_SPLIT_NO_EMPTY | \\PREG_SPLIT_DELIM_CAPTURE );\n\n // convert to upper only the text between HTML tags\n foreach ( $chunks as $idx => $chunk )\n {\n if ( $chunk[ 0 ] != '<' )\n {\n $chunks[ $idx ] = $this->strToUpper( $chunk );\n }\n }\n\n return \\implode( $chunks );\n\n }", "title": "" }, { "docid": "4a4e70230c456eab9eca7ddafe3c6b01", "score": "0.61592627", "text": "static public function capitalize($string){\n return strtoupper(substr($string,0,1)).substr($string,1);\n }", "title": "" }, { "docid": "28a5c3254e4dccfa137b469d061b8725", "score": "0.6152547", "text": "public function upper()\n {\n return new static(Str::upper($this->value));\n }", "title": "" }, { "docid": "cb989d4a0f3bb74a30765b970a9c3fde", "score": "0.6077191", "text": "public function capitalize($string) {\n\t\treturn self::toUpper(substr($string, 0, 1)) . self::toLower(substr($string, 1));\n\t}", "title": "" }, { "docid": "e8d394eae6ab2604f016d31ffdca1915", "score": "0.6023698", "text": "public static function ctype_upper($text)\n {\n $text = self::convert_int_to_char_for_ctype($text);\n\n return \\is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);\n }", "title": "" }, { "docid": "98852353a928ff574ff6e844a9ba69d6", "score": "0.60030705", "text": "protected static function upperCamelCase($name)\n {\n return str_replace(' ','',ucwords(str_replace('-', ' ',$name)));\n }", "title": "" }, { "docid": "662404fc11d63e1c60aaa3828134cad5", "score": "0.6001889", "text": "static public function ucwords($string)\r\n\t{\r\n\t\treturn preg_replace_callback(\r\n\t\t\t'#(?<=^|\\s|[\\x{2000}-\\x{200A}]|/|-|\\(|\\[|\\{|\\||\"|^\\'|\\s\\'|‘|“)(.)#u',\r\n\t\t\tarray('self', 'ucwordsCallback'),\r\n\t\t\t$string\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "f60b1f01a61d0c52ee9ddb829d3eebb4", "score": "0.59920985", "text": "function utf8_ucfirst( $str ) {\r\n return ucfirst($str);\r\n\r\n}", "title": "" }, { "docid": "c8994952b97ad683bcfff0900600d5dc", "score": "0.5988113", "text": "function toUpperCase()\n {\n $this->str = strtoupper($this->str);\n return $this;\n }", "title": "" }, { "docid": "a35a0c88686757e3cf6cf0c4d5864d29", "score": "0.5980637", "text": "public function withUppercase(): StrInterface;", "title": "" }, { "docid": "78e3711be559650f47bec319170ee704", "score": "0.59722996", "text": "public function toUpper($expression)\n {\n return $this->operator('$toUpper', $expression);\n }", "title": "" }, { "docid": "cae69b007989b5b9e1ca15fafcf085bf", "score": "0.5971198", "text": "public function toUpper() {\n $this->setValue(mb_strtoupper($this->getValue()));\n return $this;\n }", "title": "" }, { "docid": "fb4375eb2298e083c7a7393e0bdc6088", "score": "0.5942359", "text": "public function toUpperCase(): ConvertString\n {\n array_walk($this->words, function (&$word) {\n $word = strtoupper($word);\n });\n\n return $this;\n }", "title": "" }, { "docid": "41397582f28c3fd5c60b6490c9d19b87", "score": "0.5939483", "text": "function testCaseUpperSimple() {\n $test = 'AA';\n $this->assertEquals(1, $this->obj->_determineCase($test));\n }", "title": "" }, { "docid": "fab9197368ce22982ed46d562776a261", "score": "0.59293103", "text": "private function firstLetterUpper($string)\n {\n return strtoupper(substr($string, 0, 1));\n }", "title": "" }, { "docid": "7c441f1a55942c99b17543bd5b987065", "score": "0.59212154", "text": "function UTF8Deaccent($string, $case = 0) {\r\n if ($case <= 0) {\r\n global $UTF8_LOWER_ACCENTS;\r\n $string = str_replace(array_keys($UTF8_LOWER_ACCENTS), array_values($UTF8_LOWER_ACCENTS), $string);\r\n }\r\n if ($case >= 0) {\r\n global $UTF8_UPPER_ACCENTS;\r\n $string = str_replace(array_keys($UTF8_UPPER_ACCENTS), array_values($UTF8_UPPER_ACCENTS), $string);\r\n }\r\n return $string;\r\n }", "title": "" }, { "docid": "aa9639a8a1702edb02b6e7c543b674da", "score": "0.5905051", "text": "function stringCapitalized($string){\n\t\tif ($string && ($string!=\"\")){\n\t\t\t$firstStep = strtolower($string);\n\t\t\treturn ucwords($firstStep);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "486c3539f71c4f19d1a6f9819de97e1d", "score": "0.5885672", "text": "static public function ucfirst($string){\r\n return mb_strtoupper(mb_substr($string, 0, 1)).mb_strtolower(mb_substr($string, 1));\r\n }", "title": "" }, { "docid": "83e5bf5a6b84c87191bcdf41bc1257d9", "score": "0.5856627", "text": "public function toUpperCase($value)\n {\n $this->toUpperCase = $value;\n\n return $this;\n }", "title": "" }, { "docid": "f86f93b6be1f53197edee56243fe80a3", "score": "0.58476955", "text": "private function uppercase_after_ponct(string $string) :string\n {\n return preg_replace_callback('#([?.!]) ([a-z])#',function($matches)\n {\n return $matches[1] . ' ' . strtoupper($matches[2]);\n },$string);\n }", "title": "" }, { "docid": "2748a137241f52bf18142fbb111409cf", "score": "0.58452713", "text": "public static function downcase($input)\n {\n return is_string($input) ? IlluminateStr::lower($input) : $input;\n }", "title": "" }, { "docid": "fb65edf40171e33a5992a0fcca2e72b3", "score": "0.5836744", "text": "public function testStrToUpper()\n {\n $this->assertRuleResults([], [], ['value' => 'My tEsT'], 'MY TEST');\n }", "title": "" }, { "docid": "d6f6c9e646766b16bc4bac1d25148e87", "score": "0.5835547", "text": "function utf8_deaccent($string,$case=0){\r\n if($case <= 0){\r\n global $UTF8_LOWER_ACCENTS;\r\n $string = strtr($string,$UTF8_LOWER_ACCENTS);\r\n }\r\n if($case >= 0){\r\n global $UTF8_UPPER_ACCENTS;\r\n $string = strtr($string,$UTF8_UPPER_ACCENTS);\r\n }\r\n return $string;\r\n }", "title": "" }, { "docid": "41bcf4b00dc308372b6a0b24e85b5117", "score": "0.5835307", "text": "public function isToUpper() {\r\n\t\treturn $this->toUpper; \r\n\t}", "title": "" }, { "docid": "ef5cabe911b84e9b19084b87c8071716", "score": "0.5807137", "text": "public static function uppercase($string = false, $selector = false) {\n\n if ($string) {\n\n switch ($selector) {\n case 'first':\n return ucfirst($string);\n case 'words':\n return ucwords($string);\n default:\n return strtoupper($string);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "c53b5636084bbcee3ccc24f9e652a15e", "score": "0.5797501", "text": "public function lengthUpper( $str, $len )\n {\n $pattern = \"/([A-Z]+)/\";\n return $this->getLengthPattern($pattern,$str,$len);\n }", "title": "" }, { "docid": "7ad5ec1bda6bdd2bdbf066ff5668bd41", "score": "0.57897574", "text": "public function strtoupper($str, $charset = null)\n {\n if ($charset === null) {\n $charset = $this->detectEncoding($str);\n }\n\n if ($this->mbstringEnabled() AND $this->mbstringEncodingSupported($charset)) {\n return mb_strtoupper($str, $charset);\n }\n\n $this->load(__FUNCTION__);\n\n return iconv(\"UTF-8\", $charset, utf8_strtoupper($this, iconv($charset, \"UTF-8\", $str)));\n }", "title": "" }, { "docid": "8efafdb6f587c509fe4e4c9b72164bf7", "score": "0.57828885", "text": "public static function strtoupper($str, $use_enc = null)\n\t{\n\t\t$enc = self::$hab_enc;\n\t\tif ( $use_enc !== null ) {\n\t\t\t$enc = $use_enc;\n\t\t}\n\n\t\tif ( self::$use_library == self::USE_MBSTRING ) {\n\t\t\t$ret = mb_strtoupper($str, $enc);\n\t\t}\n\t\telse {\n\t\t\t$ret = strtoupper($str);\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2d67c28d97548d2f376ee0408143f8d0", "score": "0.5778546", "text": "function upperCaseName($string) {\n\t$newString = \"\";\n\tforeach(explode(' ', $string) as $word) {\n\t\t// If it's a roman numeral, then add it as is\n\t\tif(preg_match(\"/M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[A-Z]?/\", $word)) {\n\t\t\t$newString .= \" \" . $word;\n\t\t} else {\n\t\t\t$newString .= \" \" . ucfirst($word);\n\t\t}\n\t}\n\n\t// Trim it down\n\treturn trim($newString);\n}", "title": "" }, { "docid": "6f2a385150502f2a72a33d6a9f7cb1ae", "score": "0.5768006", "text": "public function getUpper()\n {\n return $this->_upper;\n }", "title": "" }, { "docid": "f4a0df19e0dba2e0b51b6e4730b21fda", "score": "0.57589775", "text": "public function getUpper()\n {\n return $this->upper;\n }", "title": "" }, { "docid": "b9e16a4add0c0cece0ab0b4813adfaa7", "score": "0.5738903", "text": "function wp_auto_spinner_mb_ucfirst($string)\n\t{\n\t\t\n\t\t\n\t\tif (function_exists('mb_strtoupper')){\n\t\t\t$encoding=\"utf8\";\n\t\t\t$firstChar = mb_substr($string, 0, 1, $encoding);\n\t\t\t$then = mb_substr($string, 1, mb_strlen($string), $encoding);\n\t\t\treturn mb_strtoupper($firstChar, $encoding) . $then;\n\t\t}else{\n\t\t\treturn ucfirst($string);\n\t\t}\n\t}", "title": "" }, { "docid": "4ac52f35e2aef36980c810da47e1070d", "score": "0.5724891", "text": "public static function firstUpper(string $s)\r\n\t{\r\n\t\treturn self::upper(self::substring($s, 0, 1)) . self::substring($s, 1);\r\n }", "title": "" }, { "docid": "b4a4c94b2558e1d8073f449f8887fab1", "score": "0.57218295", "text": "function capitalize() {\n\t\treturn new Text($this[0]->toUpper().$this->substring(1)->toLower(), 'UTF-8');\n\t}", "title": "" }, { "docid": "212acf803a9acf900771bfc922b920de", "score": "0.5717804", "text": "public function ucwords($str)\n {\n if ($this->isAscii($str)) {\n return ucwords($str);\n }\n\n // [\\x0c\\x09\\x0b\\x0a\\x0d\\x20] matches form feeds, horizontal tabs, vertical tabs, linefeeds and carriage returns.\n // This corresponds to the definition of a 'word' defined at http://php.net/ucwords\n return preg_replace('/(?<=^|[\\x0c\\x09\\x0b\\x0a\\x0d\\x20])[^\\x0c\\x09\\x0b\\x0a\\x0d\\x20]/ue', '$this->strtoupper(\\'$0\\')', $str);\n }", "title": "" }, { "docid": "3c56d9dd747cd0a7cbfc9dfc89db15e3", "score": "0.57098687", "text": "private static function uppercase($filename) {\n\n if (!isset(self::$config['uppercase']) && !isset(self::$options['uppercase'])) {\n return $filename;\n }\n\n if (isset(self::$options['uppercase'])) {\n return Str::upper($filename);\n }\n\n if (isset(self::$config['uppercase'])) {\n return self::$config['uppercase'] ? Str::upper($filename) : $filename;\n }\n\n return $filename;\n }", "title": "" }, { "docid": "62cca3b0434a6f25d70c4cb6b14e8b59", "score": "0.57084125", "text": "public static function firstUpper($s): string\n\t{\n\t\t$s = (string) $s;\n\t\treturn self::upper(self::substring($s, 0, 1)) . self::substring($s, 1);\n\t}", "title": "" }, { "docid": "804275d19b8b8d0e1a5b8d090d02ca5a", "score": "0.5686013", "text": "function setUppercaseWords($value) {\n $this->_ucwords = $value;\n }", "title": "" }, { "docid": "a52db348960dfa44484ba545158262f8", "score": "0.5648743", "text": "public static function capitalize($input)\n {\n return is_string($input) ? IlluminateStr::title($input) : $input;\n }", "title": "" }, { "docid": "c57834a02c250ce7224395af54787955", "score": "0.5646582", "text": "function setUppercaseFirst($value) {\n $this->_ucfirst = $value;\n }", "title": "" }, { "docid": "ae540641e3bfbdceec4f0681823450af", "score": "0.5629403", "text": "protected function _isUpper()\n {\n return $this->_isUpperCase();\n }", "title": "" }, { "docid": "e38cf9ec2eb00624c4f9b68ffc604e07", "score": "0.5624383", "text": "private function toUppercase(): Closure\n {\n return function (string $text): string\n {\n return strtoupper($text);\n };\n }", "title": "" }, { "docid": "2300eac929f83c94119540fdfd10d46d", "score": "0.5623951", "text": "function isUpperCase($char)\n{\n if(ord($char)>64 && ord($char)<91)\n {\n return TRUE;\n }\n elseif(ord($char)>96 && ord($char)<123)\n {\n return FALSE;\n }\n else\n {\n return FALSE;\n }\n}", "title": "" }, { "docid": "2ebae3e58a41c79c7b2c3884fe99b293", "score": "0.5614277", "text": "public function upper()\n {\n $this->text = strtoupper($this->text);\n\n return $this;\n }", "title": "" } ]
77b91899e22898bad2efaef0700cbbaf
Returns the specified patch N in this PolyhedralSurface.
[ { "docid": "dde4c0f2a9d8a365dc88c20492768a83", "score": "0.85124815", "text": "public function patchN($n)\n {\n $n = (int) $n;\n\n if (! isset($this->patches[$n - 1])) {\n throw new GeometryException('There is no patch in this PolyhedralSurface at index ' . $n);\n }\n\n return $this->patches[$n - 1];\n }", "title": "" } ]
[ { "docid": "ff089cc551248af861bcc2ae43e2b632", "score": "0.57486564", "text": "public function getPatch()\n {\n return $this->patch;\n }", "title": "" }, { "docid": "ff089cc551248af861bcc2ae43e2b632", "score": "0.57486564", "text": "public function getPatch()\n {\n return $this->patch;\n }", "title": "" }, { "docid": "ff089cc551248af861bcc2ae43e2b632", "score": "0.57486564", "text": "public function getPatch()\n {\n return $this->patch;\n }", "title": "" }, { "docid": "ff089cc551248af861bcc2ae43e2b632", "score": "0.57486564", "text": "public function getPatch()\n {\n return $this->patch;\n }", "title": "" }, { "docid": "ff089cc551248af861bcc2ae43e2b632", "score": "0.57486564", "text": "public function getPatch()\n {\n return $this->patch;\n }", "title": "" }, { "docid": "49271da485d7824aabad0a589ed7072e", "score": "0.57421815", "text": "public function getPatch()\n {\n return (int) $this->version->patch;\n }", "title": "" }, { "docid": "9d8c3a4851d2ab2394993677b4b52cb0", "score": "0.55961865", "text": "function getPatch($patchId);", "title": "" }, { "docid": "1e12b29be4306c6bcbb178395d392fee", "score": "0.48040062", "text": "public function nth_round($n) {\n\t\t// Get a list of round IDs, ordered by Section.SectionNumber then Round.RoundNumber\n\t\t$sth = $this->dbh->prepare('select Round.RoundID from Event inner join Section on Section.EventID = Event.EventID inner join Round on Round.SectionID = Section.SectionID where Event.EventID = ? order by Section.SectionNumber, Round.RoundNumber limit ' . $n . ', 1');\n\t\t$sth->execute([$this->id]);\n\t\t$row = $sth->fetch();\n\t\tif(!$row)\n\t\t\treturn NULL;\n\n\t\treturn new CafeRound($this->dbh, $row['RoundID']);\n\t}", "title": "" }, { "docid": "4858b469aaa1f0a7d6f560b2f5fe8300", "score": "0.48006848", "text": "public function patches()\n {\n return $this->patches;\n }", "title": "" }, { "docid": "5f6d1520f9d8a4aa5e6de0e3c587c268", "score": "0.47637302", "text": "public function getPatchType(): ?int;", "title": "" }, { "docid": "c1c4f501b9e1b8a8de804dbaaae9f8e8", "score": "0.47233555", "text": "public function getN()\n {\n return $this->n;\n }", "title": "" }, { "docid": "d6384e972ddbd5ce5d9e5f6b7aeb470b", "score": "0.4714849", "text": "public function getPatch(){\n $patch = $_SERVER['REQUEST_URI'] ?? '/';\n $position = strpos($patch, '?');\n if($position === false){\n return $patch;\n }\n return substr($patch, 0 , $position);\n }", "title": "" }, { "docid": "0cb5918e6934aaa6e3fc8990ff8aa536", "score": "0.4582934", "text": "public function setPatchType(?int $patchType): self;", "title": "" }, { "docid": "e3f4abc9acafb69b933ba5d3c93eabb8", "score": "0.4582259", "text": "public function getPegAtIndex($index) {\n return $this->pegs[$index];\n\t}", "title": "" }, { "docid": "284cbb5c430cf73641d9e61dd3c0968b", "score": "0.449723", "text": "public function getLotNumber()\n {\n return $this->lotNumber;\n }", "title": "" }, { "docid": "78e5d299569c7f4afc1c62772011f347", "score": "0.44839296", "text": "public function getPrid() {\n\t\treturn $this->prid;\n\t}", "title": "" }, { "docid": "8cef42fddb4a52674ac203e8483e745c", "score": "0.4473738", "text": "public function getNextPatchVersion()\n {\n return new static($this->major, $this->minor, $this->patch + 1);\n }", "title": "" }, { "docid": "64cf5e9fefa51d6276f53061d89afaca", "score": "0.44729704", "text": "public static function factory(array $patches)\n {\n if (! $patches) {\n throw new GeometryException('A PolyhedralSurface must be constructed with at least one patch.');\n }\n\n $geometryType = static::containedGeometryType();\n\n foreach ($patches as $patch) {\n if (! $patch instanceof $geometryType) {\n throw GeometryException::unexpectedGeometryType($geometryType, $patch);\n }\n }\n\n self::getDimensions($patches, $is3D, $isMeasured, $srid);\n\n $polyhedralSurface = new static(false, $is3D, $isMeasured, $srid);\n $polyhedralSurface->patches = array_values($patches);\n\n return $polyhedralSurface;\n }", "title": "" }, { "docid": "934e28cffc9cf7a8a6d95ea2e52259c5", "score": "0.44175318", "text": "function getN() { \n return $this->n; \n }", "title": "" }, { "docid": "0eb6a1a8b71c4194cdb6a538eeef9aff", "score": "0.44065052", "text": "function getEntry($n){\n\t\treturn $this->data[$n];\n\t}", "title": "" }, { "docid": "fd1f87c9993a3d41169ceb8777098254", "score": "0.43844178", "text": "public static function get($n)\n {\n return 1;\n }", "title": "" }, { "docid": "93df87d56f53faef92b855c42078f0d1", "score": "0.4381471", "text": "public function setPatch($var)\n {\n GPBUtil::checkEnum($var, \\Eolymp\\Judge\\UpdateParticipantInput_Patch::class);\n $this->patch = $var;\n\n return $this;\n }", "title": "" }, { "docid": "066ffb788878aaf7c98799bb5cae31b7", "score": "0.43349463", "text": "public function getPatchversionList(){\n return $this->_get(12);\n }", "title": "" }, { "docid": "8d0e7071129263f89342a21003d5e24a", "score": "0.4327506", "text": "public function nth( $n );", "title": "" }, { "docid": "d3e9208202dbd3576094f9e5c757c961", "score": "0.43193218", "text": "public function get($index)\r\n\t{\r\n\t\tif(isset($this->_layers[$index])) {\r\n\t\t\treturn $this->_layers[$index];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "2c41b354b57f9b276638068d3da48982", "score": "0.42908642", "text": "public function getPanNumber()\n {\n return $this->panNumber;\n }", "title": "" }, { "docid": "64ee42414d4bbbe9e105ed4ca9caf9f8", "score": "0.42472613", "text": "public static function getNew($n){\n return Anketa::whereNotNull('photo_id')\n ->orderBy('created_at', 'desc')\n ->take($n)\n ->get();\n }", "title": "" }, { "docid": "ab492f87a5a98dad6e00d3dd41759d66", "score": "0.4244484", "text": "public function getNthDimension(int $d): float;", "title": "" }, { "docid": "8735eab8fb504da0186b8edafdc8481f", "score": "0.42193872", "text": "public static function incrementPatchLevel() {\n\t\tself::$patch_level++;\n\t}", "title": "" }, { "docid": "cb45bbc8f30093203eb1ecebd0df5c33", "score": "0.42076075", "text": "public function getLayer()\n {\n return $this->layer;\n }", "title": "" }, { "docid": "1b4aa0db8eca4f2edd15a6ce06bb8d22", "score": "0.41284546", "text": "public function getSurface()\n {\n return $this->surface;\n }", "title": "" }, { "docid": "ef8b5a4897dbd94a0f21f1806dc9cfe3", "score": "0.4115007", "text": "public function offset($n)\n\t{\n\t\t$this->offset = $n;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "92ad0d55322a01d38c2dea70e59b7cdd", "score": "0.4106096", "text": "public function getLot(){\n\t\treturn $this->_mLot;\n\t}", "title": "" }, { "docid": "92ad0d55322a01d38c2dea70e59b7cdd", "score": "0.4106096", "text": "public function getLot(){\n\t\treturn $this->_mLot;\n\t}", "title": "" }, { "docid": "6bc941da0be738e784ecb1889eec2458", "score": "0.4094654", "text": "public function repeat($n)\n {\n return $this->times($n);\n }", "title": "" }, { "docid": "087d09f1b9627a981476b59a7b0dc859", "score": "0.4088016", "text": "public function getRadix()\n {\n return $this->readOneof(6);\n }", "title": "" }, { "docid": "083367b88384971aa51790013fc5a430", "score": "0.4087841", "text": "public function getWrapTile() {\r\n return $this->wrapTile;\r\n }", "title": "" }, { "docid": "ef35d18b9f8a944f416d591eb8dee4fe", "score": "0.40835184", "text": "public function setN($var)\n {\n GPBUtil::checkInt32($var);\n $this->n = $var;\n\n return $this;\n }", "title": "" }, { "docid": "cf79cbc72a25b2249b8a68c810113f95", "score": "0.4082913", "text": "public function getLayerTemplate()\n {\n\t\treturn $this->getTemplateGroup('srl_');\n }", "title": "" }, { "docid": "0b9df08e07dc33a09fe42987603d3c3a", "score": "0.4067303", "text": "public function getRevision()\n {\n return $this->decorated->getRevision();\n }", "title": "" }, { "docid": "093b34505650d5c5f5386a74428c3d33", "score": "0.40662917", "text": "public function getSurfaceID() {\n\t\treturn $this->_surface_id;\n\t}", "title": "" }, { "docid": "b37249bd479fd040d1f4a91bc205f5bc", "score": "0.40612224", "text": "public static function findNumberPlate($numberPlate)\n\t{\n\t\treturn static::where(\"numberPlate\",$numberPlate)->first();\n\t}", "title": "" }, { "docid": "5d0f0efa91e16b42dfd4d533bd587794", "score": "0.4027357", "text": "public static function getNumber($n){\n\t\treturn number_format($n, 2);\n\t}", "title": "" }, { "docid": "64f85244d448dab281a095f381bd96e5", "score": "0.4024932", "text": "public function get_stock_extension_spec()\n {\n return (int)$this->current_stock_r->ID;\n }", "title": "" }, { "docid": "d984a2a7f0d471047d7a4570b90e5d4b", "score": "0.40148848", "text": "public function getRowNumber() {\r\n\t\treturn $this->rowNumber;\r\n\t}", "title": "" }, { "docid": "a0ce770e9f7c7dc2963cc401124857e4", "score": "0.39859697", "text": "public function getNumber_person_recipe()\r\n {\r\n return $this->number_person_recipe;\r\n }", "title": "" }, { "docid": "9accc1bee509cfb8d206dbee1cf99c5a", "score": "0.3985329", "text": "public function getRemovedPatches(): array\n {\n return $this->removedPatches;\n }", "title": "" }, { "docid": "c68ff62346309c576b549786ecfae451", "score": "0.3984519", "text": "public function setPatch($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Eolymp\\Atlas\\UpdateSolutionInput\\Patch::class);\n $this->patch = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "461b7dd165eafc5fef59449f83acd3e6", "score": "0.39692658", "text": "public function offsetGet($index): mixed\n\t{\n\t\treturn $this->group[$index];\n\t}", "title": "" }, { "docid": "a846224302ed2959cdde19f401747ce6", "score": "0.395501", "text": "public function jpjNumberPlate()\n {\n $formats = static::toUpper(static::lexify(static::bothify(static::randomElement(static::$jpjNumberPlateFormats))));\n\n return $this->generator->parse($formats);\n }", "title": "" }, { "docid": "6388f1f4d9423b061801229f8eec85e0", "score": "0.39538923", "text": "public function get($n) {\n if (!is_int($n))\n throw new InvalidArgumentException(\"n must be an int\");\n if (array_key_exists($n - 1, $this->vector))\n return $this->vector[$n - 1];\n else\n return null;\n }", "title": "" }, { "docid": "32e43e2a9df716a7b9c223c8e517ed19", "score": "0.39412746", "text": "public function setPatch($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Eolymp\\Ranker\\UpdateScoreboardColumnInput\\Patch::class);\n $this->patch = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "0c9c22db6666ede05ead954094365efc", "score": "0.39370522", "text": "public function getByIndex($index)\n {\n if ($index === 0) return $this->darkGray;\n if ($index === 1) return $this->midColor;\n if ($index === 2) return $this->lightGray;\n if ($index === 3) return $this->lightColor;\n if ($index === 4) return $this->darkColor;\n return null;\n }", "title": "" }, { "docid": "56fb79e90fc1f8e3aa7765f92f4e35b5", "score": "0.3933658", "text": "public function getShipmentNumber(){\n\t\treturn $this->_mShipmentNumber;\n\t}", "title": "" }, { "docid": "b217d0823eac75289f6dc12b6175dc50", "score": "0.39323676", "text": "public function getPartion()\n {\n return $this->partion;\n }", "title": "" }, { "docid": "9852a99e33771846009c9e5c24836122", "score": "0.392782", "text": "public function getPrintedNote()\n\t{\n\t\treturn $this->printed_note;\n\t}", "title": "" }, { "docid": "ab722c50ed5c5f539264e54f09be25ea", "score": "0.3919059", "text": "public function getLoop($index) {\n\t\treturn $this->loops[$index];\n\t}", "title": "" }, { "docid": "66f327a65030120025dad1121e509443", "score": "0.39138678", "text": "public function patch_day()\n {\n return $this->belongsTo(PatchDay::class);\n }", "title": "" }, { "docid": "603768f644416a753a24f95d301753f2", "score": "0.39132482", "text": "public function getResourcePack(): TerrainTextures\n {\n return $this->terrainTextures;\n }", "title": "" }, { "docid": "af8530f9201be18b0b3eb97c2a38a138", "score": "0.39115438", "text": "public function getMinSurface()\n {\n return $this->minSurface;\n }", "title": "" }, { "docid": "af8530f9201be18b0b3eb97c2a38a138", "score": "0.39115438", "text": "public function getMinSurface()\n {\n return $this->minSurface;\n }", "title": "" }, { "docid": "f5b24735077d290a975ce573553b6778", "score": "0.39099053", "text": "public function getLineNo ()\n\t{\n\t\treturn $this->lineNo;\n\t}", "title": "" }, { "docid": "f751d4d855b9d7597e25a12463d5b9d1", "score": "0.38872287", "text": "public function getRefNumber()\n {\n return $this->refNumber;\n }", "title": "" }, { "docid": "f751d4d855b9d7597e25a12463d5b9d1", "score": "0.38872287", "text": "public function getRefNumber()\n {\n return $this->refNumber;\n }", "title": "" }, { "docid": "f751d4d855b9d7597e25a12463d5b9d1", "score": "0.38872287", "text": "public function getRefNumber()\n {\n return $this->refNumber;\n }", "title": "" }, { "docid": "d0149dd342fb78bcb4a77dda597c073a", "score": "0.3878702", "text": "public function getRecit3()\n {\n return $this->recit3;\n }", "title": "" }, { "docid": "0704b07c8a813f36cf6060779b88517d", "score": "0.3877862", "text": "public function getRowNum()\n {\n return $this->rowNum;\n }", "title": "" }, { "docid": "8991e80f1c3861115d0109b6f2d16e9b", "score": "0.38770542", "text": "protected function getPatchFields(): array\n {\n return $this->getPostFields();\n }", "title": "" }, { "docid": "955a2315709df70177cea08d80d9b710", "score": "0.387441", "text": "public function get_pr(){\n\t\treturn ($this -> _c) * 3;\n\t}", "title": "" }, { "docid": "9d1676aa2e2da0a8d292d7b56129ff6c", "score": "0.38718015", "text": "public function getMinor()\n {\n return $this->minor;\n }", "title": "" }, { "docid": "9d1676aa2e2da0a8d292d7b56129ff6c", "score": "0.38718015", "text": "public function getMinor()\n {\n return $this->minor;\n }", "title": "" }, { "docid": "26506589787849f13da29e0bfeffb2eb", "score": "0.3862553", "text": "public static function getNbPiece () {\n return self :: $nbPiece; \n }", "title": "" }, { "docid": "d2b8695e914fe966e01413f71d20f033", "score": "0.3851078", "text": "public function getShipmentLineItem()\n {\n return $this->shipmentLineItem;\n }", "title": "" }, { "docid": "0716e9edce8379b20098d3691b6fea42", "score": "0.38416764", "text": "protected function nth_logged_line($n)\n {\n $lines = file(static::$LOGFILE_PATH);\n if ($n < 1 || $n > count($lines)) {\n throw new InvalidArgumentException(\"$n: bad line index\");\n }\n return $lines[$n - 1];\n }", "title": "" }, { "docid": "3dfaef10cb67b5e22f866d5891de4114", "score": "0.38346502", "text": "public function getRevision()\n {\n return (null !== $this->getDraft()) ? $this->getDraft()->getRevision() : parent::getRevision();\n }", "title": "" }, { "docid": "a19b65e4f68a9867ebb5322666e320a5", "score": "0.38327715", "text": "public function getPohdnbr()\n {\n return $this->pohdnbr;\n }", "title": "" }, { "docid": "3acbf422b5344ee25b42ebc1aa382e9e", "score": "0.3832555", "text": "public function getThirdLine()\n\t{\n\t\treturn $this->third;\n\t}", "title": "" }, { "docid": "93b8b1dbee7a9f2505557d685c6ad96e", "score": "0.3825815", "text": "public function getNumber()\n\t{\n\t\treturn $this->number;\n\t}", "title": "" }, { "docid": "2036d9b9ebbfda609b2952d15c6522cb", "score": "0.38243085", "text": "public function getImageNumber()\n {\n return $this->imageNumber;\n }", "title": "" }, { "docid": "39a0564728873c596431a282673c7f56", "score": "0.38146776", "text": "public function getRepeat()\n {\n return $this->getChild('repeat');\n }", "title": "" }, { "docid": "9bbef9de1d225dfc514ee41594fb51eb", "score": "0.3813951", "text": "public function getRefNumber()\n\t{\n\t\treturn $this->get('RefNumber');\n\t}", "title": "" }, { "docid": "9bbef9de1d225dfc514ee41594fb51eb", "score": "0.3813951", "text": "public function getRefNumber()\n\t{\n\t\treturn $this->get('RefNumber');\n\t}", "title": "" }, { "docid": "1fe5d5ac18d4aa3b725422f94d751d2d", "score": "0.38110003", "text": "public function get($index)\n {\n return $this->_cubeArray[$index];\n }", "title": "" }, { "docid": "9b5ce7224307e11ee7fb5958d7e91ad7", "score": "0.3803677", "text": "public function getReferenceNumber() {\n return $this->referenceNumber;\n }", "title": "" }, { "docid": "9b5ce7224307e11ee7fb5958d7e91ad7", "score": "0.3803677", "text": "public function getReferenceNumber() {\n return $this->referenceNumber;\n }", "title": "" }, { "docid": "9b5ce7224307e11ee7fb5958d7e91ad7", "score": "0.3803677", "text": "public function getReferenceNumber() {\n return $this->referenceNumber;\n }", "title": "" }, { "docid": "fc4de8a8a5221aa380613b785f637e34", "score": "0.37974447", "text": "public function getPhoneNr()\n {\n return $this->PhoneNr;\n }", "title": "" }, { "docid": "0251010df8e891bd22625ba596417909", "score": "0.37920552", "text": "public function getFlightRefNumberRPHList()\n {\n return $this->flightRefNumberRPHList;\n }", "title": "" }, { "docid": "0fb60596faaac1f4d018d3b911130268", "score": "0.37912712", "text": "public function nth($n)\n {\n $nodes = array();\n\n foreach ($this as $key => $node) {\n if ($key == 0) {\n continue;\n }\n\n if ($key % $n == 0) {\n $nodes[] = $node;\n }\n }\n\n return new self($nodes);\n }", "title": "" }, { "docid": "3e51b702323cc725f729a47010287fb7", "score": "0.37909296", "text": "function slash_rsegment($n, $where = 'trailing')\n\t{\n\t\treturn $this->_slash_segment($n, $where, 'rsegment');\n\t}", "title": "" }, { "docid": "cc40ff0d5880ebff94988880367453cd", "score": "0.3786649", "text": "public function getNumber()\n {\n return $this->number;\n }", "title": "" }, { "docid": "a072b92e6d576937f05c5d9ef24ba406", "score": "0.3784184", "text": "protected function getPatchDetails($patch)\n\t\t{\n\t\t\tif($patch == '')\n\t\t\t\tthrow new Exception('No patch specified.');\n\t\t\t\n\t\t\t$match = preg_match('/^([0-9]*)-([0-9]*)-([a-z]*).sql$/', $patch, $matches);\n\n\t\t\tif(!$match)\n\t\t\t\tthrow new Exception('Invalid patch (' . $patch . ')');\n\n\t\t\t$datum = substr($matches[1], 0, 4) . '-' . substr($matches[1], 4, 2) . '-' . substr($matches[1], 6, 2);\n\t\t\t$details = array('date' => $datum, 'name' => $matches[1] . '-' . $matches[2], 'table' => $matches[3], 'filename' => $matches[0]);\n\n\t\t\t$file = fopen(joinDirStrings($this->updateLocation, $patch), 'r');\n\t\t\t$line = fgets($file);\n\t\t\tfclose($file);\t\t\t\n\n\t\t\tif(substr($line, 0, 2) == '--')\n\t\t\t\t$details['description'] = trim(substr($line, 2));\n\t\t\telse\n\t\t\t\t$details['description'] = 'Update voor tabel ' . $details['table'];\n\n\t\t\treturn $details;\n\t\t}", "title": "" }, { "docid": "916f89d8f503ffc86a4096a651aebcfe", "score": "0.3778274", "text": "public function getPsnId () {\n return $this->psnId;\n }", "title": "" }, { "docid": "538e670e2a5d1dfe6e2a03cbdda003dc", "score": "0.37753022", "text": "function getTriangle($triangleIndex) {\n return ($triangleIndex * ($triangleIndex + 1)) / 2;\n}", "title": "" }, { "docid": "a3d46ca606df8bc6b44965f486c51097", "score": "0.37731972", "text": "public function getZypper()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "29c0dcb537995f18d76f40e387fa87a5", "score": "0.3769987", "text": "protected function getRevision(): VersionComponent\n {\n return $this->versionMetaData['revision'];\n }", "title": "" }, { "docid": "ad4f23f1080f292356d7f08138baac3e", "score": "0.3765766", "text": "public function getRPH()\n {\n return $this->rPH;\n }", "title": "" }, { "docid": "ad4f23f1080f292356d7f08138baac3e", "score": "0.3765766", "text": "public function getRPH()\n {\n return $this->rPH;\n }", "title": "" }, { "docid": "8c67c9770f41cf581c8723364e80dfd4", "score": "0.37616518", "text": "protected function getGeometry($index)\n {\n if (!isset($this->geometries[$index])) {\n throw new ShapefileException(Shapefile::ERR_INPUT_GEOMETRY_INDEX_NOT_VALID, $index);\n }\n return $this->geometries[$index];\n }", "title": "" }, { "docid": "dad04456359cd5cefa3478dfd6ff7e94", "score": "0.37588635", "text": "public function getNumber()\n {\n return $this->number;\n }", "title": "" } ]
bb9c66bebca10308b0d01f82d8bdbbce
/==================================================================\ Copyright 2005 Arca Solutions, Inc. All Rights Reserved. This file may not be redistributed in whole or part. eDirectory is licensed on a perdomain basis. eDirectory IS NOT FREE SOFTWARE | \================================================================== FILE: /functions/image_funct.php
[ { "docid": "7acf67396b58f224d6e21d3dfa0b313b", "score": "0.0", "text": "function image_getNewDimension($maxW, $maxH, $oldW, $oldH, &$newW, &$newH) {\n\t\tif (($oldW <= $maxW) && ($oldH <= $maxH)) { // without resize\n\t\t\t$newW = $oldW;\n\t\t\t$newH = $oldH;\n\t\t} else { // with resize\n\t\t\tif (($maxW / $oldW) <= ($maxH / $oldH)) { // resize from width\n\t\t\t\t$newW = $oldW * ($maxW / $oldW);\n\t\t\t\t$newH = $oldH * ($maxW / $oldW);\n\t\t\t} elseif (($maxW / $oldW) > ($maxH / $oldH)) { // resize from height\n\t\t\t\t$newW = $oldW * ($maxH / $oldH);\n\t\t\t\t$newH = $oldH * ($maxH / $oldH);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "6c0e7ae718bccd9bba1eb0556510f5ed", "score": "0.74727935", "text": "function getImage();", "title": "" }, { "docid": "24488ecfa822c3ea14a84d7297d64566", "score": "0.7436464", "text": "public function image();", "title": "" }, { "docid": "f05fe08ec5971756ad4e1166d4e41373", "score": "0.7298839", "text": "public function getImage( );", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.71268475", "text": "public function getImage();", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.71268475", "text": "public function getImage();", "title": "" }, { "docid": "4cd4533c5c0dc906424a8fb1bd87bb49", "score": "0.7122444", "text": "function imageIco($images,$filename=\"\")\r\n{\r\n\r\nif(is_array($images))\r\n{\r\n$ImageCount=count($images);\r\n$Image=$images;\r\n}\r\nelse\r\n{\r\n$Image[0]=$images;\r\n$ImageCount=1;\r\n};\r\n\r\n\r\n$WriteToFile=false;\r\n\r\nif($filename!=\"\")\r\n{\r\n$WriteToFile=true;\r\n};\r\n\r\n\r\n$ret=\"\";\r\n\r\n$ret.=jpexs_inttoword(0); //PASSWORD\r\n$ret.=jpexs_inttoword(1); //SOURCE\r\n$ret.=jpexs_inttoword($ImageCount); //ICONCOUNT\r\n\r\n\r\nfor($q=0;$q<$ImageCount;$q++)\r\n{\r\n$img=$Image[$q];\r\n\r\n$Width=imagesx($img);\r\n$Height=imagesy($img);\r\n\r\n$ColorCount=imagecolorstotal($img);\r\n\r\n$Transparent=imagecolortransparent($img);\r\n$IsTransparent=$Transparent!=-1;\r\n\r\n\r\nif($IsTransparent) $ColorCount--;\r\n\r\nif($ColorCount==0) {$ColorCount=0; $BitCount=24;};\r\nif(($ColorCount>0)and($ColorCount<=2)) {$ColorCount=2; $BitCount=1;};\r\nif(($ColorCount>2)and($ColorCount<=16)) { $ColorCount=16; $BitCount=4;};\r\nif(($ColorCount>16)and($ColorCount<=256)) { $ColorCount=0; $BitCount=8;};\r\n\r\n\r\n\r\n\r\n\r\n//ICONINFO:\r\n$ret.=jpexs_inttobyte($Width);//\r\n$ret.=jpexs_inttobyte($Height);//\r\n$ret.=jpexs_inttobyte($ColorCount);//\r\n$ret.=jpexs_inttobyte(0);//RESERVED\r\n\r\n$Planes=0;\r\nif($BitCount>=8) $Planes=1;\r\n\r\n$ret.=jpexs_inttoword($f,$Planes);//PLANES\r\nif($BitCount>=8) $WBitCount=$BitCount;\r\nif($BitCount==4) $WBitCount=0;\r\nif($BitCount==1) $WBitCount=0;\r\n$ret.=jpexs_inttoword($WBitCount);//BITS\r\n\r\n$Zbytek=(4-($Width/(8/$BitCount))%4)%4;\r\n$ZbytekMask=(4-($Width/8)%4)%4;\r\n\r\n$PalSize=0;\r\n\r\n$Size=40+($Width/(8/$BitCount)+$Zbytek)*$Height+(($Width/8+$ZbytekMask) * $Height);\r\nif($BitCount<24)\r\n $Size+=pow(2,$BitCount)*4;\r\n$IconId=1;\r\n$ret.=jpexs_inttodword($Size); //SIZE\r\n$OffSet=6+16*$ImageCount+$FullSize;\r\n$ret.=jpexs_inttodword(6+16*$ImageCount+$FullSize);//OFFSET\r\n$FullSize+=$Size;\r\n//-------------\r\n\r\n};\r\n\r\n\r\nfor($q=0;$q<$ImageCount;$q++)\r\n{\r\n$img=$Image[$q];\r\n$Width=imagesx($img);\r\n$Height=imagesy($img);\r\n$ColorCount=imagecolorstotal($img);\r\n\r\n$Transparent=imagecolortransparent($img);\r\n$IsTransparent=$Transparent!=-1;\r\n\r\nif($IsTransparent) $ColorCount--;\r\nif($ColorCount==0) {$ColorCount=0; $BitCount=24;};\r\nif(($ColorCount>0)and($ColorCount<=2)) {$ColorCount=2; $BitCount=1;};\r\nif(($ColorCount>2)and($ColorCount<=16)) { $ColorCount=16; $BitCount=4;};\r\nif(($ColorCount>16)and($ColorCount<=256)) { $ColorCount=0; $BitCount=8;};\r\n\r\n\r\n\r\n//ICONS\r\n$ret.=jpexs_inttodword(40);//HEADSIZE\r\n$ret.=jpexs_inttodword($Width);//\r\n$ret.=jpexs_inttodword(2*$Height);//\r\n$ret.=jpexs_inttoword(1); //PLANES\r\n$ret.=jpexs_inttoword($BitCount); //\r\n$ret.=jpexs_inttodword(0);//Compress method\r\n\r\n\r\n$ZbytekMask=($Width/8)%4;\r\n\r\n$Zbytek=($Width/(8/$BitCount))%4;\r\n$Size=($Width/(8/$BitCount)+$Zbytek)*$Height+(($Width/8+$ZbytekMask) * $Height);\r\n\r\n$ret.=jpexs_inttodword($Size);//SIZE\r\n\r\n$ret.=jpexs_inttodword(0);//HPIXEL_M\r\n$ret.=jpexs_inttodword(0);//V_PIXEL_M\r\n$ret.=jpexs_inttodword($ColorCount); //UCOLORS\r\n$ret.=jpexs_inttodword(0); //DCOLORS\r\n//---------------\r\n\r\n\r\n$CC=$ColorCount;\r\nif($CC==0) $CC=256;\r\n\r\nif($BitCount<24)\r\n{\r\n $ColorTotal=imagecolorstotal($img);\r\n if($IsTransparent) $ColorTotal--;\r\n\r\n for($p=0;$p<$ColorTotal;$p++)\r\n {\r\n $color=imagecolorsforindex($img,$p);\r\n $ret.=jpexs_inttobyte($color[\"blue\"]);\r\n $ret.=jpexs_inttobyte($color[\"green\"]);\r\n $ret.=jpexs_inttobyte($color[\"red\"]);\r\n $ret.=jpexs_inttobyte(0); //RESERVED\r\n };\r\n\r\n $CT=$ColorTotal;\r\n for($p=$ColorTotal;$p<$CC;$p++)\r\n {\r\n $ret.=jpexs_inttobyte(0);\r\n $ret.=jpexs_inttobyte(0);\r\n $ret.=jpexs_inttobyte(0);\r\n $ret.=jpexs_inttobyte(0); //RESERVED\r\n };\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\nif($BitCount<=8)\r\n{\r\n\r\n for($y=$Height-1;$y>=0;$y--)\r\n {\r\n $bWrite=\"\";\r\n for($x=0;$x<$Width;$x++)\r\n {\r\n $color=imagecolorat($img,$x,$y);\r\n if($color==$Transparent)\r\n $color=imagecolorexact($img,0,0,0);\r\n if($color==-1) $color=0;\r\n if($color>pow(2,$BitCount)-1) $color=0;\r\n\r\n $bWrite.=jpexs_decbinx($color,$BitCount);\r\n if(strlen($bWrite)==8)\r\n {\r\n $ret.=jpexs_inttobyte(bindec($bWrite));\r\n $bWrite=\"\";\r\n };\r\n };\r\n\r\n if((strlen($bWrite)<8)and(strlen($bWrite)!=0))\r\n {\r\n $sl=strlen($bWrite);\r\n for($t=0;$t<8-$sl;$t++)\r\n $sl.=\"0\";\r\n $ret.=jpexs_inttobyte(bindec($bWrite));\r\n };\r\n for($z=0;$z<$Zbytek;$z++)\r\n $ret.=jpexs_inttobyte(0);\r\n };\r\n};\r\n\r\n\r\n\r\nif($BitCount>=24)\r\n{\r\n for($y=$Height-1;$y>=0;$y--)\r\n {\r\n for($x=0;$x<$Width;$x++)\r\n {\r\n $color=imagecolorsforindex($img,imagecolorat($img,$x,$y));\r\n $ret.=jpexs_inttobyte($color[\"blue\"]);\r\n $ret.=jpexs_inttobyte($color[\"green\"]);\r\n $ret.=jpexs_inttobyte($color[\"red\"]);\r\n if($BitCount==32)\r\n $ret.=jpexs_inttobyte(0);//Alpha for ICO_XP_COLORS\r\n };\r\n for($z=0;$z<$Zbytek;$z++)\r\n $ret.=jpexs_inttobyte(0);\r\n };\r\n};\r\n\r\n\r\n//MASK\r\n\r\n for($y=$Height-1;$y>=0;$y--)\r\n {\r\n $byteCount=0;\r\n $bOut=\"\";\r\n for($x=0;$x<$Width;$x++)\r\n {\r\n if(($Transparent!=-1)and(imagecolorat($img,$x,$y)==$Transparent))\r\n {\r\n $bOut.=\"1\";\r\n }\r\n else\r\n {\r\n $bOut.=\"0\";\r\n };\r\n };\r\n for($p=0;$p<strlen($bOut);$p+=8)\r\n {\r\n $byte=bindec(substr($bOut,$p,8));\r\n $byteCount++;\r\n $ret.=jpexs_inttobyte($byte);\r\n };\r\n $Zbytek=$byteCount%4;\r\n for($z=0;$z<$Zbytek;$z++)\r\n {\r\n $ret.=jpexs_inttobyte(0xff);\r\n };\r\n };\r\n\r\n//------------------\r\n\r\n};//q\r\n\r\n\r\n\r\n\r\n\r\nif($WriteToFile)\r\n{\r\n $f=fopen($filename,\"w\");\r\n fwrite($f,$ret);\r\n fclose($f);\r\n}\r\nelse\r\n{\r\n echo $ret;\r\n};\r\n\r\n}", "title": "" }, { "docid": "872bb8d63495ec318e6592c4c2f5d7cd", "score": "0.7084433", "text": "function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n $image = '<img src=\"' . tep_output_string($src) . '\" border=\"0\" alt=\"' . tep_output_string($alt) . '\"';\n\n if (tep_not_null($alt)) {\n $image .= ' title=\" ' . tep_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && tep_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = (int)$image_size[0] * $ratio;\n } elseif (tep_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = (int)$image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = (int)$image_size[0];\n $height = (int)$image_size[1];\n\n// delete r8 --------------------------------------------------------------------------------------\n } elseif ($image_size[0] > $image_size[1]) {\n // 画像が横長の場合\n $ratio = $width / $image_size[0];\n $oheight = $height;\n $height = $image_size[1] * $ratio;\n if ($oheight > $height) {\n $vspace = ($oheight - $height)/2;\n $image .= ' vspace=\"' . intval($vspace) . '\"';\n }\n } else {\n // 画像が縦長の場合\n $ratio = $height / $image_size[1];\n $owidth = $width;\n $width = $image_size[0] * $ratio;\n if ($owidth > $width) {\n $hspace = ($owidth - $width)/2;\n $image .= ' hspace=\"' . intval($hspace) . '\"';\n }\n// ---------------------------------------------------------------------------------- delete r8_eof\n\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (tep_not_null($width) && tep_not_null($height)) {\n $image .= ' width=\"' . tep_output_string($width) . '\" height=\"' . tep_output_string($height) . '\"';\n }\n\n if (tep_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "title": "" }, { "docid": "197205856537403e8c83e26c4ade889f", "score": "0.70353895", "text": "abstract public function getImage();", "title": "" }, { "docid": "103df7d37efe36621f9191c0845c36d3", "score": "0.67926407", "text": "function EscalarImagen($ancho, $alto, $imagen, $guardar, $calidad) {\n $image = new Zebra_Image();\n\n // indicate a source image (a GIF, PNG or JPEG file)\n $image -> source_path = $imagen;\n\n // indicate a target image\n // note that there's no extra property to set in order to specify the target\n // image's type -simply by writing '.jpg' as extension will instruct the script\n // to create a 'jpg' file\n $image -> target_path = $guardar;\n\n // since in this example we're going to have a jpeg file, let's set the output\n // image's quality\n $image -> jpeg_quality = $calidad;\n\n // some additional properties that can be set\n // read about them in the documentation\n $image -> preserve_aspect_ratio = true;\n $image -> enlarge_smaller_images = true;\n $image -> preserve_time = true;\n\n // resize the image to exactly 100x100 pixels by using the \"crop from center\" method\n // (read more in the overview section or in the documentation)\n // and if there is an error, check what the error is about\n if (!$image -> resize($ancho, $alto, ZEBRA_IMAGE_NOT_BOXED)) {\n\n // if there was an error, let's see what the error is about\n switch ($image->error) {\n\n case 1 :\n echo 'Source file could not be found!';\n break;\n case 2 :\n echo 'Source file is not readable!';\n break;\n case 3 :\n echo 'Could not write target file!';\n break;\n case 4 :\n echo 'Unsupported source file format!';\n break;\n case 5 :\n echo 'Unsupported target file format!';\n break;\n case 6 :\n echo 'GD library version does not support target file format!';\n break;\n case 7 :\n echo 'GD library is not installed!';\n break;\n }\n }\n}", "title": "" }, { "docid": "b5f6d31fdecff28cef775045df69a88e", "score": "0.6624599", "text": "function image($image_path, $width = 0, $height = 0)\r\r{\r\r $CI = &get_instance();\r\r\r\r if (!file_exists($image_path) || !is_file($image_path)) {\r\r $image_path = \"upload/noimage.png\";\r\r }\r\r\r\r if (!getimagesize($image_path)) {\r\r $image_path = \"upload/noimage.png\";\r\r }\r\r\r\r //The new generated filename we want\r\r $fileinfo = pathinfo($image_path);\r\r //Alternative image if file was not found\r\r if (!isset($fileinfo['extension'])) {\r\r $image_path = \"upload/noimage.png\";\r\r $fileinfo = pathinfo($image_path);\r\r }\r\r $new_image_path = $fileinfo['dirname'] . '/' . $fileinfo['filename'] . '_' . $width . 'x' . $height . '.' . $fileinfo['extension'];\r\r\r\r //The first time the image is requested\r\r //Or the original image is newer than our cache image\r\r if ((!file_exists($new_image_path)) || filemtime($new_image_path) < filemtime($image_path)) {\r\r $CI->load->library('image_lib');\r\r\r\r //The original sizes\r\r $original_size = getimagesize($image_path);\r\r $original_width = $original_size[0];\r\r $original_height = $original_size[1];\r\r $ratio = $original_width / $original_height;\r\r\r\r //The requested sizes\r\r $requested_width = $width;\r\r $requested_height = $height;\r\r\r\r //Initialising\r\r $new_width = 0;\r\r $new_height = 0;\r\r\r\r //Calculations\r\r if ($requested_width > $requested_height) {\r\r $new_width = $requested_width;\r\r $new_height = $new_width / $ratio;\r\r if ($requested_height == 0) {\r\r $requested_height = $new_height;\r\r }\r\r\r\r if ($new_height < $requested_height) {\r\r $new_height = $requested_height;\r\r $new_width = $new_height * $ratio;\r\r }\r\r\r\r } else {\r\r $new_height = $requested_height;\r\r $new_width = $new_height * $ratio;\r\r if ($requested_width == 0) {\r\r $requested_width = $new_width;\r\r }\r\r\r\r if ($new_width < $requested_width) {\r\r $new_width = $requested_width;\r\r $new_height = $new_width / $ratio;\r\r }\r\r }\r\r\r\r $new_width = ceil($new_width);\r\r $new_height = ceil($new_height);\r\r\r\r //Resizing\r\r $config = array();\r\r $config['image_library'] = 'gd2';\r\r $config['source_image'] = $image_path;\r\r $config['new_image'] = $new_image_path;\r\r $config['maintain_ratio'] = FALSE;\r\r $config['height'] = $new_height;\r\r $config['width'] = $new_width;\r\r $CI->image_lib->initialize($config);\r\r $CI->image_lib->resize();\r\r $CI->image_lib->clear();\r\r\r\r //Crop if both width and height are not zero\r\r if (($width != 0) && ($height != 0)) {\r\r $x_axis = floor(($new_width - $width) / 2);\r\r $y_axis = floor(($new_height - $height) / 2);\r\r\r\r //Cropping\r\r $config = array();\r\r $config['source_image'] = $new_image_path;\r\r $config['maintain_ratio'] = FALSE;\r\r $config['new_image'] = $new_image_path;\r\r $config['width'] = $width;\r\r $config['height'] = $height;\r\r $config['x_axis'] = $x_axis;\r\r $config['y_axis'] = $y_axis;\r\r $CI->image_lib->initialize($config);\r\r $CI->image_lib->crop();\r\r $CI->image_lib->clear();\r\r }\r\r }\r\r\r\r return $new_image_path;\r\r}", "title": "" }, { "docid": "80e01bddc6b92d0df333495ca460c6b1", "score": "0.66093147", "text": "function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {\n if (empty($src)) {\n return false;\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n $image = '<img src=\"' . tep_output_string($src) . '\" border=\"0\" alt=\"' . tep_output_string($alt) . '\"';\n\n if (tep_not_null($alt)) {\n $image .= ' title=\" ' . tep_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && tep_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (tep_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n }\n }\n\n if (tep_not_null($width)) {\n $image .= ' width=\"' . tep_output_string($width) . '\"';\n\t}\n\tif (tep_not_null($height)) {\n $image .= ' height=\"' . tep_output_string($height) . '\"';\n }\n\n if (tep_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "title": "" }, { "docid": "2dedbf42f8331b706f9d8ec4aebd9a8c", "score": "0.66074914", "text": "function api_image() {\n\t$para=para(func_get_args(),'q/80');\n\t$para->src=$_GET['src'];\n\t$src_file = cfg('folder.abs').$para->src;\n\t$debug = isset($_GET['debug']) ? $_GET['debug'] : NULL;\n\n\tif ( $debug) {\n\t\tprint_o($para,'$para',1);\n\t\techo 'source file location <em>'.$src_file.'</em><br />';\n\t}\n\n\t$srcTypes = NULL;\n\t$dstWidth = \\SG\\getFirst($para->w,$srcTypes[0]);\n\t$dstHeight = \\SG\\getFirst($para->h,$srcTypes[1]);\n\t$quality = $para->q;\n\t\n\tif ( file_exists($src_file) and is_file($src_file) ) $srcTypes = getimagesize($src_file);\n\telse {\n\t\tif ( $debug ) echo 'image file <em>'.$src_file.'</em> not exists.<br />';\n\t\telse {\n\t\t\tHeader('Content-type: image/jpeg');\n\t\t\t$im = @ImageCreate ($dstWidth, $dstHeight);\n\t\t\t$background_color = ImageColorAllocate ($im, 255, 255, 255);\n\t\t\t$text_color = ImageColorAllocate ($im, 233, 14, 91);\n\t\t\tImageString ($im, 2, round($dstWidth/2)-20, round($dstHeight/2)-8, 'no image', $text_color );\n\t\t\tImageJPEG ($im,NULL,160);\n\t\t\t@imagedestroy($im);\n\t\t}\n\t\treturn false;\n\t}\n\n\tif ( $debug ) print_o($srcTypes,'$srcTypes',1);\n\n\t$dstWidth = \\SG\\getFirst($para->w,$srcTypes[0]);\n\t$dstHeight = \\SG\\getFirst($para->h,$srcTypes[1]);\n\t$srcType = $srcTypes['mime'];\n\t$dstType = \\SG\\getFirst($para->dsttype,'jpg');\n\t\n\tif ( $debug ) echo 'destination type is <em>'.$dstType.'</em><br />';\n\n\t$srcImg = '<img src=\"'.url(q(),'src='.$para->src).'\">';\n\tif ( $debug ) echo 'image url is <em>'.htmlspecialchars($srcImg).'</em><br />';\n\n\tif (($srcType == \"image/jpeg\" or $srcType == \"image/pjpeg\") and function_exists(\"imagecreatefromjpeg\"))\n\t\t$handle = @imagecreatefromjpeg($src_file);\n\telse if ($srcType == \"image/png\" and function_exists(\"imagecreatefrompng\"))\n\t\t$handle = @imagecreatefrompng($src_file);\n\telse if ($srcType == \"image/gif\" and function_exists(\"imagecreatefromgif\") )\n\t\t$handle = @imagecreatefromgif($src_file);\n\telse {\n\t\tif ( $debug ) {\n\t\t\techo 'image type <em>'.$srcType.'</em> not support.<br />'.$srcImg.'<br />'._NL;\n\t\t} else __api_image_dumpFile($src_file);\n\t return false;\n }\n\tif (!$handle) {\n\t\tif ( $debug ) {\n\t\t\techo 'cannot create image handle.<br />'.$srcImg.'<br />'._NL;\n\t\t} else __api_image_dumpFile($src_file);\n\t\treturn false;\n\t}\n\n\tif ( !function_exists(\"imagecopyresampled\") or !function_exists(\"imagejpeg\") ) {\n\t\tif ( $debug ) {\n\t\t\techo \"function <b>imagecopyresampled</b> or <b>imagejpeg</b> not support.<br>$srcImg<br>\\n\";\n\t\t} else __api_image_dumpFile($src_file);\n\t\treturn false;\n\t}\n $srcWidth = @imagesx($handle);\n $srcHeight = @imagesy($handle);\n\n\n\t$newHandle = @imagecreatetruecolor($dstWidth, $dstHeight);\n\tif (!$newHandle) {\n\t\tif ( $debug ) {\n\t\t\techo \"function imagecreatetruecolor not support.<br>$srcImg<br>\\n\";\n\t\t} else __api_image_dumpFile($src_file);\n\t\treturn false;\n\t}\n\n\tif($srcHeight < $srcWidth) {\n\t $ratio = (double)($srcHeight / $dstHeight);\n\n\t $cpyWidth = round($dstWidth * $ratio);\n\t if ($cpyWidth > $srcWidth) {\n\t\t $ratio = (double)($srcWidth / $dstWidth);\n\t\t $cpyWidth = $srcWidth;\n\t\t $cpyHeight = round($dstHeight * $ratio);\n\t\t $xOffset = 0;\n\t\t $yOffset = round(($srcHeight - $cpyHeight) / 2);\n\t } else {\n\t\t $cpyHeight = $srcHeight;\n\t\t $xOffset = round(($srcWidth - $cpyWidth) / 2);\n\t\t $yOffset = 0;\n\t }\n\n\t} else {\n\t $ratio = (double)($srcWidth / $dstWidth);\n\n\t $cpyHeight = round($dstHeight * $ratio);\n\t if ($cpyHeight > $srcHeight) {\n\t\t $ratio = (double)($srcHeight / $dstHeight);\n\t\t $cpyHeight = $srcHeight;\n\t\t $cpyWidth = round($dstWidth * $ratio);\n\t\t $xOffset = round(($srcWidth - $cpyWidth) / 2);\n\t\t $yOffset = 0;\n\t } else {\n\t\t $cpyWidth = $srcWidth;\n\t\t $xOffset = 0;\n\t\t $yOffset = round(($srcHeight - $cpyHeight) / 2);\n\t }\n\t}\n\n\tif (!@imagecopyresampled($newHandle, $handle, 0, 0, $xOffset, $yOffset, $dstWidth, $dstHeight, $cpyWidth, $cpyHeight)) {\n\t\tif ( $debug ) {\n\t\t\techo \"imagecopyresampled not support.<br>$srcImg<br>\\n\";\n\t\t} else __api_image_dumpFile($src_file);\n\t\treturn false;\n\t}\n\t@imagedestroy($handle);\n\n\tif ( $debug ) {\n\t\techo _NL._NL.'<p><img src=\"'.url(q(),'src='.$para->src).'\"></p>'._NL._NL;\n\t\techo '<p><img src=\"'._URL.$para->src.'\"><br />source file is '.$src_file.'</p>'._NL._NL;\n\t\treturn true;\n\t}\n\n\tif ($dstType == \"png\") {\n\t\tHeader(\"Content-type: image/png\");\n\t\t@imagepng($newHandle);\n\t} else if ($dstType == \"jpg\") {\n\t\tHeader(\"Content-type: image/jpeg\");\n\t\t@imagejpeg($newHandle, \"\", $quality);\n\t} else if ($dstType == \"gif\") {\n\t\tHeader(\"Content-type: image/gif\");\n\t\t@imagegif($newHandle);\n\t} else {\n\t\t__api_image_dumpFile($src_file);\n\t\treturn false;\n\t}\n\t@imagedestroy($newHandle);\n\treturn true;\n\n}", "title": "" }, { "docid": "ccd23261348db30428485d0f932d667f", "score": "0.66037756", "text": "abstract public static function imageable(): array;", "title": "" }, { "docid": "5f24415c550c615057a0928adcc78883", "score": "0.6550118", "text": "abstract public function manipulate($img);", "title": "" }, { "docid": "9dfb50ae7517511e032dab0adc3f51c2", "score": "0.64919233", "text": "public function createImage();", "title": "" }, { "docid": "768b3924a0a42392e20e48fcddad0b09", "score": "0.6491717", "text": "function get_image(array $init){\r\n\r\n/*################ START - General ################*/\r\n\r\n // Define\r\n if( !defined('THEME') ){\r\n define( 'THEME', get_template_directory_uri() );\r\n }\r\n if( !defined('THEME_ROOT') ){\r\n define( 'THEME_ROOT', get_stylesheet_directory() );\r\n }\r\n if( !defined('THEME_DIRECTORY_PATH') ){\r\n define( 'THEME_DIRECTORY_PATH', '/images/' );\r\n }\r\n\r\n if( !defined('DEFAULT_SRC_FILE') ){\r\n define( 'DEFAULT_SRC_FILE', 'default.png' );\r\n }\r\n if( !defined('DEFAULT_SRC_LINK') ){\r\n define( 'DEFAULT_SRC_LINK', '' );\r\n }\r\n if( !defined('DEFAULT_PLACEHOLD') ){\r\n define( 'DEFAULT_PLACEHOLD', '350x150' );\r\n }\r\n if( !defined('DEFAULT_SIZE') ){\r\n define( 'DEFAULT_SIZE', '' );\r\n }\r\n\r\n if( !defined('DEFAULT_IMG_CLASS') ){\r\n define( 'DEFAULT_IMG_CLASS', 'nn-image' );\r\n }\r\n if( !defined('DEFAULT_IMG_ALT') ){\r\n define( 'DEFAULT_IMG_ALT', __('Image','NN-Funciton') );\r\n }\r\n if( !defined('DEFAULT_LINK_TARGET') ){\r\n define( 'DEFAULT_LINK_TARGET', '_self' );\r\n }\r\n\r\n if( !defined('DEFAULT_LINK_TITLE') ){\r\n define( 'DEFAULT_LINK_TITLE', __('Image Link','NN-Funciton') );\r\n }\r\n if( !defined('DEFAULT_LINK_CLASS') ){\r\n define( 'DEFAULT_LINK_CLASS', 'nn-image-link' );\r\n }\r\n if( !defined('ERROR_VALUE_NULL') ){\r\n define( 'ERROR_VALUE_NULL', __('Error - System: \"value\" need to be announced','NN-Funciton') );\r\n }\r\n if( !defined('WARRNING_FIELD_IS_EMPTY') ){\r\n define( 'WARRNING_FIELD_IS_EMPTY', __('Warrning - System: \"Field Array\" is not exist','NN-Funciton') );\r\n }\r\n\r\n if( !defined('WARRNING_REDUX_IS_EMPTY') ){\r\n define( 'WARRNING_REDUX_IS_EMPTY', __('Warrning - System: \"Redux Array\" is not exist','NN-Funciton') );\r\n }\r\n if( !defined('WARRNING_THUMBNAIL_IS_EMPTY') ){\r\n define( 'WARRNING_THUMBNAIL_IS_EMPTY', __('Warrning - System: \"Thumbnail Object\" is empty','NN-Funciton') );\r\n }\r\n\r\n\r\n // Vars\r\n $errorFlag = false; //error flag\r\n $errorMsg = ''; //error content\r\n $init_errorMsg = false; //error message trigger\r\n $imageStyle = '';\r\n $imageSrc = '';\r\n\r\n $init['errorMsg'] = '';\r\n $init['style'] = isset( $init['style'] ) ? $init['style'] : '';\r\n $init['link'] = isset( $init['link'] ) ? $init['link'] : '';\r\n $init['link_id'] = isset( $init['link_id'] ) ? $init['link_id'] : '';\r\n $init['wrap'] = isset( $init['wrap'] ) ? $init['wrap'] : '';\r\n\r\n\r\n if( $init['errorMsg'] ){\r\n $init_errorMsg = $init['errorMsg'];\r\n }\r\n\r\n\r\n $isRedux = false; // System -> Redux Flag\r\n $isField = false; // System -> Field Flag\r\n $isThumbnail = false; // System -> Thumbnail Flag\r\n $isUrl = false; // System -> Url Flag\r\n\r\n $defaultFlag = false;\r\n\r\n $goDefault = false; // if is true print all default.\r\n $printThumbnail = false; // if is true print the thumbnail of this page.\r\n\r\n/*################ END - General ################*/\r\n\r\n/*################ START - Define all options and vars ################*/\r\n\r\n/************IMAGE DEFINE************\r\n####################################*/\r\n\r\n\r\n if( $init['style'] ){\r\n $imageStyle = 'style=\"' . $init['style'] . '\"';\r\n }\r\n\r\n // Default Image Define\r\n if( empty( $init['default'] ) ){\r\n $defaultFlag = false;\r\n } else{\r\n $defaultFlag = $init['default'];\r\n }\r\n\r\n // Image Size Define\r\n if( empty( $init['size'] ) ){\r\n $imageSize = DEFAULT_SIZE;\r\n } else{\r\n $imageSize = $init['size'];\r\n }\r\n\r\n // Image Default Size PlaceHold.it\r\n if( empty( $init['placehold'] ) ){\r\n $defaultImageSize = DEFAULT_PLACEHOLD;\r\n } else{\r\n $defaultImageSize = $init['placehold'];\r\n }\r\n\r\n // Image Default Src Define\r\n if( empty( $init['default_src'] ) ){ // if default src not exist\r\n\r\n $defaultPath = THEME_ROOT.THEME_DIRECTORY_PATH.DEFAULT_SRC_FILE;\r\n if( file_exists( $defaultPath ) ){\r\n $imageDefaultSrc = THEME.THEME_DIRECTORY_PATH.DEFAULT_SRC_FILE;\r\n } else{\r\n if( DEFAULT_SRC_LINK == '' )\r\n $imageDefaultSrc = 'http://placehold.it/'.$defaultImageSize;\r\n else\r\n $imageDefaultSrc = DEFAULT_SRC_LINK;\r\n }\r\n\r\n }\r\n else{ // if default src exist\r\n if( filter_var( $init['default_src'],FILTER_VALIDATE_URL ) ){ // if default src is link\r\n $imageDefaultSrc = $init['default_src'];\r\n } else{ // if default src is file\r\n $defaultPath = THEME_ROOT.THEME_DIRECTORY_PATH.$init['default_src'];\r\n if( file_exists( $defaultPath ) ){\r\n $imageDefaultSrc = THEME.THEME_DIRECTORY_PATH.$init['default_src'];\r\n } else{\r\n if( DEFAULT_SRC_LINK == '' )\r\n $imageDefaultSrc = 'http://placehold.it/'.$defaultImageSize;\r\n else\r\n $imageDefaultSrc = DEFAULT_SRC_LINK;\r\n }\r\n }\r\n\r\n }\r\n\r\n // Image Default Alt Define\r\n if( empty( $init['default_alt'] ) ){\r\n $imageAlt = DEFAULT_IMG_ALT;\r\n } else{\r\n $imageAlt = $init['default_alt'];\r\n }\r\n\r\n // Image Class Define\r\n if( empty( $init['class'] ) ){\r\n $imageClass = DEFAULT_IMG_CLASS;\r\n } else{\r\n $imageClass = DEFAULT_IMG_CLASS.' '.$init['class'];\r\n }\r\n\r\n/************LINK DEFINE************\r\n####################################*/\r\n\r\n // Link Target Define\r\n if( empty( $init['link_target'] ) ){\r\n $linkTarget = DEFAULT_LINK_TARGET;\r\n } else{\r\n if( preg_match( '/(\\_self|\\_blank|\\_parent|\\_top)$/', $init['link_target'] ) ){ // check if link target is one of the regular targets\r\n $linkTarget = $init['link_target'];\r\n } else{\r\n $linkTarget = DEFAULT_LINK_TARGET;\r\n }\r\n }\r\n\r\n // Link Class Define\r\n if( empty( $init['link_class'] ) ){\r\n $linkClass = DEFAULT_LINK_CLASS;\r\n } else{\r\n $linkClass = DEFAULT_LINK_CLASS.' '.$init['link_class'];\r\n }\r\n\r\n // Link Title Define\r\n if( empty( $init['link_title'] ) ){\r\n $linkTitle = DEFAULT_LINK_TITLE;\r\n } else{\r\n $linkTitle = $init['link_title'];\r\n }\r\n\r\n\r\n/*################ END - Define all options and vars ################*/\r\n\r\n\r\n/*################ START ################*/\r\n\r\n if( empty( $init['value'] ) ){ // if Value is empty\r\n if( isset( $init['system'] ) && $init['system'] == 'thumbnail' ){\r\n $printThumbnail = true;\r\n }\r\n else{\r\n $goDefault = true;\r\n }\r\n } else{ // START -if Value is not empty\r\n\r\n if( !filter_var( $init['value'],FILTER_VALIDATE_URL ) && !is_numeric( $init['value'] ) ){ // START - If Value is NOT Link\r\n\r\n switch( $init['system'] ){\r\n case 'redux':\r\n $isRedux = true;\r\n break;\r\n\r\n case 'field':\r\n case 'acf':\r\n $isField = true;\r\n break;\r\n\r\n case 'thumbnail':\r\n $isThumbnail = true;\r\n $printThumbnail = true;\r\n break;\r\n\r\n case 'url':\r\n $isUrl = true;\r\n break;\r\n\r\n default: // default is Default image\r\n $goDefault = true;\r\n break;\r\n }\r\n if( $isField ){\r\n // Check if this Field Object is exists\r\n if( is_array( $init['value'] ) ){ // exists\r\n\r\n $imageField = $init['value'];\r\n\r\n if( $imageSize == '' || is_array( $imageSize )){ // if Size not announced\r\n $imageSrc = $imageField['url'];\r\n } else{ // if Size announced\r\n if( $imageField['sizes'][$imageSize] )\r\n $imageSrc = $imageField['sizes'][$imageSize];\r\n else\r\n $imageSrc = $imageField['url'];\r\n\r\n }\r\n\r\n } else{ // not exists\r\n $goDefault = true;\r\n $errorMsg .= '<p class=\"nn-warrning\">'.WARRNING_FIELD_IS_EMPTY.'</p>';\r\n }\r\n }\r\n\r\n else if( $isRedux ){\r\n // Check if this Redux Object is exists\r\n if( is_array( $init['value'] ) ){ // exists\r\n\r\n $imageRedux = $init['value'];\r\n\r\n if( $imageSize == ''){ // if Size not announced\r\n $imageSrc = $imageRedux['url'];\r\n } else{ // if Size announced\r\n $imageSrc_size = wp_get_attachment_image_src( $imageRedux['id'],$imageSize);\r\n if( $imageSrc_size[0] )\r\n $imageSrc = $imageSrc_size[0];\r\n else\r\n $imageSrc = $imageRedux['url'];\r\n }\r\n\r\n } else{ // not exists\r\n $goDefault = true;\r\n $errorMsg .= '<p class=\"nn-warrning\">'.WARRNING_REDUX_IS_EMPTY.'</p>';\r\n }\r\n\r\n }\r\n\r\n else if( $isThumbnail ){\r\n\r\n // Check if this Thumbnail Object is exists\r\n if( $init['value'] == new stdClass() ){ // not exists\r\n\r\n $goDefault = true;\r\n $errorMsg .= '<p class=\"nn-warrning\">'.WARRNING_THUMBNAIL_IS_EMPTY.'</p>';\r\n }\r\n else{ // exists\r\n\r\n }\r\n\r\n }\r\n\r\n else if( $isUrl ){\r\n $imageSrc = $init['value'];\r\n }\r\n\r\n } // END - If Value is NOT Link\r\n else if( is_numeric( $init['value'] ) ){ // START - If Value is ID\r\n\r\n $imageField = wp_get_attachment_image_src($init['value'], $imageSize, false);\r\n //$imageFieldObject = wp_get_attachment_metadata($init['value']);\r\n\r\n $imageSrc = $imageField[0];\r\n }\r\n else{ // START - If Value is Link\r\n\r\n $isUrl = true;\r\n $imageSrc = $init['value'];\r\n } // END - If Value is Link\r\n\r\n if( empty( $init['alt'] ) ){ // if Image Function Alt is NULL\r\n if( empty( $imageField['alt'] ) ){ // if Image Field Alt is NULL\r\n\r\n if( empty( $imageField['title'] ) ){ // if Image Field Title is NULL and Image Field Alt is NULL\r\n $imageAlt = $imageAlt;\r\n } else{ // if Image Field Title exist\r\n $imageAlt = $imageField['title'];\r\n }\r\n } else{ // if Image Field Alt exist\r\n $imageAlt = $imageField['alt'];\r\n }\r\n } else{ // if Image Function Alt is exist\r\n $imageAlt = $init['alt'];\r\n }\r\n\r\n } // END -if Value is not empty\r\n\r\n if( $printThumbnail ){ // if printThumbnail is true use thumbnail function\r\n if ( has_post_thumbnail() ) {\r\n return the_post_thumbnail();\r\n } else{\r\n $goDefault = true;\r\n }\r\n\r\n }\r\n if( !$goDefault ){ // if goDefault is false result -> As planned\r\n\r\n if( empty( $init['id'] ) ){\r\n $result = '<img src=\"'.$imageSrc.'\" class=\"'.$imageClass.'\" alt=\"'.$imageAlt.'\" '.$imageStyle.' />';\r\n } else{\r\n $result = '<img id=\"'.$init['id'].'\" src=\"'.$imageSrc.'\" class=\"'.$imageClass.'\" alt=\"'.$imageAlt.'\" '.$imageStyle.' />';\r\n }\r\n\r\n } // END - if goDefault is false\r\n else{ // if goDefault is true result -> default\r\n\r\n if( empty( $init['id'] ) ){\r\n $result = '<img src=\"'.$imageDefaultSrc.'\" class=\"'.$imageClass.'\" alt=\"'.$imageAlt.'\" '.$imageStyle.' />';\r\n }\r\n else{\r\n $result = '<img id=\"'.$init['id'].'\" src=\"'.$imageDefaultSrc.'\" class=\"'.$imageClass.'\" alt=\"'.$imageAlt.'\" '.$imageStyle.' />';\r\n }\r\n\r\n } // END - if goDefault is true\r\n\r\n if( $init['link'] ){ // if link exist\r\n if( $init['link_id'] ){\r\n $start_link = '<a id=\"'.$init['link_id'].'\" href=\"'.$init['link'].'\" class=\"'.$linkClass.'\" title=\"'.$linkTitle.'\" target=\"'.$linkTarget.'\">';\r\n } else{\r\n $start_link = '<a href=\"'.$init['link'].'\" class=\"'.$linkClass.'\" title=\"'.$linkTitle.'\" target=\"'.$linkTarget.'\">';\r\n }\r\n $end_link = '</a>';\r\n\r\n $result = $start_link.$result.$end_link;\r\n\r\n }\r\n\r\n if( $init['wrap'] ){ // if there Wrapper to this image tag\r\n\r\n $string = explode('></',$init['wrap'] );\r\n $step = 0;\r\n $new_string = '';\r\n\r\n foreach( $string as $value ){\r\n\r\n if( count($string) > $step){\r\n $new_string .= $value.'>';\r\n $new_string .= $result.'</';\r\n $result = '';\r\n }\r\n if( count($string) == ( $step+1 )){\r\n $new_string = substr($new_string, 0, -3);\r\n }\r\n $step++;\r\n };\r\n\r\n $result = $new_string;\r\n }\r\n\r\n if( $init_errorMsg ){ // if error message flat is true\r\n return $errorMsg;\r\n }\r\n else{ // if error message flat is false\r\n if( !$errorFlag ){\r\n if( ( !$defaultFlag ) && ( $imageSrc == '' ) ){ // if default flag is false and you need to go default\r\n return '';\r\n } else{\r\n return $result;\r\n }\r\n }\r\n }\r\n\r\n/*################ END ################*/\r\n\r\n}", "title": "" }, { "docid": "fe0d3dea804683f27ec44bb4df7f7d37", "score": "0.6488586", "text": "function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {\n\tif (empty($src) || $src == sysConfig::get('DIR_WS_TEMPLATE_IMAGES') || !file_exists(sysConfig::getDirFsCatalog() . $src)) return;\n\t// Set default image variable and code\n\t$image = '<img src=\"' . $src . '\"';\n\n\t// Don't calculate if the image is set to a \"%\" width\n\tif (strstr($width,'%') == false || strstr($height,'%') == false) {\n\t\t$dont_calculate = 0;\n\t} else {\n\t\t$dont_calculate = 1;\n\t}\n\n\t// Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)\n\tif (!strstr($image, 'pixel')) {\n\t\t$dont_calculate = 0;\n\t} else {\n\t\t$dont_calculate = 1;\n\t}\n\n\t// Do we calculate the image size?\n\tif (sysConfig::get('CONFIG_CALCULATE_IMAGE_SIZE') == 'true' && !$dont_calculate) {\n\n\t\t// Get the image's information\n\t\tif ($image_size = @getimagesize($src)) {\n\n\t\t\t$ratio = $image_size[1] / $image_size[0];\n\n\t\t\t// Set the width and height to the proper ratio\n\t\t\tif (!$width && $height) {\n\t\t\t\t$ratio = $height / $image_size[1];\n\t\t\t\t$width = intval($image_size[0] * $ratio);\n\t\t\t} elseif ($width && !$height) {\n\t\t\t\t$ratio = $width / $image_size[0];\n\t\t\t\t$height = intval($image_size[1] * $ratio);\n\t\t\t} elseif (!$width && !$height) {\n\t\t\t\t$width = $image_size[0];\n\t\t\t\t$height = $image_size[1];\n\t\t\t}\n\n\t\t\t// Scale the image if not the original size\n\t\t\tif ($image_size[0] != $width || $image_size[1] != $height) {\n\t\t\t\t$rx = $image_size[0] / $width;\n\t\t\t\t$ry = $image_size[1] / $height;\n\n\t\t\t\tif ($rx < $ry) {\n\t\t\t\t\t$width = intval($height / $ratio);\n\t\t\t\t} else {\n\t\t\t\t\t$height = intval($width * $ratio);\n\t\t\t\t}\n\n\t\t\t\t$image = '<img src=\"product_thumb.php?img='.$src.'&amp;w='.\n\t\t\t\ttep_output_string($width).'&amp;h='.tep_output_string($height).'\"';\n\t\t\t}\n\n\t\t} elseif (sysConfig::get('IMAGE_REQUIRED') == 'false') {\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t// Add remaining image parameters if they exist\n\tif ($width) {\n\t\t$image .= ' width=\"' . tep_output_string($width) . '\"';\n\t}\n\n\tif ($height) {\n\t\t$image .= ' height=\"' . tep_output_string($height) . '\"';\n\t}\n\n\tif (tep_not_null($params)) $image .= ' ' . $params;\n\n\t$image .= ' alt=\"' . tep_output_string($alt) . '\"';\n\n\tif (tep_not_null($alt)) {\n\t\t$image .= ' title=\"' . tep_output_string($alt) . '\"';\n\t}\n\n\t$image .= ' />';\n\n\treturn $image;\n}", "title": "" }, { "docid": "4f7a8644a68ef096504cf0a5e6d6caae", "score": "0.64648134", "text": "public function convertToImages();", "title": "" }, { "docid": "6553c783d344e9b267feadfea557d906", "score": "0.64603865", "text": "function applyToImage(Image $image);", "title": "" }, { "docid": "067fe52386a0774915e4966fb0f799bc", "score": "0.6459219", "text": "function _i($image, $params = array()){\r\n\t\t \r\n\t\tif (is_numeric($params)){\r\n\t\t\t$params = array('width' => $params, );\r\n\t\t}\r\n\r\n\t\tif (!empty($image)){\r\n\r\n\t\t\t$image_a = pathinfo($image);\r\n\t\t\t$image_data = array();\r\n\r\n\t\t\tif (!empty($params['width']) && (int)$params['width'] > 0){\r\n\t\t\t\t$image_data = _iw($image, $params);\r\n\t\t\t} else if (!empty($params['height']) && (int)$params['height'] > 0){\r\n\t\t\t\t$image_data = _iw($image, $params);\r\n\t\t\t} else if (!empty($params['output']) && $image_a['extension'] != $params['output']){\r\n\t\t\t\t$image_data = _iw($image, $params);\r\n\t\t\t} else if (!empty($params['data'])){\r\n\t\t\t\tlist($image_data['width'], $image_data['height']) = getimagesize($GLOBALS['config']['upload_path'].$image);\r\n\t\t\t\t$image_data['image'] = $image;\r\n\t\t\t} else {\r\n\t\t\t\t$image_data['image'] = $image;\r\n\t\t\t}\r\n\r\n\t\t\tif (empty($params['silent'])){\r\n\t\t\t\tif (substr($image_data['image'], 0, 4) != 'http'){\r\n\t\t\t\t\tprint($GLOBALS['config']['upload_url'].$image_data['image']);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprint($image_data['image']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$return = $image_data;\r\n\r\n\t\t} else {\r\n\t\t\t$return = array('image' => '', 'height' => 0, 'width' => 0, );\r\n\t\t}\r\n\t\t \r\n\t\t$return['alt'] = !empty($params['alt']) ? $params['alt'] : '';\r\n\t\t \r\n\t\t// check for possible description in db\r\n\t\t$ci =& get_instance();\r\n\t\t$ci->load->model('cms_image_model');\r\n\t\t$image_db_data = $ci->cms_image_model->get_cms_image_by_filename($image);\r\n\t\t$return['alt'] = empty($return['alt']) && !empty($image_db_data['description']) ? $image_db_data['description'] : $return['alt'];\r\n\r\n\t\t$return['description'] = !empty($image_db_data['description']) ? $image_db_data['description'] : '';\r\n\t\t$return['author'] = !empty($image_db_data['author']) ? $image_db_data['author'] : '';\r\n\t\t$return['copyright'] = !empty($image_db_data['copyright']) ? $image_db_data['copyright'] : '';\r\n\r\n\t\treturn $return;\r\n\r\n\t}", "title": "" }, { "docid": "a9cad88b0f3bb3995fb0d43b57391c43", "score": "0.64476025", "text": "function _ib($image, $params = array()){\r\n\t\t \r\n\t\tif (!is_array($params)){\r\n\t\t\t$params = array('width' => (int)$params);\r\n\t\t}\r\n\t\t \r\n\t\tif (!empty($image)){\r\n\r\n\t\t\tif (empty($params['css'])){\r\n\t\t\t\t$params['css'] = '';\r\n\t\t\t}\r\n\r\n\t\t\tif (substr($image, 0, 4) != 'http' && substr($image, 0, 1) != '/'){\r\n\t\t\t\t\r\n\t\t\t\t// make the image\r\n\t\t\t\t$image_a = pathinfo($image);\r\n\t\t\t\tif (\r\n\t\t\t\t\t\t(!empty($params['width']) && (int)$params['width'] > 0) || \r\n\t\t\t\t\t\t(!empty($params['height']) && (int)$params['height'] > 0) || \r\n\t\t\t\t\t\t(!empty($params['output']) && $params['output'] != $image_a['extension'])){\r\n\r\n\t\t\t\t\t$image_data = _iw($image, $params);\r\n\t\t\t\t\t$image_filename = $GLOBALS['config']['upload_url'].$image_data['image'];\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$image_filename = $GLOBALS['config']['upload_url'].$image;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// extra data\r\n\t\t\t\t$image_data['alt'] = !empty($params['alt']) ? $params['alt'] : '';\r\n\r\n\t\t\t\t// extra data: check for possible description in db\r\n\t\t\t\t$ci =& get_instance();\r\n\t\t\t\t$ci->load->model('cms_image_model');\r\n\t\t\t\t$image_db_data = $ci->cms_image_model->get_cms_image_by_filename($image);\r\n\r\n\t\t\t\t$image_data['alt'] = (empty($image_data['alt']) && !empty($image_db_data['description'])) ? $image_db_data['description'] : $image_data['alt'];\r\n\t\t\t\t$image_data['alt'] = str_replace('\"', \"'\", (empty($image_data['alt']) && !empty($params['alt_default'])) ? $params['alt_default'] : $image_data['alt']);\r\n\t\t\t\t$image_data['description'] = !empty($image_db_data['description']) ? $image_db_data['description'] : '';\r\n\t\t\t\t$image_data['author'] = !empty($image_db_data['author']) ? $image_db_data['author'] : '';\r\n\t\t\t\t$image_data['copyright'] = !empty($image_db_data['copyright']) ? $image_db_data['copyright'] : '';\r\n\t\t\t\t\r\n\t\t\t\tif (empty($image_data['width']) && !empty($image_db_data['original_width'])) $image_data['width'] = $image_db_data['original_width'];\r\n\t\t\t\tif (empty($image_data['height']) && !empty($image_db_data['original_height'])) $image_data['height'] = $image_db_data['original_height'];\r\n\t\t\t\t\r\n\t\t\t\t// lazy quality\r\n\t\t\t\t$hq_str = '';\r\n\t\t\t\tif (!empty($params['lq'])){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$lq_divider = !empty($GLOBALS['config']['images_lq_divider']) ? $GLOBALS['config']['images_lq_divider'] : 3;\r\n\t\t\t\t\t$lq_width = !empty($GLOBALS['config']['images_lq_width']) ? $GLOBALS['config']['images_lq_width'] : 200;\r\n\r\n\t\t\t\t\t$lq_params = $params;\r\n\t\t\t\t\tif (!empty($params['width']) || !empty($params['height'])){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ((!empty($params['width']) && (int)$params['width'] > 0)){\r\n\t\t\t\t\t\t\t$lq_params['width'] = round($params['width']/$lq_divider);\r\n\t\t\t\t\t\t} else if ((!empty($params['height']) && (int)$params['height'] > 0)){\r\n\t\t\t\t\t\t\t$lq_params['height'] = round($params['height']/$lq_divider);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$lq_params['width'] = max($lq_width, round($image_data['width']/$lq_divider));\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$lq_image = _iw($image, array_merge($params, $lq_params));\r\n\t\t\t\t\t$hq_str = ' data-cms_hq_background=\"'.$image_filename.'\" ';\r\n\t\t\t\t\t$image_filename = $GLOBALS['config']['upload_url'].$lq_image['image'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$GLOBALS['_images_hq'] = true;\r\n\t\t\t\t\r\n\t\t\t\t} else \tif (!empty($params['hq_width']) && (int)$params['hq_width'] > 0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t// deprecated\r\n\t\t\t\t\t$hq_image = _iw($image, ['width' => $params['hq_width'], ]);\r\n\t\t\t\t\t$hq_str = ' data-cms_hq_background=\"'.$GLOBALS['config']['upload_url'].$hq_image['image'].'\" ';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$GLOBALS['_images_hq'] = true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t\tprint('style=\"background-image: url('.$image_filename.'); '.$params['css'].'\"'.((!empty($GLOBALS['config']['aria']) && !empty($image_data['alt'])) ? ' aria-label=\"image: '.$image_data['alt'].'\"' : '')).$hq_str;\r\n\r\n\t\t\t} else if (substr($image, 0, 4) == 'http'){\r\n\r\n\t\t\t\tprint('style=\"background-image: url('.$image.'); '.$params['css'].'\"');\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tprint('style=\"background-image: url('.$GLOBALS['config']['base_url'].trim($image, '/').'); '.$params['css'].'\"');\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif (empty($image_data['image'])){\r\n\t\t\t\t$image_data['image'] = $image;\r\n\t\t\t}\r\n\r\n\t\t\tif (!empty($params['data']) && (empty($image_data['width']) || empty($image_data['height']))){\r\n\t\t\t\tlist($image_data['width'], $image_data['height']) = getimagesize($GLOBALS['config']['upload_path'].$image_data['image']);\r\n\t\t\t}\r\n\r\n\t\t\t$return = $image_data;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tif (!empty($params['css'])){\r\n\t\t\t\tprint('style=\"'.$params['css'].'\"');\r\n\t\t\t}\r\n\r\n\t\t\t$return = array('image' => '', 'height' => 0, 'width' => 0, );\r\n\t\t\t$return['alt'] = !empty($params['alt']) ? $params['alt'] : '';\r\n\r\n\t\t}\r\n\t\t \r\n\t\treturn $return;\r\n\r\n\t}", "title": "" }, { "docid": "d62f3019cb19a7eaa081ca46b80dfd62", "score": "0.6433734", "text": "function redimage($img_src,$dst_w,$dst_h) \n{\n\t$size = GetImageSize($img_src); \n\t$src_w = $size[0]; \n\t$src_h = $size[1];\n// Teste les dimensions tenant dans la zone\n\t$test_h = round(($dst_w / $src_w) * $src_h);\n\t$test_w = round(($dst_h / $src_h) * $src_w);\n\t// Si Height final non précisé (0)\nif(!$dst_h) $dst_h = $test_h;\n// Sinon si Width final non précisé (0)\nelseif(!$dst_w) $dst_w = $test_w;\n// Sinon teste quel redimensionnement tient dans la zone\nelseif($test_h>$dst_h) $dst_w = $test_w;\nelse $dst_h = $test_h;\n\n// Affiche les dimensions optimales\nreturn \"WIDTH=\".$dst_w.\" HEIGHT=\".$dst_h;\n}", "title": "" }, { "docid": "0392efa8d80a63947171dbb753a5e691", "score": "0.6427095", "text": "function ResizeImage( $image, $newWidth, $newHeight,$imagename){\n\tdebug($imagename,\"Image in ResizeImage\");\n\teregi(\"\\..{3,4}$\",$imagename,$regs);\n\tdebug($regs,'$regs');\n\tswitch(strtolower($regs[0])){\n\t\tcase \".gif\": $srcImage = ImageCreateFromGIF( $image ); break;\n\t\tcase \".png\": $srcImage = ImageCreateFromPNG( $image ); break;\n\t\tcase \".jpeg\":\n\t\tcase \".jpg\":\n\t\tdefault: $srcImage = ImageCreateFromJPEG( $image ); break;\n\t}\n\t$srcWidth = ImageSX( $srcImage );\n\t$srcHeight = ImageSY( $srcImage );\n\t$ratio = $srcWidth/$srcHeight;\n\tif( $srcWidth > $srcHeight){\n\t\t$destWidth = $newWidth;\n\t\t$destHeight = $destWidth/$ratio;\n\t}else{\n\t $destHeight = $newHeight;\n\t\t$destWidth = $destHeight*$ratio;\n\t}\n\t$destImage = imagecreatetruecolor( $destWidth, $destHeight);\n\tif(function_exists('imagecopyresampled')) {\n\timagecopyresampled( $destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight );\n\t} else {\n\tImageCopyResized( $destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight );\n\t}\n\tob_start();\n imagejpeg( $destImage );\n\t$resizedImage = ob_get_contents();\n\tob_end_clean();\n\tImageDestroy($srcImage);\n\tImageDestroy($destImage);\n \treturn $resizedImage;\n}", "title": "" }, { "docid": "f2a74974531498c3d9b0ca04e0c70929", "score": "0.6422212", "text": "function image_gd($file, $tam = 800) {\n $extension = explode(\".\", $file);\n $ext = count($extension) - 1;\n//Determinamos las extenciones permitidas.\n if ('jpg' == $extension[$ext] || 'jpeg' == $extension[$ext] || 'JPG' == $extension[$ext]) {\n $image = ImageCreateFromJPEG($file);\n } else if ($extension[$ext] == 'gif') {\n $image = ImageCreateFromGIF($file);\n } else if ($extension[$ext] == 'png') {\n $image = ImageCreateFromPNG($file);\n } else {\n echo 'Error, extencion no permitida ->' . $file;\n die();\n }\n\n $thumb_name = substr($file, 0, -4); //nombre del thumbnail\n $width = imagesx($image); //ancho\n $height = imagesy($image); //alto\n\n if ($width > $tam) {\n $nueva_anchura = $tam; // Definimos el tamaño a 100 px\n $nueva_altura = ($nueva_anchura * $height) / $width; // tamaño proporcional\n } else {\n $nueva_anchura = $width; // Definimos el tamaño a 100 px\n $nueva_altura = $height; // tamaño proporcional\n }\n\n if (1000 < $nueva_altura) {\n $an = $nueva_altura;\n $nueva_altura = 1000;\n $nueva_anchura = ($nueva_altura * $nueva_anchura) / $an;\n }\n\n if (function_exists('imagecreatetruecolor')) {\n $thumb = ImageCreateTrueColor($nueva_anchura, $nueva_altura); //Color Real\n }\n//En caso de no encontrar la funcion, la saca en calidad media\n if (!$thumb) {\n $thumb = ImageCreate($nueva_anchura, $nueva_altura);\n }\n\n ImageCopyResized($thumb, $image, 0, 0, 0, 0, $nueva_anchura, $nueva_altura, $width, $height);\n//header(\"Content-type: image/jpeg\");\n ImageJPEG($thumb, '' . $thumb_name . '.jpg', 100);\n imagedestroy($image);\n\n return $image;\n}", "title": "" }, { "docid": "69152b4ff94dfb7c9d61a37e7cd5eff9", "score": "0.6405825", "text": "function coreMakeImage($image)\n{\n $img_w = strtok(\"$image\", \",\");\n $img_h = strtok(\",\");\n $img_p = strtok(\",\");\n \n return (\"SRC=\\\"$img_p\\\" WIDTH=\\\"$img_w\\\" HEIGHT=\\\"$img_h\\\"\");\n}", "title": "" }, { "docid": "f4c8725be6c3e9fc8c1905d7b79d4f71", "score": "0.6399736", "text": "function images()\n {\n }", "title": "" }, { "docid": "c3451939742c33f33541d5032166572f", "score": "0.6385586", "text": "function fusionar_imagenes($miid, $filename, $alto, $ancho, $opacidad)\n{\n\trequire_once('imageworkshop/imageworkshop/imageworkshop.php');\n//\t$norwayLayer = new ImageWorkshop(array(\"imageFromPath\" => $filename,));\n//\t$watermarkLayer = new ImageWorkshop(array(\"imageFromPath\" => \"patron/\".$miid.'.png',));\n\t$watermarkLayer = new ImageWorkshop(array(\"imageFromPath\" => $filename,));\n\t$norwayLayer = new ImageWorkshop(array(\"imageFromPath\" => \"img-patron/\".$miid.'.png',));\n\t$logo = new ImageWorkshop(array(\"imageFromPath\" => 'identificacion/logo.jpg',));\n\n\t$watermarkLayer->opacity($opacidad);\n\t$norwayLayer->addLayer(2, $watermarkLayer, 25, 25, \"LB\");\n\t$altologo=35;\n\t$anchologo=60;\n\t$logo->resizeInPixel(60, $altologo, false);\n\t$norwayLayer->addLayer(1, $logo, 0, ($alto-$altologo), \"LB\");\n//\t$norwayLayer->addLayer(1, $logo, ($ancho-$anchologo), ($alto-$altologo), \"LB\");\n \n\t$image = $norwayLayer->getResult();\n\t// $image = colocar_datos($image, $alto, $ancho);\t\n\t\n\t/*\n\theader('Content-type: image/jpeg');\n\t \n\timagejpeg($image, null, 60); \n\t*/\n\t$nombreimagen='img-resultado/'.$miid.'.jpg';\n\timagejpeg($image,$nombreimagen);\n\treturn $nombreimagen;\n}", "title": "" }, { "docid": "214b547838c49fb8378259547a477dc5", "score": "0.6384987", "text": "function load_image($imagetype, $filename, $optlist) {}", "title": "" }, { "docid": "bd69f243c165b351ae6e78ca227477ca", "score": "0.6371246", "text": "function addFiligrame($filename,$logo)\r\n{\r\n\t$extension = explode(\".\",$filename);\r\n\t$extension = $extension[count($extension)-1];\r\n\t$extension = strtolower($extension);\r\n\t\r\n\tif($extension == 'jpg')\r\n\t{\r\n\t\t$img = imagecreatefromjpeg($filename);\r\n\t}\r\n\telse if($extension == 'jpeg')\r\n\t{\r\n\t\t$img = imagecreatefromjpeg($filename);\r\n\t}\r\n\telse if($extension == 'png')\r\n\t{\r\n\t\t$img = imagecreatefrompng($filename);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn \"0\";\r\n\t}\r\n\t\r\n\t$extensionlogo = explode(\".\",$logo);\r\n\t$extensionlogo = $extensionlogo[count($extensionlogo)-1];\r\n\t$extensionlogo = strtolower($extensionlogo);\r\n\t\r\n\tif($extensionlogo == 'jpg')\r\n\t{\r\n\t\t$imglogo = imagecreatefromjpeg($logo);\r\n\t}\r\n\telse if($extensionlogo == 'jpeg')\r\n\t{\r\n\t\t$imglogo = imagecreatefromjpeg($logo);\r\n\t}\r\n\telse if($extensionlogo == 'png')\r\n\t{\r\n\t\t$imglogo = imagecreatefrompng($logo);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn \"0\";\r\n\t}\r\n\t\r\n\t$widthlogo = imagesx($imglogo);\r\n\t$heightlogo = imagesy($imglogo);\r\n\timagecopymerge_alpha($img, $imglogo, 10, 10, 0, 0, $widthlogo, $heightlogo, 100);\r\n\t\r\n\tif($extension == 'jpg')\r\n\t{\r\n\t\timagejpeg($img,$filename);\r\n\t}\r\n\telse if($extension == 'jpeg')\r\n\t{\r\n\t\timagejpeg($img,$filename);\r\n\t}\r\n\telse if($extension == 'png')\r\n\t{\r\n\t\timagepng($img,$filename);\r\n\t}\r\n}", "title": "" }, { "docid": "bd69f243c165b351ae6e78ca227477ca", "score": "0.6371246", "text": "function addFiligrame($filename,$logo)\r\n{\r\n\t$extension = explode(\".\",$filename);\r\n\t$extension = $extension[count($extension)-1];\r\n\t$extension = strtolower($extension);\r\n\t\r\n\tif($extension == 'jpg')\r\n\t{\r\n\t\t$img = imagecreatefromjpeg($filename);\r\n\t}\r\n\telse if($extension == 'jpeg')\r\n\t{\r\n\t\t$img = imagecreatefromjpeg($filename);\r\n\t}\r\n\telse if($extension == 'png')\r\n\t{\r\n\t\t$img = imagecreatefrompng($filename);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn \"0\";\r\n\t}\r\n\t\r\n\t$extensionlogo = explode(\".\",$logo);\r\n\t$extensionlogo = $extensionlogo[count($extensionlogo)-1];\r\n\t$extensionlogo = strtolower($extensionlogo);\r\n\t\r\n\tif($extensionlogo == 'jpg')\r\n\t{\r\n\t\t$imglogo = imagecreatefromjpeg($logo);\r\n\t}\r\n\telse if($extensionlogo == 'jpeg')\r\n\t{\r\n\t\t$imglogo = imagecreatefromjpeg($logo);\r\n\t}\r\n\telse if($extensionlogo == 'png')\r\n\t{\r\n\t\t$imglogo = imagecreatefrompng($logo);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn \"0\";\r\n\t}\r\n\t\r\n\t$widthlogo = imagesx($imglogo);\r\n\t$heightlogo = imagesy($imglogo);\r\n\timagecopymerge_alpha($img, $imglogo, 10, 10, 0, 0, $widthlogo, $heightlogo, 100);\r\n\t\r\n\tif($extension == 'jpg')\r\n\t{\r\n\t\timagejpeg($img,$filename);\r\n\t}\r\n\telse if($extension == 'jpeg')\r\n\t{\r\n\t\timagejpeg($img,$filename);\r\n\t}\r\n\telse if($extension == 'png')\r\n\t{\r\n\t\timagepng($img,$filename);\r\n\t}\r\n}", "title": "" }, { "docid": "32cc276839e1aaafb82bc33b0e832fa8", "score": "0.63485307", "text": "function getImageIdentifier();", "title": "" }, { "docid": "fa070ee445fbc67dc71a98551407836d", "score": "0.6338344", "text": "function info_image($image, $keyword, $optlist) {}", "title": "" }, { "docid": "118c2ebbc0f1f107d1cdf7b74e5c8f39", "score": "0.6331769", "text": "public function redimesionImage($endThu,$newX,$newY,$endImg,$fileType){\n copy($endThu, $endImg);\n\n // Retrieves the image data\n list($width, $height) = getimagesize($endImg);\n\n // If the width is greater ...\n if($width >= $height) {\n\n // I set the width of the image to the desired size ...\n $newXimage = $newX;\n\n // And calculate the size of the time to not stretch the image\n $newYimage = ($height / $width) * $newXimage;\n\n } else {\n\n // Define the desired height ...\n $newYimage = $newY;\n\n // And calculate the width to not stretch the image\n $newXimage = ($width / $height) * $newYimage;\n }\n\n // Creates an initial image in memory with calculated measures\n $imageInicial = imagecreatetruecolor(ceil($newXimage), ceil($newYimage));\n\n // I check the extension of the image and create their respective image\n if ($fileType == 'jpeg') { $endereco = imagecreatefromjpeg($endImg);}\n if ($fileType == 'jpg') { $endereco = imagecreatefromjpeg($endImg);} \n if ($fileType == 'png') {\n \n $endereco = imagecreatefrompng($endImg);\n imagealphablending($imageInicial, false);\n imagesavealpha($imageInicial,true);\n $transparent = imagecolorallocatealpha($imageInicial, 255, 255, 255, 127);\n imagefilledrectangle($endereco, 0, 0, $newXimage, $newYimage, $transparent);\n }\n if ($fileType == 'gif') {\n $endereco = imagecreatefromgif($endImg);\n $this->setTransparency($imageInicial,$endereco);\n }\n\n // I merge the image to be resized with created in memory\n imagecopyresampled($imageInicial, $endereco, 0, 0, 0, 0, ceil($newXimage), ceil($newYimage), ceil($width), ceil($height));\n\n // Creates the image in its final lacal, according to its extension\n if ($fileType == 'jpeg') {imagejpeg($imageInicial, $endImg, 100);}\n if ($fileType == 'jpg') {imagejpeg($imageInicial, $endImg, 100);}\n if ($fileType == 'png'){ imagepng($imageInicial, $endImg, 9);}\n if ($fileType == 'gif'){ imagegif($imageInicial, $endImg, 100);}\n}", "title": "" }, { "docid": "10f00f7dae1bcebb75e0b082c4a55fb8", "score": "0.6318422", "text": "abstract public function getImageName();", "title": "" }, { "docid": "bf88a9fb0773d1d7de93126a602da7e3", "score": "0.6312879", "text": "function getImagick();", "title": "" }, { "docid": "f0f34da5c19ea98fcce549c75d8f609e", "score": "0.63082993", "text": "function bannerThumb($name,$filename,$new_w,$new_h,$path=\"\"){\n\t\t\n\t\t$wh = getimagesize($path.$name);\n\t\n\t\t$gd2=1;\n\t\t\n\t\t//echo \"</br>\".$name;\n\t\t//echo \"</br>\".$filename;\n\t\t//echo \"</br>\".$new_w;\n\t\t//echo \"</br>\".$new_h;\n\t\t//exit;\n\t\n\t\t$system=explode(\".\",$name);\n\t\n\t\tif(preg_match(\"/jpg|jpeg|JPG|JPEG/\",$system[count($system)-1]))\n\t\t\t$src_img=@imagecreatefromjpeg($path.$name);\n\t\n\t\tif (preg_match(\"/gif|GIF/\",$system[count($system)-1]))\n\t\t\t$src_img=@imagecreatefromgif($path.$name);\n\t\n\t\tif (preg_match(\"/png|PNG/\",$system[count($system)-1]))\t\n\t\t\t$src_img=@imagecreatefrompng($path.$name);\n\t\t\n\t\n\t\t$old_x=@imagesx($src_img);\n\t\n\t\t$old_y=@imagesy($src_img);\n\t\n\t\t $thumb_w=$new_w;\n\t\t\t$thumb_h=$new_h;\n\t\n\t\tif ($gd2==1){\n\t\n\t\t\t$dst_img=@imagecreatetruecolor($thumb_w,$thumb_h);\n\t\n\t\t\t@imagefill($dst_img,0,0,imagecolorallocate($dst_img,255,255,255));\n\t\t \n\t\t\t@imagecopyresized($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);\n\t\n\t\t}\n\t\telse{\n\t\n\t\t\t$dst_img=@imagecreatetruecolor($thumb_w,$thumb_h);\n\t\t \n\t\t\t@imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);\n\t\t\t\n\t }\n\t\n\t\n\t\tif (preg_match(\"/gif|GIF/\",$system[1])){\n\t \n\t\t\t@imagegif($dst_img,$path.$filename);\n\t\t\tchmod($path.$filename,0777);\n\t\t}\n\t\telse{\n\t\n\t\t\t@imagejpeg($dst_img,$path.$filename);\n\t\n\t\t\tchmod($path.$filename,0777);\n\t\t}\n\t\n\t\t@imagedestroy($dst_img);\n\t\n\t\t@imagedestroy($src_img);\n\t\n\t}", "title": "" }, { "docid": "41754e6522a41dfc497b72acba007627", "score": "0.63009006", "text": "function IMG($imgName, $alt){\nglobal $image;\n\n\t$image = '<img src=\"'.IMG_PATH.$imgName.'\" alt=\"'.$alt.'\" />';\n\treturn $image;\n}", "title": "" }, { "docid": "b573bbd1f5a39b4c74f34a2f9ad5166d", "score": "0.6295594", "text": "function img_upload($img,$name,$loc,$w,$h){\n // print \"$img.$name.$loc.$w.$h\";\n \n define (\"MAX_SIZE\",\"5500\");\n// print \"1\";\n $errors=0;\n \n \n \n $image =$img[\"name\"];\n // print $image;\n $uploadedfile = $img['tmp_name'];\n \n // print \"2\";\n if ($image) \n { \n // print \"..3\";\n $filename = stripslashes($img['name']);\n // print $filename;\n $extension = getExtension($filename);\n //print $extension;\n $extension = strtolower($extension);\n //print $extension;\n if (($extension != \"jpg\") && ($extension != \"jpeg\") \n&& ($extension != \"png\") && ($extension != \"gif\")) \n {\n // print \"4\";\necho ' Unknown Image extension ';\n$errors=1;\n }\n else\n{\n //print \"5\";\n $size=filesize($img['tmp_name']);\n \nif ($size > MAX_SIZE*1024)\n{\n echo \"You have exceeded the size limit\";\n $errors=1;\n}\n \nif($extension==\"jpg\" || $extension==\"jpeg\" )\n{\n$uploadedfile = $img['tmp_name'];\n$src = imagecreatefromjpeg($uploadedfile);\n//print \"6\";\n}\nelse if($extension==\"png\")\n{\n echo \"its png........../n\";\n$uploadedfile = $img['tmp_name'];\n$src = imagecreatefrompng($uploadedfile);\n\n\n\n\n\n}\nelse \n{\n$src = imagecreatefromgif($uploadedfile);\n}\n \nlist($width,$height)=getimagesize($uploadedfile);\n\n//print $width.\"hhh\".$height;\n//print \"7\";\n\n\n$newwidth=$w;\n$newheight=$h;//($height/$width)*$newwidth;\n$tmp=imagecreatetruecolor($newwidth,$newheight);\n\n\n\n\n\n\n\n\n//print \"8\";\n/*$newwidth1=250;\n$newheight1=($height/$width)*$newwidth1;\n$tmp1=imagecreatetruecolor($newwidth1,$newheight1);\n*/\n//print \"9\";\nimagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,\n $width,$height);\n/* print \"10\";\nimagecopyresampled($tmp1,$src,0,0,0,0,$newwidth1,$newheight1, \n$width,$height);\n\nprint \"11\";\n*/\n\n$img_name = $name.\"-\".$img['name'];\n$img_name = str_replace(\" \", \"-\", $img_name);\n$img_name = str_replace(\"/\", \"-\", $img_name);\n\n$filename = $loc.$name;\n//$filename1 = \"../images/cruise/\".\"s\". $_FILES[$img]['name'];\n//print \"12\";\n\n\nimagejpeg($tmp,$filename,100);\n\n\n//imagejpeg($tmp1,$filename1,100);\n\n//print \"13\";\nimagedestroy($src);\nimagedestroy($tmp);\n//imagedestroy($tmp1);\n//print \"14\";\n}\n}\n\n//If no errors registred, print the success message\n\n if(isset($_POST['submit']) && !$errors) \n { echo \"Image Uploaded Successfully!\";\nreturn $src; // mysql_query(\"update SQL statement \");\n \n\n }\n \n\n \n\n\n\n return $src;\n\n}", "title": "" }, { "docid": "419f6f2aa58b8557685a054aa087de74", "score": "0.6288576", "text": "function exportimg($source, $target, $width, $height, $quality, $resize, $center){\n $ext = strtolower(pathinfo($source, PATHINFO_EXTENSION));\n list($width_orig, $height_orig) = getimagesize($source);\n \n if($center==1){///Crop centre\n $image_p = imagecreatetruecolor($width, $height);\n $width_temp=$width;\n $height_temp=$height;\n \n if($width_orig/$height_orig>$width/$height){\n $width = $width_orig*$height/$height_orig;\n $x_pos = -($width-$width_temp)/2;\n $y_pos = 0;\n }else{\n $height = $height_orig*$width/$width_orig;\n $y_pos = -($height-$height_temp)/2;\n $x_pos = 0;\n }\n \n }else{///Just resize\n if($resize == 0){}///Resize to exact new width&height\n \n if($resize == 1){///Resize to these max width&height\n if($width_orig<$width && $height_orig<$height){\n $width = $width_orig;\n $height = $height_orig;\n }else{\n if($width_orig/$height_orig>$width/$height){\n $height = $width*$height_orig/$width_orig;\n }else{\n $width = $height*$width_orig/$height_orig;\n }\n }\n }\n \n if($resize == 2){if($width_orig>$width) $height = $height_orig*$width/$width_orig; else {$width = $width_orig;$height = $height_orig;}}///Dynamic Height\n \n if($resize == 3){if($height_orig>$height) $width = $width_orig*$height/$height_orig; else {$width = $width_orig;$height = $height_orig;}}///Dynamic Width\n \n $image_p = imagecreatetruecolor($width, $height);//\n \n }\n \n if($ext == \"jpg\" || $ext == \"jpeg\") $image = imagecreatefromjpeg($source);\n else if($ext == \"png\"){imagealphablending($image_p, false);imagesavealpha($image_p, true);$image = imagecreatefrompng($source);}//convert transparent\n \n if($center==1) imagecopyresampled($image_p, $image, $x_pos, $y_pos, 0, 0, $width, $height, $width_orig, $height_orig);\n else imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n \n if($ext == \"jpg\" || $ext == \"jpeg\") imagejpeg($image_p, $target, $quality);\n if($ext == \"png\") imagepng($image_p, $target, 9);\n \n}", "title": "" }, { "docid": "a56635dffda8c0bee1d8fb08a79051ab", "score": "0.62802505", "text": "function uploadImageFile() { // Note: GD library is required for this function\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $iWidth = $iHeight = 200; // desired image result dimensions\n $iJpgQuality = 90;\n\n if ($_FILES) {\n\n // if no errors and size less than 250kb\n if (! $_FILES['image_file']['error'] && $_FILES['image_file']['size'] < 250 * 1024) {\n if (is_uploaded_file($_FILES['image_file']['tmp_name'])) {\n\n // new unique filename\n $sTempFileName = 'cache/' . md5(time().rand());\n\n // move uploaded file into cache folder\n move_uploaded_file($_FILES['image_file']['tmp_name'], $sTempFileName);\n\n // change file permission to 644\n @chmod($sTempFileName, 0644);\n\n if (file_exists($sTempFileName) && filesize($sTempFileName) > 0) {\n $aSize = getimagesize($sTempFileName); // try to obtain image info\n if (!$aSize) {\n @unlink($sTempFileName);\n return;\n }\n\n // check for image type\n switch($aSize[2]) {\n case IMAGETYPE_JPEG:\n $sExt = '.jpg';\n\n // create a new image from file \n $vImg = @imagecreatefromjpeg($sTempFileName);\n break;\n /*case IMAGETYPE_GIF:\n $sExt = '.gif';\n\n // create a new image from file \n $vImg = @imagecreatefromgif($sTempFileName);\n break;*/\n case IMAGETYPE_PNG:\n $sExt = '.png';\n\n // create a new image from file \n $vImg = @imagecreatefrompng($sTempFileName);\n break;\n default:\n @unlink($sTempFileName);\n return;\n }\n\n // create a new true color image\n $vDstImg = @imagecreatetruecolor( $iWidth, $iHeight );\n\n // copy and resize part of an image with resampling\n imagecopyresampled($vDstImg, $vImg, 0, 0, (int)$_POST['x1'], (int)$_POST['y1'], $iWidth, $iHeight, (int)$_POST['w'], (int)$_POST['h']);\n\n // define a result image filename\n $sResultFileName = $sTempFileName . $sExt;\n\n // output image to file\n imagejpeg($vDstImg, $sResultFileName, $iJpgQuality);\n @unlink($sTempFileName);\n\n return $sResultFileName;\n }\n }\n }\n }\n }\n}", "title": "" }, { "docid": "a99205abc81da7d578ea75719392f32d", "score": "0.62712824", "text": "function resizeImage($ruta1,$ruta2,$ancho,$alto){\n\t\t$datos\t=\tgetimagesize($ruta1); \n\n\t $ancho_orig\t= $datos[0]; # Anchura de la imagen original \n\t $alto_orig\t= $datos[1]; # Altura de la imagen original \n\t $tipo \t\t= $datos[2]; \n\n\t if ($tipo==1){ # GIF \n\t \tif (function_exists(\"imagecreatefromgif\")) \n\t \t\t$img = imagecreatefromgif($ruta1); \n\t \telse \n\t \t\treturn false; \n\t } \n\t else if ($tipo==2){ # JPG \n\t \tif (function_exists(\"imagecreatefromjpeg\")) \n\t \t\t$img = imagecreatefromjpeg($ruta1); \n\t \telse \n\t \t\treturn false; \n\t } \n\t else if ($tipo==3){ # PNG \n\t \tif (function_exists(\"imagecreatefrompng\")) \n\t \t\t$img = imagecreatefrompng($ruta1); \n\t \telse \n\t \t\treturn false; \n\t } \n\n\t # Se calculan las nuevas dimensiones de la imagen \n\t if ($ancho_orig>$alto_orig) \n\t { \n\t \t$ancho_dest=$ancho; \n\t \t$alto_dest=($ancho_dest/$ancho_orig)*$alto_orig; \n\t } \n\t else \n\t { \n\t \t$alto_dest=$alto; \n\t \t$ancho_dest=($alto_dest/$alto_orig)*$ancho_orig; \n\t } \n\n\t // imagecreatetruecolor, solo estan en G.D. 2.0.1 con PHP 4.0.6+ \n\t $img2=@imagecreatetruecolor($ancho_dest,$alto_dest) or $img2=imagecreate($ancho_dest,$alto_dest); \n\n\t // Redimensionar \n\t // imagecopyresampled, solo estan en G.D. 2.0.1 con PHP 4.0.6+ \n\t @imagecopyresampled($img2,$img,0,0,0,0,$ancho_dest,$alto_dest,$ancho_orig,$alto_orig) or imagecopyresized($img2,$img,0,0,0,0,$ancho_dest,$alto_dest,$ancho_orig,$alto_orig); \n\n\t // Crear fichero nuevo, según extensión. \n\t if ($tipo==1) // GIF \n\t if (function_exists(\"imagegif\")) \n\t \timagegif($img2, $ruta2); \n\t else \n\t \treturn false; \n\n\t if ($tipo==2) // JPG \n\t if (function_exists(\"imagejpeg\")) \n\t \timagejpeg($img2, $ruta2); \n\t else \n\t \treturn false; \n\n\t if ($tipo==3) // PNG \n\t if (function_exists(\"imagepng\")) \n\t \timagepng($img2, $ruta2); \n\t else \n\t \treturn false; \n\n\t return true; \n\t}", "title": "" }, { "docid": "4d11d9ed46cd10330ca53d3d5b1946b8", "score": "0.6261161", "text": "function gnavi_get_img_attribs_for_preview($photo, $preview_name,$preview_name1,$preview_name2)\n{\n\tglobal $photos_url , $mod_url , $mod_path , $gnavi_normal_exts , $gnavi_thumbsize,$photos_dir ;\n\n\t$photo['res_x']=0;\n\t$photo['res_y']=0;\n\t$photo['res_x1']=0;\n\t$photo['res_y1']=0;\n\t$photo['res_x2']=0;\n\t$photo['res_y2']=0;\n\t$photo['window_x']=0;\n\t$photo['window_y']=0;\n\t$photo['window_x1']=0;\n\t$photo['window_y1']=0;\n\t$photo['window_x2']=0;\n\t$photo['window_y2']=0;\n\n\n\t$photo['ext'] = substr( strrchr( $preview_name , '.' ) , 1 ) ;\n\tif( in_array( strtolower( $photo['ext'] ) , $gnavi_normal_exts ) ) {\n\t\t$dim = GetImageSize( \"$photos_dir/$preview_name\" ) ;\n\t\tif( $dim ) {$photo['res_x']=$dim[0];$photo['res_y']=$dim[1];}\n\t\t$photo['window_x']=$photo['res_x']+16;\n\t\t$photo['window_y']=$photo['res_y']+16;\n\t}\n\t$photo['ext1'] = substr( strrchr( $preview_name1 , '.' ) , 1 ) ;\n\tif( in_array( strtolower( $photo['ext1'] ) , $gnavi_normal_exts ) ) {\n\t\t$dim = GetImageSize( \"$photos_dir/$preview_name1\" ) ;\n\t\tif( $dim ) {$photo['res_x1']=$dim[0];$photo['res_y1']=$dim[1];}\n\t\t$photo['window_x1']=$photo['res_x1']+16;\n\t\t$photo['window_y1']=$photo['res_y1']+16;\n\t}\n\t$photo['ext2'] = substr( strrchr( $preview_name2 , '.' ) , 1 ) ;\n\tif( in_array( strtolower( $photo['ext2'] ) , $gnavi_normal_exts ) ) {\n\t\t$dim = GetImageSize( \"$photos_dir/$preview_name2\" ) ;\n\t\tif( $dim ) {$photo['res_x2']=$dim[0];$photo['res_y2']=$dim[1];}\n\t\t$photo['window_x2']=$photo['res_x2']+16;\n\t\t$photo['window_y2']=$photo['res_y2']+16;\n\t}\n\n\tlist($photo['imgsrc_photo'],$photo['ahref_photo']) = gnavi_get_img_urls($preview_name);\n\tlist($photo['imgsrc_photo1'],$photo['ahref_photo1']) = gnavi_get_img_urls($preview_name1);\n\tlist($photo['imgsrc_photo2'],$photo['ahref_photo2']) = gnavi_get_img_urls($preview_name2);\n\n\treturn $photo;\n\n}", "title": "" }, { "docid": "4dd06f9a771af7137d432bd6d69ff0df", "score": "0.6258485", "text": "function imageCreateFromIco($filename,$icoColorCount=16,$icoSize=16,$alphaBgR=255,$alphaBgG=255,$alphaBgB=255)\r\n{\r\n$Ikona=jpexs_GetIconsInfo($filename);\r\n\r\n$IconID=-1;\r\n\r\n$ColMax=-1;\r\n$SizeMax=-1;\r\n\r\nfor($p=0;$p<count($Ikona);$p++)\r\n{\r\n$Ikona[$p][\"NumberOfColors\"]=pow(2,$Ikona[$p][\"Info\"][\"BitsPerPixel\"]);\r\n};\r\n\r\n\r\nfor($p=0;$p<count($Ikona);$p++)\r\n{\r\n\r\nif(($ColMax==-1)or($Ikona[$p][\"NumberOfColors\"]>=$Ikona[$ColMax][\"NumberOfColors\"]))\r\nif(($icoSize==$Ikona[$p][\"Width\"])or($icoSize==ICO_MAX_SIZE))\r\n {\r\n $ColMax=$p;\r\n };\r\n\r\nif(($SizeMax==-1)or($Ikona[$p][\"Width\"]>=$Ikona[$SizeMax][\"Width\"]))\r\nif(($icoColorCount==$Ikona[$p][\"NumberOfColors\"])or($icoColorCount==ICO_MAX_COLOR))\r\n {\r\n $SizeMax=$p;\r\n };\r\n\r\n\r\nif($Ikona[$p][\"NumberOfColors\"]==$icoColorCount)\r\nif($Ikona[$p][\"Width\"]==$icoSize)\r\n {\r\n\r\n $IconID=$p;\r\n };\r\n};\r\n\r\n if($icoColorCount==ICO_MAX_COLOR) $IconID=$ColMax;\r\n if($icoSize==ICO_MAX_SIZE) $IconID=$SizeMax;\r\n\r\n$ColName=$icoColorCount;\r\n\r\nif($icoSize==ICO_MAX_SIZE) $icoSize=\"Max\";\r\nif($ColName==ICO_TRUE_COLOR) $ColName=\"True\";\r\nif($ColName==ICO_XP_COLOR) $ColName=\"XP\";\r\nif($ColName==ICO_MAX_COLOR) $ColName=\"Max\";\r\nif($IconID==-1) die(\"Icon with $ColName colors and $icoSize x $icoSize size doesn't exist in this file!\");\r\n\r\n\r\njpexs_readIcon($filename,$IconID,$Ikona);\r\n\r\n $biBitCount=$Ikona[$IconID][\"Info\"][\"BitsPerPixel\"];\r\n\r\n\r\n if($Ikona[$IconID][\"Info\"][\"BitsPerPixel\"]==0)\r\n {\r\n $Ikona[$IconID][\"Info\"][\"BitsPerPixel\"]=24;\r\n };\r\n\r\n $biBitCount=$Ikona[$IconID][\"Info\"][\"BitsPerPixel\"];\r\n if($biBitCount==0) $biBitCount=1;\r\n\r\n\r\n$Ikona[$IconID][\"BitCount\"]=$Ikona[$IconID][\"Info\"][\"BitsPerPixel\"];\r\n\r\n\r\n\r\nif($Ikona[$IconID][\"BitCount\"]>=24)\r\n{\r\n$img=imagecreatetruecolor($Ikona[$IconID][\"Width\"],$Ikona[$IconID][\"Height\"]);\r\nif($Ikona[$IconID][\"BitCount\"]==32):\r\n $backcolor=imagecolorallocate($img,$alphaBgR,$alphaBgG,$alphaBgB);\r\n imagefilledrectangle($img,0,0,$Ikona[$IconID][\"Width\"]-1,$Ikona[$IconID][\"Height\"]-1,$backcolor);\r\nendif;\r\nfor($y=0;$y<$Ikona[$IconID][\"Height\"];$y++)\r\nfor($x=0;$x<$Ikona[$IconID][\"Width\"];$x++)\r\n {\r\n $R=$Ikona[$IconID][\"Data\"][$x][$y][\"r\"];\r\n $G=$Ikona[$IconID][\"Data\"][$x][$y][\"g\"];\r\n $B=$Ikona[$IconID][\"Data\"][$x][$y][\"b\"];\r\n if($Ikona[$IconID][\"BitCount\"]==32)\r\n {\r\n $Alpha=127-round($Ikona[$IconID][\"Data\"][$x][$y][\"alpha\"]*127/255);\r\n if($Ikona[$IconID][\"Maska\"][$x][$y]==1) $Alpha=127;\r\n $color=imagecolorexactalpha($img,$R,$G,$B,$Alpha);\r\n if($color==-1) $color=imagecolorallocatealpha($img,$R,$G,$B,$Alpha);\r\n }\r\n else\r\n {\r\n $color=imagecolorexact($img,$R,$G,$B);\r\n if($color==-1) $color=imagecolorallocate($img,$R,$G,$B);\r\n };\r\n\r\n imagesetpixel($img,$x,$y,$color);\r\n\r\n };\r\n\r\n}\r\nelse\r\n{\r\n$img=imagecreate($Ikona[$IconID][\"Width\"],$Ikona[$IconID][\"Height\"]);\r\nfor($p=0;$p<count($Ikona[$IconID][\"Paleta\"]);$p++)\r\n $Paleta[$p]=imagecolorallocate($img,$Ikona[$IconID][\"Paleta\"][$p][\"r\"],$Ikona[$IconID][\"Paleta\"][$p][\"g\"],$Ikona[$IconID][\"Paleta\"][$p][\"b\"]);\r\n\r\nfor($y=0;$y<$Ikona[$IconID][\"Height\"];$y++)\r\nfor($x=0;$x<$Ikona[$IconID][\"Width\"];$x++)\r\n {\r\n imagesetpixel($img,$x,$y,$Paleta[$Ikona[$IconID][\"Data\"][$x][$y]]);\r\n };\r\n};\r\n$IsTransparent=false; \r\nfor($y=0;$y<$Ikona[$IconID][\"Height\"];$y++)\r\nfor($x=0;$x<$Ikona[$IconID][\"Width\"];$x++)\r\n if($Ikona[$IconID][\"Maska\"][$x][$y]==1)\r\n {\r\n $IsTransparent=true;\r\n break;\r\n };\r\nif($Ikona[$IconID][\"BitCount\"]==32)\r\n{\r\n imagealphablending($img, false);\r\n if(function_exists(\"imagesavealpha\"))\r\n imagesavealpha($img,true);\r\n};\r\n\r\nif($IsTransparent)\r\n {\r\n if(($Ikona[$IconID][\"BitCount\"]>=24)or(imagecolorstotal($img)>=256))\r\n {\r\n $img2=imagecreatetruecolor(imagesx($img),imagesy($img));\r\n imagecopy($img2,$img,0,0,0,0,imagesx($img),imagesy($img));\r\n imagedestroy($img);\r\n $img=$img2;\r\n imagetruecolortopalette($img,true,255);\r\n\r\n };\r\n $Pruhledna=imagecolorallocate($img,0,0,0);\r\n for($y=0;$y<$Ikona[$IconID][\"Height\"];$y++)\r\n for($x=0;$x<$Ikona[$IconID][\"Width\"];$x++)\r\n if($Ikona[$IconID][\"Maska\"][$x][$y]==1)\r\n {\r\n imagesetpixel($img,$x,$y,$Pruhledna);\r\n };\r\n imagecolortransparent($img,$Pruhledna);\r\n };\r\n\r\nreturn $img;\r\n\r\n\r\n}", "title": "" }, { "docid": "075115183d42d44388aca423897d3c53", "score": "0.62579376", "text": "function add_image ( $args = array() ) {\n\t/*\n\t'path' => '',\n\t'class' => '',\n\t'img_attr' => array(),\n\t'link' => '',\n\t'link_title' => '',\n\t'caption' => '',\n\t'caption_attr' => array(),\n\t'caption_pos' => 'bottom'\n\t*/\n\n\t$output = '';\n\n\t// Default Variables\n\t$i_vals = '';\n\t$c_vals = '';\n\t$alt_text = '';\n\n\t// Set ID for image container\n\t$id = ( isset( $args['id'] ) && ! empty ( $args['id'] ) ) ? 'id=\"' . $args['id'] . '\"' : '';\n\t// Set Class for image container\n\t$class = ( ! empty ( $args['class'] ) ) ? 'class=\"' . $args['class'] .'\"' : '';\n\n\t// setup the img attributes\n\tif ( ! empty ( $args['img_attr'] ) && is_array( $args['img_attr'] ) ) {\n\t\tforeach ( $args['img_attr'] as $i_attr => $i_val ) {\n\t\t\t$i_vals .= ' ' . $i_attr . '=\"' . $i_val . '\"';\n\t\t}\n\t}\n\n\t// Getting Image alt text\n\t$alt_patt = array( '/(.jpg|.png|.bmp|.svg|.gif|.jpeg)/', '/[-_]/' );\n\t$alt_repl = array( '', ' ' );\n\t$cleaned_path = preg_replace( $alt_patt, $alt_repl, $args['path'] );\n\t$exploded_path = explode( '/', $cleaned_path);\n\t$alt_text = 'alt=\"' . end( $exploded_path ) . '\"';\n\n\t// setup caption position default value\n\t$caption_pos = ( isset( $arg['caption_pos'] ) && ! empty( $arg['caption_pos'] ) ) ? $arg['caption_pos'] : 'bottom';\n\t\n\t// setup caption attributes\n\tif ( ! empty ( $args['caption_attr'] ) ) {\n\t\tforeach ( $args['caption_attr'] as $c_attr => $c_val ) {\n\t\t\t$c_vals .= ' ' . $c_attr . '=\"' . $c_val . '\"';\n\t\t}\n\t}\n\t\n\t// set the link titles if any\n\t$link_title = '';\n\tif ( isset( $args['link'] ) && ! empty ( $args['link'] ) ) {\n\t\t$link_title = str_replace( array( '-', '_' ), '', $args['link'] );\n\t}\n\t\n\t// print the whole set containing figure, img and figcation tags\n\t$output .= sprintf ( '<figure %1$s %2$s>', $id, $class );\n\t\n\t\t// top caption\n\t\tif ( $caption_pos == 'top' ) {\n\t\t\tif ( ! empty ( $args['caption'] ) ) {\n\t\t\t\t$output .= sprintf ( '<figcaption %1$s><span>%2$s</span></caption>', $c_vals, $args['caption'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Actual image tag\n\t\tif ( ! empty ( $args['link'] ) ) {\n\t\t\t$output .= sprintf ( '<a class=\"img-link\" href=\"%3$s\" title=\"%4$s\"><img %1$s src=\"%2$s\" %5$s/></a>', $i_vals, $args['path'], $args['link'], $link_title, $alt_text );\n\t\t} else {\n\t\t\t$output .= sprintf ( '<img %1$s src=\"%2$s\" %3$s/>', $i_vals, $args['path'], $alt_text );\n\t\t}\n\t\t\n\t\t// bottom caption\n\t\tif ( $caption_pos == 'bottom' ) {\n\t\t\tif ( ! empty ( $args['caption'] ) ) {\n\t\t\t\t$output .= sprintf ( '<figcaption %1$s><span>%2$s</span></caption>', $c_vals, $args['caption'] );\n\t\t\t}\n\t\t}\n\t\t\n\t$output .= sprintf ( '</figure>' );\n\n\techo $output;\n}", "title": "" }, { "docid": "873885130d2559f268af32fc2554da9a", "score": "0.6257819", "text": "function processImage($dir, $filename) {\n// Set up the variables\n$dir = $dir . '/';\n \n// Set up the image path\n$image_path = $dir . $filename;\n \n// Set up the thumbnail image path\n$image_path_tn = $dir.makeThumbnailName($filename);\n \n// Create a thumbnail image that's a maximum of 200 pixels square\nresizeImage($image_path, $image_path_tn, 200, 200);\n \n// Resize original to a maximum of 500 pixels square\nresizeImage($image_path, $image_path, 500, 500);\n}", "title": "" }, { "docid": "95411aa39bd2ac4d08d263ff097ef245", "score": "0.62551904", "text": "function get_image_output($SUBPATH, $NAME, $TITLE, $NO_TEXT = '', $SHOW_TITLE = TRUE, $OTHER = FALSE)\n{\n if (image_exists($SUBPATH, $NAME)) {\n return get_image_html(image_url($SUBPATH, $NAME, FALSE), $TITLE, $SHOW_TITLE, $OTHER);\n } else {\n return $NO_TEXT;\n }\n}", "title": "" }, { "docid": "e2e9afdf5ce80c997d5dd3ec3cd2f7a7", "score": "0.6240867", "text": "function imageTag($address, $alt=NULL, $width=NULL, $height=NULL, $border=0, $blank=FALSE){\r\r\n $dimensions = NULL;\r\r\n\r\r\n if ($GLOBALS['core']->isHub){\r\r\n $checkDir = str_replace(PHPWS_SOURCE_HTTP, PHPWS_SOURCE_DIR, $address);\r\r\n $address = str_replace(\"http://\", \"\", $address);\r\r\n $address = str_replace(PHPWS_SOURCE_HTTP, \"\", $address);\r\r\n }\r\r\n else {\r\r\n if (stristr($address, PHPWS_HOME_HTTP . \"images/\")) {\r\r\n\t$checkDir = str_replace(PHPWS_HOME_HTTP, PHPWS_HOME_DIR, $address);\r\r\n\t$address = str_replace(\"http://\", \"\", $address);\r\r\n\t$address = str_replace(PHPWS_HOME_HTTP, \"\", $address);\r\r\n }\r\r\n else if($address[0] == '.' && $address[1] == '/') {\r\r\n\t//relative link, no modifications needed \r\r\n\t\r\r\n } else {\r\r\n\t$checkDir = str_replace(PHPWS_SOURCE_HTTP, PHPWS_SOURCE_DIR, $address);\r\r\n\t$address = PHPWS_Text::checkLink($address);\r\r\n }\r\r\n }\r\r\n\r\r\n if (is_null($width) && is_null($height)){\r\r\n $size = @getimagesize($checkDir);\r\r\n if ($size == FALSE)\r\r\n\treturn NULL;\r\r\n else\r\r\n\t$dimensions = \" \" . $size[3];\r\r\n } else {\r\r\n if (isset($width))\r\r\n\t$dimensions .= \" width=\\\"$width\\\"\";\r\r\n if (isset($height))\r\r\n\t$dimensions .= \" height=\\\"$height\\\"\";\r\r\n }\r\r\n\r\r\n $border = \" border=\\\"$border\\\"\";\r\r\n $alt = \" alt=\\\"\" . strip_tags($alt) . \"\\\"\";\r\r\n $image = \"<img src=\\\"$address\\\"\" . $dimensions . $border . $alt . \" />\";\r\r\n\r\r\n return $image;\r\r\n }", "title": "" }, { "docid": "cb20a021f415765fb4d5df04795b93e6", "score": "0.62236094", "text": "function tep_links_image($src, $alt = '', $width = '', $height = '', $parameters = '') {\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n $image = '<img src=\"' . tep_output_string($src) . '\" border=\"0\" alt=\"' . tep_output_string($alt) . '\"';\n\n if (tep_not_null($alt)) {\n $image .= ' title=\" ' . tep_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && tep_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (tep_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n // VJ begin maintain image proportion\n $calculate_image_proportion = 'true';\n\n if( ($calculate_image_proportion == 'true') && (!empty($width) && !empty($height))) {\n if ($image_size = @getimagesize($src)) {\n $image_width = $image_size[0];\n $image_height = $image_size[1];\n\n if (($image_width != 1) && ($image_height != 1)) {\n $whfactor = $image_width/$image_height;\n $hwfactor = $image_height/$image_width;\n\n if ( !($image_width > $width) && !($image_height > $height)) {\n $width = $image_width;\n $height = $image_height;\n } elseif ( ($image_width > $width) && !($image_height > $height)) {\n $height = $width * $hwfactor;\n } elseif ( !($image_width > $width) && ($image_height > $height)) {\n $width = $height * $whfactor;\n } elseif ( ($image_width > $width) && ($image_height > $height)) {\n if ($image_width > $image_height) {\n $height = $width * $hwfactor;\n } else {\n $width = $height * $whfactor;\n }\n }\n }\n }\n }\n //VJ end maintain image proportion\n\n if (tep_not_null($width) && tep_not_null($height)) {\n $image .= ' width=\"' . tep_output_string($width) . '\" height=\"' . tep_output_string($height) . '\"';\n }\n\n if (tep_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= '>';\n\n return $image;\n }", "title": "" }, { "docid": "a56aa6b2b00e62d6beb579e7c8429910", "score": "0.62231815", "text": "function resizeImage($old_image_path, $new_image_path, $max_width, $max_height) {\n \n// Get image type\n$image_info = getimagesize($old_image_path);\n$image_type = $image_info[2];\n \n// Set up the function names\nswitch ($image_type) {\ncase IMAGETYPE_JPEG:\n$image_from_file = 'imagecreatefromjpeg';\n$image_to_file = 'imagejpeg';\nbreak;\n\ncase IMAGETYPE_GIF:\n$image_from_file = 'imagecreatefromgif';\n$image_to_file = 'imagegif';\nbreak;\n\ncase IMAGETYPE_PNG:\n$image_from_file = 'imagecreatefrompng';\n$image_to_file = 'imagepng';\nbreak;\ndefault:\nreturn;\n} \n// ends the switch\n \n// Get the old image and its height and width\n$old_image = $image_from_file($old_image_path);\n$old_width = imagesx($old_image);\n$old_height = imagesy($old_image);\n \n// Calculate height and width ratios\n$width_ratio = $old_width / $max_width;\n$height_ratio = $old_height / $max_height;\n \n// If image is larger than specified ratio, create the new image\nif ($width_ratio > 1 || $height_ratio > 1) {\n \n// Calculate height and width for the new image\n$ratio = max($width_ratio, $height_ratio);\n$new_height = round($old_height / $ratio);\n$new_width = round($old_width / $ratio);\n \n// Create the new image\n$new_image = imagecreatetruecolor($new_width, $new_height);\n \n// Set transparency according to image type\nif ($image_type == IMAGETYPE_GIF) {\n$alpha = imagecolorallocatealpha($new_image, 0, 0, 0, 127);\nimagecolortransparent($new_image, $alpha);\n}\n \nif ($image_type == IMAGETYPE_PNG || $image_type == IMAGETYPE_GIF) {\nimagealphablending($new_image, false);\nimagesavealpha($new_image, true);\n}\n \n// Copy old image to new image - this resizes the image\n$new_x = 0;\n$new_y = 0;\n$old_x = 0;\n$old_y = 0;\nimagecopyresampled($new_image, $old_image, $new_x, $new_y, $old_x, $old_y, $new_width, $new_height, $old_width, $old_height);\n \n// Write the new image to a new file\n$image_to_file($new_image, $new_image_path);\n// Free any memory associated with the new image\n imagedestroy($new_image);\n} else {\n// Write the old image to a new file\n$image_to_file($old_image, $new_image_path);\n}\n// Free any memory associated with the old image\nimagedestroy($old_image);\n}", "title": "" }, { "docid": "4e6ace0acbc76aa52d7f299b5031f4a3", "score": "0.620876", "text": "function image_creation_im($width=0,$height=0,$left=0,$top=0,$path=\"/usr/bin/mogrify\"){\n\t\t$this->height = $height?$height:$this->height;\n\t\t$this->width = $height?$width:$this->width;\t\t\n\t\t$this->left = $left?$left:$this->left;\n\t\t$this->top = $top?$top:$this->top;\t\n\t\t$cmd = \"{$path} -quality {$this->quality} -resize '{$this->width}x{$this->height}>+{$this->left}+{$this->top}' {$this->target}\";\n\t\texec($cmd);\n\t\tchmod($this->target,0644);\n\t\t\t\n\t}", "title": "" }, { "docid": "a538b48f87e02e1ead1fe717363fd68a", "score": "0.62030756", "text": "function upload_img($IMAGE, $SUBPATH, $NAME, $MAX_SIZE, $MAX_WIDTH, $MAX_HEIGHT, $QUALITY = 100, $THIS_SIZE = false)\n{\n global $FD;\n\n // Get Image Data\n $image_data = getimagesize($IMAGE['tmp_name']);\n switch ($image_data[2]) {\n case 1:\n $type = 'gif';\n break;\n case 2:\n $type = 'jpg';\n break;\n case 3:\n $type = 'png';\n break;\n default:\n return 1; // Error 1: Ung�ltiger Dateityp!\n }\n\n // Check Options\n if ($IMAGE['tmp_name'] != 0) {\n return 2; // Error 2: Fehler beim Datei-Upload!\n }\n if ($IMAGE['size'] > $MAX_SIZE) {\n return 3; // Error 3: Das Bild ist zu gro�! (Dateigr��e)\n }\n if ($image_data[0] > $MAX_WIDTH || $image_data[1] > $MAX_HEIGHT) {\n return 4; // Error 4: Das Bild ist zu gro�! (Abmessungen)\n }\n if ($THIS_SIZE == TRUE && ($image_data[0] != $MAX_WIDTH || $image_data[1] != $MAX_HEIGHT)) {\n return 5; // Error 5: Das Bild ist entspricht nicht den erforderlichen Abmessungen!\n }\n\n // Create Image\n $full_path = FS2MEDIA . $SUBPATH . '/' . $NAME . '.' . $type;\n move_uploaded_file($IMAGE['tmp_name'], $full_path);\n chmod($full_path, 0644);\n clearstatcache();\n\n if (image_exists($SUBPATH, $NAME)) {\n return 0; // Display 0: Das Bild wurde erfolgreich hochgeladen!\n } else {\n return 6; // Error 6: Fehler bei der Bild erstellung\n }\n}", "title": "" }, { "docid": "b55306b3d253eb4c88c08e9a270a3a22", "score": "0.6200714", "text": "function resizeImages($image,$new_w,$urlUp){\r\n\t$data = getimagesize($image);\r\n\t$w = $data[0];\r\n\t$h = $data[1];\r\n\t$width = $new_w;\r\n $height = ($new_w/$w)*$h;\r\n $image2 = imagecreatetruecolor($width, $height);\r\n $type = exif_imagetype($image);\r\n switch ($type) {\r\n\t case IMAGETYPE_GIF:\r\n\t\t $image1 = imagecreatefromgif($image);\r\n\t\t imagecopyresampled($image2,$image1, 0, 0, 0, 0, $width, $height, $w, $h);\r\n\t\t imagegif($image2, $urlUp, 100);\r\n\t break;\r\n\t case IMAGETYPE_PNG:\r\n\t\t $image1 = imagecreatefrompng($image);\r\n\t\t imagecopyresampled($image2,$image1, 0, 0, 0, 0, $width, $height, $w, $h);\r\n\t\t imagepng($image2, $urlUp,9);\r\n\t break;\r\n\t case IMAGETYPE_JPEG:\r\n\t\t $image1 = imagecreatefromjpeg($image);\r\n\t\t imagecopyresampled($image2,$image1, 0, 0, 0, 0, $width, $height, $w, $h);\r\n\t\t imagejpeg($image2, $urlUp, 100);\r\n\t break;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "3095db5c69ab88476d62434297522b7c", "score": "0.61895233", "text": "function rotateImage($img, $rotation) {\n $width = imagesx($img);\n $height = imagesy($img);\n switch($rotation) {\n case 90: $newimg= @imagecreatetruecolor($height , $width );break;\n case 180: $newimg= @imagecreatetruecolor($width , $height );break;\n case 270: $newimg= @imagecreatetruecolor($height , $width );break;\n case 0: return $img;break;\n case 360: return $img;break;\n }\n if($newimg) { \n for($i = 0;$i < $width ; $i++) { \n for($j = 0;$j < $height ; $j++) {\n $reference = imagecolorat($img,$i,$j);\n switch($rotation) {\n case 90: if(!@imagesetpixel($newimg, ($height - 1) - $j, $i, $reference )){return false;}break;\n case 180: if(!@imagesetpixel($newimg, $width - $i, ($height - 1) - $j, $reference )){return false;}break;\n case 270: if(!@imagesetpixel($newimg, $j, $width - $i, $reference )){return false;}break;\n }\n } \n } return $newimg; \n } \n return false;\n}", "title": "" }, { "docid": "d0996c9853a05b670759ca364e4ca42f", "score": "0.61818206", "text": "function check_post_image() {\r\n\tif (isset($_FILES['file_image']) && $_FILES['file_image']['name'] != \"\") { //Photo upload\r\n\t\t$f = $_FILES['file_image'];\r\n\t\t$fname = strtolower($f['name']);\r\n\t\t$tmpname = $f['tmp_name'];\r\n\t\t// Let's see if image has been uploaded\r\n\t\tif (!is_uploaded_file($tmpname)) { stderr('Image upload', __('EROARE! Imaginea nu a putut fi încărcată, încercaţi s-o reîncărcaţi.')); }\r\n\t\tif (!filesize($tmpname)) { stderr('Image upload','ERROR! Uploaded image is empty.'); }\r\n\t\t// Now let's validate the image\r\n\t\tlist($width, $height, $type, $attr) = getimagesize($tmpname);\r\n\t\tif ($type != 1 && $type != 2 && $type != 3) { stderr('ERROR!', 'Only a jpg or png or gif image are allowed.'); }\r\n\t\tif ($type == 1) $ext = 'gif';\r\n\t\telseif ($type == 2) $ext = 'jpg';\r\n\t\telseif ($type == 3) $ext = 'png';\r\n\t\t// New location name\r\n\t\tif ($width < 5 || $height < 5) {\r\n\t\t\tstderr('Image upload','ERROR! The minimum image dimension is 5x5.');\r\n\t\t}\r\n\t\t$sh = substr(sha1_file($tmpname) , 0, 3);\r\n\t\t$filename = $sh . '.' . $ext;\r\n\t\treturn array($filename,$tmpname);\r\n\t}\r\n\treturn array(0,0);\r\n}", "title": "" }, { "docid": "b66d6b15d1c196ff8cea2a76ea81a281", "score": "0.61792034", "text": "abstract public function writeImage();", "title": "" }, { "docid": "e356105c402b4051bdf80b4cbff16b87", "score": "0.6166083", "text": "function taille_image($img) {\n\n\tstatic $largeur_img =array(), $hauteur_img= array();\n\t$srcWidth = 0;\n\t$srcHeight = 0;\n\n\t$logo = extraire_attribut($img,'src');\n\n\tif (!$logo) $logo = $img;\n\telse {\n\t\t$srcWidth = extraire_attribut($img,'width');\n\t\t$srcHeight = extraire_attribut($img,'height');\n\t}\n\n\t// ne jamais operer directement sur une image distante pour des raisons de perfo\n\t// la copie locale a toutes les chances d'etre la ou de resservir\n\tif (preg_match(';^(\\w{3,7}://);', $logo)){\n\t\tinclude_spip('inc/distant');\n\t\t$fichier = copie_locale($logo);\n\t\t$logo = $fichier ? _DIR_RACINE . $fichier : $logo;\n\t}\n\tif (($p=strpos($logo,'?'))!==FALSE)\n\t\t$logo=substr($logo,0,$p);\n\n\t$srcsize = false;\n\tif (isset($largeur_img[$logo]))\n\t\t$srcWidth = $largeur_img[$logo];\n\tif (isset($hauteur_img[$logo]))\n\t\t$srcHeight = $hauteur_img[$logo];\n\tif (!$srcWidth OR !$srcHeight){\n\t\tif (file_exists($logo)\n\t\t\tAND $srcsize = @getimagesize($logo)){\n\t\t\tif (!$srcWidth)\t$largeur_img[$logo] = $srcWidth = $srcsize[0];\n\t\t\tif (!$srcHeight)\t$hauteur_img[$logo] = $srcHeight = $srcsize[1];\n\t\t}\n\t\t// $logo peut etre une reference a une image temporaire dont a n'a que le log .src\n\t\t// on s'y refere, l'image sera reconstruite en temps utile si necessaire\n\t\telseif(@file_exists($f = \"$logo.src\")\n\t\t AND lire_fichier($f,$valeurs)\n\t\t AND $valeurs=unserialize($valeurs)) {\n\t\t\tif (!$srcWidth)\t$largeur_img[$logo] = $srcWidth = $valeurs[\"largeur_dest\"];\n\t\t\tif (!$srcHeight)\t$hauteur_img[$logo] = $srcHeight = $valeurs[\"hauteur_dest\"];\n\t }\n\t}\n\treturn array($srcHeight, $srcWidth);\n}", "title": "" }, { "docid": "aab55a0cff40ca528c1601d686ee84e0", "score": "0.6160785", "text": "function open_image($imagetype, $source, $data, $width, $height, $components, $bpc, $params) {}", "title": "" }, { "docid": "525a14a73ab72f3b0bb644593556b359", "score": "0.6151078", "text": "function LoadImage ( $image_file, &$image_width, &$image_height )\n { \n $image_width = 0;\n $image_height = 0; \n $image_data = $this->GetImageStr( $image_file ); \n $image = imagecreatefromstring ( $image_data );\n if ( ! $image )\n {\n $err = sprintf( E_003, $image_file );\n trigger_error( $err, E_USER_ERROR );\n } \n $image_width = imagesx ( $image );\n $image_height = imagesy ( $image ); \n return $image; \n }", "title": "" }, { "docid": "052a57045f80e20b75048e4b1310c88e", "score": "0.6148492", "text": "function mergeImg($source, $mask, $info, $attFilter) {\n $source2 = imagecreatefromstring(base64_decode($source));\n $mask2 = imagecreatefromstring(base64_decode($mask));\n\n list($targetImage, $newWidth, $newHeight) = Misc::resizeImg($source, $mask, $attFilter['width']);\n // imagecopyresized($source2, $targetImage, $info[0] / 2 - $newWidth / 2, $info[1] / 2 - $newHeight / 2, 0, 0, $newWidth, $newHeight, $newWidth, $newHeight);\n imagecopyresized($source2, $targetImage, $attFilter['offsetX'], $attFilter['offsetY'], 0, 0, $newWidth, $newHeight, $newWidth, $newHeight);\n ob_start();\n imagepng($source2);\n $final_pic = ob_get_contents();\n ob_end_clean();\n return $final_pic;\n}", "title": "" }, { "docid": "0bcaaf9295a88cca4bc5e432a655fcf9", "score": "0.61476105", "text": "function imageSet () {\n\t\n\t\n\t\n\t}", "title": "" }, { "docid": "b8935a02a7527e30ffa03def525cbfdd", "score": "0.6140367", "text": "function exif($file) {\n //This line reads the EXIF data and passes it into an array\n $exif = read_exif_data($file['file']);\n\n //We're only interested in the orientation\n $exif_orient = isset($exif['Orientation'])?$exif['Orientation']:0;\n $rotateImage = 0;\n\n //We convert the exif rotation to degrees for further use\n if (6 == $exif_orient) {\n $rotateImage = 90;\n $imageOrientation = 1;\n } elseif (3 == $exif_orient) {\n $rotateImage = 180;\n $imageOrientation = 1;\n } elseif (8 == $exif_orient) {\n $rotateImage = 270;\n $imageOrientation = 1;\n }\n\n //if the image is rotated\n if ($rotateImage) {\n\n //WordPress 3.5+ have started using Imagick, if it is available since there is a noticeable\n //difference in quality. Why spoil beautiful images by rotating them with GD, if the user\n //has Imagick?\n\n if (class_exists('Imagick')) {\n $imagick = new Imagick();\n $imagick->readImage($file['file']);\n $imagick->rotateImage(new ImagickPixel(), $rotateImage);\n $imagick->setImageOrientation($imageOrientation);\n $imagick->writeImage($file['file']);\n $imagick->clear();\n $imagick->destroy();\n } else {\n\n //if no Imagick, fallback to GD\n //GD needs negative degrees\n $rotateImage = -$rotateImage;\n\n switch ($file['type']) {\n case 'image/jpeg':\n $source = imagecreatefromjpeg($file['file']);\n $rotate = imagerotate($source, $rotateImage, 0);\n imagejpeg($rotate, $file['file']);\n break;\n case 'image/png':\n $source = imagecreatefrompng($file['file']);\n $rotate = imagerotate($source, $rotateImage, 0);\n imagepng($rotate, $file['file']);\n break;\n case 'image/gif':\n $source = imagecreatefromgif($file['file']);\n $rotate = imagerotate($source, $rotateImage, 0);\n imagegif($rotate, $file['file']);\n break;\n default:\n break;\n }\n }\n }\n // The image orientation is fixed, pass it back for further processing\n return $file;\n}", "title": "" }, { "docid": "82f62b95752ea967d19827661dbb3844", "score": "0.6133498", "text": "function resizeImage($image,$width,$height,$scale) {\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$image); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$image,100); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$image); \n\t\t\tbreak;\n }\n\t\n\tchmod($image, 0777);\n\treturn $image;\n}", "title": "" }, { "docid": "dd86d1616ec5573533eb7c646f6477a9", "score": "0.61293834", "text": "function image($file, $key, array &$errors=array()) {\n $img_extensions=[\"jpg\", \"png\"];\n $extension=pathinfo($file['name'])['extension'];\n if( !in_array($extension, $img_extensions) ) {\n $errors[$key]=\"selected file not an image\";\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "1ac17c6093590badfa761174d9738015", "score": "0.6126268", "text": "function validimage($typeupload, $image, &$error){\r\r\n $validlist = array(\"image/pjpeg\", \"image/jpeg\", \"image/jpg\", \"image/gif\", \"image/png\", \"image/x-png\");\r\r\n $validsize = 2097152; // 2M in bytes\r\r\n \r\r\n $minwidth = 0;\r\r\n $minheight = 0;\r\r\n\r\r\n switch($typeupload){\r\r\n /*case \"pays\":\r\r\n break;\r\r\n case \"provinceetat\":\r\r\n break;*/\r\r\n case \"regiontouristique\":\r\r\n break;\r\r\n case \"zone\":\r\r\n break;\r\r\n case \"ville\":\r\r\n break;\r\r\n case \"modepaiement\":\r\r\n break;\r\r\n case \"affiliation\":\r\r\n break;\r\r\n case \"categorieattrait\":\r\r\n break;\r\r\n case \"souscategorieattrait\":\r\r\n break;\r\r\n case \"provinceetatsouscategorieattrait\":\r\r\n break;\r\r\n case \"zonesouscategorieattrait\":\r\r\n break;\r\r\n case \"activiteattrait\":\r\r\n break;\r\r\n case \"serviceattrait\":\r\r\n break;\r\r\n case \"typesoinsante\":\r\r\n break;\r\r\n case \"provinceetatcategoriehebergement\":\r\r\n break;\r\r\n case \"categoriehebergementcotation\":\r\r\n break;\r\r\n case \"typecotationcotation\":\r\r\n break;\r\r\n case \"hebergement\":\r\r\n $minwidth = 600;\r\r\n $minheight = 400;\r\r\n break;\r\r\n case \"attrait\":\r\r\n $minwidth = 600;\r\r\n $minheight = 400;\r\r\n break;\r\r\n case \"regiontouristiquevedette\":\r\r\n break;\r\r\n case \"echoattrait\":\r\r\n break;\r\r\n case \"echohebergement\":\r\r\n break;\r\r\n case \"festivalattrait\":\r\r\n break;\r\r\n case \"thematique\":\r\r\n break;\r\r\n case \"thematiqueitem\":\r\r\n break;\r\r\n case \"qcstypeforfait\":\r\r\n break;\r\r\n case \"qcsforfait\":\r\r\n break;\r\r\n }\r\r\n\r\r\n //valid the type (mimetype)\r\r\n if(!in_array($image[\"type\"], $validlist)){\r\r\n $error = \"File Type Error \".\r\r\n \"Your type is \".$image[\"type\"].\r\r\n \"Accepted types ==> \".join(\", \", $validlist);\r\r\n return 0;\r\r\n }\r\r\n\r\r\n //valid the size\r\r\n if($validsize < $image[\"size\"]){\r\r\n $error = \"File Size Error \".\r\r\n \"Your size is \".($image[\"size\"] / 1024).\" Ko \".\r\r\n \"Maximum size ==> \".($validsize / 1024).\" Ko\";\r\r\n return 0;\r\r\n }\r\r\n \r\r\n //valid the dimensions\r\r\n list($current_width, $current_height) = getimagesize($image[\"tmp_name\"]);\r\r\n\r\r\n if($current_width < $minwidth || $current_height < $minheight){\r\r\n $error = \"File Dimensions Error\".\r\r\n \"Minimum is \".$minwidth.\" x \".$minheight.\r\r\n \"Your file is \".$current_width.\" x \".$current_height;\r\r\n //remove the file from server on the tmp folder\r\r\n unlink($image[\"tmp_name\"]);\r\r\n return 0;\r\r\n }\r\r\n\r\r\n return 1;\r\r\n }", "title": "" }, { "docid": "e7c370fe9d74535e8453cee3bde468bf", "score": "0.61238664", "text": "function add_thumbnail($image) {}", "title": "" }, { "docid": "4cca323cbf51368da1e82d359a694341", "score": "0.6120258", "text": "function imageconverttruecolor(&$image)\n{ \n $width = imagesx($image); \n $height = imagesy($image); \n $final = imagecreatetruecolor($width, $height); \n imagecopy($final, $image, 0, 0, 0, 0, $width, $height); \n imagedestroy($image); $image = $final;\n}", "title": "" }, { "docid": "fcab21e3d747112c61030a895a822dc6", "score": "0.6109137", "text": "function is_image($data){\n $valid = array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF);\n $info = getimagesize($data);\n if(in_array($info[2], $valid)){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "36c5b006a75a4f85da0970df655637ef", "score": "0.61072916", "text": "function normalizeImage($source = null, $export = null)\n {\n if ($source !== null)\n {\n $w = imagesx($source);\n $h = imagesy($source);\n\n $link = null;\n $date = null;\n\n $array2D = array();\n $oddUpper = true;\n $oddLeft = true;\n $array1D = array();\n\n //Super Arreglo normalizado inicial\n for ($x = 0; $x < $this->maxWidth; $x++)\n {\n $arrayInter = array();\n for ($y = 0; $y < $this->maxHeight; $y++)\n {\n $rgb = imagecolorat($source, $x, $y);\n $r = ($rgb >> 16) & 0xFF;\n $g = ($rgb >> 8) & 0xFF;\n $b = $rgb & 0xFF;\n\n if ($x >= $w)\n {\n $arrayInter[] = 0;\n }\n else if ($y >= $h)\n {\n if ($oddLeft)\n {\n array_unshift($arrayInter, 0);\n }\n else\n {\n $arrayInter[] = intval(0);\n }\n\n $oddLeft = !$oddLeft;\n }\n else if ($r > 200 && $g > 200 && $b > 200) //blanco\n {\n //echo \"0\";\n $arrayInter[$y] = intval(0);\n }\n else\n {\n //echo \"1\";\n $arrayInter[$y] = intval(1);\n }\n }\n\n if ($x >= $w)\n {\n if ($oddUpper)\n {\n array_unshift($array2D, $arrayInter);\n }\n else\n {\n $array2D[] = $arrayInter;\n }\n\n $oddUpper = !$oddUpper;\n }\n else\n {\n $array2D[] = $arrayInter;\n }\n }\n\n if ($export !== null)\n {\n $link = fopen($export, \"w\");\n \n }\n\n for ($x = 0; $x < $this->maxWidth; $x++)\n { \n for ($y = 0 ; $y < $this->maxHeight; $y++)\n { \n if ($export !== null)\n {\n fwrite($link, $array2D[$y][$x]);\n }\n\n $array1D[] = $array2D[$y][$x];\n }\n\n if ($export !== null)\n {\n fwrite($link, \"\\n\");\n }\n }\n\n if ($export !== null)\n {\n fclose($link);\n }\n\n return $array1D;\n }\n else\n {\n //echo \"No picture for normalize\";\n return null;\n }\n }", "title": "" }, { "docid": "e0861a27c49202cedfe077ad18e328f4", "score": "0.61070156", "text": "function thumbnail($source,$thumb_width,$destination){\n\t//$image=\"\";\n\t$ext = substr(strrchr($source, \".\"), 1); \t\n\t$size = getimagesize($source);\n\t$width = $size[0];\n\t$height = $size[1];\n\t$x = 0;\n\t$y = 0;\n\tif ($width > $height){\n\t\t$x = ceil(($width - $height) / 2 );\n\t\t$width = $height;\n\t}\n\telseif($height > $width ){\n\t\t$y = ceil(($height - $width) / 2);\n\t\t$height = $width;\n\t}\n\t$newimage = @imagecreatetruecolor($thumb_width,$thumb_width) or die(\"Cannot GD image stream\");\n\tswitch ($ext){\n\t\tcase\"jpg\":\n\t\t$image = imagecreatefromjpeg($source);\n\t\tbreak;\n\t\tcase\"JPG\":\n\t\t$image = imagecreatefromjpeg($source);\n\t\tbreak;\n\t\tcase\"JPEG\":\n\t\t$image = imagecreatefromjpeg($source);\n\t\tbreak;\n\t\tcase\"jpeg\":\n\t\t$image = imagecreatefromjpeg($source);\n\t\tbreak;\n\t\tcase\"gif\":\n\t\t$image = imagecreatefromgif($source);\n\t\tbreak;\n\t\tcase\"png\":\n\t\t$image = imagecreatefrompng($source);\n\t\tbreak;\n\t}\n\timagecopyresampled($newimage,$image,0,0,$x,$y,$thumb_width,$thumb_width,$width,$height);\n\t//imageantialias($destination, TRUE);\n\t\t\n\t\tswitch ($ext){\n\t\tcase\"jpg\":\n\t\timagejpeg($newimage,$destination);\n\t\tbreak;\n\t\tcase\"JPG\":\n\t\timagejpeg($newimage,$destination);\n\t\tbreak;\n\t\tcase\"JPEG\":\n\t\timagejpeg($newimage,$destination);\n\t\tbreak;\n\t\tcase\"jpeg\":\n\t\timagejpeg($newimage,$destination);\n\t\tbreak;\n\t\tcase\"gif\":\n\t\timagegif($newimage,$destination);\n\t\tbreak;\n\t\tcase\"png\":\n\t\timagepng($newimage,$destination);\n\t\tbreak;\n\t}\n\t\n}", "title": "" }, { "docid": "e08ac7e68df28fd4bf58be8298466ccc", "score": "0.6095119", "text": "function uploadImg($tmp, $nome, $tipo, $largura, $pasta, $redimensiona){\n\tif($redimensiona == 'S'):\n\t\tif(($tipo == 'image/jpg') or ($tipo == 'image/jpeg') or ($tipo == 'image/pjpeg')):\n\t\t\t$img = imagecreatefromjpeg($tmp);\n\t\tendif;\n\t\tif($tipo == 'image/gif'):\n\t\t\t$img = imagecreatefromgif($tmp);\n\t\tendif;\n\t\tif($tipo == 'image/png' || $tipo == 'image/x-png'):\n\t\t\t$img = imagecreatefrompng($tmp);\n\t\tendif;\n\t\t$x = imagesx($img);\n\t\t$y = imagesy($img);\n\t\tif($x > $largura):\n\t\t\t$altura = ($largura * $y) / $x; // CALCULA ALTURA\n\t\telse:\n\t\t\t$largura = $x;\n\t\t\t$altura = $y; //N�O CALCULA ALTURA\n\t\tendif;\n\t\t$nova = imagecreatetruecolor($largura, $altura);\n\t\t\n\t\tif($tipo == 'image/png' || $tipo == 'image/x-png'):\n\t\t\timagealphablending($nova, false);\n\t\t\timagesavealpha($nova, true);\n\t\t\t$transparent = imagecolorallocatealpha($nova, 255, 255, 255, 127);\n\t\t\timagefilledrectangle($nova, 0, 0, $largura, $altura, $transparent);\n\t\tendif;\n\t\t\n\t\timagecopyresampled($nova, $img, 0, 0, 0, 0, $largura, $altura, $x, $y);\n\t\t\n\t\tif(($tipo == 'image/jpg') or ($tipo == 'image/jpeg') or ($tipo == 'image/pjpeg')):\n\t\t\timagejpeg($nova, \"$pasta/$nome\");\n\t\t\timagedestroy($nova);\n\t\t\timagedestroy($img);\n\t\tendif;\n\t\tif($tipo == 'image/gif'):\n\t\t\t$img = imagegif($nova, \"$pasta/$nome\");\n\t\t\timagedestroy($nova);\n\t\tendif;\n\t\tif($tipo == 'image/png' || $tipo == 'image/x-png'):\n\t\t\timagepng($nova, \"$pasta/$nome\");\n\t\t\timagedestroy($nova);\n\t\t\timagedestroy($img);\n\t\tendif;\n\telse:\n\t\tmove_uploaded_file($tmp,\"$pasta/$nome\"); // Aqui, efetuamos o upload, propriamente dito\n\tendif;\n\treturn $nome;\n}", "title": "" }, { "docid": "24c29103ae36a9c27d2e6c5dfbc723a8", "score": "0.6095024", "text": "function mc_image_url($_image_name)\n{\n return base_url(___CONF_UPLOAD_DIR___ . ___CONF_UPLOAD_IMAGE_DIR___) . $_image_name;\n}", "title": "" }, { "docid": "d2891810696a092f8b9a283cd0db3328", "score": "0.60905695", "text": "function process_image($filename, $orig, $username) {\n global $max_width, $max_height;\n global $thumb_width, $thumb_height;\n global $err_width, $err_height;\n global $format;\n global $output_dir;\n\n $ident = run_cmd(\"identify\", $filename);\n $dbg = $ident[2];\n if ($ident[1]) {\n return \"Not an image file\";\n }\n $info = explode(\" \", $ident[0]);\n $size = $info[2];\n $size_ar = explode(\"x\", $size);\n $width = $size_ar[0];\n $height = $size_ar[1];\n $output_filename = \"00\"\n . preg_replace(\"/[^0-9]/\", \"\", $username)\n . \"-\"\n . preg_replace(\"/[^0-9a-zA-Z]/\", \"\", $orig)\n . \"-\";\n\n $new_width = $width;\n $new_height = $height;\n\n $new_t_width = $width;\n $new_t_height = $height;\n\n /* Calculate new minimum X */\n $new_width_1 = $max_width;\n $new_height_1 = (int)(($max_width * 1.0 / $width) * $height);\n $new_t_width_1 = $thumb_width;\n $new_t_height_1 = (int)(($thumb_width * 1.0 / $width) * $height);\n\n /* Calculate new minimum Y */\n $new_height_2 = $max_height;\n $new_width_2 = (int)(($max_height * 1.0 / $height) * $width);\n $new_t_height_2 = $thumb_height;\n $new_t_width_2 = (int)(($thumb_height * 1.0 / $height) * $width);\n\n if (!is_dir($output_dir)) {\n return \"Output directory doesn't exist\";\n }\n\n\n /* Determine if we need to resize the image */\n if ( ($width > $err_width) || ($height > $err_height) ) {\n return \"Size exceeds maximum of \".$err_width.\"x\".$err_height;\n }\n\n if ( ($new_width <= $max_width) && ($new_height <= $max_height) ) {\n $dbg .= \"Image dimensions are fine.\\n\";\n }\n else if (($new_width_1 <= $max_width) && ($new_height_1 <= $max_height)) {\n $new_width = $new_width_1;\n $new_height = $new_height_1;\n $dbg .= \"Taking size 1: $new_width x $new_height\\n\";\n }\n else if (($new_width_2 <= $max_width) && ($new_height_2 <= $max_height)) {\n $new_width = $new_width_2;\n $new_height = $new_height_2;\n $dbg .= \"Taking size 2: $new_width x $new_height\\n\";\n }\n\n\n /* Determine if we need to resize the thumbnail */\n if ( ($new_t_width <= $thumb_width) && ($new_theight <= $thumb_height) ) {\n $dbg .= \"Thumb size was okay\\n\";\n }\n else if (($new_t_width_1 <= $thumb_width) && ($new_t_height_1 <= $thumb_height)) {\n $new_t_width = $new_t_width_1;\n $new_t_height = $new_t_height_1;\n $dbg .= \"Taking thumb size 1: $new_t_width x $new_t_height\\n\";\n }\n else if (($new_t_width_2 <= $thumb_width) && ($new_t_height_2 <= $thumb_height)) {\n $new_t_width = $new_t_width_2;\n $new_t_height = $new_t_height_2;\n $dbg .= \"Taking thumb size 2: $new_t_width x $new_t_height\\n\";\n }\n\n\n $base_filename = tempnam($output_dir, $output_filename);\n unlink($base_filename);\n $dbg .= \"Base filename: $base_filename\\n\";\n\n\n $dbg .= \"File: [$filename] Ident: [$ident] Size: [$size] Width: $width Height: $height New width: [$new_width] New height: [$new_height]\\n\";\n\n /* Perform the resize */\n $result = run_cmd(\"convert\", \"$filename -resize \" . $new_width . \"x\" . $new_height . \" \" . $base_filename . \".\" . $format);\n $dbg .= \"Result of command \" . $result[2] . \": \" . $result[0] . \"\\n\";\n if ($result[1]) {\n unlink($base_filename . \".\" . $format);\n unlink($base_filename . \"-thumb.\" . $format);\n return \"Unable to resize image\";\n }\n\n /* Generate the thumbnail */\n $result = run_cmd(\"convert\", \"$filename -resize \" . $new_t_width . \"x\" . $new_t_height . \" \" . $base_filename . \"-thumb.\" . $format);\n $dbg .= \"Result of command \" . $result[2] . \": \" . $result[0] . \"\\n\";\n if ($result[1]) {\n unlink($base_filename . \".\" . $format);\n unlink($base_filename . \"-thumb.\" . $format);\n return \"Unable to generate thumbnail\";\n }\n\n return;\n}", "title": "" }, { "docid": "831387db31f210f5ae862359b77c0cb7", "score": "0.60897654", "text": "function resizeImage($CurWidth,$CurHeight,$MaxSize,$DestFolder,$SrcImage,$Quality,$ImageType)\n{\n\tif($CurWidth <= 0 || $CurHeight <= 0) \n\t{\n\t\treturn false;\n\t}\n\t\n\t//Construct a proportional size of new image\n\t$ImageScale \t= min($MaxSize/$CurWidth, $MaxSize/$CurHeight); \n\t$NewWidth \t\t\t= ceil($ImageScale*$CurWidth);\n\t$NewHeight \t\t\t= ceil($ImageScale*$CurHeight);\n\t$NewCanves \t\t\t= imagecreatetruecolor($NewWidth, $NewHeight);\n\t\n\timagealphablending($NewCanves, false);\n imagesavealpha($NewCanves,true);\n $transparent = imagecolorallocatealpha($NewCanves, 255, 255, 255, 127);\n imagefilledrectangle($NewCanves, 0, 0, $NewWidth, $NewHeight, $transparent);\n \n\t\n\t// Resize Image\n\tif(imagecopyresampled($NewCanves, $SrcImage,0, 0, 0, 0, $NewWidth, $NewHeight, $CurWidth, $CurHeight))\n\t{\n\t\tswitch(strtolower($ImageType))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\timagepng($NewCanves,$DestFolder);\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\timagegif($NewCanves,$DestFolder);\n\t\t\t\tbreak;\t\t\t\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\t\timagejpeg($NewCanves,$DestFolder,$Quality);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t//Destroy image, frees memory\t\n\tif(is_resource($NewCanves)) {imagedestroy($NewCanves);} \n\treturn true;\n\t}\n\n}", "title": "" }, { "docid": "293eea86be0e9ef44b957a2f5f297267", "score": "0.6089341", "text": "function image_available(){\n\t\treturn function_exists('imagecreate');\n\t}", "title": "" }, { "docid": "6d703c6e41cd3b836bcd57dc39d5c680", "score": "0.60885185", "text": "function um_admin_header_image() {\n\n}", "title": "" }, { "docid": "dac01ef06b96035d6d77d8a3e47764d6", "score": "0.6087742", "text": "function ps_place_image($psdoc, $imageid, $x, $y, $scale) {}", "title": "" }, { "docid": "a1cd1b683c86cefbb5c9afcffe610831", "score": "0.6075616", "text": "function get_image($name, $images='', $options=array()){\r\n\t\tglobal $get_image;\r\n\t\tunset($get_image);\r\n\t\textract($options);\r\n\t\tif($externalImageFunction){\r\n\t\t\t//Added 2008-10-31 - this allows an external function to process, it must globalize $get_image - with nodes of name (case-sensitive), width, and height. The source returned must be the actual path to the image plus name\r\n\t\t\treturn $externalImageFunction($name, $images='', $options);\r\n\t\t}\r\n\t\t//assume image array = $images if not explicitly passed\r\n\t\tif(!$images)global $images;\r\n\t\tswitch(true){\r\n\t\t\tcase $a=$images[strtolower($imagePrefix).strtolower($name).strtolower($imageSuffix).'.jpg']:\r\n\t\t\t\t$get_image=$a;\r\n\t\t\tbreak;\r\n\t\t\tcase $a=$images[strtolower($imagePrefix).strtolower($name).strtolower($imageSuffix).'.gif']:\r\n\t\t\t\t$get_image=$a;\r\n\t\t\tbreak;\r\n\t\t\tcase $a=$images[strtolower($imagePrefix).strtolower($name).strtolower($imageSuffix).'.png']:\r\n\t\t\t\t$get_image=$a;\r\n\t\t\tbreak;\r\n\t\t\tcase $a=$images[strtolower($imagePrefix).strtolower($name).strtolower($imageSuffix).'.svg']:\r\n\t\t\t\t$get_image=$a;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif($get_image){\r\n\t\t\tpreg_match('/\\.[a-z]+$/i',$get_image['name'],$b);\r\n\t\t\t$get_image['extension']=str_replace('.','',strtolower($b[0]));\r\n\t\t\treturn $get_image['name'];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6df6f6b878069778c228c86b284840b4", "score": "0.6067139", "text": "public function image()\n {\n }", "title": "" }, { "docid": "69f0ef1948d64f3d4d0bfacd88f5706e", "score": "0.6063343", "text": "abstract public function readImage();", "title": "" }, { "docid": "ca744c75c88f7dcb3ef76cb1625ac8e8", "score": "0.6058365", "text": "function ps_place_image ($psdoc, $imageid, $x, $y, $scale) {}", "title": "" }, { "docid": "6d44563f6846dc3fa7e47987ce35f696", "score": "0.6056535", "text": "function imgauto()\n{\n\n$allowedExts = array(\"gif\", \"jpeg\", \"jpg\", \"png\");\n$temp = explode(\".\", $_FILES[\"file\"][\"name\"]);\n$extension = end($temp);\nif ((($_FILES[\"file\"][\"type\"] == \"image/gif\")\n|| ($_FILES[\"file\"][\"type\"] == \"image/jpeg\")\n|| ($_FILES[\"file\"][\"type\"] == \"image/jpg\")\n|| ($_FILES[\"file\"][\"type\"] == \"image/pjpeg\")\n|| ($_FILES[\"file\"][\"type\"] == \"image/x-png\")\n|| ($_FILES[\"file\"][\"type\"] == \"image/png\"))\n&& ($_FILES[\"file\"][\"size\"] < 3000000)\n&& in_array($extension, $allowedExts))\n {\n if ($_FILES[\"file\"][\"error\"] > 0)\n {\n echo \"Return Code: \" . $_FILES[\"file\"][\"error\"] . \"<br>\";\n }\n else\n {\n // echo \"Upload: \" . $_FILES[\"file\"][\"name\"] . \"<br>\";\n // echo \"Type: \" . $_FILES[\"file\"][\"type\"] . \"<br>\";\n // echo \"Size: \" . ($_FILES[\"file\"][\"size\"] / 1024) . \" kB<br>\";\n// echo \"Temp file: \" . $_FILES[\"file\"][\"tmp_name\"] . \"<br>\";\n\n if (file_exists(\"img/\" . $_FILES[\"file\"][\"name\"]))\n {\n //echo $_FILES[\"file\"][\"name\"] . \" already exists. \";\n }\n else\n {\n move_uploaded_file($_FILES[\"file\"][\"tmp_name\"],\n \"img/\" . $_FILES[\"file\"][\"name\"]);\n // echo \"Stored in: \" . \"img/\" . $_FILES[\"file\"][\"name\"];\n }\n }\n }\nelse\n {\n //echo \"Invalid file\";\n }\n}", "title": "" }, { "docid": "9690373d9b5be03a3ebd3d957d79514d", "score": "0.60497797", "text": "function usage()\n{\nob_start(); \n?>\nWrap the html containing your image(s) you want to thumbnail between the tag pairs. Dd_autothumb finds them, creates the thumbnails, saves them, and eturns the html or css to place them in a single step.\n\n{exp:dd_autothumb pic=\"first\" fetch=\"tag\" thumbtype==\"css_background\" width=\"100\" height=\"100\"}\n\ttext you want processed\n{/exp:dd_autothumb}\n\nNote: \nThe \"pic\" parameter lets you specify which image to select. 'first', 'last' or 0,1,2,3...\nThe \"tag\" parameter lets you pick between a path, and the full <img.../> tag by using - path or tag\nThe \"thumbtype\" parameter lets you pick between an inline or a css background presentation simply - inline, cs_background\nThe \"width\" and height\" parameters take an integer - in px\nThumbnailing won't create a bigger image than you start with even if you ask nicely - it'll just return the original image\nCurrently only works on images on your domain\n\nNext version:\nAdd a pic=\"all\" option to return all images from the post in thumbnail form to drive slideshows / lightboxes \n\nNote 2:\nEarly version, please email any bugs / issues to [email protected]\n\n<?php\n$buffer = ob_get_contents();\n\t\nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "9b8595442a56430553b0bd12e670fab2", "score": "0.60475963", "text": "function showImage($argArrData)\n {\n if ($argArrData['imageName']!=''){\n $varFileName = SOURCE_ROOT.$argArrData['imageDirectory'].$argArrData['imageName'];\n if (is_file($varFileName) && file_exists($varFileName)){\n $varImagePath = SITE_ROOT_URL.$argArrData['imageDirectory'].$argArrData['imageName'];\n }\n else{\n $varImagePath = SITE_ROOT_URL.$argArrData['defaultImageDirectory'].$argArrData['defaultImageName'];\n }\n\n }else{\n $varImagePath = SITE_ROOT_URL.$argArrData['defaultImageDirectory'].$argArrData['defaultImageName'];\n }\n return $varImagePath;\n }", "title": "" }, { "docid": "5b7e7a01b8d63c4c4af13c01f69c8582", "score": "0.60431683", "text": "private function _createImage()\n {\n $hash = md5($this->_params['name']);\n $color = substr($hash, 0, 6);\n $this->_ressource = imagecreatetruecolor($this->_params['width'], $this->_params['height']);\n\n imageantialias($this->_ressource, true);\n imagesetthickness($this->_ressource, 25);\n\n $bg = imagecolorallocate($this->_ressource, 0, 0, 0);\n imagecolortransparent($this->_ressource, $bg);\n\n $bgColor = imagecolorallocate($this->_ressource, hexdec(substr($color, 0, 2)), hexdec(substr($color, 2, 2)), hexdec(substr($color, 4, 2)));\n\n if ($this->_params['ellipse'])\n imagefilledellipse($this->_ressource, ($this->_params['width'] / 2), ($this->_params['height'] / 2), $this->_params['width'] - 1, $this->_params['height'] - 1, $bgColor);\n else\n imagefilledrectangle($this->_ressource, 0, 0, $this->_params['width'], $this->_params['height'], $bgColor);\n\n list($red, $green, $blue) = $this->_getContrast($color);\n $textcolor = imagecolorallocate($this->_ressource, $red, $green, $blue);\n $this->_setFont($textcolor);\n }", "title": "" }, { "docid": "030355fcc0f6a742459dc485410e87b2", "score": "0.6040091", "text": "function ImageCreateFromBMP($filename){\n\t\t if (! $f1 = fopen($filename,\"rb\")) return FALSE;\n\n\t\t //1 : Chargement des ent�tes FICHIER\n\t\t $FILE = unpack(\"vfile_type/Vfile_size/Vreserved/Vbitmap_offset\", fread($f1,14));\n\t\t if ($FILE['file_type'] != 19778) return FALSE;\n\n\t\t //2 : Chargement des ent�tes BMP\n\t\t $BMP = unpack('Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel'.\n\t\t\t\t '/Vcompression/Vsize_bitmap/Vhoriz_resolution'.\n\t\t\t\t '/Vvert_resolution/Vcolors_used/Vcolors_important', fread($f1,40));\n\t\t $BMP['colors'] = pow(2,$BMP['bits_per_pixel']);\n\t\t if ($BMP['size_bitmap'] == 0) $BMP['size_bitmap'] = $FILE['file_size'] - $FILE['bitmap_offset'];\n\t\t $BMP['bytes_per_pixel'] = $BMP['bits_per_pixel']/8;\n\t\t $BMP['bytes_per_pixel2'] = ceil($BMP['bytes_per_pixel']);\n\t\t $BMP['decal'] = ($BMP['width']*$BMP['bytes_per_pixel']/4);\n\t\t $BMP['decal'] -= floor($BMP['width']*$BMP['bytes_per_pixel']/4);\n\t\t $BMP['decal'] = 4-(4*$BMP['decal']);\n\t\t if ($BMP['decal'] == 4) $BMP['decal'] = 0;\n\n\t\t //3 : Chargement des couleurs de la palette\n\t\t $PALETTE = array();\n\t\t if ($BMP['colors'] < 16777216)\n\t\t {\n\t\t $PALETTE = unpack('V'.$BMP['colors'], fread($f1,$BMP['colors']*4));\n\t\t }\n\n\t\t //4 : Cr�ation de l'image\n\t\t $IMG = fread($f1,$BMP['size_bitmap']);\n\t\t $VIDE = chr(0);\n\n\t\t $res = imagecreatetruecolor($BMP['width'],$BMP['height']);\n\t\t $P = 0;\n\t\t $Y = $BMP['height']-1;\n\t\t while ($Y >= 0)\n\t\t {\n\t\t $X=0;\n\t\t while ($X < $BMP['width'])\n\t\t {\n\t\t if ($BMP['bits_per_pixel'] >= 24)\n\t\t\t$COLOR = unpack(\"V\",substr($IMG,$P,3).$VIDE);\n\t\t elseif ($BMP['bits_per_pixel'] == 16)\n\t\t { \n\t\t\t$COLOR = unpack(\"n\",substr($IMG,$P,2));\n\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t }\n\t\t elseif ($BMP['bits_per_pixel'] == 8)\n\t\t { \n\t\t\t$COLOR = unpack(\"n\",$VIDE.substr($IMG,$P,1));\n\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t }\n\t\t elseif ($BMP['bits_per_pixel'] == 4)\n\t\t {\n\t\t\t$COLOR = unpack(\"n\",$VIDE.substr($IMG,floor($P),1));\n\t\t\tif (($P*2)%2 == 0) $COLOR[1] = ($COLOR[1] >> 4) ; else $COLOR[1] = ($COLOR[1] & 0x0F);\n\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t }\n\t\t elseif ($BMP['bits_per_pixel'] == 1)\n\t\t {\n\t\t\t$COLOR = unpack(\"n\",$VIDE.substr($IMG,floor($P),1));\n\t\t\tif (($P*8)%8 == 0) $COLOR[1] = $COLOR[1] >>7;\n\t\t\telseif (($P*8)%8 == 1) $COLOR[1] = ($COLOR[1] & 0x40)>>6;\n\t\t\telseif (($P*8)%8 == 2) $COLOR[1] = ($COLOR[1] & 0x20)>>5;\n\t\t\telseif (($P*8)%8 == 3) $COLOR[1] = ($COLOR[1] & 0x10)>>4;\n\t\t\telseif (($P*8)%8 == 4) $COLOR[1] = ($COLOR[1] & 0x8)>>3;\n\t\t\telseif (($P*8)%8 == 5) $COLOR[1] = ($COLOR[1] & 0x4)>>2;\n\t\t\telseif (($P*8)%8 == 6) $COLOR[1] = ($COLOR[1] & 0x2)>>1;\n\t\t\telseif (($P*8)%8 == 7) $COLOR[1] = ($COLOR[1] & 0x1);\n\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t }\n\t\t else\n\t\t\treturn FALSE;\n\t\t imagesetpixel($res,$X,$Y,$COLOR[1]);\n\t\t $X++;\n\t\t $P += $BMP['bytes_per_pixel'];\n\t\t }\n\t\t $Y--;\n\t\t $P+=$BMP['decal'];\n\t\t }\n\n\t\t //Fermeture du fichier\n\t\t fclose($f1);\n\n\t\t return $res;\n\t}", "title": "" }, { "docid": "0e4df2e2515a5fafaa49b601ec6e4856", "score": "0.60372305", "text": "abstract public function thumbnail();", "title": "" }, { "docid": "09340e7bcd16c95a3d70afa9a59bfc82", "score": "0.6036521", "text": "function _fonds_image($type, $nom, $id) {\n\t$fichier = sous_repertoire(sous_repertoire(_DIR_IMG, \"fonds\"), \"$type\".$id).\"$nom$id.jpg\";\n\tif (file_exists($fichier)) {\n\t\tinclude_spip(\"inc/filtres_images_lib_mini\");\n\t\t$image = _image_valeurs_trans($fichier, \"\");\n\t\treturn $image[\"tag\"];\n\t}\n\n\t// SVG\n\t$fichier = sous_repertoire(sous_repertoire(_DIR_IMG, \"fonds\"), \"$type\".$id).\"$nom$id.svg\";\n\tif (file_exists($fichier)) {\n\t\treturn $fichier;\n\t}\n\n\n}", "title": "" }, { "docid": "e0d7fb7cb3f655417b63eb2615c1fe47", "score": "0.6032952", "text": "function returnImage ($path, $alt = false, $width = false, $height = false, $method = \"limit\", $gd = false, $save = false, $align = false, $hspace = false, $vspace = false, $border = \"0\", $class = false, $linkOnly = false) {\n\t\t\tglobal $album_img_width, $album_img_height, $allow_filesystem_modify, $root_dir;\n\t\t\t\n\t\t\t$art = jzCreateLink($path,\"image\");\n\n\t\t\tif ($linkOnly){\n\t\t\t\treturn $art;\n\t\t\t}\n\t\t\t\n\t\t\t$tag = \"\";\n\t\t\tif ($alt !== false)\n\t\t\t\t$tag .= \"alt=\\\"$alt\\\" \";\n\t\t\t\t$tag .= \"title=\\\"$alt\\\" \";\n\t\t\t\n\t\t\tif ($method == \"fixed\") {\n\t\t\t if ($width !== false)\n\t\t\t $tag .=\"width=\\\"$width\\\" \";\n\t\t\t if ($height !== false)\n\t\t\t $tag .= \"height=\\\"$height\\\"\";\n\t\t\t} else {\t\n\t\t\t $size = @getimagesize($path);\n\t\t\t $displaywidth = $size[0];\n\t\t\t $displayheight = $size[1];\t\t\t\n\n\t\t\t if ($size && $size[0] > 0 && $size[1] > 0) {\n\t\t\t switch ($method) {\n\t\t\t case \"limit\":\n\t\t\t if ($width !== false && $width < $displaywidth) {\n\t\t\t\t\t\t\t$displayheight = (int)($displayheight * $width / $displaywidth);\n\t\t\t\t\t\t\t$displaywidth = $width;\t\t\t\t\t\n\t\t\t } if ($height && $height < $displayheight) {\n\t\t\t\t\t\t\t$displaywidth = (int)($displaywidth * $height / $displayheight);\n\t\t\t\t\t\t\t$displayheight = $height;\n\t\t\t }\n\t\t\t $tag .= \"width=\\\"$displaywidth\\\" height=\\\"$displayheight\\\"\";\n\t\t\t break;\n\t\t\t case \"fit\":\n\t\t\t if ($width !== false) {\n\t\t\t\t\t\t\t$displayheight = (int)($displayheight * $width / $displaywidth);\n\t\t\t\t\t\t\t$displaywidth = $width;\n\t\t\t } else if ($height !== false) {\n\t\t\t\t\t\t\t$displaywidth = (int)($displaywidth * $height / $displayheight);\n\t\t\t\t\t\t\t$displayheight = $height;\n\t\t\t }\n\t\t\t $tag .= \"width=\\\"$displaywidth\\\" height=\\\"$displayheight\\\"\";\n\t\t\t break;\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t\tif ($align){\n\t\t\t\t$tag .= ' align=\"'. $align. '\" '; }\n\t\t\tif ($vspace){\n\t\t\t\t$tag .= 'vspace=\"'. $vspace. '\" '; }\n\t\t\tif ($hspace){\n\t\t\t\t$tag .= ' hspace=\"'. $hspace. '\" '; }\n\t\t\tif ($class){\n\t\t\t\t$tag .= ' class=\"'. $class. '\" '; }\t\t\t\n\t\t\t// Now let's set the border\n\t\t\t$tag .= ' border=\"'. $border. '\" ';\n\t\t\t\t\n\t\t\treturn \"<img src=\\\"\" . $art . \"\\\" $tag>\";\n\t\t}", "title": "" }, { "docid": "007089ca07a222014ee91215981c9b01", "score": "0.6029791", "text": "abstract public function stripImage();", "title": "" }, { "docid": "6ab46cc6fea27ba56cc5ae0e2d8fbe5d", "score": "0.60269314", "text": "function IMGResize($img, $box_w, $box_h, $save_path='./', $rename='myimage_rand', $param=false) {\n\t $new = imagecreatetruecolor($box_w, $box_h);\n\t if($new === false) {\n\t //creation failed -- probably not enough memory\n\t return null;\n\t }\n\n\t // Rename Functionality\n\t if (trim($rename)!='') {\n\t \t$needle = array('{rand}', '{time}');\n\t \t$replace = array(rand(9999,99999), time());\n\t \t$rename = str_replace($needle, $replace, $rename);\n\t } else {\n\t \t$rename = substr(basename($img), 0, -strlen(strchr(basename($img), '.')));\n\t }\n\n\n\t // Save path\n\t if ($save_path=='') {\n\t \t$save_path = './';\n\t }\n\t $save_path = substr($save_path, -1)!='/' ? $save_path.'/' : $save_path;\n\n\t if ( $param != false && in_array($param, array('file_path', 'file_name', 'dir_path'))==false ) {\n\t \techo 'IMGResize found invalid return parameters';\n\t \treturn false;\n\t }\n\n\t\t$mime = GetImageSize($img);\n\t\t$mime = $mime['mime'];\n\t $type = substr(strrchr($mime, '/'), 1);\n\n\t\tswitch ($type) {\n\t\tcase 'jpeg':\n\t\t $image_create_func = 'ImageCreateFromJPEG';\n\t\t $image_save_func = 'ImageJPEG';\n\t\t\t$new_image_ext = 'jpg';\n\t\t break;\n\n\t\tcase 'png':\n\t\t $image_create_func = 'ImageCreateFromPNG';\n\t\t $image_save_func = 'ImagePNG';\n\t\t\t$new_image_ext = 'png';\n\t\t break;\n\n\t\tcase 'bmp':\n\t\t $image_create_func = 'ImageCreateFromBMP';\n\t\t $image_save_func = 'ImageBMP';\n\t\t\t$new_image_ext = 'bmp';\n\t\t break;\n\n\t\tcase 'gif':\n\t\t $image_create_func = 'ImageCreateFromGIF';\n\t\t $image_save_func = 'ImageGIF';\n\t\t\t$new_image_ext = 'gif';\n\t\t break;\n\n\t\tcase 'vnd.wap.wbmp':\n\t\t $image_create_func = 'ImageCreateFromWBMP';\n\t\t $image_save_func = 'ImageWBMP';\n\t\t\t$new_image_ext = 'bmp';\n\t\t break;\n\n\t\tcase 'xbm':\n\t\t $image_create_func = 'ImageCreateFromXBM';\n\t\t $image_save_func = 'ImageXBM';\n\t\t\t$new_image_ext = 'xbm';\n\t\t break;\n\n\t\tdefault:\n\t\t\t$image_create_func = 'ImageCreateFromJPEG';\n\t\t $image_save_func = 'ImageJPEG';\n\t\t\t$new_image_ext = 'jpg';\n\t\t}\n\n\t\t$img = $image_create_func($img);\n\n\t\tif(is_null($img)) {\n\t \treturn false;\n\t\t}\n\n\n\t //Fill the image with a light grey color\n\t //(this will be visible in the padding around the image,\n\t //if the aspect ratios of the image and the thumbnail do not match)\n\t //Replace this with any color you want, or comment it out for black.\n\t //I used grey for testing =)\n\t $fill = imagecolorallocate($new, 255, 255, 255);\n\t imagefill($new, 0, 0, $fill);\n\n\t //compute resize ratio\n\t $hratio = $box_h / imagesy($img);\n\t $wratio = $box_w / imagesx($img);\n\t $ratio = min($hratio, $wratio);\n\n\t //if the source is smaller than the thumbnail size, \n\t //don't resize -- add a margin instead\n\t //(that is, dont magnify images)\n\t if($ratio > 1.0)\n\t $ratio = 1.0;\n\n\t //compute sizes\n\t $sy = floor(imagesy($img) * $ratio);\n\t $sx = floor(imagesx($img) * $ratio);\n\n\t //compute margins\n\t //Using these margins centers the image in the thumbnail.\n\t //If you always want the image to the top left, \n\t //set both of these to 0\n\t $m_y = floor(($box_h - $sy) / 2);\n\t $m_x = floor(($box_w - $sx) / 2);\n\n\t //Copy the image data, and resample\n\t //If you want a fast and ugly thumbnail,\n\t //replace imagecopyresampled with imagecopyresized\n\t if(!imagecopyresampled($new, $img,\n\t $m_x, $m_y, //dest x, y (margins)\n\t 0, 0, //src x, y (0,0 means top left)\n\t $sx, $sy,//dest w, h (resample to this size (computed above)\n\t imagesx($img), imagesy($img)) //src w, h (the full size of the original)\n\t ) {\n\t //copy failed\n\t imagedestroy($new);\n\t return false;\n\t }\n\t //copy successful\n\t $file_path = $save_path . $rename . '_' . $box_w.'x'.$box_h . '.' . $new_image_ext;\n\t $process = $image_save_func($new, $file_path);\n\n\t if ( $param != false ) {\n\t \tif ($param == 'file_path') return realpath($file_path);\n\t \tif ($param == 'file_name') return basename($file_path);\n\t \tif ($param == 'dir_path') return dirname(realpath($file_path));\n\t } else {\n\t \treturn array('result' => $process, 'file_path' => realpath($file_path), 'file_name'=>basename($file_path), 'dir_path'=>dirname(realpath($file_path)));\n\t }\n\t}", "title": "" }, { "docid": "a87ef51fbda7d07f6758bc8ea46c4003", "score": "0.60227793", "text": "function ps_open_image ($psdoc, $type, $source, $data, $lenght, $width, $height, $components, $bpc, $params) {}", "title": "" }, { "docid": "b2717f8970d91a037a27b0829ce3999e", "score": "0.6019482", "text": "function image_url($SUBPATH, $NAME, $ERROR = TRUE, $GETPATH = FALSE)\n{\n global $FD;\n\n $CHECK_PATH = FS2MEDIA . $SUBPATH . '/';\n $PATH = 'media' . $SUBPATH . '/';\n\n if (file_exists($CHECK_PATH . $NAME . '.jpg')) {\n $file = $NAME . '.jpg';\n } elseif (file_exists($CHECK_PATH . $NAME . '.jpeg')) {\n $file = $NAME . '.jpeg';\n } elseif (file_exists($CHECK_PATH . $NAME . '.gif')) {\n $file = $NAME . '.gif';\n } elseif (file_exists($CHECK_PATH . $NAME . '.png')) {\n $file = $NAME . '.png';\n } elseif ($ERROR == TRUE) {\n $file = '/' . $FD->cfg('style') . '/icons/image_error.gif';\n return $GETPATH ? FS2STYLES . $file : $FD->cfg('virtualhost') . 'styles' . $file;\n } else {\n $file = $NAME;\n }\n\n if ($GETPATH == TRUE) {\n $url = $CHECK_PATH . $file;\n } else {\n $url = $FD->cfg('virtualhost') . $PATH . $file;\n }\n\n return $url;\n}", "title": "" }, { "docid": "93322cbadae9f89f3b4c1b0324c22e99", "score": "0.6019466", "text": "function get_image($image, $class = \"\", $dfImage = 'noimage.png'){\n $imageUrl = $image?$image['url']:DF_IMAGE . $dfImage;\n $imageAlt = $image?$image['title']:'no-image';\n $result = '<img src=\"'.$imageUrl.'\" alt=\"'.$imageAlt.'\" class=\"'.$class.'\">';\n return $result;\n}", "title": "" }, { "docid": "1d2c2c213948fca6ab3481ad5bf01e62", "score": "0.60186785", "text": "function createThumb($name,$filename,$new_w,$new_h,$path=\"\"){\n\t\n\t\t$wh = getimagesize($path.$name);\n\t\t\n\t\tif($wh[0] < $new_w)\n\t\t\t$new_w = $wh[0];\n\t\t\t\n\t\tif($wh[1] < $new_h)\n\t\t\t$new_h = $wh[1];\t\n\t\n\t\t$gd2=1;\n\t\t\n\t\t$system=explode(\".\",$name);\n\t\n\t\tif(preg_match(\"/jpg|jpeg|JPG|JPEG/\",$system[1])){\n\t\t\n\t\t $src_img=imagecreatefromjpeg($path.$name);\n\t\t}\n\t\n\t\tif (preg_match(\"/gif|GIF/\",$system[1])){\n\t\t\n\t\t $src_img=imagecreatefromgif($path.$name);\n\t\t}\n\t\t\n\t\tif (preg_match(\"/png|PNG/\",$system[1])){\n\t\t\n\t\t $src_img=imagecreatefrompng($path.$name);\n\t\t}\n\t\t\n\t\t$old_x=imageSX($src_img);\n\t\n\t\t$old_y=imageSY($src_img);\n\t\n\t\tif ($old_x > $old_y){\n\t\t\n\t\t $thumb_w=$new_w;\n\t\n\t\t $thumb_h=$new_w*($old_y/$old_x);\n\t }\n\t\n\t if ($old_x < $old_y){\n\t\n\t\t $thumb_w=$new_h*($old_x/$old_y);\n\t\n\t\t $thumb_h=$new_h;\n\t }\n\t\n\t if ($old_x == $old_y){\n\t\n\t\t $thumb_w=$new_w;\n\t\n\t\t $thumb_h=$new_h;\n\t\t}\n\t\n\t\tif ($gd2==1){\n\t\n\t\t $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);\n\t\n\t\t imagefill($dst_img,0,0,imagecolorallocate($dst_img,255,255,255));\n\t\n\t\t imagecopyresized($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);\n\t\n\t\t}\n\t\telse{\n\t\n\t\t $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);\n\t\n\t\t imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);\n\t }\n\t\n\t if (preg_match(\"/gif|GIF/\",$system[1])){\n\t\n\t\t imagegif($dst_img,$path.$filename);\n\t\t \n\t\t chmod($path.$filename,0777);\n\t }\n\t else{\n\t \n\t\t imagejpeg($dst_img,$path.$filename);\n\t\n\t\t chmod($path.$filename,0777);\n\t }\n\t\n\t imagedestroy($dst_img);\n\t\n\t imagedestroy($src_img);\n\t\n\t}", "title": "" }, { "docid": "017e5fc465ac9352860888ce9dad8a59", "score": "0.6015005", "text": "function MoveBusinessImages($root,$oldname,$usrid,$dummy=false,$innerfolder='')\n\t{\n\t$folder = $root .$usrid.$innerfolder.'/';\n\t$finalname = $folder.'original.jpg';\n\t\n\tif(preg_match('/[.]/', $folder)) die();\n\n\tif(!file_exists($folder)) \n\t\tmkdir($folder, 0777,true);\n\n\t//$ext_arr = split(\"\\.\",$form->image);\n\t$ext_arr = explode(\".\",$form->image);\n\t$ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension\n\n\trequire_once('resize.php');\n\tif ($ext=='png')//if png convert it to jpg\n\t\t{\n\t\t$input = imagecreatefrompng($oldname);\n\t\tlist($width, $height) = getimagesize($oldname);\n\t\t$output = imagecreatetruecolor($width, $height);\n\t\t$white = imagecolorallocate($output, 255, 255, 255);\n\t\timagefilledrectangle($output, 0, 0, $width, $height, $white);\n\t\timagecopy($output, $input, 0, 0, 0, 0, $width, $height);\n\t\timagejpeg($output,$finalname);\n\t\tunlink($oldname);\n\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(64,64);\n\t\t$image->save($folder.'small.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'smallgray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'minigray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(110,110);\n\t\t$image->save($folder.'medium.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(290,204);\n\t\t$image->save($folder.'panel.jpg');\n\t\t\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(399,307);\n\t\t$image->save($folder.'admin.jpg');\n\t\t}\n\t\telse\n\t\t{\n\t\tcopy($oldname,$finalname);\n\t\tif ($dummy!=true)\n\t\t\tunlink($oldname);\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\t\t\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(64,64);\n\t\t$image->save($folder.'small.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'smallgray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'minigray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(110,110);\n\t\t$image->save($folder.'medium.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(299,204);\n\t\t$image->save($folder.'panel.jpg');\n\t\t\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(399,307);\n\t\t$image->save($folder.'admin.jpg');\n\t\t}\n\t}", "title": "" }, { "docid": "260529969edf714ed0b238097aa579b1", "score": "0.6013998", "text": "function MemImage($data, $x=null, $y=null, $w=0, $h=0, $link='')\n {\n $v = 'img'.md5($data);\n $GLOBALS[$v] = $data;\n $a = getimagesize('var://'.$v);\n if(!$a)\n $this->Error('Invalid image data');\n $type = substr(strstr($a['mime'],'/'),1);\n $this->Image('var://'.$v, $x, $y, $w, $h, $type, $link);\n unset($GLOBALS[$v]);\n }", "title": "" }, { "docid": "2d4e025ba63635de2bf1e2982ebb9bc9", "score": "0.6008929", "text": "private function add_image_sizes() {}", "title": "" }, { "docid": "c30b5ba769d94fd18a4b9b901ae7dbdb", "score": "0.59920067", "text": "function resizeImage($old_image_path, $new_image_path, $max_width, $max_height)\n{\n\n // Get image type\n $image_info = getimagesize($old_image_path);\n $image_type = $image_info[2];\n\n // Set up the function names\n switch ($image_type) {\n case IMAGETYPE_JPEG:\n $image_from_file = 'imagecreatefromjpeg';\n $image_to_file = 'imagejpeg';\n break;\n case IMAGETYPE_GIF:\n $image_from_file = 'imagecreatefromgif';\n $image_to_file = 'imagegif';\n break;\n case IMAGETYPE_PNG:\n $image_from_file = 'imagecreatefrompng';\n $image_to_file = 'imagepng';\n break;\n default:\n return;\n } // ends the swith\n\n // Get the old image and its height and width\n $old_image = $image_from_file($old_image_path);\n $old_width = imagesx($old_image);\n $old_height = imagesy($old_image);\n\n // Calculate height and width ratios\n $width_ratio = $old_width / $max_width;\n $height_ratio = $old_height / $max_height;\n\n // If image is larger than specified ratio, create the new image\n if ($width_ratio > 1 || $height_ratio > 1) {\n\n // Calculate height and width for the new image\n $ratio = max($width_ratio, $height_ratio);\n $new_height = round($old_height / $ratio);\n $new_width = round($old_width / $ratio);\n\n // Create the new image\n $new_image = imagecreatetruecolor($new_width, $new_height);\n\n // Set transparency according to image type\n if ($image_type == IMAGETYPE_GIF) {\n $alpha = imagecolorallocatealpha($new_image, 0, 0, 0, 127);\n imagecolortransparent($new_image, $alpha);\n }\n\n if ($image_type == IMAGETYPE_PNG || $image_type == IMAGETYPE_GIF) {\n imagealphablending($new_image, false);\n imagesavealpha($new_image, true);\n }\n\n // Copy old image to new image - this resizes the image\n $new_x = 0;\n $new_y = 0;\n $old_x = 0;\n $old_y = 0;\n imagecopyresampled($new_image, $old_image, $new_x, $new_y, $old_x, $old_y, $new_width, $new_height, $old_width, $old_height);\n\n // Write the new image to a new file\n $image_to_file($new_image, $new_image_path);\n // Free any memory associated with the new image\n imagedestroy($new_image);\n } else {\n // Write the old image to a new file\n $image_to_file($old_image, $new_image_path);\n }\n // Free any memory associated with the old image\n imagedestroy($old_image);\n}", "title": "" }, { "docid": "f9fcbeb236987457a116a613297174aa", "score": "0.59893674", "text": "function image_mashup($im, $masque, $bord, $background_color)\r\n{\tif (!function_exists(image_valeurs_trans)) include_spip (\"inc/filtres_images_compat\"); \r\n\t\r\n\t// Valeurs de l'image par SPIP\r\n\t$image = image_valeurs_trans($im, \"mashup-$masque-$bord-$background_color\");\r\n\t\r\n\tif (!$image) return(\"\");\r\n\t\r\n\t$dest = $image[\"fichier_dest\"];\r\n\t$l = $image[\"largeur\"]+ 2*$bord;\r\n\t$h = $image[\"hauteur\"]+ 2*$bord;\r\n\t\t\t\r\n\tif ($image[\"creer\"])\r\n\t{\t$im = $image[\"fichier\"];\r\n\r\n\t\t// images sources et destination\r\n\t\t$im = $image[\"fonction_imagecreatefrom\"]($im);\r\n\t\t$im_ = @imagecreatetruecolor($l, $h);\r\n\r\n\t\t// options de transparence\r\n\t\timagealphablending($im_, false);\r\n\t\timagesavealpha($im_, true);\r\n\t\t\r\n\t\t// Remplir avec la couleur \r\n\t\tif ($background_color=='transparent')\r\n\t\t\t$color_t = imagecolorallocatealpha( $im_, 255, 255, 255 , 127 );\r\n\t\telse \r\n\t\t{\t$bg = _couleur_hex_to_dec($background_color);\r\n\t\t\t$color_t = imagecolorallocate( $im_, $bg['red'], $bg['green'], $bg['blue']);\r\n\t\t}\r\n\t\timagefill ($im_, 0, 0, $color_t);\r\n\t\t\r\n\t\t// Copier l'image source et le masque\r\n\t\timagealphablending($im_, true);\r\n\t\timagecopy($im_, $im, $bord, $bord, 0, 0, $image[\"largeur\"], $image[\"hauteur\"]);\r\n\t\t\r\n\t\t// Gestion du masque\r\n\t\t$im_masque = @imagecreatefrompng($masque);\r\n\t\tif ($im_masque)\r\n\t\t{\t// Position du masque\r\n\t\t\t$x_masque = imagesx($im_) - imagesx($im_masque);\t// left : $x_masque = 0;\r\n\t\t\t$y_masque = 0;\t\t// bottom : $y_masque = imagesy($im_) - imagesy($im_masque);\r\n\t\t\timagecopy($im_, $im_masque, $x_masque, $y_masque, 0, 0, imagesx($im_masque), imagesy($im_masque));\r\n\t\t\t// Liberer la memoire\r\n\t\t\timagedestroy($im_masque);\r\n\t\t}\r\n\t\t\r\n\t\t// SPIP\r\n\t\t$image[\"fonction_image\"]($im_, \"$dest\");\t\r\n\t}\r\n\r\n\t// SPIP\r\n\treturn image_ecrire_tag($image,array('src'=>$dest,'width'=>$l,'height'=>$h));\r\n}", "title": "" }, { "docid": "a73b4297b431c9aaa76332496a056239", "score": "0.59865296", "text": "function MoveBusinessImages($root,$oldname,$usrid,$dummy=false,$innerfolder='')\n\t{\n\t$folder = $root .$usrid.$innerfolder.'/';\n\t$finalname = $folder.'original.jpg';\n\t\n\tif(preg_match('/[.]/', $folder)) die();\n\n\tif(!file_exists($folder)) \n\t\tmkdir($folder, 0777,true);\n\n\t$ext_arr = split(\"\\.\",$form->image);\n\t$ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension\n\n\trequire_once('resize.php');\n\tif ($ext=='png')//if png convert it to jpg\n\t\t{\n\t\t$input = imagecreatefrompng($oldname);\n\t\tlist($width, $height) = getimagesize($oldname);\n\t\t$output = imagecreatetruecolor($width, $height);\n\t\t$white = imagecolorallocate($output, 255, 255, 255);\n\t\timagefilledrectangle($output, 0, 0, $width, $height, $white);\n\t\timagecopy($output, $input, 0, 0, 0, 0, $width, $height);\n\t\timagejpeg($output,$finalname);\n\t\tunlink($oldname);\n\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(64,64);\n\t\t$image->save($folder.'small.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'smallgray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'minigray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(110,110);\n\t\t$image->save($folder.'medium.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(399,307);\n\t\t$image->save($folder.'panel.jpg');\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\tcopy($oldname,$finalname);\n\t\tif ($dummy!=true)\n\t\t\tunlink($oldname);\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\t\t\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(64,64);\n\t\t$image->save($folder.'small.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'smallgray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(32,32);\n\t\t$image->save($folder.'mini.jpg');\n\n\t\t$image->gray();\t\t\n\t\t$image->save($folder.'minigray.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(110,110);\n\t\t$image->save($folder.'medium.jpg');\n\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(399,307);\n\t\t$image->save($folder.'panel.jpg');\n\t\t}\n\t}", "title": "" }, { "docid": "6aa0f00606077fceff17ffa8ca25693d", "score": "0.5985283", "text": "function resizeImage($old_image_path, $new_image_path, $max_width, $max_height) {\n\n // Get image type\n $image_info = getimagesize($old_image_path);\n $image_type = $image_info[2];\n\n // Set up the function names\n switch ($image_type) {\n case IMAGETYPE_JPEG:\n $image_from_file = 'imagecreatefromjpeg';\n $image_to_file = 'imagejpeg';\n break;\n case IMAGETYPE_GIF:\n $image_from_file = 'imagecreatefromgif';\n $image_to_file = 'imagegif';\n break;\n case IMAGETYPE_PNG:\n $image_from_file = 'imagecreatefrompng';\n $image_to_file = 'imagepng';\n break;\n default:\n return;\n } // ends the resizeImage function\n // Get the old image and its height and width\n $old_image = $image_from_file($old_image_path);\n $old_width = imagesx($old_image);\n $old_height = imagesy($old_image);\n\n // Calculate height and width ratios\n $width_ratio = $old_width / $max_width;\n $height_ratio = $old_height / $max_height;\n\n // If image is larger than specified ratio, create the new image\n if ($width_ratio > 1 || $height_ratio > 1) {\n\n // Calculate height and width for the new image\n $ratio = max($width_ratio, $height_ratio);\n $new_height = round($old_height / $ratio);\n $new_width = round($old_width / $ratio);\n\n // Create the new image\n $new_image = imagecreatetruecolor($new_width, $new_height);\n\n // Set transparency according to image type\n if ($image_type == IMAGETYPE_GIF) {\n $alpha = imagecolorallocatealpha($new_image, 0, 0, 0, 127);\n imagecolortransparent($new_image, $alpha);\n }\n\n if ($image_type == IMAGETYPE_PNG || $image_type == IMAGETYPE_GIF) {\n imagealphablending($new_image, false);\n imagesavealpha($new_image, true);\n }\n\n // Copy old image to new image - this resizes the image\n $new_x = 0;\n $new_y = 0;\n $old_x = 0;\n $old_y = 0;\n imagecopyresampled($new_image, $old_image, $new_x, $new_y, $old_x, $old_y, $new_width, $new_height, $old_width, $old_height);\n\n // Write the new image to a new file\n $image_to_file($new_image, $new_image_path);\n // Free any memory associated with the new image\n imagedestroy($new_image);\n } else {\n // Write the old image to a new file\n $image_to_file($old_image, $new_image_path);\n }\n // Free any memory associated with the old image\n imagedestroy($old_image);\n}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "14dd4b2d9b11130fd8cb2d890437af32", "score": "0.0", "text": "public function edit(Request $request, $id)\n {\n $data['id'] = $id;\n $medicine = $this->medicine->find($id);\n $data['medicines'] = $this->medicine->getMedicine($request);\n $data['lot_number'] = $medicine->lot_number;\n $data['classification'] = $medicine->classification;\n $data['suggested_dosage'] = $medicine->suggested_dosage;\n\n\n return view('hact.item.restock', $data);\n }", "title": "" } ]
[ { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8f5529ba137277265d5572c380aac566", "score": "0.76910913", "text": "public function editAction()\n {\n $this->view->title .= ' - Edit Resource';\n\n $id = $this->_getParam('id');\n if (empty($id)) {\n throw new RuntimeException('Missing parameter id.');\n }\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resource = $resourceResource->find($id);\n if (!count($resource)) {\n throw new RuntimeException('Cannot found resource ' . $id);\n }\n $resource = $resource->getIterator()->current();\n\n $form = $this->_helper->form();\n $request = $this->getRequest();\n if ($request->isPost() && $form->isValid($request->getPost())) {\n $data = $form->getValues();\n unset($data['id']); //unset data for zf 1.6\n $resource->populate($data);\n if (!$resource->save()) {\n throw new RuntimeException('Save Resource failure!');\n }\n\n $this->_helper->flashMessenger(\"Save Resource \\\"{$resource->name}\\\" successful!\");\n $this->view->messages = $this->_helper->flashMessenger->getCurrentMessages();\n $this->_helper->flashMessenger->clearCurrentMessages();\n }\n $form->setDefaults($resource->toArray());\n $form->setDefault('id', $resource->id);\n $this->view->form = $form;\n }", "title": "" }, { "docid": "5069ab4d37ad8824f8739ff562d0d370", "score": "0.74427706", "text": "function editForm() {\n render(\"guest/update\");\n }", "title": "" }, { "docid": "6f88bb286afae4ce47ad9810da77dffb", "score": "0.7220439", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Super_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "84fa42f4318791adb736d823ce255f40", "score": "0.7115206", "text": "public function edit() {\n \n $partner = $this->partner_model->get_by_id($this->input->get('id'));\n if (!is_null($partner)) {\n echo $this->load->view('partner/edit_form', array(\n 'id' =>$partner->id,\n 'name' => $partner->name\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "7f75b87329616886dbf4cacf219053f8", "score": "0.7070694", "text": "public function editAction()\n {\n $this->formClass = EditForm::class;\n\n return parent::editAction();\n }", "title": "" }, { "docid": "da32ec30ea6b151bdb0d8c95b7fbef49", "score": "0.7062849", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\tif (Auth::id() !== ($resource->user_id))\n\t\t{\n\t\t\treturn Redirect::back()->withFlashMessage('You cannot edit this resource');\n\t\t}\n\n\t\treturn View::make('resources.edit')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "06b34b79c3a9b611ad6ef22ee71c20e7", "score": "0.6987668", "text": "public function edit()\n {\n return view('redistask::edit');\n }", "title": "" }, { "docid": "53fbc8894a41287014c5edbb650194bf", "score": "0.6966032", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\tlist(,$resource_imgs) = Gou_Service_ResourceImg::getList(0, 10, array('resource_id'=>intval($id)), array('id'=>'ASC'));\r\n\t\t$this->assign('resource_imgs', $resource_imgs);\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "7e492dbc3c5834bd8dcf322b6e0bebf4", "score": "0.6945628", "text": "public function editAction() {\n $patientID = $this->getParam('id');\n\n $form = new Application_Form_Patient();\n $form->getElement('submit')->setLabel(\"Daten ändern\");\n\n $request = $this->getRequest();\n\n // Wenn das Formular abgesedet wurde, neue Daten Speichern\n // Wenn kein post Request vorliegt => Erster Seitenaufruf, Patient wird anhand der uebergebenen ID ins Formular eingetragen.\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $patient = new Application_Model_Patient_Patient($form->getValues());\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->save($patient);\n return $this->_helper->redirector('list');\n }\n } else {\n $patient = new Application_Model_Patient_Patient();\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->find($patientID, $patient);\n\n\n $form->populate($patient->getKeyValueArray());\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "a5aafcf2a2bbeb05f135b2394c4525d2", "score": "0.6944655", "text": "public function action_edit() {\n\t\tif (empty($this->id)) {\n\t\t\tthrow new Kohana_Exception('No ID received for view');\n\t\t}\n\n\t\t$this->load_model('edit');\n\n\t\tif ( ! empty($_POST)) {\n\t\t\t$this->save_model();\n\t\t}\n\n\t\t$this->template->page_title = 'Edit - ' . $this->page_title_append;\n\t\t$view_title = $this->get_page_title_message('editing_item');\n\t\t$view_content = $this->model->get_form(array(\n\t\t\t'mode' => 'edit',\n\t\t));\n\t\t$this->add_default_view($view_title, $view_content);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6944128", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "5984290a0d4758b0ead36edab74a7fcb", "score": "0.69379073", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('admin.layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "439b2cee9a4232572f243ce40fe7ff37", "score": "0.6936526", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\t// queries the schools db table, orders by type and lists type and id\n\t \t$school_options = DB::table('schools')->orderBy('type', 'asc')->lists('type','type');\n\t \t$year_options = DB::table('years')->lists('year','year');\n\t \t$unit_options = DB::table('units')->lists('unit','unit');\n\t \t$resourceTypes_options = DB::table('resource_types')->orderBy('type', 'asc')->lists('type','type');\n\n\t \t$options = [\n\n\t \t\t'school_options' => $school_options, \n\t \t\t'year_options' => $year_options, \n\t \t\t'unit_options' => $unit_options,\n\t \t\t'resourceType_options' => $resourceTypes_options\n\t \t];\n\n\t return View::make('resources.edit', array('options' => $options, 'resource' => $resource));\n\n\n\n\t}", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6f12de6367ed6b5e724959286c687d98", "score": "0.6924614", "text": "public function edit($id)\n\t{\n\t\t$model = SysDetailFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysDetailFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'detailformmanager/update/'.$id,\n \t'model' => $model,\n \t]);\n\n\t\treturn View::make('dynaflow::detailformmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "32d0551d54bd22e3701bf40a8c1cbd2e", "score": "0.6904719", "text": "public function edit()\n {\n return view('partnermanagement::edit');\n }", "title": "" }, { "docid": "7b1b04ea22eb307dae4782d1893d684f", "score": "0.68787277", "text": "public function edit()\n {\n return view('app::edit');\n }", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68687415", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "bd55c6cca624fddd49faf3e7f8d44ebc", "score": "0.6867638", "text": "public function editAction()\n {\n// \treturn array('form'=>$form);\n }", "title": "" }, { "docid": "311e3f6fa3d20c187430d7b70defb091", "score": "0.68635666", "text": "public function editAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "a093d663f095c2eff827fd56ba3f1c5c", "score": "0.6835696", "text": "public function edit()\n {\n return view('taskmanagement::edit');\n }", "title": "" }, { "docid": "96e7a1a8798dd32cbc9d0fff02092958", "score": "0.683385", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('driver' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "9c40deb595ac4a285fa76f490ad8b576", "score": "0.67989755", "text": "public function fieldEditAction() {\n\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n $form->setTitle('Edit Form Question');\n $form->removeElement('search');\n $form->removeElement('display');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $form->removeElement('error');\n $form->removeElement('style');\n }\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "38b95b158cfbd7d6008eb1313d74dead", "score": "0.67904013", "text": "public function editProduct()\n {\n $this->configureFormRenderer('required');\n\n $this->productForm->addProductId();\n $this->productForm->populateFrom($product = $this->catalog->productOf($id = 1));\n\n echo $this->view->render('examples/edit-information.html.twig', [\n 'form' => $this->productForm->buildView(),\n ]);\n }", "title": "" }, { "docid": "1f3e62c409733532dc3f0f85568bdbb0", "score": "0.6761064", "text": "public function edit($id)\n\t{\n\t\treturn view($this->plural.'.edit', [$this->singular => $this->model->findOrFail($id)]);\n\t}", "title": "" }, { "docid": "2e451cbecb2a4edf2e18ea359a84b198", "score": "0.6758181", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('OffresBundle:Offres')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Offres entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('OffresBundle:Offres:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1ad8f42c84160b8c6ce6296389de89c9", "score": "0.6757268", "text": "function edit( $resource ){\n\n $brands = allWithoutTrash('product_brands' );\n\n\n $stocks = get('inventory', $resource);\n\n $product = get( 'products', $resource );\n\n return view( 'admin/product/add_product', compact( 'product', 'brands', 'stocks' ));\n}", "title": "" }, { "docid": "c687e229c70d5b2bb3174acd2887d935", "score": "0.67551833", "text": "public function edit($id)\n {\n //Open form in edit mode.\n $product = Product::findOrFail($id);\n return view('admin.Products.edit')->with('product', $product);\n }", "title": "" }, { "docid": "aae9d312c6fa709ae12d3c879ef9a3f2", "score": "0.67495203", "text": "public function edit(Form $form)\n {\n $form = Form::find($form->id);\n $data = array(\n 'form' => $form,\n 'types' => $this->getType()\n );\n return view('./form/form', $data);\n }", "title": "" }, { "docid": "173e18a8d00009c51c3e2b096afa35c6", "score": "0.67494076", "text": "public function edit()\n {\n $rmk = Specialization::find($id);\n return view('specialization.edit', compact('rmk'));\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.674883", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "bcf716390400a7068b7e1c48017f7c0f", "score": "0.67475426", "text": "function edit()\n\t{\n\t\t$id = $this->ci->uri->segment($this->config['uri_segment']+1);\n\t\treturn $this->_form($id);\n\t}", "title": "" }, { "docid": "7b5265e5c66828f2674f182bfb554b6b", "score": "0.67471254", "text": "public function edit()\n {\n return view('feaccount::edit');\n }", "title": "" }, { "docid": "7e53728fc096714ffa60b9478bd64083", "score": "0.67435557", "text": "function edit()\n {\n JRequest::setVar('view', 'team');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "7cb2b004357f9ffd5cddc45388789b2a", "score": "0.6736445", "text": "public function edit($id)\n {\n $this->data['obj'] = FormObject::find($id);\n $this->data['title'] = \"Edit \" . $this->data['obj']->name . \" Property\";\n $this->data['url'] = 'system/form-objects/' . $id;\n $this->data['method'] = 'put';\n $this->data['sites'] = Site::whereActive(1)->get()->all();\n\n $this->data['hotels'] = Hotel::all();\n\n return view('system.forms.form-object', $this->data);\n }", "title": "" }, { "docid": "a57bcfb849abf842f54ab142f87778dc", "score": "0.6734803", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n return view('admin.portal.edit', compact('resource'));\n }", "title": "" }, { "docid": "ff86c2f46684f81c5fd959adb2807f9e", "score": "0.67255336", "text": "public function edit($id)\n {\n $product = $this->products->findById($id);\n return View::make('products._form', compact('product'));\n }", "title": "" }, { "docid": "e144891e4fdc3366376e396b701fbf99", "score": "0.6711672", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'item');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "c53a972e2af2970da7bb04372311a3a5", "score": "0.669989", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programas entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Programas:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aae7f4b0c772355bb99330a14ba29014", "score": "0.6696947", "text": "public function edit($id)\n\t{\n return View::make('matrimonials.edit');\n\t}", "title": "" }, { "docid": "883502561745369884d7fc695ef1624e", "score": "0.6691808", "text": "public function edit($id)\n\t{\n return View::make('requirements.edit');\n\t}", "title": "" }, { "docid": "439487f339021f8335c9eeaa79db8fa8", "score": "0.6690575", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = $this->table->find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\TypeBookForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ]);\n\n $data['url'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "1507a482b7f295d6473bdf19d6d3da89", "score": "0.6678381", "text": "function edit( $resource ){\n\n $receivables = get( 'receivables', $resource );\n\n return view( 'admin/receivables/add_receivables', compact( 'receivables' ) );\n\n}", "title": "" }, { "docid": "2e96703e3ded22777d115212adcbfa8e", "score": "0.66781634", "text": "public function edit($id)\n {\n return view('manage::edit');\n }", "title": "" }, { "docid": "f2990bfbaee0f3cc29d99eb0cccdfc5d", "score": "0.6674401", "text": "public function edit(Entity $entity)\n {\n $this->authorize('update', $entity);\n\n return view('entities.edit', [\n 'entity' => $entity,\n ]);\n }", "title": "" }, { "docid": "b182548861e62c722e9b46c8496db241", "score": "0.6673116", "text": "public function edit($id)\n {\n $this->setOperation('update');\n if ($this->tienePermiso('update')) {\n\n // get entry ID from Request (makes sure its the last ID for nested resources)\n $id = $this->getCurrentEntryId() ?? $id;\n $entry = $this->getEntry($id);\n\n $this->data = array();\n // get the info for that entry\n $this->data['title'] = $this->getTitle() ?? trans('cesi::core.crud.edit') . ' ' . $this->entity_name;\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = $this->getSubheading() ?? trans('cesi::core.crud.edit').' '.$this->entity_name;\n $this->data['entry'] = $entry;\n $this->data['contentClass'] = $this->getEditContentClass();\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['resourceAlias'] = $this->getResourceAlias();\n $this->data['hasUploadFields'] = $this->hasUploadFields('update', $entry->getKey());\n\n // TODO ?? $this->data['saveAction'] = $this->getSaveAction();\n // $this->data['fields'] = $this->getCrud()->getUpdateFields($id);\n\n $this->data['id'] = $id;\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->getEditView(), $this->filterEditViewData($this->data));\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "23695efbb416dcbac50f5655f76220eb", "score": "0.6671321", "text": "public function edit()\n {\n return view('mpcs::edit');\n }", "title": "" }, { "docid": "9eabaca39cbbc769fdc4d4613662986d", "score": "0.6670628", "text": "public function edit($id)\n {\n $form = Form::find( $id );\n return view('editar', [\n 'item' => $form,\n ]);\n }", "title": "" }, { "docid": "98a687ec9cd21bb18a66914c17a84262", "score": "0.666875", "text": "function viewedit() {\n $id = Request::read('email');\n $error = Request::read('r'); \n \n if($error == -1){\n $error = 'No se ha editado';\n }\n \n $usuario = $this->getModel()->getUsuario($id);\n $email = $usuario->getEmail();\n \n \n $this->getModel()->addData('email', $email);\n $this->getModel()->addData('error', $error);\n \n $this->getModel()->addFile('form', 'sections/user/formEdit.html');\n }", "title": "" }, { "docid": "8aecb685b024e89667372cb88e6534b5", "score": "0.6665608", "text": "public function edit()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('edit', $product);\n }", "title": "" }, { "docid": "897c904da29480933d49a2afe6a447fa", "score": "0.6664957", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "47e15a6904083b2dac82790c56050341", "score": "0.66649014", "text": "public function showEditJobForm($id){\n \t$jobData = Job::find($id);\n \treturn view('employer.employer_edit_job', compact('jobData'));\n }", "title": "" }, { "docid": "55bfb83b470d662ff8fb0f9f1f658c98", "score": "0.6653699", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('project.form');\n\t\t$form->project = Project::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "028c8bc8d418c3bcb062ed6c39f57a64", "score": "0.6643353", "text": "public function edit($id)\n {\n $asociado = Asociado::getPersonaAsociadoSingle($id);\n $asociado->persona;\n $title = 'Editad asociado: '.$asociado->persona->primer_nombre;\n $form_data = ['route' => ['asociado.update',$asociado->id],'method' => 'PUT'];\n $cliente_id_field = '';\n $cliente_id = $asociado->cliente_id;\n\n return view('asociado.form')->with(compact('asociado','title','form_data','cliente_id_field','cliente_id'));\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "e4c3c0cbb7ac2570554ac1a25beb95aa", "score": "0.66388327", "text": "public function edit()\n {\n return view('berita::edit');\n }", "title": "" }, { "docid": "ab2518ea287ee8d0a67051d27dc511a8", "score": "0.66294515", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->membership->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['membership' => $this->membership]);\n\t}", "title": "" }, { "docid": "55c0c1d3fd64720346563285fe8ebb07", "score": "0.6628236", "text": "public function edit($id)\n {\n return view('employee.edit_form',['employee' => User::findOrFail($id)]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "4ba8a0764293ed6e4bdc9a47879f5cdb", "score": "0.66251445", "text": "public function edit($id)\n {\n $item = Provider::find($id);\n return View('provider.form', [\"item\" => $item, 'type' => 'edit']);\n }", "title": "" }, { "docid": "c2183a818e413caf29da395ac5aa45fe", "score": "0.6625103", "text": "public function edit($id)\n\t{\n\t\t$datos['empresa'] = Empresa::find($id);\n\t\t$datos['form'] = array('route'=> array('datos.empresas.update', $id), 'method' => 'PATCH');\n\t\t\n\t\treturn View::make('datos/empresas/list-edit-form')->with('datos', $datos);\n\t}", "title": "" }, { "docid": "1a4ead4c141c44cd189d59dd857cc05f", "score": "0.6621553", "text": "public function edit($field)\n {\n $field = Fields::find($field);\n return view('admin.fields.form',[\n 'active' => 'Fields',\n 'action' => 'Edit',\n 'field' => $field,\n ]);\n }", "title": "" }, { "docid": "5004b89ebea0b269b185830cb2f7e2f7", "score": "0.6621499", "text": "public function edit($id)\n {\n $this->view->guest = $this->model->edit($id);\n $this->view->render($this->_path . '/edit');\n \n }", "title": "" }, { "docid": "4085123883432653825ea3d6eca4c3ba", "score": "0.66196555", "text": "public function edit(Form $form, Event $event)\n {\n return view('form.edit', compact('event', 'form'));\n }", "title": "" }, { "docid": "8310a47ca16507655295572f382e4e29", "score": "0.6616868", "text": "public function edit($id)\n {\n // first : retrieve flower info and show the form to update flower\n }", "title": "" }, { "docid": "8c2bb4ce9efff69262207822b4887159", "score": "0.66112494", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = Penduduk::findOrFail($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "9a57ebf3330d38ff3b1cfbadfc9fc69b", "score": "0.66103256", "text": "function edit() {\n\t\t\n\t\tif ($_POST) {\n\t\t\t$this->entity->update($_POST);\n\t\t\t$this->_relative_redirect('view');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "12e1c226dd6ae426a8e7bea555851773", "score": "0.6606947", "text": "public function edit($id)\n {\n \t$manufacturer = Manufacturer::findOrFail($id);\n return view('backend.module.manufacturer.edit',['manufacturer' => $manufacturer]);\n }", "title": "" }, { "docid": "c6087fca66897a650dc6e75718832e74", "score": "0.66025347", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->generic_medication->id], 'method' => 'PUT'];\n \n return view(self::$prefixView . 'formm', compact('form_data'))\n \t->with(['generic_medication' => $this->generic_medication]);\n\t}", "title": "" }, { "docid": "a12dc077ea7b8efef6338c64b0b115cb", "score": "0.66000247", "text": "public function edit($id)\n {\n // get the nerd\n $product = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('products.edit')\n ->with('product', $product);\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "6d657e63dc93b082619d2f7dcb0b720c", "score": "0.65891075", "text": "public function edit($id)\n {\n //mostrar formulario d edicion\n }", "title": "" }, { "docid": "7b2f75aaedf8589b46dde92aafda12f3", "score": "0.6586938", "text": "public function editAction()\n\t{\n\t\t$accountId = $this->_getParam('id');\n\t\t$accountTable = new AccountTable();\n\t\tif ($accountId) $account = $accountTable->find($accountId);\n\t\telse {\n\t\t\t/* Redirect to some error page */\n\t\t}\n\t\t\n\t\t/* Setup view data */\n\t\t$view = $this->getView();\n\t\t\n\t\t$view->title = \"Edit Account\";\n\t\t$view->account = $account;\n\t\t$view->error = NULL;\n\t\t\n\t\t/* And render it */\t\t\n\t\t$this->render('account/AccountEditView.php');\n\t}", "title": "" }, { "docid": "7f6e393f74ad5b78eb86af1fb59ad0f7", "score": "0.65856075", "text": "public function edit($id)\n {\n $data = User::findOrFail($id);\n $template = (object)$this->template;\n $form = $this->form();\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "2ca5925eff8fd2c9f2e5fb536e2717b3", "score": "0.65842867", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'edit', true );\n\t\t$model\t=& $this->getModel( 'Item' );\n\t\t$model->checkout();\n\n\t\t$view =& $this->getView( 'Item' );\n\t\t$view->setModel( $model, true );\n\t\t// Set the layout and display\n\t\t$view->setLayout('form');\n\t\t$view->edit();\n\t}", "title": "" }, { "docid": "df89a714812746e77528c831bc256a8a", "score": "0.6574023", "text": "public function edit($id)\n {\n $this->user->offers()->findOrFail($id);\n\n return view('admin.offer.edit_form', [\n 'route_base_url' => 'offer',\n 'model_name' => '\\App\\Models\\Offer',\n 'model_id' => $id,\n ]);\n }", "title": "" }, { "docid": "568ce94a39ba9f1d0b81cd0579729a5f", "score": "0.6571842", "text": "public function edit()\n {\n $view = $this->getView('election', 'html');\n $view->setModel($this->getModel('election'), true);\n //JRequest::setVar('hidemainmenu', 1);\n\n $view->display();\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce4fc37201a9083467febf6f580c94ee", "score": "0.6567868", "text": "public function edit($id) {\n $urinalysis = Urinalysis::ConsolidatedId($id)->first();\n $urinalysisRef = UrinalysisRef::all();\n return view('pages.urinalysis.form', [\"urinalysis\" => $urinalysis, 'urinalysisRef' => $urinalysisRef, 'mode' => 'EDIT']);\n }", "title": "" }, { "docid": "df0197e5108b918276674eb05562c1d7", "score": "0.65657616", "text": "public function editAction()\n {\n $page = Pages::findFirst(\n [\n 'conditions' => 'id = :id:',\n 'bind' => ['id' => (int) $this->dispatcher->getParam('id')],\n ]\n );\n if ($page === false) {\n return $this->dispatcher->forward(['action' => 'error404']);\n }\n $this->assets\n ->collection('ace')\n ->addJs('scripts/ace/ace.js');\n $page->content = htmlentities($page->content);\n $this->view->page = $page;\n $this->view->title = $page->title.' – Edit ';\n $editable = new \\stdClass();\n $editable->content = $page->content;\n $editable->id = $page->id;\n $this->view->form = new \\Kolibri\\Forms\\Edit($editable);\n }", "title": "" }, { "docid": "d49dc9860beddbcef1bd1992ac80ce76", "score": "0.656234", "text": "public function action_edit()\r\n\t{\r\n\t\t$item_id = $this->request->param('params');\r\n\r\n\t\t$element = ORM::Factory($this->_resource, $item_id);\r\n\r\n\t\t$form = Formo::form()->orm('load', $element);\r\n\t\t$form->add('update', 'submit', 'Save');\r\n\r\n\t\tif($form->load($_POST)->validate())\r\n\t\t{\r\n\t\t\tif($this->_update_passed($form, $element))\r\n\t\t\t{\r\n\t\t\t\t$element->save();\r\n\t\t\t\t$form->orm('save_rel', $element);\r\n\r\n\t\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri( array('controller' => $this->controller)));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_update_error($form, $element);\r\n\t\t}\r\n\r\n\t\t$view = $this->template->content;\r\n\t\t$view->set(\"formo\", $form);\r\n\t}", "title": "" }, { "docid": "469fc3592be913e351b579a5c9fe18dc", "score": "0.65604365", "text": "public function edit()\n {\n $organization = OwnerOrganization::find(0);\n return view('modules.system.OwnerOrganization.form', compact('organization'));\n }", "title": "" }, { "docid": "59702db081c964bfd257f5f4ed31ec07", "score": "0.6559696", "text": "public function edit($id){\n $entry = Entry::find($id);\n $this->authorize('update', $entry); //Access Controll using policies\n return view('entries.edit',compact('entry'));\n }", "title": "" }, { "docid": "3cee07ed8f37cad18680bc48310b6842", "score": "0.6559204", "text": "public function edit()\n {\n return view('tenderpurchaserequest::edit');\n }", "title": "" }, { "docid": "531deb797a3602e8ea456bf473e6c600", "score": "0.6543909", "text": "public function edit($id)\n\t{\n\t\t$record = Record::find($id);\n\n\t\treturn View::make('records.edit', compact('record'));\n\t}", "title": "" }, { "docid": "5c6c8de62974cc03322207e7d02b68d7", "score": "0.6542949", "text": "public function edit($id) {\r\n\t\t$data ['aluno'] = Aluno::findOrFail ( $id );\r\n\t\t$data ['page_title'] = 'Editar aluno';\r\n\t\treturn view ( 'paginas.cadastro.aluno.create-edit' )->with ( $data );\r\n\t}", "title": "" }, { "docid": "0108853fa0d0f8ddd5e30d5bd2f3f67d", "score": "0.6542555", "text": "public function edit($id)\n\t{\n // Get the student\n $student = Student::find($id);\n\n // show the edit form and pass the nerd\n return View::make('students.edit')->with('student', $student);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "3d60dba5b14a240b364d0e8824386a7e", "score": "0.6542473", "text": "public function edit($id)\n {\n $electric = $this->electricService->findById($id);\n return view('electric.update' ,compact('electric'));\n }", "title": "" }, { "docid": "4530461421ee8156467d6dfae72cde9c", "score": "0.6540356", "text": "public function edit($id)\n {\n static::setInstanceModel($model = $this->model()->findOrFail($id));\n $this->renderForm($model);\n $this->renderButton($model);\n return view(static::$baseView.'.edit');\n }", "title": "" }, { "docid": "5cddc5545db4d8408b496a8b468427fc", "score": "0.6539553", "text": "public function edit($project_id) {\n $project = Project::withTrashed()->where('id', $project_id)->first();\n\n if (empty($project)) {\n return abort(404);\n }\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.store'));\n $form->model($project);\n $form->route(Administration::route('projects.update', $project->id));\n $form->method('PUT');\n $form->form(ProjectForm::class);\n\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.article') . ' - ' . trans('administration::admin.edit') . ' #' . $project->id);\n\n return $form->generate();\n }", "title": "" } ]
8e704564eb984bcd8ae78ba09b39c4f5
The availability filter which filters based on [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]. The availability filter helps a recruiter understand if a specific candidate is likely to be actively seeking new job opportunities based on an aggregated set of signals. Specifically, the intent is NOT to indicate the candidate's potential qualification / interest / close ability for a specific job. There can be at most one [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] per [signal_type][google.cloud.talent.v4beta1.AvailabilityFilter.signal_type]. If there are multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] for a [signal_type][google.cloud.talent.v4beta1.AvailabilityFilter.signal_type], an error is thrown. Generated from protobuf field repeated .google.cloud.talent.v4beta1.AvailabilityFilter availability_filters = 18;
[ { "docid": "ae477135d32cba648ba59b2a77324b50", "score": "0.7648822", "text": "public function setAvailabilityFilters($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Talent\\V4beta1\\AvailabilityFilter::class);\n $this->availability_filters = $arr;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "0812511549f78bc69b266f53165026f5", "score": "0.67165756", "text": "public function getAvailabilityFilters()\n {\n return $this->availability_filters;\n }", "title": "" }, { "docid": "75079e914cd742a3ffb9b341a658acdc", "score": "0.5950396", "text": "public function getCandidateAvailabilityFilter()\n {\n return isset($this->candidate_availability_filter) ? $this->candidate_availability_filter : null;\n }", "title": "" }, { "docid": "7485216222a0ab7afd64d87e73bdc82d", "score": "0.576366", "text": "public function setCandidateAvailabilityFilter($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Talent\\V4beta1\\CandidateAvailabilityFilter::class);\n $this->candidate_availability_filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d3b30550f1865cb2210fba3ab3b0f47d", "score": "0.5179799", "text": "public function getAvailabilityAllowableValues()\n {\n return [\n \n ];\n }", "title": "" }, { "docid": "bd95b3133d25690bf1caa5222881f28f", "score": "0.49595612", "text": "public function setAvailability($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\AppEngine\\V1\\Instance\\Availability::class);\n $this->availability = $var;\n\n return $this;\n }", "title": "" }, { "docid": "96adf771a55c1097f18e409400383341", "score": "0.48547795", "text": "public function getFilters()\n {\n if (empty($this->filters)) {\n $this->filters = [\n new TrafficArea(),\n new BusRegStatus(),\n ];\n }\n\n return $this->filters;\n }", "title": "" }, { "docid": "5455c50f940bed688e375aceb1bda7df", "score": "0.4690058", "text": "private function getAvailabilitiesBlock($filter, $selectedFilters)\n {\n if ($this->psStockManagement === null) {\n $this->psStockManagement = (bool) Configuration::get('PS_STOCK_MANAGEMENT');\n }\n\n if ($this->psOrderOutOfStock === null) {\n $this->psOrderOutOfStock = (bool) Configuration::get('PS_ORDER_OUT_OF_STOCK');\n }\n\n // We only initialize the options if stock management is activated\n $availabilityOptions = [];\n if ($this->psStockManagement) {\n $availabilityOptions = [\n Availability::IN_STOCK => [\n 'name' => $this->context->getTranslator()->trans(\n 'In stock',\n [],\n 'Modules.Facetedsearch.Shop'\n ),\n 'nbr' => 0,\n ],\n Availability::AVAILABLE => [\n 'name' => $this->context->getTranslator()->trans(\n 'Available',\n [],\n 'Modules.Facetedsearch.Shop'\n ),\n 'nbr' => 0,\n ],\n Availability::NOT_AVAILABLE => [\n 'name' => $this->context->getTranslator()->trans(\n 'Not available',\n [],\n 'Modules.Facetedsearch.Shop'\n ),\n 'nbr' => 0,\n ],\n ];\n\n $filteredSearchAdapter = $this->searchAdapter->getFilteredSearchAdapter(Search::STOCK_MANAGEMENT_FILTER);\n\n // Products without quantity in stock, with out-of-stock ordering disabled\n $filteredSearchAdapter->addOperationsFilter(\n Search::STOCK_MANAGEMENT_FILTER,\n [\n [\n ['quantity', [0], '<='],\n ['out_of_stock', !$this->psOrderOutOfStock ? [0, 2] : [0], '='],\n ],\n ]\n );\n $availabilityOptions[Availability::NOT_AVAILABLE]['nbr'] = $filteredSearchAdapter->count();\n\n // Products in stock, or with out-of-stock ordering enabled\n $filteredSearchAdapter->addOperationsFilter(\n Search::STOCK_MANAGEMENT_FILTER,\n [\n [\n ['out_of_stock', $this->psOrderOutOfStock ? [1, 2] : [1], '='],\n ],\n [\n ['quantity', [0], '>'],\n ],\n ]\n );\n $availabilityOptions[Availability::AVAILABLE]['nbr'] = $filteredSearchAdapter->count();\n\n // Products in stock\n $filteredSearchAdapter->addOperationsFilter(\n Search::STOCK_MANAGEMENT_FILTER,\n [\n [\n ['quantity', [0], '>'],\n ],\n ]\n );\n $availabilityOptions[Availability::IN_STOCK]['nbr'] = $filteredSearchAdapter->count();\n\n // If some filter was selected, we want to show only this single filter, it does not make sense to show others\n if (isset($selectedFilters['availability'])) {\n // We loop through selected filters and assign it to our options and remove the rest\n foreach ($availabilityOptions as $key => $values) {\n if (in_array($key, $selectedFilters['availability'], true)) {\n $availabilityOptions[$key]['checked'] = true;\n }\n }\n }\n\n // Hide Available option if the count is the same as In stock, it doesn't make no sense\n // Product count is a reliable indicator here, because there can never be product IN STOCK that is not AVAILABLE\n // So if the counts match, it MUST BE the same products\n if ($availabilityOptions[Availability::AVAILABLE]['nbr'] == $availabilityOptions[Availability::IN_STOCK]['nbr']) {\n unset($availabilityOptions[Availability::AVAILABLE]);\n }\n }\n\n $quantityBlock = [\n 'type_lite' => 'availability',\n 'type' => 'availability',\n 'id_key' => 0,\n 'name' => $this->context->getTranslator()->trans('Availability', [], 'Modules.Facetedsearch.Shop'),\n 'values' => $availabilityOptions,\n 'filter_show_limit' => (int) $filter['filter_show_limit'],\n 'filter_type' => $filter['filter_type'],\n ];\n\n return $quantityBlock;\n }", "title": "" }, { "docid": "afb1387a704780548e55aa61a99c112c", "score": "0.46823332", "text": "function bpi_available_filters() {\n return array(\n BPI_SEARCH_PHRASE_KEY,\n 'author',\n 'category',\n 'agency',\n 'audience',\n );\n}", "title": "" }, { "docid": "241a5b40a4243cb708b8c6a29f975b5d", "score": "0.46782213", "text": "public function getAvailabilityCodeAllowableValues()\n {\n return [\n self::AVAILABILITY_CODE_AA,\n self::AVAILABILITY_CODE_AC,\n ];\n }", "title": "" }, { "docid": "0650e09d8b3dafa75226b04551021003", "score": "0.46758515", "text": "public function getAvailableFilters()\n {\n if (!$this->defaultFilter) {\n $this->defaultFilter = $this->app->make(\n StandardFilter::class,\n [\n 'type' => $this,\n 'key' => self::IDENTIFIER,\n 'name' => t('User Deactivated'),\n 'databaseNotificationType' => 'userdeactivatednotification'\n ]\n );\n }\n\n return [$this->defaultFilter];\n }", "title": "" }, { "docid": "2fde5e0bec361ecfc59cfef8f6edd2de", "score": "0.4669667", "text": "public function categorizeUnavailability($availability)\n {\n $data = [];\n foreach ($availability as $info) {\n $data[$info->type][] = $info;\n }\n return $data;\n }", "title": "" }, { "docid": "db4f6152861030d00a1b236002dbc6c7", "score": "0.4615897", "text": "public function getEducationFilters()\n {\n return $this->education_filters;\n }", "title": "" }, { "docid": "78a5835434b48db1d1ad183ec5a512fc", "score": "0.4541446", "text": "public function setEducationFilters($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Talent\\V4beta1\\EducationFilter::class);\n $this->education_filters = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "92cb3d28570a6c1a833971965c57a6a1", "score": "0.4473986", "text": "protected function getEnabledFilterFormats() {\n return $this->filterStorage->loadByProperties(['status' => TRUE]);\n }", "title": "" }, { "docid": "ae486b396a633fab9255b8f8f1f73cc0", "score": "0.4470539", "text": "public function setApplicationJobFilters($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Talent\\V4beta1\\ApplicationJobFilter::class);\n $this->application_job_filters = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "408a85de790ff897087c90420c1ee10a", "score": "0.4456631", "text": "protected function getFilterConditions()\n {\n $conditions = $this->getCloudSearchConditions();\n\n $filters = $conditions->{ProductRepo::P_CLOUD_FILTERS};\n\n return !empty($filters) ? $filters : new \\stdClass();\n }", "title": "" }, { "docid": "a2a796fa1cdd771916abd5e30a410510", "score": "0.44556382", "text": "public function getAvailability()\n {\n return $this->availability;\n }", "title": "" }, { "docid": "b3bb36133ace66256db8896b4362823f", "score": "0.44508708", "text": "public function getFilters()\n {\n return [\n new CostAndStockFilter(\"Cost in GBP\", \"Stock\", 5, 1000, 10)\n ];\n }", "title": "" }, { "docid": "d5c82c9690ed35565bdacce8f4d30d85", "score": "0.44303474", "text": "public static function getAppliedFilters();", "title": "" }, { "docid": "99df5edd53d711aa61e4aa0ed5592cb0", "score": "0.44080645", "text": "public function hasFilters()\n {\n return new Enrise_Bool(0 < count($this->_filters));\n }", "title": "" }, { "docid": "4173482b6896bc3ca26a3a0ea2783315", "score": "0.44073698", "text": "protected function parseFilters()\n {\n $filter = [];\n foreach ($this->filterFields as $filterField) {\n $veq = self::getRequest()->getInput($filterField);\n if (!is_null($veq)) {\n $filter[$filterField] = $veq;\n }\n $vgt = self::getRequest()->getInput($filterField . '>');\n if (!is_null($vgt)) {\n $filter[$filterField . '[>=]'] = $vgt;\n }\n $vlt = self::getRequest()->getInput($filterField . '<');\n if (!is_null($vlt)) {\n $filter[$filterField . '[<=]'] = $vlt;\n }\n $vne = self::getRequest()->getInput($filterField . '!');\n if (!is_null($vne)) {\n $filter[$filterField . '[!=]'] = $vne;\n }\n }\n if ($filter) {\n $filter = ['AND'=>$filter];\n }\n return $filter;\n }", "title": "" }, { "docid": "32a1c9c833b433135cd07bc4d0fac3bb", "score": "0.44022843", "text": "public function setApplicationDateFilters($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Talent\\V4beta1\\ApplicationDateFilter::class);\n $this->application_date_filters = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "07b07ba6be9d36f3bcdf6ddb527d55d9", "score": "0.43524903", "text": "public static function availableFilterWidgets(): array;", "title": "" }, { "docid": "06fe3c91fe1a38bb1e9f8592bb72ac4a", "score": "0.433819", "text": "public function get_store_availability_rules() {\n\t\tcheck_ajax_referer( 'get-store-availability-rules', 'security' );\n\n\t\t$start_time = ! empty( $_GET['start_time'] ) ? wc_clean( $_GET['start_time'] ) : 'today';\n\t\t$end_time = ! empty( $_GET['end_time'] ) ? wc_clean( $_GET['end_time'] ) : 'tomorrow';\n\n\t\t$rules = WC_Data_Store::load( 'booking-global-availability' )->get_all_as_array(\n\t\t\tarray( array(\n\t\t\t\t'key' => 'range_type',\n\t\t\t\t'value' => 'store_availability',\n\t\t\t\t'compare' => '=',\n\t\t\t) ),\n\t\t\tdate( 'Y-m-d', strtotime( $start_time ) ),\n\t\t\tdate( 'Y-m-d', strtotime( $end_time ) )\n\t\t);\n\n\t\twp_send_json( $rules );\n\t}", "title": "" }, { "docid": "ff5f1e8bd2fc1a08f6b247977cac0495", "score": "0.43284777", "text": "public function getHavingFilters(): array\n {\n return $this->filters;\n }", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.43250442", "text": "public function getFilters();", "title": "" }, { "docid": "adae20581c4d520eb71fc6c30c63c466", "score": "0.43241733", "text": "public function hasFilters();", "title": "" }, { "docid": "5a2c36dd270d68d62968358847961806", "score": "0.43232128", "text": "public function getAvailability()\n {\n if (array_key_exists(\"availability\", $this->_propDict)) {\n return $this->_propDict[\"availability\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0f1f7d96312dda19a291ecc14a283e13", "score": "0.43212885", "text": "public function getApplicationJobFilters()\n {\n return $this->application_job_filters;\n }", "title": "" }, { "docid": "310347a1554510ce099887ca7d3a2fe4", "score": "0.43053314", "text": "public function isFilterable();", "title": "" }, { "docid": "a80e05a0d89fe0282d3abd3204b4b940", "score": "0.4279236", "text": "public function lazy_load_availability_rules() {\n\t\t$data = array_map( 'sanitize_text_field', $_POST );\n\n\t\tif (\n\t\t\t! wp_verify_nonce( $data['nonce'], 'lazy_load_availability_rules' ) ||\n\t\t\t! current_user_can( 'read_global_availability' )\n\t\t) {\n\t\t\twp_send_json_error( [\n\t\t\t\t'error_message' => esc_html__( 'You are not authorized to perform this action', 'woocommerce-bookings' )\n\t\t\t] );\n\t\t}\n\n\t\t/* @var WC_Global_Availability_Data_Store $global_availabilities_data_store */\n\t\t$global_availabilities_data_store = WC_Data_Store::load( 'booking-global-availability' );\n\n\t\t$global_availability_rule_per_page = absint( $data['per_page'] );\n\t\t$global_availabilities = $global_availabilities_data_store->get_all();\n\t\t$show_title = true;\n\t\t$show_google_event = isset( $data['show'] ) && 'google-events' === $data['show'];\n\t\t$can_lazy_load_availability_rules = false;\n\n\t\t$availability_rules_html = '';\n\t\t$offset = absint( $data['step'] ) * $global_availability_rule_per_page;\n\n\t\t$live_global_availabilities_counter = 0;\n\t\tif ( ! empty( $global_availabilities ) && is_array( $global_availabilities ) ) {\n\t\t\tob_start();\n\t\t\tforeach ( $global_availabilities as $index => $availability ) {\n\t\t\t\tif ( $availability->has_past() ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t// Hide availability rules from Google event store availability rules.\n\t\t\t\t\t( $show_google_event && ! $availability->get_gcal_event_id() ) ||\n\t\t\t\t\t// Hide Google event rules from Google event store availability rules.\n\t\t\t\t\t( ! $show_google_event && $availability->get_gcal_event_id() )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Skip already rendered availability rules.\n\t\t\t\tif ( $offset ) {\n\t\t\t\t\t-- $offset;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinclude WC_BOOKINGS_PLUGIN_PATH . '/includes/admin/views/html-booking-availability-fields.php';\n\t\t\t\t++ $live_global_availabilities_counter;\n\n\t\t\t\t// Check whether availability rules remaining to render.\n\t\t\t\t// Lazy load ajax request will continue to fetch availability rules html if availability rules remaining.\n\t\t\t\tif ( $global_availability_rule_per_page === $live_global_availabilities_counter ) {\n\t\t\t\t\t$can_lazy_load_availability_rules = $index !== array_key_last( $global_availabilities );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$availability_rules_html = ob_get_clean();\n\t\t}\n\n\t\twp_send_json_success( [\n\t\t\t'html' => $availability_rules_html,\n\t\t\t'last_step' => $data['step'],\n\t\t\t'lazy_load_availability_rules' => absint( $can_lazy_load_availability_rules )\n\t\t] );\n\t}", "title": "" }, { "docid": "19913c776208c76db8e3b059bf896a84", "score": "0.42776793", "text": "public function getInvariantConditions();", "title": "" }, { "docid": "1e51914591e1eedb1a3c47bbb7021cb0", "score": "0.42715338", "text": "public function getAvailabilityFull()\n {\n if (count($this->availability) == 0) {\n $this->getPropertyAvailability();\n }\n return $this->availability;\n }", "title": "" }, { "docid": "5111af91737f38c8a0aaeed087e6654b", "score": "0.42668375", "text": "public function getFilters()\n {\n $filters = array();\n\n if (($min = $this->_getMinInput()) && ($max = $this->_getMaxInput())) {\n $filters[] = $this->filter.\":[\".$min.\"T00:00:00Z TO \".$max.\"T11:59:59Z]\";\n } else {\n foreach ($this->element->children() as $option) {\n // Only use <option /> elements.\n if ($option->getName() != 'option') {\n continue;\n }\n\n $value = JArrayHelper::getValue($option, 'value', null, 'string');\n\n if ($this->value && $value == $this->value) {\n $filter = JArrayHelper::getValue($option, 'filter', null, 'string');\n\n $filters[] = $this->filter.\":\".$filter;\n\n continue;\n }\n }\n }\n\n return (count($filters)) ? $filters : array();\n }", "title": "" }, { "docid": "ecb3786831d4a6c270f67d2406557a76", "score": "0.42364708", "text": "public function filters(Request $request)\n {\n return [\n new Filters\\BillStatus,\n ];\n }", "title": "" }, { "docid": "959e984af1c198e563c14a34d25497d6", "score": "0.42337477", "text": "public function getFilters(Request $request)\n {\n $filter = [];\n\n $statuses = $request->get('status');\n if ($statuses) {\n $filter['status'] = explode(',', $statuses);\n }\n\n $statusIds = $request->get('status_id');\n if ($statusIds) {\n $filter['status_id'] = explode(',', $statusIds);\n }\n\n $types = $request->get('type');\n if ($types) {\n $filter['type_id'] = explode(',', $types);\n }\n\n $typeIds = $request->get('type_id');\n if ($typeIds) {\n $filter['type_id'] = explode(',', $typeIds);\n }\n\n $supplierId = $request->get('supplier_id');\n if ($supplierId) {\n $filter['accounts_supplier_id'] = $supplierId;\n }\n\n $isDeprecated = $request->get('is_deprecated');\n if ($isDeprecated !== null) {\n $filter['is_deprecated'] = $isDeprecated;\n }\n\n $parent = $request->get('parent');\n if ($parent) {\n $filter['parent'] = ($parent == 'null') ? null : $parent;\n }\n\n $categories = $request->get('categories');\n if ($categories) {\n $filter['categories'] = ($categories == 'null') ? null : $categories;\n }\n\n return $filter;\n }", "title": "" }, { "docid": "51709e7fe49291a8c54b67cefb70fde0", "score": "0.42331052", "text": "public function filters(): array\n {\n return [\n WherePivot::make('approved')->asBoolean(),\n ];\n }", "title": "" }, { "docid": "137241f1a7f9ec203523776afea53df0", "score": "0.4229093", "text": "public function getAvailableFilterMethods();", "title": "" }, { "docid": "4894c50e0bba77c3a508e68dd29c612c", "score": "0.42280832", "text": "public function getApplicationDateFilters()\n {\n return $this->application_date_filters;\n }", "title": "" }, { "docid": "8303ee2a2c5cf5cfc3d612544ea0cfa3", "score": "0.4201523", "text": "public function get_filter_sub_filters() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "100e056b63d86b54f8dae272c579e96e", "score": "0.41989362", "text": "public function hasAvailability()\n {\n return count($this->availability) > 0;\n }", "title": "" }, { "docid": "f89f4f4e3d37e847fe3aa848ecc60e6d", "score": "0.4194893", "text": "private function hasAvailabilityPeriods($hotel)\n\t{\n\t\treturn (!isset($hotel['availability']) || !is_array($hotel['availability'])) ? false : true;\n\t}", "title": "" }, { "docid": "e76fb9241262a3972644ac6cd80534fd", "score": "0.41926563", "text": "public function loadFilters()\n\t{\n\t\t$ref = $this;\n\t\t$this->addFilter(['kpi_year_id'], function(Builder $builder,$filter) use ($ref){\n\t\t\treturn $ref->filterByKpiYearId($builder, $filter);\n\t\t});\n\n\t\t$this->addFilter(['interval_check'], function(Builder $builder,$filter) use ($ref){\n\t\t\treturn $ref->filterByKpiInterval($builder, $filter);\n\t\t});\n\n\t}", "title": "" }, { "docid": "35c21b8a980666e708d59d0435a80926", "score": "0.41854048", "text": "protected function _filterAllowField($data, $availableFields = null) {\n $collection = collect($data);\n\n return $collection->filter(function ($value, $key) use ($availableFields) {\n return in_array($key, $availableFields);\n })->toArray();\n }", "title": "" }, { "docid": "2b0057ad38f400c139439553662f45b0", "score": "0.4178905", "text": "public function filters(Request $request)\n {\n return [\n new Filters\\InProgress,\n ];\n }", "title": "" }, { "docid": "e89836940398e792b06c7a93b15cd835", "score": "0.41523352", "text": "function wcs_custom_get_availability( $availability, $_product ) {\n\tif ( ! $_product->is_in_stock() ) {\n\t\t$availability['availability'] = __('Bookings closed', 'woocommerce');\n\t}\n\treturn $availability;\n}", "title": "" }, { "docid": "c148dc9319d3f3d4344f753938a38422", "score": "0.41405514", "text": "public function getFilters() {\n\t\t\t$this->blnInitialized || $this->init();\n\t\t\treturn $this->arrFilters;\n\t\t}", "title": "" }, { "docid": "74d6f914330c4ad0413b43dbc301eb14", "score": "0.41405323", "text": "public function getFilters() {\n\t\treturn $this->aFilters;\n\t}", "title": "" }, { "docid": "27d8848c572c34f35a422b0652a08b84", "score": "0.41269767", "text": "protected function initializeFilters()\n\t{\n\t\t$this->iso_filterFields = deserialize($this->iso_filterFields);\n\t\t$this->iso_sortingFields = deserialize($this->iso_sortingFields);\n\t\t$this->iso_searchFields = deserialize($this->iso_searchFields);\n\n\t\tif (!$this->iso_enableLimit && !is_array($this->iso_filterFields) && !is_array($this->iso_sortingFields) && !is_array($this->iso_searchFields))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($this->iso_filterTpl)\n\t\t{\n\t\t\t$this->strTemplate = $this->iso_filterTpl;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a2f02df29521ae0528f48ff3fd27e290", "score": "0.41133496", "text": "public function getFilters()\n {\n return [];\n }", "title": "" }, { "docid": "2673586a9421a189c167d503fdfb7a7d", "score": "0.41105416", "text": "public function filterable();", "title": "" }, { "docid": "81c233245f936c769c853b4a0c68aad9", "score": "0.40787736", "text": "public function filters()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "9fe818f73903c18e18fe7e8d65555dcf", "score": "0.4076101", "text": "public function getFilters()\n {\n return (array)$this->filters;\n }", "title": "" }, { "docid": "481268931666b1537395a705828fdae3", "score": "0.40741187", "text": "public function getAvailability()\n {\n return $this->available;\n }", "title": "" }, { "docid": "d82ac1eb9a4cda19aa4c17a73d126375", "score": "0.40710732", "text": "private function check_filters()\n {\n //Get the tracking filters from the config\n $tracking_filters = $this->configuration['tracking_filter'];\n\n //If there are filters, process them\n if (is_array($tracking_filters) && count($tracking_filters) > 0 && $tracking_filters[0] !== null)\n {\n $filter_results = array();\n\n //go through each tracking filter and make sure that they pass\n foreach($tracking_filters as $curr_filter)\n {\n //Check the filter for the right type\n if ( ! is_array($curr_filter) OR (count($curr_filter) != 4 && count($curr_filter) != 5))\n {\n show_error(\"The userTracking filter is malformed. Check the userTracking configuration. Filter: $curr_filter\");\n continue;\n }\n\n if (count($curr_filter) == 4)\n {\n list($class_type, $class_name, $function_name, $expected_result) = $curr_filter;\n $the_args = array(); //This is empty\n }\n elseif (count($curr_filter) == 5)\n list($class_type, $class_name, $function_name, $expected_result, $the_args) = $curr_filter;\n else\n {\n show_error(\"The userTracking filter is malformed. Check the userTracking configuration. Filter: $curr_filter\");\n continue;\n }\n\n //Run the filter\n if ( ! $this->CI->load->$class_type($class_name))\n {\n if ((($class_type !== 'helper') && !method_exists($this->CI->$class_name, $function_name)) OR ($class_type == 'helper' && !function_exists($function_name)))\n show_error(\"Could not load the $function_name in $class_name. The filter will not be applied.\");\n else //Do it!\n {\n if ($class_type == 'helper')\n $curr_filter_result = call_user_func_array($function_name, $the_args);\n else\n $curr_filter_result = call_user_func_array(array($this->CI->$class_name, $function_name), $the_args);\n }\n }\n else\n show_error(\"Could not load the $class_type: $class_name. Check the userIdentifier configuration in userTracking config. User filter will not be applied.\");\n\n //Analyze the results\n //If there is no result for the current filter, autofail!\n if ( ! isset($curr_filter_result))\n {\n $filter_results[] = 'fail';\n }\n else //if there is a result, test it\n {\n \t//Do a strong type comparison if we are expecting true or false\n \tif ($expected_result === TRUE OR $expected_result === FALSE)\n \t{\n\t if ($curr_filter_result === $expected_result)\n\t $filter_results[] = 'pass';\n\t else\n\t $filter_results[] = 'fail';\n \t}\n \telse //Do a weak type comparison for everything else\n \t{\n\t if ($curr_filter_result == $expected_result)\n\t $filter_results[] = 'pass';\n\t else\n\t $filter_results[] = 'fail';\n \t}\n }\n }\n\n //check the results\n if (strtoupper($this->configuration['tracking_filter_logic']) == \"AND\") //AND Logic\n {\n if ( ! in_array(\"fail\", $filter_results))\n return TRUE;\n else\n return FALSE;\n }\n else //OR Logic\n {\n if (in_array(\"pass\", $filter_results))\n return TRUE;\n else\n return FALSE;\n }\n }\n else //no filters to check -- pass automatically.\n return TRUE;\n }", "title": "" }, { "docid": "cd0a6b840dd09adf1524dc95387c7604", "score": "0.4069134", "text": "function ui_filter_list($attrib, $rc, $showVacations) {\n $msgErrorPrefix = $showVacations ? 'msg_err_load_vacation_list' : 'msg_err_load_filter_list';\n\n $filters = $this->getFilters($rc, $msgErrorPrefix, null);\n if ($filters === null) {\n return null;\n }\n\n $names = array();\n $enabledReplace = array();\n\n // create list entries\n $dateFmt = \"d.m.y\";\n foreach ($filters as $key => $filter) {\n // filter out either normal filters or vacations\n if ($showVacations !== $filter instanceof Vacation) continue;\n\n $name = $filter->getName();\n\n if (empty($name)) {\n $name = \"Filter $key\";\n }\n\n if (!$showVacations) {\n switch ($filter->getPostActionBehaviour()) {\n case Filter::POST_END_INBOX:\n $class = 'post_inbox';\n break;\n case Filter::POST_CONTINUE:\n $class = 'post_continue';\n break;\n case Filter::POST_END_DISCARD:\n default:\n $class = 'post_discard';\n break;\n }\n } else {\n $class = '';\n }\n\n $listItem = array(\n 'id' => $key,\n 'name' => $name,\n 'class' => $class\n );\n\n if ($filter instanceof Vacation) {\n $dateRange = $filter->getRange();\n\n $dateStart = $dateRange['start']->format($dateFmt);\n $dateEnd = $dateRange['end']->format($dateFmt);\n\n $listItem['date-range'] = \"$dateStart - $dateEnd\";\n }\n\n $names[] = $listItem;\n\n $isEnabled = $filter->getFilterEnabled();\n $command = \"rcmail.command('toggle_enabled', this)\";\n\n $enabledCheckbox =\n \"</td><td class='checkbox-cell' style='text-align: right;'>\".\n \"<div class='custom-control custom-switch'><input onclick=\\\"$command\\\" class='form-check-input custom-control-input' type='checkbox' \";\n $enabledCheckbox .= ($isEnabled ? 'checked' : '');\n $enabledCheckbox .= \" /><label onclick=\\\"$command\\\" class='custom-control-label'/></div>\";\n $enabledCheckbox .= \"</td></tr>\";\n\n $enabledReplace[] = $enabledCheckbox;\n }\n\n // list output\n $out = $rc->table_output($attrib, $names, array('name', 'date-range'),'id');\n\n // inject checkbox switches to each row\n preg_match_all(\"/<\\/td>\\s*<\\/tr>/\", $out, $matches, PREG_OFFSET_CAPTURE);\n $injectedOut = $out;\n $offset = 0;\n\n foreach ($matches[0] as $key => $match) {\n $replacement = $enabledReplace[$key];\n\n $injectedOut = substr_replace($injectedOut, $replacement, $match[1] + $offset, strlen($match[0]));\n\n $offset += strlen($replacement) - strlen($match[0]);\n }\n\n $out = $injectedOut;\n\n return $out;\n }", "title": "" }, { "docid": "0f541aa18f26eaabaaf0a3e86d9ca984", "score": "0.4063335", "text": "public function filters(Request $request)\n {\n return [\n new ItemStatusFilter,\n ];\n }", "title": "" }, { "docid": "dd52e0aa68e2c377c55ead214cb89e28", "score": "0.40582228", "text": "public function filterOffers(Iterator $iterator): void {\n $iterator->rewind();\n while ($iterator->valid()) {\n $offer = $iterator->current();\n if (\n strtotime($offer->getStartDate()) >= strtotime($this->getStart()) &&\n strtotime($offer->getEndDate()) <= strtotime($this->getEnd()) &&\n $offer->getQuantity() > 0\n ) {\n $this->filtered[] = $offer;\n print_r($offer);\n }\n $iterator->next();\n }\n $this->logger->success('found ' . count($this->filtered) . 'matches');\n }", "title": "" }, { "docid": "650fb50aa1a17adfb9a2c91cd0536a4d", "score": "0.4045728", "text": "public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n Where::make('taskType', 'type'),\n Where::make('status'),\n Where::make('assigner', 'assigner_id'),\n Where::make('assignee', 'assignee_id'),\n SignaturesFilter::make('signatures'),\n ];\n }", "title": "" }, { "docid": "e77e60a8eb8c3d57fd5ba2919631894c", "score": "0.4040759", "text": "public function getPriceRangeFilters() {\n return [\n 0 => [\n 'value' => 0,\n 'name' => '$',\n ],\n 1 => [\n 'value' => 1,\n 'name' => '$$',\n ],\n 2 => [\n 'value' => 2,\n 'name' => '$$$',\n ],\n 3 => [\n 'value' => 3,\n 'name' => '$$$$',\n ],\n 4 => [\n 'value' => 4,\n 'name' => '$$$$$',\n ],\n ];\n }", "title": "" }, { "docid": "5cbaa9aecbb26b4d5d7efc8be1611bcb", "score": "0.40399462", "text": "public function fetchFilters()\n {\n $filters = !empty($this->request->get('filters')) ? json_decode($this->request->get('filters'), true) : [];\n\n return $filters;\n }", "title": "" }, { "docid": "bc2843f7b223fde8bb0b7bb5009f5388", "score": "0.403333", "text": "public function where_isActive() {\n\t\t$collection = new tx_ptlist_filterCollection($this->listId);\n\n\t\tforeach ($this as $key => $filter) { /* @var filter tx_ptlist_filter */\n\t\t\tif ($filter->get_isActive() == true) {\n\t\t\t\t$collection->addItem($filter);\n\t\t\t}\n\t\t}\n\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "cba53017b780441ccc0bc34469dbcc9c", "score": "0.4028546", "text": "public function getOfferAvailability()\n {\n\n return $this->offer_availability;\n }", "title": "" }, { "docid": "d81e846f0a966f042d4b3607855a8f15", "score": "0.4011469", "text": "public function getCompleteFilters() {\n\t\treturn $this->getFilters();\n\t}", "title": "" }, { "docid": "5e1c71e8eeab68f1e9fc9e75d3d3258f", "score": "0.40099165", "text": "public function filters(Request $request)\n {\n return [\n new Filters\\TaskStatusFilter(),\n ];\n }", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.40045476", "text": "public function filters();", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.40045476", "text": "public function filters();", "title": "" }, { "docid": "1059a44e38acad7a672dfb681ffbf798", "score": "0.39982593", "text": "public function callback_convert_legacy_conditions( $request_data ) {\n\t\t$parameters = $request_data->get_params();\n\n\t\tif ( empty( $parameters['legacyConditions'] ) ) {\n\t\t\treturn new WP_REST_Response( false, 400 );\n\t\t}\n\n\t\t$class = new Conditional_Blocks_Render_Block();\n\t\t$converted = $class->convert_v1_to_v2_conditions( $parameters['legacyConditions'] );\n\n\t\treturn new WP_REST_Response( $converted, 200 );\n\t}", "title": "" }, { "docid": "9e57edecac5110b3988d1928ec9522f6", "score": "0.39904028", "text": "function bpi_build_filters() {\n $components = _bpi_build_query();\n $filters_markup = array();\n $enabled_filters = bpi_available_filters();\n\n foreach ($components as $key => $value) {\n // Limit the filtering options.\n if (!in_array($key, $enabled_filters)) {\n continue;\n }\n\n // Used in link.\n $value_text = $value;\n\n // Get agency name from cache.\n if ($key == 'agency') {\n $cache = cache_get(BPI_AGENCY_CACHE);\n if ($cache && isset($cache->data[$value])) {\n $value_text = $cache->data[$value];\n }\n }\n\n $item['name'] = $key;\n $item['label'] = bpi_label_mapper($key);\n $item['value'] = $value;\n $item['search_value'] = $value;\n $item['search_stripped_filter'] = _bpi_build_query('', '', $key);\n\n $item['link'] = l($value_text, 'admin/bpi', array('query' => array($key => $value)));\n $item['remove'] = l(\n theme_image(\n array(\n 'path' => drupal_get_path('module', 'bpi') . '/images/cross.png',\n 'width' => 16,\n 'height' => 16,\n 'alt' => '',\n 'attributes' => array(),\n )\n ),\n 'admin/bpi',\n array(\n 'query' => $item['search_stripped_filter'],\n 'html' => TRUE,\n 'attributes' => array(\n 'class' => array('bpi-filter-remove-cross'),\n ),\n )\n );\n\n $filters_markup[] = theme('bpi_filter_item', array('filter' => $item));\n }\n\n return implode('', $filters_markup);\n}", "title": "" }, { "docid": "322fc6aec9e420cc80861d8dc2f31466", "score": "0.39844647", "text": "public function available($available = TRUE)\n {\n return $this->where('admin.status', ($available) ? 'active' : 'inactive');\n }", "title": "" }, { "docid": "bf79fd166dd930f6bc0e93f3bd2e944b", "score": "0.3978567", "text": "private function filter_options($request){\n $key = $request->input('key') ? $request->input('key') : '';\n $date_range = $request->input('date_range') ? $request->input('date_range') : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admin_helpers->admin_handle_element_form_filter($array_filters);\n }", "title": "" }, { "docid": "f925083e20164be70130b71ce5b2a72e", "score": "0.39783648", "text": "protected function generateFilters()\n\t{\n\t\t$this->Template->hasFilters = false;\n\n\t\tif (is_array($this->iso_filterFields) && count($this->iso_filterFields)) // Can't use empty() because its an object property (using __get)\n\t\t{\n\t\t\t$time = time();\n\t\t\t$arrFilters = array();\n\t\t\t$arrInput = $this->Input->post('filter');\n\t\t\t$arrCategories = $this->findCategories($this->iso_category_scope);\n\n\t\t\tforeach ($this->iso_filterFields as $strField)\n\t\t\t{\n\t\t\t\t$arrValues = array();\n\t\t\t\t$objValues = $this->Database->execute(\"SELECT DISTINCT p1.$strField FROM tl_iso_products p1\n\t\t\t\t LEFT OUTER JOIN tl_iso_products p2 ON p1.pid=p2.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE p1.language='' AND p1.$strField!=''\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t. (BE_USER_LOGGED_IN === true ? '' : \" AND p1.published='1' AND (p1.start='' OR p1.start<$time) AND (p1.stop='' OR p1.stop>$time)\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t. \"AND (p1.id IN (SELECT pid FROM tl_iso_product_categories WHERE page_id IN (\" . implode(',', $arrCategories) . \"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t OR p1.pid IN (SELECT pid FROM tl_iso_product_categories WHERE page_id IN (\" . implode(',', $arrCategories) . \")))\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t. (BE_USER_LOGGED_IN === true ? '' : \" AND (p1.pid=0 OR (p2.published='1' AND (p2.start='' OR p2.start<$time) AND (p2.stop='' OR p2.stop>$time)))\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t. ($this->iso_list_where == '' ? '' : \" AND {$this->iso_list_where}\"));\n\n\t\t\t\twhile ($objValues->next())\n\t\t\t\t{\n\t\t\t\t\t$arrValues = array_merge($arrValues, deserialize($objValues->$strField, true));\n\t\t\t\t}\n\n\t\t\t\tif ($this->blnCacheRequest && in_array($arrInput[$strField], $arrValues))\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['ISO_FILTERS'][$this->id][$strField] = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'operator'\t\t=> '==',\n\t\t\t\t\t\t'attribute'\t\t=> $strField,\n\t\t\t\t\t\t'value'\t\t\t=> $arrInput[$strField],\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Request cache contains wrong value, delete it!\n\t\t\t\telseif (is_array($GLOBALS['ISO_FILTERS'][$this->id][$strField]) && !in_array($GLOBALS['ISO_FILTERS'][$this->id][$strField]['value'], $arrValues))\n\t\t\t\t{\n\t\t\t\t\t$this->blnCacheRequest = true;\n\t\t\t\t\tunset($GLOBALS['ISO_FILTERS'][$this->id][$strField]);\n\n\t\t\t\t\t$this->Database->prepare(\"DELETE FROM tl_iso_requestcache WHERE id=?\")->execute($this->Input->get('isorc'));\n\t\t\t\t}\n\n\t\t\t\t// No need to generate options if we reload anyway\n\t\t\t\telseif (!$this->blnCacheRequest)\n\t\t\t\t{\n\t\t\t\t\tif (empty($arrValues))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$arrData = $GLOBALS['TL_DCA']['tl_iso_products']['fields'][$strField];\n\n\t\t\t\t\tif (is_array($GLOBALS['ISO_ATTR'][$arrData['inputType']]['callback']) && !empty($GLOBALS['ISO_ATTR'][$arrData['inputType']]['callback']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($GLOBALS['ISO_ATTR'][$arrData['inputType']]['callback'] as $callback)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->import($callback[0]);\n\t\t\t\t\t\t\t$arrData = $this->{$callback[0]}->{$callback[1]}($strField, $arrData, $this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Use the default routine to initialize options data\n\t\t\t\t\t$arrWidget = $this->prepareForWidget($arrData, $strField);\n\n\t\t\t\t\t// Must have options to apply the filter\n\t\t\t\t\tif (!is_array($arrWidget['options']))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ($arrWidget['options'] as $k => $option)\n\t\t\t\t\t{\n\t\t\t\t\t if ($option['value'] == '')\n\t\t\t\t\t {\n \t\t\t\t\t $arrWidget['blankOptionLabel'] = $option['label'];\n \t\t\t\t\t unset($arrWidget['options'][$k]);\n \t\t\t\t\t continue;\n\t\t\t\t\t }\n\t\t\t\t\t\telseif (!in_array($option['value'], $arrValues) || $option['value'] == '-')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($arrWidget['options'][$k]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$arrWidget['options'][$k]['default'] = $option['value'] == $GLOBALS['ISO_FILTERS'][$this->id][$strField]['value'] ? '1' : '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Hide fields with just one option (if enabled)\n\t\t\t\t\tif ($this->iso_filterHideSingle && count($arrWidget['options']) < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$arrFilters[$strField] = $arrWidget;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// !HOOK: alter the filters\n\t\t\tif (isset($GLOBALS['ISO_HOOKS']['generateFilters']) && is_array($GLOBALS['ISO_HOOKS']['generateFilters']))\n\t\t\t{\n\t\t\t\tforeach ($GLOBALS['ISO_HOOKS']['generateFilters'] as $callback)\n\t\t\t\t{\n\t\t\t\t\t$this->import($callback[0]);\n\t\t\t\t\t$arrFilters = $this->$callback[0]->$callback[1]($arrFilters);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($arrFilters))\n\t\t\t{\n\t\t\t\t$this->Template->hasFilters = true;\n\t\t\t\t$this->Template->filterOptions = $arrFilters;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c90590d6e3fefcd525aefbb82e1cd2e2", "score": "0.39611605", "text": "public function getActiveFilters()\n {\n $request = Yii::$app->request;\n // Render links to cancel applied filters like prices, brands, attributes.\n $menuItems = [];\n\n\n if ($this->route == 'shop/catalog/view' || $this->route == 'shop/search/index') {\n $brands = array_filter(explode(',', $request->getQueryParam('brand')));\n $brands = Brand::getDb()->cache(function ($db) use ($brands) {\n return Brand::findAll($brands);\n }, 3600);\n }\n\n //$brandsIds = array_filter(explode(',', $request->getQueryParam('brand')));\n\n\n if ($request->getQueryParam('price')) {\n $menuItems['price'] = [\n 'name' => 'price',\n 'label' => Yii::t('shop/default', 'FILTER_BY_PRICE') . ':',\n 'itemOptions' => ['id' => 'current-filter-prices']\n ];\n }\n if (isset(Yii::$app->controller->prices[0])) {\n if ($this->getCurrentMinPrice() > 0) {\n $menuItems['price']['items'][] = [\n // 'name'=>'min_price',\n 'value_url' => number_format($this->getCurrentMinPrice(), 0, '', ''),\n 'value' => Yii::$app->currency->number_format($this->getCurrentMinPrice()),\n 'label' => Html::decode(Yii::t('shop/default', 'FILTER_CURRENT_PRICE_MIN', ['value' => Yii::$app->currency->number_format($this->getCurrentMinPrice()), 'currency' => Yii::$app->currency->active['symbol']])),\n 'linkOptions' => ['class' => 'remove', 'data-price' => 'min_price'],\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, 'price', Yii::$app->controller->prices[0])\n ];\n }\n }\n\n if (isset(Yii::$app->controller->prices[1])) {\n if ($this->getCurrentMaxPrice() > 0) {\n $menuItems['price']['items'][] = [\n // 'name'=>'max_price',\n 'value_url' => number_format($this->getCurrentMaxPrice(), 0, '', ''),\n 'value' => Yii::$app->currency->number_format($this->getCurrentMaxPrice()),\n 'label' => Yii::t('shop/default', 'FILTER_CURRENT_PRICE_MAX', ['value' => Yii::$app->currency->number_format($this->getCurrentMaxPrice()), 'currency' => Yii::$app->currency->active['symbol']]),\n 'linkOptions' => array('class' => 'remove', 'data-price' => 'max_price'),\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, 'price', Yii::$app->controller->prices[1])\n ];\n }\n }\n\n\n /*if ($request->getQueryParam('min_price') || $request->getQueryParam('min_price')) {\n $menuItems['price'] = [\n 'name' => 'price',\n 'label' => Yii::t('shop/default', 'FILTER_BY_PRICE') . ':',\n 'itemOptions' => ['id' => 'current-filter-prices']\n ];\n }\n if ($request->getQueryParam('min_price')) {\n $menuItems['price']['items'][] = [\n // 'name'=>'min_price',\n 'value' => Yii::$app->currency->number_format($this->getCurrentMinPrice()),\n 'label' => Yii::t('shop/default', 'FILTER_CURRENT_PRICE_MIN', ['value' => Yii::$app->currency->number_format($this->getCurrentMinPrice()), 'currency' => Yii::$app->currency->active['symbol']]),\n 'linkOptions' => ['class' => 'remove', 'data-price' => 'min_price'],\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, 'min_price')\n ];\n }\n\n if ($request->getQueryParam('max_price')) {\n $menuItems['price']['items'][] = [\n // 'name'=>'max_price',\n 'value' => Yii::$app->currency->number_format($this->getCurrentMaxPrice()),\n 'label' => Yii::t('shop/default', 'FILTER_CURRENT_PRICE_MAX', ['value' => Yii::$app->currency->number_format($this->getCurrentMaxPrice()), 'currency' => Yii::$app->currency->active['symbol']]),\n 'linkOptions' => array('class' => 'remove', 'data-price' => 'max_price'),\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, 'max_price')\n ];\n }*/\n\n if ($this->route == 'shop/catalog/view') {\n if (!empty($brands)) {\n $menuItems['brand'] = [\n 'name' => 'brand',\n 'label' => Yii::t('shop/default', 'FILTER_BY_BRAND') . ':',\n 'itemOptions' => ['id' => 'current-filter-brand']\n ];\n foreach ($brands as $id => $brand) {\n $menuItems['brand']['items'][] = [\n 'value' => $brand->id,\n 'label' => $brand->name,\n 'options' => [\n 'class' => 'remove',\n 'data-name' => 'brand',\n 'data-target' => '#filter_brand_' . $brand->id\n ],\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, 'brand', $brand->id)\n ];\n }\n }\n }\n\n // Process eav attributes\n $activeAttributes = $this->filter->activeAttributes;\n if (!empty($activeAttributes)) {\n foreach ($activeAttributes as $attributeName => $value) {\n if (isset($this->eavAttributes[$attributeName])) {\n $attribute = $this->eavAttributes[$attributeName];\n $menuItems[$attributeName] = [\n 'name' => $attribute->name,\n 'label' => $attribute->title . ':',\n 'itemOptions' => ['id' => 'current-filter-' . $attribute->name]\n ];\n foreach ($attribute->options as $option) {\n if (isset($activeAttributes[$attribute->name]) && in_array($option->id, $activeAttributes[$attribute->name])) {\n $menuItems[$attributeName]['items'][] = [\n 'value' => $option->id,\n 'label' => $option->value . (($attribute->abbreviation) ? ' ' . $attribute->abbreviation : ''),\n 'linkOptions' => [\n 'class' => 'remove',\n 'data-name' => $attribute->name,\n 'data-target' => \"#filter_{$attribute->name}_{$option->id}\"\n ],\n 'url' => Yii::$app->urlManager->removeUrlParam('/' . Yii::$app->requestedRoute, $attribute->name, $option->id)\n ];\n sort($menuItems[$attributeName]['items']);\n }\n }\n }\n }\n }\n\n return $menuItems;\n }", "title": "" }, { "docid": "f4a846d58e3c1ad883486cff7c9ef7bc", "score": "0.39608824", "text": "public function hasFilters()\n {\n return $this->has(ConfigUtil::FILTERS);\n }", "title": "" }, { "docid": "4cba02318c89b8c14d462976c33d7f7a", "score": "0.3955063", "text": "public function add_store_availability_rule() {\n\t\tcheck_ajax_referer( 'add-store-availability-rule', 'security' );\n\n\t\tif ( empty( $_POST['event_data'] ) || ! is_array( $_POST['event_data'] ) ) {\n\t\t\twp_send_json_error( 'Missing or malformed event data' );\n\t\t}\n\n\t\t$event = new WC_Global_Availability();\n\t\t$event_data = wc_clean( $_POST['event_data'] );\n\n\t\tforeach ( $event_data as $field => $value ) {\n\t\t\tif ( ! is_callable( array( $event, 'set_' . $field ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$event->{\"set_{$field}\"}( $value );\n\t\t}\n\n\t\t$event->set_range_type( 'store_availability' );\n\n\t\t$data_store = WC_Data_Store::load( 'booking-global-availability' );\n\n\t\ttry {\n\t\t\t$data_store->create( $event );\n\t\t} catch ( Exception $e ) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\n\t\twp_send_json( array(\n\t\t\t'success' => true,\n\t\t\t'id' => $event->get_id(),\n\t\t) );\n\t}", "title": "" }, { "docid": "8158e438a41e5916f87247b773baf10b", "score": "0.39455125", "text": "public function getBlacklistFilters()\n\t{\n\t\treturn $this->getBehaviorParam('blacklistFilters', []);\n\t}", "title": "" }, { "docid": "84d833b5e5273834298c228240faa09b", "score": "0.39449757", "text": "public function updateAvailability(Google_Service_Doubleclicksearch_UpdateAvailabilityRequest $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('updateAvailability', array($params), \"Google_Service_Doubleclicksearch_UpdateAvailabilityResponse\");\n }", "title": "" }, { "docid": "6cd3f15c221e90e4d7d0d42fa6f77bf6", "score": "0.39257666", "text": "public function setAvailability($startTime, $endTime, $available)\n\t{\n\t\tif (\n\t\t\t !isset($startTime, $endTime, $available)\n\t\t\t|| !is_int($startTime)\n\t\t\t|| !is_int($endTime)\n\t\t\t|| !is_bool($available)\n\t\t) {\n\t\t\tthrow new InvalidArgumentException();\n\t\t}\n\t\tif ($startTime >= $endTime) {\n\t\t\tthrow new InvalidArgumentException(sprintf(\n\t\t\t\t'The end time must be be greater than the start time.'\n\t\t\t));\n\t\t}\n\t\tforeach ($this->intervals as $interval) {\n\t\t\tif ($interval->getStartTime() >= $startTime && $interval->getEndTime() <= $endTime) {\n\t\t\t\t$interval->setAvailability($available);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.39247257", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "84236c044ca50ea6bf9cd47aab2d24bf", "score": "0.39218995", "text": "protected function setApplicableFilters() {\n if ($this->needsAnswer()) {\n if ($this->hasAnswered()) {\n switch ($this->isAttending()) {\n case 'yes':\n $this->applicable_filters[] = 'going';\n break;\n case 'maybe':\n $this->applicable_filters[] = 'maybe-going';\n break;\n case 'no':\n $this->applicable_filters[] = 'not-going';\n break;\n }\n } else {\n $this->applicable_filters[] = 'unanswered';\n }\n }\n $this->setDateApplicableFilters();\n }", "title": "" }, { "docid": "f0ca1d5c32304fd70dbac87bfccea706", "score": "0.39153793", "text": "public function filters_get_avail() {\n\t\tif (isset($this->_avail_filters)) {\n\t\t\treturn $this->_avail_filters;\n\t\t}\n\t\t$names = array();\n\t\t$suffix = '.class.php';\n\t\t$prefix = 'assets_filter_';\n\t\t$prefix2 = YF_PREFIX;\n\t\t$dir = 'classes/assets/';\n\t\t$pattern = $dir. '*'. $prefix. '*'. $suffix;\n\t\t$globs = array(\n\t\t\t'yf_main'\t\t\t\t=> YF_PATH. $pattern,\n\t\t\t'yf_plugins'\t\t\t=> YF_PATH. 'plugins/*/'. $pattern,\n\t\t\t'project_main'\t\t\t=> PROJECT_PATH. $pattern,\n\t\t\t'project_app'\t\t\t=> APP_PATH. $pattern,\n\t\t\t'project_plugins'\t\t=> PROJECT_PATH. 'plugins/*/'. $pattern,\n\t\t\t'project_app_plugins'\t=> APP_PATH. 'plugins/*/'. $pattern,\n\t\t);\n\t\tif (is_site_path()) {\n\t\t\t$globs += array(\n\t\t\t\t'site_main'\t\t=> SITE_PATH. $pattern,\n\t\t\t\t'site_plugins'\t=> SITE_PATH. 'plugins/*/'. $pattern,\n\t\t\t);\n\t\t}\n\t\t$slen = strlen($suffix);\n\t\t$plen = strlen($prefix);\n\t\t$plen2 = strlen($prefix2);\n\t\t$names = array();\n\t\tforeach($globs as $gname => $glob) {\n\t\t\tforeach(glob($glob) as $path) {\n\t\t\t\t$name = substr(basename($path), 0, -$slen);\n\t\t\t\tif (substr($name, 0, $plen2) === $prefix2) {\n\t\t\t\t\t$name = substr($name, $plen2);\n\t\t\t\t}\n\t\t\t\tif (substr($name, 0, $plen) === $prefix) {\n\t\t\t\t\t$name = substr($name, $plen);\n\t\t\t\t}\n\t\t\t\t$names[$name] = $path;\n\t\t\t}\n\t\t}\n\t\t$this->_avail_filters = $names;\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "2672ece87ba17641907da3bb2e39d651", "score": "0.39092383", "text": "public function getStockStatusAllowableValues()\n {\n return [\n \n ];\n }", "title": "" }, { "docid": "3a8742542865dc782a018147d2b0932a", "score": "0.39054894", "text": "public function filters()\n {\n return [];\n }", "title": "" }, { "docid": "44f5ebc65b5b7c826d02aadea3b69188", "score": "0.39039528", "text": "public static function get_supported_filters() {\n\t\treturn [ 'number_comparison' ];\n\t}", "title": "" }, { "docid": "a5b7122428dbcdd21fa2423a00aef283", "score": "0.38962275", "text": "protected function loadAvailabilityOptions($availabilityOptions)\n {\n if (!empty($availabilityOptions)) {\n foreach ($availabilityOptions as $type => $argument) {\n $this->availabilityOptions->optionInfo[] = new OptionInfo($type, $argument);\n }\n }\n }", "title": "" }, { "docid": "c30adbb744e532bc01d45a4fab79afeb", "score": "0.38956708", "text": "public function get_filters() {\n\t\n\t\tif ( is_array( $this->filters ) ) {\n\t\t\t\n\t\t\t$valid_filter_pairs = array();\n\t\t\t$models = isset( $this->filters['mf'] ) ? $this->filters['mf'] : '';\n\t\t\t$valid_models = array();\n\t\t\t$valid_model_pairs = array();\n\n\t\t\treturn $this->filters;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "60d2a9959660809ed0adf4651723794d", "score": "0.38916516", "text": "public function getFilters()\n {\n //if is null is clean array\n if (is_null($this->filters))\n {\n return array();\n }\n\n return is_array($this->filters) ? array_filter($this->filters) : array($this->filters);\n }", "title": "" }, { "docid": "0f817fd12518bab08d93d736e6997ece", "score": "0.38913792", "text": "function show_availability_at_calendar($blank, $type_id, $max_days_count = 365 ) {\n\n if ($max_days_count == 365) {\n\n $max_monthes_in_calendar = get_bk_option( 'booking_max_monthes_in_calendar');\n\n if (strpos($max_monthes_in_calendar, 'm') !== false) {\n $max_days_count = str_replace('m', '', $max_monthes_in_calendar) * 31 +5;\n } else {\n $max_days_count = str_replace('y', '', $max_monthes_in_calendar) * 365+15 ;\n }\n\n }\n $start_script_code = '';\n\n $skip_booking_id = ''; // Id of booking to skip in calendar\n if (isset($_GET['booking_hash'])) {\n $my_booking_id_type = apply_bk_filter('wpdev_booking_get_hash_to_id',false, $_GET['booking_hash'] );\n if ($my_booking_id_type !== false) {\n $skip_booking_id = $my_booking_id_type[0]; \n }\n }\n\n\n // Save at the Advnaced settings these 3 parameters\n $is_show_availability_in_tooltips = get_bk_option( 'booking_is_show_availability_in_tooltips' );\n $highlight_availability_word = get_bk_option( 'booking_highlight_availability_word');\n $highlight_availability_word = apply_bk_filter('wpdev_check_for_active_language', $highlight_availability_word );\n\n $is_bookings_depends_from_selection_of_number_of_visitors = get_bk_option( 'booking_is_use_visitors_number_for_availability');\n\n global $wpdb;\n if (get_bk_option( 'booking_is_show_pending_days_as_available') == 'On')\n $sql_req = $this->get_sql_bk_dates_for_all_resources('', $type_id, '1', $skip_booking_id) ;\n else $sql_req = $this->get_sql_bk_dates_for_all_resources('', $type_id, 'all', $skip_booking_id) ;\n $dates_approve = $wpdb->get_results( $sql_req );\n\n\n $busy_dates = array(); // Busy dates and booking ID as values for each day\n $busy_dates_bk_type = array(); // Busy dates and booking TYPE ID as values for each day\n \n $check_in_dates = array(); // Number of Bookings with Check - In Date for this specific date\n $check_out_dates = array(); // Number of Bookings with Check - Out Date for this specific date\n $is_check_in_day_approved = array(); // Last Status of Check - In day 1 - approved, 0 - pending\n $is_check_out_day_approved = array(); // Last Status of Check - Out day 1 - approved, 0 - pending\n \n $temp_time_checking_arr = array();\n\n // Get DAYS Array with bookings ID inside of each day. So COUNT of day will be number of booked childs\n foreach ($dates_approve as $date_object) {\n $date_without_time = explode(' ', $date_object->booking_date);\n $date_only_time = $date_without_time[1];\n $date_without_time = $date_without_time[0];\n\n // Show the Cehck In/Out date as available for the booking resources with capcity > 1 ///////////////////////////////////////////\n if ( (get_bk_option( 'booking_range_selection_time_is_active') == 'On') && \n// (get_bk_option( 'booking_check_out_available_for_parents') == 'On') &&\n ( substr($date_only_time,-2) == '02') ) { \n \n if ( isset( $check_out_dates[ $date_without_time ] ) )\n $check_out_dates[ $date_without_time ][] = $date_object->type ; // $check_out_dates[ $date_without_time ] + 1;\n else $check_out_dates[ $date_without_time ] = array( $date_object->type ); // 1\n \n $is_check_out_day_approved[ $date_without_time ] = $date_object->approved ;\n \n continue; \n }\n if ( (get_bk_option( 'booking_range_selection_time_is_active') == 'On') && \n// (get_bk_option( 'booking_check_in_available_for_parents') == 'On') &&\n ( substr($date_only_time,-2) == '01') ) { \n \n if ( isset( $check_in_dates[ $date_without_time ] ) )\n $check_in_dates[ $date_without_time ][] = $date_object->type ; // $check_in_dates[ $date_without_time ] + 1;\n else $check_in_dates[ $date_without_time ] = array( $date_object->type ); // 1\n \n $is_check_in_day_approved[ $date_without_time ] = $date_object->approved ;\n \n continue; \n } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n if (!isset( $busy_dates[ $date_without_time ] )) {\n $temp_time_checking_arr[$date_without_time][$date_object->booking_id] = $date_only_time; // For checking single day selection\n $busy_dates[ $date_without_time ] = array($date_object->booking_id);\n\n if (! empty($date_object->date_res_type)) $busy_dates_bk_type[ $date_without_time ] = array($date_object->date_res_type);\n else $busy_dates_bk_type[ $date_without_time ] = array($date_object->type);\n\n\n } else {\n\n if ( ( isset($temp_time_checking_arr[$date_without_time][$date_object->booking_id]) ) &&\n ( $temp_time_checking_arr[$date_without_time][$date_object->booking_id] != $date_only_time )\n ){\n // Skip Here is situation, when same booking at the same day and in dif time, so skip it, we are leave only start date\n } else {\n $busy_dates[ $date_without_time ][] = $date_object->booking_id ;\n $temp_time_checking_arr[$date_without_time][$date_object->booking_id] = $date_only_time;\n\n if (! empty($date_object->date_res_type)) $busy_dates_bk_type[ $date_without_time ][] = $date_object->date_res_type ;\n else $busy_dates_bk_type[ $date_without_time ][] = $date_object->type ;\n\n }\n }\n }\n\n $max_visit_std = $this->get_max_available_items_for_resource($type_id);\n $is_availability_based_on_items_not_visitors = true;\n\n $is_use_visitors_number_for_availability = get_bk_option( 'booking_is_use_visitors_number_for_availability');\n $availability_based_on_visitors = get_bk_option( 'booking_availability_based_on');\n if ($is_use_visitors_number_for_availability == 'On')\n if ($availability_based_on_visitors == 'visitors')\n $is_availability_based_on_items_not_visitors = false;\n $max_visitors_in_bk_res = $this->get_max_visitors_for_bk_resources($type_id);\n $max_visitors_in_bk_res_summ=$this->get_summ_max_visitors_for_bk_resources($type_id);\n\n//debuge($check_in_dates, $check_out_dates, $busy_dates, $max_visitors_in_bk_res,$max_visitors_in_bk_res_summ);\n\n if ( ($is_show_availability_in_tooltips !== 'On') ) $start_script_code .= ' is_show_availability_in_tooltips = false; ';\n else $start_script_code .= ' is_show_availability_in_tooltips = true; ';\n\n $start_script_code .= \" highlight_availability_word = '\". esc_js($highlight_availability_word) . \" '; \";\n\n $start_script_code .= \" availability_per_day[{$type_id}] = []; \";\n $start_script_code .= \" wpbc_check_in_dates[{$type_id}] = []; \";\n $start_script_code .= \" wpbc_check_out_dates[{$type_id}] = []; \";\n $start_script_code .= \" wpbc_check_in_out_closed_dates[{$type_id}] = []; \";\n\n $my_day = date('m.d.Y' ); // Start days from TODAY\n $type_id_childs = $this->get_booking_types($type_id); // Get ID of the all childs elements of this parent resource.\n\n if (count($type_id_childs)<=1) \n $is_single = true;\n else \n $is_single = false;\n\n\n $cached_season_filters = array();\n foreach ($type_id_childs as $bk_type_id_child) { \n $cached_season_filters[ $bk_type_id_child->id ] = apply_bk_filter('get_available_days', $bk_type_id_child->id );\n }\n\n for ($i = 0; $i < $max_days_count; $i++) {\n\n $my_day_arr = explode('.',$my_day);\n\n $day0 = $day = ($my_day_arr[1]+0);\n $month0 = $month= ($my_day_arr[0]+0);\n $year0 = $year = ($my_day_arr[2]+0);\n\n if ($day< 10) $day0 = '0' . $day;\n if ($month< 10) $month0 = '0' . $month;\n\n $my_day_tag = $month . '-' . $day . '-' . $year ;\n $my_day_tag0 = $month . '-' . $day0 .'-' . $year0 ;\n\n // Set rechecking availability based on the season filters of the booking resources:\n $search_date = $year . '-' . $month0 . '-' . $day0 ;\n\n foreach ($type_id_childs as $bk_type_id_child) { // Loop in IDs\n if ( $bk_type_id_child->parent != 0 ) {}\n $bk_type_id_child = $bk_type_id_child->id;\n\n $is_date_available = is_this_day_available_on_season_filters( $search_date, $bk_type_id_child, $cached_season_filters[ $bk_type_id_child ] ); // Get availability\n\n if (! $is_date_available) {\n\n if (!isset( $busy_dates[ $search_date ] )) {\n $busy_dates[ $search_date ] = array('filter');\n } else {\n $busy_dates[ $search_date ][] = 'filter';\n }\n\n if (!isset( $busy_dates_bk_type[ $search_date ] )) {\n $busy_dates_bk_type[ $search_date ] = array($bk_type_id_child);\n } else {\n $busy_dates_bk_type[ $search_date ][] = $bk_type_id_child ;\n }\n\n }\n }\n\n\n if ($is_availability_based_on_items_not_visitors) { // Calculate availability based on ITEMS\n\n if (isset($busy_dates[ $year . '-' . $month0 . '-' . $day0 ])) $my_max_visit = $max_visit_std - count($busy_dates[ $year . '-' . $month0 . '-' . $day0 ]);\n else $my_max_visit = $max_visit_std;\n\n } else { // Calculate availability based on VISITORS\n\n if (isset($busy_dates_bk_type[ $year.'-'.$month0.'-'. $day0 ])) {\n\n if ($is_single) { // For single bk res\n $my_max_visit = $max_visitors_in_bk_res_summ;\n if ( isset($temp_time_checking_arr[ $year.'-'.$month0.'-'. $day0 ]) ) {\n foreach ($temp_time_checking_arr[ $year.'-'.$month0.'-'. $day0 ] as $bk_id=>$bk_time) {\n $bk_time= explode(':',$bk_time);\n if ( $bk_time[2]=='00' )\n $my_max_visit = 0;\n }\n }\n\n } else { // For Parent bk res\n $already_busy_visitors_summ = 0 ;\n foreach ($busy_dates_bk_type[ $year.'-'.$month0.'-'. $day0 ] as $busy_type_id) {\n if (isset($max_visitors_in_bk_res[ $busy_type_id ]))\n $already_busy_visitors_summ += $max_visitors_in_bk_res[ $busy_type_id ];\n }\n//if ( $my_day_tag == '1-24-2016' ) debuge($busy_dates_bk_type, $max_visitors_in_bk_res_summ , $already_busy_visitors_summ) ; \n $my_max_visit = $max_visitors_in_bk_res_summ - $already_busy_visitors_summ;\n }\n } else $my_max_visit = $max_visitors_in_bk_res_summ;\n\n }\n//if ( $my_day_tag == '1-24-2016' ) debuge($my_day_tag, $my_max_visit);\n//if ( $my_day_tag == '1-24-2016' ) debuge($check_in_dates, $check_out_dates);\n $start_script_code .= \" availability_per_day[\". $type_id .\"]['\".$my_day_tag.\"'] = '\".$my_max_visit.\"' ; \";\n \n // check for the CLOSED days (where exist check in and check out dates of the same Child resources\n $check_in_out_closed_dates = 0;\n if ( ( isset( $check_in_dates[ \"{$year}-{$month0}-{$day0}\" ] ) ) && ( isset( $check_out_dates[ \"{$year}-{$month0}-{$day0}\" ] ) ) ){\n \n $check_in_out_closed_dates = array_intersect($check_in_dates[ \"{$year}-{$month0}-{$day0}\" ], $check_out_dates[ \"{$year}-{$month0}-{$day0}\" ] ); \n//if ( $my_day_tag == '1-24-2016' ) debuge($check_in_out_closed_dates) ;\n $check_in_out_closed_dates = count( $check_in_out_closed_dates );\n $start_script_code .= \" wpbc_check_in_out_closed_dates[{$type_id}]['{$my_day_tag}'] = {$check_in_out_closed_dates}; \";\n } \n if ( isset( $check_in_dates[ \"{$year}-{$month0}-{$day0}\" ] ) ){\n $start_script_code .= \" wpbc_check_in_dates[{$type_id}]['{$my_day_tag}'] = [\" \n . \"[\" . ( count( $check_in_dates[ \"{$year}-{$month0}-{$day0}\" ] ) - $check_in_out_closed_dates ) . \"]\"\n . ',' .$is_check_in_day_approved[ \"{$year}-{$month0}-{$day0}\" ] \n . \"]; \" ;\n } \n if ( isset( $check_out_dates[ \"{$year}-{$month0}-{$day0}\" ] ) ){\n $start_script_code .= \" wpbc_check_out_dates[{$type_id}]['{$my_day_tag}'] = [\" \n . \"[\" . ( count( $check_out_dates[ \"{$year}-{$month0}-{$day0}\" ] ) - $check_in_out_closed_dates ) . \"]\"\n . ',' .$is_check_out_day_approved[ \"{$year}-{$month0}-{$day0}\" ] \n . \"]; \" ;\n }\n \n//if ( $my_day_tag == '1-24-2016' ) \n// debuge( \n// 'wpbc_check_in_dates', ( count( $check_in_dates[ \"{$year}-{$month0}-{$day0}\" ] ) - $check_in_out_closed_dates ), $is_check_in_day_approved[ \"{$year}-{$month0}-{$day0}\" ] \n// , 'wpbc_check_out_dates', ( count( $check_out_dates[ \"{$year}-{$month0}-{$day0}\" ] ) - $check_in_out_closed_dates ), $is_check_out_day_approved[ \"{$year}-{$month0}-{$day0}\" ] \n// , 'availability_per_day', $my_max_visit\n// , 'wpbc_check_in_out_closed_dates', $check_in_out_closed_dates\n// ); \n \n \n \n $my_day = date('m.d.Y' , mktime(0, 0, 0, $month, ($day+1), $year )); // Next day\n }\n\n //$max_visitors_in_bk_res = $this->get_max_visitors_for_bk_resources($type_id);\n foreach ($max_visitors_in_bk_res as $key=>$value) {\n if(! empty($key))\n $start_script_code .= \" max_visitors_4_bk_res[\". $key .\"] = \".$value.\" ; \";\n } \n//die; \n//debugq(); \n return $start_script_code;\n }", "title": "" }, { "docid": "6692b1f817c8b0efe4d9857cf630219e", "score": "0.38894913", "text": "public static function getAvailabilityModel(): string\n {\n return Availability::class;\n }", "title": "" }, { "docid": "5fd2b1e8ddfef3a3df72ad77b2fbf485", "score": "0.3885366", "text": "public function provider_accepts_encoding_at_quality()\n\t{\n\t\treturn [\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5'\n\t\t\t\t],\n\t\t\t\t'gzip',\n\t\t\t\tFALSE,\n\t\t\t\t1.0\n\t\t\t],\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5'\n\t\t\t\t],\n\t\t\t\t'gzip',\n\t\t\t\tTRUE,\n\t\t\t\t1.0\n\t\t\t],\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5'\n\t\t\t\t],\n\t\t\t\t'blowfish',\n\t\t\t\tFALSE,\n\t\t\t\t0.7\n\t\t\t],\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5'\n\t\t\t\t],\n\t\t\t\t'bzip',\n\t\t\t\tFALSE,\n\t\t\t\t0.5\n\t\t\t],\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5'\n\t\t\t\t],\n\t\t\t\t'bzip',\n\t\t\t\tTRUE,\n\t\t\t\t(float) 0\n\t\t\t]\n\t\t];\n\t}", "title": "" }, { "docid": "0e7849c96caa4c2e2ed53681aaa629cc", "score": "0.38843244", "text": "public function getFilters()\n {\n $adapter = $this->getTransferAdapter();\n $filters = $adapter->getFilters($this->getName());\n\n if ($filters === null) {\n $filters = array();\n }\n return $filters;\n }", "title": "" }, { "docid": "0cd798ba1e4d77f9e1ebaabbe911b91b", "score": "0.38835788", "text": "public function filter()\r\n {\r\n $this->data[\"filters\"] = new Filters([], $this);\r\n return $this->data[\"filters\"];\r\n }", "title": "" } ]
531d838675e97e2c75d023da0cb2f914
returns root path : /root/app/$path or /root/app/web/$path
[ { "docid": "099518b42ddac07483e4621f856dbdcc", "score": "0.6454446", "text": "public function getPath($path = '')\n {\n if ($this->publicPath)\n return str_replace('//', '/', yii::getAlias('@app') . '/web/' . $path . '/');\n if ($this->rootPath)\n return str_replace('//', '/', yii::getAlias('@app') . '/' . $path . '/');\n return str_replace('//', '/', $path . '/');\n }", "title": "" } ]
[ { "docid": "9aa64052ed6d098d16bd7ec4ef7ee168", "score": "0.80589527", "text": "function app_root(string $path)\n{\n return PATH_ROOT.'/'.$path;\n}", "title": "" }, { "docid": "5cb8097e0ca90d802580efe18d638dda", "score": "0.7664469", "text": "function root_path(string $path = '')\n {\n $root = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);\n $path = trim($path, '\\\\/');\n return \"{$root}/{$path}\";\n }", "title": "" }, { "docid": "639d35f8ba8813271e0545132226e8f1", "score": "0.7409126", "text": "function root($path = null) {\n\n // Windows' server compatibility\n $path = str_replace(array('/', '\\\\'), DIRECTORY_SEPARATOR, $path);\n return APPLICATION_ROOT.$path;\n\n }", "title": "" }, { "docid": "8eb35772691b5549557258a26434a2d0", "score": "0.7059039", "text": "static public function RootPath($path = \"\")\n {\n return realpath(__ROOTPATH . \"/\" . $path);\n }", "title": "" }, { "docid": "e7f8783bb55d6b6a24d08622273fc3a2", "score": "0.6979391", "text": "function main_path($path = '')\n {\n return dirname(app()->make('path')) . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "8bce7e94f49dc6ddfa41400f9f72bfd3", "score": "0.6956218", "text": "function path_get_root($path){\n return forward_static_call_array([\\Webmozart\\PathUtil\\Path::class, 'getRoot'], func_get_args());\n }", "title": "" }, { "docid": "a43f8a18061249ce7104d21e16311779", "score": "0.68913573", "text": "function app_path($path = null)\n {\n return rtrim(app()->basePath('app/' . $path), '/');\n }", "title": "" }, { "docid": "37a844705ee62829d0ff876aad6cc18c", "score": "0.6881895", "text": "abstract public function rootPath();", "title": "" }, { "docid": "e2db57cd52d5069876b145ee2da9ce2e", "score": "0.68769", "text": "function app_path($path = '')\n {\n return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "27909a71c04ce74eca4a76b4264ef1d5", "score": "0.68767047", "text": "function path($url) {\n $host = (string) @\\parse_url($url, PHP_URL_HOST);\n $path = (string) @\\parse_url($url, PHP_URL_PATH);\n if (\\strcasecmp($host, APP_ROOT_HOST) !== 0)\n return $path;\n static $app_root_path_prefix = null;\n if ($app_root_path_prefix === null)\n $app_root_path_prefix = \\substr(APP_ROOT_PATH, -1) === '/'? \\substr(APP_ROOT_PATH, 0, -1): APP_ROOT_PATH;\n if (\\strlen($path) < $app_root_path_prefix)\n return $path;\n if (\\strlen($app_root_path_prefix) == 0 || !\\melt\\string\\starts_with($path, $app_root_path_prefix))\n return $path;\n $start = (string) \\substr($path, \\strlen($app_root_path_prefix), 1);\n if ($start !== \"/\" && $start !== \"\")\n return $path;\n return (string) \\substr($path, \\strlen($app_root_path_prefix));\n}", "title": "" }, { "docid": "2e8ce045b81ef23e2e83c9b743112d41", "score": "0.6817539", "text": "function public_root(string $path)\n{\n $paths = config('paths');\n return dirname(PATH_ROOT).'/'.$paths['public'].'/'.$path;\n}", "title": "" }, { "docid": "e83102064fad44883c240859ced662d8", "score": "0.68039256", "text": "function getRootPath()\r\n {\r\n return ROOT_PATH;\r\n }", "title": "" }, { "docid": "ebfbd5c2e921e7f920689c7d77a6fb40", "score": "0.67980963", "text": "function app_path($path = '')\n {\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "27b74cf51c1d379b467d0b492df613cb", "score": "0.6727052", "text": "public function rootDir(string $path = ''): string;", "title": "" }, { "docid": "e6acef43812a22cdeb48fa70bc4acab9", "score": "0.6718333", "text": "public static function root() {\n\t\t$root = '';\n\t\t$split = preg_split(\n\t\t\t'/\\//', $_SERVER['SCRIPT_NAME']\n\t\t\t);\n\t\treturn (count($split) > 1) ? $split[1] . '/' : '';\n\t}", "title": "" }, { "docid": "51a3a96b32077bd0c992b7714517e093", "score": "0.6717037", "text": "function app_path($path = '')\n {\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "bcb584cf7058cd9553bd7a96dc8cb27f", "score": "0.67043376", "text": "public function applicationWebPath($path, $app = null)\n {\n if (!isset($app)) {\n $app = $this->getApp();\n }\n\n return str_replace('%application%', $this->applications[$app]['webroot'], $path);\n }", "title": "" }, { "docid": "d652e228b75fabd74c2a2d3ef1a38418", "score": "0.66801107", "text": "public function getAppPath()\n {\n return $this->rootPath.'/app/';\n }", "title": "" }, { "docid": "efa0f295a003c98c55f24ca8486f2cee", "score": "0.66725594", "text": "function path(string $path = ''): string\n {\n return \\Wolff\\Core\\Helper::getRoot($path);\n }", "title": "" }, { "docid": "3bf73bb2d78d2e21543af409913b77b1", "score": "0.6671499", "text": "function dorcas_sdk_root_path(string $path = null): string\n{\n $level = is_installed_via_composer() ? 4 : 1;\n # the level in the tree to reach the application root path\n $appDir = dirname(__DIR__, $level);\n return implode(DIRECTORY_SEPARATOR, [$appDir, (string) $path]);\n}", "title": "" }, { "docid": "2dc58a46e20ef7e35a18137763ef9d45", "score": "0.66563535", "text": "public function getRootPath(): string;", "title": "" }, { "docid": "6d3b973c4c5d85ee76a9742ada8aa93d", "score": "0.6644703", "text": "static private function rootDir():string {\n $root_dir = $_SERVER['REQUEST_URI'];\n $root_dir = explode('/',$root_dir);\n return $root_dir[1];\n }", "title": "" }, { "docid": "939f0c41164c2f035c9bd261dd5e4e38", "score": "0.66301256", "text": "function app_path($path = '')\n {\n return app()->path($path);\n }", "title": "" }, { "docid": "16020b7f7016049599de7d26b071c66e", "score": "0.6626052", "text": "public static function path() {\n\t\treturn $_SERVER['DOCUMENT_ROOT'] . '/' . self::root();\n\t}", "title": "" }, { "docid": "ea8a82d5971da48caf706994498ab32f", "score": "0.66074663", "text": "function serverPath(string $routeTo = ''){\r\n $baseDir = dirname(__DIR__) . \"/application\";\r\n return str_replace(\"\\\\\",\"/\", \"{$baseDir}{$routeTo}\");\r\n}", "title": "" }, { "docid": "a19c531a5d502b1e6cb6a293af516249", "score": "0.66038394", "text": "function elgg_get_root_path() {\n\treturn _elgg_services()->config->get('path');\n}", "title": "" }, { "docid": "7bde9495bf9387c61904ff9da1f3a018", "score": "0.66022015", "text": "function base_path($path = '')\n {\n return app()->basePath().($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "6831d2ec0fd3af497a7462c2a6b837bc", "score": "0.65837264", "text": "public static function getRootPath() : string\n {\n if (self::$rootPath === null) {\n // assuming we're running from the 'app' subdirectory\n self::$rootPath = realpath(__DIR__.'/..');\n }\n\n return self::$rootPath;\n }", "title": "" }, { "docid": "66e18b7bf7de519a976e1bd279ef085c", "score": "0.6560534", "text": "public function getAppRootPath(): string\n {\n return $this->pathAppRoot;\n }", "title": "" }, { "docid": "52d4b1bcb62f6220101bdc60075ab7de", "score": "0.65469515", "text": "protected function getRootWebPath()\n {\n return realpath(__DIR__ . '/../../../web');\n }", "title": "" }, { "docid": "7c8a0c58799a980c478d6873e726e5aa", "score": "0.6539782", "text": "public static function rootPath(string $path = \"\"): string\n {\n // IF an override path has been provided...\n if($path !== \"\")\n {\n self::$_rootPath = realpath($path);\n self::$_usingZip = file_exists(self::$_rootPath.\"/zip\");\n }\n // OTHERWISE, no override path has been provided...\n else\n {\n // Get the previously saved/detected path, if any...\n if(self::$_rootPath === \"\")\n self::autoPath();\n }\n\n // Finally, return the root path!\n return self::$_rootPath;\n }", "title": "" }, { "docid": "4b69c1a7acb4b5bddc398bdae0092d37", "score": "0.6538798", "text": "public function GetAppRoot ();", "title": "" }, { "docid": "4b69c1a7acb4b5bddc398bdae0092d37", "score": "0.6538798", "text": "public function GetAppRoot ();", "title": "" }, { "docid": "243cfda9017d6fb9c23888ebe9d16089", "score": "0.6528093", "text": "public static function base_path()\n {\n $pattern = str_replace(\n array('\\\\', '/public/' . $GLOBALS['CREOVEL']['DISPATCHER'], '/'),\n array('/', '', '\\/'),\n $_SERVER['SCRIPT_NAME']\n );\n if (empty($GLOBALS['CREOVEL']['ROUTING']['path'])) $GLOBALS['CREOVEL']['ROUTING']['path'] = '/';\n return preg_replace('/^'.$pattern.'/', '', str_replace('/public/'. $GLOBALS['CREOVEL']['DISPATCHER'], '', $GLOBALS['CREOVEL']['ROUTING']['path']));\n }", "title": "" }, { "docid": "445dbc1f92ba65d3bce38268514a1bea", "score": "0.6523368", "text": "public function getRootPath()\n {\n return $this->get(self::HW2PATH_ROOT);\n }", "title": "" }, { "docid": "5100125d8e2f75a0f5500d273cb7d43e", "score": "0.64896077", "text": "public function GetAppRoot () {\n\t\tif ($this->appRoot === NULL) {\n\t\t\t// `ucfirst()` - cause IIS has lower case drive name here - different from __DIR__ value\n\t\t\t$indexFilePath = ucfirst(str_replace(['\\\\', '//'], '/', $this->globalServer['SCRIPT_FILENAME']));\n\t\t\t$this->appRoot = strpos(__FILE__, 'phar://') === 0\n\t\t\t\t? 'phar://' . $indexFilePath\n\t\t\t\t: dirname($indexFilePath);\n\t\t}\n\t\treturn $this->appRoot;\n\t}", "title": "" }, { "docid": "cbbcf9278a0300fe480261ebf08d0c06", "score": "0.64872354", "text": "function app_path($file = null)\n\t{\n\t\treturn _get_file_base_path('app', $file);\n\t}", "title": "" }, { "docid": "1cf1c931909aee05ec891a5de878b768", "score": "0.646233", "text": "public function getRoot(string $path): string\n {\n return Path::getRoot($path);\n }", "title": "" }, { "docid": "d1a21542d926891efd65f5a35dc5e07d", "score": "0.645911", "text": "public static function getAppPath($path = null)\n {\n $index_rel_path = getenv(self::HTACCESS_VAR__INDEX_REL_PATH);\n\n if ($index_rel_path === false) {\n $abs_path = FileHandler::getAbsolutePath(__DIR__ . '/../../../../');\n } else {\n $abs_path = StringHandler::replace($_SERVER['SCRIPT_FILENAME'], '/' . $index_rel_path, '');\n }\n\n $pathArray = FileHandler::extendPathArray([$abs_path], $path);\n\n return FileHandler::pathFromArray($pathArray);\n }", "title": "" }, { "docid": "a93176824e04c477bed29b1de12becfa", "score": "0.6451839", "text": "function getRoot()\n{\n $folder = \"/project/\";\n return \"http://\".$_SERVER['HTTP_HOST'].$folder;\n}", "title": "" }, { "docid": "615a6ab7c9c2c25e293e64086470b555", "score": "0.64507574", "text": "public static function serve_root() {\n\t\treturn 'http://' . $_SERVER['SERVER_NAME'] . '/' . self::root();\n\t}", "title": "" }, { "docid": "22274d66641965c13f2211df9eea7991", "score": "0.63998175", "text": "private function base_path(){\n $folder = explode(DS, ROOT_DIR);\n $uri = $folder[count($folder)-2];\n return $uri;\n }", "title": "" }, { "docid": "ff7366b56f3b1ec42a2d492e725737e3", "score": "0.63895607", "text": "function base_path($path = '')\n {\n return evolutionCMS()->basePath().($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "abc01d33a33b557205855ab3c564d907", "score": "0.6381385", "text": "function root() {\n $host = $_SERVER['HTTP_HOST'];\n $root = \"http://\" . $_SERVER[\"SERVER_NAME\"];\n $uri = $_SERVER[\"REQUEST_URI\"];\n if (preg_match(\"%upload.php$%\", $uri)) {\n $uri = preg_replace(\"%lib/upload.php$%\", \"\", $uri);\n } elseif ($uri[strlen($uri) - 1] == \"/\") {\n $root .= $uri;\n } else {\n $root .= preg_replace(\"/\\/[^\\/]+$/\", \"/\", $uri);\n }\n return $root;\n}", "title": "" }, { "docid": "09bd7d9056602122e3cfb45407a09f54", "score": "0.6349798", "text": "function au_get_path_from_root($url) {\n\tglobal $aulis;\n\treturn $aulis['root_path'].'/'.$url;\n}", "title": "" }, { "docid": "90065b538b3fe9edc363b0bd488b7d16", "score": "0.63358605", "text": "static public function app($path) {\n return __DIR__.'/../'.$path;\n }", "title": "" }, { "docid": "dae5f828563cf6b055c04375d12ac5c8", "score": "0.6334889", "text": "function base_path($path = '')\n {\n return app()->basePath($path);\n }", "title": "" }, { "docid": "d8371be525410419a6acde9af044b9ec", "score": "0.63313663", "text": "function fullpath($path)\n\t{\n\t\treturn (substr($path, 0, strlen($this->root)) != $this->root) ? $this->root.(substr($path,0,1)=='/' ? '/':'').$path : $path;\n\t}", "title": "" }, { "docid": "ffc45cdd064611d27b45d71820b7b954", "score": "0.6302746", "text": "public function appPath()\n { \n return $this->basePath . 'app';\n }", "title": "" }, { "docid": "c91a5d9b7a1a27165c4a84c2fb38b77d", "score": "0.6267003", "text": "function public_path($path = '')\n {\n return app()->basePath() . '/public' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "c91a5d9b7a1a27165c4a84c2fb38b77d", "score": "0.6267003", "text": "function public_path($path = '')\n {\n return app()->basePath() . '/public' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "1ad360d0bdd6ede47ceff0974b651444", "score": "0.6256552", "text": "private function rootView() {\n return Util::getCWD() . $this->getView('path') . '/';\n }", "title": "" }, { "docid": "e9ca7f9f01c242e37ea7cd5f1cc06acc", "score": "0.6234304", "text": "protected function getLocalRootPath()\n {\n return storage_path().'/app';\n }", "title": "" }, { "docid": "56e188e22ebd68ab6cee76d48d22c123", "score": "0.623244", "text": "private static function appByUrlPath(string $path): string\n\t{\n\t\t$dir = pathinfo($path, PATHINFO_DIRNAME);\n\t\t$splitDir = static::getPathAsArray($dir);\n\n\t\t// Probe is just first level of the path\n\t\t$probe = array_shift($splitDir) ?? '';\n\n\t\t// Search app as compare probe with app web root path\n\t\tforeach (static::getCached('web') as $app => $value) {\n\t\t\tif ($probe === $value) {\n\t\t\t\treturn $app;\n\t\t\t}\n\t\t}\n\n\t\t// No app was found.\n\t\t// So believe that correct app is app with no home url (frontend in most cases)\n\t\tforeach (static::getCached('web') as $app => $value) {\n\t\t\tif (!$value) {\n\t\t\t\treturn $app;\n\t\t\t}\n\t\t}\n\n\t\t// Still not found\n\t\tthrow new InvalidConfigException('Invalid application paths configuration for path: ' . $path);\n\t}", "title": "" }, { "docid": "5d85215135eceb64f4a66667c21aef6a", "score": "0.62311864", "text": "protected function webServerRoot ()\n {\n return $this->request->getBasePath();\n }", "title": "" }, { "docid": "4c4600d00a850d0d2136a13e0a86ab72", "score": "0.6202279", "text": "public function getRootDir();", "title": "" }, { "docid": "4c4600d00a850d0d2136a13e0a86ab72", "score": "0.6202279", "text": "public function getRootDir();", "title": "" }, { "docid": "6a2af54250f48e1b44086256d6cdc4ca", "score": "0.6188755", "text": "private function path($path = null)\n {\n return __DIR__ . \"/../{$path}\";\n }", "title": "" }, { "docid": "2d5cc783a52cc716f9b0f99f13083913", "score": "0.618054", "text": "function app_path(string $name, string $after = '')\n{\n $paths = config('paths');\n if (array_key_exists($name, $paths))\n return PATH_ROOT.'/'.$paths[$name].'/'.$after;\n else\n return $name.'/'.$after;\n}", "title": "" }, { "docid": "c84c3318088fad7aa5bac395415c3489", "score": "0.61803496", "text": "public function baseUrl() {\n\t\t$dir = $webroot = null;\n\t\t$config = Configure::read('App');\n\t\textract($config);\n\n\t\tif (!$base) {\n\t\t\t$base = $this->base;\n\t\t}\n\n\t\tif ($base !== false) {\n\t\t\t$this->webroot = $base . '/';\n\t\t\treturn $this->base = $base;\n\t\t}\n\t\tif (!$baseUrl) {\n\t\t\t$replace = array('<', '>', '*', '\\'', '\"');\n\t\t\t$base = str_replace($replace, '', dirname(env('PHP_SELF')));\n\n\t\t\tif ($webroot === 'webroot' && $webroot === basename($base)) {\n\t\t\t\t$base = dirname($base);\n\t\t\t}\n\t\t\tif ($dir === 'app' && $dir === basename($base)) {\n\t\t\t\t$base = dirname($base);\n\t\t\t}\n\n\t\t\tif ($base === DS || $base === '.') {\n\t\t\t\t$base = '';\n\t\t\t}\n\n\t\t\t$this->webroot = $base .'/';\n\t\t\treturn $base;\n\t\t}\n\n\t\t$file = '/' . basename($baseUrl);\n\t\t$base = dirname($baseUrl);\n\n\t\tif ($base === DS || $base === '.') {\n\t\t\t$base = '';\n\t\t}\n\t\t$this->webroot = $base .'/';\n\n\t\tif (!empty($base)) {\n\t\t\tif (strpos($this->webroot, $dir) === false) {\n\t\t\t\t$this->webroot .= $dir . '/' ;\n\t\t\t}\n\t\t\tif (strpos($this->webroot, $webroot) === false) {\n\t\t\t\t$this->webroot .= $webroot . '/';\n\t\t\t}\n\t\t}\n\t\treturn $base . $file;\n\t}", "title": "" }, { "docid": "9eb5a8a0609fdc14a83cee6320b15f4c", "score": "0.6178767", "text": "function public_path($path = '')\n {\n return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);\n }", "title": "" }, { "docid": "cd3eac531b40f0edb78ca38b379d971c", "score": "0.61683565", "text": "function getPaths()\n { \n\n $script_name = $_SERVER[\"SCRIPT_FILENAME\"];\n $pieces = explode( DIRECTORY_SEPARATOR, $script_name);\n array_pop($pieces);\n $relativeRootPath = implode( DIRECTORY_SEPARATOR, $pieces);\n //$script_name = $_SERVR[\"SCRIPT_FILENAME\"];\n //$documentRoot = $_SERVER[\"DOCUMENT_ROOT\"]; \n //$uri = explode( DIRECTORY_SEPARATOR , $_SERVER[\"REQUEST_URI\"] );\n //$relativeRootPath = $documentRoot . DIRECTORY_SEPARATOR . $uri[1] . DIRECTORY_SEPARATOR . 's5w';\n return $relativeRootPath;\n }", "title": "" }, { "docid": "c3f0427375217f9d3a6a38b981c5744b", "score": "0.6166857", "text": "public function applicationDir(string $path = ''): string;", "title": "" }, { "docid": "6bbdf91094ad4b3608f461f51c7e3fb3", "score": "0.6165353", "text": "function path($str) {\n if ($str === 'index') $str = '';\n return WEB_ROOT . \"/$str\";\n}", "title": "" }, { "docid": "3770f1cb0158235c2aebdf30cc3c2a41", "score": "0.6165126", "text": "protected function get_path() {\r\n\t\t$path = $this->path; \r\n\t\tif (empty($path) || $path == '/') {\r\n\t\t\t$path = '.';\r\n\t\t}\r\n\t\treturn $path; \t\t\r\n \t}", "title": "" }, { "docid": "4c0ba9ade827ec0bed918f2c5f7cca75", "score": "0.61599183", "text": "public function getAppRoot(): string {\n return $this->appRoot;\n }", "title": "" }, { "docid": "aa89335e81873e86179a684e29b95e4b", "score": "0.6159692", "text": "function http_root() {\n\t$doc_root = explode('/', $_SERVER['DOCUMENT_ROOT']);\n\t$blam_root = explode('/', DOC_ROOT);\n\t$path = array_diff($blam_root,$doc_root);\n\t\n\t$addy = \"http://\" . $_SERVER['HTTP_HOST'] . \"/\";\n\t\n\tforeach($path AS $p) {\n\t\t$addy .= \"$p/\";\n\t}\n\treturn $addy;\n}", "title": "" }, { "docid": "5da12cebec1037c4bd9f5a3819218d1b", "score": "0.6159446", "text": "public function _getRootPath()\n {\n return MAGE_ROOT;\n }", "title": "" }, { "docid": "96a6cc536925625b850c7cd972c6ccaf", "score": "0.6153718", "text": "function dorcas_sdk_app_path(string $path = null): string\n{\n $appDir = dirname(__DIR__, 1);\n return implode(DIRECTORY_SEPARATOR, [$appDir, (string) $path]);\n}", "title": "" }, { "docid": "f79505aaec0625b70af4848acb764f80", "score": "0.6146278", "text": "public static function getDocumentRoot(): string\n {\n return str_replace(['\\\\App', '/App'], '', __DIR__);\n }", "title": "" }, { "docid": "f0eb5e339f001e14341d1831aa5660d7", "score": "0.61433023", "text": "public function path()\n {\n return $this->basePath.'/app';\n }", "title": "" }, { "docid": "43002c8f4680eca0f63c7af701d00e66", "score": "0.6137185", "text": "function public_path($path = '')\n {\n return base_path('public'.$path);\n }", "title": "" }, { "docid": "4314b23b3997718970e3cc0d1310fc49", "score": "0.61359954", "text": "function getRootUrl()\n\t{\n\t\t$path = $this->getUrl();\n\n\t\t$p = strpos($path,'//');\t// Offset past the protocol scheme spec\n\t\tif ($p === FALSE)\t\t\t// No protocol scheme.\n\t\t{\t\t\t\t\t\t\t// Don't know what to do here... bad input.\n\t\t}\n\t\telse \t\t\t\t\t\t\t\t// Set $path to the part past the domain:port part\n\t\t{\t\t\t\t\t\t\t\t\t// suffixed with a '/'\n\t\t\t$p = strpos($path,'/',$p+2);\t// First path separator past the scheme\n\t\t\tif ($p === FALSE)\t\t\t\t// No '/': this app is at the root.\n\t\t\t\t$path .= '/';\t\t\t\t// Ensure it ends with a '/'\n\t\t\telse\n\t\t\t\t$path = substr($path,0,$p+1);\t// Ignore path after the domain portion.\n\t\t}\n\n\t\treturn $path . substr(ccApp::getApp()->getUrlOffset(),1);\n\t}", "title": "" }, { "docid": "3a8ff5e72f206579607cf4c1bf76f50f", "score": "0.6130212", "text": "function SkyGetRoot() {\n\treturn dirname(dirname(dirname(dirname(__DIR__)))) . \"/\";\n}", "title": "" }, { "docid": "628bf3d5f531ccf934a7c926e30733c9", "score": "0.6128806", "text": "function getRootPath($filename){\n switch ($filename){\n case \"index.php\": return \"\";\n case \"page.php\": return \"../\";\n case \"types.php\": return \"../\";\n case \"regions.php\": return \"../\";\n case \"gallery.php\": return \"../\";\n case \"forum_index.php\": return \"../../\";\n default: return \"../../../\";\n }\n}", "title": "" }, { "docid": "2fa6d2dd7a11fd634fc432c6e5d4720b", "score": "0.6120786", "text": "function themes_path($path = '')\n {\n return app('themes.path').($path ? '/'.$path : $path);\n }", "title": "" }, { "docid": "536ce348a5c9c64ca1807664271a2005", "score": "0.61090034", "text": "abstract public function getRootDir();", "title": "" }, { "docid": "682669c810d533582f61207297302497", "score": "0.61061823", "text": "function getRootUrl()\n {\n return ROOT_SURL;\n }", "title": "" }, { "docid": "209d96951d3cf6c72f039c4b871fbcea", "score": "0.61032784", "text": "public static function fromRootStat(string $path)\n\t:string\n\t{\n\t\treturn Site::getPathFromRoot($path);\n\t}", "title": "" }, { "docid": "73e70be688121b3804e19d3c72cc2592", "score": "0.60924315", "text": "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "73e70be688121b3804e19d3c72cc2592", "score": "0.60924315", "text": "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "73e70be688121b3804e19d3c72cc2592", "score": "0.60924315", "text": "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "73e70be688121b3804e19d3c72cc2592", "score": "0.60924315", "text": "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "73e70be688121b3804e19d3c72cc2592", "score": "0.60924315", "text": "function config_path($path = '')\n {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "b83be657747f060ec77957d51b1c014d", "score": "0.60918176", "text": "private function basePath ($path = '')\n {\n return realpath(app()->basePath() . '/' . $path);\n }", "title": "" }, { "docid": "f70319540de896f05d5caa67ecc7f53c", "score": "0.60882807", "text": "function public_path($path = null)\n {\n return rtrim(app()->basePath('public/' . $path), '/');\n }", "title": "" }, { "docid": "2b00af0529fd4fb62e9bd8f7e24bb554", "score": "0.6077729", "text": "protected static function web_root() {\n $page_url = 'http';\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {\n $page_url .= 's';\n }\n $page_url .= '://' . $_SERVER['SERVER_NAME'];\n if ($_SERVER['SERVER_PORT'] !== '80') {\n $page_url .= ':' . $_SERVER['SERVER_PORT'];\n }\n return $page_url;\n }", "title": "" }, { "docid": "252cdc6f40255e285f80dcd610364530", "score": "0.6075426", "text": "function config_path ($path = '') {\n return app()->basePath() . '/config' . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "2d9e3bcb51204ed7f696f9ac5baaee6e", "score": "0.60743874", "text": "function getServerRoot()\r\n{\r\n return 'http://' . SERVER_ROOT;\r\n}", "title": "" }, { "docid": "1a06e63a935b327e6d00fb66a8949244", "score": "0.6073394", "text": "protected function _getRootPath()\n {\n return realpath(SITES_PATH);\n }", "title": "" }, { "docid": "80735a37c29cf5b203fc33547582983d", "score": "0.6072149", "text": "static function path_relative_to_root(&$path)\n {\n if (strpos($path, ASCMS_DOCUMENT_ROOT) === 0) {\n $path = substr($path, strlen(ASCMS_DOCUMENT_ROOT) + 1);\n } elseif (ASCMS_PATH_OFFSET && strpos($path, ASCMS_PATH_OFFSET) === 0) {\n $path = substr($path, strlen(ASCMS_PATH_OFFSET) + 1);\n } elseif (strpos($path, '/') === 0) {\n $path = substr($path, 1);\n }\n }", "title": "" }, { "docid": "fa98f430fa688315f018af2f8413f89a", "score": "0.60674363", "text": "protected function _base()\n {\n $dir = $webroot = null;\n $config = Configure::read('App');\n extract($config);\n\n if (!isset($base)) {\n $base = $this->base;\n }\n if ($base !== false) {\n $this->webroot = $base . '/';\n return $this->base = $base;\n }\n\n if (empty($baseUrl)) {\n $base = dirname(env('PHP_SELF'));\n // Clean up additional / which cause following code to fail..\n $base = preg_replace('#/+#', '/', $base);\n\n $indexPos = strpos($base, '/webroot/index.php');\n if ($indexPos !== false) {\n $base = substr($base, 0, $indexPos) . '/webroot';\n }\n if ($webroot === 'webroot' && $webroot === basename($base)) {\n $base = dirname($base);\n }\n if ($dir === 'app' && $dir === basename($base)) {\n $base = dirname($base);\n }\n\n if ($base === DS || $base === '.') {\n $base = '';\n }\n $base = implode('/', array_map('rawurlencode', explode('/', $base)));\n $this->webroot = $base . '/';\n\n return $this->base = $base;\n }\n\n $file = '/' . basename($baseUrl);\n $base = dirname($baseUrl);\n\n if ($base === DS || $base === '.') {\n $base = '';\n }\n $this->webroot = $base . '/';\n\n $docRoot = env('DOCUMENT_ROOT');\n $docRootContainsWebroot = strpos($docRoot, $dir . DS . $webroot);\n\n // CUSTOMIZE MODIFY 2013/11/25 ryuring\n // >>>\n //if (!empty($base) || !$docRootContainsWebroot) {\n // ---\n if ((!empty($base) || !$docRootContainsWebroot)) {\n // <<<\n if (strpos($this->webroot, '/' . $dir . '/') === false) {\n $this->webroot .= $dir . '/';\n }\n if (strpos($this->webroot, '/' . $webroot . '/') === false) {\n $this->webroot .= $webroot . '/';\n }\n }\n return $this->base = $base . $file;\n }", "title": "" }, { "docid": "494ebe37b750deeb318573a266198743", "score": "0.60670817", "text": "public static function rootDirectory() {\n return __WEBROOT__;\n }", "title": "" }, { "docid": "4a3742773324fcd47a34988bc72e15f5", "score": "0.60627073", "text": "function _find_path( ) {\n\t\tif($this->config('web_path')) {\n\t\t\treturn $this->config('web_path');\n\t\t}\n\t\n\t\t//$path = dirname($this->me);\n\t\t// we can't use the above incase this is included (so PHP_SELF wouldn't be correct)\n\t\t$path = str_replace(\n\t\t\t\t\t_extras::catfile(getenv('DOCUMENT_ROOT')), '', _extras::catfile(dirname(__FILE__)));\n\t\t\n\t\treturn str_replace('\\\\', '/', $path);\n\t}", "title": "" }, { "docid": "00f95f30b0f70979bc204117d48cdff0", "score": "0.6043103", "text": "public static function getApplicationDir(): string {\n\t\treturn \\dirname(\\ROOT);\n\t}", "title": "" }, { "docid": "38bbb0a65ac3b38361a54dfb86100db1", "score": "0.60407436", "text": "function lit_base_path(string $path = '')\n {\n return lit()->basePath($path);\n }", "title": "" }, { "docid": "c8082637ad50b9816b0586523766acdc", "score": "0.60311353", "text": "function public_path($path = '') {\n return __DIR__ .($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);\n}", "title": "" }, { "docid": "e690885fbabde836706e0893dad56402", "score": "0.60092825", "text": "public function getPathToWebRoot(): string {\n return $this->pathToWebRoot;\n }", "title": "" }, { "docid": "193f054d84b6929df1fc642d96e819a5", "score": "0.60047525", "text": "public static function getRootPath()\n {\n return self::$sRootPath;\n }", "title": "" }, { "docid": "0857ea7cb12d0bd3828f25be9587c002", "score": "0.6004068", "text": "private function removeRootPath( $root, $path ) {\n $filePath = str_replace( '\\\\', '/', $path );\n\n if (\n strpos($filePath, $root) === 0 &&\n strlen($root) < strlen($filePath)\n ) {\n return substr($filePath, strlen($root)+1 );\n } else {\n return $filePath;\n }\n }", "title": "" } ]
dfd4e4c56343d85a833e257af8222946
Set the at etab1.
[ { "docid": "9a73d733b6c9e0f1af53da2e65a1a18d", "score": "0.715697", "text": "public function setAtEtab1(?string $atEtab1): Etablissements {\n $this->atEtab1 = $atEtab1;\n return $this;\n }", "title": "" } ]
[ { "docid": "56c48da97ca7dd4c481af49b1c13c80d", "score": "0.6230982", "text": "public function setAtEtab2(?string $atEtab2): Etablissements {\n $this->atEtab2 = $atEtab2;\n return $this;\n }", "title": "" }, { "docid": "5492fa374fc53d063a82ba27a507b236", "score": "0.59090185", "text": "public function setAtTaux1(?float $atTaux1): Etablissements {\n $this->atTaux1 = $atTaux1;\n return $this;\n }", "title": "" }, { "docid": "2bf56a3971b5cc24e86560875e1d5c7d", "score": "0.5882648", "text": "protected function setEtatObject() {\n\t\tif ($this->etat > 0) {\n\t\t\t$this->oEtat = FactoryEtat::getFromTableEtat($this->etat);\n\t\t}\n\t}", "title": "" }, { "docid": "f60822224718275bf442c07da485b208", "score": "0.5735495", "text": "public function setAtEtab5(?string $atEtab5): Etablissements {\n $this->atEtab5 = $atEtab5;\n return $this;\n }", "title": "" }, { "docid": "2d852eb56620986978363b4af8e7ca27", "score": "0.56445974", "text": "public function setAtBureau1(?string $atBureau1): Etablissements {\n $this->atBureau1 = $atBureau1;\n return $this;\n }", "title": "" }, { "docid": "a0b8fe632dc0ae60a0282e3b5741ecaf", "score": "0.56018883", "text": "public function setAtEtab3(?string $atEtab3): Etablissements {\n $this->atEtab3 = $atEtab3;\n return $this;\n }", "title": "" }, { "docid": "864925c7e3ac72805a2bd04fa9de8640", "score": "0.55667543", "text": "public function setCompteTiers1(?string $compteTiers1): Etablissements {\n $this->compteTiers1 = $compteTiers1;\n return $this;\n }", "title": "" }, { "docid": "c88e4ae3d3453618a29e099b305ded3b", "score": "0.55064327", "text": "public function setAtRisque1(?string $atRisque1): Etablissements {\n $this->atRisque1 = $atRisque1;\n return $this;\n }", "title": "" }, { "docid": "469543bc5662300ed74dd9e288416045", "score": "0.5502933", "text": "public function testSetEtat1() {\n\n $obj = new Fournisseurs();\n\n $obj->setEtat1(\"etat1\");\n $this->assertEquals(\"etat1\", $obj->getEtat1());\n }", "title": "" }, { "docid": "7b2aa93ba5ff8eec4ee461b1c6a065d9", "score": "0.54221565", "text": "public function setAtTauxBul1(?float $atTauxBul1): Etablissements {\n $this->atTauxBul1 = $atTauxBul1;\n return $this;\n }", "title": "" }, { "docid": "876308c8641553626048fb9ee912af30", "score": "0.538864", "text": "public function setTypeBaseCaisse1(?string $typeBaseCaisse1): Etablissements {\n $this->typeBaseCaisse1 = $typeBaseCaisse1;\n return $this;\n }", "title": "" }, { "docid": "9e761702c513860636d88cc839ad27a8", "score": "0.5361049", "text": "public function setPlafond1Caisse1(?float $plafond1Caisse1): Etablissements {\n $this->plafond1Caisse1 = $plafond1Caisse1;\n return $this;\n }", "title": "" }, { "docid": "33422703baabaabd8235ef7ac2a03d52", "score": "0.52551764", "text": "public function setAtEtab4(?string $atEtab4): Etablissements {\n $this->atEtab4 = $atEtab4;\n return $this;\n }", "title": "" }, { "docid": "b7659d7dce3f15c947fec49fb8c3ec32", "score": "0.5166965", "text": "function setMeetAddress1($txt)\n {\n $this->_meet_address_1 = $txt ;\n }", "title": "" }, { "docid": "3dddb2eb6ded860d38f8a19be9010311", "score": "0.5158376", "text": "function setTeamAddress1($txt)\n {\n $this->_team_address_1 = $txt ;\n }", "title": "" }, { "docid": "3051d3eef40f17a213ccbdb3c7599033", "score": "0.51520175", "text": "public function setTabDef() {\n\t\tif( $this->_ocversion == '1.4' ) {\n\t\t\t$this->data['tab'] = 'tab';\n\t\t}else{\n\t\t\t$this->data['tab'] = 'href';\n\t\t}\n\t}", "title": "" }, { "docid": "884498fa4c8464ca68645c1ef2cdc1d1", "score": "0.5144617", "text": "protected function configureTier1()\n {\n $this->getVisualization()->setData(80);\n }", "title": "" }, { "docid": "15ec57751c4ff43bd0c6ebf1d1b52485", "score": "0.51299906", "text": "public function testSetTvaEtabComplement() {\n\n $obj = new Fiscal();\n\n $obj->setTvaEtabComplement(\"tvaEtabComplement\");\n $this->assertEquals(\"tvaEtabComplement\", $obj->getTvaEtabComplement());\n }", "title": "" }, { "docid": "631696734f119f43fd9c3cfeb3e40470", "score": "0.5128693", "text": "public function setAtTaux2(?float $atTaux2): Etablissements {\n $this->atTaux2 = $atTaux2;\n return $this;\n }", "title": "" }, { "docid": "6739b00cb700f2762eaaa0069ebf2a3a", "score": "0.5124116", "text": "public function setLine1($line1);", "title": "" }, { "docid": "8ea8d334eb316e31f86bf7959b6cfc47", "score": "0.5118801", "text": "public function setLine1($line1) {\n $this->line1 = $line1;\n }", "title": "" }, { "docid": "725bf19e4f4314e941ca2bc96ea4e211", "score": "0.5111336", "text": "public function setCompteCharge1(?string $compteCharge1): Etablissements {\n $this->compteCharge1 = $compteCharge1;\n return $this;\n }", "title": "" }, { "docid": "9cbcda885387a61587472b364273d3e7", "score": "0.5104399", "text": "public function setNbMoisAubry1(?float $nbMoisAubry1): Etablissements {\n $this->nbMoisAubry1 = $nbMoisAubry1;\n return $this;\n }", "title": "" }, { "docid": "792d1b0c677cf8d989b8aae2dba1d905", "score": "0.5103214", "text": "public function setValor1($v1){\n\t\t\t$this->valor1=$v1;\n\t\t}", "title": "" }, { "docid": "4066f1f71be7344efa8f895a7e8f775d", "score": "0.5096794", "text": "public function setPlafond2Caisse1(?float $plafond2Caisse1): Etablissements {\n $this->plafond2Caisse1 = $plafond2Caisse1;\n return $this;\n }", "title": "" }, { "docid": "e982b9877451644e447be1f1d65237a2", "score": "0.50924677", "text": "public function getAtEtab1(): ?string {\n return $this->atEtab1;\n }", "title": "" }, { "docid": "f23fe7db1dfa01a649bfce6b4f196ce8", "score": "0.50800574", "text": "function setSeedTime1($value = null)\n {\n $this->__seed_time_1 = $value ;\n }", "title": "" }, { "docid": "857f78ae848ff2f67e717f264a2bd09f", "score": "0.50716", "text": "public function set1Camp ($base, $dte1, $dte2, $idCmp){$this->setReq($base,'1 camp', $dte1, $dte2, $idCmp);}", "title": "" }, { "docid": "400db8251bc00a9086d16b0dde327d8f", "score": "0.5059895", "text": "public function setPlafond1Caisse2(?float $plafond1Caisse2): Etablissements {\n $this->plafond1Caisse2 = $plafond1Caisse2;\n return $this;\n }", "title": "" }, { "docid": "5cfdd56f6afa284eb7cd15b206d6e3cd", "score": "0.50594634", "text": "public function setAtBureau2(?string $atBureau2): Etablissements {\n $this->atBureau2 = $atBureau2;\n return $this;\n }", "title": "" }, { "docid": "32e0e02b9cb07f15f0b221352a4c7f71", "score": "0.5023037", "text": "public function setAubry1Modifie(?bool $aubry1Modifie): Etablissements {\n $this->aubry1Modifie = $aubry1Modifie;\n return $this;\n }", "title": "" }, { "docid": "ef2675a6a89704170b32d9ee370ed4be", "score": "0.5007463", "text": "public function setTauxHSup1(?float $tauxHSup1): Etablissements {\n $this->tauxHSup1 = $tauxHSup1;\n return $this;\n }", "title": "" }, { "docid": "3e202986c45ab90d1910e17c2854a7c9", "score": "0.49946013", "text": "public static function builEtablissement($etab)\n {\n $etablissement = new Etablissement(\n $etab['idEtablissement'],\n $etab['domaineEtablissement'],\n $etab['mention'],\n $etab['parcours'],\n $etab['cycles'],\n $etab['idSuperAdministrateur'],\n $etab['idAdministrateur']\n );\n return $etablissement;\n }", "title": "" }, { "docid": "3c40edc38cd4e3c39a7fae0e72cf9299", "score": "0.49820587", "text": "public function setEtat($etat)\r\n {\r\n $this->etat = $etat;\r\n }", "title": "" }, { "docid": "c2e177203818e426bc44d4e21a458fae", "score": "0.49733174", "text": "public function setIbanIdClient1(?string $ibanIdClient1): Etablissements {\n $this->ibanIdClient1 = $ibanIdClient1;\n return $this;\n }", "title": "" }, { "docid": "52a211b3a5ae0e708557b228103a0d50", "score": "0.4969067", "text": "public function testSetEtat2() {\n\n $obj = new Fournisseurs();\n\n $obj->setEtat2(\"etat2\");\n $this->assertEquals(\"etat2\", $obj->getEtat2());\n }", "title": "" }, { "docid": "39d4c4e9cb4d3de7865f338239820da6", "score": "0.49690044", "text": "public function setAtRisque2(?string $atRisque2): Etablissements {\n $this->atRisque2 = $atRisque2;\n return $this;\n }", "title": "" }, { "docid": "fce4b225888f718604c7791c469bf5eb", "score": "0.4946131", "text": "public function etablissementRecord() {\n\t\t $this->certification=0;\n\t\t $this->error='';\n\t\t $this->id_etab=0;\n\t\t $this->locale=0;\n\t\t $this->nationale=0;\n\t\t $this->nom_etab='';\n\t\t $this->pere=0;\n\t\t $this->positionnement=0;\n\t}", "title": "" }, { "docid": "b0d3d33b37fbdf3f05a517f00e5481c2", "score": "0.49390593", "text": "public function setH1($h1) {\r\n\t\t$this->h1 = $h1;\r\n\t}", "title": "" }, { "docid": "ba71f38786af54e0c31faec96bea0338", "score": "0.48995483", "text": "public function setEtat($etat)\n {\n $this->etat = $etat;\n \n return $this;\n }", "title": "" }, { "docid": "00682bf93bb9653a031d5cfcd67a3141", "score": "0.48984793", "text": "function setSeedCourse1($value = null)\n {\n $this->__seed_unit_1 = $value ;\n }", "title": "" }, { "docid": "1608af2cc57c7c2a85aad2a36a7eb4d2", "score": "0.48884675", "text": "public function setTabString ()\n\t{\n\t\t\n\t\t// Set tabs\n\t\t\n\t\t$this->tabValue\t= str_repeat (\"\\t\", $this->tabCount);\n\t\t\n\t}", "title": "" }, { "docid": "b4765632c6ff1308ae8752e6a3d81143", "score": "0.4837062", "text": "public function setEtat($etat)\n{\n$this->etat = $etat;\n}", "title": "" }, { "docid": "fa5dc1f55061682804ee752c8305913a", "score": "0.48350418", "text": "public function setAtTauxBul2(?float $atTauxBul2): Etablissements {\n $this->atTauxBul2 = $atTauxBul2;\n return $this;\n }", "title": "" }, { "docid": "94b678d80a1f087284e8bae4a7bd31b2", "score": "0.4828481", "text": "function TabSetInit( $tsid, $tabname )\r\n {\r\n // initialize the current tab\r\n }", "title": "" }, { "docid": "98a1cdbeac808d198f5c84ebfd8f96a2", "score": "0.48284122", "text": "public function setCodeCColect1(?string $codeCColect1): Etablissements {\n $this->codeCColect1 = $codeCColect1;\n return $this;\n }", "title": "" }, { "docid": "2a37f13f5299bab08cbba0e611cd869b", "score": "0.48241636", "text": "function SetValign($va)\n {\n $this->valign=$va ;\n }", "title": "" }, { "docid": "fa6c7e6f79e569c59c18bb409e5321c5", "score": "0.47961852", "text": "public function testSetTvaEtabBtq() {\n\n $obj = new Fiscal();\n\n $obj->setTvaEtabBtq(\"tvaEtabBtq\");\n $this->assertEquals(\"tvaEtabBtq\", $obj->getTvaEtabBtq());\n }", "title": "" }, { "docid": "e2c8f8d64f31e20e9b00972cc2ed715c", "score": "0.47819537", "text": "private function _SetAtAGlanceContent(){\n\t\t$this->data['aag_news'] = $this->_CreateAAGContent(1);\n\t\t$this->data['aag_opinions'] = $this->_CreateAAGContent(25);\n\t\t//$this->data['aag_policybriefings'] = $this->_CreateAAGContent(25);\n\t\t$this->data['aag_letters'] = $this->_CreateAAGContent(4);\n\t\t$this->data['aag_features'] = $this->_CreateAAGContent(26);\n\t\t$this->data['aag_lists'] = $this->_CreateAAGContent(15);\n\t}", "title": "" }, { "docid": "7841ce636314dbf6726f288a2b86e01a", "score": "0.47815496", "text": "public function testSetText1() {\n\n $obj = new AnnexeTer();\n\n $obj->setText1(\"text1\");\n $this->assertEquals(\"text1\", $obj->getText1());\n }", "title": "" }, { "docid": "778460aa8e61f600077604141a08e286", "score": "0.47795483", "text": "public function testSetMemo1() {\n\n $obj = new AnnexeTer();\n\n $obj->setMemo1(\"memo1\");\n $this->assertEquals(\"memo1\", $obj->getMemo1());\n }", "title": "" }, { "docid": "cbef349d89caaedf3e199106fcf67ea8", "score": "0.4760411", "text": "public function set() {\n\t\t}", "title": "" }, { "docid": "dc5eb469628707d60d878dfd5fe7aa2d", "score": "0.47550005", "text": "public function setAtTaux5(?float $atTaux5): Etablissements {\n $this->atTaux5 = $atTaux5;\n return $this;\n }", "title": "" }, { "docid": "832bc7ca5f8f034b569fc7ee6f812c6a", "score": "0.47469693", "text": "public function tab1($tab=1){\n return $this->phase1($tab);\n }", "title": "" }, { "docid": "2fea889a3fea96355f6e5e10d62e712c", "score": "0.47408962", "text": "public function setSet()\n\t{\n\t\t$this->state = 1;\n\t}", "title": "" }, { "docid": "90574597a997aa5a525f41abd0f37992", "score": "0.47350562", "text": "function setSwimmer1Abbr($value = null)\n {\n $this->__swimmer_1_abbr = $value ;\n }", "title": "" }, { "docid": "6de268fa26a615374115966c96f3993e", "score": "0.47340977", "text": "public function setPlafond1Caisse3(?float $plafond1Caisse3): Etablissements {\n $this->plafond1Caisse3 = $plafond1Caisse3;\n return $this;\n }", "title": "" }, { "docid": "b69abb32ba9c75dce5bcee66b42386f3", "score": "0.47328523", "text": "public function setCells($tabCells){\n $this->cells = $tabCells;\n }", "title": "" }, { "docid": "a70aeb06131a9220aa913412b809d237", "score": "0.472242", "text": "public function setAt($value) {\n\t\t$this->setParamCtrl(\"at\", $value, \"is_string\");\n\t}", "title": "" }, { "docid": "8ec5286570802a44db6fa9a48906152b", "score": "0.47088328", "text": "public function setGestionDucs1(?string $gestionDucs1): Etablissements {\n $this->gestionDucs1 = $gestionDucs1;\n return $this;\n }", "title": "" }, { "docid": "96654de38665b75132383188326b4d18", "score": "0.4699123", "text": "abstract protected function set();", "title": "" }, { "docid": "198e1c4c55679226bc36d5f4130a518c", "score": "0.46772534", "text": "public function setOrigin($e){\n $this->origin = $e;\n }", "title": "" }, { "docid": "3f3b2a4111f5d95fc15a75d92f72edbf", "score": "0.46755624", "text": "function tabInit($mid='', $n='')\n {\n echo \"\\t\".'</div>'.\"\\n\\t\";\n echo '<script type=\"text/javascript\">'.\"\\n\\t\";\n echo 'setupAllTabs();'.\"\\n\\t\";\n \n if($n){ // n = selected index of tab you want to force as set\n echo $mid.'.setSelectedIndex('.$n.');';\n }\n \n echo '</script>'.\"\\n\";\n echo '</div>'.\"\\n\";\n }", "title": "" }, { "docid": "190e27354b96f65cd41d65a91e0d563b", "score": "0.4667219", "text": "function setTabs()\n\t{\n//echo \"setAdminTabs should not be called.\";\n\n\t\t// catch feedback message\n\t\t$this->getTabs($this->tabs_gui);\n\n\t\t//$tabs_gui->setTargetScript($this->ctrl->getLinkTarget($this));\n\t\t$this->tpl->clearHeader();\n\t\tif (is_object($this->object) && strtolower(get_class($this->object)) == \"ilobjmediaobject\")\n\t\t{\n\t\t\t$this->tpl->setTitleIcon(ilUtil::getImagePath(\"icon_mob.svg\"));\n\t\t\t$this->tpl->setTitle($this->object->getTitle());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//$title = $this->object->getTitle();\n\t\t\t$this->tpl->setTitleIcon(ilUtil::getImagePath(\"icon_mob.svg\"));\n\t\t\t$this->tpl->setTitle($this->lng->txt(\"cont_create_mob\"));\n\t\t}\n\t}", "title": "" }, { "docid": "cfbefd454f96619016f22b7556c87005", "score": "0.4663607", "text": "function setRelaySeedTime1($value = null)\n {\n $this->__relay_seed_time_1 = $value ;\n }", "title": "" }, { "docid": "4b5c673d49129df5e5ee1bb6f7f58a91", "score": "0.46555406", "text": "protected function _loadTuple1()\n {\n $value1 = array_pop($this->_stack);\n $this->_stack[] = [$value1];\n }", "title": "" }, { "docid": "48036dd71bc563d9e02ea346c2cfc4b0", "score": "0.46528456", "text": "public function testSetTvaEtabNumVoie() {\n\n $obj = new Fiscal();\n\n $obj->setTvaEtabNumVoie(\"tvaEtabNumVoie\");\n $this->assertEquals(\"tvaEtabNumVoie\", $obj->getTvaEtabNumVoie());\n }", "title": "" }, { "docid": "360bf68d3a4f3ca06e718b1a9003533b", "score": "0.4652409", "text": "private function setTexy()\n {\n }", "title": "" }, { "docid": "1ea301659d5966c9e46ee54480f937e0", "score": "0.46523604", "text": "function setRelaySeedCourse1($value = null)\n {\n $this->__relay_seed_unit_1 = $value ;\n }", "title": "" }, { "docid": "70dd976c603dda28ec6fa1f51f2634de", "score": "0.46464056", "text": "public function setEnvironment($tpAmb = 2){\n if (!empty($tpAmb) && ($tpAmb == 1 || $tpAmb == 2)) {\n $this->tpAmb = $tpAmb;\n $this->ambiente = ($tpAmb == 1) ? 'producao' : 'homologacao';\n }\n }", "title": "" }, { "docid": "6264d3b4fd0a13abb8b644b7ccf011b1", "score": "0.4643669", "text": "public function setNewAktifAkademikEvent($TEMP_START,$TEMP_END,$TEMP_TITLE,$TEMP_SUMMARY){\n\t\tif(intval(DATE(\"m\")) > 6){\n\t\t\t$YEAR = intval(date(\"Y\"));\n\t\t\t$SEMESTER = 1;\n\t\t}else {\n\t\t\t$YEAR = intval(date(\"Y\"))-1;\n\t\t\t$SEMESTER = 2;\n\t\t}\n\t\t$this->sc_ea->resetValue();\n\t\t$this->sc_ea->setYear($YEAR);\n\t\t$this->sc_ea->setSemester($SEMESTER);\n\t\t$this->sc_ea->setStart($TEMP_START);\n\t\t$this->sc_ea->setEnd($TEMP_END);\n\t\t$this->sc_ea->setJudul($TEMP_TITLE);\n\t\t$this->sc_ea->setIsi($TEMP_SUMMARY);\n\t\t$this->sc_ea->setStatus(\"1\");\n\t\t$this->sc_ea->setCategory(\"3\");\n\t\tif($this->sc_ea->setNewEventKoordinator())\n\t\t\treturn $this->setCategoryPrintMessage(0, TRUE, \"Berhasil, input data\");\n\t\telse\n\t\t\treturn $this->setCategoryPrintMessage(0, FALSE, \"Gagal, input data\");\n\t}", "title": "" }, { "docid": "21ce960f4afca32762f895bf3e56e372", "score": "0.46373364", "text": "public function testSetTauxEmissionCo2() {\n\n $obj = new Vehicules();\n\n $obj->setTauxEmissionCo2(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxEmissionCo2());\n }", "title": "" }, { "docid": "b40b604fbbda5a0601138467ab5b5fd7", "score": "0.4630761", "text": "protected function _set() {\n $this->_remap_row();\n }", "title": "" }, { "docid": "4c24c0ca66c211c2eb1125e8f9c3ec4a", "score": "0.46156338", "text": "function f1()\n\t\t{\n\t\t\techo \"<C1::f1>\\n\";\n\t\t\t$a1 = 1;\n\t\t\t$this->a1 = 2;\n\t\t\tvar_dump($a1);\n\t\t\tvar_dump($this->a1);\n\t\t\techo \"</C1::f1>\\n\";\n\t\t}", "title": "" }, { "docid": "ec9cf3ae80ad7114fe4f5cef6f43b225", "score": "0.46104082", "text": "function setTeamAddress2($txt)\n {\n $this->_team_address_2 = $txt ;\n }", "title": "" }, { "docid": "cfeea98672b1228d855b82ac3a1582f8", "score": "0.460765", "text": "public function setDadsuCodeCColect1(?string $dadsuCodeCColect1): Etablissements {\n $this->dadsuCodeCColect1 = $dadsuCodeCColect1;\n return $this;\n }", "title": "" }, { "docid": "5b26571a179d3f4b8036c099655425f9", "score": "0.46024966", "text": "public function setTag1(array $tags)\n\t{\n\t\t$this->tags['tag1'] = array();\n\t\tforeach ($tags as $tag) {\n\t\t\t$this->addTag1($tag);\n\t\t}\n\t}", "title": "" }, { "docid": "e3d011da7ad54708d5d5b8e8de28aa2e", "score": "0.46023947", "text": "private function set() {\n\t\t$this->set_elements();\n\n\t\t$this->_instances = apply_filters( 'tcb_element_instances', $this->_instances, '' );\n\n\t\t$order_template = array(\n\t\t\t'text',\n\t\t\t'image',\n\t\t\t'button',\n\t\t\t'columns',\n\t\t\t'section',\n\t\t\t'contentbox',\n\t\t\t'ct',\n\t\t\t'tweet',\n\t\t\t'reveal',\n\t\t\t'countdown',\n\t\t\t'countdownevergreen_template',\n\t\t\t'credit',\n\t\t\t'html',\n\t\t\t'menu',\n\t\t\t'commentsdisqus',\n\t\t\t'divider',\n\t\t\t'commentsfacebook',\n\t\t\t'fillcounter',\n\t\t\t'gmap',\n\t\t\t'icon',\n\t\t\t'lead_generation',\n\t\t\t'moretag',\n\t\t\t'postgrid',\n\t\t\t'progressbar',\n\t\t\t'social',\n\t\t\t'social_follow',\n\t\t\t'rating',\n\t\t\t'styledlist',\n\t\t\t'table',\n\t\t\t'toc',\n\t\t\t'tabs',\n\t\t\t'testimonial',\n\t\t\t'toggle',\n\t\t\t'responsivevideo',\n\t\t\t'wordpress',\n\t\t\t'post_title',\n\t\t\t'post_thumbnail',\n\t\t\t'post_content',\n\t\t\t'post_read_more',\n\t\t\t'post_author_name',\n\t\t\t'post_author_picture',\n\t\t\t'post_date',\n\t\t\t'post_categories',\n\t\t\t'post_tags',\n\t\t);\n\t\t$this->_instances = array_merge( array_flip( $order_template ), $this->_instances );\n\n\t\tif ( apply_filters( 'tve_include_widgets_in_editor', false ) ) {\n\t\t\t$this->load_widgets();\n\t\t}\n\n\t\t/* Allow plugins to remove TCB Elements */\n\t\t$this->_instances = apply_filters( 'tcb_remove_instances', $this->_instances );\n\t}", "title": "" }, { "docid": "8623da10621e8edc8ceb2caf5c284f38", "score": "0.46003813", "text": "public function setNbHJour1(?float $nbHJour1): Etablissements {\n $this->nbHJour1 = $nbHJour1;\n return $this;\n }", "title": "" }, { "docid": "b6cbe372cd7685a40880b54f0f16f657", "score": "0.45991144", "text": "function setTCAdata($tableName='') {\n\t\t$this->_fCount(__FUNCTION__);\n\t\t$tableName = $tableName ? $tableName : $this->defaultTableName;\n\t\tif (!is_array($GLOBALS['TCA'][$tableName]['columns'])) {\n\t\t\t$GLOBALS['TSFE']->includeTCA();\n\t\t}\n\t\tif (!is_array($GLOBALS['TCA'][$tableName]['columns'])) {\n\t\t\tt3lib_div::loadTCA($tableName);\n\t\t\t$GLOBALS['TSFE']->includeTCA();\n\t\t}\n\n\t\t$configTCA = $this->_configTCA($tableName);\n\t\tif (!is_array($configTCA)) {\n\t\t\t$configTCA = Array('ctrl'=>'TABLECTRL', 'ctrl.'=>$this->_getDotArray($GLOBALS['TCA'][$tableName]['ctrl']),'conf'=>'TABLECONF');\n\t\t\t$myTCA = $GLOBALS['TCA'][$tableName]['columns'];\n\t\t\tif (is_array($myTCA)) for (reset($myTCA);$key=key($myTCA);next($myTCA)) {\n\t\t\t\t// Not needed for zlib - slows down 80x\n\t\t\t\tif (strcmp(substr($key,0,4),'l18n')) {\n\t\t\t\t\t$configTCA['conf.'][$key.'.']['label'] = $myTCA[$key]['label'];\n\t\t\t\t\tif (is_array($myTCA[$key]['config'])) foreach ($myTCA[$key]['config'] as $myKey => $myValue) {\n\t\t\t\t\t\tif ($myKey=='wrap') {\n\t\t\t\t\t\t\t$configTCA['conf.'][$key.'.']['configWrap'] = $myValue;\n\t\t\t\t\t\t} else if ($myKey!='wizards'){\n\t\t\t\t\t\t\tif (is_array($myValue)) {\n\t\t\t\t\t\t\t\t$configTCA['conf.'][$key.'.'][$myKey.'.'] = $this->_getDotArray($myValue);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$configTCA['conf.'][$key.'.'][$myKey] = $myValue;\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\t\t\t$this->_configTCA($tableName,$configTCA);\n\t\t}\n\t\t$this->debugData[] = Array('TCAdata',Array('configTCA('.$tableName.')'=>$configTCA, 'File:Line'=>__FILE__.':'.__LINE__));\n\t}", "title": "" }, { "docid": "a8c8cbeafc40a62bb6ff05ea7884ce82", "score": "0.45990708", "text": "public function setLine2($line2);", "title": "" }, { "docid": "5ce3d91e1ef0a8d87e02685d4309b141", "score": "0.45929548", "text": "public function testSetCode1() {\n\n $obj = new AnnexeTer();\n\n $obj->setCode1(\"code1\");\n $this->assertEquals(\"code1\", $obj->getCode1());\n }", "title": "" }, { "docid": "4ab85e162383d08c3e1ec8e2cc02599b", "score": "0.45875984", "text": "public function setIdETAPA($idETAPA){\n $this->idETAPA = $idETAPA;\n }", "title": "" }, { "docid": "7f62424749bc8994d1dd510a62cbb257", "score": "0.45856193", "text": "function setHeadcode()\n {\n $this->headcode_thing->set();\n }", "title": "" }, { "docid": "f5ad9c092dc43cad785cc1e90afc565b", "score": "0.45755807", "text": "function setTabIndex( $tabs )\r\n\t{\r\n\t\t// is the given value a string?\r\n\t\tif( is_string( $tabs ) )\r\n\t\t{\r\n\t\t\t// split the commas\r\n\t\t\t$tabs = explode(',', $tabs);\r\n\r\n\t\t\t// add an empty value so that the index 0 isnt used\r\n\t\t\tarray_unshift($tabs, '');\r\n\t\t}\r\n\t\t// is the given value an array\r\n\t\telse if( is_array( $tabs ))\r\n\t\t{\r\n\t\t\t// is set element 0, then move all elements\r\n\t\t\t// (0 is not a valid tabindex, it starts with 1)\r\n\t\t\tif( isset( $tabs[0]))\r\n\t\t\t{\r\n\t\t\t\tksort( $tabs );\r\n\t\t\t\t$new = array();\r\n\r\n\t\t\t\tforeach( $tabs as $key => $value )\r\n\t\t\t\t{\r\n\t\t\t\t\twhile( array_key_exists( $key, $new) || $key <= 0) $key++;\r\n\t\t\t\t\t$new[$key] = $value;\r\n\t\t\t\t}\r\n\t\t\t\t$tabs = $new;\r\n\t\t\t}\r\n\t\t\t// the tabs array is good.. just use it\r\n\t\t}\r\n\r\n\t\t// array with tabs set ?\r\n\t\tif( isset( $tabs ) )\r\n\t\t{\r\n\t\t\t// walk each tabindex\r\n\t\t\tforeach($tabs as $key => $value )\r\n\t\t\t{\r\n\t\t\t\t// if there is a field..\r\n\t\t\t\tif( !empty($value) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabs[$key] = trim($value);\r\n\t\t\t\t}\r\n\t\t\t\t// no field is given, remove it's index\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tunset($tabs);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save the tab indexes\r\n\t\t\t$this->_tabindexes = $this->_tabindexes + $tabs ;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9674cebc5307c98ff8a379002cebb8a4", "score": "0.45743454", "text": "function setAcctInfo()\n {\n $gateway_info = $this->erm->get_gateway_info();\n $this->sid = $gateway_info['_epl_tco_sid'];\n $this->secret_word = $gateway_info['_epl_tco_secret'];\n if ($gateway_info['_epl_sandbox'] == 10) {\n $this->demo = 'Y';\n } else {\n $this->demo = 'N';\n }\n\n }", "title": "" }, { "docid": "5852092b6a98f9e1c0930c100a1bcd8c", "score": "0.45673198", "text": "public function testSetEtat3() {\n\n $obj = new Fournisseurs();\n\n $obj->setEtat3(\"etat3\");\n $this->assertEquals(\"etat3\", $obj->getEtat3());\n }", "title": "" }, { "docid": "65b97f0d7933e07d18baee280a693215", "score": "0.45661157", "text": "function set_employee($empID)\n\t\t{\n if(ShiftFactory::addEmployee($this->date, $this->type, $empID))\n {\n $this->empID = $empID;\n }\n \n\t\t}", "title": "" }, { "docid": "f9a3387fce83d1f105420e7bff275937", "score": "0.45653173", "text": "protected function _tbAlign(){\n\t$this->SetX($this->iTableStartX);\n}", "title": "" }, { "docid": "a893708429e21aa865b6a89de503cc82", "score": "0.4565224", "text": "function setMeetAddress2($txt)\n {\n $this->_meet_address_2 = $txt ;\n }", "title": "" }, { "docid": "bf90e13d1f497e8e581c9be1b3543ea7", "score": "0.45634612", "text": "public function setAtBureau5(?string $atBureau5): Etablissements {\n $this->atBureau5 = $atBureau5;\n return $this;\n }", "title": "" }, { "docid": "2fbb8018ecb0f3d1e75c814430768b0e", "score": "0.45618963", "text": "public function set()\n {\n // an indication where to start.\n\n // This makes sure that\n if (!isset($this->train_thing)) {\n $this->train_thing = $this->thing;\n }\n\n if (!isset($this->requested_state) or $this->requested_state == null) {\n $this->requested_state = $this->state;\n }\n\n if (!isset($requested_state) or $requested_state == null) {\n $requested_state = $this->requested_state;\n }\n // Update calculated variables.\n // $this->available = $this->getAgent('available')->available;\n $this->getAvailable();\n\n $this->variables_agent->setVariable(\"state\", $requested_state);\n $this->variables_agent->setVariable(\"head_code\", $this->head_code);\n\n $this->setAlias();\n $this->setIndex();\n //$this->setRunat();\n $this->setQuantity();\n\n $this->variables_agent->setVariable(\"available\", $this->available);\n $this->variables_agent->setVariable(\n \"refreshed_at\",\n $this->current_time\n );\n\n $this->variables_agent->setVariable(\"route\", $this->route);\n $this->variables_agent->setVariable(\"consist\", $this->consist);\n //$this->variables_agent->setVariable(\"runtime\", $this->runtime); // save the runtime array with the train\n\n $this->thing->choice->save('train', $this->state);\n\n $this->state = $requested_state;\n $this->refreshed_at = $this->current_time;\n }", "title": "" }, { "docid": "df1cab7963a0230199cd1f8ce00e91b3", "score": "0.45558813", "text": "public function testSetTel1() {\n\n $obj = new ListeEmployes();\n\n $obj->setTel1(\"tel1\");\n $this->assertEquals(\"tel1\", $obj->getTel1());\n }", "title": "" }, { "docid": "373118ce2a33c069f480620c9a5b97e6", "score": "0.455224", "text": "public function testSetEtat5() {\n\n $obj = new Fournisseurs();\n\n $obj->setEtat5(\"etat5\");\n $this->assertEquals(\"etat5\", $obj->getEtat5());\n }", "title": "" }, { "docid": "40e797d375081b5aa214744937a47d82", "score": "0.45482948", "text": "public function setTypeDomiciliationBanque1(?string $typeDomiciliationBanque1): Etablissements {\n $this->typeDomiciliationBanque1 = $typeDomiciliationBanque1;\n return $this;\n }", "title": "" }, { "docid": "23935ad90b857961113105c79713cea7", "score": "0.45479265", "text": "public function setAtRisque5(?string $atRisque5): Etablissements {\n $this->atRisque5 = $atRisque5;\n return $this;\n }", "title": "" }, { "docid": "60c6fd40746021228d2aea2f56ef0b46", "score": "0.45470244", "text": "function setPrimaryContactAddress1($value = null)\n {\n $this->__primary_contact_address1 = $value ;\n }", "title": "" }, { "docid": "5b71f956602643cde5f12f03ae4dc0cc", "score": "0.45389903", "text": "public function set() {}", "title": "" }, { "docid": "980cae350c0b7885b81cb965b4a3e2cf", "score": "0.4538798", "text": "function changedata(){\n echo $this->modle=\"hello\";\n echo $this->speed=434;\n }", "title": "" }, { "docid": "c2094dacd000707f3416c07544dcf926", "score": "0.45283386", "text": "public function setStreet1(string $street1): void\n {\n $this->_street1 = $street1;\n }", "title": "" } ]
8d06d94dee6ba22f37c8f4dafc441333
Operation enrollmentLearnv1enrollmentscourseIduserId_0 Enroll user/s in course/s
[ { "docid": "cecfd72129ae56e5076c605356b2117d", "score": "0.77061975", "text": "public function enrollmentLearnv1enrollmentscourseIduserId_0($user_id, $course_id, $body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollmentscourseIduserId_0WithHttpInfo($user_id, $course_id, $body);\n return $response;\n }", "title": "" } ]
[ { "docid": "710215003a8d335f41aac5a7373ce66f", "score": "0.7548331", "text": "public function enrollmentLearnv1enrollmentscourseIduserId($user_id, $course_id, $body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollmentscourseIduserIdWithHttpInfo($user_id, $course_id, $body);\n return $response;\n }", "title": "" }, { "docid": "9111f1708e6052ed6948723a565aa11b", "score": "0.6737887", "text": "public function enrollmentLearnv1enrollmentscourseIduserIdWithHttpInfo($user_id, $course_id, $body = null)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $user_id when calling enrollmentLearnv1enrollmentscourseIduserId');\n }\n // verify the required parameter 'course_id' is set\n if ($course_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $course_id when calling enrollmentLearnv1enrollmentscourseIduserId');\n }\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments/{course_id}/{user_id}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"user_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($user_id),\n $resourcePath\n );\n }\n // path params\n if ($course_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"course_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($course_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateSingleResponse',\n '/learn/v1/enrollments/{course_id}/{user_id}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateSingleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateSingleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "de3aaa57a4d581419ec1e4895cd79a51", "score": "0.6703418", "text": "public function enroll(Course $course)\n {\n $users = DB::table('users')->select('id', 'name', 'email')->get();\n $courses = DB::table('courses')->select('slug')->get();\n\n return view('courses.enroll', ['users' => $users], ['course' => $course]);\n }", "title": "" }, { "docid": "8299233aa164dd78db189072aaee56fb", "score": "0.65956944", "text": "public function enrollmentLearnv1enrollments_1($body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollments_1WithHttpInfo($body);\n return $response;\n }", "title": "" }, { "docid": "707bff92285005c868724dadfadecfcc", "score": "0.6565887", "text": "public function enrollmentLearnv1enrollmentsidCourseidUser_0($id_course, $id_user)\n {\n list($response) = $this->enrollmentLearnv1enrollmentsidCourseidUser_0WithHttpInfo($id_course, $id_user);\n return $response;\n }", "title": "" }, { "docid": "e5ba4ab014d13c45e5f1a2a15c4525da", "score": "0.6554303", "text": "public function enrollmentLearnv1enrollments_0($body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollments_0WithHttpInfo($body);\n return $response;\n }", "title": "" }, { "docid": "b19ec24a54ee1625a23eede798ace102", "score": "0.6535801", "text": "public function enrollmentLearnv1enrollments($id_user = null, $status = null, $type = null, $deadline = null, $rating = null, $channel = null, $search = null)\n {\n list($response) = $this->enrollmentLearnv1enrollmentsWithHttpInfo($id_user, $status, $type, $deadline, $rating, $channel, $search);\n return $response;\n }", "title": "" }, { "docid": "778286c5cf67b3179557797a8d913352", "score": "0.6504484", "text": "public function enrollmentLearnv1enrollmentscourseIduserId_0WithHttpInfo($user_id, $course_id, $body = null)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $user_id when calling enrollmentLearnv1enrollmentscourseIduserId_0');\n }\n // verify the required parameter 'course_id' is set\n if ($course_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $course_id when calling enrollmentLearnv1enrollmentscourseIduserId_0');\n }\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments/{course_id}/{user_id}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"user_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($user_id),\n $resourcePath\n );\n }\n // path params\n if ($course_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"course_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($course_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentCreateSingleResponse',\n '/learn/v1/enrollments/{course_id}/{user_id}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentCreateSingleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentCreateSingleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "ec5215c90389102f167243bda667518e", "score": "0.64109766", "text": "public function enrollmentLearnv1enrollmentsidCourseidUser($id_course, $id_user)\n {\n list($response) = $this->enrollmentLearnv1enrollmentsidCourseidUserWithHttpInfo($id_course, $id_user);\n return $response;\n }", "title": "" }, { "docid": "a317a74b5659a78b95c2ce420c31d6e0", "score": "0.63160944", "text": "public function enrolStudent($studentId, $courseKey)\n {\n }", "title": "" }, { "docid": "0f271b21dc6c85bcaa0aa322b0b569df", "score": "0.62162507", "text": "public function enrollmentLearnv1enrollmentsidCourseidUserWithHttpInfo($id_course, $id_user)\n {\n // verify the required parameter 'id_course' is set\n if ($id_course === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id_course when calling enrollmentLearnv1enrollmentsidCourseidUser');\n }\n // verify the required parameter 'id_user' is set\n if ($id_user === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id_user when calling enrollmentLearnv1enrollmentsidCourseidUser');\n }\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments/{id_course}/{id_user}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id_course !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id_course\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id_course),\n $resourcePath\n );\n }\n // path params\n if ($id_user !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id_user\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id_user),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentViewResponse',\n '/learn/v1/enrollments/{id_course}/{id_user}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentViewResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentViewResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "e9bc6f1c73e7260b4bd8b8e95ba7d2bc", "score": "0.6202904", "text": "public function enroll(Request $request, $id) {\n\n\t\t$idUser = \\Auth::user()->id;\n\n\t\t$user = User::where('id', $idUser)->first();\n\n\t\t$data = array(\"student_name\" => $user->name, \"course_id\" => $id, \"user_id\" => $user->id);\n\t\tDB::table('student')->insert($data);\n\n\t\treturn redirect('/home')->with('success', 'Enrolled successfully!');\n\n\t}", "title": "" }, { "docid": "ef3f2340abdebdf3567b38874dec734d", "score": "0.61440635", "text": "public function enrollmentLearnv1enrollments_2($body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollments_2WithHttpInfo($body);\n return $response;\n }", "title": "" }, { "docid": "2fb757ca0927a61d3342f9dc94d433bc", "score": "0.6120474", "text": "function is_user_enrolled_to_course( $user_id = 0, $course_id = 0 ) {\n\t\t$enrolled_courses = learndash_user_get_enrolled_courses( $user_id );\n\t\treturn ( is_array( $enrolled_courses ) && in_array( $course_id, $enrolled_courses ) );\n\t}", "title": "" }, { "docid": "69b1290bc2a1dbb61e89f2237d0b860c", "score": "0.6115303", "text": "function course_autoenrollment_from_quiz() {\n\tif ( is_single() && 'quiz' === get_post_type() && is_user_logged_in() ) {\n\t\t$quiz = get_post();\n\t\t$lesson = get_post( $quiz->post_parent );\n\t\t$course_id = intval( $lesson->_lesson_course );\n\t\t$user_id = get_current_user_id();\n\n\t\tif ( $course_id && ! Sensei_Course::is_user_enrolled( $course_id, $user_id ) ) {\n\t\t\t$enrollment_manager = Sensei_Course_Enrolment_Manager::instance();\n\n\t\t\ttry {\n\t\t\t\t$manual_enrollment = $enrollment_manager->get_manual_enrolment_provider();\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$manual_enrollment->enrol_learner( $user_id, $course_id );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "70eb10879712d882ebd2182e79ce1d48", "score": "0.6085184", "text": "function getEnrolledCourses($userId='')\n {\n $user = $this->find('first', array(\n 'conditions' => array('User.id' => $userId),\n 'contain' => array('Enrolment')\n ));\n return Set::extract($user, '/Enrolment/id');\n }", "title": "" }, { "docid": "78e7c80cb117123c659455be2f91f48b", "score": "0.6031329", "text": "public function addInstructor($user_id, $course_id)\n {\n $newEntry = array();\n $newEntry['UserCourse']['course_id'] = $course_id;\n $newEntry['UserCourse']['user_id'] = $user_id;\n $newEntry['UserCourse']['record_status'] = 'A';\n $this->UserCourse->create();\n return $this->UserCourse->save($newEntry);\n }", "title": "" }, { "docid": "2f654e25e281bdeb5c24ee85d7ff0efd", "score": "0.6030557", "text": "public function addStudent($user_id, $course_id)\n {\n $newEntry = array();\n $newEntry['UserEnrol']['course_id'] = $course_id;\n $newEntry['UserEnrol']['user_id'] = $user_id;\n $newEntry['UserEnrol']['record_status'] = 'A';\n $this->UserEnrol->create();\n return $this->UserEnrol->save($newEntry);\n }", "title": "" }, { "docid": "430c26e6f3f170773fe47f2236b2938a", "score": "0.602911", "text": "public function enrollmentLearnv1enrollmentsidCourseidUser_0WithHttpInfo($id_course, $id_user)\n {\n // verify the required parameter 'id_course' is set\n if ($id_course === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id_course when calling enrollmentLearnv1enrollmentsidCourseidUser_0');\n }\n // verify the required parameter 'id_user' is set\n if ($id_user === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id_user when calling enrollmentLearnv1enrollmentsidCourseidUser_0');\n }\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments/{id_course}/{id_user}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id_course !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id_course\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id_course),\n $resourcePath\n );\n }\n // path params\n if ($id_user !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id_user\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id_user),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentDeleteResponse',\n '/learn/v1/enrollments/{id_course}/{id_user}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "48458a49eed43118177bf03ba41accaf", "score": "0.60255915", "text": "public function enrollmentLearnv1enrollmentbatch($body = null)\n {\n list($response) = $this->enrollmentLearnv1enrollmentbatchWithHttpInfo($body);\n return $response;\n }", "title": "" }, { "docid": "7e3e712442d59723a26df16749828e01", "score": "0.6010196", "text": "function add_user_to_courses( $user_id, $course_ids ) {\n\t\tforeach( $course_ids as $course_id ) {\n\t\t\t// Skip if enrolled already.\n\t\t\tif ( $this->is_user_enrolled_to_course( $user_id, $course_id ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Enroll.\n\t\t\tld_update_course_access( $user_id, $course_id, $remove = false );\n\t\t}\n\t}", "title": "" }, { "docid": "4af1c3210a2253df74a01d0ce7d747e5", "score": "0.5883482", "text": "public function enrolled(Course $course)\n {\n // the user with the course is joined\n $course->students()->attach(auth()->user()->id);\n\n return redirect()->route('courses.status', $course);\n }", "title": "" }, { "docid": "6a2498d5cd0bd5ace2b02ac60753cc95", "score": "0.58280635", "text": "public function handle_enrol($courseid,$userid){\n return true;\n\t}", "title": "" }, { "docid": "7e40cc28314335f1704813b1aafc7171", "score": "0.57993877", "text": "public function enrolUserInCourse ($course, $user, $plugin = 'globalclassroom')\n {\n $plugin = enrol_get_plugin($plugin);\n $sql = 'select * from ' . $this->short_name . '.mdl_enrol where enrol = ? and courseid = ?';\n $plugin_instance = $this->gcQuery($sql, array('globalclassroom', $course->id), true);\n\n if ($plugin_instance->enrolperiod)\n {\n $timestart = time();\n $timeend = $timestart + $plugin_instance->enrolperiod;\n }\n else\n {\n $timestart = 0;\n $timeend = 0;\n }\n\n // Enrol user\n $plugin->enrol_user($plugin_instance, $user->id, $plugin_instance->roleid, $timestart, $timeend);\n $plugin->send_welcome_message($plugin_instance, $user);\n $this->sendEnrolmentEmails($plugin, $course, $user); \n }", "title": "" }, { "docid": "fc8d3ff8bdd02c440a0a15111ed1014a", "score": "0.5746225", "text": "public function enrollmentLearnv1enrollments_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentCreateResponse',\n '/learn/v1/enrollments'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "f4505fb7ae0d3f8f3eec48975da2ef53", "score": "0.57316023", "text": "public function enrolled(User $user, Course $course){\n //verificar si un usuario tiene ciertos permisos \n return $course->students->contains($user->id); //contains ve si el id del usuario coincide con la coleccion students, si se encuentra deveulve true, de lo contrario devuelve false\n\n }", "title": "" }, { "docid": "059e02dad36f670ae5ee3b943e262f59", "score": "0.5715736", "text": "public function enroll($columnId=null)\n\t{\n\t\t$this->load->model('presence_model');\n\n\t\tif($this->authex->isLoggedIn())\n\t\t{\n\t\t\t$user = $this->authex->getUserInfo();\n\t\t\t\n\n\t\t\tif($this->presence_model->isEnrolled($columnId, $user->id))\n\t\t\t{\n\t\t\t\tdie(\"0\");\n\n\t\t\t} else \n\t\t\t{\n\t\t\t\t// Hier nog nakijken of student zich wel mag inschrijven !!\n\n\t\t\t\t$this->presence_model->enroll($columnId, $user->id, $this->authex->isDocent());\n\t\t\t\tdie(\"1\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e7c7277c632ace9565f492002e6ee965", "score": "0.56721765", "text": "public function enrollmentLearnv1enrollmentsWithHttpInfo($id_user = null, $status = null, $type = null, $deadline = null, $rating = null, $channel = null, $search = null)\n {\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if (is_array($id_user)) {\n $id_user = $this->apiClient->getSerializer()->serializeCollection($id_user, 'brackets', true);\n }\n if ($id_user !== null) {\n $queryParams['id_user'] = $this->apiClient->getSerializer()->toQueryValue($id_user);\n }\n // query params\n if (is_array($status)) {\n $status = $this->apiClient->getSerializer()->serializeCollection($status, 'brackets', true);\n }\n if ($status !== null) {\n $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);\n }\n // query params\n if (is_array($type)) {\n $type = $this->apiClient->getSerializer()->serializeCollection($type, 'brackets', true);\n }\n if ($type !== null) {\n $queryParams['type'] = $this->apiClient->getSerializer()->toQueryValue($type);\n }\n // query params\n if ($deadline !== null) {\n $queryParams['deadline'] = $this->apiClient->getSerializer()->toQueryValue($deadline);\n }\n // query params\n if ($rating !== null) {\n $queryParams['rating'] = $this->apiClient->getSerializer()->toQueryValue($rating);\n }\n // query params\n if ($channel !== null) {\n $queryParams['channel'] = $this->apiClient->getSerializer()->toQueryValue($channel);\n }\n // query params\n if ($search !== null) {\n $queryParams['search'] = $this->apiClient->getSerializer()->toQueryValue($search);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentIndexResponse',\n '/learn/v1/enrollments'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentIndexResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentIndexResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "c4697697c1bbe4847ed9e67e081ab0ad", "score": "0.56333244", "text": "public function enrolled(User $user, Course $course){\n\n return $course->students->contains($user->id);\n }", "title": "" }, { "docid": "02b71773ecaa8a08d39117e41e7ab6b0", "score": "0.55831856", "text": "function getEnrolledStudents($course_id)\n {\n return $this->find(\n 'all',\n array(\n 'conditions' => array('Enrolment.id' => $course_id),\n 'fields' => 'User.*',\n 'order' => 'User.student_no'\n )\n );\n }", "title": "" }, { "docid": "de598abee0e2810983d37aa68147740b", "score": "0.55808544", "text": "public function getEnroll(Request $request)\n {\n $enrolls = $request->user()->enrolls();\n if (!is_null($request->ok)) {\n $enrolls->approve();\n } else if (!is_null($request->wait)) {\n $enrolls->waitForPayment();\n } else if (!is_null($request->check)) {\n $enrolls->check();\n }\n $enrolls = $enrolls->with('course')->get();\n\n return view('course.member.table', compact('enrolls'));\n }", "title": "" }, { "docid": "5d50762525fdc615242d4637a2b632bf", "score": "0.553826", "text": "public function actionUpdate($id)\r\n\t{\r\n if(yii::app()->user->can('enroll_update_completed'))\r\n {\r\n $this->actionUpdateCompleted($id);\r\n } \r\n else if(yii::app()->user->can('enroll_update_own')) {\r\n $this->actionUpdateOwn();\r\n }\r\n else if(yii::app()->user->can('enroll_update') \r\n || (yii::app()->user->getName() == 'admin'))\r\n {\r\n if(isset($_GET['cid']))\r\n {\r\n $cid=$_GET['cid'];\r\n $model=$this->loadModel($id, $cid);\r\n \r\n $enrollment = array();\r\n foreach($model as $value)\r\n {\r\n $enrollment['user_id'] = $value->user_id;\r\n $enrollment['courseoffer_id'] = $value->courseoffer_id;\r\n $enrollment['completed'] = $value->completed;\r\n $enrollment['notes'] = $value->notes;\r\n }\r\n }\r\n\t\t\r\n\r\n \r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Enroll']))\r\n\t\t{ \r\n $isAllowed=false;\r\n\t\t\t$userid=$_POST['Enroll']['user_id'];\r\n\t\t\t$user=User::model()->findAll(\"username='\" . $_POST['Enroll']['user_id'] . \"'\");\r\n\t\t\tforeach($user as $uid){\r\n\t\t\t\t$userid=$uid->id;\r\n\t\t\t}\r\n\t\t\t$_POST['Enroll']['user_id']=$userid;\r\n\t\t\t$enrollment=$_POST['Enroll'];\r\n if(isset($_GET['cid'])) {\r\n if($cid==$_POST['Enroll']['courseoffer_id']) {\r\n $isAllowed=true;\r\n }\r\n }\r\n\t\t\tif(!$this->checkDuplicate($userid, $_POST['Enroll']['courseoffer_id'],$isAllowed)) {\r\n\t\t\t\tEnroll::model()->updateAll(array(\r\n\t\t\t\t\t'user_id'=>$enrollment['user_id'],\r\n\t\t\t\t\t'courseoffer_id'=>$enrollment['courseoffer_id'],\r\n\t\t\t\t\t'completed'=>$enrollment['completed'],\r\n\t\t\t\t\t'notes'=>$enrollment['notes']),\r\n\t\t\t\t\t\t\"user_id=$id AND courseoffer_id=$cid\");\r\n\t\t\t\r\n\t\t\t\tYii::app()->user->setFlash('success', Yii::t('main', '{model} updated', array('{model}' => Yii::t('enroll', 'Enroll') )) );\r\n\t\t\t\t$this->redirect(array('index'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->render('update',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n }\r\n\t}", "title": "" }, { "docid": "732a4dc8f084f717f67711bf05dd0602", "score": "0.5535519", "text": "public function enrolled(User $user, Course $course)\n {\n return $course->students->contains($user->id);\n }", "title": "" }, { "docid": "1a1fe288eb550d71b8da0acc050a07b0", "score": "0.5535342", "text": "public function enrollmentLearnv1enrollments_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateMultipleResponse',\n '/learn/v1/enrollments'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateMultipleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentUpdateMultipleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "fd826105bf8e97387419c1b99587d907", "score": "0.54630923", "text": "function youlive_enrolled_users_course(){\n\techo \"<h2> Enrolled User </h2>\";\n\tglobal $wpdb;\n\n\t$enrolled_user_data = $wpdb->get_results(\"SELECT * from wp_learnpress_user_items WHERE status = 'enrolled' && item_type ='lp_course' \");\n\t\t?>\n\t<table class=\"table table-hover\" style=\"width: 100%\">\n <thead style=\"width: 100%\"> \n <tr style=\"width: 100%\">\n <th>Name</th>\n <th>Email </th>\n <th>Course </th>\n <th>Enrolled at </th>\n </tr>\n </thead>\n <tbody style=\"width: 100%\">\n\n\t<?php\n\tforeach ($enrolled_user_data as $key => $value) {\n\t\t$user_detail = get_userdata($value->user_id);\n\t\t$course_details = get_post($value->item_id);\n\t\t// print_r($course_details->post_name);\n\t?>\n <tr style=\"width: 100%\">\n <td> <?php echo $user_detail->first_name .\" \".$user_detail->last_name; ?> </td>\n <td><?php echo $user_detail->user_email; ?></td>\n <td><?php echo \"<a href=\".$course_details->guid.\">\". $course_details->post_name .\"</a>\"; ?></td>\n <td> <?php echo date('n-j-Y', strtotime($value->start_time)); ?> </td>\n </tr>\n <?\n\t}\n\t?>\n </tbody>\n </table>\n <?php\n}", "title": "" }, { "docid": "a9105ea95a3dba27a60d5a2963db1893", "score": "0.54214936", "text": "protected function do_update($userid, $classid, array $enroldata, array $learningobjectives) {\n global $DB;\n if (student::can_manage_assoc($userid, $classid) !== true) {\n throw new Exception('Unauthorized');\n }\n\n if (!isset($enroldata['id'])) {\n $associationid = $DB->get_field(student::TABLE, 'id', array('classid' => $classid, 'userid' => $userid));\n if (empty($associationid)) {\n return false;\n } else {\n $enroldata['id'] = $associationid;\n }\n }\n\n $enroldata['userid'] = $userid;\n $stu = new student($enroldata);\n\n if ($stu->completestatusid == STUSTATUS_PASSED\n && $DB->get_field(student::TABLE, 'completestatusid', array('id' => $stu->id)) != STUSTATUS_PASSED) {\n $stu->complete();\n } else {\n $status = $stu->save();\n }\n\n foreach ($learningobjectives as $id => $data) {\n $graderec = array('userid' => $userid, 'classid' => $classid, 'completionid' => $id);\n $existingrec = $DB->get_record(student_grade::TABLE, $graderec);\n if (!empty($existingrec)) {\n $graderec = (array)$existingrec;\n }\n\n $graderec['timegraded'] = $data['timegraded'];\n $graderec['grade'] = $data['grade'];\n $graderec['locked'] = $data['locked'];\n\n $sgrade = new student_grade($graderec);\n $sgrade->save();\n }\n }", "title": "" }, { "docid": "484d0f602bf3be5c1bb9f835995d57aa", "score": "0.5409639", "text": "function learn_press_profile_tab_courses_learning( $user ) {\r\n\t\t$courses = $user->get( 'enrolled-courses', array( 'status' => 'enrolled', 'limit' => 10 ) );\r\n\t\tlearn_press_get_template( 'profile/tabs/courses/learning.php', array( 'user' => $user, 'courses' => $courses ) );\r\n\t}", "title": "" }, { "docid": "981ec607a8a431582c3e483722045b58", "score": "0.5382181", "text": "public function enroll()\n {\n\n return view('enrollments.enroll');\n }", "title": "" }, { "docid": "ed2a3ef037aaa5341a243a72d02d2b7e", "score": "0.53486407", "text": "protected function get_enrol_data($userid, $classid) {\n global $DB;\n\n $completestatusjskeys = array(\n STUSTATUS_NOTCOMPLETE => 'notcomplete',\n STUSTATUS_PASSED => 'passed',\n STUSTATUS_FAILED => 'failed'\n );\n\n if (student::can_manage_assoc($userid, $classid) !== true) {\n throw new Exception(get_string('not_permitted', 'local_elisprogram'));\n }\n\n $enroldata = array();\n\n // Enrolment data.\n $enrolrec = $DB->get_record(student::TABLE, array('classid' => $classid, 'userid' => $userid));\n if (!empty($enrolrec)) {\n $enroldata = array(\n 'association_id' => $enrolrec->id,\n 'enroltime' => array(\n 'date' => date('j', $enrolrec->enrolmenttime),\n 'month' => date('n', $enrolrec->enrolmenttime),\n 'year'=> date('Y', $enrolrec->enrolmenttime)\n ),\n 'completestatus' => $completestatusjskeys[$enrolrec->completestatusid],\n 'completetime' => array(\n 'date' => date('j', $enrolrec->completetime),\n 'month' => date('n', $enrolrec->completetime),\n 'year' => date('Y', $enrolrec->completetime)\n ),\n 'grade' => $enrolrec->grade,\n 'credits' => $enrolrec->credits,\n 'locked' => $enrolrec->locked,\n 'learningobjectives' => array()\n );\n }\n\n // Learning objective information.\n $objectivesql = 'SELECT comp.id as objectiveid,\n grade.id as gradeid,\n comp.idnumber,\n grade.grade,\n grade.locked,\n grade.timegraded\n FROM {'.coursecompletion::TABLE.'} comp\n JOIN {'.pmclass::TABLE.'} pmclass\n ON pmclass.courseid = comp.courseid\n LEFT JOIN {'.student_grade::TABLE.'} grade\n ON grade.completionid = comp.id AND grade.classid = ? AND grade.userid = ?\n WHERE pmclass.id = ?\n ORDER BY comp.id ASC';\n $objectiveparams = array($classid, $userid, $classid);\n $objectivedata = $DB->get_records_sql($objectivesql, $objectiveparams);\n foreach ($objectivedata as $objective) {\n $timegraded = (!empty($objective->timegraded)) ? $objective->timegraded : time();\n $objectiveentry = array(\n 'objectiveid' => $objective->objectiveid,\n 'idnumber' => $objective->idnumber,\n 'grade' => (!empty($objective->grade)) ? $objective->grade : 0,\n 'locked' => (!empty($objective->locked)) ? $objective->locked : 0,\n 'date_graded' => array(\n 'date' => date('j', $timegraded),\n 'month' => date('n', $timegraded),\n 'year' => date('Y', $timegraded)\n )\n );\n\n if (!empty($objective->gradeid)) {\n $objectiveentry['gradeid'] = $objective->gradeid;\n }\n\n $enroldata['learningobjectives'][] = $objectiveentry;\n }\n\n return $enroldata;\n }", "title": "" }, { "docid": "a2c512ef867b7d7851d0436a7845f8d3", "score": "0.53146905", "text": "public function can_enroll_course( $course_id ) {\n\t\t\t$course = learn_press_get_course( $course_id );\n\n\t\t\t// Course is published and not reached limitation\n\t\t\t$can_enroll = ! ! $course && $course->is_publish();// && $course->is_in_stock();\n\n\t\t\tif ( $can_enroll && $course->is_free() && ! $course->is_required_enroll() && ! $course->is_in_stock() ) {\n\t\t\t\t$can_enroll = false;\n\t\t\t}\n\n\t\t\tif ( $can_enroll && ! $course->is_free() && ! $this->has_purchased_course( $course_id ) ) {\n\t\t\t\t$can_enroll = false;\n\n\t\t\t}\n\n\t\t\treturn apply_filters( 'learn-press/can-enroll-course', $can_enroll, $course_id, $this->get_id() );\n\t\t}", "title": "" }, { "docid": "d70b5f577667f2935814a65f6c3188b1", "score": "0.5289526", "text": "public function getUserCoursesById($userId)\n {\n return $this->request('POST', 'admin/users/user/' . $userId . '/courses', [\n 'form_params' => [\n 'admin_token' => $this->_adminToken\n ]\n ]);\n }", "title": "" }, { "docid": "1ad45e8dcc67fa793e3bc7d69cd7650f", "score": "0.5281384", "text": "public function InsertAvalableEnrollment() {\n\t\t$i = 1;\n\t\tforeach ($this->registeredStudent as $student) {\n\t\t\tprint \"$i: $student->id, \". $student->fullName() . \"\\n\";\n\t\t\tself::enrollmentFromStudentCourse($student, $student->registration->language);\n\t\t\tif ($student->registration->culture->description != \"CK\")\n\t\t\t\tself::enrollmentFromStudentCourse($student, $student->registration->culture);\n\t\t\t$i++;\n\t\t}\n\t}", "title": "" }, { "docid": "03768117b2a871f0a556710e8e511370", "score": "0.5271473", "text": "public function actionCreate()\r\n\t{\r\n\t\t$model=new Enroll();\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Enroll']))\r\n\t\t{\r\n \r\n $userid=$_POST['Enroll']['user_id'];\r\n $user=User::model()->findAll(\"username='\" . $_POST['Enroll']['user_id'] . \"'\");\r\n foreach($user as $uid){\r\n $userid=$uid->id;\r\n }\r\n $_POST['Enroll']['user_id']=$userid;\r\n if(!$this->checkDuplicate($userid, $_POST['Enroll']['courseoffer_id'])) {\r\n $connection=Yii::app()->db;\r\n\t\t\t$sql=\"INSERT INTO enroll (user_id,courseoffer_id,completed,notes)\r\n VALUES(:user_id,:courseoffer_id,:completed,:notes)\";\r\n $command = $connection->createCommand($sql);\r\n $command->bindParam(\":user_id\", $_POST['Enroll']['user_id'], PDO::PARAM_STR);\r\n $command->bindParam(\":courseoffer_id\", $_POST['Enroll']['courseoffer_id'], PDO::PARAM_STR);\r\n $command->bindParam(\":completed\", $_POST['Enroll']['completed'], PDO::PARAM_STR);\r\n $command->bindParam(\":notes\", $_POST['Enroll']['notes'], PDO::PARAM_STR);\r\n $command->execute();\r\n $this->redirect(array('index'));\r\n }\r\n \r\n\t\t\tif($model->save())\r\n\t\t\t{\r\n\t\t\t\tYii::app()->user->setFlash('success', Yii::t('main', '{model} added', array('{model}' => Yii::t('enroll', 'Enroll') )) );\r\n\t\t\t\t$this->redirect(array('index'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tYii::app()->user->setFlash('warning', Yii::t('main', '{model} failed to add', array('{model}' => Yii::t('enroll', 'Enroll') )) );\r\n\t\t\t\t$this->redirect(array('index'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "397368d6d2d11b5f76b6e73fa6398542", "score": "0.5260336", "text": "function attendance_get_user_courses_attendances($userid) {\n global $DB, $USER;\n \n $usercourses = enrol_get_users_courses($userid);\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $sql = \"SELECT att.id as attid, att.course as courseid, course.fullname as coursefullname, \n course.shortname as courseshortname, course.startdate as coursestartdate, \n att.name as attname, att.grade as attgrade\n FROM {attendance} att\n JOIN {course} course\n ON att.course = course.id\n WHERE att.course $usql\n ORDER BY coursefullname ASC, attname ASC\";\n\n $params = array_merge($uparams, array('uid' => $userid));\n\n return $DB->get_records_sql($sql, $params);\n\n}", "title": "" }, { "docid": "631feff75ff06545a44311ba53cb940c", "score": "0.5249201", "text": "public function assignCourseByUserId($userId, $courseId)\n {\n return $this->request('POST', 'admin/course/assign', [\n 'form_params' => [\n 'admin_token' => $this->_adminToken\n ]\n ]);\n }", "title": "" }, { "docid": "0221f0b7df1bfe9b14c5bc89f41c67c2", "score": "0.52439487", "text": "function get_enrolled_courses($username) {\n global $DB;\n\n // Preparation de la requete\n $sql = 'SELECT distinct c.id , c.shortname , c.fullname , ula.timeaccess , c.sortorder , cat.path';\n $sql .= ' FROM mdl_course c';\n $sql .= ' LEFT JOIN (mdl_role_assignments ra, mdl_context x, mdl_user u, mdl_user_lastaccess ula, mdl_course_categories cat)';\n $sql .= ' ON u.id=ula.userid AND c.id=ula.courseid WHERE u.id = ra.userid AND x.id = ra.contextid AND cat.id = c.category';\n $sql .= ' AND u.username = ? AND x.instanceid = c.id AND x.contextlevel= 50';\n\n // Execution de la requete\n $courses = $DB->get_records_sql($sql, array($username));\n\n return $courses;\n}", "title": "" }, { "docid": "360d8adab7afd7811d77491d5dcf28ba", "score": "0.52381855", "text": "public function getEnroll() {\n // Show the page\n $action = 0;\n $term_list = Term::all();\n $classification_level_list = ClassificationLevel::all();\n $semester_level_list = SemesterLevel::all();\n $school_year_list = SchoolYear::all();\n $payment_scheme_list = PaymentScheme::all();\n $section_list = Section::select('section.id','section.section_name')->where('is_active','=',1)->get();\n return view('enroll_student.create',compact('action', 'term_list','school_year_list','classification_level_list', 'semester_level_list', 'section_list','payment_scheme_list'));\n }", "title": "" }, { "docid": "c48b174968ac834a0e55274b2623d8b3", "score": "0.52369195", "text": "function getInstructorCourses($userId='')\n {\n $user = $this->find('first', array(\n 'conditions' => array('User.id' => $userId),\n 'contain' => array('Course')\n ));\n return Set::extract($user, '/Course/id');\n }", "title": "" }, { "docid": "2d3d70eccbcd1712c7738a2e6b2ddbf7", "score": "0.5170282", "text": "public function enrollmentLearnv1enrollments_2WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/learn/v1/enrollments\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\LearnEnrollmentMultipleDeleteResponse',\n '/learn/v1/enrollments'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\LearnEnrollmentMultipleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\LearnEnrollmentMultipleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "055ef5e391e4d85e7b7a0b4f4d33cd26", "score": "0.51530975", "text": "private static function get_primary_instructor_course_data($user_id)\n {\n global $DB;\n\n // @TODO: make cou_number variable\n $result = $DB->get_records_sql('SELECT DISTINCT u.id, c.id, c.fullname, c.shortname, c.idnumber, c.category, cc.name FROM {enrol_ues_teachers} t\n INNER JOIN {user} u ON u.id = t.userid\n INNER JOIN {enrol_ues_sections} sec ON sec.id = t.sectionid\n INNER JOIN {enrol_ues_courses} cou ON cou.id = sec.courseid\n INNER JOIN {enrol_ues_semesters} sem ON sem.id = sec.semesterid\n INNER JOIN {course} c ON c.idnumber = sec.idnumber\n INNER JOIN {course_categories} cc ON cc.id = c.category\n WHERE sec.idnumber IS NOT NULL\n AND sec.idnumber <> \"\"\n AND cou.cou_number < \"5000\"\n AND t.primary_flag = \"1\"\n AND t.status = \"enrolled\"\n AND sem.classes_start < ' . self::get_course_start_time() . ' \n AND sem.grades_due > ' . self::get_course_end_time() . ' \n AND u.id = ?', array($user_id));\n\n return $result;\n }", "title": "" }, { "docid": "4573b674170f2e5cb9f8da26dca5b576", "score": "0.51468015", "text": "public function attendCourse($course, $user){\n\t\t$user->courses()->attach($course);\n\t}", "title": "" }, { "docid": "8785209af9b7d81d4ed0200c300bb686", "score": "0.51423234", "text": "public function get_courses_user($userId){\n\n $courses = enrol_get_all_users_courses($userId);\n\n return array_values($courses);\n\n }", "title": "" }, { "docid": "8457fba70d80abde55a974e15c82aa47", "score": "0.51290727", "text": "public function enroll()\n {\n //1- send message to user cpontains the selected user number\n //2_Send notificarion to student to rate\n //3_send motificatiom to teacher tp accept rate from specific student\n //4_edit teacher rating\n\n $teacher_id = request()->teacher_id;\n $teacher_full_name = request()->teacher_full_name;\n $user_id = request()->id;\n //dd( $user_id);\n\n EnrollTeacherNumber::dispatch($teacher_id, $teacher_full_name, $user_id);\n\n // /request()->user()->notify(new RateTeacher($teacher_id, $teacher_full_name));\n\n }", "title": "" }, { "docid": "45082618fd8bd9e7fb9aeadc0a3b79e6", "score": "0.5122682", "text": "public function update($id, UpdateEnrollmentRequest $request)\n {\n request()->validate([\n 'enroll_year',\n 'student_id' => [\n 'required',\n Rule::unique('enrollments')->where(function ($query) use ($request) {\n return $query\n ->whereEnrollYear($request->enroll_year)\n ->whereStudentId($request->student_id);\n }),\n ],\n ]);\n $enrollment = $request->all();\n $student = $this->studentRepository->find($id);\n $enrollment['student_id'] = $student['id'];\n if (empty($enrollment)) {\n Flash::error('Enrollment not found');\n return redirect(route('enrollments.index'));\n }\n $enrollment = $this->enrollmentRepository->create($enrollment);\n $course = Course::where('year_id', '=', $enrollment->year_id)->get();\n $enrollment->courses()->attach($course);\n $courseEnrollments = CourseEnrollment::all();\n foreach ($courseEnrollments as $courseEnrollment) {\n $courseEnrollment->term_id = $courseEnrollment->course->term_id;\n $courseEnrollment->save();\n }\n Flash::success('Enrollment updated successfully.');\n return redirect(route('enrollments.index'));\n }", "title": "" }, { "docid": "d85d58e9c47c45740e195216192b962a", "score": "0.51070875", "text": "public function test_enrol_user_max_enrolled() {\n global $DB;\n\n // Set up the LTI enrolment tool.\n $data = new stdClass();\n $data->maxenrolled = 1;\n $tool = $this->getDataGenerator()->create_lti_tool($data);\n\n // Now get all the information we need.\n $tool = \\enrol_lti\\helper::get_lti_tool($tool->id);\n\n // Enrol a user.\n $result = \\enrol_lti\\helper::enrol_user($tool, $this->user1->id);\n\n // Check that the user was enrolled.\n $this->assertEquals(true, $result);\n $this->assertEquals(1, $DB->count_records('user_enrolments', array('enrolid' => $tool->enrolid)));\n\n // Try and enrol another user - should not happen.\n $result = \\enrol_lti\\helper::enrol_user($tool, $this->user2->id);\n\n // Check that this user was not enrolled and we are told why.\n $this->assertEquals(\\enrol_lti\\helper::ENROLMENT_MAX_ENROLLED, $result);\n $this->assertEquals(1, $DB->count_records('user_enrolments', array('enrolid' => $tool->enrolid)));\n }", "title": "" }, { "docid": "40b03b029dcab87a0133e71574a4122c", "score": "0.50938463", "text": "public function test_enrol_user_enrolment_not_started() {\n global $DB;\n\n // Set up the LTI enrolment tool.\n $data = new stdClass();\n $data->enrolstartdate = time() + DAYSECS; // Make sure it is in the future.\n $tool = $this->getDataGenerator()->create_lti_tool($data);\n\n // Now get all the information we need.\n $tool = \\enrol_lti\\helper::get_lti_tool($tool->id);\n\n // Try and enrol a user - should not happen.\n $result = \\enrol_lti\\helper::enrol_user($tool, $this->user1->id);\n\n // Check that this user was not enrolled and we are told why.\n $this->assertEquals(\\enrol_lti\\helper::ENROLMENT_NOT_STARTED, $result);\n $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid' => $tool->enrolid)));\n }", "title": "" }, { "docid": "3e8c2bf2464ac65e4176aa8b3183a56f", "score": "0.509039", "text": "public function get_grades_course_by_student($courseId, $userId){\n\n $studentGradesTable = \\gradereport_user_external::get_grades_table($courseId, $userId);\n $studentGradesData = $studentGradesTable['tables'][0];\n\n $studentGrades = array();\n\n $studentItems = array();\n $studentItems['userid'] = $studentGradesData['userid'];\n $studentItems['items'] = array();\n\n foreach($studentGradesData['tabledata'] as $keyStudent => $item){\n $studentItem = array();\n\n if(!array_key_exists('leader', $item)){\n $studentItem['itemname'] = $item['itemname']['content'];\n $studentItem['weight'] = $item['weight']['content'];\n $studentItem['grade'] = $item['grade']['content'];\n $studentItem['range'] = $item['range']['content'];\n $studentItem['percentage'] = $item['percentage']['content'];\n $studentItem['feedback'] = $item['feedback']['content'];\n $studentItem['contributiontocoursetotal'] = $item['contributiontocoursetotal']['content'];\n\n array_push($studentItems['items'], $studentItem);\n } \n }\n \n array_push($studentGrades, $studentItems);\n\n return $studentGrades;\n }", "title": "" }, { "docid": "cb022365c5d3626a2eb978f0601e8ab6", "score": "0.50758815", "text": "public function test_enrol_user_enrolment_finished() {\n global $DB;\n\n // Set up the LTI enrolment tool.\n $data = new stdClass();\n $data->enrolenddate = time() - DAYSECS; // Make sure it is in the past.\n $tool = $this->getDataGenerator()->create_lti_tool($data);\n\n // Now get all the information we need.\n $tool = \\enrol_lti\\helper::get_lti_tool($tool->id);\n\n // Try and enrol a user - should not happen.\n $result = \\enrol_lti\\helper::enrol_user($tool, $this->user1->id);\n\n // Check that this user was not enrolled and we are told why.\n $this->assertEquals(\\enrol_lti\\helper::ENROLMENT_FINISHED, $result);\n $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid' => $tool->enrolid)));\n }", "title": "" }, { "docid": "5ff937dae05361b4783ca40913a02039", "score": "0.50749785", "text": "public static function glueserver_get_users_courseid($courseid){\n\t\tglobal $DB,$CFG;\n\t\t//cx.contextlevel = 50 is used to get only the courses\n\t\t//c.sortorder != '1' is used not to include the general course of Moodle\n $sql = \"SELECT usr.*, r.id as r_id, r.name as r_name, r.shortname as r_shortname, r.description as r_description, r.sortorder as r_sortorder\n FROM {$CFG->prefix}user usr\n INNER JOIN {$CFG->prefix}role_assignments ra ON ra.userid = usr.id\n INNER JOIN {$CFG->prefix}context cx ON cx.id = ra.contextid AND cx.contextlevel = '50'\n INNER JOIN {$CFG->prefix}course c ON c.id = cx.instanceid\n INNER JOIN {$CFG->prefix}role r ON r.id = ra.roleid\n WHERE c.id = ?\n \tAND usr.deleted = 0\n ORDER BY usr.id, r_id\";\n $sqlparams = array($courseid);\n $records = $DB->get_recordset_sql($sql, $sqlparams);\n //$records = $DB->get_records_sql($sql, $sqlparams); use the previous function instead of this one because there could be several records with the same usr.id\n foreach($records as $record){\n \t//Check if the user information is already stored\n \tif (!isset($return_records[$record->id])){\n \t\t$return_records[$record->id] = array();\n \t\t$return_records[$record->id][\"user\"] = $record;\n \t}\n \t//Add the role information for the user (a user could have several roles in a course)\n \t$role = new stdClass();\n \t$role->id = $record->r_id;\n \t$role->name = $record->r_name;\n \t$role->shortname = $record->r_shortname;\n \t$role->description = $record->r_description;\n \t$role->sortorder = $record->r_sortorder;\n \t$return_records[$record->id][\"role\"][] = $role;\n }\n //We also include the enrolled users that doesn't have a role\n $sql = \"SELECT usr.*\n FROM {$CFG->prefix}user usr\n INNER JOIN {$CFG->prefix}user_enrolments ue ON ue.userid = usr.id\n INNER JOIN {$CFG->prefix}enrol er ON er.id = ue.enrolid\n INNER JOIN {$CFG->prefix}course c ON c.id = er.courseid\n WHERE c.id = ?\n \tAND usr.deleted = 0\";\n $sqlparams = array($courseid);\n $records = $DB->get_recordset_sql($sql, $sqlparams);\n foreach($records as $record){\n \t//Check if the user information is already stored\n \tif (!isset($return_records[$record->id])){\n \t\t$return_records[$record->id] = array();\n \t\t$return_records[$record->id][\"user\"] = $record;\n \t}\n }\n \n return $return_records;\n }", "title": "" }, { "docid": "282c605f3b776e635d32ad8449f180f9", "score": "0.5064478", "text": "function getInstructorsByCourse($course_id)\n {\n return $this->find(\n 'all',\n array(\n 'conditions' => array('Course.id' => $course_id),\n 'fields' => 'User.*',\n )\n );\n }", "title": "" }, { "docid": "77ca036a0ea3203bec850ea4036fd33a", "score": "0.50615466", "text": "function get_enrolled_courses($candidate_id, $category_id = null) {\n global $USER;\n\n $accessinfo = get_user_access_sitewide($candidate_id);\n\n // find all the courses thats the candidate is currently enrolled in\n $courses = get_user_courses_bycap(\n $candidate_id,\n \"block/assmgr:creddelevidenceforself\",\n $accessinfo,\n true,\n 'c.sortorder ASC',\n array('fullname','category')\n );\n\n $enrolled = array();\n\n if(!empty($courses)) {\n foreach ($courses as $course) {\n // if a category is defined then check this course is in that category\n if(empty($category_id) || $category_id == $course->category) {\n $enrolled[$course->id] = $course;\n }\n }\n }\n\n return $enrolled;\n }", "title": "" }, { "docid": "cbfe94b0610d5c0768f5b531a9ecc4cd", "score": "0.50553375", "text": "public function getUserCourseByCourseId($userId, $courseId)\n {\n return $this->request('POST', 'admin/users/user/' . $userId . '/courses/' . $courseId, [\n 'form_params' => [\n 'admin_token' => $this->_adminToken\n ]\n ]);\n }", "title": "" }, { "docid": "b3d5f9592d12497bf4d6f0eb18052890", "score": "0.5037149", "text": "public function update(UserEducationCourseUpdateRequest $request, $id)\n {\n $data = $request->except(['_token']);\n\n $courseRequest = UserEducationCourse::findOrFail($id);\n\n if (\\Auth::user()) {\n if ($courseRequest['user_id'] !== \\Auth::user()->id) {\n abort(403);\n }\n } else {\n abort(403);\n }\n\n\n $result = $courseRequest->update($data);\n\n if ($result) {\n return back()\n ->with(['success' => 'Заявка успешно обновлена']);\n }\n\n return back()\n ->withErrors(['msg' => 'Ошибка обновления заявки']);\n }", "title": "" }, { "docid": "8afc02cc57fa9f1ec1b684437c8b2540", "score": "0.5012855", "text": "public function coursesAction()\r\n\t{\r\n\t\ttry {\r\n\t\t\tif (! $this->hasACL ( 'employees_module' )) {\r\n\t\t\t\tif($this->_getParam('outputType') == 'json') {\r\n\t\t\t\t\t$this->sendData(array('msg'=>'Not Authorized'));\r\n\t\t\t\t\texit();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$this->doNoAccessError ();\r\n\t\t\t}\r\n\r\n\t\t\t$ret = array();\r\n\t\t\t$params = $this->getAllParams();\r\n\r\n\t\t\tif ($params['mode'] == 'addedit') {\r\n\t\t\t\t// add or update a record based on $params[id]\r\n\t\t\t\tif( empty($params['id']) )\r\n\t\t\t\t\tunset( $params['id'] ); // unset ID (primary key) for Zend if 0 or '' (insert new record)\r\n\t\t\t\t$id = $this->_findOrCreateSaveGeneric('employee_to_course', $params); // wrapper for find or create\r\n\t\t\t\t$params['id'] = $id;\r\n\t\t\t\tif($id){\r\n\t\t\t\t\t// saved\r\n\t\t\t\t\t// reload the data\r\n\t\t\t\t\t$db = $this->dbfunc();\r\n\t\t\t\t\t$ret = $db->fetchRow(\"select * from employee_to_course where id = $id\");\r\n\t\t\t\t\t$ret['msg'] = 'ok';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ret['errored'] = true;\r\n\t\t\t\t\t$ret['msg'] = t('Error creating record.');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if($params['mode'] == 'delete' && $params['id']) {\r\n\t\t\t\t// delete a record\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$course_link_table = new ITechTable ( array ('name' => 'employee_to_course' ) );\r\n\t\t\t\t\t$num_rows = $course_link_table->delete('id = ' . $params['id']);\r\n\t\t\t\t\tif (! $num_rows )\r\n\t\t\t\t\t\t$ret['msg'] = t('Error finding that record in the database.');\r\n\t\t\t\t\t$ret['num_rows'] = $num_rows;\r\n\t\t\t\t} catch (Exception $e) {\r\n\t\t\t\t\t$ret['errored'] = true;\r\n\t\t\t\t\t$ret['msg'] = t('Error finding that record in the database.');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(strtolower($params['outputType']) == 'json'){\r\n\t\t\t\t$this->sendData($ret); // probably always json no need to check for output\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tif($this->_getParam('outputType') == 'json') {\r\n\t\t\t\t$this->sendData(array('errored' => true, 'msg'=>'Error: ' . $e->getMessage()));\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\techo $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a9dd6a1c89e6cc494993c3295ea8a897", "score": "0.5008344", "text": "function performEnrollment(){\n\ttry {\n\t\t$app = \\Slim\\Slim::getInstance();\n\t\t$app->response->headers->set('Content-Type', 'application/json');\n\t\t$request = $app->request();\n\t\t$classof_id = json_decode($request->getBody())->classof_id;\n\t $semester = json_decode($request->getBody())->semester;\n\t $db = new DBManager();\n\t\t$AdminEnroll = new AdminStudentEnrollment($app, $db, $classof_id, $semester);\n\t} catch(Exception $e) {\n\t\t$app->response->setBody(json_encode(array(\"error\"=>array(\"source\"=>\"input\", \"reason\"=>$e->getMessage()))));\n\t\treturn;\n\t}\n\n\t//2. Loop through those subject one by one (sorted by student count วิชาไหนคนลงเยอะก็เอามาคิดก่อน)\n\ttry {\n\t\t\n\t\t$db->beginSet();\n\t\t//check ก่อนว่า status ของ classof - semester นั้นเป็น 1 หรือป่าว ถ้าเป็น 1 ถึงทำ\n\t\t//0 หมายถึงเทอมนั้นไม่ active\n\t\t//1 หมายถึงเทอมนั้น active และเปิดให้ลงทะเบียน\n\t\t//2 หมายถึงทำการเลือกแล้วและรู้ผลแล้ว\n\t\t//3 หมายถึงทำการ schedule การลงทะเบียนไว้แต่ยังไม่เปิดให้ลง\n\t\t//4 หมายถึงปิดการลงทะเบียนด้วย sql schedule (ห้ามลงทะเบียน แต่ยังไม่ทำการเลือก)\n\t\t$semester_state = $AdminEnroll->getSemesterState();\n\t\t$pickmethod_id = $AdminEnroll->pickmethod_id;\n\n\t\tif ($semester_state != 1 && $semester_state != 4){\n\t\t\t$app->response->setBody(json_encode(array(\"status\"=>\"Not in the correct semester state to call this function\")));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$subject_id_sortedby_studentcount = $AdminEnroll->getSubjectArraySortedStudentEnrollment();\n\t\tforeach($subject_id_sortedby_studentcount as $subject_id){\n\t\t\t\n\t\t\t//3. On each subject, perform a Selection which yield results of Students who got accepted and Students who didn't get accepted\n\t\t\tif($pickmethod_id == 1){\n\t\t\t\t//first come first serve\n\t\t\t\t$AdminEnroll->enrollFirstComeFirstServe($subject_id);\n\t\t\t}elseif($pickmethod_id == 2){\n\t\t\t\t//sort by GPA\n\t\t\t\t$AdminEnroll->enrollGPA($subject_id);\n\t\t\t}elseif($pickmethod_id == 3){\n\t\t\t\t//random by rank\n\t\t\t\t$AdminEnroll->enrollRanking($subject_id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//ตอนนี้ได้ TMP_SELECTION ที่มี STANDBY กับ ACCEPTED มาแล้ว\n\t\t//ทำการเกลี่ยคนที่เป็น STANDBY เข้่ามาเป็น ACCEPTED จนกว่าจะเต็ม maxstudent ของวิชานั้นๆ\n\t\tforeach($subject_id_sortedby_studentcount as $subject_id){\n\t\t\t$AdminEnroll->enrollReconcile($subject_id);\n\t\t}\n\t\t\n\t\t//ในกรณีที่มีสิทธิ์ลงทะเบียนได้หลายตัว(เกินกว่า maxcredit) เราจะเลือกให้เค้าลงเฉพาะวิชาที่ priority สูงๆของเค้าเท่านั้น ส่วนวิชาที่ priority ต่ำที่เค้ามีสิธิ์ลงก็จะถูกยกเลิกไป\n\t\t$someuser_dont_have_enough_credit = false;\n\t\t$student_list = $AdminEnroll->listStudentFromTmpSelectionSortedByAcceptedCount();\n\n\t\tforeach($student_list as $student_id){\n\n\t\t\t$student_subject_arr = $AdminEnroll->getStudentSubjectConfirmedList($student_id);\n\t\t\t\n\t\t\t$subject_id_confirmed_list = $student_subject_arr[\"subject_id_confirmed_list\"];\n\t\t\t$subject_id_tobe_removed_arr = $student_subject_arr[\"subject_id_tobe_removed_arr\"];\n\t\t\tif ($student_subject_arr[\"thisuser_dont_have_enough_credit\"]){\n\t\t\t\t$someuser_dont_have_enough_credit = true;\n\t\t\t}\n\t\t\t\n\t\t\t//update status ให้เป็น confirm ในวิชาที่ priority สูงและได้รับเลือก\n\t\t\t$AdminEnroll->markAcceptedHighPrioritySubjectStatusToConfirmed($student_id, $subject_id_confirmed_list);\n\t\t\t\n\t\t\t//ทำการ mark flag ว่าวิชานี้ของคนคนนี้ confirm แล้ว และจะลบวิชาที่ทำให้หน่วยกิตเกินออกไปเลย \n\t\t\tforeach($subject_id_tobe_removed_arr as $subject_id){\n\t\t\t\t//ลบวิชาที่นิสิตคนนี้ไม่ลงทะเบียนออกจาก TMP_SELECTION เพื่อให้โอกาสคนที่ลงทะเบียนได้น้อยมีสิทธิ์ได้เรียน\n\t\t\t\t$AdminEnroll->removeAcceptedLowPrioritySubjectStatus($student_id, $subject_id);\n\n\t\t\t\t//แล้วทำการ reconcile เพื่อดึงคนที่เป็น STANDBY ขึ้นมาเพิ่ม (แทนที่ว่างที่พึ่งถูกลบไป)\n\t\t\t\t$AdminEnroll->enrollReconcile($subject_id);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t//ย้าย data จาก TMP_SELECTION ไปไว้ใน StudentCOnfirmedEnrollment เป็นการ confirm ว่า user ลงทะเบียนแล้ว\n\t\t$AdminEnroll->moveAllConfrimedAcceptedStudentsFromTmpSelectionToStudentConfirmedEnrollment($classof_id, $semester);\n\n\t\t//จบกระบวนการเลือก update table classof_semester ของเทอมนี้ให้เป็น 2 \n\t\t$AdminEnroll->setStatusClassOfSemester(2);\n\n\n\t\t$db->commitWork();\n\t\t$app->response->setBody(json_encode(array(\"status\"=>\"success\")));\n\n\t\t$db = null;\n\n\t} catch(PDOException $e) {\n $app->response->setBody(json_encode(array(\"error\"=>array(\"source\"=>\"SQL\", \"reason\"=>$e->getMessage()))));\n }\n}", "title": "" }, { "docid": "424ba295b03a802d9c03cbf2f81f8e41", "score": "0.5000648", "text": "public function show(Course $course)\n {\n if (!$course->visible()) {\n abort(404);\n }\n\n // Really unhappy about disabling this line.\n // Maybe there is a way to keep it.\n // Currently it would seem that an unauthed user is by default not authorized for any tasks.\n // $this->authorize('view', $course);\n\n\n // Create two arrays that hold all managed users for the current user.\n $enrolledUsers = []; // This will hold all enrolled users.\n $nonEnrolledUsers = []; // This will hold all non enrolled users.\n\n if (\\Auth::user()) {\n // Get the current authed user.\n $currentUser = \\Auth::user();\n // What type of user is this?\n if ($currentUser->isEmployer()) {\n // This user is an employer. Return their employees.\n foreach ($currentUser->employer->employees as $employee) {\n if ($enrollment = $employee->user->competencies->where('course_id', $course->id)->first()) {\n array_push($enrolledUsers, $enrollment);\n } else {\n array_push($nonEnrolledUsers, $employee);\n }\n }\n } elseif ($currentUser->hasAccess(['users-edit-enrollment'])) {\n // This user is an Administrator. Return all users.\n // $enrollments = $course->enrollments; // Get all enrollments\n } else {\n $enrollment = $course->enrollments->where('user_id', $currentUser->id)->first();\n if (count($enrollment) > 0) {\n $enrolledUsers = $enrollment;\n } else {\n $nonEnrolledUsers = $currentUser;\n }\n }\n }\n\n return view('course.show', compact('course', 'enrolledUsers', 'nonEnrolledUsers'));\n }", "title": "" }, { "docid": "363e3005c9693e84c4b873e52edd99fc", "score": "0.49909058", "text": "public function edit(EduCourse $eduCourse)\n {\n //\n }", "title": "" }, { "docid": "de598d8a6471557a53cb27f7cdc38b74", "score": "0.4990335", "text": "function is_the_course_belongs_to_current_instructor($course_id)\n {\n $course_details = $this->crud_model->get_course_by_id($course_id)->row_array();\n if ($course_details['user_id'] != $this->session->userdata('user_id')) {\n $this->session->set_flashdata('error_message', get_phrase('you_do_not_have_right_to_access_this_course'));\n redirect(site_url('user/courses'), 'refresh');\n }\n }", "title": "" }, { "docid": "c6a2392bfaf11bee713001aea36cdb64", "score": "0.4982824", "text": "function isenrolled()\n\t{\n\t\t$selection = $this->DB->database_build_query('USER_REGISTERED');\n\t\t$courses = $this->DB->database_select('users', $selection, array('username' => session_get('username')), 1);\n\t\t\n\t\t//Either an empty set was returned (user is not enrolled) or a database error occurred\n\t\t//It is up to the caller to determine what has happened\n\t\t\n\t\tif($courses == 0) \n\t\t{\n\t\t\treturn $courses;\n\t\t}\n\t\t\n\t\t$courses = explode(',', $courses['enrolled']); //Separate enrolled courses\n\t\t\n\t\tfor($i = 0; $i < count($courses); $i++) //Determine if user is enrolled in THIS course out of list\n\t\t{\n\t\t\tif($courses[$i] == $this->courseID)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false; //User is not enrolled in course\n\t}", "title": "" }, { "docid": "4d65910679fe82fe5f29caab9cba057b", "score": "0.49804896", "text": "function enrolleduserList()\n\t{\n\t\t$this->db->select(\"au.*,acs.name as course_name,ab.name as batch_name,ao.order_date as enrolled_date,ac.country_name,at.state_name,act.city_name\");\n\t\t$this->db->from(\"user as au\");\n\t\t$this->db->join(\"order as ao\",\"au.user_id=ao.user_id\");\n\t\t$this->db->join(\"cart as acrt\",\"ao.cart_id=acrt.id\");\n\t\t$this->db->join(\"cart_item as acitem\",\"acrt.id=acitem.cart_id\");\n\t\t$this->db->join(\"courses as acs\",'acs.course_id=acitem.course_id');\n\t\t$this->db->join(\"batches as ab\",'ab.id=acitem.batch_id');\n\t\t\n\t\t$this->db->join(\"countries as ac\",\"ac.country_id=au.country\",'left');\n\t\t$this->db->join(\"states as at\",\"at.state_id=au.state\",'left');\n\t\t\n\t\t$this->db->join(\"cities as act\",'act.city_id=au.city','left');\n\t\t$this->db->where(\"ao.is_order_complete\",\"1\");\n\t\t$this->db->where(\"ao.payment_status\",\"2\");\n\t\t$this->db->order_by('au.user_id desc');\n\t\t$query = $this->db->get();\n\t\tif($query->num_rows()>0)\n\t\t{\n\t\t\t$enrolled_users = $query->result();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$enrolled_users = array();\n\t\t}\n\t\treturn $enrolled_users;\n\t}", "title": "" }, { "docid": "af2a23189a7c5d20e65191958aa0034e", "score": "0.49801567", "text": "public function evaluateTrainer($course_id) {\n\n return view('front.user.evaluate-course', [\"courseId\" => $course_id, \"api\" => \"trainer\"]);\n }", "title": "" }, { "docid": "cdfe4ddf9a418552931b8b52b47185e2", "score": "0.4975216", "text": "public function enrolledUsers() {\n\t\treturn $this->belongsToMany('oval\\User', \"enrollments\");\n\t}", "title": "" }, { "docid": "e40bb614c1c737074b7e5cb81adb4040", "score": "0.49726492", "text": "public function insertEducation($user_id, object $education)\n {\n\n foreach ($education as $edu) :\n $this->db->query('INSERT INTO education (user_id, degree, place, description, start_date, end_date)\n VALUES(:user_id, :degree, :place, :description, :start_date, :end_date)');\n $this->db->bind(':user_id', $user_id);\n $this->db->bind(':degree', $edu['degree']);\n $this->db->bind(':place', $edu['place']);\n $this->db->bind(':description', $edu['description']);\n $this->db->bind(':start_date', date('Y-m-d', strtotime($edu['start_date'])));\n $this->db->bind(':end_date', date('Y-m-d', strtotime($edu['end_date'])));\n if (!$this->db->execute())\n return false;\n endforeach;\n }", "title": "" }, { "docid": "6fe03e27126314631aff2c34f0443949", "score": "0.49680978", "text": "private function getUserEnrolment() {\r\n $userEnrol = $this->db->get_record('user_enrolments', ['userid' => $this->user->id]);\r\n return $userEnrol;\r\n }", "title": "" }, { "docid": "315fdaf44f115c8cc14c63cf1e952127", "score": "0.49577847", "text": "public function enrollments()\n\t{\n\t\t$this->render('cdac/studentenrollmentlist');\n\t}", "title": "" }, { "docid": "0362b11586a6e9a42435bbc78617dfce", "score": "0.4953062", "text": "function enrollStudent()\n{\n $courseID = $_POST['courseID'];\n foreach ($_POST['studentID'] as $userID) {\n $sql = \"UPDATE studentTaking SET authorized = 1\r\n\t\t\t\tWHERE userID=$userID AND courseID = $courseID\";\n doSQL($sql);\n echo \"Successfully Enrolled Student<br>\";\n }\n}", "title": "" }, { "docid": "0949f84eb0d039327c073f02ffae38cf", "score": "0.49426994", "text": "public function instructor_show($course_id){\n\t\t$course = course_model::get($course_id);\n\t\t$this->view(\"instructor/courses/index\",['course'=>$course]);\n\t}", "title": "" }, { "docid": "73053b397698ba42608f12ca66782834", "score": "0.49358976", "text": "function view_display($data)\n{\n$course=$data[\"courses\"];\necho '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"500\">';\necho '<tr><th width=\"100\">COURSE ID</th><th width=\"700\">COURSE NAME </th><th width=\"250\">Availability</th><th width=\"250\">CREDIT HOURS</th></tr>';\nforeach($course as $content)\n\t\t{\n\t\techo '<tr><td width=\"250\">', $content[\"Course_ID\"] ,'</td>';\n\t\techo '<td width=\"30\">', $content[\"Course_Name\"], '</td>';\n\t\techo '<td width=\"250\">', $content[\"Availability\"], '</td>';\n\t\techo '<td width=\"250\">', $content[\"Credit_Hours\"], '</td>';\n\t\t} \t\necho '</tr>';\necho '</table>';\t\n//enabling the enroll button for the logged in users\nif(!empty($_SESSION[\"user\"]))\n{\t\necho '<form action=\"index.php?option=users&view=enroll\" method=\"POST\" enctype=\"multipart/form-data\">';\necho '<input type=\"hidden\" name=\"course_ID\" value='.$content[\"Course_ID\"].'>';\necho '<input type=\"submit\" value=\"ENROLL\">';\n}\nendContent();\nendofPage();\n}", "title": "" }, { "docid": "ee9bde8543905693db7eb78735798cd5", "score": "0.4919806", "text": "public function course()\n {\n if (request()->course->status == 0) {\n abort(404);\n }\n\n $recommended = request()->course->getRecommended(6);\n $bonusenrollment = 0;\n\n /** @var Collection $userBadges */\n $userBadges = new Collection();\n\n if (user() && user()->id) {\n if (!user_enrolled(request()->course) && request()->course->purchasable == 0) {\n abort(404);\n }\n $bonusenrollment = UserCourse::whereIn('course_id', CourseBonus::select('bonus_course_id')\n ->where('course_id', '=', request()->course->id)\n ->pluck('bonus_course_id'))\n ->where('user_id', '=', user()->id)\n ->count();\n $userBadges = user()->acquiredBadges->where('course_id', request()->course->id);\n } elseif (request()->course->purchasable == 0) {\n abort(404);\n }\n\n return view('pages.classroom.course', compact('recommended', 'bonusenrollment', 'userBadges'));\n }", "title": "" }, { "docid": "62234f293c7eca33b0a78e707d86b951", "score": "0.49077442", "text": "function learn_press_course_enroll_button() {\r\n\t\tlearn_press_get_template( 'single-course/enroll-button.php' );\r\n\t}", "title": "" }, { "docid": "83b8358cbb0210920738fc29d2e52890", "score": "0.4902668", "text": "public function enrollmentHistory(Request $request)\n {\n $user = Auth::user();\n $student = Student::where('user_id', $user->id)->get();\n if ($student->isEmpty()) {\n return $this->respond->withError(Response::HTTP_UNAUTHORIZED, 'student profile is required to perform this operation');\n }\n $enrollments = $student = Student::where('user_id', $user->id)->first()->enrollments;\n return $this->respond->withSuccess(Response::HTTP_OK, $data = $enrollments);\n }", "title": "" }, { "docid": "a5c4abb0925a5ebb5028cd1a1e410366", "score": "0.48806858", "text": "public function actionUpdateCompleted($id)\r\n\t{\r\n if(isset($_GET['cid']))\r\n {\r\n $cid=$_GET['cid'];\r\n $model=$this->loadModel($id, $cid);\r\n \r\n $enrollment = array();\r\n foreach($model as $value)\r\n {\r\n $enrollment['completed'] = $value->completed;\r\n $enrollment['notes'] = $value->notes;\r\n }\r\n }\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Enroll']))\r\n\t\t{\r\n\t\t\t\t$enrollment['completed']=$_POST['Enroll']['completed'];\r\n\t\t\t\t$enrollment['notes']=$_POST['Enroll']['notes'];\r\n\t\t\t\tEnroll::model()->updateAll(array('completed'=>$enrollment['completed'],\r\n\t\t\t\t\t'notes'=>$enrollment['notes']),\r\n\t\t\t\t\t\"user_id=$id AND courseoffer_id=$cid\");\r\n\t\t\t\t\r\n\t\t\t\tYii::app()->user->setFlash('success', Yii::t('main', '{model} updated', array('{model}' => Yii::t('enroll', 'Enroll') )) );\r\n\t\t\t\t$this->redirect(array('index'));\r\n\t\t}\r\n\r\n\t\t$this->render('update',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "ca8ec72e0227049b4a3491d8e0057456", "score": "0.48618606", "text": "public function enroll(Request $request, _SecurityController $_security)\n {\n $paramEnroll = array(\n \"courseid\" => $request->courseid,\n \"userref\" => $request->userref,\n \"groupid\" => $request->groupid,\n \"compCode\" => $request->compCode,\n \"status\" => $request->status\n );\n\n $results = $_security->encryptAndSignData(json_encode($paramEnroll, JSON_UNESCAPED_UNICODE));\n\n $oClient = new httpClient();\n\n try {\n $response = $oClient->request('POST', config('constants._SET_URL.R2'), [\n 'json' => $results\n ]);\n\n return response()->json(['is_success' => true, 'data' => $request->json()->all()], 200);\n\n } catch(RequestException $e) {\n if ($e->hasResponse()) {\n\n return response()->json(json_decode($e->getResponse()->getBody(), true), $e->getResponse()->getStatusCode());\n\n } else {\n\n return response()->json([\"error_msg\" => \"Internal Server Error (R)\"], 500);\n\n }\n }\n /* ===== END R2 (UPDATE ENROLL) ===== */\n }", "title": "" }, { "docid": "771ce8e366498fe7e8bb572eff24319f", "score": "0.48606306", "text": "public function add_education()\n\t{\n\t\t$course = $this->input->post('course');\n\t\t$college = $this->input->post('college');\n\t\t$champion = $this->session->userdata('user_id');\n\t\t$data = array('course'=>$course,'university'=>$college,'champion_details'=>$champion);\n\t\t$this->load->model('main_model');\n\t\t$this->main_model->add_education($data);\n\t\techo \"education details added\";\n\t}", "title": "" }, { "docid": "d05bd2c632384334e81286d26585f77d", "score": "0.48586032", "text": "public static function get_ues_course_data($course_id)\n {\n global $DB;\n\n // @TODO: make cou_number variable\n $result = $DB->get_record_sql('SELECT DISTINCT uesc.department, uesc.cou_number, c.id FROM {enrol_ues_courses} uesc\n INNER JOIN {enrol_ues_sections} sec ON sec.courseid = uesc.id\n INNER JOIN {enrol_ues_semesters} sem ON sem.id = sec.semesterid\n INNER JOIN {course} c ON c.idnumber = sec.idnumber\n WHERE sec.idnumber IS NOT NULL\n AND sec.idnumber <> \"\"\n AND uesc.cou_number < \"5000\"\n AND sem.classes_start < ' . self::get_course_start_time() . ' \n AND sem.grades_due > ' . self::get_course_end_time() . ' \n AND c.id = ?', array($course_id));\n\n return $result;\n }", "title": "" }, { "docid": "9bb004d07ad6ba18b67210def7049621", "score": "0.48384908", "text": "public function inscribe(User $user, Course $course)\n {\n //comprueba si dentro de la relacion de muchos a muchos que tenemos en nuestro curso\n return ! $course->students->contains($user->student->id);\n }", "title": "" }, { "docid": "114ac4560f739706959a40b60746beb3", "score": "0.48312107", "text": "public function evaluation($course)\n {\n Auth::check();\n $course = Course::findOrFail($course);\n CourseController::watchCourse($course);\n\n if (!is_numeric(Input::get(\"score\")))\n return redirect(\"/control-panel/assessments/$course->id/create\")->with([\n \"EvaluationMessage\" => \"يرجى ملئ الدرجه\"\n ]);\n\n $query = Student::query()\n ->whereIn(\"edu_student_id\", EduStudent::query()\n ->where(\"Level\", $course->level)\n ->pluck(\"ID\")\n ->toArray());\n\n if (Input::get(\"tab\") == \"all-remaining-students\")\n $query->whereNotIn(\"id\", Assessment::query()\n ->where(\"course_id\", $course->id)\n ->pluck(\"student_id\")\n ->toArray());\n\n $students = $query->get();\n\n if (count($students) == 0)\n return redirect(\"/control-panel/assessments/$course->id/create\")->with([\n \"CreateAssessmentMessage\" => \"لا يوجد طلاب مسجلين على هذه المادة لتقييمهم\",\n \"TypeMessage\" => \"Error\"\n ]);\n\n //Transaction\n $exception = DB::transaction(function () use ($course, $students) {\n //Store assessment for students\n $score = abs(Input::get(\"score\"));\n foreach ($students as $student)\n Assessment::updateOrCreate(\n ['student_id' => $student->id, 'course_id' => $course->id],\n ['score' => min(abs(Input::get(\"score\")), 25)]\n );\n\n //Store event log\n $target = $course->id;\n $type = EventLogType::ASSESSMENT;\n $event = \"تقييم جميع الطلاب في \" .$course->name . \" هو \" . $score;\n EventLog::create($target, $type, $event);\n });\n\n if (is_null($exception))\n return redirect(\"/control-panel/assessments/$course->id/create\")->with([\n \"CreateAssessmentMessage\" => \"تم تقييم جميع الطلاب\"\n ]);\n else\n return redirect(\"/control-panel/assessments/$course->id/create\")->with([\n \"CreateAssessmentMessage\" => \"لم يتم تقييم جميع الطلاب\",\n \"TypeMessage\" => \"Error\"\n ]);\n }", "title": "" }, { "docid": "5431d764dbf5f20bf99b2b72d4a0e9b2", "score": "0.4824734", "text": "public function real_enrollments()\n {\n return $this->hasManyThrough(Enrollment::class, Course::class)\n ->whereIn('status_id', ['1', '2']) // pending or paid\n ->where('parent_id', null);\n }", "title": "" }, { "docid": "3a7b08c8c92757e82ebd41f51347a9c4", "score": "0.48172212", "text": "public function add_open_instructor($post_user) {\n\t\t\ttry{\n\t\t\tif($post_user) \n\t\t\t{\n\t\t\t\t\t$createdOn = date('y-m-d H:i:s');\n\t\t\t\t\t$updatedOn = date('y-m-d H:i:s');\n\n\t\t\t\t\t$user1_data=array(\n\t\t\t\t\t\t'EducationLevelId' => $post_user['EducationLevelId'],\n\t\t\t\t\t\t'Field' => $post_user['Field'],\n\t\t\t\t\t\t'IsActive' => 1,\n\t\t\t\t\t\t'CreatedBy' => 0,\n\t\t\t\t\t\t'CreatedOn' => $createdOn,\n\t\t\t\t\t\t\"UpdatedBy\" =>0,\n\t\t\t\t\t\t\"UpdatedOn\" => $updatedOn\n\t\t\t\t\t);\t\n\t\t\t\t\t\t$res1=$this->db->insert('tbluserdetail',$user1_data);\n\t\t\t\t\t\t$userDetailId = $this->db->insert_id();\t\n\t\t\t\t\n\t\t\t\tif($res1){\t\n\t\t\t\t$user_data=array(\n\t\t\t\t\t\"InvitedByUserId\"=>$post_user['InvitedByUserId'],\n\t\t\t\t\t\"RoleId\"=>$post_user['RoleId'],\n\t\t\t\t\t\"FirstName\"=>$post_user['FirstName'],\n\t\t\t\t\t\"LastName\"=>$post_user['LastName'],\n\t\t\t\t\t\"Password\"=>md5($post_user['Password']),\n\t\t\t\t\t\"EmailAddress\"=>$post_user['EmailAddress'],\n\t\t\t\t\t\"PhoneNumber\"=>$post_user['PhoneNumber'],\n\t\t\t\t\t\"UserDetailId\" =>$userDetailId, \n\t\t\t\t\t\"Biography\" => $post_user['Biography'],\n\t\t\t\t\t\"IsStatus\"=>0,\n\t\t\t\t\t\"IsActive\"=>$post_user['IsActive'],\n\t\t\t\t\t\"CreatedBy\" =>0,\n\t\t\t\t\t\"CreatedOn\" => $createdOn,\n\t\t\t\t\t\"UpdatedBy\" =>0,\n\t\t\t\t\t\"UpdatedOn\" => $updatedOn\n\t\t\t\t);\t\n\t\t\t\t$res = $this->db->insert('tbluser',$user_data);\n\t\t\t\t$UserId = $this->db->insert_id();\n\t\t\t\t\tif($res){\n\t\t\t\t\t\tif($post_user['Certificate']!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($post_user['Certificate'] as $certificate)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$certificate_data=array(\n\t\t\t\t\t\t\t\t\t'UserId' => $UserId,\n\t\t\t\t\t\t\t\t\t'Certificate' => $certificate,\n\t\t\t\t\t\t\t\t\t'IsActive' => 1,\n\t\t\t\t\t\t\t\t\t'CreatedBy' => $UserId,\n\t\t\t\t\t\t\t\t\t'CreatedOn' => $createdOn,\n\t\t\t\t\t\t\t\t\t'UpdatedBy' => $UserId,\n\t\t\t\t\t\t\t\t\t'UpdatedOn' => $updatedOn\n\t\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t\t\t$res1=$this->db->insert('tblinstructorcertificate',$certificate_data);\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif($res1){\n\t\t\t\t\t\t\t\treturn $UserId;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\t\t\t\t\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\ttrigger_error($e->getMessage(), E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t}", "title": "" }, { "docid": "4e35a9638118202c75446d9b1c551021", "score": "0.48144734", "text": "public function index()\n {\n $user_id = Auth::user()->id;\n $check_ed = Usereducation::where('user_id', $user_id)->count();\n if ($check_ed == 0) {\n return view('user.resume.education.create');\n }\n\n $educations = Usereducation::whereIn('user_id', [Auth::user()->id])->first();\n return view('user.resume.education.index', compact('educations'));\n }", "title": "" }, { "docid": "4bf94b8ec8d10cb04882b6b2b0c32e2c", "score": "0.48106322", "text": "public function run()\n {\n $user = User::find(1);\n foreach (User::all()->where('id', '>', $user->id) as $user) {\n Enrollment::create([\n 'user_id' => $user->id,\n 'course_id' => 1\n ]);\n }\n }", "title": "" }, { "docid": "ff5f8c6f9f9b35a31268c17305391098", "score": "0.48030236", "text": "function learndash_get_course_certificate_link( $course_id, $cert_user_id = null ) {\r\n\t$cert_user_id = ! empty( $cert_user_id ) ? intval( $cert_user_id ) : get_current_user_id();\r\n\r\n\t//if ( ( empty( $course_id ) ) || ( empty( $cert_user_id ) ) || ( !sfwd_lms_has_access( $course_id, $cert_user_id ) ) ) {\r\n\tif ( ( empty( $course_id ) ) || ( empty( $cert_user_id ) ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\t$certificate_id = learndash_get_setting( $course_id, 'certificate' );\r\n\tif ( empty( $certificate_id ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( ( learndash_get_post_type_slug( 'certificate' ) !== get_post_type( $certificate_id ) ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( ( learndash_get_post_type_slug( 'course' ) !== get_post_type( $course_id ) ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\r\n\t$course_status = learndash_course_status( $course_id, $cert_user_id );\r\n\tif ( $course_status != esc_html__( 'Completed', 'learndash' ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif ( ( learndash_is_admin_user() ) || ( learndash_is_group_leader_user() ) )\r\n\t\t$view_user_id = get_current_user_id();\r\n\telse\r\n\t\t$view_user_id = $cert_user_id;\r\n\t\r\n\t$cert_query_args = array(\r\n\t\t\"course_id\"\t=>\t$course_id,\r\n\t);\r\n\r\n\t// We add the user query string key/value if the viewing user is an admin. This \r\n\t// allows the admin to view other user's certificated\r\n\tif ( ( $cert_user_id != $view_user_id ) && ( ( learndash_is_admin_user() ) || ( learndash_is_group_leader_user() ) ) ) {\r\n\t\t$cert_query_args['user'] = $cert_user_id;\r\n\t} \r\n\t$cert_query_args['cert-nonce'] = wp_create_nonce( $course_id . $cert_user_id . $view_user_id );\r\n\t\r\n\t$url = add_query_arg( $cert_query_args, get_permalink( $certificate_id ) );\r\n\treturn apply_filters('learndash_course_certificate_link', $url, $course_id, $cert_user_id);\r\n}", "title": "" }, { "docid": "f292fd268c6aad05c34836236fbc23c8", "score": "0.47883037", "text": "public function enroll(array $request_parameters)\n {\n $request = 'https://loyalty.500friends.com/api/enroll.json?uuid='.Mage::helper('alliance_fivehundredfriends')->getUserId();\n\n foreach ($request_parameters as $key => $value) {\n $request .= '&' . $key . '=' . urlencode($value);\n }\n\n return $this->_dispatch($request);\n }", "title": "" }, { "docid": "25f3b8e854f076fef9f130687ffd2cbb", "score": "0.4787998", "text": "public function index()\n {\n $courses=DB::table('courses')->get();\n\n //print_r($user[0]);\n\n $chapters = [];\n\n for ($i=0; $i < count($courses); $i++) {\n $chapter = DB::table('chapter_info')\n ->where('course_id',$courses[$i]->course_id)->get();\n $chapters[$i] = count($chapter);\n }\n\n $instructors = [];\n\n for ($i=0; $i < count($courses); $i++) {\n $instructor = DB::table('instructors')\n ->where('id',$courses[$i]->instructor_id)->first();\n if ($instructor!=null) {\n $instructors[$i] = $instructor->name;\n }\n else {\n $instructors[$i] = null;\n }\n\n }\n\n return view('index')->with('courses',$courses)\n ->with('chapters',$chapters)\n ->with('instructors',$instructors);\n }", "title": "" }, { "docid": "bdc6d34474b344dde4b7e0c751f6d071", "score": "0.4787509", "text": "function getEnrolledStudentsForList($course_id)\n {\n $this->displayField = 'student_no_with_full_name';\n return $this->find(\n 'list',\n array(\n 'conditions' => array(\n 'Enrolment.id' => $course_id,\n ),\n 'recursive' => 1,\n 'order' => 'User.student_no'\n )\n );\n }", "title": "" }, { "docid": "d8352715f2aee76957fa3286acef6e08", "score": "0.477811", "text": "public function evaluationSkillv1usersuserIdevaluation($lang = null)\n {\n list($response) = $this->evaluationSkillv1usersuserIdevaluationWithHttpInfo($lang);\n return $response;\n }", "title": "" }, { "docid": "df3a01a7afdd0dfff77d3cd7d7104ccd", "score": "0.4774295", "text": "private function getMultipleCoursesEmail($courses, User $user)\n {\n $templating = $this->getContainer()->get('templating');\n $html = $templating->renderResponse(\n 'ClassCentralMOOCTrackerBundle:Review:multiple.courses.inlined.html',array(\n 'courses' => $courses,\n 'loginToken' => $this->getContainer()->get('user_service')->getLoginToken($user),\n 'user' => $user,\n 'baseUrl' => $this->getContainer()->getParameter('baseurl'),\n 'jobType' => $this->getJob()->getJobType(),\n 'unsubscribeToken' => CryptUtility::getUnsubscribeToken( $user,\n UserPreference::USER_PREFERENCE_REVIEW_SOLICITATION,\n $this->getContainer()->getParameter('secret')\n ),\n 'utm' => array(\n 'medium' => Mailgun::UTM_MEDIUM,\n 'campaign' => 'review_solicitation',\n 'source' => Mailgun::UTM_SOURCE_PRODUCT,\n )\n )\n )->getContent();\n\n return $html;\n }", "title": "" }, { "docid": "fb1a2d3f2d673e5caddb5160f1ca7553", "score": "0.47741815", "text": "public function update(Request $request, EduCourse $eduCourse)\n {\n //\n }", "title": "" }, { "docid": "8e199d9eea4709c811720853c19214ee", "score": "0.47709402", "text": "public function enrollUserInClass($username, $classid)\n\t{\n global $db_host, $db_name, $db_user, $db_pass;\n try {\n \n $dbh = new PDO(\"mysql:host=$db_host;dbname=$db_name\", $db_user, $db_pass);\n \n if(!$this->userIsEnrolledInClass($username, $classid))\n {\n $sql = \"INSERT INTO enrollment(username, classid) VALUES('$username', $classid)\";\n $result = $dbh->exec($sql);\n }\n \n $dbh = NULL;\n }catch(PDOException $e){\n echo $e->getMessage();\n }\n\t}", "title": "" }, { "docid": "1ddddf24f3a373c27ca36a7e1f18c5c1", "score": "0.47521514", "text": "function lesson_user_outline($course, $user, $mod, $lesson) {\n global $DB;\n\n global $CFG;\n require_once(\"$CFG->libdir/gradelib.php\");\n $grades = grade_get_grades($course->id, 'mod', 'lesson', $lesson->id, $user->id);\n\n if (empty($grades->items[0]->grades)) {\n $return->info = get_string(\"no\").\" \".get_string(\"attempts\", \"lesson\");\n } else {\n $grade = reset($grades->items[0]->grades);\n $return->info = get_string(\"grade\") . ': ' . $grade->str_long_grade;\n $return->time = $grade->dategraded;\n $return->info = get_string(\"no\").\" \".get_string(\"attempts\", \"lesson\");\n }\n return $return;\n}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "d828936f96f6e659d5ccfc06dc80e433", "score": "0.0", "text": "public function update(LinkRequest $request, int $link)\n {\n $link = Link::find($link);\n $link->title = $request->input('title');\n $link->uri = $request->input('uri');\n $link->cate_id = $request->input('cate_id');\n $link->description = $request->input('description');\n $link->sort = $request->input('sort');\n $link->icon = '';\n $res = $link->saveOrFail();\n if ($res)\n {\n return $this->success('成功');\n } else {\n return $this->error('失败');\n }\n }", "title": "" } ]
[ { "docid": "b8af9491d409a852eeea996523d9e2fa", "score": "0.7265351", "text": "protected function updateResource()\n {\n $this->context->resource->fill($this->context->input);\n $this->applyHooks(BeforeUpdate::class);\n $this->applyHooks(BeforeSave::class);\n $this->context->resource->save();\n $this->applyHooks(AfterSave::class);\n $this->refreshResource();\n }", "title": "" }, { "docid": "352ddad568859b94ee19a4459347b263", "score": "0.71493393", "text": "public function update() {\n $data = array($this->backing);\n $results = json_decode($this->context->make_request(\n $this->resource_type, \"PUT\", strval($this->backing[\"id\"]), \n json_encode($data), NULL, NULL), true);\n $this->backing = $results[0];\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.7058482", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6622888", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c4d757ef327886959b7e0e652b0d54f4", "score": "0.6470769", "text": "private function update(ResourceInterface $resource)\n {\n $this->dispatcher->dispatch(ResourceEvents::PRE_UPDATE, $resource);\n $this->eventfullySave($resource);\n $this->dispatcher->dispatch(ResourceEvents::POST_UPDATE, $resource);\n }", "title": "" }, { "docid": "8103ef1c9a8f0abc99a6caed997962f1", "score": "0.6314408", "text": "public function update($resourceType, $resourceId, array $payload, $parameters = []);", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.6188945", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "577df4a8eca4576fbfbc6c8b72e0277d", "score": "0.6159895", "text": "function update_resource($name, $id, $payload, $query=null)\n{\n # So we will need to do this in a non-REST way.\n\n return send_request(\"$name/$id/edit?$query\", [\n // CURLOPT_CUSTOMREQUEST => \"PUT\",\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => [\"payload\" => json_encode($payload)],\n ]);\n}", "title": "" }, { "docid": "3389492293a758320b4c643143959b53", "score": "0.61516374", "text": "function update( $resource ){\n\n $image_path = asset_dir( 'img\\\\products\\\\') ;\n $image = 'img/products/'.$_FILES['product_image']['name'];\n\n $data = [\n\n \"product_name\" => $_POST['product_name'],\n \"product_description\" => $_POST['product_description'],\n \"product_brand\" => $_POST['product_brand'],\n \"sku\" => $_POST['sku'],\n \"product_type\" => $_POST['product_type'],\n \"updated_at\" => date( 'Y-m-d H:i:s' ),\n\n\n ];\n\n if( ! $_FILES['product_image']['error'] == 4){\n $data['product_image'] = $image;\n }\n\n if(!upload_post_image( $_FILES['product_image'], $image_path )){\n redirect( route( 'product/create?message=1' ) );\n }\n\n if( !patch( 'products', $resource, $data ) ){\n redirect( route( 'product/create?message=1' ) );\n }\n\n //Do Stock Process\n\n $stock_data = [\n\n 'product_id' => where( 'products', \"sku = {$_POST['sku']}\" )[0]['id'],\n 'stock' => $_POST['stock'],\n 'stock_limit' => $_POST['stock_limit'],\n 'created_at' => date( 'Y-m-d H:i:s' ),\n 'updated_at' => date( 'Y-m-d H:i:s' )\n\n ];\n\n if( !insert( 'inventory', $stock_data) ){\n\n redirect( route( 'product/create?message=1' ) );\n\n }\n\n redirect( route( \"product/{$resource}/edit\" ) );\n\n}", "title": "" }, { "docid": "af040437e7fb45157da33c190771f474", "score": "0.6129559", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Resource::getRulesForUpdate($id));\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tif (Input::file('file')){\n\t\t\t$file = Input::file('file');\n\n\t\t\t$extension = $file->getClientOriginalExtension();\n\t\t\t$destinationPath = 'eltdpResources';\n\t\t\t$filename = preg_replace('/\\s+/', '_', $data['name']);\n\t\t\t$uploadSuccess = $file->move($destinationPath, $filename .'.'. $extension);\n\t\t\t\t\n\t\t\tif ($uploadSuccess) {\n\n\t\t\t\t$data['picture'] = Resource::getExtensionType($file, $destinationPath, $filename);\n\n\t\t\t\tif($data['picture']){\n\n\t\t\t\t\t$data['file'] = $destinationPath .'/'. $filename .'.'. $extension;\n\n\t\t\t\t\t$resourceId = $this->resource->create($data)->id;\n\n\t\t\t\t\treturn Redirect::route('resources.show', $resourceId)\n\t\t\t\t\t->with('message', 'Resource saved.');\n\n\t\t\t\t} else {\n\t\t\t\t\tResource::destroy($this->resource->id);\n\t\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('message', 'The file you are trying to upload is not supported.<br> Supported file types are pdf, doc, docx, jpg, gif, bmp, mp3, mp4');\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($Validator)\n\t\t\t\t\t->with('message', 'Please upload a file.');\n\t\t\t}\n\t\t}\n\t\t$resource->update($data);\n\n\t\treturn Redirect::route('resources.index');\n\t}", "title": "" }, { "docid": "8b3aa10c010246b03fd3bd32304c0a11", "score": "0.6052893", "text": "public function update($input, &$resource = null)\n {\n $resource = $this->repo->findOrFail(array_get($input, $this->repo->getKeyName()));\n\n $this->validate(array_filter($input + $resource->toArray()));\n\n return $resource->update($input);\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.5977736", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.5940387", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "8b73dba39ae08dde13c502b11f4a48f0", "score": "0.5901969", "text": "public function update(Request $request, StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5893692", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5893692", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b95c33d6856dbe3d6806b3117503341", "score": "0.5889004", "text": "public function updateEntry (Liquid_Storage_Entry $entry);", "title": "" }, { "docid": "241abe88cb12c84c9ac5ad453b88fdde", "score": "0.5882193", "text": "protected function put()\n {\n $article = ArticleModel::init($this->args['articleId']);\n $this->user->assertArticleAccess($article);\n\n // Read the version to set as current.\n $versionId = trim($this->request->getBody());\n if (!is_numeric($versionId)) {\n $this->response->setStatusCode(400);\n $this->response->setHeader('Content-Type', 'text/plain');\n $this->response->setBody(\"Request body must be the integer ID of the version to promote to current. (text/plain)\");\n return;\n }\n\n try {\n $version = VersionModel::init($this->args['articleId'], $versionId);\n } catch (ResourceException $e) {\n if ($e->getCode() === ResourceException::NOT_FOUND) {\n throw new ResourceException(\n \"Version {$versionId} does not belong to this article.\",\n ResourceException::INVALID_DATA\n );\n }\n throw $e;\n }\n\n // Fail if the passed version is already the current version.\n if ($version->isCurrent) {\n throw new ResourceException(\n \"Version {$version->versionId} is already the current version.\",\n ResourceException::CONFLICT\n );\n }\n\n // Point the article to the new version.\n $article->setCurrentVersion($version);\n\n // Out the article.\n $this->response->setStatusCode(200);\n $this->response->setHeader('Content-Type', 'application/json');\n $this->response->setBody(json_encode($article));\n }", "title": "" }, { "docid": "9455f5aa9c989bb04e6b6d3e1b419576", "score": "0.58647746", "text": "public function update()\n {\n $this->beginAction('update');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->gatherInput();\n $this->validateInput(true);\n $this->updateResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "1d0bb5f7bf30b0c60548dedd141eeeaf", "score": "0.58233744", "text": "public function update(ProductFormRequest $request, Products $product): ProductsResource\n {\n $picture = $request->picture;\n $name = str_slug($request->name).'update_'.time();\n $folder = '/uploads/images/';\n $filePath = \"http://localhost:8888/cours-laravel/Wolfgang/public\". $folder . $name . '.' . $picture->getClientOriginalExtension();\n $this->uploadOne($picture, $folder, 'public', $name);\n\n $product->update(\n [\n 'name' => $request->name, \n 'reference' => $request->reference, \n 'picture' => $filePath, \n 'price' => $request->price, \n 'description' => $request->description,\n ]\n );\n\n return new ProductsResource($product);\n }", "title": "" }, { "docid": "e0f169404ca14678f1031bc947789344", "score": "0.5777475", "text": "public function update(Request $request, $id)\n {\n $codeno = \"JPM-\".rand(11111,99999);\n $item=Item::find($id);\n $name=$request->name;\n $newphoto=$request->photo;\n //$codeno=$request->codeno;\n $oldphoto=$item->photo;\n $price=$request->price;\n $discount=$request->discount;\n $description=$request->description;\n $subcategoryid=$request->subcategoryid;\n $brandid=$request->brandid;\n\n if($request->hasFile('photo'))\n {\n $imageName=time().'.'.$newphoto->extension();\n $newphoto->move(public_path('images/item'),$imageName);\n $filepath='images/item/'.$imageName;\n if (\\File::exists(public_path($oldphoto))) \n {\n (\\File::delete(public_path($oldphoto)));\n }\n }\n else\n {\n $filepath=$oldphoto;\n }\n\n $item->name=$name;\n $item->photo=$filepath;\n $item->codeno = $codeno;\n $item->price=$price;\n $item->discount=$discount;\n $item->description=$description;\n $item->subcategory_id=$subcategoryid;\n $item->brand_id=$brandid;\n\n $item->save();\n\n $message='Item updated successfully.';\n $status=200;\n $result= new ItemResource($item);\n\n\n $response=[\n 'status'=>$status,\n 'success'=>true,\n 'message'=>$message,\n 'data'=>$result\n ];\n return response()->json($response);\n\n }", "title": "" }, { "docid": "f509eafdef1f97698c6b5a41f544527b", "score": "0.5767598", "text": "public function update($id, Request $request)\n {\n $resource = Resource::find($id);\n $resource->name = $request->name ? $request->name : $resource->name;\n $resource->title = $request->title ? $request->title : $resource->title;\n $resource->list_of_skills = $request->list_of_skills ? $request->list_of_skills : $resource->list_of_skills;\n $resource->availability_calendar = $request->availability_calendar ? $request->availability_calendar : $resource->availability_calendar;\n $resource->pay_rate = $request->pay_rate ? $request->pay_rate : $resource->pay_rate;\n $resource->save();\n return response('Resource Updated successfully', 200)\n ->header('Content-Type', 'text/plain');\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5754183", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5749277", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.573585", "text": "public function setResource($resource);", "title": "" }, { "docid": "4bbafe0c3491a2c2b0b9d5b2f03867a1", "score": "0.5730344", "text": "private function put($resource, $json_old_resource, $jsonstring_new_resource)\n\t{\n\t\tif ($resource !== $json_old_resource->url) {\n\t\t\tError::httpApplicationError('resource mismatch, something very wrong did happen.');\n\t\t}\n\t\t\n\t\t$new = json_decode($jsonstring_new_resource);\n\t\tif ($new === NULL) {\n\t\t\tError::httpApplicationError('Resources do not match');\n\t\t}\n\t\t\n\t\t// attributes set by backend (override transmitted content)\n\t\t$o = (object)array();\n\t\t$o->url = $resource;\n\t\t$o->version = $json_old_resource->version + 1;\n\t\t\n\t\t$o->type = $json_old_resource->type;\n\t\t$o->owner = $json_old_resource->owner;\n\t\t$o->creationDateTime = $json_old_resource->creationDateTime;\n\t\t$o->editor = Authentication::getInstance()->getUserId();\n\t\t$o->editionDateTime = date('c', time());\n\t\t$o->active = TRUE;\n\n\t\t// FIXME TODO: check that the announced type is the same as the one of old resource!!!!\n\t\t\n\t\t$v = new Validator();\n\t\t$o = $v->validate($jsonstring_new_resource, $o);\n\t\t\n\t\t// best effort transaction: if a new PUT, will simply delete the last created, but that's alright.\n\t\t// FIXME but at some point active = TRUE for 2 samples !!! ==> we should NEVER rely on 'active' only to get latest version\n\n\t\t$new = Database::getInstance()->create($o);\n\t\tif (!$new) {\n\t\t\tError::httpConflict(); // FIXME duplicate update?\n\t\t}\n\t\t$this->delete($resource, $json_old_resource->version);\n\t\t\n\t\t// return the newly created object with status 201\n\t\t// entity body contains the new resource,\n\t\t// Location header contains canonical path to resource\n\t\t// FIXME ?? header('Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\theader('Content-Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\tprint $new;\t\n\t}", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.57248604", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "af1ecfb517bec3e1060c710281cb6693", "score": "0.5720168", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'min:6|required',\n 'image' => 'required',\n 'price' => 'required|integer|min:0',\n 'description' => 'required',\n 'stock' => 'required|integer|min:0'\n ]);\n\n $product = Product::findOrFail($id);\n $input = $request->input();\n\n if($request->file('image')){\n if(Storage::exists('public/picture/product/'.$product->image)){\n Storage::delete('public/picture/product/'.$product->image);\n }\n\n $path = $request->file('image')->store('public/picture/product');\n $input['image'] = str_replace('public/picture/product/', '', $path);\n\n }\n\n $product->fill($input)->save();\n\n return redirect()->route('product.show', $id);\n\n }", "title": "" }, { "docid": "637268e654cd5d14f2255e7524a211c5", "score": "0.5714285", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\tif (!$this->has($path)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $this->write($path, $resource, $config);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0796347760b32b6ecbcbd8ff6bb30bbc", "score": "0.57009417", "text": "public function update(Request $request)\n {\n //\n $old = store::find($request['id']);\n $bol = 0;\n\n if ($old['file_path'] == $request['file'] || $request['file'] == null) $bol = 0;\n else $bol++;\n\n\n $img_name = $old['file_path'];\n\n if ($bol > 0) {\n $ex = $request->file->getClientOriginalExtension();\n $img_name = time() . '.' . $ex;\n $request->file->move(public_path('images'), $img_name);\n }\n\n $old->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'discount' => $request->discount,\n \"file_path\" => $img_name,\n ]);\n session()->flash('Edit', 'T-Shirt Edited');\n $store = store::all();\n return redirect('/store');\n }", "title": "" }, { "docid": "5435b173692212577be953865689438e", "score": "0.5695965", "text": "public function update($id, $data) {// sanitize the data\n\n $resource = $this->model->find($id);\n\n if ($resource->update($data)) { return $resource; }\n return false;\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.56933486", "text": "public function update($object);", "title": "" }, { "docid": "709be3333b89873d9e90b19464c68b23", "score": "0.56799144", "text": "public function update($id)\n\t{\n\t\t$input = Input::only('title', 'link', 'description', 'level');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer'\n\t\t];\n\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = Resource::find($id);\n\t\t\t\n\t\t\tif (Auth::id() !== ($resource->user_id))\n\t\t\t{\n\t\t\t\treturn Redirect::back()->withInput()->withFlashMessage('You cannot edit this resource');\n\t\t\t}\n\n\t\t\t$resource->title = Input::get('title');\n\t\t\t$resource->link = Input::get('link');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->save();\n\n\t\t\t// redirect\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('The resource was successfully edited!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5676235", "text": "public function update($data);", "title": "" }, { "docid": "127397632ca2d2e221079c5f52aca86b", "score": "0.56753486", "text": "public function update(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5673924", "text": "public function put($data);", "title": "" }, { "docid": "aa791f30f13ec2f303130ddbd0ce5da7", "score": "0.5672328", "text": "public function update ($object);", "title": "" }, { "docid": "3003ecf965cfc6406e1202af1d9d00b1", "score": "0.56502384", "text": "public function update(Request $request,$id)\n {\n $DatosServicio=request()->except(['_token','_method']);\n if($request->hasFile('foto'))\n {\n $servicios = servicio::findOrFail($id); //verifica que id exista\n Storage::delete('public/'.$servicios->foto); //borra la foto que esta en storage\n $DatosServicio['foto']=$request->File('foto')->store('uplouds','public');\n }\n\n\n servicio::where('id','=',$id)->update($DatosServicio);\n\n $servicios = servicio::findOrFail($id);\n return view('Servicios.editar',compact('servicios'));\n }", "title": "" }, { "docid": "a348f53b5017f28ba6a056a9e2e947dd", "score": "0.5642063", "text": "public function update($id, EditResourceRequest $request)\n {\n $slug = str_slug($request->get('name'), \"-\");\n $rc_item = Rc_item::findOrFail($id);\n\n $rc_item ->update([\n 'name'=> $request->get('name'),\n 'slug' =>$slug,\n 'cat_id'=>$request->get('cat_id'),\n 'img_name'=> $request->get('image_name'),\n 'img_ext'=> $request->file('image')->getClientOriginalExtension(),\n 'download_link'=>$request->get('download_link')\n ]);\n\n $file = $request->image;\n\n if(!empty($file)){\n $rc_item->img_name = $request->get('image_name');\n $rc_item->img_ext = $request->file('image')->getClientOriginalExtension();\n\n $image = $rc_item->img_name . '.' . $rc_item->img_ext;\n $rc_item->save();\n }\n\n if(!empty($file)){\n\n File::delete(public_path($this->imagePath) .$image);\n File::delete(public_path($this->thumbnailPath) . $image);\n $this->saveImage($file, $image);\n }\n\n return redirect()->back()->with('success', 'Successfully Updated!');\n }", "title": "" }, { "docid": "880715ba5af0affb767965ac42e71574", "score": "0.5638833", "text": "public function update()\n {\n // Temporary cheaty way, should see if a more effictient way is\n // available\n $this->storage->deleteLink($this->id); // Cannot have removeAllNodes called\n $this->save();\n }", "title": "" }, { "docid": "e49cdd26e7843d77b4d5140e3330abc9", "score": "0.56378525", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n\n $currentPhoto = $product->image;\n\n if($request->image != $currentPhoto){ // if there is different image\n\n $extension = explode('/', mime_content_type($request->image))[1];\n $name = time().rand().'.'.$extension;\n\n // image intervention package\n // instead of import Image we use \\\n \\Image::make($request->image)->save(public_path('img/products/').$name);\n\n $request->merge(['image' => $name]);\n\n $productImage = public_path('img/products/'.$currentPhoto); //Replace the old photo with the new\n if(file_exists($productImage)){\n @unlink($productImage); //unlink delete the photo\n }\n }\n\n $product->update($request->all());\n }", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.56210417", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "c4427773d8f9c02f5ada5a766d802347", "score": "0.5618785", "text": "function sharedresource_update_instance($sharedresource) {\n global $CFG;\n\n $sharedresource->type = 'file'; // Just to be safe\n $res = new sharedresource_base();\n\n return $res->update_instance($sharedresource);\n}", "title": "" }, { "docid": "881827b74625a92ff5b0b94e03819446", "score": "0.56133956", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n if ($request->hasFile('photo')) {\n $requestData['photo'] = $request->file('photo')\n ->store('uploads', 'public');\n }\n\n $product = Product::findOrFail($id);\n $product->update($requestData);\n\n return redirect('products')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "707dd142800f64b09c09c11325fccd78", "score": "0.5605409", "text": "abstract function update($identifier);", "title": "" }, { "docid": "7b0c8cb2764c13fdb98933dbc69be738", "score": "0.5599271", "text": "public function update(Request $request, $id)\n {\n $newResource = resources::find($id);\n if($request->input('name')){\n $newResource->name = $request->input('name'); \n }\n if($request->input('description')){\n $newResource->description = $request->input('description'); \n }\n if($request->input('status')){\n $newResource->status = $request->input('status'); \n }\n if($request->input('exp_date')){\n $newResource->exp_date = $request->input('exp_date');\n }\n if($request->input('price')){\n $newResource->price = $request->input('price');\n }\n if($request->input('status')){\n $newResource->status = $request->input('status');\n }\n \n $newResource->save();\n\n return back()->with('success','Machinery Successfully Updated!');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.5568501", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5562276", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5562276", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5562276", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5562276", "text": "public function update($id, $data);", "title": "" }, { "docid": "359d84c7d511ae4b3f898ca4163e1aaf", "score": "0.55507976", "text": "public function update(Request $request, $id)\n {\n $this->validateData();\n// Update plan\n $article = Article::findOrFail($id);\n $article -> name = $request -> input('name');\n $article -> intro = $request -> input('intro');\n $article -> text = $request -> input('text');\n\n\n if ($request->hasFile('image')) {\n\n// Get file name with extention\n $fileExtention = $request -> file('image') -> getClientOriginalName();\n// Get just file name\n $filename =pathinfo($fileExtention,PATHINFO_FILENAME);\n// Get just ext\n $extention = $request -> file('image') -> getClientOriginalExtension();\n $filenameToStore = $filename.'_'.time().'.'.$extention;\n $path = $request -> file('image') -> storeAs('public/img/articles',$filenameToStore);\n\n Storage::delete('public/img/articles/' . $article->image);\n\n $article -> image = $filenameToStore;\n }\n\n $article -> save();\n\n if($request -> input('partner-name') != ''){\n\n $partner = Partner::where('name',$request -> input('partner-name')) -> get();\n\n if($partner != null){\n $article -> partners() -> attach($partner[0]->id);\n }\n }\n\n\n\n return redirect('/articles/'.$article->id)->with('success','ArticleResource is updated');\n }", "title": "" }, { "docid": "9c815957f561d5473f845dd4d5b8d599", "score": "0.5550475", "text": "public function update(Request $request, $id)\n {\n $slider = \\App\\Slider::where('id',$id)->first();\n $slider->firstline = $request->firstline; \n $slider->secondline = $request->secondline; \n $slider->thirdline = $request->thirdline; \n $slider->status = $request->status; \n $slider->row_order = $request->row_order;\n if($request->hasFile('photo')) {\n $slider->photo = $request->file('photo')->store('uploads'.date('Y-m-d')); \n }\n $slider->save();\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "d9b6fe99056043df5723394c78be7f97", "score": "0.5544291", "text": "public function update(Request $request, $id)\n {\n //\n $slider = Slider::find($id);\n //$this->authorize('pass', $pagina);\n\n $slider->fill($request->all())->save();\n $path = Storage::disk('public')->put('img-sliders', $request->file('img'));\n $slider->fill(['img' => asset($path)])->save();\n\n return redirect()->route('adminsliders.edit', $slider->id)\n ->with('info', 'Slider actualizado con éxito');\n }", "title": "" }, { "docid": "8ec34e0e6c475b60660d5237f61fb967", "score": "0.554363", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $data = $request->all();\n\n $data['slug'] = \\Str::slug($data['name']);\n $data['user_id'] = auth()->user()->id;\n\n if(isset($data['foto'])){\n $data['foto'] = Storage::disk('public')->putFile('media', $data['foto']);\n }\n\n $product->update($data);\n\n return redirect()->route('design.index')->with('success','Berhasil !');\n }", "title": "" }, { "docid": "ff8620d972e560c355108f1adf752347", "score": "0.5535668", "text": "public function update(Request $request, $id)\n {\n\n $validator = Validator::make( $request->all(), [\n 'name' => 'required|max:100|string',\n 'description' => 'required|max:100|string',\n 'selectedfield' => ['required', Rule::in(['field1', 'field2'])],\n 'availability' => ['required', Rule::in(['0', '1'])],\n ]);\n\n if ( $validator->fails() ) {\n return response()->json([\n 'data' => [\n 'success' => FALSE,\n 'errors' => $validator->errors(),\n ]\n ]);\n }\n\n $device = Device::find($id);\n $device->name = $request->name;\n $device->description = $request->description;\n $device->field = $request->selectedfield;\n $device->availability = $request->availability;\n\n if(isset($request->dev_image)){\n unlink(public_path('storage/'.$device->id.'/'.$device->image));\n $image = $request->get('dev_image');\n $image_name = time().'.'.$request->dev_image->extension();\n $request->dev_image->move(public_path('/storage/'.$device->id), $image_name);\n $device->image = $image_name;\n }\n \n $device->save();\n\n $device->image = '/public/storage/'.$device->id.'/'.$device->image;\n\n return response()->json([\n 'success' => TRUE,\n 'data' => $device,\n 'message' => \"Device Updated\"\n ]);\n }", "title": "" }, { "docid": "0b66ea137462c4641492a24a6cd276fe", "score": "0.55349684", "text": "public function update(Request $request, $id)\n {\n try {\n DB::beginTransaction();\n\n $product = $this->queryProduct($id);\n\n $product->name = $request->name;\n $product->description = $request->description != null ? $request->description : null;\n $product->is_prescription = $request->is_prescription;\n $product->image_path = null; // for now\n $product->price = $request->price;\n\n $product->save();\n\n ProductPriceHistory::create(array(\n 'product_id_fk' => $product->product_id,\n 'price' => $request->price\n ));\n\n\n if($request->quantity != null) {\n $productInventory = ProductInventory::where('product_id_fk', '=', $product->product_id)\n ->first();\n\n $productInventory->previous_value = $productInventory->current_value;\n $productInventory->current_value += (int) $request->quantity;\n\n $productInventory->save();\n }\n\n\n DB::commit();\n\n return response()->json(array(\n 'message' => 'Product successfully updated!'\n ));\n } catch(QueryException $ex) {\n DB::rollBack();\n\n return response()->json(array(\n 'message' => 'Product update failed!'\n )); \n }\n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.553154", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "a60f40542a713142fac35050b8cc0c57", "score": "0.55304426", "text": "public function update(Request $request, $id)\n {\n $photo = Photo::find($id);\n $photo->album_id = $request->get(Photo::ALBUM_ID);\n $photo->title = $request->get(Photo::TITLE);\n $photo->url = $request->get(Photo::URL);\n $photo->thumbnail_url = $request->get(Photo::THUMBNAIL_URL);\n $photo->save();\n return new PhotoResource($photo);\n }", "title": "" }, { "docid": "6635eff0e783df96c39328a1351c17ab", "score": "0.5516072", "text": "public function update( $object );", "title": "" }, { "docid": "89c360360421e2cdcc1017ccb99a7828", "score": "0.55125517", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n\n if ( ! $product)\n {\n return $this->recordNotFound();\n }\n\n $validator = Validator::make($request->all(), array_merge(\n [\n 'sku' => 'string|between:8,14|unique:products,sku,'.$product->id.',id'\n ],\n Product::$update_rules\n ));\n\n if($validator->fails()){\n return response()->json($validator->errors(), 400);\n }\n\n $input = $request->all();\n $image_url = $product->image;\n $product->fill($input);\n\n if($request->has('image')){\n Storage::disk('public')->delete('products/'. basename($image_url));\n $uploadFolder = 'products';\n $image = $request->file('image');\n $image_uploaded_path = $image->store($uploadFolder, 'public');\n $product->image = Storage::disk('public')->url($image_uploaded_path);\n }\n\n $product->save();\n\n return response()->json([\n 'message' => 'Product successfully updated',\n 'product' => $product\n ]);\n }", "title": "" }, { "docid": "7614f731038f3fe7cc7be19a770b8134", "score": "0.5511829", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|string|max:100',\n 'description' => 'required|string',\n 'categorie_id' => 'integer',\n 'sizes.*' =>'integer',\n 'url_image' => 'image|max:3000',\n 'code' => 'in:standard,solde',\n 'price' => 'required|numeric',\n 'reference' => 'required|alpha_num',\n \n ]);\n\n\n $product = Product::find($id);\n $product->update($request->all());\n $product->size()->sync($request->sizes);\n\n $im = $request->file('picture');\n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n }\n\n return redirect()->route('product.index')->with('message', 'Succès de la mise à jour');\n }", "title": "" }, { "docid": "66d083bb11d3019d16e02973863d6967", "score": "0.5506868", "text": "public function update(Request $request, Asset $asset)\n {\n }", "title": "" }, { "docid": "0a5b062a5dceb2e06835dd93b36cb7c2", "score": "0.55024505", "text": "public function update(Request $request, $id)\n { \n if($request->image){\n $imageName = basename($request->image->store(\"public\"));\n $request['image'] = $imageName;\n }\n Product::find($id)->update($request->all());\n session()->flash('msg', \"s: Product Updatedd successfully \");\n return redirect(route(\"products.index\"));\n }", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.55018187", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.5497986", "text": "public function update($id);", "title": "" }, { "docid": "cd61f7dfb166b27b13e2e27a951d1df3", "score": "0.5494817", "text": "public function updateObject($objectPath,$content);", "title": "" }, { "docid": "87241a0a9cce48b64ec4be8df8b5485b", "score": "0.54946816", "text": "public function update(Request $request, Product $product) {\n $product->isOwner();\n\n $request->validate([\n 'name' => 'required|max:255',\n 'description' => 'required',\n 'price' => 'required',\n 'stock' => 'required',\n 'discount' => 'required|max:2',\n ]);\n\n $product->name = $request->name;\n $product->detail = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->discount = $request->discount;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "4c918686af4f25ca69e952e282b47c7c", "score": "0.54931283", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => '',\n 'description' => '',\n 'price' => '',\n 'stock' => '',\n 'picture' => ''\n ]);\n\n // Membuat object dari Model Post\n $store = Store::find($id); \n $store->title = $request->input('title');\n $store->desc = $request->input('description');\n $store->price = $request->input('price');\n $store->stock = $request->input('stock');\n $path = 'storage/store_image/'.$store->pic;\n if($request->hasFile('picture')){\n unlink($path);\n $fileNameWithExt = $request->file('picture')->getClientOriginalName();\n $filename = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n $extension = $request->file('picture')->getClientOriginalExtension();\n $filenameSimpan = $filename.'_'.time().'.'.$extension;\n $path = $request->file('picture')->storeAs('public/store_image', $filenameSimpan);\n $store->pic = $request->input('picture');\n }else{\n $filenameSimpan = $store->pic;\n }\n $store->pic = $filenameSimpan;\n\n\n $store->save();\n\n return redirect('/adminstore')->with('success', 'Data telah diubah.');\n }", "title": "" }, { "docid": "944220b7d8dc3f2475ecc0d6f47331b7", "score": "0.5488169", "text": "public function update($id, $data){\n $image = $this->findById($id);\n $this->validation($data);\n $image->fill($data);\n $image->save();\n return $image;\n }", "title": "" }, { "docid": "81ffa33c6a97b616b60b1d4825f6ed56", "score": "0.54749537", "text": "abstract public function update($object);", "title": "" }, { "docid": "3ccd617169cd697bcf05ee458b57ebd6", "score": "0.54733586", "text": "public function update(Request $request, $id)\n {\n\n\n $products = new products;\n $send = $request->all();\n if($request->hasFile('file')){\n $filename = $request->file->getClientOriginalName();\n $path = $request->file->store('storage/uploads','public');\n $send['img'] = $path;\n }\n \n\n \n $p = $products::find($id);\n $p->update($send);\n \n \n \n }", "title": "" }, { "docid": "4febf037679dde1b9296a47a3c708516", "score": "0.546257", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id', $id)->first();\n\n if(!$product){\n return response()->json([\n 'status' => 'false',\n 'message' => 'Product not found'\n ])->setStatusCode(400, \"Product not found\");\n }\n\n $validation = Validator::make($request->all(), [\n 'title' => 'unique:products,title,' . $product->id,\n 'firm' => 'string',\n 'text' => 'string',\n 'image' => 'file|image|mimes:jpg,png|max:3072'\n ]);\n\n if($validation->fails()){\n return response()->json([\n 'status' => 'false',\n 'message' => $validation->errors()\n ])->setStatusCode(400, \"Editing error\");\n }\n\n $image = null;\n if($request->image){\n $image = $request->image->store('transport_images', 'api');\n }\n\n $product->update([\n 'title' => $request->title ? $request->title : $product->title,\n 'firm' => $request->firm ? $request->firm : $product->firm,\n 'text' => $request->text ? $request->text : $product->text,\n 'image' => $image ? 'storage/api/' . $image : $product->image\n ]);\n\n return response()->json([\n 'status' => true,\n 'post' => [\n 'title' => $product->title,\n 'datetime' => $product->updated_at->format('H:i d.m.Y'),\n 'firm' => $product->firm,\n 'text' => $product->text,\n 'tags' => $product->tags,\n 'image' => $product->image\n ]\n ])->setStatusCode(201, 'Successful creation');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.54623044", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "0c9339d032215169c3edaade53ef1825", "score": "0.54555637", "text": "public function update(Request $request, $id)\n {\n $vData = $request->validate([\n 'category_id' => 'required',\n 'title' => 'required',\n 'slug' => 'required',\n 'specs' => 'max:16300',\n 'details' => 'max:16300'\n ]);\n\n $product = Product::whereId($id)->update($vData);\n if($request->hasFile('file')){\n\n $cur_image = Image::where('product_id', $id)->first();\n @unlink($_SERVER['DOCUMENT_ROOT'] . '/'.$cur_image->path);\n\n\n $imageName = time().'.'.request()->file->getClientOriginalExtension();\n request()->file->move(public_path('storage/img/products/'), $imageName);\n $path = 'storage/img/products/'.$imageName;\n \n $image = Image::where('product_id', $id)->first();\n $image->path = $path;\n $image->update();\n\n\n }\n\n return back()->with('success', 'Product updated.');\n }", "title": "" }, { "docid": "53acca1ee81047a19045a47e38ed715c", "score": "0.54540455", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "2744fd02d7abb711d53573d70c4d3888", "score": "0.54540384", "text": "public function update($id)\n {\n $id = $this->filter->sanitize($id, 'int');\n\n try {\n\n $request = $this->request;\n\n $product = Product::findFirstOrFail(\n [\n 'id = ?0', 'bind' => [$id]\n ]\n );\n\n $product->assign(\n [\n 'id' => $id,\n 'name' => $request->getPut('name', 'string', $product->name),\n 'icon' => $request->getPut('name', 'string', $product->icon),\n ]\n );\n\n return $this->response($request, $product, true);\n\n } catch (ResourceNotFoundException $e) {\n return $e->returnResponse();\n }\n }", "title": "" }, { "docid": "24aefd649a6f08879c0683232037d759", "score": "0.54506147", "text": "public function update(Request $request, $id)\n {\n //Handle file upload\n if ($request->hasFile('prod_image')) {\n $filenameWithExt = $request->file('prod_image')->getClientOriginalName();\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n $extention = $request->file('prod_image')->getClientOriginalExtension();\n $fileNameToStore = $filename. '_' .time(). '.' .$extention;\n $path = $request->file('prod_image')->storeAs('public/prod_images', $fileNameToStore);\n \n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n //Update products\n $product = Product::find($id);\n $product->title = $request->input('title');\n $product->description = $request->input('description');\n $product->notetocustomer = $request->input('notetocustomer');\n $product->prod_image = $fileNameToStore;\n $product->save();\n\n return redirect('products/'. $id);\n }", "title": "" }, { "docid": "dd047a60f5212296d1890ab530ebee18", "score": "0.5447584", "text": "public function update($id)\n {\n\n \n $validation = $this->runValidation();\n\n if (request()->ajax()) {\n\n if ($validation->getData()->status == 0) {\n return $validation;\n }\n\n }\n \n $data = $this->request->all();\n \n $resource = $this->model::findOrFail($id);\n if ($this->request->hasFile('url')) {\n\n $data['url'] = Helper::saveImage($this->request->url,\"/$this->basicRoute\");\n }\n\n if ($this->request->hasFile('image')) {\n \n $data['image'] = Helper::saveImage($this->request->image,\"/$this->basicRoute\");\n \n }\n\n $resource->update($data);\n\n toastr()->success(trans('main.saved_successfully'));\n\n if (request()->ajax()) {\n return responseJson(1,trans('main.saved_successfully'),['url'=>route($this->basicRoute . '.index')]);\n }\n\n return redirect()->route($this->basicRoute . '.index');\n }", "title": "" }, { "docid": "c47170ee30d6553b2ef17d9464e431bf", "score": "0.5447333", "text": "public function update(Request $request, $id)\n {\n $file=file_get_contents(public_path().'\\products.json');\n $data=(array)json_decode($file);\n unset($file);\n $filePath=public_path().'\\products.json';\n $found_key = array_search($id, array_column($data, 'id'));\n $data[$found_key]->type=$_REQUEST['type'];\n $data[$found_key]->title=$_REQUEST['title'];\n $data[$found_key]->firstname=$_REQUEST['firstname'];\n $data[$found_key]->mainname=$_REQUEST['mainname'];\n $data[$found_key]->price=$_REQUEST['price'];\n $data[$found_key]->numpages=$_REQUEST['numpages'];\n file_put_contents($filePath, json_encode($data));\n return redirect('product');\n }", "title": "" }, { "docid": "e0201570e4544fdade8ae1ce85d31d37", "score": "0.54455876", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'numeric|required',\n 'reference' =>'string|required'\n \n ]);\n\n $product = Product::find($id); // on recupere dans la BDD le produit correspondant a $id\n\n\n $product->update($request->all()); // mon produit est mis a jour avec toutes les infos recues\n\n $im = $request->file('picture'); // on va chercher la la photo picture\n\n if (!empty($im)) { // si ce dossier n'est pas vide \n\n $link = $request->file('picture')->store('images'); // on enregistre la photo dans le dossier image ( store =secur)\n\n\n $product->update([\n 'url_image' => $link, // je preprend mon produt et le champs url image, j'y assicie le lien link crée = $link = le nom de l'image\n ]);\n }\n \n // on utilisera la méthode sync pour mettre à jour les auteurs dans la table de liaison\n \n\n return redirect()->route('admin.index')->with('message', 'article modifié');\n \n }", "title": "" }, { "docid": "ccfb3d35b44456a2ee9c7ae900beffc7", "score": "0.5439406", "text": "function update( $resource ){\n\n $data = [\n\n 'receipt_number' => $_POST[ 'receipt_number' ],\n 'product_id' => $_POST[ 'product_id' ],\n 'quantity' => $_POST[ 'quantity' ],\n 'unit_price' => $_POST[ 'unit_price' ],\n 'receivable_image' => $_POST[ 'receivable_image' ],\n 'date_received' => $_POST[ 'receipt_number' ],\n\n ];\n\n $result = patch( 'receivables', $resource, $data );\n\n if( !$result ){\n return false;\n }\n\n return true;\n\n}", "title": "" }, { "docid": "6b0d98cb805b9bcb66defa2a25539d3b", "score": "0.54359186", "text": "public function update(Request $request, $id)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'name' => 'required|string|max:30',\n\t\t\t'price' => 'required|string|max:5',\n\t\t\t'release_date' => 'required|date',\n\t\t\t'auther' => 'required|string',\n\t\t\t'retailer' => 'required|string',\n\t\t\t'desc' => 'required|string',\n\t\t\t'ISBN' => 'required|numeric',\n\t\t\t'file' => 'file|image',\n\n\t\t]);\n\n\t\t$getOne = Product::findOrFail($id);\n\n\t\t$getOne->name = $request->input('name');\n\t\t$getOne->price = $request->input('price');\n\t\t$getOne->release_date = $request->input('release_date');\n\t\t$getOne->auther = $request->input('auther');\n\t\t$getOne->retailer = $request->input('retailer');\n\t\t$getOne->desc = $request->input('desc');\n\t\t$getOne->ISBN = $request->input('ISBN');\n\t\tif ($request->hasFile('file') && isset($getOne->pic_index)) {\n\t\t\tStorage::delete('public/books/'.$getOne->pic_index);\n\t\t\t$uploadHelper = $request->file('file');\n\t\t\t$path = $uploadHelper->storeAs('public/books', $uploadHelper->hashName());\n\t\t\t$getOne->pic_path = $path;\n\t\t}\n\t\t$getOne->save();\n\t\treturn redirect()->route('product.index');\n\t}", "title": "" }, { "docid": "d761b550e7c8e095517fead3d3ebe9c1", "score": "0.54355043", "text": "public function update(Request $request, $id)\n {\n $file = File::findOrFail($request->file_id);\n\n $file->id = $request->input('file_id');\n $file->name = $request->input('name');\n\n if ($file->save()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "a96003ebfe5bb93afff05477cd90b813", "score": "0.5432076", "text": "public function update(Request $request, $id)\n {\n //\n \n $homeItem = HomeItem::find($id);\n \n // dd($request->path); \n // $tempPath = $request->file('path');\n // $tempPath = ;\n // die();\n\n $photoName = \"homePhoto_\" . $homeItem->id;\n if($request->file('path') != null)\n $request->file('path')->storeAs('storage/home/',$photoName);\n\n $path = \"storage/home/\" . $photoName;\n \n \n $data = [\n 'title' => $request->title,\n 'description' => $request->description,\n 'path' => $path\n ];\n\n $homeItem->update($data);\n \n return redirect()-> route('admin.home.index');\n \n //\n // HomePhoto homePhoto;\n }", "title": "" }, { "docid": "8286c17eacfe236df6038d5372070538", "score": "0.543183", "text": "public function update(Request $request, $id)\n { $file=Request()->file('picture');\n //validate\n $this->validate($request,[\n 'name'=>'required|max:100',\n //unique:products no me deja regrabar\n 'description'=>'required|max:500',\n 'price'=>'required|numeric',\n 'category_id'=>'required|integer',\n 'stock'=>'required|integer',\n 'purchable'=>'required|boolean'\n ]);\n //recuperar el producto de la DB\n $prod= Product::find($id); \n //save\n $prod->name = $request->name;\n $prod->description = $request->description;\n $prod->price = $request->price;\n $prod->category_id = $request->category_id;\n $prod->stock = $request->stock;\n $prod->purchable = $request->purchable;\n //guardar la imagen\n if($request->hasFile('picture')){\n $nombre= str_slug($prod->name) . '.' .request()->file('picture')->extension();\n $file->storeAs('/public/products/', $nombre);\n //asociar la imagen con el prod\n $prod->picture = $nombre; \n } \n $prod->save();\n //redirect\n return redirect('/admin/products/');\n }", "title": "" }, { "docid": "fa0ae59c9ed5781e236a66291f8f7f6f", "score": "0.54299515", "text": "public function update(StoreProductRequest $request, $id)\n {\n \n }", "title": "" }, { "docid": "e9317165d16f63837cf4020ead9f5bc5", "score": "0.54264057", "text": "public function update(Request $request, $id)\n {\n $validated = $request->validate([\n 'name' => 'required|min:3|max:50',\n 'slug' =>'unique:App\\Models\\Product,slug,'.$id.'|required',\n 'category_id' => 'required',\n 'description' => 'required|min:3',\n 'price' => 'required|numeric',\n 'img' => 'required',\n ]);\n\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->slug = $request->slug;\n $product->category_id = $request->category_id;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->action_price = $request->action_price;\n if($request->recomended == null){\n $request->recomended = false;\n $product->recomended = $request->recomended;\n }\n $product->recomended = $request->recomended;\n\n $product->img = $request->img;\n $product->save();\n\n $product->productRecommended()->sync($request->productRecommended);\n\n\n\n\n return redirect('/admin/product')->with('success', 'Product was Updated!');\n }", "title": "" }, { "docid": "c620c32a9166a55ea3c61d3b0b4a0d35", "score": "0.54242957", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'nama_product' => 'max:255',\n 'harga' => 'max:10',\n \n ]);\n if ($validator -> fails()) {\n return response([\n 'error' => $validator->errors(),\n 'status' => 'Validation Error'\n ]);\n }\n $product = product::find($id);\n if ($product != null){\n $product->update($request->all());\n return response([\n 'data' => new ProductResource($product),\n 'message' => 'Adidas has been updated!'], 202);\n } else {\n return response([\n 'message'=>'No data found!',], 403);\n }\n }", "title": "" }, { "docid": "0a57d4518594a9989e97cec12943deca", "score": "0.54225296", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'storage' => ['required', 'max:255'],\n 'name' => ['required', 'string',]\n ]);\n\n $data['storage'] = $request->input('storage');\n $data['name'] = $request->input('name');\n\n SiloName::where('id', $id)->update($data);\n try {\n CloudSiloName::where('id', $id)->update($data);\n } catch (\\Throwable $th) {\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }", "title": "" }, { "docid": "b0703c31ae5e60c6f79145b52c055770", "score": "0.5418679", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n\t\t\t'slider_large_title' => 'required',\n 'slider_small_title' => 'required',\n\t\t]);\n $requestData = $request->all();\n $slider = Slider::findOrFail($id);\n\n if ($request->hasFile('image')) {\n if (!$request->old_image='') {\n Storage::delete('public/' . $slider->image);\n }\n }\n if ($request->hasFile('image')) {\n $requestData['image'] = $request->file('image')->store('uploads', 'public');\n $setImage = 'storage/'.$requestData['image'];\n $img = Image::make($setImage)->resize(1920, 1000)->save($setImage);\n }else{\n $requestData['image'] = $request->old_image;\n }\n $slider->update($requestData);\n\n Toastr::success('Class updated!', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "a44308ca5a380cae7b7e813b2c9f1a54", "score": "0.5418329", "text": "public function update(ProductRequest $request, $id)\n {\n\n $validatedData = $request->validated();\n $product = Product::find($id);\n if (file_exists($product->image) && $request['image']) {\n unlink($product->image);\n $validatedData['image'] = $this->uploadFile($request, $this->productsPath, 'image');\n }\n $product->update($validatedData);\n return redirect()->back()->with([\"heading\" => stringCutter(20, $request->name), \"message\" => \"Has Been Updated Successfully !\"]);\n }", "title": "" }, { "docid": "dae8a6503505f86c42e3ac3dd124b03f", "score": "0.5416256", "text": "public function update(Request $request, $id)\n {\n $book = Book::findorFail($id);\n $book->book_name=$request->input('book_name'); \n $book->author_name=$request->input('author_name');\n $book->shelf_no=$request->input('shelf_no');\n $book->shelf_image=\"\";\n $book->row_no=$request->input('row_no');\n $book->column_no=$request->input('column_no');\n $book->book_image=\"\";\n $book->book_quantity=$request->input('book_quantity');\n if($book->save()){\n $shelf_image = $request->file('shelf_image');\n if($shelf_image != null){\n $ext = $shelf_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($shelf_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n $book_image = $request->file('book_image');\n if($book_image != null){\n $ext = $book_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($book_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n \n return new BookResource($book);\n \n } \n }", "title": "" }, { "docid": "7ad1378cea665d5004a8344ebd4b6866", "score": "0.54161626", "text": "public function update(Request $request, $id)\n {\n $file = $request->file('image');\n\n $product = Product::where('id',$id)->first();\n if($file == NULL)\n {\n Product::where('id',$id)->update(['name'=>$request->name,'amount'=>$request->amount]);\n }\n else {\n $file_name = uniqid().'_'.$request->image->getClientOriginalName();\n\n $file->move(public_path().'/image/author/',$file_name);\n\n Product::where('id',$id)->update(['image'=>$file_name,'name'=>$request->name,'amount'=>$request->amount]);\n }\n\n History::create(['description'=> Auth::user()->name,\" edited \",\" product \",$product->name],\" as \",$request->name);\n\n return redirect()->route('products.index',['product'=>$id]);\n }", "title": "" }, { "docid": "ee6e8f1b9c68eb99ac3960c72ccc4b79", "score": "0.5414584", "text": "public function update(Request $request, $id)\n {\n \n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->description = $request->description;\n $slider->slider_type = $request->slider_type;\n if ($request->file)\n {\n $file_name = $request->file -> getClientOriginalName();\n $file_name = uniqid().$file_name;\n $file_name = preg_replace('/\\s+/', '', $file_name);\n $file_type = $request->file->getClientOriginalExtension();\n $request->file-> move(public_path().'/admin/upload/sliders',$file_name);\n $file_size = $request->file->getClientSize();\n $file_size = $file_size/1000;\n $file_size = $file_size.' '.'kb';\n $new_path = url('/').'/public/admin/ecommerce/upload/sliders'.$file_name;\n $slider->image_name = $file_name;\n $slider->image_size = $file_size;\n $slider->image_extension = $file_type;\n $slider->image_url = $new_path; \n }\n $slider->update();\n return Redirect()->back()->with('status', 'Slider updated successfully!');\n }", "title": "" }, { "docid": "0e451bd98e5957fbd83c888a6f6c1040", "score": "0.54142237", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::findOrFail($id);\n if($resource->update($request->all()))\n {\n if ($request->hasFile('document')) {\n if(!empty($resource->document))\n {\n Storage::delete($resource->file);\n }\n $file = $request->document;\n $path = Storage::putFile('files/board', $file);\n $resource->file = $path;\n $resource->save();\n }\n Alert::success('Document updated successfully', 'Document Updated');\n }\n else\n {\n Alert::error('Document was not updated. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/portal');\n }", "title": "" }, { "docid": "80fe54605f41c0621ee8786a51d07268", "score": "0.54117686", "text": "public function update(Request $request, $id)\n {\n $supplier = Supplier::find($id);\n $supplier->supplier_code = $request->supplier_code;\n $supplier->supplier_name = $request->supplier_name;\n $supplier->description = $request->description;\n $supplier->image = $request->image;\n \n\n if($request->hasFile('image'))\n {\n $file = $request->image;\n // Lưu tên hình vào column sp_hinh\n $supplier->image = $file->getClientOriginalName();\n \n // Chép file vào thư mục \"photos\"\n $fileSaved = $file->storeAs('public/uploads', $supplier->image);\n }\n\n $supplier->save();\n\n return redirect()->route('backend.supplier.index');\n }", "title": "" }, { "docid": "9c20822df745e41d8d41c20390064ae1", "score": "0.54112726", "text": "public function update(Request $request, $id)\n {\n $found = Supply::findOrfail($request->get('supply_id'));\n $photo=\"\"; \n if($found){\n\n if($request->hasFile('Photo')){\n Storage::delete('public/'.$found->photo);\n $photo = $request->file('Photo')->store('suppliesUploads','public'); \n }\n\n $supplies = [\n 'user_id' => auth()->id(),\n 'name' => $request->get('Name'),\n 'price' => $request->get('Price'), \n 'stock' => $request->get('Stock'), \n 'offer' => $request->get('Offer'),\n 'photo' => $photo \n ];\n\n if(Supply::where('id','=',$found->id)->update($supplies))\n return redirect('supplies')->with('success','Supply updated successfuly');\n else \n return redirect('supplies')->with('error','Something is wrong, try later');\n }\n return redirect('supplies')->with('error','Supply not found, try again'); \n \n }", "title": "" }, { "docid": "13d50b8ba5ae96627a4f7af44881f80e", "score": "0.5411176", "text": "abstract public function updateAction($id, Request $request);", "title": "" }, { "docid": "21e1460ae7fcbf94fd77a17a41f5c7af", "score": "0.54067075", "text": "public function update(Request $request, Product $product)\n {\n\n $business = $product->business_id;\n\n $this->isValid($request);\n\n if ($request->hasFile('img')) {\n $path = $request->file('img')->store('stored-imgs');\n $product->img = $path;\n }\n\n $data = $request->all();\n $product->update($data);\n\n return redirect()->route('business.show', compact('business'));\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5405712", "text": "public function update($id)\n {\n \n }", "title": "" } ]
ca4f17fed2c35e83229e320e4bc7ebd1
_autoload() Add a path to the list of sitespecific paths to search when loading sitespecific classes.
[ { "docid": "f596f8a60cbcd401723b2c9ee21c8ef9", "score": "0.0", "text": "function addClassPath($path,$classname=NULL)\n\t{\n\t\tif (!$path)\n\t\t\t$path = $this->sitepath;\n\t\telseif ($path[0] != DIRECTORY_SEPARATOR)\n\t\t\t$path = $this->sitepath.$path;\n\t\tif ($classname)\n\t\t\t$this->classpath[$classname] = $path;\n\t\telse\n\t\t{\n\t\t\tif (substr($path,-1) != DIRECTORY_SEPARATOR)\n\t\t\t\t$path .= DIRECTORY_SEPARATOR;\n\t\t\t$this->classpath[] = $path;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "486449e9c8bab9988ef82fb013e3f71e", "score": "0.7327932", "text": "public function autoload_files() {\n\t\trequire_once $this->get_class_path();\n\t}", "title": "" }, { "docid": "14db9e841b14e2ca5f1ee5d6e058352a", "score": "0.722159", "text": "private function autoload()\n {\n spl_autoload_register(\n function($class)\n {\n // If class ends with a string \"Controller\"? then load file from controller\n if (preg_match('/Controller$/', $class))\n require_once(\"app/controllers/\" . $class . \".php\");\n else\n require_once(\"app/models/\" . $class . \".php\");\n }\n );\n }", "title": "" }, { "docid": "2411b546a06b3fd215d3c501c2d74b0d", "score": "0.7205496", "text": "function _autoload_require($path)\n{\n\tforeach (glob(dirname(__FILE__).$path) as $class)\n\t{\n\t\tif (!preg_match('/index.php/i', $class))\n\t\t\trequire_once($class);\n\t}\n}", "title": "" }, { "docid": "6ad23ee875a24afed56ec50f1430142c", "score": "0.7144028", "text": "function __autoload($class) {\r\n \r\n $class = strtolower($class);\r\n\r\n\t//if call from within assets adjust the path\r\n $classpath = 'classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t}\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../../classes/class.'.$class . '.php';\r\n\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\t\r\n\t\r\n}", "title": "" }, { "docid": "a1a3ded5e042be803570b9690902ce0d", "score": "0.71333164", "text": "function __autoload($class) {\n \n $class = strtolower($class);\n\t//if call from within assets adjust the path\n $classpath = 'classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\n\t\n\t//if call from within admin adjust the path\n $classpath = '../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t}\n\t\n\t//if call from within admin adjust the path\n $classpath = '../../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\t\n\t \n}", "title": "" }, { "docid": "287b1d4b2e9ed8222f300c5b10cb2bef", "score": "0.7101895", "text": "function __autoload($class) {\n \n $class = strtolower($class);\n\n\t//if call from within assets adjust the path\n $classpath = 'classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\n\t\n\t//if call from within admin adjust the path\n $classpath = '../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t}\n\t\n\t//if call from within admin adjust the path\n $classpath = '../../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\n\t\n}", "title": "" }, { "docid": "83a2d73b6ba124a6bba67895a87a0c2c", "score": "0.71011436", "text": "function __autoload($class) {\n \n $class = strtolower($class);\n\n\t//if call from within assets adjust the path\n $classpath = 'classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\n\t\n\t//if call from within admin adjust the path\n $classpath = '../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t}\n\t\n\t//if call from within admin adjust the path\n $classpath = '../../classes/class.'.$class . '.php';\n if ( file_exists($classpath)) {\n require_once $classpath;\n\t} \t\t\n\t \n}", "title": "" }, { "docid": "b20b4b77c9f16265867b3cc46589a2d6", "score": "0.7029703", "text": "function __autoload($class_name) {\n\n $array_paths = array(\n '/components/',\n '/models/'\n );\n\n foreach ($array_paths as $path) {\n $path = ROOT.$path.$class_name.'.php';\n if(is_file($path)) {\n include_once $path;\n }\n }\n }", "title": "" }, { "docid": "d4fa23e3b8bca724aa4172bf9d451f7b", "score": "0.7007266", "text": "function __autoload($classname) {\n $classname = str_replace('bft_', '', strtolower($classname));\n $path = array(BFT_PATH_BASE.DS.'includes', BFT_PATH_BASE.DS.'locale', BFT_PATH_BASE);\n foreach ($path as $val) {\n if (file_exists($val.DS.$classname.'.php')) {\n require_once $val.DS.$classname.'.php';\n break;\n }\n }\n}", "title": "" }, { "docid": "82eaa50e75c55afbf3ce8be423e268e1", "score": "0.69885373", "text": "function __autoload($class_name){\n\t\n\t$filepath_root = 'class/class.'.strtolower($class_name).'.php';\n\n\tif(file_exists($filepath_root)){\n\t\trequire_once($filepath_root); //include seem to screw things up..\t\n\t}\n\n\t$filepath_folder = '../class/class.'.strtolower($class_name).'.php';\n\n\tif(file_exists($filepath_folder)){\n\t\trequire_once($filepath_folder);\n\t}\n\t$filepath_folder_folder = '../../class/class.'.strtolower($class_name).'.php';\n\t\n\tif(file_exists($filepath_folder_folder)){\n\t\trequire_once($filepath_folder_folder);\n\t}\t\n}", "title": "" }, { "docid": "801d2fbf5c8e1af7d0eb0a6a2bcba96c", "score": "0.6973303", "text": "function __autoload($class)\n{\n\n $class = strtolower($class);\n\n $classpath = 'classes/class.' . $class . '.php';\n if (file_exists($classpath)) {\n require_once $classpath;\n }\n\n $classpath = '../classes/class.' . $class . '.php';\n if (file_exists($classpath)) {\n require_once $classpath;\n }\n\n $classpath = '../../classes/class.' . $class . '.php';\n if (file_exists($classpath)) {\n require_once $classpath;\n }\n}", "title": "" }, { "docid": "1571bc819ceabc936aeeba8b1a0c0264", "score": "0.69535863", "text": "public function autoload()\n {\n // use throw and not to prepend\n spl_autoload_register(array($this,'load'), true, false);\n }", "title": "" }, { "docid": "c1017741df7107577a749fd328a13a76", "score": "0.6939472", "text": "function __autoload($className)\r\n{\r\n $path = str_replace('_', DIRECTORY_SEPARATOR, $className);\r\n $filename = $path . '.php';\r\n foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {\r\n $fullPath = $path . DIRECTORY_SEPARATOR . $filename;\r\n if (file_exists($fullPath)) {\r\n include_once $filename;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "976bcd1b496a9871c85255cbbfe448e2", "score": "0.69246435", "text": "function __autoload($class_name) {\n\n // An array of folders that may be necessary classes\n $array_path = array(\n '/models/',\n '/components/',\n '/controllers/',\n );\n\n // Pass through an array of folders\n foreach ($array_path as $path) {\n\n // Form the name and path of the file with the class\n $path = ROOT . $path . $class_name . '.php';\n\n // If such file exists, connect it\n if (is_file($path)) {\n include_once $path;\n }\n }\n}", "title": "" }, { "docid": "62ff9265886d66a79a77036eb7f9d16d", "score": "0.6912505", "text": "function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}", "title": "" }, { "docid": "107ade8b0362b16c5eb42ebfb85b0448", "score": "0.6862557", "text": "function myautoload($class_name) {\n $classPath = RDIR.'/api/help/MkGalaxy/'.implode('/', explode('_', $class_name));\n if (file_exists($classPath.'.class.php')) {\n include_once $classPath . '.class.php';\n }\n}", "title": "" }, { "docid": "4151a74147f6a9ba5a4f0eb52274cb63", "score": "0.68475646", "text": "function __autoload($classname) {\n\t\n\t$autoloaddirs = array(\n\t\t'src/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/Dumper/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/Filter/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/Lexer/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/Node/',\n\t\t'src/vendor/jade.php/src/Everzet/Jade/Visitor/',\n\t);\n\t\t\n\tforeach ($autoloaddirs as $key => $value) {\n\t\tif (file_exists($value . $classname . '.php')) {\n\t\t\tinclude $value . $classname . '.php';\n\t\t\treturn;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b15fae9d196b68f8020d671e05f8a0a1", "score": "0.68466663", "text": "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"{$ponto}class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b15fae9d196b68f8020d671e05f8a0a1", "score": "0.68466663", "text": "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"{$ponto}class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b15fae9d196b68f8020d671e05f8a0a1", "score": "0.68466663", "text": "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"{$ponto}class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "92fa9cd0b1d8802ed69dc9ac63d7d85c", "score": "0.6844714", "text": "function loadClasses() {\n\t\t//require('Basic/Data.php');\n\t\trequire('Adapter/Icecast.php');\n\t}", "title": "" }, { "docid": "91e518a55f269496f2c77289baa31574", "score": "0.6837858", "text": "public function addAutoLoadPath($classPath)\n\t\t{\n\t\t\tKW_ClassLoader::addClassPath($classPath);\n\t\t}", "title": "" }, { "docid": "baf5a08e2a409e4700210bdb4489c2e8", "score": "0.68304574", "text": "function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}", "title": "" }, { "docid": "6304618550783826e601aa86800e48fb", "score": "0.6820968", "text": "public function autoload($class){ \n \t\tif(!$this->getClassPath($class)){\n\t\t\t$this->scanDirectory(realpath(dirname(__FILE__).'/../extensions'));\t\n\t\t}\n\t\tparent::autoload($class);\n \t}", "title": "" }, { "docid": "97784e6b3c4efce51a27d469ee84508c", "score": "0.6814272", "text": "function pt_autoload($classname)\n{\n if (false !== import(CLASS_PATH.str_replace('\\\\', '/', $classname)))\n return;\n\n // Autoload path of config\n if (config('web.autoload_path'))\n {\n $paths = explode(',', config('web.autoload_path'));\n foreach ($paths as $path)\n if (false !== import($path.$classname))\n return ;\n }\n\n return;\n}", "title": "" }, { "docid": "fc834ed60556545400de3990f7ae553c", "score": "0.68052286", "text": "function __autoload($class_name) \n{\n include 'inc/'.$class_name.'.php';\n}", "title": "" }, { "docid": "62221dfb01d4912ff4f4db71ad653bbf", "score": "0.6803029", "text": "function __autoload($classname)\n{\n if (file_exists(\"../lib/$classname.php\"))\n require_once \"../lib/$classname.php\";\n else if (file_exists(\"../enterprise/$classname.php\"))\n require_once \"../enterprise/$classname.php\";\n}", "title": "" }, { "docid": "1524010ec5de7d579a1c953b8e0a7b80", "score": "0.6779805", "text": "function __autoload($class){\n require_once(\"../classes/{$class}.php\");\n}", "title": "" }, { "docid": "db114d55b08decd925008f26c9d684d3", "score": "0.6771043", "text": "function __autoload($class){\n require('../include/' . strtolower($class) . '.class.php');\n }", "title": "" }, { "docid": "ed3df9f9237fb08ccf5a31043c2bcdfa", "score": "0.6761488", "text": "function my_autoload($class_name)\r\n {\r\n // Directories to look in\r\n // (relative to the current file)\r\n $dirs = [\r\n 'lib/',\r\n ];\r\n\r\n // Try to load class\r\n foreach($dirs as $dir) {\r\n $file = \"$dir$class_name.class.php\";\r\n if(file_exists($file)) {\r\n require_once(\"$file\");\r\n break;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "2d17e61cc524efd2873bde72010e3f96", "score": "0.6759073", "text": "function __autoload($class) {\n require_once \"../class/class.\" . $class . \".php\";\n }", "title": "" }, { "docid": "dff02161480add0a2c1537570568ec83", "score": "0.67560357", "text": "function __autoload($classname) {\n $dr = $_SERVER['DOCUMENT_ROOT'];\n $class = str_replace(\"_\",DIRECTORY_SEPARATOR, $classname);\n if(file_exists(\"${dr}/include/${class}.php\"))\n include \"${dr}/include/${class}.php\";\n else \n throw new Exception(\"Could not load $classname\");\n}", "title": "" }, { "docid": "a939586280c6faea14c313af98dac2d0", "score": "0.67523754", "text": "function __autoload($class)\n{\n\tinclude \"classes/\".$class.\".php\";\n}", "title": "" }, { "docid": "604c3e43876b853ee0527fbe98e097f3", "score": "0.67517364", "text": "public static function autoload ()\n\t{\n\t\tspl_autoload_register (array ('self', '_autoload'));\n\t}", "title": "" }, { "docid": "ee25651fe839a120f8827f42b1c77527", "score": "0.67482257", "text": "function autoload($className)\n{\n $classArray = explode('\\\\', $className); // \n $class = array_pop($classArray); // get last element of array\n $subPath = strtolower(implode(DS, $classArray));\n \n $path = ROOT . DS . $subPath . DS . $class . '.php';\n if(file_exists($path))\n {\n \t require_once($path);\n }\n}", "title": "" }, { "docid": "271af4a481f60dad02a7d9fc81b76966", "score": "0.67395955", "text": "function __autoload($class)\n{\n \n \n \t//Split class name from camel case\n\t$classArray \t= preg_split('/(?<=\\\\w)(?=[A-Z])/', $class);\n\t$isValidRequest = true;\n\t/**\n\t* Controller, Model and views \n\t* will Load from modules\n\t**/\n\t$nameSpace = array('Controller', 'Model', 'View');\n \n\tif($isValidRequest == !empty($classArray))\n\t{\n\t\t$module = '';\n\t\t$other_module = '';\n\t\tif(in_array($classArray[0], $nameSpace))\n\t\t{\n\t\t\t$module = 'project/modules/' . MODULE . '/'; //project modules path\n\t\t\t$other_module = 'modules/'.MODULE.'/';\t//framework modules path\n\t\t}\n\t\t//for the project specific mdoules\n\t\t$classPath \t\t= $module . implode($classArray, '/');\n\t\t$classPath \t\t= strtolower($classPath) . '.php' ;\n\t\t\n\t\t//for the framework modules\n\t\t$otherClassPath \t= $other_module.implode($classArray,'/');\n\t\t$otherClassPath \t= strtolower($otherClassPath).\".php\";\n\t\t\n\t\t//autoinclude project logics and framework libraries.\n\t\t$logicsClassPath \t= 'project/logics/cls_'.strtolower($classPath);\n\t\t$libraryClassPath \t= 'lib/'.strtolower($classPath);\n\n\t\t//Check for class file existance\n\t\tif(file_exists($classPath)) \n\t\t\tinclude_once $classPath;\n\t\telse if(file_exists($otherClassPath))\n\t\t\tinclude_once($otherClassPath);\n\t\telse if(file_exists($logicsClassPath))\n\t\t\tinclude_once($logicsClassPath);\n\t\telse if(file_exists($libraryClassPath)){\n\t\t\tinclude_once($libraryClassPath);\n\t\t}\n\t\telse\t\t\n\t\t $isValidRequest = $isValidRequest && class_exists($class);\n\t}\n \n\tif(!$isValidRequest)\n\t{\n ob_start();\n header('location:' . BASE_URL . 'error' );\n exit;\n\t\tif(ENVIRONMENT == 'LOCAL'){\n\t \t\theader('HTTP/1.x 404 Not Found'); \n\t \t\tPageContext::printPageNotFoundMessage();\t \n\t \t\texit;\n\t\t}\n\t\t \n\t $debugObj\t\t = debug_backtrace();\n $msg = \"<div><ul><li>Class File Inclusion Failed: \".$classPath.\"</li>\";\n foreach($debugObj as $dobj){\n \t\t $msg .= \"<li>\".$dobj['file'].\" : Line \".$dobj['line'].\"</li>\";\n \t\t break;\n }\n $msg .= \"</ul></div>\";\n PageContext::printErrorMessage(\"Logic error\",$msg);\n\n\t\t\n\t\t\n\t\tif(PageContext::$debug)\n\t\t{\n\t\t// new code addded on 16 Oct 2012 by jinson to show independent error page\n\t\t header('HTTP/1.x 404 Not Found'); \n\t\t PageContext::printPageNotFoundMessage();\n\t\t}\n\t\telse \n\t\t{\n\t\t \n\t\t header('HTTP/1.x 404 Not Found'); \n\t\t PageContext::printPageNotFoundMessage();\n\t\t \n\t\t ob_start();\n header('location:' . BASE_URL . 'error' );\n exit;\n\t\t \n\t\t}\n }\n\n}", "title": "" }, { "docid": "089767c52e48e9efe614e93850933a83", "score": "0.67342573", "text": "function __autoload($class){\r\n\trequire_once BASE . \"/libs/$class.php\";\r\n}", "title": "" }, { "docid": "13b4aba8d68137b4246f8924b3cf6cf7", "score": "0.67290723", "text": "function __autoload($class)\n{\n $path = str_replace('_', DIRECTORY_SEPARATOR, $class);\n $path = APP_LIB_PATH . $path . '.php';\n require_once($path);\n}", "title": "" }, { "docid": "83f7df8f35a05f1f3871eda00842c7b6", "score": "0.6724162", "text": "private function includes() {\n\t\trequire_once WST_INCLUDES . '/class-autoloader.php';\n\t}", "title": "" }, { "docid": "528fbe8303d264fc0390565d8a17e2a7", "score": "0.67113245", "text": "function __autoload($Class){\n\t\t$cDir = ['Conn','Helpers','Models']; //A lógica precisou ser mudada para atender também os deiretorios dentor de app, no caso o conn que trabalha o banco, helpers que são as classes auxiliares\n\t\t$iDir = null;\n\t\t\n\t\tforeach($cDir as $dirName):\n\t\t\tif(!$iDir && file_exists(\"./_app/{$dirName}/{$Class}.class.php\") && !is_dir(\"./_app/{$dirName}/{$Class}.class.php\")):\n\t\t\t\t\n\t\t\t\tinclude_once(\"./_app/{$dirName}/{$Class}.class.php\");//\n\t\t\t\t//$iDir = true;\n\t\t\tendif;\n\t\tendforeach;\n\t\tif($iDir):\n\t\t\ttrigger_error(\"Não foi possível incluir {$Class}.class.php\", E_USER_ERROR);\n\t\t\tdie;\n\t\tendif;\n\t}", "title": "" }, { "docid": "b9ae361a31183cea18792004ba1fd59a", "score": "0.6710772", "text": "function nameSpaceAutoload($path)\n {\n if (preg_match('/\\\\\\\\/',$path)) {\n $path = str_replace('\\\\', DIRECTORY_SEPARATOR, $path);\n }\n $parts = explode(DIRECTORY_SEPARATOR, $path);\n $class_name = array_pop($parts);\n if (!empty($parts)) {\n $parts[] = '';\n }\n $class_file = str_replace($class_name[0], strtolower($class_name[0]), $class_name).'.php';\n $class_file_name= str_replace('\\\\',DIRECTORY_SEPARATOR,strtolower(implode(DIRECTORY_SEPARATOR,$parts)).$class_file);\n $class_file_path= (empty($parts)?$this->libraryPath:$this->basePath).$class_file_name;\n\n if (file_exists($class_file_path)) {\n require_once ($class_file_path);\n }\n elseif(count($parts) > 1) {\n $last = array_pop($parts);\n array_splice($parts,1,0,['default']);\n $class_file_name = $this->basePath.str_replace('\\\\',DIRECTORY_SEPARATOR,strtolower(implode(DIRECTORY_SEPARATOR,$parts)).DIRECTORY_SEPARATOR.$class_file);\n\n if (file_exists($class_file_name)) {\n require_once ($class_file_name);\n }\n }\n }", "title": "" }, { "docid": "d052f20930a88190ba6c8b9c5f459ef9", "score": "0.6691859", "text": "function autoloader($class_name)\r\n {\r\n $array_paths = array(\r\n '/models/',\r\n '/components/',\r\n '/controllers/',\r\n );\r\n foreach ($array_paths as $path) {\r\n // Building path\r\n $path = ROOT . $path . $class_name . '.php';\r\n // Require file if exists\r\n if (is_file($path)) {\r\n require_once $path;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b7ad35d1ce5f59652dd9a25197a56965", "score": "0.66877246", "text": "function sys_class_autoload($class_name) \n{\n if(preg_match('/[_]+/', $class_name)) {\n $file = class_for_dir($class_name, SYSTEM . 'classes');\n if( ! $file ) {\n return false;\n }\n }\n else {\n $file = SYSTEM . 'classes' . DIRECTORY_SEPARATOR . $class_name. EXT;\n if( file_exists($file) == false ) {\n return false;\n }\n }\n \n require_once ($file);\n}", "title": "" }, { "docid": "9c98f3df5a8d8303e1fcaa13babb6342", "score": "0.66769725", "text": "function autoLoader($class)\n{\n $path = \"../../../classes/$class.php\";\n include $path;\n}", "title": "" }, { "docid": "8f888b7e204d7a5d154e474835f19395", "score": "0.66707647", "text": "function __autoload ($className) {\n\t$filePath = str_replace ('_', DIRECTORY_SEPARATOR, $className).'.php';\n\t$includePaths = explode (PATH_SEPARATOR, get_include_path ());\n\n\tforeach ($includePaths as $includePath) {\n\t\tif (file_exists ($includePath.DIRECTORY_SEPARATOR.$filePath)) {\n\t\t\trequire_once $filePath;\n\t\t\treturn;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "aaa221891858cc892be6aa09a5c8a740", "score": "0.66607565", "text": "function my_autoload($class_name)\n{\n $file = 'lib/'.str_replace('\\\\','/',$class_name).'.php';\n if(file_exists($file)){\n require_once($file);\n }\n}", "title": "" }, { "docid": "5382cac5be721e30a744965217e0c576", "score": "0.66587657", "text": "function __autoload($class){\n $class = str_replace('\\\\', '/', $class).'.php';\n require_once($class);\n}", "title": "" }, { "docid": "6191c1c95ef90b47380529ef06601676", "score": "0.665499", "text": "function __autoload($class_name) {\n\tinclude \"Classes/\" . $class_name . \".php\";\n}", "title": "" }, { "docid": "f443ba91f475a17c1d7c7b52cfb51eec", "score": "0.6650707", "text": "function __autoload($className) {\n $className = preg_replace(\"/\\\\\\\\/\", \"/\", $className);\n $path = \"class/$className.php\";\n if(file_exists($path)) {\n include_once($path);\n }\n}", "title": "" }, { "docid": "724a78b7e183109e180fd1fc3ab0568a", "score": "0.6642457", "text": "function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}", "title": "" }, { "docid": "8783c1655b992e19dccc6af8ec985cfe", "score": "0.6640361", "text": "function autoload( $class ) {\n\n $class = strtolower( preg_replace( '/\\B([A-Z])/', '-$1', $class ) );\n\n if ( ( strncmp( $class, 'spyropress', strlen( 'spyropress' ) ) == 0 ) ) {\n $class = str_replace( 'spyropress-', '', $class );\n $class = \"class-$class.php\";\n $class = $this->framework_path . 'classes/' . $class;\n\n if ( is_readable( $class ) ) {\n load_template( $class, true );\n return;\n }\n }\n }", "title": "" }, { "docid": "916b44d97a94a16aea0db1fa518415f2", "score": "0.66354495", "text": "function __autoload($className)\n{\n $className = '..\\\\..\\\\..\\\\' . $className;\n require_once str_replace(\"\\\\\", \"/\", $className) . '.php';\n}", "title": "" }, { "docid": "f2ce5b5aa1675cec43b8b648ab4ab209", "score": "0.66325253", "text": "function __autoload($className) {\n\n // remove heading \\ from classname\n if (substr($className, 0, 1) == '\\\\') {\n $className = substr($className, 1);\n }\n\n // replace \\ with /, it works both on windows and unix, path must be relative to document root that is the cwd\n $path = str_replace('\\\\', '/', $className) . '.php';\n\n // file directory\n $dir = realpath(dirname(__FILE__));\n\n if (file_exists($dir . '/../' . $path)) {\n include_once $dir . '/../' . $path;\n }\n\n}", "title": "" }, { "docid": "9f2a897adf9004682320cd66c4f992c6", "score": "0.6630478", "text": "function __autoload($class)\n{\n require __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n\n //require __DIR__ . '/classes/' . $className . '.php';\n}", "title": "" }, { "docid": "24c42283b2f923bf14467c40b94edf34", "score": "0.66234756", "text": "function myautoload($className) {\n// $prefixes = array(\"JSONRPC\", \"DocServer\",\"DocClient\",\"QuestServer\",\"Twig\",\"c7n\",\"Security\",\"PackageName\",\"EkoCards\");\n// $found=false;\n// foreach ($prefixes as $prefix) {\n// if (0 === strpos($className, $prefix)) {\n// $found=true;\n// }\n// }\n// if (!$found) {\n// return;\n// }\n $file = str_replace('_', '/', $className) . '.php';\n //error_log('looking for file: ' . $file);\n if (file_exists_includepath($file)) {\n //error_log('file exists: ' . $file);\n require_once $file;\n } else {\n //error_log('file not found: ' . $file);\n }\n}", "title": "" }, { "docid": "dc61a00531a91991167a2d59bae151ed", "score": "0.6615461", "text": "function __autoload($class_name){\n\n\t$fileName = $class_name . \".php\";\n\t\n\t//$fileName2 = lcfirst($fileName);\n\t\n\t//echo \"<h1>\" . $fileName . \"</h1>\";\n\t$fileName2 = substr($fileName, 0, 1);\n\t$fileName2 = strtolower($fileName2);\n\t$fileName2 = $fileName2 . substr($fileName,1) ;\n\t//echo \"<h2>\" . $fileName2 . \"</h2>\"; \n\t\n\t$path1 = dirname(__FILE__) . DS . \"levelUp_Framework\". DS . $fileName;\t\t\t\t\t//read classes from the same folder\n\t$path2 = dirname(__FILE__) . DS . \"application\". DS . \"controller\" . DS . $fileName2;\t//goes to controller folder\n\t$path3 = dirname(__FILE__) . DS . \"application\". DS . \"model\" . DS . $fileName;\t\t\t//goes to model folder\n\t\n\t/*\n\techo \"Path1: \" . $path1 . \"<br />\";\n\techo \"Path2: \" . $path2 . \"<br />\";\n\techo \"Path3: \" . $path3 . \"<br />\";\n\t*/\n\t\n\t//Check if exists class\n\tif(file_exists($path1)){\n\t\t//echo \"Required1: \" . $path1 . \"<br />\";\n\t\trequire_once($path1);\n\t\t\n\t}\n\telse if (file_exists($path2)){\n\t\t//echo \"Required2: \" . $path2 . \"<br />\";\n\t\trequire_once($path2);\n\t}\n\telse if (file_exists($path3)){\n\t\t//echo \"Required3: \" . $path3 . \"<br />\";\n\t\trequire_once($path3);\n\t}\n\n}", "title": "" }, { "docid": "77e89913dd961cf403f6820b7fce10f8", "score": "0.66150373", "text": "function __autoload($class_name) {\n\t\t$class_name = from_camel_case( $class_name );\n\t\t$path = LIB_PATH.DS.\"{$class_name}.class.php\";\n\t\t$alt_path = LIB_PATH.DS.'helper'.DS.\"{$class_name}.class.php\";\n \n if( file_exists($path) ) {\n\t\t\trequire_once($path);\n\t\t} elseif( file_exists($alt_path) ) {\n\t\t\trequire_once($alt_path);\n\t\t} else {\n\t\t\tdie(\"The file $class_name could not be found at:<br>$path <em>or</em> $alt_path.\");\n\t\t}\n\t}", "title": "" }, { "docid": "a36ce41aa8dd3669ed2a8b4b666686b1", "score": "0.6613288", "text": "function __autoload($class)\n{\n global $_autoloadArray;\n\n if (in_array($class, array_keys($_autoloadArray))) {\n require_once $_autoloadArray[$class];\n }\n}", "title": "" }, { "docid": "240ca720ae4b3f089523afcd7990d692", "score": "0.66128814", "text": "function __autoload($class)\n{\n\tinclude($class.\".class.php\");\n}", "title": "" }, { "docid": "cc0db0a181e928f629d971c32b43905b", "score": "0.66102123", "text": "function __autoload($ClassName)\r\n{\r\n\t$FileName = './';\r\n\t$Pieces = explode(\"\\\\\", $ClassName);\r\n\tforeach($Pieces AS $Piece)\r\n\t\t$FileName .= $Piece.'/';\r\n\t$FileName[strlen($FileName)-1] = '.';\r\n\t$FileName .= 'class.php';\r\n\tinclude($FileName);\r\n}", "title": "" }, { "docid": "b99be5a414d6ae44845ddf25531751bc", "score": "0.659863", "text": "function __autoload($class) {\r\n\tif(file_exists(realpath(APPPATH.'/libraries/'.$class.EXT))) {\r\n\t\trequire_once(realpath(APPPATH.'/libraries/'.$class.EXT));\r\n\t} else if(file_exists(realpath(SYSPATH.'/libraries/'.$class.EXT))) {\r\n\t\trequire_once(realpath(SYSPATH.'/libraries/'.$class.EXT));\r\n\t} else {\r\n\t\trequire_once(realpath(SYSPATH.'/libraries/database/'.$class.EXT));\r\n\t}\r\n}", "title": "" }, { "docid": "538515b13e3e99f4a5c941f3a4ff7eca", "score": "0.65977764", "text": "function __autoload($className) {\n require_once \"../klassen/$className.class.php\";\n}", "title": "" }, { "docid": "5ec97ef780fedfb6329ead1f1180fbb4", "score": "0.6595238", "text": "function autoload($class) {\r\n if (class_exists($class, false)) {\r\n return true;\r\n }\r\n $replaced = preg_replace('/([a-z])([A-Z])/', '$1/$2', ucfirst($class));\r\n $replaced = str_replace('/', DS, $replaced);\r\n $relative_path = $replaced . '.php';\r\n // search pocket-knife directory\r\n $path = get_base_dir() . DS . $relative_path;\r\n if (is_file($path)) {\r\n require $path;\r\n return true;\r\n }\r\n // search include directories\r\n $includes = explode(PATH_SEPARATOR, get_include_path());\r\n foreach ($includes as $include) {\r\n $path = $include . DS . $relative_path;\r\n if (is_file($path)) {\r\n require $path;\r\n return true;\r\n }\r\n }\r\n // error\r\n //throw new Error(\"Class '{$class}' not found in either the pocket-knife or include directories; the relative path for the class is '{$relative_path}'. Use add_include_path() to add additional directories to search.\", 404);\r\n return true;\r\n}", "title": "" }, { "docid": "93f8adf53f8bb3652dc0a8d8e43e7617", "score": "0.6591693", "text": "function __autoload($class) {\n require_once 'classes/'.$class.'.php';\n}", "title": "" }, { "docid": "dd0e6daae2d46720d9aa4db5ad53ce66", "score": "0.65858704", "text": "function __autoload($class)\n{\n\n $filename=dirname(__FILE__).'\\..\\class\\class.'.$class.'.inc.php';\n\n if(file_exists($filename))\n {\n include_once($filename);\n }\n}", "title": "" }, { "docid": "1535c31dc16115e3b2c40037aa3af5a4", "score": "0.6585696", "text": "function __autoload($class){\n\t\t$class = strtolower($class);\n\t\t$file = \"admin_includes/{$class}.php\";\n\t\tif (file_exists($file)) {\n\t\t\trequire_once ($file);\n\t\t}else {\n\t\t\tdie(\"File was not found.\");\n\t\t}\n\t}", "title": "" }, { "docid": "7f0601c27c413a19679932a600ac1686", "score": "0.6578882", "text": "function __autoload($class_name){\n require_once(\"libraries/\". $class_name . '.php');\n }", "title": "" }, { "docid": "df19b7a16d0ae436a0b51a7c3d398485", "score": "0.6578176", "text": "function __autoload($classname)\n{\n $root = $_SERVER[\"DOCUMENT_ROOT\"].\"/machine-shop\";\n $class = str_replace(\"\\\\\", \"/\", $classname);\n $filename = \"$root/$class.php\";\n include_once($filename);\n}", "title": "" }, { "docid": "cfadaa39d430f46c4149c6706e495974", "score": "0.65771663", "text": "function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n if (file_exists(ROOT_DIR . $folder . DS . $class_name . '.php')) {\n require_once(ROOT_DIR . $folder . DS . $class_name . '.php');\n } else {\n throw new Exception('Class file ' . $class_name . ' ' . ROOT_DIR . $folder . DS . $class_name . '.php' . ' not exists');\n }\n}", "title": "" }, { "docid": "67e828683b1b576d4e85dc352555d474", "score": "0.6576374", "text": "function __autoload($class_name) {\n include \"classes/$class_name.php\";\n}", "title": "" }, { "docid": "42fb57bfa1009b5c0ac117ee2dbb47c9", "score": "0.6575178", "text": "function __autoload($class){\n\n if(file_exists(\"Classes/\".$class.\".php\")){\n require_once \"Classes/\".$class.\".php\";\n }\n\n\n\n}", "title": "" }, { "docid": "beef1810cecc64241e980d8d2d1b8eec", "score": "0.65616405", "text": "function __autoload($class_name){\n $dir = scanDirectories($_SERVER['DOCUMENT_ROOT']);\n foreach($dir as $value){\n if(file_exists($value.\"/\".lcfirst($class_name).\".php\")){\n require $value.\"/\".lcfirst($class_name).\".php\";\n return;\n }\n if(file_exists($value.\"/\".ucfirst($class_name).\".php\")){\n require $value.\"/\".ucfirst($class_name).\".php\";\n return;\n }\n if(file_exists($value.\"/\".lcfirst($class_name).\".class.php\")){\n require $value.\"/\".lcfirst($class_name).\".class.php\";\n return;\n }\n if(file_exists($value.\"/\".ucfirst($class_name).\".php\")){\n require $value.\"/\".ucfirst($class_name).\".php\";\n return;\n }\n }\n throw new Exception(\"Impossible de charger la classe \".$class_name);\n \n }", "title": "" }, { "docid": "9519a0c574a66deca5766464fcb09c1c", "score": "0.6559481", "text": "public function load($path)\n {\n $dirs = array();\n \n if (is_string($path)) {\n $path = array($path);\n }\n\n foreach ($path as $p) {\n $dirs = array_merge($this->getPostDirsByPath($p), $dirs);\n }\n \n foreach ($dirs AS $dir) {\n require_once($dir . '/autoload.php');\n }\n }", "title": "" }, { "docid": "46fee5daa1bc1bec77b10e434b9f8129", "score": "0.6559081", "text": "function __autoload($class){\n include \"lib/$class.php\";\n}", "title": "" }, { "docid": "3b3428ec462e58bcdd25d8021ff5c232", "score": "0.6557675", "text": "function __autoload($class_name)\n {\n //class directories\n $directorys = array(\n classes . '/structure/',\n classes . '/templates/',\n classes . '/databases/',\n classes . '/filesyste/',\n classes . '/enginerin/'\n );\n\n //for each directory\n foreach ($directorys as $directory)\n {\n //see if the file exsists\n if (file_exists($directory . $class_name . '.class.php'))\n {\n require_once($directory . $class_name . '.class.php');\n //only require the class once, so quit after to save effort (if you got more, then name them something else \n return;\n }\n }\n }", "title": "" }, { "docid": "7de95c0353288258bf258952e78da274", "score": "0.6555684", "text": "function __autoload($class) {\n $filename = \"../sys/class/class.\" . strtolower($class) . \".inc.php\";\n if(file_exists($filename)) {\n include_once $filename;\n }\n}", "title": "" }, { "docid": "f8665394a27ad629deb8d9621bc699a5", "score": "0.6550077", "text": "function __autoload($class_name){\n $class_name=strtolower($class_name);\n $path=LIB_PATH.DS.\"{$class_name}.php\";\n if(file_exists($path)){\n require_once($path);\n }else{\n die(\"The file {$class_name}.php could not be found\");\n }\n }", "title": "" }, { "docid": "7d0668dc57ae03724ad81ede668c4b8a", "score": "0.6542766", "text": "function __autoload($classe){\r\n\tinclude_once \"lib/{$classe}.php\";\r\n}", "title": "" }, { "docid": "f49288f5af5e266384535c0f77f7164e", "score": "0.6531129", "text": "function spl_autoload($class_name, $file_extensions = NULL) {}", "title": "" }, { "docid": "e955a84fcb2cbe580108f5cd7f73616c", "score": "0.6529233", "text": "function __autoload($class_name)\n{\n\trequire_once(LIB_FOLDER.'/'.$class_name.'.class.php');\n}", "title": "" }, { "docid": "91e9aeba4a6eed44d8fcde9ceec7e4de", "score": "0.65288", "text": "function __autoload($class){\n $class = str_replace('\\\\', '/', $class);\n $path = $_SERVER['DOCUMENT_ROOT'].\"/private/library/{$class}.php\";\n if (file_exists($path)) {\n require_once $path;\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "bdf96fb24820410747771aaf526d2ccc", "score": "0.65267867", "text": "function __autoload($Class) {\n\n $cDir = ['Conn', 'Helpers', 'models'];\n $iDir = null;\n\n foreach ($cDir as $dirName):\n if (!$iDir && file_exists(__DIR__ . \"\\\\{$dirName}\\\\{$Class}.class.php\") && !is_dir(__DIR__ . \"\\\\{$dirName}\\\\{$Class}.class.php\")):\n include_once (__DIR__ . \"\\\\{$dirName}\\\\{$Class}.class.php\");\n $iDir = true;\n endif;\n endforeach;\n\n if (!$iDir):\n trigger_error(\"Não foi possível incluir {$Class}.class.php\", E_USER_ERROR);\n die;\n endif;\n}", "title": "" }, { "docid": "de703b1426e3c47ecf23cddc326fde7d", "score": "0.65264815", "text": "function autoload($nom_classe)\r\n{\r\n if (file_exists('./lib/php/classes/' . $nom_classe . '.class.php')) {\r\n require './lib/php/classes/' . $nom_classe . '.class.php';\r\n } else if (file_exists('./admin/lib/php/classes/' . $nom_classe . '.class.php')) {\r\n require './admin/lib/php/classes/' . $nom_classe . '.class.php';\r\n\r\n }\r\n}", "title": "" }, { "docid": "e4487484952b9e0410db418d3e113713", "score": "0.6525797", "text": "function __autoload($class) {\n\t\trequire_once('../classes/' . $class . '.php');\n\t}", "title": "" }, { "docid": "edaa6ed8fcbbd9b056676832bd54ba94", "score": "0.65257007", "text": "function __autoload($class_name) {\n require_once 'classes/'.$class_name . '.php';\n}", "title": "" }, { "docid": "11a4fd43afd9c484036017d3ddb9b1dc", "score": "0.6508486", "text": "function __autoload($classe)\n{\n $pontos = array(\"./\", \"../\", \"../../\");\n foreach ($pontos AS $ponto) {\n if ($classe == \"FPDF\") $diretorio = \"fpdf/fpdf.php\"; else $diretorio = \"{$classe}.class.php\";\n if (file_exists(\"{$ponto}class/{$diretorio}\")) {\n //echo \"{$ponto}class/{$diretorio}\\n\";\n include_once \"{$ponto}class/{$diretorio}\";\n }\n }\n}", "title": "" }, { "docid": "722578fdd6c562a71df4d882cd487e84", "score": "0.650612", "text": "public function addAutoloadPath($path)\n {\n if (!$this->autoload) {\n $this->useAutoload(true);\n }\n if ( preg_match('/\\*/', $path)) {\n array_walk(glob($path, GLOB_BRACE), array($this, 'addAutoloadPath'));\n } elseif (!in_array(trim($path), $this->autoloadpath)) {\n array_push($this->autoloadpath, trim($path));\n }\n }", "title": "" }, { "docid": "cb465bfed275615446102486a653aa96", "score": "0.65054375", "text": "function autoload_class_dirs($class_name) \n\t{\n\n\t\t$directorys = array(\n\t\t\t'lib/ExtPHP/ExtUI/',\n\t\t\t'lib/ExtPHP/ExtMvc/',\n\t\t\t'lib/ExtPHP/ExtMysql/',\n\t\t\t'lib/ExtPHP/ExtCore/',\n\t\t\t'lib/ExtPHP/',\n\t\t\t'models/',\n 'components/',\n\t\t\t'presenters/'\n\t\t);\n\n\t\tforeach($directorys as $directory)\n\t\t{\n\t\t\n\t\t\tif(file_exists(LOADER_PREFIX.$directory.$class_name . '.php'))\n\t\t\t{\n\t\t\t\trequire_once(LOADER_PREFIX.$directory.$class_name . '.php');\n\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "2ac31befb698886a7cee31992bd8fb47", "score": "0.650252", "text": "function __autoload( $class )\r\n{\r\n if(Util::endsWith('.php', $class) && !class_exists($class)){\r\n require_once($class);\r\n }\r\n else{\r\n if(!class_exists($class.'.php')){\r\n require_once(\"$class.php\");\r\n }\r\n }\r\n}", "title": "" }, { "docid": "57b78f5f4c51f3c082c0577aef79edcf", "score": "0.6502272", "text": "function classAutoLoader($class){\n //scanning application catches undeclared \n $class= strtolower($class);\n $the_path = \"includes/{$class}.php\";\n \n if(is_file($the_path) && !class_exists($class))\n {\n include($the_path);\n }\n \n}", "title": "" }, { "docid": "edc4b8a9030c71baa44ac7da6b809887", "score": "0.6499672", "text": "function __autoload($className){\n include 'class.'.$className.'.inc';\n }", "title": "" }, { "docid": "96e3f7c30b21ef68b50587082b142e8d", "score": "0.6497687", "text": "function __autoload($class)\n\t{\n\t\trequire_once('class/'. strtolower($class) . '.class.php');\n\t}", "title": "" }, { "docid": "c65fee3ff1ac3f5a094b9ea43fe13b2b", "score": "0.6495435", "text": "function __autoload($nome_classe){\n require_once 'libs/' . $nome_classe . '.php';\n}", "title": "" }, { "docid": "680ffada563629b38f532de5eba955a5", "score": "0.64921576", "text": "public function autoload($className)\n\t{\n\t\t$classFilename = str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';\n\t\t$classFilename = str_replace('\\\\', DIRECTORY_SEPARATOR, $className).'.php';\n// global $bb,$eb, $bi,$ei, $btt,$ett, $rarr,$ldquo,$rdquo,$hellip,$nbsp,$nl;\n// ccTrace::s_out( '#'.__LINE__.' '.ccTrace::getCaller(0,dirname(self::getApp()->getAppPath())).': '.$className.\" $rarr \".$classFilename.$nl);\n// ccTrace::s_out( '#'.__LINE__.' '.ccTrace::getCaller(3).': '.$className.\" $rarr \".$classFilename.$nl);\n// echo '#'.__LINE__.\" $className $rarr $classFilename\".$nl;\n// self::tr('&nbsp;&nbsp;&nbsp;'.$this->sitepath.$classFilename);\n// ccTrace::tr('&nbsp;&nbsp;&nbsp;'.$this->sitepath.$classFilename);\n\n\t\t// Check app paths, first\n\t\tif ($this->sitepath && file_exists($this->sitepath . $classFilename))\n\t\t{\n\t\t\tinclude($this->sitepath . $classFilename);\n\t\t\treturn;\n\t\t}\n\t\telse foreach ($this->classpath as $class => $path)\n\t\t{\n// ccTrace::s_out( $nbsp.$nbsp.'*'.$class.'*'.$className.'*'.(($class === $className)).'*'.$path.$nl);\n// self::tr( '*'.$class.'*'.$className.'*'.(($class === $className)).'*'.$path);\n\t\t\tif ($class === $className)\t// If specific class mapping\n\t\t\t{\t\t\t\t\t\t\t// then load associated file\n//\t\t\t\tif (!file_exists($path))\n//\t\t\t\t\tthrow new Exception($path . \" does not exist in \".getcwd());\n\t\t\t\tif (require($path))\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\t// If class-association registered w/ccApp is a namespace, check whether\n\t\t\t// class to load has a namespace; if namespace names match, then use\n\t\t\t// registered path as source.\n\t\t\tif ( $class[0] === '\\\\' && strpos($className,'\\\\') !== FALSE\n\t\t\t\t && substr($class,1).'\\\\' === substr($className,0,strlen($class)) )\n\t\t\t{\n// echo '#'.__LINE__.\" class=$class path=$path$nl\";\n\t\t\t\t$namespaceClassName = substr($className,strlen($class)).'.php';\n// echo '#'.__LINE__.' '.$className.\" $rarr \".$path.$namespaceClassName.$nl;\n\t\t\t\tif (include($path . $namespaceClassName))\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (file_exists($path . $classFilename))\n//\t\t\telseif (@include($path . $classFilename))\n\t\t\t{\t\t\t\t\t\t\t// Else if assumed name exists...\n// echo '#'.__LINE__.\" Exists=$path$classFilename$nl\";\n\t\t\t\tinclude($path . $classFilename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n// echo '#'.__LINE__.' '.$className.$rarr.$classFilename.$nl;\n//\t\t@include($classFilename);\t\t// Finally, check include path.\n// if (class_exists($className))\t\t// Check framework directories\n// echo '#'.__LINE__.$nbsp.$nbsp.$className.$rarr.$classFilename.' LOADED!!!'.$nl;\n\t\t// IF WE GET HERE, WE COULD NOT RESOLVE THE CLASS\n\t}", "title": "" }, { "docid": "f69d8f9dc8cfc8537f7fe81602bb2d21", "score": "0.6491396", "text": "function __autoload($className)\r\n{\r\n\t$pathArray = explode('_', $className);\r\n\t$pathName = implode('/', $pathArray);\r\n\t$file = strtolower(APPLICATION_PATH . $pathName . '.class.php');\r\n\tif (file_exists($file)) {\r\n\t\trequire_once($file);\r\n\t}\r\n\telse {\r\n\t\tdie('Cannot load class: ' . $className);\r\n\t}\r\n}", "title": "" }, { "docid": "61bccfd5a3a55223ad788ac7a2c2cd12", "score": "0.6487476", "text": "function application_autoload($class_name) \n{\n if(preg_match('/[_]+/', $class_name)) {\n $file = class_for_dir($class_name, APPPATH);\n if( ! $file ) {\n return false;\n }\n }\n else {\n $file = APPPATH . DIRECTORY_SEPARATOR . $class_name. EXT;\n if( file_exists($file) == false ) {\n return false;\n }\n }\n \n require_once ($file);\n\n}", "title": "" }, { "docid": "1def532c27c09eeb9a7d9e8c5d985b3a", "score": "0.6487296", "text": "function __autoload($classname)\n{\n if (file_exists(\"autoload/\" . $classname . '.php')) {\n require \"autoload/\" . $classname . '.php';\n }\n if (file_exists(\"Controller/\" . $classname . '.php')) {\n require \"Controller/\" . $classname . '.php';\n }\n if (file_exists(\"db/\" . $classname . '.php')) {\n require \"db/\" . $classname . '.php';\n }\n}", "title": "" }, { "docid": "72665a7d0b634f25ee22d5ce1f698e65", "score": "0.64860874", "text": "function __autoload($class_name) {\r\n include $class_name . '.php';\r\n }", "title": "" }, { "docid": "9902ad9cba68e0342511ba64b21cb411", "score": "0.6483695", "text": "private function includes()\n {\n\n /**\n * WP_GATSBY_AUTOLOAD can be set to \"false\" to prevent the autoloader from running.\n * In most cases, this is not something that should be disabled, but some environments\n * may bootstrap their dependencies in a global autoloader that will autoload files\n * before we get to this point, and requiring the autoloader again can trigger fatal errors.\n *\n * The codeception tests are an example of an environment where adding the autoloader again causes issues\n * so this is set to false for tests.\n */\n if (defined('WP_GATSBY_AUTOLOAD') && true === WP_GATSBY_AUTOLOAD ) {\n // Autoload Required Classes.\n include_once WP_GATSBY_PLUGIN_DIR . 'vendor/autoload.php';\n }\n\n // Required non-autoloaded classes.\n include_once WP_GATSBY_PLUGIN_DIR . 'access-functions.php';\n\n }", "title": "" }, { "docid": "a0baeb1ec9d2ddaecf0b3b8ce14072ed", "score": "0.6483018", "text": "function __autoload($class){\n require $class . \".php\"; \n\n}", "title": "" }, { "docid": "4a000b5e7490cf6197b21308e588e317", "score": "0.647882", "text": "static public function autoload($className)\n {\n // I am guessing that using a hashmap will be faster than a big switch statement... no tests yet, but... in any case I'll do it this way first.\n // other option is to add a bunch of paths to include_path, but that seems like a bad idea... YES that's a VERY BAD IDEA. Searching paths is much more expensive \n // than including files directly because it hits the filesystem a lot to find the files.\n static $autoloadClassmapCache = NULL;\n if ($autoloadClassmapCache == NULL)\n {\n $autoloadClassmapCache = array(\n 'Smarty' => 'Smarty/Smarty.class.php',\n 'Horde_Yaml' => 'Horde/Yaml.php',\n 'Horde_Yaml_Dumper' => 'Horde/Yaml/Dumper.php',\n 'Horde_Yaml_Loader' => 'Horde/Yaml/Loader.php',\n 'Horde_Yaml_Node' => 'Horde/Yaml/Node.php',\n 'Services_JSON' => 'libs/JSON.php',\n\n 'Mail_Mailer' => 'framework/Mailer.php',\n\n 'WFModel' => 'framework/generator/WFGenerator.php',\n 'WFFixture' => 'framework/generator/WFFixture.php',\n 'WFYaml' => 'framework/util/WFYaml.php',\n 'WFJSON' => 'framework/util/WFJSON.php',\n 'WFWebApplication' => 'framework/WFWebApplication.php',\n 'WFMenuTree' => 'framework/WFMenuItem.php',\n 'WFMenuTreeBuilding' => 'framework/WFMenuItem.php',\n 'WFMenuItem' => 'framework/WFMenuItem.php',\n 'WFMenuItemBasic' => 'framework/WFMenuItem.php',\n 'WFObject' => 'framework/WFObject.php',\n 'WFDateTime' => 'framework/WFDateTime.php',\n 'WFDecorator' => 'framework/WFDecorator.php',\n 'WFKeyValueCoding' => 'framework/WFKeyValueCoding.php',\n 'WFKeyValueValidators' => 'framework/util/WFKeyValueValidators.php',\n 'WFRequestController' => 'framework/WFRequestController.php',\n 'WFRedirectRequestException' => 'framework/WFRequestController.php',\n 'WFRequestController_RedirectException' => 'framework/WFRequestController.php',\n 'WFRequestController_InternalRedirectException' => 'framework/WFRequestController.php',\n 'WFRequestController_NotFoundException' => 'framework/WFRequestController.php',\n 'WFRequestController_BadRequestException' => 'framework/WFRequestController.php',\n 'WFRequestController_HTTPException' => 'framework/WFRequestController.php',\n 'WFSkin' => 'framework/WFSkin.php',\n 'WFModule' => 'framework/WFModule.php',\n 'WFModuleInvocation' => 'framework/WFModule.php',\n\n // working\n 'WFAction' => 'framework/WFRPC.php',\n 'WFEvent' => 'framework/WFRPC.php',\n 'WFClickEvent' => 'framework/WFRPC.php',\n 'WFJSAction' => 'framework/WFRPC.php',\n 'WFRPC' => 'framework/WFRPC.php',\n 'WFActionResponse' => 'framework/WFRPC.php',\n 'WFActionResponsePlain' => 'framework/WFRPC.php',\n 'WFActionResponseJSON' => 'framework/WFRPC.php',\n 'WFActionResponseXML' => 'framework/WFRPC.php',\n 'WFActionResponseJavascript' => 'framework/WFRPC.php',\n\n 'WFPage' => 'framework/WFPage.php',\n 'WFPageRendering' => 'framework/WFPageRendering.php',\n 'WFView' => 'framework/widgets/WFView.php',\n 'WFException' => 'framework/WFException.php',\n 'WFBinding' => 'framework/WFBinding.php',\n 'WFBindingSetup' => 'framework/WFBinding.php',\n 'WFSmarty' => 'framework/WFSmarty.php',\n 'WFAuthorizationDelegate' => 'framework/WFAuthorization.php',\n 'WFAuthorizationInfo' => 'framework/WFAuthorization.php',\n 'WFAuthorizationException' => 'framework/WFAuthorization.php',\n 'WFAuthorizationManager' => 'framework/WFAuthorization.php',\n 'WFFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFBooleanFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFDateTimeFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFUNIXDateFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFSQLDateFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFNumberFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFSensitiveDataFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFPaginator' => 'framework/WFPagination.php',\n 'WFPaginatorException' => 'framework/WFPagination.php',\n 'WFPagedArray' => 'framework/WFPagination.php',\n 'WFPagedCreoleQuery' => 'framework/WFPagination.php',\n 'WFPagedData' => 'framework/WFPagination.php',\n 'WFDieselSearch' => 'framework/WFDieselpoint.php',\n 'WFDieselSearchHelper' => 'framework/WFDieselpoint.php',\n 'WFDieselKeyword' => 'framework/widgets/WFDieselKeyword.php',\n 'WFDieselNav' => 'framework/widgets/WFDieselNav.php',\n 'WFDieselSearchHelperStateTracking' => 'framework/WFDieselpoint.php',\n 'WFDieselFacet' => 'framework/widgets/WFDieselFacet.php',\n 'WFWidget' => 'framework/widgets/WFWidget.php',\n 'WFDynarchMenu' => 'framework/widgets/WFDynarchMenu.php',\n 'WFDynamic' => 'framework/widgets/WFDynamic.php',\n 'WFSelectionCheckbox' => 'framework/widgets/WFSelectionCheckbox.php',\n 'WFImage' => 'framework/widgets/WFImage.php',\n 'WFForm' => 'framework/widgets/WFForm.php',\n 'WFAutoForm' => 'framework/widgets/WFAutoForm.php',\n 'WFLabel' => 'framework/widgets/WFLabel.php',\n 'WFLink' => 'framework/widgets/WFLink.php',\n 'WFMessageBox' => 'framework/widgets/WFMessageBox.php',\n 'WFPassword' => 'framework/widgets/WFPassword.php',\n 'WFTextField' => 'framework/widgets/WFTextField.php',\n 'WFSearchField' => 'framework/widgets/WFSearchField.php',\n 'WFTextArea' => 'framework/widgets/WFTextArea.php',\n 'WFHTMLArea' => 'framework/widgets/WFHTMLArea.php',\n 'WFSubmit' => 'framework/widgets/WFSubmit.php',\n 'WFSelect' => 'framework/widgets/WFSelect.php',\n 'WFJumpSelect' => 'framework/widgets/WFJumpSelect.php',\n 'WFTimeSelect' => 'framework/widgets/WFTimeSelect.php',\n 'WFHidden' => 'framework/widgets/WFHidden.php',\n 'WFSpamHoneypot' => 'framework/widgets/WFSpamHoneypot.php',\n 'WFCheckbox' => 'framework/widgets/WFCheckbox.php',\n 'WFCheckboxGroup' => 'framework/widgets/WFCheckboxGroup.php',\n 'WFRadio' => 'framework/widgets/WFRadio.php',\n 'WFRadioGroup' => 'framework/widgets/WFRadioGroup.php',\n 'WFUploadError' => 'framework/widgets/WFUploading.php',\n 'WFUploaderUtils' => 'framework/widgets/WFUploading.php',\n 'WFUploadedFile' => 'framework/widgets/WFUploading.php',\n 'WFUploadedFile_Basic' => 'framework/widgets/WFUploading.php',\n 'WFUpload' => 'framework/widgets/WFUpload.php',\n 'WFPostletUpload' => 'framework/widgets/WFPostletUpload.php',\n 'WFHTML5_Uploader' => 'framework/widgets/WFHTML5_Uploader.php',\n 'WFBulkUpload' => 'framework/widgets/WFBulkUpload.php',\n 'WFPaginatorNavigation' => 'framework/widgets/WFPaginatorNavigation.php',\n 'WFPaginatorSortLink' => 'framework/widgets/WFPaginatorSortLink.php',\n 'WFPaginatorSortSelect' => 'framework/widgets/WFPaginatorSortSelect.php',\n 'WFPaginatorState' => 'framework/widgets/WFPaginatorState.php',\n 'WFModuleView' => 'framework/widgets/WFModuleView.php',\n 'WFTabView' => 'framework/widgets/WFTabView.php',\n 'WFTableView' => 'framework/widgets/WFTableView.php',\n 'WFAppcelerator' => 'framework/widgets/WFAppcelerator.php',\n 'WFBreadCrumb' => 'framework/widgets/WFBreadCrumb.php',\n 'WFBreadCrumbSetup' => 'framework/widgets/WFBreadCrumb.php',\n 'WFYAHOO' => 'framework/widgets/yahoo/WFYAHOO.php',\n 'WFYAHOO_widget_YahooScript' => 'framework/widgets/yahoo/WFYAHOO_widget_YahooScript.php',\n 'WFYAHOO_yuiloader' => 'framework/widgets/yahoo/WFYAHOO.php',\n 'WFYAHOO_widget_TreeView' => 'framework/widgets/yahoo/WFYAHOO_widget_TreeView.php',\n 'WFYAHOO_widget_TreeViewNode' => 'framework/widgets/yahoo/WFYAHOO_widget_TreeView.php',\n 'WFYAHOO_widget_Module' => 'framework/widgets/yahoo/WFYAHOO_widget_Module.php',\n 'WFYAHOO_widget_Overlay' => 'framework/widgets/yahoo/WFYAHOO_widget_Overlay.php',\n 'WFYAHOO_widget_Panel' => 'framework/widgets/yahoo/WFYAHOO_widget_Panel.php',\n 'WFYAHOO_widget_Dialog' => 'framework/widgets/yahoo/WFYAHOO_widget_Dialog.php',\n 'WFYAHOO_widget_PhocoaDialog' => 'framework/widgets/yahoo/WFYAHOO_widget_PhocoaDialog.php',\n 'WFYAHOO_widget_Logger' => 'framework/widgets/yahoo/WFYAHOO_widget_Logger.php',\n 'WFYAHOO_widget_Menu' => 'framework/widgets/yahoo/WFYAHOO_widget_Menu.php',\n 'WFYAHOO_widget_AutoComplete' => 'framework/widgets/yahoo/WFYAHOO_widget_AutoComplete.php',\n 'WFYAHOO_widget_Tab' => 'framework/widgets/yahoo/WFYAHOO_widget_TabView.php',\n 'WFYAHOO_widget_TabView' => 'framework/widgets/yahoo/WFYAHOO_widget_TabView.php',\n 'WFYAHOO_widget_ColorPicker' => 'framework/widgets/yahoo/WFYAHOO_widget_ColorPicker.php',\n 'WFYAHOO_widget_Calendar' => 'framework/widgets/yahoo/WFYAHOO_widget_Calendar.php',\n 'WFYAHOO_widget_DateTimePicker' => 'framework/widgets/yahoo/WFYAHOO_widget_DateTimePicker.php',\n 'WFYAHOO_widget_Uploader' => 'framework/widgets/yahoo/WFYAHOO_widget_Uploader.php',\n 'WFYAHOO_widget_Carousel' => 'framework/widgets/yahoo/WFYAHOO_widget_Carousel.php',\n 'WFPaginatorPageInfo' => 'framework/widgets/WFPaginatorPageInfo.php',\n 'WFValueTransformer' => 'framework/ValueTransformers/WFValueTransformer.php',\n 'WFNegateBooleanTransformer' => 'framework/ValueTransformers/WFNegateBooleanTransformer.php',\n 'WFIsEmptyTransformer' => 'framework/ValueTransformers/WFIsEmptyTransformer.php',\n 'WFEmptyToNullTransformer' => 'framework/ValueTransformers/WFEmptyToNullTransformer.php',\n 'WFIsNotEmptyTransformer' => 'framework/ValueTransformers/WFIsNotEmptyTransformer.php',\n 'WFUrlencodeTransformer' => 'framework/ValueTransformers/WFUrlencodeTransformer.php',\n 'WFObjectController' => 'framework/WFObjectController.php',\n 'WFArrayController' => 'framework/WFArrayController.php',\n 'WFArray' => 'framework/WFArray.php',\n 'WFDictionary' => 'framework/WFDictionary.php',\n 'WFError' => 'framework/WFError.php',\n 'WFErrorArray' => 'framework/WFError.php',\n 'WFErrorsException' => 'framework/WFError.php',\n 'WFErrorCollection' => 'framework/WFError.php',\n 'WFExceptionReporting' => 'framework/WFExceptionReporting.php',\n 'WFFunction' => 'framework/WFFunction.php',\n 'WFUnixDateFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFSQLDateFormatter' => 'framework/widgets/WFFormatter.php',\n 'WFNumberFormatter' => 'framework/widgets/WFFormatter.php',\n 'FCKEditor' => FRAMEWORK_DIR . '/wwwroot/www/framework/FCKEditor/fckeditor.php',\n\n // propel\n 'WFPagedPropelQuery' => 'framework/WFPagination.php',\n 'WFPagedPropelModelCriteria' => 'framework/WFPagination.php',\n 'WFModelBuilderPropel' => 'framework/generator/WFGeneratorPropel12_13.php',\n 'WFModelBuilderPropel15' => 'framework/generator/WFGeneratorPropel15.php',\n 'WFPropelException' => 'framework/util/WFPropelIntegration.php',\n 'WFObject_Propel' => 'framework/util/WFPropelIntegration.php',\n\n // PHPUnit\n 'PhocoaControllerTestCase_PHPUnit' => 'phpunit/PhocoaControllerTestCase_PHPUnit.php',\n );\n }\n\n if (isset($autoloadClassmapCache[$className]))\n {\n // including absolute paths is much faster than relative paths to the include_path dirs because one doesn't have to walk the include path.\n // so, if it's a framework/ dir, then include it absolutely! Otherwise, let require figure it out.\n if (substr($autoloadClassmapCache[$className], 0, 10) == 'framework/')\n {\n $requirePath = FRAMEWORK_DIR . '/' . $autoloadClassmapCache[$className];\n }\n else\n {\n $requirePath = $autoloadClassmapCache[$className];\n }\n require($requirePath);\n return true;\n }\n\n // give appdelegate a shot at it\n $webapp = WFWebApplication::sharedWebApplication();\n return $webapp->autoload($className);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "a3eaa169a246f55fd5bf18b486ebe204", "score": "0.70041734", "text": "public function store()\n {\n /* Check if logged user is authorized to create resources */\n $this->authorize('create', [$this->model]);\n\n $this->request->validate($this->storeValidations());\n\n DB::transaction(function () {\n\n /** Create a new resource */\n $resource = Model::create([\n 'user' => Input::get('user'),\n 'name' => Input::get('name'),\n 'email' => Input::get('email'),\n 'status' => Input::get('status'),\n 'password' => bcrypt(config('user.default_password', 'secret')),\n ]);\n\n /* Check if permissions are being set */\n if (Input::get('roles') != null) {\n /** Synchronize both tables through pivot table */\n $resource->roles()->sync(Input::get('roles'));\n }\n }, 5);\n\n /* Redirect to resource index page */\n return redirect()\n ->route($this->name . '.index')\n ->with('success', $this->name . '.resource-created');\n }", "title": "" }, { "docid": "8d0bfe30c62faf0feb996618f9875517", "score": "0.6977172", "text": "protected function store($resource_entity)\n {\n if ($resource_entity->isStored()) {\n $model = ResourceModel::find($resource_entity->id);\n } else {\n $model = new ResourceModel();\n }\n $model->fill(\n [\n 'bucket' => $resource_entity->bucket,\n 'hash' => $resource_entity->hash,\n 'processed_hash' => $resource_entity->processed_hash,\n 'mime_type' => $resource_entity->mime_type,\n 'desc' => $resource_entity->desc,\n ]\n );\n $model->save();\n $resource_entity->url = $this->url($model);\n $resource_entity->setIdentity($model->id);\n\n }", "title": "" }, { "docid": "310f8da9f04c8768eed8a9dadc64ed2d", "score": "0.6614484", "text": "public function store(ResourceStoreRequest $request): RedirectResponse\n {\n $input = $request->validated();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n laraflash()\n ->message()\n ->title('Resource was created')\n ->content('Resource \"'.$resource->name.'\" was created successfully.')\n ->success();\n\n return redirect()->route('resources.index');\n }", "title": "" }, { "docid": "d0ab33c00beb338b5537109124c32bc3", "score": "0.65918756", "text": "public function create(Storage $storage): void;", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.65264326", "text": "public function store() {}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6364582", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6364582", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63412726", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
29a3615e78ba570b214b279f306c898d
/ responses 0: success 1: captcha invalid 2: description too long 3: reason missing 7: already reported $: prints response
[ { "docid": "06c4ed9156740892ee6ae4dc64c64b03", "score": "0.0", "text": "protected function handleContactUs() : string\n {\n $report = new Report($this->_post['mode'], $this->_post['reason'], $this->_post['id']);\n if ($report->create($this->_post['desc'], $this->_post['ua'], $this->_post['appname'], $this->_post['page'], $this->_post['relatedurl'], $this->_post['email']))\n return 0;\n else if ($report->errorCode > 0)\n return $report->errorCode;\n else\n return Lang::main('intError');\n }", "title": "" } ]
[ { "docid": "ea4f3e12476b9f67606d8a24ed46fe16", "score": "0.6225211", "text": "public function message()\n {\n return 'Wrong captcha, please try again.';\n }", "title": "" }, { "docid": "32212d92b39d6a50487e3e0eff29686d", "score": "0.619625", "text": "private function handleCaptchaResponse()\n {\n if (isset($_POST['captcha_response'])) {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n if (isset($_SESSION['captcha_fields'], $_SESSION['captcha_action'])) {\n $captcha_action = $_SESSION['captcha_action'];\n $captcha_fields = $_SESSION['captcha_fields'];\n $captcha_fields['captcha_response'] = preg_replace('/[^a-zA-Z0-9]+/', '', $_POST['captcha_response']);\n\n $header = [\n 'Content-type: application/x-www-form-urlencoded',\n 'Referer: ' . $captcha_action,\n 'Cookie: noscript=1'\n ];\n\n $opts = [\n CURLOPT_POST => 1,\n CURLOPT_POSTFIELDS => http_build_query($captcha_fields)\n ];\n\n $html = getSimpleHTMLDOM($captcha_action, $header, $opts);\n\n return $html;\n }\n\n unset($_SESSION['captcha_fields']);\n unset($_SESSION['captcha_action']);\n }\n\n return null;\n }", "title": "" }, { "docid": "8f6851c73135fed9807a412fc5aeacf4", "score": "0.61504304", "text": "function failCaptcha() {\n\t$ipUser=$_SERVER[\"REMOTE_ADDR\"];\n\t$response=$_POST[\"g-recaptcha-response\"];\n\tif (empty($response)) {\n\t\treturn \"error.captchaForgotten\";\n\t}\n\t//formulate the request URL to reCaptcha API\n\t$request = \"https://www.google.com/recaptcha/api/siteverify?secret=\" . RECAPTCHA_SECRET . \"&response=\" . $response . \"&remoteip=\" . $ipUser;\n\t//set the recaptcha answer\n\t$idealanswer=\"true\";\n\t//finally make and retrieve the request\n\t$responserecaptcha = file_get_contents($request);\n\t//Check if the answer is correct\n\tif((strstr($responserecaptcha,$idealanswer))) {\n\t\treturn \"\";\n\t} \n\treturn \"error.captcha\";\n}", "title": "" }, { "docid": "e5484a6ae2d25c48e8b05748f4f4933d", "score": "0.60052836", "text": "public function test_html() {\n $r = Service_Recaptcha::Client('','');\n $this->set_trap();\n try{\n $r->html();\n } catch (Service_Recaptcha_Exception $e) {\n $this->trap($e);\n }\n $this->assert_true($this->is_catch_prey());\n\n $this->assert_equal($this->rcap->html(), $this->rcap->as_string());\n\n $this->assert_same($this->rcap->html(true),\n<<<HTML\n<script type=\"text/javascript\" src=\"https://api-secure.recaptcha.net/challenge?k=test+pub+key\">\n</script>\n<noscript>\n<iframe src=\"https://api-secure.recaptcha.net/noscript?k=test+pub+key\" height=\"300\" width=\"500\" frameborder=\"0\">\n</iframe><br/>\n<textareaname=\"recaptcha_challenge_field\"rows=\"3\"cols=\"40\">\n</textarea>\n<input type=\"hidden\" name=\"recaptcha_response_field\" value=\"manual_challenge\"/>\n</noscript>\nHTML\n );\n }", "title": "" }, { "docid": "99500e5d3be3267dcbc6ce9b37caf1b9", "score": "0.59776473", "text": "public function check_recaptcha_response()\n { \n $recaptcha_response = $this->CI->input->post('g-recaptcha-response'); \n if($recaptcha_response)\n { \n // Create an instance of the service using your secret\n\n //$recaptcha = new \\ReCaptcha\\ReCaptcha($this->secret_key);\n $recaptcha = new \\ReCaptcha\\ReCaptcha($this->secret_key, new \\ReCaptcha\\RequestMethod\\CurlPost());\n\n // If file_get_contents() is locked down on your PHP installation to disallow\n // its use with URLs, then you can use the alternative request method instead.\n // This makes use of fsockopen() instead.\n // $recaptcha = new \\ReCaptcha\\ReCaptcha($secret, new \\ReCaptcha\\RequestMethod\\SocketPost());\n\n // Make the call to verify the response and also pass the user's IP address\n $resp = $recaptcha->verify($recaptcha_response, $this->CI->input->ip_address());\n\n if($resp->isSuccess())\n { \n $this->is_valid = TRUE;\n }\n else\n {\n $this->is_valid = FALSE;\n // If it's not successful, then one or more error codes will be returned.\n $recaptcha_error_codes = '<p>Something went wrong!! The following error was returned:</p>'; \n $recaptcha_error_codes .= '<ul>';\n foreach ($resp->getErrorCodes() as $code)\n {\n $recaptcha_error_codes .= '<li>' . $code . '</li>';\n }\n $recaptcha_error_codes .= '</ul>'; \n $recaptcha_error_codes .= '\n <p>Check the error code reference at <a href=\"https://developers.google.com/recaptcha/docs/verify#error-code-reference\">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></p>\n <p><strong>Note:</strong> Error code <b>missing-input-response</b> may mean the user just did not complete the reCAPTCHA.</p>'; \n $this->error = $recaptcha_error_codes; \n }\n } // Google ReCaptcha is pressed\n else\n {\n $this->is_valid = FALSE;\n $this->error = 'Please complete the Google reCAPTCHA and then submit the contact form.';\n }\n }", "title": "" }, { "docid": "867940ac873d067edd049fdd35980b0a", "score": "0.5945154", "text": "public function loginpress_recaptcha_error() {\n\n\t\t\t$loginpress_settings = get_option( 'loginpress_customization' );\n\t\t\t$recaptcha_message = isset( $loginpress_settings['recaptcha_error_message'] ) ? $loginpress_settings['recaptcha_error_message'] : __( '<strong>ERROR:</strong> Please verify reCAPTCHA', 'loginpress-pro' );\n\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(),\n\t\t\t);\n\t\t\treturn wp_kses( $recaptcha_message, $allowed_html );\n\t\t}", "title": "" }, { "docid": "311be5d779fc9bb3f11bef9ed8380260", "score": "0.59390795", "text": "public function validate() {\n \t$result = array_value($_SESSION, 'captcha_keystring', null) === $this->router->getPost('code');\n \tif (array_value($_SESSION, 'captcha_keystring', null) && !$result) {\n \t\tunset($_SESSION['captcha_keystring']);\n \t}\r\n $this->JSONRespond($result);\r\n exit();\r\n }", "title": "" }, { "docid": "dbd83c1c821b86614df4c57cd0106304", "score": "0.5884355", "text": "function Response($InputRaw)\n{\n // Instantiate a Mixpanel object using a token\n // stashed in a (Heroku) environment variable,\n // and track our activity with it.\n\n $Result = \"\";\n $Input = strtolower($InputRaw);\n\n $RequiredMixpanelToken = getenv('MIXPANEL_TOKEN');\n $Mp = Mixpanel::getInstance($RequiredMixpanelToken);\n\n $Org = ConfigValue(\"org\");\n\n if ($Input == \"?\" or $Input == \"\" or $Input == \"help\")\n {\n // Here if the user seems to need help. We could simply make\n // this part of the data file. But that could potentially return\n // multiple unrelated results as well. Probably better to check\n // for the existence of msg-help, and proceed appropriately.\n $Result = ConfigValue(\"msg-help\");\n $Mp->track($Org.\": helped <\".$InputRaw.\">\");\n }\n else\n {\n // Get the definition for our term.\n $Result = Lookup($Input);\n\n if ($Result == \"\")\n {\n // If there is no definition, admit defeat and put up a help message.\n $Result = str_ireplace(\"{input}\", $InputRaw, ConfigValue(\"msg-unlisted-term\"));\n $Result = str_ireplace(\"{inputDot}\", str_ireplace(\" \", \".\", $InputRaw), $Result);\n $Mp->track($Org.\": FAILED <\".$InputRaw.\">\");\n }\n else\n {\n // Track our count of results, so analytics can reveal if things blow up.\n $ResultLineCount = count(explode(chr(13), $Result));\n $ResultCount = $ResultLineCount === 1 ? 1 : $ResultLineCount-2;\n $Mp->track($Org.\": found <\".$InputRaw.\"> (\".$ResultCount.\")\");\n }\n }\n\n return trim($Result);\n\n}", "title": "" }, { "docid": "7e07b8f64bd4c16ed3749420069ce088", "score": "0.5876484", "text": "function captcha() {\n\t\tGraphics::captcha(180,75,5);\n\t}", "title": "" }, { "docid": "81f3f444173eba2eb31cebe34f245255", "score": "0.58567625", "text": "function install_captcha(){ }", "title": "" }, { "docid": "fb922ca4004e322c2baddf1dd29196c7", "score": "0.58485234", "text": "public function check_recaptcha($response_field)\r\n {\r\n $post_data = http_build_query(\r\n array(\r\n 'secret' => $this->CI->config->item('recaptcha_secret_key', 'tank_auth'),\r\n 'response' => $response_field\r\n )\r\n );\r\n\r\n $opts = array('http' =>\r\n array(\r\n 'method' => 'POST',\r\n 'header' => 'Content-type: application/x-www-form-urlencoded',\r\n 'content' => $post_data\r\n )\r\n );\r\n $context = stream_context_create($opts);\r\n $response = file_get_contents($this->CI->config->item('recaptcha_verify_link', 'tank_auth'), false, $context);\r\n $result = json_decode($response);\r\n if (!$result->success) {\r\n //$msg = \"--Client Response: \".$response_field.\"\\n--Recaptcha Error: \".$result->error-codes.\"\\n--Hostname: \".$result->hostname;\r\n //error_log(\"invalid: \\n\". $msg, 3, \"C:\\log\\log.txt\");\r\n return FALSE;\r\n }\r\n \r\n\treturn TRUE;\r\n }", "title": "" }, { "docid": "6fed2936815b06738bc208cdbfbd9165", "score": "0.58336395", "text": "function mucaptcha_add_error( &$err, $response ) {\n if ($response['error_code'] == NULL) {\n // The user didn't pass the challenge.\n $msg = __( '<strong>error</strong>: You didn\\'t pass the μcaptcha.', 'mucaptcha' );\n } else {\n // Some error happened while solving the challenge.\n $msg = sprintf( __( '<strong>μcaptcha error</strong>: %s.', 'mucaptcha' ), $response['error_code'] );\n $msg .= ' ' . sprintf( __( '<a href=\"%s\">More info</a>', 'mucaptcha' ), 'https://api.mucaptcha.com/v1/docs/#error-codes' );\n }\n $err->add( 'mucaptcha_error', $msg );\n}", "title": "" }, { "docid": "8ffd1825cd3967450a719e5e90799138", "score": "0.5792124", "text": "function sendRecaptcha( $reCapResponse ){\n // $reCapResponse = $params['g-recaptcha-response'];\n $reCapVerifyURL = 'https://www.google.com/recaptcha/api/siteverify';\n\n $ch = curl_init($reCapVerifyURL);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n $postData = ['secret' => RECAPTCHA_SECRET_KEY, 'response' => $reCapResponse ];\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n $reCapResponse = curl_exec($ch);\n if(curl_error($ch)) {\n // Recaptcha API error\n messageModal(\"There was an error while checking your data. Please try again.<p>\n\tIf you have any queries please contact: <p>\n\tChris Martin, phone: 021 2166436 or email: [email protected]\");\n exit();\n }\n curl_close($ch);\n $response = json_decode($reCapResponse);\n\terror_log($reCapResponse);\n if(!$response->success || $response->score < 0.6 ) {\n // Recaptcha robot detected\n messageModal(\"You do not appear to be a real person. Please try again.\");\n exit();\n }\n}", "title": "" }, { "docid": "bc08274510c4a76141d31f6d18f170d2", "score": "0.57756275", "text": "function rocaptcha_display()\n{\n\tglobal $db, $mybb, $templates, $captcha, $theme, $lang;\n\t\n\t$lang->load(\"rocaptcha\");\n\t\n\trequire_once('rocaptchalib.php');\n\tif($mybb->settings['captcha_status'] != \"no\" && $mybb->settings['captcha_public']!= \"\" && $mybb->settings['captcha_private'] != \"\"){\n\t\t$publickey = $mybb->settings['captcha_public'];\n\t\t$captcha_image = RoCaptcha::getHtml($publickey, null, $mybb->settings['captcha_language']);\n\t\teval(\"\\$captcha = \\\"\".$templates->get(\"register_captcha\").\"\\\";\");\n\t} else {\n\t\t$captcha = \"\";\n\t}\n}", "title": "" }, { "docid": "472e22393b641933ecc38226b5fa32e6", "score": "0.57457125", "text": "function rec($site_key,$co,$sa,$loc) {\n $ua = $_SERVER['HTTP_USER_AGENT'];\n $head = array(\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2'\n );\n $v=\"\";\n $cb=\"123456789\";\n $l2=\"https://www.google.com/recaptcha/api2/anchor?ar=1&k=\".$site_key.\"&co=\".$co.\"&hl=ro&v=\".$v.\"&size=invisible&cb=\".$cb;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $loc);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $h = curl_exec($ch);\n curl_close($ch);\n $h=str_replace('\\x22','\"',$h);\n $t1=explode('recaptcha-token\" value=\"',$h);\n $t2=explode('\"',$t1[1]);\n $c=$t2[0];\n $l6=\"https://www.google.com/recaptcha/api2/reload?k=\".$site_key;\n $p=array('v' => $v,\n 'reason' => 'q',\n 'k' => $site_key,\n 'c' => $c,\n 'sa' => $sa,\n 'co' => $co);\n $post=http_build_query($p);\n $head=array(\n 'Accept: */*',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2',\n 'Accept-Encoding: deflate',\n 'Content-Type: application/x-www-form-urlencoded;charset=utf-8',\n 'Content-Length: '.strlen($post).'',\n 'Connection: keep-alive');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l6);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $l2);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt ($ch, CURLOPT_POST, 1);\n curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);\n $h = curl_exec($ch);\n curl_close($ch);\n $t1=explode('rresp\",\"',$h);\n $t2=explode('\"',$t1[1]);\n $r=$t2[0];\n return $r;\n}", "title": "" }, { "docid": "472e22393b641933ecc38226b5fa32e6", "score": "0.57457125", "text": "function rec($site_key,$co,$sa,$loc) {\n $ua = $_SERVER['HTTP_USER_AGENT'];\n $head = array(\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2'\n );\n $v=\"\";\n $cb=\"123456789\";\n $l2=\"https://www.google.com/recaptcha/api2/anchor?ar=1&k=\".$site_key.\"&co=\".$co.\"&hl=ro&v=\".$v.\"&size=invisible&cb=\".$cb;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $loc);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $h = curl_exec($ch);\n curl_close($ch);\n $h=str_replace('\\x22','\"',$h);\n $t1=explode('recaptcha-token\" value=\"',$h);\n $t2=explode('\"',$t1[1]);\n $c=$t2[0];\n $l6=\"https://www.google.com/recaptcha/api2/reload?k=\".$site_key;\n $p=array('v' => $v,\n 'reason' => 'q',\n 'k' => $site_key,\n 'c' => $c,\n 'sa' => $sa,\n 'co' => $co);\n $post=http_build_query($p);\n $head=array(\n 'Accept: */*',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2',\n 'Accept-Encoding: deflate',\n 'Content-Type: application/x-www-form-urlencoded;charset=utf-8',\n 'Content-Length: '.strlen($post).'',\n 'Connection: keep-alive');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l6);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $l2);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt ($ch, CURLOPT_POST, 1);\n curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);\n $h = curl_exec($ch);\n curl_close($ch);\n $t1=explode('rresp\",\"',$h);\n $t2=explode('\"',$t1[1]);\n $r=$t2[0];\n return $r;\n}", "title": "" }, { "docid": "55bdba9f91858f58d16f23a05ce44085", "score": "0.5738289", "text": "public function CheckCaptchaAction()\r\n {\r\n $status = \"NOK\";\r\n\r\n $antiSpamCheck = $this->getRequest()->getParam('anti_spam_check');\r\n $antiSpamHumanResult = $this->getRequest()->getParam('anti_spam_human_result');\r\n\r\n //Anti Spam protection\r\n if (isset($antiSpamCheck) && isset($antiSpamHumanResult)) {\r\n if (mage::helper('CrmTicket/Captcha')->checkResult($antiSpamCheck, $antiSpamHumanResult)) {\r\n $status = \"OK\";\r\n }\r\n }\r\n \r\n echo $status;\r\n }", "title": "" }, { "docid": "fa634f6621166952a5d847c9a5444421", "score": "0.5713231", "text": "private function returnCaptchaMessage($captcha)\n {\n // Save form for submitting after getting captcha response\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n $captcha_fields = [];\n\n foreach ($captcha->find('input, button') as $input) {\n $captcha_fields[$input->name] = $input->value;\n }\n\n $_SESSION['captcha_fields'] = $captcha_fields;\n $_SESSION['captcha_action'] = $captcha->find('form', 0)->action;\n\n // Show captcha filling form to the viewer, proxying the captcha image\n $img = base64_encode(getContents($captcha->find('img', 0)->src));\n\n header('Content-Type: text/html', true, 500);\n\n $message = <<<EOD\n<form method=\"post\" action=\"?{$_SERVER['QUERY_STRING']}\">\n<h2>Facebook captcha challenge</h2>\n<p>Unfortunately, rss-bridge cannot fetch the requested page.<br />\nFacebook wants rss-bridge to resolve the following captcha:</p>\n<p><img src=\"data:image/png;base64,{$img}\" /></p>\n<p><b>Response:</b> <input name=\"captcha_response\" placeholder=\"please fill in\" />\n<input type=\"submit\" value=\"Submit!\" /></p>\n</form>\nEOD;\n\n die($message);\n }", "title": "" }, { "docid": "4370e741b60894c6dc40ba3adc9d0ca9", "score": "0.5711531", "text": "public function captcha(){\n\t\t$captcha = '<div class=\"g-recaptcha\" data-sitekey=\"' . $this->_settings['site_key'] . '\" data-theme=\"' . $this->_settings['theme'] . '\" data-type=\"' . $this->_settings['type'] . '\"></div>';\n\t\tif ($this->Form->isFieldError('g-recaptcha-response')) {\n \t\t$captcha = '<div class=\"error\">'.$captcha.$this->Form->error('g-recaptcha-response').'</div>';\n\t\t}\n\t\treturn $captcha;\n\t}", "title": "" }, { "docid": "fa1ea4edfdcb18a63f2618f62537d748", "score": "0.57039744", "text": "function scrape() \n {\n\t\t$index = $this->curl_home();\n\n\t\t$check = preg_match('/\\<IFRAME.*https\\:\\/\\/(.*)\\\"/Uis', $index, $match);\n\t\tif ( ! $check)\n\t\t\treturn false;\n\t\t$url = 'https://'.$match[1];\n\t\t$iframe = $this->curl_handler($url);\n\t\t$check = preg_match('/VIEWSTATE.*value\\=\\\"(.*)\\\"/Uis', $iframe, $match);\n\t\tif ( ! $check)\n\t\t\treturn false;\n\t\t$vs = $match[1];\n\t\t$check = preg_match('/EVENTVALIDATION.*value\\=\\\"(.*)\\\"/Uis', $iframe, $match);\n\t\tif ( ! $check)\n\t\t\treturn false;\n\t\t$ev = $match[1];\n\t\tforeach ($this->alphabet as $a1)\n\t\t{\n\t\t\tforeach ($this->alphabet as $a2)\n\t\t\t{\n\t\t\t\tif ( file_exists($this->cookies) ) { unlink($this->cookies); } //delete cookie file if it exists\n\t\t\t\t$index = $this->curl_index($ev, $vs, $a1.$a2);\n\t\t\t\t$check = preg_match('/NOTHING\\sFOUND/Uis', $index, $match);\n\t\t\t\tif ($check)\n\t\t\t\t\tcontinue;\t\t\n\t\t\t\t$check = preg_match_all('/details\\.aspx\\?cfn\\=(.*)\\'/Uis', $index, $matches);\n\t\t\t\tforeach ($matches[1] as $match)\n\t\t\t\t{\n\t\t\t\t\t$details = $this->curl_details($match);\n\t\t\t\t\t$extraction = $this->extraction($details);\n\t\t\t\t\tif ($extraction == 600) { $this->report->other = ($this->report->other + 1); $this->report->update(); break; }\n\t\t\t\t\tif ($extraction == 100) { $this->report->successful = ($this->report->successful + 1); $this->report->update(); }\n\t\t if ($extraction == 101) { $this->report->other = ($this->report->other + 1); $this->report->update(); }\n\t\t if ($extraction == 102) { $this->report->bad_images = ($this->report->bad_images + 1); $this->report->update(); }\n\t\t if ($extraction == 103) { $this->report->exists = ($this->report->exists + 1); $this->report->update(); }\n\t\t if ($extraction == 104) { $this->report->new_charges = ($this->report->new_charges + 1); $this->report->update(); }\n\t\t $this->report->total = ($this->report->total + 1); $this->report->update();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t$this->report->failed = ($this->report->other + $this->report->bad_images + $this->report->exists + $this->report->new_charges);\n\t\t$this->report->finished = 1;\n $this->report->stop_time = time();\n $this->report->time_taken = ($this->report->stop_time - $this->report->start_time);\n\t\t\n $this->report->update();\n\t\t$this->print_r2($this->report->as_array());\n return true;\n\t}", "title": "" }, { "docid": "63d5ee8a15542273b0a834440cf5ecca", "score": "0.56800073", "text": "function captcha_verify_captcha($recaptcha_challenge_field, $recaptcha_response_field)\r\n\t{\r\n\r\n\t \telgg_load_library('elgg:recaptcha');\r\n\t\t$privatekey = elgg_get_plugin_setting('privatekey', 'qli_recaptcha');\r\n\t\t$resp = recaptcha_check_answer ($privatekey,\r\n $_SERVER[\"REMOTE_ADDR\"],\r\n $recaptcha_challenge_field,\r\n $recaptcha_response_field);\r\n\r\n\t\tif (!$resp->is_valid) {\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "401c8bb4c7d5ef0b29c90f7905d3be6c", "score": "0.5676316", "text": "public abstract function captchaRender();", "title": "" }, { "docid": "45c54467d7b4742aa18164f30d65ee5d", "score": "0.5665212", "text": "public function test_is_valid() {\n $agent = new Test_Service_Recaptcha_Agent();\n $this->rcap->use_agent($agent);\n $agent->response = Net_HTTP::Response(\"false\\nError message\");\n\n $this->set_trap();\n try{\n $this->rcap->is_valid(Net_HTTP::Request());\n } catch (Service_Recaptcha_Exception $e) {\n $this->trap($e);\n }\n $this->\n assert_true($this->is_catch_prey())->\n assert_equal(\n $this->exception->message,\n 'For security reasons, you must pass the remote ip to reCAPTCHA'\n );\n\n $request = Net_HTTP::Request('http://test.com/', array('REMOTE_ADDR' => '192.168.0.1'))->\n parameters(array(\n 'recaptcha_challenge_field' => 'test_challenge_field',\n 'recaptcha_response_field' => 'test_response_field'\n ));\n $this->\n assert_false($this->rcap->is_valid($request))->\n assert_equal($this->rcap->error, 'Error message');\n\n $agent->response = Net_HTTP::Response(\"true\\n\");\n $this->\n assert_true($this->rcap->is_valid($request));\n\n $this->asserts->accessing->\n assert_read($agent, array(\n 'called_methods' => array(\n 'using_proxy' => array(array('proxy'), array('proxy')),\n 'send' => array(array('request' => $request), array('request' => $request)),\n 'timeout' => array(array(20), array(20))\n )\n ));\n\n }", "title": "" }, { "docid": "d93f245f6cfc4a8b6582aa447ade92b7", "score": "0.5654383", "text": "public function check_itn_response() {\n\t\t$this->handle_itn_request( stripslashes_deep( $_POST ) );\n\t}", "title": "" }, { "docid": "945e97726e46238c4231e1cb7a8edcd9", "score": "0.56171596", "text": "function create_captcha()\n {\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n $vals = array(\n 'img_path' => './images/captcha/',\n 'img_url' => IMAGE_URL.'captcha/',\n 'img_width' => 150,\n 'img_height' => 50\n );\n\n $cap = create_captcha($vals);\n\n $data = array(\n 'captcha_id' => '',\n 'captcha_time' => $cap['time'],\n 'ip_address' => $this->input->ip_address(),\n 'word' => $cap['word']\n );\n\n\n $this->db->query($this->Query_reader->get_query_by_code('insert_captcha_record', array('captcha_time'=>$data['captcha_time'], 'ip_address'=>$data['ip_address'], 'word'=>$data['word'])));\n\n $data['capimage'] = $cap['image'];\n $data['area'] = 'catpcha_image_view';\n\n $data = add_msg_if_any($this, $data);\n $this->load->view('incl/addons', $data);\n }", "title": "" }, { "docid": "4b5f118c6fd144b4ad8e36e42ce42a7b", "score": "0.56095576", "text": "function set_capthca_code()\n {\n //-----------------------------------------\n // Create new string\n //-----------------------------------------\n\n mt_srand( (double) microtime() * 1000000 );\n $final_rand = md5( uniqid( mt_rand(), TRUE ) );\n mt_srand();\n\n for( $i = 0; $i < 5; $i++ )\n {\n $captcha_string .= $final_rand{ mt_rand(0, 31) };\n }\n\n $captcha_string = str_replace('o', '0', $captcha_string);\n\n //-----------------------------------------\n // Add to the DB\n //-----------------------------------------\n\n $this->std->updateSession( $this->std->session_id, 'update', array('captcha' => $captcha_string) );\n\n //-----------------------------------------\n // Return string\n //-----------------------------------------\n\n return $captcha_string;\n }\n\n /*-------------------------------------------------------------------------*/\n // Captcha validate\n /*-------------------------------------------------------------------------*/\n\n function captcha_validate( $captcha_input )\n {\n //-----------------------------------------\n // INIT\n //-----------------------------------------\n\n $captcha_input = trim( strtolower($captcha_input) );\n\n //-----------------------------------------\n // Get the info from the DB\n //-----------------------------------------\n\n $captcha = $this->std->getValueSession( 'captcha' );\n\n if ( ! $captcha )\n {\n return FALSE;\n }\n\n //-----------------------------------------\n // Check...\n //-----------------------------------------\n\n if ( $captcha != $captcha_input )\n {\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }\n\n /*-------------------------------------------------------------------------*/\n // Show GD created security image...\n /*-------------------------------------------------------------------------*/\n function captcha_show( )\n {\n\n //-----------------------------------------\n // set captcha code\n //-----------------------------------------\n\n $content = $this->set_capthca_code();\n\n //-----------------------------------------\n // Is GD Available?\n //-----------------------------------------\n\n if ( !extension_loaded('gd') )\n {\n exit();\n }\n\n //-----------------------------------------\n // INIT\n //-----------------------------------------\n\n $content = ' '. preg_replace( \"/(\\w)/\", \"\\\\1 \", $content ) .' ';\n $tmp_x = 130;\n $tmp_y = 20;\n $image_x = 200;\n $image_y = 60;\n $circles = 3;\n $continue_loop = TRUE;\n $_started = FALSE;\n\n //-----------------------------------------\n // Get backgrounds and fonts...\n //-----------------------------------------\n\n $backgrounds = $this->get_backgrounds();\n\n //-----------------------------------------\n // Seed rand functions for PHP versions that don't\n //-----------------------------------------\n\n mt_srand( (double) microtime() * 1000000 );\n\n //-----------------------------------------\n // Got a background?\n //-----------------------------------------\n\n while ( $continue_loop )\n {\n if ( is_array( $backgrounds ) AND count( $backgrounds ) )\n {\n $i = mt_rand(0, count( $backgrounds ) - 1 );\n\n $background = $backgrounds[ $i ];\n $_file_extension = preg_replace( \"#^.*\\.(\\w{2,4})$#is\", \"\\\\1\", strtolower( $background ) );\n\n switch( $_file_extension )\n {\n case 'jpg':\n case 'jpe':\n case 'jpeg':\n if ( ! function_exists('imagecreatefromjpeg') OR ! $im = @imagecreatefromjpeg($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n case 'gif':\n if ( ! function_exists('imagecreatefromgif') OR ! $im = @imagecreatefromgif($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n case 'png':\n if ( ! function_exists('imagecreatefrompng') OR ! $im = @imagecreatefrompng($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n }\n }\n else\n {\n $continue_loop = FALSE;\n }\n }\n\n //-----------------------------------------\n // Continue with nice background image\n //-----------------------------------------\n\n $tmp = imagecreatetruecolor($tmp_x , $tmp_y );\n $tmp2 = imagecreatetruecolor($image_x, $image_y);\n\n $white = imagecolorallocate( $tmp, 255, 255, 255 );\n $black = imagecolorallocate( $tmp, 0, 0, 0 );\n $grey = imagecolorallocate( $tmp, 100, 100, 100 );\n $transparent = imagecolorallocate( $tmp2, 255, 255, 255 );\n $_white = imagecolorallocate( $tmp2, 255, 255, 255 );\n\n imagefill($tmp , 0, 0, $white );\n imagefill($tmp2, 0, 0, $_white);\n\n $num = strlen($content);\n $x_param = 0;\n $y_param = 0;\n\n for( $i = 0; $i < $num; $i++ )\n {\n if ( $i > 0 )\n {\n $x_param += rand( 6, 12 );\n\n if( $x_param + 18 > $image_x )\n {\n $x_param -= ceil( $x_param + 18 - $image_x );\n }\n }\n\n $y_param = rand( 0, 5 );\n\n $randomcolor = imagecolorallocate( $tmp, 0, 0, 0 );//imagecolorallocate( $tmp, rand(50,200), rand(50,200),rand(50,200) );\n\n imagestring( $tmp, 5, $x_param + 1, $y_param + 1, $content{$i}, $grey );\n imagestring( $tmp, 5, $x_param , $y_param , $content{$i}, $randomcolor );\n }\n\n imagecopyresized($tmp2, $tmp, 0, 0, 0, 0, $image_x, $image_y, $tmp_x, $tmp_y );\n\n $tmp2 = $this->create_wave( $tmp2, 10 );\n\n imagecolortransparent( $tmp2, $transparent );\n imagecopymerge( $im, $tmp2, 0, 0, 0, 0, $image_x, $image_y, 100 );\n\n imagedestroy($tmp);\n imagedestroy($tmp2);\n\n\n //-----------------------------------------\n // Blur?\n //-----------------------------------------\n\n if ( function_exists( 'imagefilter' ) )\n {\n @imagefilter( $im, IMG_FILTER_GAUSSIAN_BLUR );\n }\n\n //-----------------------------------------\n // Render a border\n //-----------------------------------------\n\n $black = imagecolorallocate( $im, 0, 0, 0 );\n\n imageline( $im, 0, 0, $image_x, 0, $black );\n imageline( $im, 0, 0, 0, $image_y, $black );\n imageline( $im, $image_x - 1, 0, $image_x - 1, $image_y, $black );\n imageline( $im, 0, $image_y - 1, $image_x, $image_y - 1, $black );\n\n //-----------------------------------------\n // Show it!\n //-----------------------------------------\n\n @header( \"Content-Type: image/jpeg\" );\n\n imagejpeg( $im );\n imagedestroy( $im );\n\n exit();\n }\n\n /*-------------------------------------------------------------------------*/\n // Create wave effect for GD images...\n /*-------------------------------------------------------------------------*/\n\n function create_wave( $im, $wave=10 )\n {\n $_width = imagesx( $im );\n $_height = imagesy( $im );\n\n $tmp = imagecreatetruecolor( $_width, $_height );\n\n $_direction = ( time() % 2 ) ? TRUE : FALSE;\n\n for ( $x = 0; $x < $_width; $x++ )\n {\n for ( $y = 0 ; $y < $_height ; $y++ )\n {\n $xo = $wave * sin( 2 * 3.1415 * $y / 128 );\n $yo = $wave * cos( 2 * 3.1415 * $x / 128 );\n\n $_x = $x - $xo;\n $_y = $y - $yo;\n\n if ( ($_x > 0 AND $_x < $_width) AND ($_y > 0 AND $_y < $_height) )\n {\n $index = imagecolorat($im, $_x, $_y);\n $colors = imagecolorsforindex($im, $index);\n $color = imagecolorresolve( $tmp, $colors['red'], $colors['green'], $colors['blue'] );\n }\n else\n {\n $color = imagecolorresolve( $tmp, 255, 255, 255 );\n }\n\n imagesetpixel( $tmp, $x, $y, $color );\n }\n }\n\n return $tmp;\n }\n\n /*-------------------------------------------------------------------------*/\n // Load up the backgrounds\n /*-------------------------------------------------------------------------*/\n\n function get_backgrounds()\n {\n //-----------------------------------------\n // INIT\n //-----------------------------------------\n\n $images = array();\n $_path = $this->path_background;\n\n if ( $_dir = @opendir( $_path ) )\n {\n while( false !== ( $_file = @readdir( $_dir ) ) )\n {\n if ( preg_match( \"#\\.(gif|jpeg|jpg|png)$#i\", $_file ) )\n {\n $images[] = $_path . '/' . $_file;\n }\n }\n }\n\n return $images;\n }\n\n}", "title": "" }, { "docid": "773cd0a277da04ffcf02b6f162c89f5c", "score": "0.5600996", "text": "function captchaform(){\n\t\t// Set the reCAPTCHA public key\n\t\t$publickey = \"6LdKjsISAAAAAPGSU-_hiN9V5NPQHW77dmgoMXaG\"; \n\n\t\t// Output the reCAPTCHA form\n\t\techo recaptcha_get_html($publickey);\n\t}", "title": "" }, { "docid": "3a5f62dbd0db8cd5598ba44eb4970e32", "score": "0.5599884", "text": "private function generateCaptcha() {\n // 1.0 = high distortion, higher numbers = more distortion\n $this->perturbation = .90;\n // image background color\n $this->image_bg_color = new Securimage_Color(\"#CCCCCC\");\n // captcha text color\n $this->text_color = new Securimage_Color(\"#333333\");\n // color of lines over the image\n $this->line_color = new Securimage_Color(\"#333333\");\n\n $this->show();\n }", "title": "" }, { "docid": "4c0cc03867b7bae30c83eaa8d2b41954", "score": "0.5593418", "text": "private function _google_recaptcha_check($responce) {\r\n if( $curl = curl_init() ) {\r\n curl_setopt($curl, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify');\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($curl, CURLOPT_POST, true);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, \"secret=6LcSzxMTAAAAAEQ-OI2o-vq1NAwrI9EPxSXi8ieJ&response=\".strip_tags(urlencode($responce)));\r\n $out = curl_exec($curl);\r\n curl_close($curl);\r\n $result = json_decode($out);\r\n if($result->success == 'true') {\r\n return true;\r\n }\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "d647fd88e177f78bb3c8d8ab2ec86d1f", "score": "0.5591118", "text": "function code() {\n\t\t$this->input('captcha',\n\t\t\tfunction($value) {\n\t\t\t\tif (!F3::exists('message')) {\n\t\t\t\t\tif (empty($value))\n\t\t\t\t\t\tF3::set('message',\n\t\t\t\t\t\t\t'Verification code required');\n\t\t\t\t\telseif (strlen($value)>strlen($_SESSION['captcha']))\n\t\t\t\t\t\tF3::set('message',\n\t\t\t\t\t\t\t'Verification code is too long');\n\t\t\t\t\telseif (strtolower($value)!=$_SESSION['captcha'])\n\t\t\t\t\t\tF3::set('message',\n\t\t\t\t\t\t\t'Invalid verification code');\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "501c5bd824bb0a58ed317c92b74356f9", "score": "0.5580887", "text": "function bimber_youzer_snax_login_recaptcha_unavailability_info() {\n\t$settings_url = admin_url( 'admin.php?page=yz-membership-settings&tab=captcha' );\n\n\techo '<span class=\"notice notice-warning\" style=\"padding: 4px 10px;\">';\n\tprintf( esc_html_x( 'Youzer plugin is active and overrides this option. Manage the captcha protection using Youzer %s', 'Youzer Integration', 'bimber' ), '<a href=\"'. esc_url( $settings_url ) .'\" target=\"_blank\">'. esc_html__( 'captcha settings', 'youzer' ) .'</a>' );\n\techo '</span>';\n}", "title": "" }, { "docid": "3eeb2ec46bfb656dacbe8f9c7b945e31", "score": "0.5578057", "text": "public function plxShowCapchaQ() {\n\tif ($this->enable && $this->hashes_comment>0)\n\t\techo '\n\t\t<script src=\"https://authedmine.com/lib/captcha.min.js\" async></script>\n\t\t<div class=\"coinhive-captcha\" \n\t\tdata-hashes=\"'.$this->hashes_comment.'\"\n\t\tdata-key=\"'.$this->public_key.'\"\n\t\tdata-whitelabel=\"false\"\n\t\tdata-disable-elements=\"input[type=submit]\"\n\t\t>\n\t\t'.$this->getLang('L_MESSAGE').'\n\t\t</div>\n\t\t<?php return true; ?>';\n\t}", "title": "" }, { "docid": "27c6f3abce0d05244bd1d9d4c7ef4efa", "score": "0.55768925", "text": "public function curlSubmit() {\n// $useragent = sanitizeInput($_SERVER['HTTP_USER_AGENT']);\n require_once ('config.php');\n foreach($_SESSION[$this->formName] as $k=>$p){\n $data[$k]=sanitizeInput(decodeInput($p));\n }\n\n\n $h = curl_init();\n curl_setopt($h, CURLOPT_URL, $this->formSubmitUrl);\n curl_setopt($h, CURLOPT_PROXY, $proxy);\n curl_setopt($h, CURLOPT_POST, true);\n curl_setopt($h, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($h, CURLOPT_HEADER, true);\n curl_setopt($h, CURLOPT_RETURNTRANSFER, true);\n// curl_setopt($h,CURLOPT_USERAGENT, $useragent);\n// curl_setopt( $h, CURLOPT_COOKIE, $strCookie );\n curl_setopt($h, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($h,CURLOPT_FAILONERROR,true);\n\n $result = curl_exec($h);\n\n $result_header_size = curl_getinfo($h, CURLINFO_HEADER_SIZE);\n $result_header = substr($result, 0, $result_header_size);\n $result_body = substr($result, $result_header_size);\n $httpCode = curl_getinfo($h, CURLINFO_HTTP_CODE);\n\n\n if(curl_errno($h)>0) {\n require_once ('notification.php');\n $to = \"[email protected]\";\n $subject = \"Form Submission Failure\";\n $message = \"Submission failed to :\".$this->formSubmitUrl.\"\\n\";\n $message .= \"Form Name :\".$this->formName.\"\\n\";\n $message .= \"Referer :\".$this->formReferer.\"\\n\";\n $headers = \"From :\".$this->formReferer;\n// echo \"<pre> Message :\".$message.\"</pre>\";\n new notifier($to, $subject, $message, $headers);\n }\n else if(preg_match('/Location: (.*)/',$result_header,$r)) {\n header('location: '.sanitizeInput(trim($r[1])));\n exit;\n }\n else {\n// echo \"<pre><strong>BODY(\".preg_match('/Location: (.*)/',$result_header).\")</strong></pre>\";\n echo $result_body;\n }\n curl_close($h);\n\n }", "title": "" }, { "docid": "b711ca70e7db09b0070a49aacd7cb6bd", "score": "0.55754274", "text": "function recaptcha_get_html($error = null, $use_ssl = false)\r\n\t{\r\n\t\t/*\r\n\t\tif ($this->_rConfig['public'] == '') {\r\n\t\tif ($pubkey == null || $pubkey == '') {\r\n\t\t\tdie (\"To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>\");\r\n\t\t}\r\n\t\t*/\r\n\t\t$server = $this->_rConfig['RECAPTCHA_API_SERVER'];\r\n\t\tif ($use_ssl)\r\n\t\t{\r\n\t\t\t$server = $this->_rConfig['RECAPTCHA_API_SECURE_SERVER'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$server = $this->_rConfig['RECAPTCHA_API_SERVER'];\r\n\t\t}\r\n\t\t$errorpart = \"\";\r\n\t\tif ($error)\r\n\t\t{\r\n\t\t $errorpart = \"&amp;error=\".$error;\r\n\t\t}\r\n\t\treturn '<script type=\"text/javascript\" src=\"'.$server.'/challenge?k='.$this->_rConfig['public'].$errorpart.'\"></script>\r\n\t<noscript>\r\n\t\t<iframe src=\"'. $server.'/noscript?k='.$this->_rConfig['public'].$errorpart.'\" height=\"300\" width=\"500\" frameborder=\"0\"></iframe><br/>\r\n\t\t<textarea name=\"recaptcha_challenge_field\" rows=\"3\" cols=\"40\"></textarea>\r\n\t\t<input type=\"hidden\" name=\"recaptcha_response_field\" value=\"manual_challenge1\"/>\r\n\t</noscript>';\r\n\t}", "title": "" }, { "docid": "bb79b374156a28aee47d65f15c106018", "score": "0.5554044", "text": "public function initRenderCaptchaHTML()\n {\n $html = '';\n// if ($this->getOption('hideBadge', false)) {\n// $html .= '<style>.grecaptcha-badge{display:none;!important}</style>' . PHP_EOL;\n// }\n\n $this->renderedTimes++;\n return $html;\n }", "title": "" }, { "docid": "9a95ad24388cc98a6064931c554408c6", "score": "0.55413467", "text": "public function testDisplayVerifyTrue(): void\n {\n $this->post($this->getDisplayActionUrl($this->example), ['g-recaptcha-response' => 'foo']);\n $this->assertResponseOk();\n $this->assertResponseContains($this->example);\n }", "title": "" }, { "docid": "fc1f547b420af1b9d9c28f5d7215d7be", "score": "0.55248433", "text": "function mucaptcha_post_request($url, $data)\n{\n $options = array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_SSL_VERIFYPEER => TRUE,\n CURLOPT_HEADER => FALSE,\n CURLOPT_POST => TRUE,\n CURLOPT_POSTFIELDS => $data,\n );\n $ch = curl_init();\n curl_setopt_array($ch, $options);\n $content = curl_exec($ch);\n curl_close($ch);\n return $content;\n}", "title": "" }, { "docid": "c45e1acab52e0e66d8e9c67776f8446e", "score": "0.5524679", "text": "function get_problem_match()\n{\n header('Content-type: text/plain; charset=' . get_charset());\n\n $version = get_param_string('version');\n $error_message = get_param_string('error_message', false, true);\n\n $output = get_problem_match_nearest($error_message);\n if (!is_null($output)) {\n echo $output;\n }\n}", "title": "" }, { "docid": "2a96ebfcf9dc2b9fa8631e36aea00983", "score": "0.55236423", "text": "function ReportFailure($szReason, $RA, $SERIALNUMBER, $MBIP, $PORT, $MB)\r\n{ Header(\"WWW-Authenticate: Basic realm=\\\"UploadRealm\\\"\"); // realm name is actually ignored by the AcquiSuite.\r\n Header(\"HTTP/1.0 406 Not Acceptable\");\r\n $szNotes = sprintf(\"Rejected logfile upload from %s Serial %s, modbus ip %s:%s, modbus device %s.\", $RA, $SERIALNUMBER, $MBIP, $PORT, $MB);\r\n printf(\"FAILURE: $szReason\\n\"); // report failure to client.\r\n printf(\"NOTES: $szNotes\\n\");\r\n ob_end_flush(); // send cached stuff, and stop caching. we've already kicked out the last header line.\r\n \r\n syslog(LOG_ERR, \"$PHP_SELF: $szNotes Reason: $szReason \\n\");\r\n exit; \r\n}", "title": "" }, { "docid": "499358c99d51dc0d84be2daae9280123", "score": "0.55076754", "text": "public function testCaptchaNotReusable()\n {\n $form = $this->getForm('captcha.html');\n $html = \"$form\";\n\n $captchaValue = $form->getField('code')->getCaptchaValue();\n\n $this->assertAccept($form, array(\n 'code' => $captchaValue\n ));\n\n $this->assertRefuse($form, array(\n 'code' => $captchaValue\n ));\n }", "title": "" }, { "docid": "b18a27cc4afc2224e892b09da8d50f2f", "score": "0.5506429", "text": "private function setCaptchaCode()\n\t{\n\t\t$Pass= Controler_Main::getInstance()->getRandomPass(5);\n\t\t$_SESSION['Captcha']=$Pass;\n\t}", "title": "" }, { "docid": "9af85fdcf5efcdb9f9bda401bf88bd3d", "score": "0.54899853", "text": "public function generateCaptcha()\n {\n // create a captcha with the CaptchaBuilder lib\n $builder = new CaptchaBuilder;\n $builder->build();\n\n // write the captcha character into session\n $_SESSION['captcha'] = $builder->getPhrase();\n\n // render an image showing the characters (=the captcha)\n header('Content-type: image/jpeg');\n $builder->output();\n }", "title": "" }, { "docid": "5889ab7352baa32b3e039aa5b42d7a43", "score": "0.54745746", "text": "function checkComment($comment, $time, $nogarbageplease) {\n // check 1: a field hidden by CSS that humans can't see. Only machines would see it and fill it out.\n if ($nogarbageplease != \"\")\n return __('Sorry, your comment has not been entered due to our internal spam filtering. Please try again.').'<a href=\"javascript:back()\">Go back.</a>';\n // check 2: Entering comments too fast lets me think it has been done by a machine\n if ($time < 1000 and $time != '') \n return __('wow, you sure entered your comment quick. So quick, actually, that I labeled you as a machine and your comment as spam. Your comment has not been saved.');\n $stripped_comment = strip_tags($comment, '<b><i><ul><ol><li><br><p><strong><em><span>');\n if ($comment != $stripped_comment) \n return __('Your text contains HTML tags. Those are not allowed. You can use one of those: &lt;b&gt;&lt;i&gt;&lt;ul&gt;&lt;ol&gt;&lt;li&gt;&lt;br&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt; Your comment has not been saved.'); \n // check 3: was there a reCAPTCHA response?\n $php_version = explode('.', phpversion());\n $sys_info = getSysInfo();\n if ($sys_info['use_captchas'] == 1) {\n if ($_POST[\"recaptcha_response_field\"]){ \n $resp = recaptcha_check_answer($sys_info['private_captcha_key'],\n $_SERVER[\"REMOTE_ADDR\"],\n $_POST[\"recaptcha_challenge_field\"],\n $_POST[\"recaptcha_response_field\"]);\n if (!$resp->is_valid) return __('You failed the Captcha: ').$resp->error;\n }else if ($_POST[\"recaptcha_response_field\"] == \"\") return __('You failed the Captcha. Provide a solution, please.');\n }\n return \"\";\n}", "title": "" }, { "docid": "80c4aba4e798306b893eb98639eb7fce", "score": "0.54704005", "text": "public function message()\n {\n return 'Supplied incorrect reCAPTCHA answer.';\n }", "title": "" }, { "docid": "086ed95c9d9e8ae14a944b7cd3c6fbe5", "score": "0.54688567", "text": "public static function verify_recaptcha() {\r\r\n $settings = get_option( 'super_settings' );\r\r\n $url = 'https://www.google.com/recaptcha/api/siteverify';\r\r\n $args = array(\r\r\n 'secret' => $settings['form_recaptcha_secret'], \r\r\n 'response' => $_REQUEST['response']\r\r\n );\r\r\n // @since 1.2.2 use wp_remote_post instead of file_get_contents because of the 15 sec. open connection on some hosts\r\r\n $response = wp_remote_post( \r\r\n $url, \r\r\n array(\r\r\n 'timeout' => 45,\r\r\n 'body' => $args\r\r\n )\r\r\n );\r\r\n if ( is_wp_error( $response ) ) {\r\r\n $error_message = $response->get_error_message();\r\r\n echo \"Something went wrong: $error_message\";\r\r\n } else {\r\r\n $result = json_decode( $response['body'], true );\r\r\n if( $result['success']==true ) {\r\r\n echo 1; //Success!\r\r\n\r\r\n }else{\r\r\n echo 1; //Error!\r\r\n }\r\r\n }\r\r\n die();\r\r\n }", "title": "" }, { "docid": "fdb89a40bc6bc8de6f1dc697241abbcc", "score": "0.54681456", "text": "function check_captcha()\n{\n\tglobal $error;\n\t\n\tif($_SESSION['security_number'] != $_POST['captcha'])\n\t{\n\t\t$error = lang('captcha_false');\n\t}\n}", "title": "" }, { "docid": "4b6eda94eacb9948df0f76e635454f5a", "score": "0.5441464", "text": "function failsCaptcha($code){\n $rval = true;\n return false;\n if(C_IMAGE_VERIFICATION == 'true' && !empty($code)) { //Some templates may not have the iamge verification enabled\n if (!PhpCaptcha::Validate($code)){\n $rval = false;\n }\n }\n return $rval;\n }", "title": "" }, { "docid": "9726abe02258bb1c5863d0ede74e3218", "score": "0.5439229", "text": "public function generateChallenge()\n {\n // Complexity setting is used as character count\n $this->response = (string) ByteString::fromRandom(max(1, intval(Captcha::$config['complexity'] / 1.5)), '2345679ACDEFHJKLMNPRSTUVWXYZ');\n\n return $this->response;\n }", "title": "" }, { "docid": "2e10b09ccbb794fd4f19345ff4a3b17f", "score": "0.5425449", "text": "function scr_failed_login () { return 'The login information you have entered is incorrect. Please try again.'; }", "title": "" }, { "docid": "bb53802dd5a581a57699ee226ad3c7d5", "score": "0.5420294", "text": "public function get_recaptcha_response()\n {\n return $this->is_valid;\n }", "title": "" }, { "docid": "3386607074677bb3e4ce10cbd6826cc5", "score": "0.54201096", "text": "public function testStrength () {\r\n\r\n\t\t$passworded= $this->password;\r\n\t\t$response=\"\";\r\n\t\t//ensure that there is already a value for password\r\n\t\tif (isset($passworded)) {\r\n\t\t\t\tif (strlen($passworded) < 6 ) {\r\n\t\t\t\t\t$response .= \"<section class='card-panel hoverable red lighten-1 white-text'> Please your password must be at least six letters </section>\";\r\n\r\n\t\t\t\t}\r\n\t\t\t\t//check for whitespace\r\n\t\t\t\tif ( preg_match('/\\s/',$passworded) ) {\r\n\t\t\t\t\t$response .= \"<section class='card-panel hoverable red lighten-1 white-text'> Please your password must not contain any whitespace </section>\";\r\n\t\t\t\t}\r\n\t\t\t\t//check for CAPS\r\n\t\t\t\tif( !preg_match(\"#[A-Z]+#\", $passworded) ) {\r\n\r\n\t\t\t\t\t$response .= \"<section class='card-panel hoverable red lighten-1 white-text'> Please your password must include at least one CAPITAL LETTER </section> \";\r\n\t\t\t\t}\r\n\t\t\t\t//check for at least 1 number\r\n\t\t\t\tif( !preg_match(\"#[0-9]+#\", $passworded) ) {\r\n\t\t\t\t\t$response .= \"<section class='card-panel hoverable red lighten-1 white-text'> Please your password must include at least 1 number </section> \";\r\n\t\t\t\t}\r\n\t\t\t\t//check for symbol\r\n\t\t\t\tif( !preg_match('/[!@#$%^&*()\\-_=+{};:,<.>]/', $passworded) ) {\r\n\t\t\t\t\t$response .= \"<section class='card-panel hoverable red lighten-1 white-text'> Password must include at least one symbol ! </section> \";\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if there's a symbol, we still check to ensure its either $#-_or $\r\n\t\t\t\tif ( preg_match('/[!@#$%^&*()\\-_=+{};:,<.>]/', $passworded) ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tif ( !(strstr($passworded,\"$\") || strstr($passworded,\"#\") || strstr($passworded,\"-\") || strstr($passworded,\"_\") || strstr($passworded,\"&\") ) ) {\r\n\r\n\t\t\t\t\t\t\t\t$response.= \"<section class='card-panel hoverable red lighten-1 white-text'> Only the following symbols are allowed '$ # - _ &' </section>\";\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if there's no badnews, then its only good news! Our password is solid! \r\n\t\t\t\tif (empty($response)){\r\n\t\t\t\t\t\t$response=\"<section class='card-panel hoverable green lighten-1 white-text'> Congratulations, your password is secure and has been set </section>\";\r\n\t\t\t\t\t}\r\n\t\t\t\treturn $response;\r\n\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "2e233c41ce559ce0b55aa5d9a580fe55", "score": "0.5414179", "text": "function _form_captcha($element)\n {\n\n // Global CI so we can use CI session class\n global $CI;\n\n $return = '';\n\n // Create and store captcha image\n $cap = $this->_setCaptcha(5);\n\n // Set up return string\n $return .= form_input($element['attributes']);\n $return .= '&nbsp;';\n $return .= $cap['image'];\n //$cap['image'] | $cap['word'];\n\n // Store captcha string in session.\n $newdata = array('captcha_word' => $cap['word']);\n $CI->session->set_userdata($newdata);\n\n return $return;\n }", "title": "" }, { "docid": "936ce83b3609601f7257e436bc84b7d8", "score": "0.540876", "text": "public function getCaptcha()\n\t{\n\t\t\n\t\t//Header (\"Content-type: image/png\");\n\t\t// Laden der Rohdatei, die sich im Verzeichnis befinden muss\n\t\t\n\t\t$Pic = ImageCreate(250, 250);\n\t\t$Background=imagecreatefrompng(\"./images/Captcha.png\");\n\t\tImageCopy($Pic,$Background,0,0,$_SESSION['Random'][$_SESSION['PicCounter']],$_SESSION['Random'][$_SESSION['PicCounter']],250,250);\n\t\t//$Font=imageloadfont(\"./images/font/sector_017.ttf\");\n\t\t$farbe_w = ImageColorAllocate ($Pic, 255, 255, 255);\n\t\t$farbe_b = ImageColorAllocate ($Pic, 0, 0, 0);\n\n\t\tImageString($Pic,5, mt_rand(120,160), mt_rand(50,90), $_SESSION['Captcha'][0], $farbe_b);\n\t\tImageString($Pic, 5, mt_rand(165,175), mt_rand(125,150), $_SESSION['Captcha'][1], $farbe_b);\n\t\tImageString($Pic, 5, mt_rand(120,150), mt_rand(190,220), $_SESSION['Captcha'][2], $farbe_b);\n\t\tImageString($Pic, 5, mt_rand(60,100), mt_rand(170,210), $_SESSION['Captcha'][3], $farbe_b);\n\t\tImageString($Pic, 5, mt_rand(60,100), mt_rand(100,140), $_SESSION['Captcha'][4], $farbe_b);\t\n\n\t\theader (\"Content-type: image/png\");\n\t\tImagePNG ($Pic);\n\t\tImageDestroy ($Pic);\n\t\t\n\t\t\n\t\t\n\t\t/*header (\"Content-type: image/png\");\n\t\t$mein_bild = ImageCreate (300, 150);\n\t\t$blau = ImageColorAllocate ($mein_bild, 21, 0, 177);\n\t\t$gruen = ImageColorAllocate ($mein_bild, 50,148,0);\n\t\t$rot = ImageColorAllocate ($mein_bild, 255,0,25);\n\t\t$hellblau = ImageColorAllocate ($mein_bild,0,255,242);\n\t\timageFilledRectangle($mein_bild,20,20,280,130,$blau);\n\t\timagearc($mein_bild,150,75,50,50,0,360,$rot);\n\t\timageline($mein_bild,0,0,300,150,$hellblau);\n\t\timagedashedline($mein_bild,0,150,300,0,$hellblau);\n\t\t$polygon_werte=array(20,130,50,110,70,90,90,50,110,100,120,150);\n\t\timagepolygon($mein_bild,$polygon_werte,6,$hellblau);\n\t\tImageString ($mein_bild, 10, 22, 5, \"Was würde Picasso dazu sagen\", $gruen);\n\t\tImagePNG ($mein_bild);*/\n\t\t\n\t\t\n\t\t\n\t\treturn false;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "6b1a23551629e0497f77b9204006218e", "score": "0.54014206", "text": "public function getAction()\n {\n if ($this->captcha instanceof \\TimurFlush\\PhalconCaptcha\\Adapter\\Image) {\n $this->response->setContentType('image/png');\n $this->response->setHeader(\"Expires\", \"Wed, 1 Jan 1997 00:00:00 GMT\");\n $this->response->setHeader(\"Last-Modified\", gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n $this->response->setHeader(\"Cache-Control\", \"no-store, no-cache, must-revalidate, post-check=0, pre-check=0\");\n $this->response->setHeader(\"Pragma\", \"no-cache\");\n $this->response->sendHeaders();\n\n $params = $this->dispatcher->getParams();\n\n do {\n if (!isset($params[0]))\n break;\n\n $matches = [];\n if (!preg_match('/^(.+)-(.+)-(.+)$/', $params[0], $matches))\n break;\n\n $this->setWidthHeightFontSize((int)$matches[1], (int)$matches[2], (int)$matches[3]);\n\n if (!isset($params[1]))\n break;\n\n $matches = [];\n if (preg_match('/^(.+)-(.+)-(.+)-(.+)$/', $params[1], $matches)){\n $this->setFontRGBA((int)$matches[1], (int)$matches[2], (int)$matches[3], (int)$matches[4]);\n }else if (preg_match('/^(.+)-(.+)-(.+)$/', $params[1], $matches)){\n $this->setFontRGBA((int)$matches[1], (int)$matches[2], (int)$matches[3]);\n }else{\n break;\n }\n\n if (!isset($params[2]))\n break;\n\n $matches = [];\n if (preg_match('/^(.+)-(.+)-(.+)-(.+)$/', $params[2], $matches)){\n $this->setBackgroundRGBA((int)$matches[1], (int)$matches[2], (int)$matches[3], (int)$matches[4]);\n }else if (preg_match('/^(.+)-(.+)-(.+)$/', $params[2], $matches)){\n $this->setBackgroundRGBA((int)$matches[1], (int)$matches[2], (int)$matches[3]);\n }else{\n break;\n }\n\n }while(false);\n\n $this->captcha->showImage();\n }\n }", "title": "" }, { "docid": "4df38bca6731636ad4ece9239d175e45", "score": "0.53952914", "text": "public function send_too_many_attempts(){\r\n\t\t$mUsuario1 = \"Has superado el número de intentos.<br>Por favor contacta con nosotros en la siguiente dirección:<br>[email protected]\";\r\n\t\t$mUsuario2 = \"Los datos que hemos recogido son los siguientes:<br>\";\r\n\t\t$datos_del_registro_usuario = \"Nombre y apellidos: \" . $this->user->getNombre() . \" \" . $this->user->getApellidos() . \"<br>\" . $this->user->getDireccion() . \" - \" . $this->user->getPoblacion() . \"<br>\" . $this->user->getCP() . \" (\" . $this->user->getProvincia() . \")<br>Factura: \" . $this->user->getFct() . \"<br><strong>IMEI: \" . $this->user->getIMEI() . \"</strong>\" ;\r\n\t\t$pieUsuario = \"<br>Huawei Technologies España, S.L.<br>Parque Empresarial Las Tablas<br>C/Federico Mompou 5 edif 1 Planta 5<br>28050 Madrid<br>\";\r\n\r\n\t\t$htmlContent = '\r\n\t\t<html>\r\n\t\t<head>\r\n\t\t<title>Honor X The Brave</title>\r\n\t\t</head>\r\n\t\t<body>\r\n\t\t<main>\r\n\t\t<p>' . $mUsuario1. '</p>\r\n\t\t<p>' . $mUsuario2. '</p>\r\n\t\t<p>' . $datos_del_registro_usuario. '</p>\r\n\t\t</main>\r\n\t\t<footer>\r\n\t\t<p>' . $pieUsuario . '</p>\r\n\t\t<img src=\"http://dashboard.introworkshop.com/honor/img/honor-banner.png\" alt=\"honor-banner-jpg\">\r\n\t\t</footer>\r\n\t\t</body>\r\n\t\t</html>';\r\n\r\n\t\t// Set content-type header for sending HTML email\r\n\t\t$headers_user = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n\t\t$headers_user .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\r\n\r\n\t\t// Additional headers\r\n\t\t$headers_user .= 'From:HonorXtheBrave<[email protected]>' . \"\\r\\n\";\r\n\t\tmail($this->user->getMail(), \"PROMOCIÓN HONOR\", '' . $htmlContent, $headers_user);\r\n\t}", "title": "" }, { "docid": "519679891a2ef4a4ab829c941f1c86fe", "score": "0.53900653", "text": "public function captchaResponse(): bool\n {\n foreach ($this->captcha as $captcha) {\n if (! $captcha->response()) {\n return false;\n }\n }\n\n if (! empty($this->isLimitSession)) {\n $this->result = $this->sessionHandler(self::RESPONSE_ALLOW);\n }\n\n return true;\n }", "title": "" }, { "docid": "d318ebea71a4c08182a2f7454291385a", "score": "0.5385259", "text": "function filter_wpcf7_response_output( $output, $class, $content, $out_obj, $status ){\n //$output = str_replace( ' wpcf7-mail-sent-ok', ' alert alert-success', $output );\n error_log('cf7--out--->' . print_r($output, true));\n error_log('cf7--cl--->' . print_r($class, true));\n error_log('cf7--co--->' . print_r($content, true));\n error_log('cf7--obj--->' . print_r($out_obj, true));\n error_log('cf7--st--->' . print_r($status, true));\n return $output; \n}", "title": "" }, { "docid": "b4022b57d1bb9b6b57cb3fad027de42b", "score": "0.53601104", "text": "function _valid_captcha($str)\n\t{\n//\t\t{\n//\t\t\treturn true;\n//\t\t}\n//\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f7569d393787a22ef045f1ad1d9fee6e", "score": "0.5357767", "text": "function check_ipn_response()\n {\n @ob_clean();\n Logger::debug('check_ipn_response: ');\n if (isset($_POST)) {\n header('HTTP/1.1 200 OK');\n $this->check_ipn_request_is_valid($_POST);\n } else {\n echo \"Ocurrio un error al procesar su Compra\";\n }\n }", "title": "" }, { "docid": "e3dd0eb1480699b5f93abb23acc535de", "score": "0.53557014", "text": "public function message()\n {\n return 'Por favor Complete el ReCaptcha.';\n }", "title": "" }, { "docid": "ef302e9fac5c1d9152c62ef4ff9183a8", "score": "0.533038", "text": "public function testSuccessWithWrongInputs()\n {\n $this->RecaptchaResponse->setSuccess('ee');\n $this->assertEquals(null, $this->RecaptchaResponse->isSuccess());\n\n $this->RecaptchaResponse->setSuccess(['eee', 'e']);\n $this->assertEquals(null, $this->RecaptchaResponse->isSuccess());\n }", "title": "" }, { "docid": "8a3bc0dad576028838cd731572ec703c", "score": "0.53302646", "text": "public function validate()\n\t{\n\t\t$sessionName ='captcha_' . $this->strId;\n\t\t$arrCaptcha = $_SESSION[$sessionName];\n\n\t\t$length = ($this->nic_length) ? $this->nic_length : $GLOBALS['TL_CONFIG']['nic_length'];\n\n\t\tif (!is_array($arrCaptcha) || !strlen($arrCaptcha['key']) || !strlen($arrCaptcha['nic_sum']) || \\Input::post($arrCaptcha['key']) != $arrCaptcha['nic_sum'])\n\t\t{\n\t\t\t$this->class = 'error';\n\t\t\t$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['imagecaptcha'],$length));\n\t\t}\n\n\t\t$_SESSION['captcha_' . $this->strId] = '';\n\t}", "title": "" }, { "docid": "3fb14b2e223247f5159a0938fc584ae3", "score": "0.5328142", "text": "public function captchaSite()\n\t{\n\t\t$this->fetchSettings();\n\n\t\t$this->DB->prepare(\"SELECT id, domain, status FROM stores WHERE id = ?\", [\n\t\t\t[INTEGER, $_POST['id']]\n\t\t]);\n\t\t$row = $this->DB->fetchRow(false, $result);\n\n\t\tif ($result->numrows == 0)\n\t\t{\n\t\t\t$this->response['error'] = 'The site you selected cannot be scraped.';\n\t\t\t$this->ajaxReturn($this->output);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$parts = parse_url('http://' . $row['domain']);\n\t\t\t$domain = str_replace('www.', '', $parts['host']);\n\t\t\t$this->output['url'] = 'https://www.' . $domain . '/';\n\t\t}\n\t}", "title": "" }, { "docid": "a58c33add3f0eb00078bdecd263c1563", "score": "0.5326573", "text": "function getResponseDescription($responseCode) {\n \n switch ($responseCode) {\n case \"0\" :\n $result = \"Giao dịch thành công - Approved\";\n break;\n case \"1\" :\n $result = \"Ngân hàng từ chối giao dịch - Bank Declined\";\n break;\n case \"3\" :\n $result = \"Mã đơn vị không tồn tại - Merchant not exist\";\n break;\n case \"4\" :\n $result = \"Không đúng access code - Invalid access code\";\n break;\n case \"5\" :\n $result = \"Số tiền không hợp lệ - Invalid amount\";\n break;\n case \"6\" :\n $result = \"Mã tiền tệ không tồn tại - Invalid currency code\";\n break;\n case \"7\" :\n $result = \"Lỗi không xác định - Unspecified Failure \";\n break;\n case \"8\" :\n $result = \"Số thẻ không đúng - Invalid card Number\";\n break;\n case \"9\" :\n $result = \"Tên chủ thẻ không đúng - Invalid card name\";\n break;\n case \"10\" :\n $result = \"Thẻ hết hạn/Thẻ bị khóa - Expired Card\";\n break;\n case \"11\" :\n $result = \"Thẻ chưa đăng ký sử dụng dịch vụ - Card Not Registed Service(internet banking)\";\n break;\n case \"12\" :\n $result = \"Ngày phát hành/Hết hạn không đúng - Invalid card date\";\n break;\n case \"13\" :\n $result = \"Vượt quá hạn mức thanh toán - Exist Amount\";\n break;\n case \"21\" :\n $result = \"Số tiền không đủ để thanh toán - Insufficient fund\";\n break;\n case \"24\" :\n\t\t\t$result = \"Thông tin thẻ không đúng - Invalid Card Info\";\n\t\t\tbreak;\n\t\tcase \"25\" :\n\t\t\t$result = \"OTP không đúng - Invalid OTP\";\n\t\t\tbreak;\n\t\tcase \"253\" :\n\t\t\t$result = \"Quá thời gian thanh toán - Transaction Time out\";\n\t\t\tbreak; \n case \"99\" :\n $result = \"Người sủ dụng hủy giao dịch - User cancel\";\n break;\n default :\n $result = \"Unable to be determined\";\n }\n return $result;\n}", "title": "" }, { "docid": "e168689ba3037cb25d191e48a5b86b01", "score": "0.5321855", "text": "private function handleHTMLResponse() {\n\t\ttry {\n\n\t\t\t$response = array(\n\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\treturn \"<html><h1>p00p</h1></html>\";\n\t\t\t\n\t\t}\tcatch (Exception $e) {\n\t\t\tprint_r($e->getTraceAsString())\t;\n\t\t}\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "4638674529c0504106d5dae1be34bb55", "score": "0.5297454", "text": "function createCapthaContent($bk_tp) {\n $admin_uri = ltrim( str_replace( get_site_url( null, '', 'admin' ), '', admin_url('admin.php?') ), '/' ) ;\n if ( ( get_bk_option( 'booking_is_use_captcha' ) !== 'On' ) \n || ( strpos($_SERVER['REQUEST_URI'], $admin_uri ) !== false ) \n ) return '';\n else {\n\t\t\t// Clean up dead files older than 2 minutes\n $this->captcha_instance->cleanup(2);\t\t\t\t\t//FixIn: 7.0.1.67\t\t\t\t\n\t\t\t//$this->captcha_instance->img_size = array( 72, 24 );\n\t\t\t/* Background color of CAPTCHA image. RGB color 0-255 */\n\t\t\t//$this->captcha_instance->bg = array( 0, 0, 0 );//array( 255, 255, 255 );\n\t\t\t/* Foreground (character) color of CAPTCHA image. RGB color 0-255 */\n\t\t\t//$this->captcha_instance->fg = array( 255, 255, 255 );//array( 0, 0, 0 );\n\t\t\t/* Coordinates for a text in an image. I don't know the meaning. Just adjust. */\n\t\t\t//$this->captcha_instance->base = array( 6, 18 );\n\t\t\t/* Font size */\n\t\t\t//$this->captcha_instance->font_size = 14;\n\t\t\t/* Width of a character */\n\t\t\t//$this->captcha_instance->font_char_width = 15;\n\t\t\t/* Image type. 'png', 'gif' or 'jpeg' */\n\t\t\t//$this->captcha_instance->img_type = 'png';\n\t\t\t\n $word = $this->captcha_instance->generate_random_word();\n $prefix = mt_rand();\n $this->captcha_instance->generate_image($prefix, $word);\n\n $filename = $prefix . '.png';\n $captcha_url = WPBC_PLUGIN_URL . '/js/captcha/tmp/' .$filename;\n $html = '<input autocomplete=\"off\" type=\"text\" class=\"captachinput\" value=\"\" name=\"captcha_input'.$bk_tp.'\" id=\"captcha_input'.$bk_tp.'\" />';\n $html .= '<img class=\"captcha_img\" id=\"captcha_img' . $bk_tp . '\" alt=\"captcha\" src=\"' . $captcha_url . '\" />';\n $ref = substr($filename, 0, strrpos($filename, '.'));\n $html = '<input autocomplete=\"off\" type=\"hidden\" name=\"wpdev_captcha_challenge_' . $bk_tp . '\" id=\"wpdev_captcha_challenge_' . $bk_tp . '\" value=\"' . $ref . '\" />'\n . $html\n . '<span id=\"captcha_msg'.$bk_tp.'\" class=\"wpdev-help-message\" ></span>';\n return $html;\n }\n }", "title": "" }, { "docid": "c5620e97c313457eb230f6236b8e819a", "score": "0.5284602", "text": "public function test_get_wrong_responsecount() {\n $questiontext = 'The cat [sat] and the cow [jumped]';\n $question = helper::make_question('wordselect', $questiontext);\n $correctplaces = ['p1' => 'on', 'p2' => 'on'];\n $responses = ['p2' => 'on'];\n $wrongresponcecount = $question->get_wrong_responsecount($correctplaces, $responses);\n $this->assertEquals(1, $wrongresponcecount);\n }", "title": "" }, { "docid": "e097771635b0c82bab90d214f445d049", "score": "0.52832794", "text": "function loginpress_v3_recaptcha_verifier() {\n\n\t\t\tif ( isset( $_POST['g-recaptcha-response'] ) ) {\n\n\t\t\t\t$secret = isset( $this->loginpress_settings['secret_key'] ) ? $this->loginpress_settings['secret_key'] : false;\n\n\t\t\t\t// Build POST request:\n\t\t\t\t$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';\n\t\t\t\t$recaptcha_response = $_POST['g-recaptcha-response'];\n\n\t\t\t\t// Make and decode POST request:\n\t\t\t\t$recaptcha = file_get_contents( $recaptcha_url . '?secret=' . $secret . '&response=' . $recaptcha_response );\n\t\t\t\t$response = json_decode( $recaptcha );\n\t\t\t\t//var_dump( $response );\n\t\t\t\t// Take action based on the score returned:\n\t\t\t\tif ( isset( $response->score ) && $response->score ) {\n\t\t\t\t\treturn $response->score;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// otherwise, let the spammer think that they got their message through\n\t\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "cc453fc2be650a7e6da140af3b169122", "score": "0.52763754", "text": "function challenge(): string {\n if (isset($_SESSION['challengecompleted']) and $_SESSION['challengecompleted'] == 1) {\n $points = userRewards();\n finishchallenge();\n return \"CONGRATS! CHALLENGE COMPLETED!<br><br>Has aconsseguit $points punts dels 1.000 possibles\";\n }\n //si no está inicializado llama a la función para inicializar\n if (isset($_SESSION['initialized']) == null) {\n initchallenge();\n }\n $_SESSION['value1'] = rand(1, 11);\n $_SESSION['value2'] = rand(1, 11);\n}", "title": "" }, { "docid": "481515bfc87fbf5953ec183a922cb021", "score": "0.526648", "text": "function contact_us()\n\t{\n\n\t\t$cor = 0;\n\t\tif(count($_POST)>0){\n\t\t\tif(isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] == $_POST['captcha']){\n\t\t\t\t$cor = 3;\n\t\t\t}else{\n\t\t\t\t$cor = 0;\n\t\t\t\t$this->set('capch','Enter correct captcha');\n\t\t\t}\n\t\t}\n\n\t\tif ($cor == 3)\n\t\t{\n\n\n\t\t\t//$this->session_check();\n\t\t\t$user_id = $this->Session->read('Users.userid');\n\t\t\t$loginuserEmail = $this->Session->read('Users.id');\n\t\t\tif($loginuserEmail==\"\"){\n\t\t\t\t$loggedIn=true;\n\t\t\t}else { $loggedIn=false; }\n\n\t\t\t$this->set('loggedIn',$loggedIn);\n\n\t\t\t$displayName = $this->Session->read('Users.name');\n\t\t\t$this->set('displayName',$displayName);\n\t\t\t//$this->set('users', $this->User->findById($user_id));\n\n\t\t\t$errMessage = '';\n\t\t\tif (!empty($this->data))\n\t\t\t{\n\t\t\t\t$to = CONTACT_US_EMAIL;\n\t\t\t\t$toName = CONTACT_US_NAME;\n\t\t\t\t$fromName = $this->data['Support']['fname'] . '' . $this->data['Support']['lname'];\n\n\t\t\t\t$fromEmail = $this->data['Support']['email'];\n\n\t\t\t\t$subject = $this->data['Support']['subject'];\n\n\t\t\t\t$message = \"A customer has asked for some help.<br><br>\".$this->data['Support']['message'].\"<br></br>Customer Support\\nYaxmobi\";\n\n\t\t\t\t$this->Mailer->init();\n\t\t\t\t$this->Mailer->IsHTML(true);\n\t\t\t\t//$this->Mailer->AddEmbeddedImage($this->websroot.\"img/sitelogo.gif\", \"my-attach\", \"sitelogo.gif\");\n\n\t\t\t\t$this->Mailer->AddAddress($to, $toName);\n\t\t\t\t$this->Mailer->FromName = $fromName;\n\t\t\t\t$this->Mailer->From = $fromEmail;\n\n\t\t\t\t$this->Mailer->Subject = $subject;\n\t\t\t\tob_start();\n\n\t\t\t\t//$this->render('nameOfEmailTemplate', 'nameOfEmailLayout');\n\t\t\t\t$this->Mailer->Body = $message;\n\n\t\t\t\t// Send mail\n\t\t\t\tif ($this->Mailer->send()) {\n\t\t\t\t\t$msg = 'Mail was sent successfully.';\n\t\t\t\t} else {\n\t\t\t\t\t$msg = 'There was a problem sending mail: '.$this->Mailer->ErrorInfo;\n\t\t\t\t}\n\t\t\t\t$errMessage = \"Thanks for contacting us. We will get back to you shortly.\";\n\t\t\t\t//$this->redirect('/users/welcome');\n\t\t\t}\n\t\t\t$this->set('errMessage',$errMessage);\n\t\t}\n\t}", "title": "" }, { "docid": "e2cfe981a85bd810c1111efb5fc0e6a9", "score": "0.5263185", "text": "function getWords() {\n // if the inline response CODE was ok, return inlineResponse\n if($this->errCode == 201) {\n return $this->inlineResponse;\n }\n // if the inline response CODE was NOT ok, parse the errMsg\n //$bag = ''; $line = '';\n //$firstLine = true;\n //$lastLine = '';\n \n // this oughta work\n $line = $this->errMsg;\n $line = trim($line);\n return $line;\n \n }", "title": "" }, { "docid": "1894f00c80932c74c290ecbe6b795aef", "score": "0.5262887", "text": "function checkcaptcha( $string ) {\n $user_answer = md5(strtolower(trim($string)));\n $answers = $this->session->userdata('captcha_answers');\n\n if( in_array($user_answer, $answers) ){\n return TRUE;\n }else{\n $this->form_validation->set_message('checkcaptcha', 'Your answer to the challenge was incorrect!');\n return FALSE;\n }\n }", "title": "" }, { "docid": "2abbfd51c4010b6ef334e99420714095", "score": "0.5262696", "text": "protected function sendResetResponse($email,$response)\n {\n \\Log::info('respuesta exitosa');\n\n $rectangulo = asset('img/reportes/Rectangulo2.png');\n $logo = asset('img/reportes/logo_reporte.png');\n $to = $email;\n $subject = 'SIMPLE - Confirmación cambio contrseña usuario Manager';\n $message = '<div>\n <div style=\"background-image: url('.$rectangulo.'); height:521px;width:512px;top: 40px;z-index: -1; margin:0 auto;\">\n <div style=\"text-indent:40px;line-height:0px\"><img src=\"'.$logo.'\"/></div>\n <br style=\"line-height: 5.1;\">\n <h1 style=\"width: 397px;color: #373737;font-family: Roboto, sans-serif;font-size: 25px;font-weight: bold;text-indent:40px; \">Contraseña Actualizada </h1>\n <br>\n <div style=\"text-indent:40px;text-align:justify;font-family: Roboto, sans-serif;font-size: 16px;line-height: 24px;\">Estimado usuario, junto con saludar tenemos el agrado </div>\n <div style=\"text-indent:40px;text-align:justify;font-family: Roboto, sans-serif;font-size: 16px;line-height: 24px;\">de informar que su contraseña fue actualizada con éxito </div>\n <div style=\"text-indent:40px;text-align:justify;font-family: Roboto, sans-serif;font-size: 16px;line-height: 24px;\">en SIMPLE. </div><br> \n <div style=\"text-indent:40px;text-align:justify;font-family: Roboto, sans-serif;font-size: 16px;line-height: 24px;\">Saluda atentamente,</div>\n <div style=\"text-indent:40px;text-align:justify;font-family: Roboto, sans-serif;font-size: 16px;line-height: 24px;\"> <b>'.\\Cuenta::cuentaSegunDominio()->nombre_largo.'</b></div>\n \n </p>\n </div>\n </div>';\n\n Mail::send('emails.send', ['content' => $message], function ($message) use ($subject, $to) {\n $message->subject($subject);\n $mail_from = env('MAIL_FROM_ADDRESS');\n if(empty($mail_from)) {\n $message->from(\\Cuenta::cuentaSegunDominio()->nombre . '@' . env('APP_MAIN_DOMAIN', 'localhost'),\\Cuenta::cuentaSegunDominio()->nombre_largo);\n } else {\n $message->from($mail_from);\n }\n if(empty(env('EMAIL_TEST')))\n $message->to($to);\n else{\n $destinatarios_test = explode(\",\",env('EMAIL_TEST'));\n $message->to($destinatarios_test);\n }\n });\n\n return redirect($this->redirectPath())\n ->with('status', trans($response));\n }", "title": "" }, { "docid": "b4c14671560b31b425217a0de85ff74f", "score": "0.5248228", "text": "function return_form_letters_of_no_evidence($content)\n{\n\n // Global variables to determine if the form submission\n // is successful or comes back with errors\n global $tna_success_message,\n $tna_error_message;\n\n $form_name = 'Letters of no evidence';\n\n // If the form is submitted the form data is processed\n if (isset($_POST['submit-letters-of-no-evidence'])) {\n\n $process = new Form_Processor;\n $form_data = $process->get_data($_POST);\n $process->process_data($form_name, $form_data, '','', true);\n }\n\n // HTML form string\n $html = new Form_Builder;\n $form = $html->form_begins('letters_of_no_evidence', $form_name, 'novalidate') .\n $html->fieldset_begins('Ancestor\\'s personal details') .\n $html->form_text_input('Full name', 'full_name', 'full-name', 'Enter the full name of the subject') .\n $html->form_text_input('Alternative name(s)', 'alternative_names', 'alternative-names', '', 'For example, married or Anglicised names.') .\n $html->form_text_input('Date of birth', 'date_of_birth', 'date-of-birth', 'Enter a date of birth, even if it is the approximate year.', 'For example, 04/07/1901 or July 1901.<br>If you don’t know the exact date, enter the approximate year.') .\n $html->form_text_input('Date of death', 'date_of_death', 'date_of_death', '', 'For example, 04/07/1928 or July 1920.<br>If you don’t know the exact date, enter the approximate year.') .\n $html->form_text_input('Country of birth', 'country_of_birth', 'country-of-birth') .\n $html->fieldset_ends() .\n $html->fieldset_begins('Your contact details') .\n $html->help_text('Provide your details so we can let you know the outcome of the search for evidence of naturalisation.') .\n $html->form_text_input('Full name', 'full_name_contact_details', 'full-name-contact-details', 'Enter your full name') .\n $html->form_email_required_input() .\n $html->form_textarea_input('Postal address', 'postal_address', 'postal-address', 'Enter your postal address.', 'If we don\\'t find evidence, you will have the option to <br >order a posted letter from us which confirms this. ') .\n $html->form_spam_filter(rand(10, 99)) .\n $html->submit_form('submit-letters-of-no-evidence', 'submit-tna-form') .\n $html->fieldset_ends() .\n $html->form_ends();\n\n // If the form submission comes with errors give us back\n // the form populated with form data and error messages\n if ($tna_error_message) {\n return $tna_error_message . $form;\n } // If the form is successful give us the confirmation content\n elseif ($tna_success_message) {\n return $tna_success_message . print_page();\n }\n\n // If no form submission, hence the user has\n // accessed the page for the first time, give us an empty form\n else {\n return $content . $form;\n }\n}", "title": "" }, { "docid": "3e79cc11018b16ff6089adbf776361b4", "score": "0.5244615", "text": "function _yubivs_format_output($request) {\n $return = array();\n\n // This part is enougth for api\n $return['#request'] = $request;\n\n // This part formats optionnal debug\n $return['result'] = array(\n '#type' => 'fieldset',\n '#title' => t('Result'),\n '#collapsible' => FALSE,\n 'content' => array(\n '#type' => 'fieldset',\n '#title' => t('Result parameters'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n ),\n 'result' => array(\n '#weight' => -1,\n '#markup' => t('@result (%hexval)', array(\n '@result' => $request->status,\n '%hexval' => sprintf('%04x', $request->status),\n )),\n '#type' => 'item',\n '#title' => t('Result'),\n ),\n );\n foreach ($request->response as $name => $element) {\n $return['result']['content'][$name] = array(\n '#markup' => check_plain($element),\n '#type' => 'item',\n '#title' => check_plain($name),\n );\n }\n $return['process'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Process information'),\n 'content' => array(\n ),\n );\n\n $reflector = new ReflectionClass('Yubivs_Request');\n foreach ($reflector->getConstants() as $constname => $value) {\n if (preg_match('#^STATUS_[A-Z_]+$#', $constname)) {\n $return['process']['content'][] = array(\n '#prefix' => '<p>',\n '#suffix' => '</p>',\n '#markup' => t('%constname (%value) is %status', array(\n '%constname' => drupal_substr($constname, 7),\n '%value' => sprintf('%04x', $value),\n '%status' => (($request->status & $value) || ($request->status == $value))? t('enabled'): t('disabled'),\n )),\n );\n }\n }\n\n\n return $return;\n}", "title": "" }, { "docid": "f4d1a27a4244b90d91f92220c3bdc73b", "score": "0.5242951", "text": "function check_captcha()\t\n\t{\n\t\t$expiration = time()-3600;\n\t\t$sql = \"DELETE FROM captcha WHERE captcha_time < ?\";\n\t\t$binds = array($expiration);\n\t\t$query = $this->db->query($sql, $binds);\n\t\t\n\n\t\t//Checking input\n\t\t$sql = \"SELECT COUNT(*) AS count FROM captcha WHERE word =? AND ip_address =? AND captcha_time > ?\";\n\t\t$binds = array($_POST['captcha'], $this->input->ip_address(), $expiration);\n\t\t$query =$this->db->query($sql, $binds);\n\t\t$row = $query->row();\n\n\t\tif ($row->count>0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\n\t }", "title": "" }, { "docid": "bca015a8cecc207b9f5d2063c7943696", "score": "0.523691", "text": "function myousic_contact_form_generate_response($type, $message){\n\n\tglobal $response;\n\n\tif( $type == \"success\" ){\n\t\t$response = \"<div class='success'>{$message}</div>\";\n\t} else {\n\t\t$response = \"<div class='error'>{$message}</div>\";\n\t}\n\n}", "title": "" }, { "docid": "284aa069d34a1148306b8311a27e2e02", "score": "0.5230774", "text": "public function helpdesk() {\n\n $this->form_validation->set_rules('a', 'Judul Masalah', 'trim|required|min_length[10]|xss_clean');\n $this->form_validation->set_rules('b', 'Isi Masalah', 'trim|required|min_length[20]|xss_clean');\n\n if ($this->form_validation->run() == false) {\n \n $config_captcha = array(\n 'img_path' => './arians/home/captcha/',\n 'img_url' => base_url().'arians/home/captcha/',\n 'font_path' => './arians/home/captcha/captcha.ttf',\n 'img_width' => 190,\n 'img_height' => 60,\n 'expiration' => 2200,\n 'word_length' => 6,\n 'font-size' => 22,\n 'pool' => '0123456789',\n 'colors' => array(\n 'background' => array(255, 255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(50, 50, 50),\n 'grid' => array(230, 230, 230))\n );\n\n $cap = create_captcha($config_captcha);\n $data['img'] = $cap['image'];\n $this->session->set_userdata('keycode', md5($cap['word']));\n $data['title'] = 'IT Operations | Help Desk';\n $data['main_view'] = '_home/home_helpdesk';\n $this->load->view('_temp/home_single', $data);\n } else {\n $datadb = array('id_users' => strip_tags($this->input->post('id_users')),\n 'title_problem' => htmlspecialchars($this->input->post('a')),\n 'detail_problem' => htmlspecialchars($this->input->post('b')),\n 'id_ticket' => date('shimYd'),\n 'period' => date('Y'),\n 'problem_read' => 0,\n 'date' => date('d M Y'),\n 'result' => 'repaired',\n 'time_update' => date('Y-m-d h:i:s')\n );\n $captcha = $this->input->post('captcha');\n if(md5($captcha)==$this->session->userdata('keycode')){\n $this->session->unset_userdata('keycode');\n $this->db->insert('it_problems', $datadb);\n $this->session->set_flashdata('info', '<i class=\"fas fa-check\"></i> Terimakasih, masalah mu telah sampai pada kami, akan segera kami tindak lanjuti.');\n redirect('home/helpdesk');\n }else{\n $this->session->set_flashdata('danger', '<i class=\"fas fa-exclamation-triangle\"></i> Uppss.. ada yang salah nih, coba cek lagi, mungkin ada inputan yang salah.');\n redirect('home/helpdesk');\n }\n }\n\n }", "title": "" }, { "docid": "ab472f9c59efb9ad43f865af71079317", "score": "0.52306837", "text": "public abstract function modCaptchaRender();", "title": "" }, { "docid": "efcb7ca011b5dfe9e058dd6759ad9726", "score": "0.5227413", "text": "public function sendContent()\n {\n $this->vueFormResponseData['captcha_question'] = $this->getCaptchaQuestion();\n $this->setData($this->vueFormResponseData);\n $this->update();\n return parent::sendContent();\n }", "title": "" }, { "docid": "5ccf2b26567913b455d45853dbbe110d", "score": "0.5220924", "text": "function loginpress_recaptcha_verifier() {\n\n\t\t\t\t$secret = isset( $this->loginpress_settings['secret_key'] ) ? $this->loginpress_settings['secret_key'] : false;\n\n\t\t\t\tinclude LOGINPRESS_PRO_ROOT_PATH . '/lib/recaptcha/src/autoload.php';\n\t\t\t\t$reCaptcha = new \\ReCaptcha\\ReCaptcha( $secret );\n\t\t\t\t$response = $reCaptcha->verify( wp_unslash( $_POST['g-recaptcha-response'] ), $this->loginpress_get_remote_ip() );\n\t\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "2e0e53e647165d37aef3a050fca1ddbc", "score": "0.5215203", "text": "function _setCaptcha ($numChars) {\n\n global $CI;\n\n if (!function_exists('create_captcha')) {\n $CI->load->plugin('captcha');\n }\n $data = array(\n 'word'\t\t => strtoupper($this->_createWord(5)),\n 'img_path'\t => './files/gfx/captcha/',\n 'img_url'\t => $CI->config->item('base_url') . 'files/gfx/captcha/',\n 'font_path'\t => BASEPATH . 'fonts/ariblk.ttf',\n 'img_width'\t => '150',\n 'img_height' => 30,\n 'expiration' => 7200\n );\n\n $cap = create_captcha($data);\n return $cap;\n //echo $cap['image'];\n //echo $cap['word'];\n\n }", "title": "" }, { "docid": "5728b9a6e242bf7277da21ec6e38f0c0", "score": "0.52127695", "text": "public function sendCaptcha()\n {\n $send = new Client();\n\n $req = $send->request('POST', 'http://2captcha.com/in.php', [\n 'form_params' => [\n 'key' => env('CAPTCHA_SOLVER_KEY'),\n 'method' => 'base64',\n 'body' => $this->getCaptchaImg(),\n 'numeric' => 1,\n 'min_len' => 4,\n 'max_len' => 4,\n 'json' => 1,\n ]\n ]);\n\n $res = json_decode($req->getBody());\n\n // We can't proceed since something went wrong\n if($res->status != 1) {\n return false;\n }\n\n return $res->request;\n }", "title": "" }, { "docid": "70c38082ebb9fe7064a798f047bbd1bf", "score": "0.52123207", "text": "function frc_captcha() {\n\tglobal $frc_captcha_config;\n\n // Choose the event and get its html\n $event = $frc_captcha_config['event_codes'][mt_rand(0, count($frc_captcha_config['event_codes']) - 1)];\n $event_html = file_get_contents($frc_captcha_config['event_base_url'] . '?year=' . $frc_captcha_config['year'] . '&event_code=' . $event);\n\n // Find the number of teams in this event\n // \"<p>Photos for [100] of 100 teams:</p>\"\n $num_teams_start = 'Photos for ';\n $index = strpos($event_html, $num_teams_start) + strlen($num_teams_start);\n $num_teams = intval( substr($event_html, $index, strpos($event_html, ' ', $index) - $index) );\n\n // Choose the team index on the page\n $team_index = mt_rand(0, $num_teams - 1);\n\n // Find the team's html and number\n // \"<td class=\"team_info_cell\"><span class=\"team_number\">Team [2485]</span><br>WARLords<br>San Diego, CA<br>Rookie Year: 2008</td>\"\n $team_num_start = '<td class=\"team_info_cell\"><span class=\"team_number\">Team ';\n $count = 0;\n do {\n $index = strpos($event_html, $team_num_start, $index) + strlen($team_num_start);\n } while ($count++ < $team_index);\n $team_num = substr($event_html, $index, strpos($event_html, '<', $index) - $index);\n\n // Find the team's image url\n // \"<td class=\"team_photo_cell\"><img src=\"[photoshare/robot_photos/2013/4131.jpg]\" width=\"320\" height=\"367\"></td>\"\n $imgsrc_start = '<img src=\"';\n $index = strpos($event_html, $imgsrc_start, $index) + strlen($imgsrc_start);\n $img_src = substr($event_html, $index, strpos($event_html, '\"', $index) - $index);\n\n // Get the absolute URL\n $image_src = $frc_captcha_config['photo_base_url'] . $img_src;\n\n if (session_id() === '') session_start();\n $_SESSION['frc_captcha_src'] = $image_src;\n $_SESSION['frc_captcha_team'] = $team_num;\n\n return [\n 'src' => $image_src,\n 'team' => $team_num\n ];\n}", "title": "" }, { "docid": "cd4befab4da44931e1c8d3f510c441a3", "score": "0.5211593", "text": "function captcha_show( )\n {\n\n //-----------------------------------------\n // set captcha code\n //-----------------------------------------\n\n $content = $this->set_capthca_code();\n\n //-----------------------------------------\n // Is GD Available?\n //-----------------------------------------\n\n if ( !extension_loaded('gd') )\n {\n exit();\n }\n\n //-----------------------------------------\n // INIT\n //-----------------------------------------\n\n $content = ' '. preg_replace( \"/(\\w)/\", \"\\\\1 \", $content ) .' ';\n $tmp_x = 130;\n $tmp_y = 20;\n $image_x = 200;\n $image_y = 60;\n $circles = 3;\n $continue_loop = TRUE;\n $_started = FALSE;\n\n //-----------------------------------------\n // Get backgrounds and fonts...\n //-----------------------------------------\n\n $backgrounds = $this->get_backgrounds();\n\n //-----------------------------------------\n // Seed rand functions for PHP versions that don't\n //-----------------------------------------\n\n mt_srand( (double) microtime() * 1000000 );\n\n //-----------------------------------------\n // Got a background?\n //-----------------------------------------\n\n while ( $continue_loop )\n {\n if ( is_array( $backgrounds ) AND count( $backgrounds ) )\n {\n $i = mt_rand(0, count( $backgrounds ) - 1 );\n\n $background = $backgrounds[ $i ];\n $_file_extension = preg_replace( \"#^.*\\.(\\w{2,4})$#is\", \"\\\\1\", strtolower( $background ) );\n\n switch( $_file_extension )\n {\n case 'jpg':\n case 'jpe':\n case 'jpeg':\n if ( ! function_exists('imagecreatefromjpeg') OR ! $im = @imagecreatefromjpeg($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n case 'gif':\n if ( ! function_exists('imagecreatefromgif') OR ! $im = @imagecreatefromgif($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n case 'png':\n if ( ! function_exists('imagecreatefrompng') OR ! $im = @imagecreatefrompng($background) )\n {\n unset( $backgrounds[ $i ] );\n }\n else\n {\n $continue_loop = FALSE;\n $_started = TRUE;\n }\n break;\n }\n }\n else\n {\n $continue_loop = FALSE;\n }\n }\n\n //-----------------------------------------\n // Continue with nice background image\n //-----------------------------------------\n\n $tmp = imagecreatetruecolor($tmp_x , $tmp_y );\n $tmp2 = imagecreatetruecolor($image_x, $image_y);\n\n $white = imagecolorallocate( $tmp, 255, 255, 255 );\n $black = imagecolorallocate( $tmp, 0, 0, 0 );\n $grey = imagecolorallocate( $tmp, 100, 100, 100 );\n $transparent = imagecolorallocate( $tmp2, 255, 255, 255 );\n $_white = imagecolorallocate( $tmp2, 255, 255, 255 );\n\n imagefill($tmp , 0, 0, $white );\n imagefill($tmp2, 0, 0, $_white);\n\n $num = strlen($content);\n $x_param = 0;\n $y_param = 0;\n\n for( $i = 0; $i < $num; $i++ )\n {\n if ( $i > 0 )\n {\n $x_param += rand( 6, 12 );\n\n if( $x_param + 18 > $image_x )\n {\n $x_param -= ceil( $x_param + 18 - $image_x );\n }\n }\n\n $y_param = rand( 0, 5 );\n\n $randomcolor = imagecolorallocate( $tmp, 0, 0, 0 );//imagecolorallocate( $tmp, rand(50,200), rand(50,200),rand(50,200) );\n\n imagestring( $tmp, 5, $x_param + 1, $y_param + 1, $content{$i}, $grey );\n imagestring( $tmp, 5, $x_param , $y_param , $content{$i}, $randomcolor );\n }\n\n imagecopyresized($tmp2, $tmp, 0, 0, 0, 0, $image_x, $image_y, $tmp_x, $tmp_y );\n\n $tmp2 = $this->create_wave( $tmp2, 10 );\n\n imagecolortransparent( $tmp2, $transparent );\n imagecopymerge( $im, $tmp2, 0, 0, 0, 0, $image_x, $image_y, 100 );\n\n imagedestroy($tmp);\n imagedestroy($tmp2);\n\n\n //-----------------------------------------\n // Blur?\n //-----------------------------------------\n\n if ( function_exists( 'imagefilter' ) )\n {\n @imagefilter( $im, IMG_FILTER_GAUSSIAN_BLUR );\n }\n\n //-----------------------------------------\n // Render a border\n //-----------------------------------------\n\n $black = imagecolorallocate( $im, 0, 0, 0 );\n\n imageline( $im, 0, 0, $image_x, 0, $black );\n imageline( $im, 0, 0, 0, $image_y, $black );\n imageline( $im, $image_x - 1, 0, $image_x - 1, $image_y, $black );\n imageline( $im, 0, $image_y - 1, $image_x, $image_y - 1, $black );\n\n //-----------------------------------------\n // Show it!\n //-----------------------------------------\n\n @header( \"Content-Type: image/jpeg\" );\n\n imagejpeg( $im );\n imagedestroy( $im );\n\n exit();\n }", "title": "" }, { "docid": "7bb776e275e556713d84bebcaea1f159", "score": "0.52071184", "text": "function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params)\r\n\t{\r\n\t\t$recaptcha_challenge_field = get_input('recaptcha_challenge_field');\r\n\t\t$recaptcha_response_field = get_input('recaptcha_response_field');\r\n\t\t\r\n\t\tif (captcha_verify_captcha($recaptcha_challenge_field, $recaptcha_response_field)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tregister_error(elgg_echo('captcha:captchafail'));\r\n\t\t\r\n\t\tif ($entity_type == \"register\") {\r\n\t\t\t// keep the current form values\r\n\t\t\telgg_make_sticky_form('register');\r\n\t\t}\r\n\t\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "98273eacd33439bb9719f66cc04a3b09", "score": "0.5206025", "text": "private function getResponseCodeText(){\n switch ($this->statusCode){\n case 100:\n $text = 'Continue';\n break;\n case 101:\n $text = 'Switching Protocols';\n break;\n case 200:\n $text = 'OK';\n break;\n case 201:\n $text = 'Created';\n break;\n case 202:\n $text = 'Accepted';\n break;\n case 203:\n $text = 'Non-Authoritative Information';\n break;\n case 204:\n $text = 'No Content';\n break;\n case 205:\n $text = 'Reset Content';\n break;\n case 206:\n $text = 'Partial Content';\n break;\n case 300:\n $text = 'Multiple Choices';\n break;\n case 301:\n $text = 'Moved Permanently';\n break;\n case 302:\n $text = 'Moved Temporarily';\n break;\n case 303:\n $text = 'See Other';\n break;\n case 304:\n $text = 'Not Modified';\n break;\n case 305:\n $text = 'Use Proxy';\n break;\n case 400:\n $text = 'Bad Request';\n break;\n case 401:\n $text = 'Unauthorized';\n break;\n case 402:\n $text = 'Payment Required';\n break;\n case 403:\n $text = 'Forbidden';\n break;\n case 404:\n $text = 'Not Found';\n break;\n case 405:\n $text = 'Method Not Allowed';\n break;\n case 406:\n $text = 'Not Acceptable';\n break;\n case 407:\n $text = 'Proxy Authentication Required';\n break;\n case 408:\n $text = 'Request Time-out';\n break;\n case 409:\n $text = 'Conflict';\n break;\n case 410:\n $text = 'Gone';\n break;\n case 411:\n $text = 'Length Required';\n break;\n case 412:\n $text = 'Precondition Failed';\n break;\n case 413:\n $text = 'Request Entity Too Large';\n break;\n case 414:\n $text = 'Request-URI Too Large';\n break;\n case 415:\n $text = 'Unsupported Media Type';\n break;\n case 500:\n $text = 'Internal Server Error';\n break;\n case 501:\n $text = 'Not Implemented';\n break;\n case 502:\n $text = 'Bad Gateway';\n break;\n case 503:\n $text = 'Service Unavailable';\n break;\n case 504:\n $text = 'Gateway Time-out';\n break;\n case 505:\n $text = 'HTTP Version not supported';\n break;\n default:\n exit('Unknown http status code \"' . htmlentities($this->statusCode) . '\"');\n break;\n }\n\n return $text;\n }", "title": "" }, { "docid": "04b0e632583f3b364a8670e0418d6c17", "score": "0.52036154", "text": "function nagioscorepassivecheck_submit_check_data()\n{\n // debug the request data\n global $request;\n foreach ($request as $index => $req) {\n if (is_array($req)) {\n $req = print_r($req, true);\n }\n _debug(\"REQUEST: [{$index}] {$req}\");\n }\n\n\n $output_type = output_type();\n\n\n if ($output_type == TYPE_XML) {\n \n $data = grab_xml();\n $data = @simplexml_load_string($data);\n\n if ($data === false) {\n\n $xmlerr = print_r(libxml_get_errors(), true);\n _debug(\"conversion to xml failed: {$xmlerr}\");\n handle_api_error(ERROR_BAD_XML, $xmlerr);\n }\n\n _debug(\"our xml: \" . print_r($data, true));\n }\n\n else if ($output_type == TYPE_JSON) {\n\n $data = grab_json();\n\n $data = @json_decode($data, true);\n\n if ($data == false) {\n\n if (version_compare(phpversion(), \"5.5.0\", \">=\")) {\n $last_error_cb = \"json_last_error_msg\";\n } else {\n $last_error_cb = \"json_last_error\";\n }\n\n $jsonerr = print_r($last_error_cb(), true);\n _debug(\"conversion to json failed: {$jsonerr}\");\n handle_api_error(ERROR_BAD_JSON, $jsonerr);\n }\n\n _debug(\"our json: \" . print_r($data, true));\n }\n \n\n\n // Make sure we can write to check results dir\n $check_results_dir = grab_cfg_var(\"check_results_dir\");\n\n if (empty($check_results_dir)) {\n\n _debug(\"we have no cfg[check_results_dir], bailing\");\n handle_api_error(ERROR_NO_CHECK_RESULTS_DIR);\n }\n\n if (!file_exists($check_results_dir)) {\n\n _debug(\"cfg[check_results_dir] ({$check_results_dir}) doesn't exist, bailing\");\n handle_api_error(ERROR_BAD_CHECK_RESULTS_DIR);\n }\n\n $total_checks = 0;\n\n // Get our iterator to loop over\n $check_results = get_xml_or_json($output_type, $data, \"checkresult\", \"checkresults\");\n\n foreach ($check_results as $cr) {\n\n $type = \"host\";\n\n $attributes = get_xml_or_json($output_type, $cr, \"attributes\", \"checkresult\", true);\n\n foreach ($attributes as $key => $val) {\n if ($key == \"type\") {\n $type = strval($val);\n }\n }\n\n $hostname = strval(get_xml_or_json($output_type, $cr, \"hostname\", \"hostname\"));\n $servicename = strval(get_xml_or_json($output_type, $cr, \"servicename\", \"servicename\"));\n $state = strval(get_xml_or_json($output_type, $cr, \"state\", \"state\"));\n $output = strval(get_xml_or_json($output_type, $cr, \"output\", \"output\"));\n $output = str_replace(\"\\n\", \"\\\\n\", $output);\n\n $allow_old_results = grab_cfg_var(\"allow_old_results\");\n\n $time = intval(get_xml_or_json($output_type, $cr, \"time\", \"time\"));\n\n\n $debug_msg = \"gathered the following datas:\\n\";\n $debug_msg .= \"type: {$type}\\n\";\n $debug_msg .= \"hostname: {$hostname}\\n\";\n $debug_msg .= \"servicename: {$servicename}\\n\";\n $debug_msg .= \"state: {$state}\\n\";\n $debug_msg .= \"output: {$output}\\n\";\n $debug_msg .= \"allow_old_results: {$allow_old_results}\\n\";\n $debug_msg .= \"time: {$time}\\n\";\n\n _debug($debug_msg);\n \n\n if (!empty($time) && $allow_old_results == true) {\n nrdp_write_check_output_to_ndo($hostname, $servicename, $state, $output, $type, $time);\n } else {\n nrdp_write_check_output_to_cmd($hostname, $servicename, $state, $output, $type);\n }\n\n $total_checks++;\n }\n\n _debug(\"all nrdp checks have been written\");\n\n $result = array(\n \"result\" => array(\n \"status\" => 0,\n \"message\" => \"OK\",\n \"meta\" => array(\n \"output\" => \"{$total_checks} checks processed\",\n ),\n ),\n );\n\n output_response($result);\n exit();\n}", "title": "" }, { "docid": "4ba324b12b0956c6923c68af24f70304", "score": "0.52027917", "text": "public function getResponseText();", "title": "" }, { "docid": "e08ee445be6a9cd1bb092f33b6a2aee9", "score": "0.5199549", "text": "protected function printFailure()\n {\n $this->output->writeln('<error>Too many failed attempts!!!</error>');\n $this->output->writeln('<error>The computer is now locked and the door you needed to open to complete the game closed for all time.</error>');\n $this->output->writeln('');\n $this->output->writeln('<info>Looks like you\\'re gonna have to reload your saved game form like forever ago...</info>');\n $this->output->writeln('<info>Next time might I recommend restarting the game before this happens so you don\\'t have to reload your game every damn time</info>');\n }", "title": "" }, { "docid": "4d50c10705c55f8f5de7738116e4ca2a", "score": "0.519927", "text": "function generate_captcha()\n{\n if (!isset($_SESSION['captcha'])) {\n $_SESSION['captcha'] = '';\n $useable = 'ABCDEFGHJKLMNPQRSTUVWXYZ';\n for ($i = 0; $i < 4; $i++) {\n $_SESSION['captcha'] .= substr($useable, mt_rand(0, 23), 1);\n }\n $_SESSION['captcha_time'] = time();\n }\n return 'Type <img src=\"/captcha-image.php?x=' . time()\n . '\" alt=\"If you are unable to'\n . ' read this image, click the help link to the right of'\n . ' the input box\" align=\"top\" /> into this box...'\n . ' <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"captcha\" />'\n . ' (<a href=\"/captcha-help.php\" target=\"_blank\">help</a>)'\n . ' <br />If this image is hard to read, reload the page.';\n\n}", "title": "" }, { "docid": "2317b0a6191d0b66df9b66a1f39b960c", "score": "0.51934636", "text": "function woc_broadsword_contact_form_generate_response( $type, $message ) {\n\n\tglobal $response;\n\n\tif ( $type === \"success\" ) $response = \"<div class='alert alert-success'>{$message}</div>\";\n\telse $response = \"<div class='alert alert-danger'>{$message}</div>\";\n\n}", "title": "" }, { "docid": "031f59b95bcb4be43227702090d7633d", "score": "0.51922023", "text": "public function test_capture(){\n return array(\"alert('PluginWfForm_v2 method test_capture was tested! Replace to another to proceed your work.')\");\n }", "title": "" }, { "docid": "221bd8de16479ac616b60428a49fa843", "score": "0.5183609", "text": "function we_parse_tag_captcha($a, $c, array $attribs){\n\tif(($foo = attributFehltError($attribs, array('width' => false, 'height' => false), __FUNCTION__))){\n\t\treturn $foo;\n\t}\n\n\t$width = weTag_getParserAttribute('width', $attribs, 100);\n\t$height = weTag_getParserAttribute('height', $attribs, 25);\n\t$path = weTag_getParserAttribute('path', $attribs, '/');\n\n\t$maxlength = weTag_getParserAttribute('maxlength', $attribs, 5);\n\t$type = weTag_getParserAttribute('type', $attribs, 'gif');\n\n\t$font = weTag_getParserAttribute('font', $attribs);\n\t$fontpath = weTag_getParserAttribute('fontpath', $attribs, '');\n\t$fontsize = weTag_getParserAttribute('fontsize', $attribs, 14);\n\t$fontcolor = weTag_getParserAttribute('fontcolor', $attribs, '#000000');\n\n\t$angle = weTag_getParserAttribute('angle', $attribs, 0);\n\n\t$subset = weTag_getParserAttribute('subset', $attribs, 'alphanum');\n\t$case = weTag_getParserAttribute('case', $attribs, 'mix');\n\t$skip = weTag_getParserAttribute('skip', $attribs, 'i,I,l,L,0,o,O,1,g,9');\n\n\t$valign = weTag_getParserAttribute('valign', $attribs, 'random');\n\t$align = weTag_getParserAttribute('align', $attribs, 'random');\n\n\t$bgcolor = weTag_getParserAttribute('bgcolor', $attribs, '#ffffff');\n\t$transparent = weTag_getParserAttribute('transparent', $attribs, false, true);\n\n\t$style = weTag_getParserAttribute('style', $attribs, '');\n\t$stylecolor = weTag_getParserAttribute('stylecolor', $attribs, '#cccccc');\n\t$stylenumber = weTag_getParserAttribute('stylenumber', $attribs, '5,10');\n\n\t// writing the temporary document\n\t$file = 'we_captcha_' . $GLOBALS['we_doc']->ID . \".php\";\n\t$realPath = rtrim(realpath($_SERVER['DOCUMENT_ROOT'] . $path), '/') . '/' . $file;\n\twe_base_file::deleteLocalFile($realPath);\n\n\t$GLOBALS['DB_WE']->query('REPLACE INTO ' . CAPTCHADEF_TABLE . ' SET ' . we_database_base::arraySetter(array(\n\t\t\t'ID' => $GLOBALS['we_doc']->ID,\n\t\t\t'width' => $width,\n\t\t\t'height' => $height,\n\t\t\t'maxlength' => $maxlength,\n\t\t\t'fontpath' => $fontpath,\n\t\t\t'font' => $font,\n\t\t\t'fontsize' => $fontsize,\n\t\t\t'fontcolor' => $fontcolor,\n\t\t\t'subset' => $subset,\n\t\t\t'case' => $case,\n\t\t\t'skip' => $skip,\n\t\t\t'align' => $align,\n\t\t\t'valign' => $valign,\n\t\t\t'bgcolor' => $bgcolor,\n\t\t\t'transparent' => intval($bgcolor && $transparent),\n\t\t\t'style' => $style,\n\t\t\t'stylecolor' => $stylecolor,\n\t\t\t'stylenumber' => $stylenumber,\n\t\t\t'angle' => $angle,\n\t\t\t'type' => $bgcolor && $transparent ? 'gif' : $type\n\t)));\n\n\t// clean attribs\n\t$attribs = removeAttribs($attribs, array(\n\t\t'path',\n\t\t'maxlength',\n\t\t'type',\n\t\t'font',\n\t\t'fontpath',\n\t\t'fontsize',\n\t\t'fontcolor',\n\t\t'angle',\n\t\t'subset',\n\t\t'case',\n\t\t'skip',\n\t\t'align',\n\t\t'valign',\n\t\t'bgcolor',\n\t\t'transparent',\n\t\t'style',\n\t\t'stylecolor',\n\t\t'stylenumber',\n\t\t'src'\n\t));\n\n\treturn '<?php printElement(' . we_tag_tagParser::printTag('captcha', $attribs) . ');?>';\n}", "title": "" }, { "docid": "4c5f39cec48ac8015099671179c72e81", "score": "0.5183058", "text": "private function getChallengeString() {\n \t\t\n \t\t@session_start();\n\t\tif(!isset($_SESSION['challenge_string'])) {\n \t\t\treturn FALSE;\n \t\t}\n\t\treturn $_SESSION['challenge_string'];\n \t}", "title": "" }, { "docid": "c85b0cd76fcab4519ab58260e0348de2", "score": "0.5182606", "text": "public function testDisplayMissingRecaptchaComponent(): void\n {\n $this->get($this->getDisplayActionUrl($this->example));\n $this->assertResponseFailure();\n $this->assertResponseContains('Missing Recaptcha component');\n }", "title": "" }, { "docid": "f4914f7a173f1475ca8763471efbd7f4", "score": "0.5167373", "text": "function error()\n\t{\n\t\t$worked = false;\n\t\t$message = 'No POST data';\n\t\tif (array_key_exists('DEVICE_ID', $_POST) && !empty($_POST['DEVICE_ID']))\n\t\t\t$_POST['SUBJECT_ID'] = $this->getSubjectID($_POST['DEVICE_ID'], $message, $worked);\n\t\tif ($worked == false)\n\t\t{\n\t\t\t$this->set('result', $worked);\n\t\t\t$this->set('message', $message);\n\t\t\treturn;\n\t\t}\n\t\t$this->set('result', true);\n\t\t$s = ' style=\"border:1px solid black;\"';\n\t\t$body = \"<html><body><table$s><tr$s><th$s colspan=\\\"2\\\">Survey Droid crash Report</th></tr>\";\n\t\tforeach ($_POST as $key => $val)\n\t\t{\n\t\t\t$val = str_replace(\"\\n\", '<br />', $val);\n\t\t\t$body .= \"<tr$s><td$s><strong>$key</strong></td><td$s>$val</td></tr>\";\n\t\t}\n\t\t$body .= '</table></body></html>';\n\t\t$subject = 'Survey Droid exception received';\n\t\t$headers = \"From: [email protected]\\r\\n\";\n\t\t$headers .= \"Content-type: text/html\\r\\n\"; \n\t\tfor ($i = 1; $i <= NUM_ADMIN_EMAILS; $i++)\n\t\t{\n\t\t\t$to = constant(\"ADMIN_EMAIL$i\");\n\t\t\tmail($to, $subject, $body, $headers);\n\t\t}\n\t}", "title": "" }, { "docid": "ea2b0fb37e9445e93a09de7b116d7307", "score": "0.5149796", "text": "public function recaptchaCheck($gcaptcha, $ip)\n {\n $this->response = htmlspecialchars($gcaptcha);\n $this->remoteip = $ip;\n \n // Url to send a post request to\n $api_url = \"https://www.google.com/recaptcha/api/siteverify\";\n\n\n $fields = array(\n 'secret' => $this->secret,\n 'response' => $this->response,\n 'remoteip' => $this->remoteip\n );\n \n $fields_string = \"\";\n \n //url-ify the data for the POST\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string, '&');\n \n //open connection\n $ch = curl_init();\n \n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL, $api_url);\n curl_setopt($ch,CURLOPT_POST, count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n //execute post\n $result = curl_exec($ch);\n \n //close connection\n curl_close($ch);\n \n $decode = json_decode($result, true);\n \n if ($decode['success'] == true) {\n // yeah good to go !!\n }\n \n else {\n throw new \\Exception(\"You are a bot, aren't you !! \".$decode['success']);\n }\n }", "title": "" }, { "docid": "909aa8ed0ee725412ac15e42d5396bd9", "score": "0.51489943", "text": "function my_contact_form_generate_response($type, $message){\r\n\r\n global $response;\r\n\r\n if($type == \"success\") $response = \"<div class='success'>{$message}</div>\";\r\n else $response = \"<div class='error'>{$message}</div>\";\r\n\r\n }", "title": "" }, { "docid": "aedec5d1b8222b650ef51a61720f2684", "score": "0.51456547", "text": "function uninstall_captcha(){ }", "title": "" }, { "docid": "cef0cc3e38bd5b8c64eb0195fcfa7add", "score": "0.51443774", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS['HTTP_RAW_POST_DATA'];\n\n $array_weixinpress_option = get_weixinpress_option();\n $array_weixinpress_welcome_cmd = explode(' ', $array_weixinpress_option[WXP_WELCOME_CMD]);\n $array_weixinpress_help_cmd = explode(' ', $array_weixinpress_option[WXP_HELP_CMD]);\n $array_weixinpress_new_cmd = explode(' ', $array_weixinpress_option[WXP_NEW_ARTICLE_CMD]);\n $array_weixinpress_rand_cmd = explode(' ', $array_weixinpress_option[WXP_RAND_ARTICLE_CMD]);\n $array_weixinpress_hot_cmd = explode(' ', $array_weixinpress_option[WXP_HOT_ARTICLE_CMD]);\n $wxp_keyword_length = $array_weixinpress_option[WXP_KEYWORD_LENGTH];\n $wxp_auto_reply = $array_weixinpress_option[WXP_AUTO_REPLY];\n $wxp_keyword_length_warning = $array_weixinpress_option[WXP_KEYWORD_LENGTH_WARNING];\n $wxp_keyword_error_warning = $array_weixinpress_option[WXP_KEYWORD_ERROR_WARNING];\n $wxp_cmd_seperator = $array_weixinpress_option[WXP_CMD_SEPERATOR];\n\n //extract post data\n if (isset($_GET['debug']) || !empty($postStr)){ \n if(!isset($_GET['debug'])){\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $msgType = strtolower(trim($postObj->MsgType));\n if($msgType == 'event'){\n $keywords = strtolower(trim($postObj->Event));\n }else{\n $keywords = strtolower(trim($postObj->Content));\n }\n\n //add by HQ\n $keywordArray = explode($wxp_cmd_seperator, $keywords, 2);\n if(is_array($keywordArray)){\n $this->keyword = $keywordArray[0];\n $this->arg = $keywordArray[1];\n } else {\n $this->keyword = $keywordArray;\n }\n\n\n }\n\n $time = time();\n $textTpl = '<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%d</CreateTime>\n <MsgType><![CDATA[text]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>'; \n $picTpl = ' <xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%d</CreateTime>\n <MsgType><![CDATA[news]]></MsgType>\n <Content><![CDATA[]]></Content>\n <ArticleCount>%d</ArticleCount>\n <Articles>\n %s\n </Articles>\n <FuncFlag>1</FuncFlag>\n </xml>';\n\n $weixin_custom_keywords = apply_filters('weixin_custom_keywords',array());\n\n if(in_array($this->keyword, $weixin_custom_keywords)){\n do_action('weinxinpress',$this->keyword,$textTpl, $picTpl);\n }elseif(in_array($this->keyword, $array_weixinpress_welcome_cmd) || $this->keyword == 'subscribe' ){\n // welcome\n $weixin_welcome = $array_weixinpress_option[WXP_WELCOME];\n $weixin_welcome = apply_filters('weixin_welcome',$weixin_welcome);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_welcome);\n }elseif(in_array($this->keyword, $array_weixinpress_help_cmd) ){\n // give help at the same time\n $weixin_help = $array_weixinpress_option[WXP_HELP];\n $weixin_help = apply_filters('weixin_help',$weixin_help);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_help);\n }elseif(in_array($this->keyword, $array_weixinpress_new_cmd)){\n $this->query('new');\n if($this->articleCount == 0){\n $weixin_not_found = \"抱歉,最新文章显示错误,请重试一下 :-) \";\n $weixin_not_found = apply_filters('weixin_not_found', $weixin_not_found, $this->keyword);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_not_found);\n }else{\n echo sprintf($picTpl, $fromUsername, $toUsername, $time, $this->articleCount,$this->items);\n }\n }elseif(in_array($this->keyword, $array_weixinpress_rand_cmd)){\n $this->query('rand');\n if($this->articleCount == 0){\n $weixin_not_found = \"抱歉,随机文章显示错误,请重试一下 :-) \";\n $weixin_not_found = apply_filters('weixin_not_found', $weixin_not_found, $this->keyword);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_not_found);\n }else{\n echo sprintf($picTpl, $fromUsername, $toUsername, $time, $this->articleCount,$this->items);\n }\n }elseif(in_array($this->keyword, $array_weixinpress_hot_cmd)){\n $this->query('hot');\n if($this->articleCount == 0){\n $weixin_not_found = \"抱歉,热门文章显示错误,请重试一下 :-) \";\n $weixin_not_found = apply_filters('weixin_not_found', $weixin_not_found, $this->keyword);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_not_found);\n }else{\n echo sprintf($picTpl, $fromUsername, $toUsername, $time, $this->articleCount,$this->items);\n }\n }else {\n $keyword_length = mb_strwidth(preg_replace('/[\\x00-\\x7F]/','',$this->keyword),'utf-8')+str_word_count($this->keyword)*2;\n\n $weixin_keyword_allow_length = $wxp_keyword_length;\n $weixin_keyword_allow_length = apply_filters('weixin_keyword_allow_length',$weixin_keyword_allow_length);\n \n if($keyword_length > $weixin_keyword_allow_length){\n if($wxp_auto_reply){// if auto reply is set to be true, \n //$weixin_keyword_too_long = '输入的关键字太长,换个稍短的关键字试下?';\n $weixin_keyword_too_long = $wxp_keyword_length_warning;\n $weixin_keyword_too_long = apply_filters('weixin_keywords_too_long',$weixin_keyword_too_long);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_keyword_too_long);\n }\n }elseif( !empty( $this->keyword )){\n $this->query();\n if($this->articleCount == 0){\n //$weixin_not_found = \"抱歉,没有找到与【{$this->keyword}】相关的文章,换个关键字,可能就有结果了哦 :-) \";\n $weixin_not_found = str_replace('{keyword}', $this->keyword, $wxp_keyword_error_warning);\n $weixin_not_found = apply_filters('weixin_not_found', $weixin_not_found, $this->keyword);\n echo sprintf($textTpl, $fromUsername, $toUsername, $time, $weixin_not_found);\n }else{\n echo sprintf($picTpl, $fromUsername, $toUsername, $time, $this->articleCount,$this->items);\n }\n }\n }\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" } ]
c1755da2a7398a619cf6c66b3b1f09c1
cambiar estado de cuenta
[ { "docid": "65b8b240b6f5d17036148f53393e205a", "score": "0.0", "text": "function cambiarEstadoCuenta($id,$newEstado){\n \n $changeS = \"UPDATE `cuenta` SET Cuen_Estado='$newEstado'\"\n . \"WHERE Id_usuario='$id'\";\n $result = mysql_query($changeS) or die(mysql_error());\n \n if($result){\n return 0; //no problem.\n }else{\n return -1; //failed to change.\n }\n }", "title": "" } ]
[ { "docid": "b80006d8d124a505849567bb8651d44c", "score": "0.6807242", "text": "public function limpiar_estado()\n\t{\n\t}", "title": "" }, { "docid": "e7858ca6dc6e941c4d72d85ee5e0eaa9", "score": "0.6653255", "text": "function siguienteEstado(){\n $this->procedimiento = 'misc.ft_conta_alm_ime';\n $this->transaccion = 'MIS_SIGEST_INS';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_conta_alm','id_conta_alm','integer');\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "08b09d2a1a9c30a3d77c250304b4d85b", "score": "0.65795046", "text": "public function ingresar() {\n require 'modelos/usuarioModelo.php';\n\n //Creamos una instancia de nuestro 'modelo'\n $usuarios = new usuarioModelo();\n\n //Le pedimos al modelo todos los items\n $datosUsuario = $usuarios->encontrarUsuario($_POST['rut'], $_POST['contrasena']);\n $n = 0;\n while ($item = $datosUsuario->fetch()) {\n $fecha['year'] = $item['ANIO'];\n $fecha['mon'] = $item['MES'];\n $fecha['mday'] = $item['DIA'];\n $fechaActual = getdate();\n require_once 'controladores/inicioControlador.php'; \n if (inicioControlador::compararFechas($fecha, $fechaActual)== 2) {\n $_SESSION['username'] = $item['NOMBRE'].' '.$item['APELLIDO_PAT'].' '.$item['APELLIDO_MAT'];\n $_SESSION['userid'] = $item['RUT'];\n $_SESSION['tipo'] = $item['TIPO'];\n $_SESSION['acceso'] = true;\n\n $n++;\n }\n }\n echo $n;\n }", "title": "" }, { "docid": "9b1583d1743dad68470f7458e2449907", "score": "0.656332", "text": "public function iniciarActividad() {\n require_once 'DB.php';\n\n $id_texto = $this->generarTexto();\n $actividadNueva = array(\n \"id_usuario\" => $this->id_usuario,\n \"id_actividad\" => $this->id_actividad,\n \"id_texto\" => $id_texto,\n \"iniciada\" => 1,\n \"fecha_inicio\" => time(),\n \"fecha_fin\" => \"--\"\n );\n\n $textoAsignado = array(\n \"asignado\" => 1\n );\n $condicion = \"id_texto=\" . DB::limpiarSQL($id_texto);\n\n $db = new DB();\n $db->conectar();\n\n if ($db->insertarArreglo(\"actividades_por_usuario\", $actividadNueva) && $db->actualizarArreglo($textoAsignado, \"textos\", $condicion)) {\n $db->desconectar();\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c589b69c5566acc22a5a4650d2c4350b", "score": "0.6477348", "text": "public function estatusActiva($datos){\n $this->db->query('SET DATEFORMAT ymd');\n $servicio = $datos['servicio'];\n $nro_orden = $datos['nroOrden'];\n\n // Chequea si existe la orden\n $orden = $this->db->get_where('OrdenServicio',array('nro_orden'=>$nro_orden,'estatus'=>2));\n\n if($orden->num_rows() > 0) {\n // Existe\n if($orden->row_array()['posicion_inicial'] != 1){\n return 8; // NO LE TOCA EL TURNO\n }\n $this->db->select('tecnico');\n $tecnicos_activas = $this->db->get_where('OrdenServicio',array('estatus'=>1));\n $ocupados = array();\n foreach($tecnicos_activas->result_array() as $t){\n $ocupados[] = $t['tecnico'];\n }\n if($tecnicos_activas -> num_rows() == 0) { // ¿hay tecnicos activos?\n // No\n $this->db->select('TecnicoServicio.cedula_tecnico as tecnico');\n $this->db->order_by('Tecnicos.nombre');\n $this->db->join('Tecnicos','Tecnicos.cedula = TecnicoServicio.cedula_tecnico','inner');\n $filas = $this->db->get_where('TecnicoServicio',array('servicio'=>$servicio))->result_array();\n $tecnico_establecido = $filas[0]; // Escoge el primer tecnico ordenado por nombre\n $this->establecerTecnico($tecnico_establecido['tecnico'],$nro_orden);\n $data = array('estatus'=>1,'fecha_inicio'=>$datos['fecha_inicio']);\n $this->db->where('nro_orden',$nro_orden);\n $this->db->update('OrdenServicio',$data);\n\n // Ahora busca todas las ordenes de ese servicio que esten pendiente\n // y le disminuye en uno su posicion_inicial\n $this->db->select('posicion_inicial,nro_orden');\n $cola = $this->db->get_where('OrdenServicio',array('estatus'=>2,'servicio'=>$servicio))->result_array();\n foreach($cola as $c){\n $modificacion = array(\n \"posicion_inicial\" => $c['posicion_inicial'] - 1,\n );\n $this->db->where('nro_orden',$c['nro_orden']);\n $this->db->update('OrdenServicio',$modificacion);\n }\n return 1;\n } else {\n // Busca los demas tecnicos que prestan ese servicio\n // Y le coloca el primero que encuentre\n $this->db->select('cedula_tecnico as tecnico');\n $this->db->from('TecnicoServicio');\n $this->db->where_not_in('cedula_tecnico',$ocupados);\n $this->db->where('servicio',$servicio);\n $tecnicosDisponibles = $this->db->get();\n if($tecnicosDisponibles -> num_rows() > 0){ // Hay tecnicos disponibles\n // Si hay mas tecnicos, le establece uno\n $this->establecerTecnico($tecnicosDisponibles->result_array()[0]['tecnico'],$nro_orden);\n $data = array('estatus'=>1,'fecha_inicio'=>$datos['fecha_inicio']);\n $this->db->where('nro_orden',$nro_orden);\n \n $this->db->update('OrdenServicio',$data);\n // Ahora busca todas las ordenes de ese servicio que esten pendiente\n // y le disminuye en uno su posicion_inicial\n $this->db->select('posicion_inicial,nro_orden');\n $cola = $this->db->get_where('OrdenServicio',array('estatus'=>2,'servicio'=>$servicio))->result_array();\n foreach($cola as $c){\n $modificacion = array(\n \"posicion_inicial\" => $c['posicion_inicial'] - 1,\n );\n $this->db->where('nro_orden',$c['nro_orden']);\n $this->db->update('OrdenServicio',$modificacion);\n }\n return 7;\n } else {\n // No hay tecnicos, debe esperar o cerrar la orden activa correspondiente\n\n return 5;\n }\n }\n\n } else {\n return 15; // No existe esa orden de servicio\n }\n }", "title": "" }, { "docid": "b6b0c64d5f008f159a2f98255395b38d", "score": "0.647112", "text": "function verificado($cobro){\n\t\t$db = new My();\n $db_u = new My();\n $db->Query(\"SELECT factura,id_cuota,entrega_actual FROM pago_rec_det WHERE id_pago = $cobro\");\n \n while($db->NextRecord()){\n $factura = $db->Record['factura'];\n $id_cuota = $db->Record['id_cuota'];\n $entrega_actual= $db->Record['entrega_actual'];\n \n $db_u->Query(\"UPDATE cuotas SET saldo = saldo - $entrega_actual WHERE f_nro = $factura AND id_cuota = $id_cuota;\");\n $db_u->Query(\"UPDATE cuotas SET estado ='Cancelada' WHERE f_nro = $factura AND saldo = 0;\"); //id_cuota = $id_cuota and // Todas las cuotas con saldo 0 de esta factura poner como cancelada\n } \n \n\t\t$db->Query(\"UPDATE pagos_recibidos set control_caja='Si', e_sap = 1 where id_pago = $cobro\"); \n\t\tif($db->AffectedRows() > 0){\n\t\t\techo '{\"msg\":\"Ok\"}';\n\t\t}else{\n\t\t\techo '{\"msg\":\"error\"}';\n\t\t}\n\t}", "title": "" }, { "docid": "64e6953a6ea57eaf829cc49c13d831fc", "score": "0.6404519", "text": "public function noPuedeCambiarSuEstado()\n {\n return $this->id === auth()->user()->id and request()->estado === Estado::inactivo();\n }", "title": "" }, { "docid": "4623c4fbacbed2d197f645d79385ace1", "score": "0.63918614", "text": "function verificaConciliacionBancos(){\n\t$valida = $this->ConciliacionAcontiaModel->validaEstado($_REQUEST['periodo'], $_REQUEST['ejercicio'], $_REQUEST['idbancaria']);\n\tif($valida->num_rows>0){\n\t\t$finconciiado = $this->ConciliacionAcontiaModel->verifaFinConciliacionBancos($_REQUEST['idbancaria'], $_REQUEST['periodo'], $_REQUEST['ejercicio']);\n\t\tif($finconciiado->num_rows>0){\n\t\t\techo 2;//si ya esta conciliado osea en la tabla de saldos conciliacionBancos puede proceder\n\t\t}else{\n\t\t\techo 1;//si trae movimientos esq aun no finaliza no podra proceder\n\t\t}\n\t}else{\n\t\techo 0;//el estado de cuenta no esta importado\n\t}\n}", "title": "" }, { "docid": "a3c2f26f530d200d68576f7d4c1d2a69", "score": "0.6391704", "text": "function verificaAvisos(){\r\n $mensajes = array();\r\n $user = $this->loadUser(Yii::app()->user->id);\r\n if($user != null){\r\n $conf = $user->configuracion;\r\n $msg = \"<ul>\";\r\n \r\n if($conf != null){\r\n if($conf->mensaje_alerta == null){\r\n $msg = $msg.\"<li>Agrega un mensaje de alerta</li>\";\r\n }\r\n if($conf->radio_busqueda == null){\r\n $msg = $msg.\"<li>Agrega un radio de búsqueda</li>\";\r\n }\r\n if($conf->numero_centro_medico == null){\r\n $msg = $msg.\"<li>Agrega un número favorito de un centro médico</li>\";\r\n }\r\n if($conf->numero_bombero == null){\r\n $msg = $msg.\"<li>Agrega un número favorito de un cuerpo de bomberos</li>\";\r\n }\r\n if($conf->numero_carabinero == null){\r\n $msg = $msg.\"<li>Agrega un número favorito de una comisaría</li>\";\r\n }\r\n \r\n\r\n }\r\n if($user->regid == null){\r\n $msg2 = \"Tu cuenta no está aún vinculada a un dispositivo móvil, ¡Que esperas para hacerlo!\";\r\n }\r\n if($msg != \"<ul>\")\r\n $mensajes[] = array(\"msg\"=>\"Todavía no has terminado de configurar tu cuenta: \\n\".$msg.\"</ul>\", \"color\"=>TbHtml::ALERT_COLOR_WARNING);\r\n if(isset($msg2))\r\n $mensajes[] = array(\"msg\"=>$msg2,\"color\"=>TbHtml::ALERT_COLOR_INFO);\r\n return $mensajes;\r\n }\r\n }", "title": "" }, { "docid": "8ae555d17a54dddfba6716c583a4fb5b", "score": "0.6379081", "text": "function recuperarDatosTipoEstadoCuenta(){ \t\n\t\t$this->objFunc = $this->create('MODTipoEstadoCuenta');\n\t\t$cbteHeader = $this->objFunc->getTipoEstadoCuenta($this->objParam);\n\t\tif($cbteHeader->getTipo() == 'EXITO'){\t\t\t\t\n\t\t\treturn $cbteHeader;\n\t\t}\n\t\telse{\n\t\t\t$cbteHeader->imprimirRespuesta($cbteHeader->generarJson());\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "8b25dc0713f51fcdbddd3cc578871537", "score": "0.63435036", "text": "function siguienteEstado(){\n $this->procedimiento = 'asis.ft_permiso_ime';\n $this->transaccion = 'ASIS_SIGPMO_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "acd49a9110ac05c7804cc07e1a03f787", "score": "0.6302054", "text": "function OCMvacio()\r\n\t\t{\r\n\t\t\tconexion();\r\n\t\t\t$sql=\"SELECT COUNT(id) FROM gu_ocm;\";\r\n\t\t\t$resultado = mysql_query($sql);\r\n\t\t\t$resultado = mysql_fetch_array($resultado);\r\n\t\t\t$buleano = true;\r\n\r\n\t\t\tif ($resultado[0] == 0)\r\n\t\t\t{\r\n\t\t\t\t// echo \"La tabla OCM está vacía, no hay ticket en Open Calls <br>\";\r\n\t\t\t\t// enviarCorreo('','comprobad si ha fallado la macro de descarga del fichero OCM.');\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "5b7b12deb20095566fa4336f6cd579de", "score": "0.62864804", "text": "public function activar($correo)\n {\n $sql=\"UPDATE usuario SET estado='1' WHERE correo='$correo'\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "84e56c3ef049b9a9eb53d00de6e4f166", "score": "0.6276567", "text": "public function cuenta_login_tarde()\n\t{\n\t\t$control = true;\n\t\t$cant_tarde = 0;\n\t\t$str = \"select count(ID_REG_CLIE) as CANT_TARDE from audit_cliente where DATE_FORMAT(FECH_HOR_CLIE, '%H:%i:%s') between '16:00:00' and '23:59:59' and COMENTARIO_CLIE like '%ha Iniciado%' and COMENTARIO_CLIE not like '%admin%' and COMENTARIO_CLIE not like '%Administrador%'\";\n\t\t$ejecutar = mysql_query($str) or die(mysql_error());\n\t\t$num_reg = mysql_num_rows($ejecutar);\n\t\tif ($num_reg == 0)\n\t\t{\n\t\t\t$control = false;\n\t\t\treturn $control;\n\t\t}\n\t\telse {\n\t\t\t$arreglo = mysql_fetch_array($ejecutar);\n\t\t\t$cant_tarde = $arreglo[\"CANT_TARDE\"];\n\t\t\treturn $cant_tarde;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7a347b346b04127bcbb0592f847e53aa", "score": "0.6271303", "text": "public function cuadre_caja($fecha, $tipo, $almacen)\n {\n\n $is_admin = $this->session->userdata('is_admin');\n $username = $this->session->userdata('username');\n $base_dato = $this->session->userdata('base_dato');\n $condition_1 = \"\";\n\n if ($is_admin != 't' && $is_admin != 'a') { //usuario\n //------------------------------------------------ almacen usuario\n $is_admin = $this->session->userdata('is_admin');\n $username = $this->session->userdata('username');\n $db_config_id = $this->session->userdata('db_config_id');\n $id_user = '';\n $almacen = '';\n $user = $this->db->query(\"SELECT id FROM users where username = '\" . $username . \"' and db_config_id = '\" . $db_config_id . \"' limit 1\")->result();\n foreach ($user as $dat) {\n $id_user = $dat->id;\n }\n\n $user = $this->connection->query(\"SELECT almacen_id FROM usuario_almacen where usuario_id = '\" . $id_user . \"' limit 1\")->result();\n foreach ($user as $dat) {\n $almacen = $dat->almacen_id;\n }\n //---------------------------------------------\n }\n\n if ($almacen == '0') {\n $condition = '';\n } else {\n $condition = \" and venta.almacen_id = '$almacen' \";\n $condition_1 = \" and orden_compra.almacen_id = '$almacen' \";\n }\n\n $forma_pago = \"select venta.id as id_venta, sum(valor_entregado) - sum(ventas_pago.cambio) as total_venta, count(forma_pago) as cantidad, forma_pago from ventas_pago\n\t\tinner join venta on ventas_pago.id_venta = venta.id\n\t\twhere date(fecha) = '$fecha' and estado='0' and venta.activo = '1' $condition group by forma_pago\";\n //echo $forma_pago;\n $forma_pago_result1 = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $vr_total = 0;\n //var_dump($forma_pago_result);\n foreach ($forma_pago_result as $value) {\n $forma_pago_result1[] = array('forma_pago' => $value->forma_pago,\n 'cantidad' => $value->cantidad,\n 'vr_valor' => $value->total_venta,\n );\n }\n\n $forma_pago = \"select venta.id as id_venta, sum(valor_entregado) - sum(ventas_pago.cambio) as total_venta, count(forma_pago) as cantidad, forma_pago from ventas_pago\n\t\tinner join venta on ventas_pago.id_venta = venta.id\n\t\twhere date(fecha) = '$fecha' and estado='0' $condition and forma_pago <> 'Credito' and forma_pago <> 'Saldo_a_Favor' and forma_pago <> 'Gift_Card' group by forma_pago\";\n\n //die($forma_pago);\n $forma_pago_ventas = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $vr_total = 0;\n\n foreach ($forma_pago_result as $value) {\n $forma_pago_ventas[] = array(\n 'forma_pago' => $value->forma_pago,\n 'cantidad' => $value->cantidad,\n 'vr_valor' => $value->total_venta,\n );\n }\n\n $forma_pago = \"select venta.id as id_venta, sum(valor_entregado) - sum(ventas_pago.cambio) as total_venta, count(forma_pago) as cantidad, forma_pago from ventas_pago\n\t\tinner join venta on ventas_pago.id_venta = venta.id\n\t\twhere date(fecha) = '$fecha' and estado='0' $condition and forma_pago <> 'Credito' and forma_pago <> 'Saldo_a_Favor' and forma_pago <> 'Gift_Card' group by forma_pago\";\n\n $forma_pago_ventas = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $vr_total = 0;\n\n foreach ($forma_pago_result as $value) {\n $forma_pago_ventas[] = array(\n 'forma_pago' => $value->forma_pago,\n 'cantidad' => $value->cantidad,\n 'vr_valor' => $value->total_venta,\n );\n }\n\n $total_pagos_plan_separe = 0;\n if ($this->session->userdata('base_dato') == 'vendty2_db_562a64c85a0a2' || $this->session->userdata('base_dato') == 'vendty2_db_1542_venta2015') {\n $forma_pago = \"select sum(valor_entregado) as total_pagos_plan_separe from plan_separe_pagos\n\t inner join plan_separe_factura as venta on plan_separe_pagos.id_venta = venta.id\n\t\t\t\t\t where date(plan_separe_pagos.fecha) = '$fecha' $condition \";\n $forma_pago_credito = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n\n foreach ($forma_pago_result as $value) {\n\n $total_pagos_plan_separe = $value->total_pagos_plan_separe;\n }\n }\n\n //Abonos plan separe\n $abonos_plan_separe = 0;\n $forma_pago = \"select sum(valor_entregado) as total_pagos_plan_separe from plan_separe_pagos\n inner join plan_separe_factura as venta on plan_separe_pagos.id_venta = venta.id\n where date(plan_separe_pagos.fecha) = '$fecha' $condition \";\n $forma_pago_credito = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n\n foreach ($forma_pago_result as $value) {\n $abonos_plan_separe = $value->total_pagos_plan_separe;\n $abonos_plan_separe_array[] = array(\n 'forma_pago' => '',\n 'cantidad' => '',\n 'valor' => $value->total_pagos_plan_separe,\n );\n }\n\n //Ventas anouladas\n $ventasAnuladas = $this->Caja->obtenerVentasAnuladas($fecha);\n\n //Ventas devueltas\n $ventasDevueltas = $this->Caja->obtenerDevoluciones($fecha, $almacen);\n\n $forma_pago = \"select sum(cantidad) as total_credito from pago\n\t inner join venta on pago.id_factura = venta.id\n\t\twhere date(fecha_pago) = '$fecha' $condition \";\n $forma_pago_credito = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $vr_total = 0;\n foreach ($forma_pago_result as $value) {\n\n $forma_pago_credito[] = array('total_credito' => $value->total_credito + $total_pagos_plan_separe);\n }\n\n $forma_pago = \"select sum(cantidad) as total_credito from pago_orden_compra\n\t inner join orden_compra on pago_orden_compra.id_factura = orden_compra.id\n\t\twhere date(fecha_pago) = '$fecha' $condition_1 \";\n $forma_pago_proveedor = array();\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $vr_total = 0;\n foreach ($forma_pago_result as $value) {\n\n $forma_pago_proveedor[] = array('total_proveedor' => $value->total_credito,\n );\n }\n\n $impuesto = \"select nombre_impuesto, impuesto.porciento, sum(unidades) as unidades, sum(precio_venta) as precio\n\t\t from venta\n\t\t inner join detalle_venta on detalle_venta.venta_id = venta.id\n\t\t inner join impuesto on detalle_venta.impuesto = impuesto.porciento\n\t\t where date(fecha) = '$fecha' and estado='0' and venta.activo = '1' $condition group by impuesto.id_impuesto\";\n\n $detalleventaid = 0;\n\n $sqlAlmacen = \"\";\n if ($almacen != 0) {\n $sqlAlmacen = \" AND almacen_id = $almacen\";\n }\n\n $sql = \"SELECT id FROM venta where date(fecha) = '$fecha' and estado='0' AND activo = 1 $sqlAlmacen\";\n\n $data = array();\n foreach ($this->connection->query($sql)->result() as $value1) {\n\n $detalleventaid = $detalleventaid . \",'\" . $value1->id . \"'\";\n }\n\n $rest1 = substr($detalleventaid, 2);\n if ($rest1 == '') {\n $rest1 = 0;\n } else {\n $rest1 = substr($detalleventaid, 2);\n\n $impuesto = \"SELECT DATE(`fecha`) AS fecha_dia\n\t , (SELECT nombre_impuesto FROM `impuesto` where porciento = impuesto limit 1) as imp\n\t ,SUM( (`precio_venta` - `descuento`) * impuesto / 100 * `unidades` ) AS impuestos\n\t ,SUM( `precio_venta` * `unidades` ) AS total_precio_venta\n\t ,SUM( `unidades` * `descuento` ) AS total_descuento\n\t FROM `venta`\n\t inner join detalle_venta on venta.id = detalle_venta.venta_id\n\t WHERE venta.id IN (\" . $rest1 . \") and venta.activo = '1' group by impuesto\";\n\n $where_gastos = \"\";\n if ($almacen != null && $almacen != 0) {\n $where_gastos = \"and id_almacen = '$almacen' \";\n }\n\n $gastos = \"SELECT sum(valor) as total FROM proformas where fecha = '$fecha' $where_gastos group by fecha;\";\n $factura = \"SELECT\n venta.almacen_id, venta.id, venta.factura, venta.total_venta, codigo_producto,nombre_producto,sum(unidades) as unidades ,\n precio_venta as precio_unidad ,impuesto, ( (sum(precio_venta) * (impuesto/100) ) *unidades) as valor_impuesto,\n (precio_venta * sum(unidades)) as valor,\n sum((precio_venta+((precio_venta)*(impuesto/100)))*unidades) as total ,\n (sum(descuento)*unidades) as descuento,\n count(venta.id) as total_final\n FROM venta\n inner join detalle_venta on detalle_venta.venta_id = venta.id\n where date(fecha) = '$fecha' and estado='0' $condition\n group by codigo_producto order by venta.id asc\";\n $forma_pago_result = $this->connection->query($forma_pago)->result();\n $gastos_pago_result = $this->connection->query($gastos)->result();\n $impuesto_result = $this->connection->query($impuesto)->result();\n }\n\n if ($tipo == 'producto') {\n //ini_set('display_errors', 1);\n $factura1 = \"SELECT venta.id as id_venta, factura, venta.activo AS venta_plan_activo, venta.vendedor, a.nombre\n FROM venta\n INNER JOIN almacen AS a ON a.id=venta.almacen_id\n WHERE date(fecha) = '$fecha' and estado='0' $condition \";\n\n //var_dump($this->connection->query($factura1));\n $factura_result = $this->connection->query($factura1)->result();\n $factura_data = array();\n\n $vrUnidades = 0;\n $vrPrecioUnidad = 0;\n $vrValor = 0;\n $vrDescuento = 0;\n $vrValorImpuesto = 0;\n $vrTotal = 0;\n\n foreach ($factura_result as $value) {\n $value->id_venta . \"<br>\";\n $get_details = \"select precio_venta, unidades, descuento, impuesto, venta_id, nombre_producto from detalle_venta where venta_id = $value->id_venta \";\n $details_result = $this->connection->query($get_details)->result();\n $vr_impuesto = 0;\n $vr_valor = 0;\n $vr_pdv = 0;\n $vr_pdv1 = 0;\n $vr_column = 0;\n $vr_bruto = 0;\n $vr_unidades = 0;\n foreach ($details_result as $detail) {\n\n $vr_pdv = $detail->precio_venta * $detail->unidades;\n $vr_pdv1 = $detail->descuento * $detail->unidades;\n $vr_pdv2 = $detail->precio_venta - $detail->descuento;\n $vr_unidades = $detail->unidades;\n\n $vr_bruto = $vr_pdv - $vr_pdv1;\n $vr_impuesto = $vr_pdv2 * $detail->impuesto / 100 * $detail->unidades;\n $vr_column = $vr_pdv - $vr_pdv1;\n $vr_valor = $vr_pdv - $vr_pdv1;\n\n $vendedor = '';\n $total_vendedor = \"SELECT nombre FROM `vendedor` WHERE id = '\" . $value->vendedor . \"'\";\n $total_vendedor_result = $this->connection->query($total_vendedor)->result();\n foreach ($total_vendedor_result as $dat1) {\n $vendedor = $dat1->nombre;\n }\n\n $total_opciones = \"SELECT valor_opcion FROM `opciones` WHERE id = '1'\";\n $total_opciones_result = $this->connection->query($total_opciones)->result();\n foreach ($total_opciones_result as $dat1) {\n $empresa = $dat1->valor_opcion;\n }\n\n $factura_data[] = array('nombre_producto' => $detail->nombre_producto,\n 'vendedor' => $vendedor,\n 'empresa' => $empresa,\n 'venta_plan_activo' => $value->venta_plan_activo,\n 'unidades' => $vr_unidades,\n 'precio_unidad' => $detail->precio_venta,\n 'valor' => ($vr_bruto),\n 'valor_impuesto' => ($vr_impuesto),\n 'total' => ($detail->precio_venta),\n 'valorTotal' => ($vr_impuesto + $vr_bruto),\n 'descuento' => ($detail->descuento),\n 'factura' => $value->factura,\n 'almacen_id' => $value->nombre,\n );\n $vrUnidades += $vr_unidades;\n $vrPrecioUnidad += $detail->precio_venta;\n $vrValor += $vr_bruto;\n $vrDescuento += $detail->descuento;\n $vrValorImpuesto += $vr_impuesto;\n $vrTotal += $vr_impuesto + $vr_bruto;\n }\n }\n\n return array(\n 'forma_pago' => $forma_pago_result1\n , 'impuesto_result' => (isset($impuesto_result) && $impuesto_result != null) ? $impuesto_result : 0\n , 'factura_data' => $factura_data\n , 'gastos' => (isset($gastos_pago_result) && $gastos_pago_result != null) ? $gastos_pago_result : 0\n , 'forma_pago_credito' => $forma_pago_credito\n , 'abonos_plan_separe_array' => $abonos_plan_separe_array\n , 'forma_pago_proveedor' => $forma_pago_proveedor\n , 'forma_pago_ventas' => $forma_pago_ventas\n , 'vrUnidades' => ($vrUnidades)\n , 'vrPrecioUnidad' => ($vrPrecioUnidad)\n , 'vrValor' => ($vrValor)\n , 'vrDescuento' => ($vrDescuento)\n , 'vrValorImpuesto' => ($vrValorImpuesto)\n , 'vrTotal' => ($vrTotal)\n , 'ventas_anuladas' => $ventasAnuladas\n , 'ventas_devueltas' => $ventasDevueltas,\n );\n } else if ($tipo == 'factura') {\n $factura1 = \"SELECT\n almacen.nombre as almacen_id, venta.id, venta.activo AS venta_plan_activo,venta.factura, vendedor, venta.total_venta, codigo_producto,nombre_producto,sum(unidades) as unidades ,\n precio_venta as precio_unidad ,impuesto, ( ((sum(precio_venta)*unidades - sum(descuento)) * (impuesto/100) ) ) as valor_impuesto,\n (sum(unidades)) as valor_unidades,\n\t\t\t\t\t\t(sum(precio_venta)) as valor_ventas,\n (precio_venta+((precio_venta)*(impuesto/100)))*unidades as total ,\n (sum(descuento) ) as descuento\n FROM venta\n inner join detalle_venta on detalle_venta.venta_id = venta.id\n inner join almacen on almacen.id=venta.almacen_id\n where date(fecha) = '$fecha' and estado = '0' $condition\n group by venta.id order by venta.id asc\";\n\n $factura_result = $this->connection->query($factura1)->result();\n\n $vrBrutoTotal = 0;\n $vrImpuestoTotal = 0;\n $vrDescuentoTotal = 0;\n $vrTotal = 0;\n $factura_data = array();\n foreach ($factura_result as $value) {\n $get_details = \"select * from detalle_venta where venta_id = $value->id\";\n $details_result = $this->connection->query($get_details)->result();\n $vr_impuesto = 0;\n $vr_valor = 0;\n $vr_pdv = 0;\n $vr_pdv1 = 0;\n $vr_column = 0;\n $vr_bruto = 0;\n foreach ($details_result as $detail) {\n\n $vr_pdv = $detail->precio_venta * $detail->unidades;\n $vr_pdv1 = $detail->descuento * $detail->unidades;\n $vr_pdv2 = $detail->precio_venta - $detail->descuento;\n\n $vr_bruto += $vr_pdv;\n $vr_impuesto += $vr_pdv2 * $detail->impuesto / 100 * $detail->unidades;\n $vr_column = $vr_pdv - $vr_pdv1;\n $vr_valor += $vr_pdv - $vr_pdv1;\n }\n\n $vendedor = '';\n $total_vendedor = \"SELECT nombre FROM `vendedor` WHERE id = '\" . $value->vendedor . \"'\";\n $total_vendedor_result = $this->connection->query($total_vendedor)->result();\n foreach ($total_vendedor_result as $dat1) {\n $vendedor = $dat1->nombre;\n }\n\n $total_opciones = \"SELECT valor_opcion FROM `opciones` WHERE id = '1'\";\n $total_opciones_result = $this->connection->query($total_opciones)->result();\n foreach ($total_opciones_result as $dat1) {\n $empresa = $dat1->valor_opcion;\n }\n\n $factura_data[] = array('factura' => $value->factura,\n 'vendedor' => $vendedor,\n 'empresa' => $empresa,\n 'venta_plan_activo' => $value->venta_plan_activo,\n 'total_venta' => $value->total_venta,\n 'vr_impuesto' => ($vr_impuesto),\n 'vr_valor' => ($vr_valor),\n 'descuento' => ($value->descuento * $detail->unidades),\n 'vr_bruto' => ($vr_bruto),\n 'vr_neto' => ($vr_valor + $vr_impuesto),\n 'id_almacen' => $value->almacen_id,\n 'unidades' => $value->valor_unidades,\n 'precio_unidad' => $value->precio_unidad,\n );\n\n $vrBrutoTotal += $vr_bruto;\n $vrImpuestoTotal += $vr_impuesto;\n $vrDescuentoTotal += $value->descuento * $detail->unidades;\n $vrTotal += $vr_valor + $vr_impuesto;\n }\n\n //var_dump($impuesto_result);die();\n return array(\n 'forma_pago' => $forma_pago_result1\n , 'impuesto_result' => (isset($impuesto_result) && $impuesto_result != null) ? $impuesto_result : 0\n , 'factura_data' => $factura_data\n , 'gastos' => (isset($gastos_pago_result) && $gastos_pago_result != null) ? $gastos_pago_result : 0\n , 'forma_pago_credito' => $forma_pago_credito\n , 'forma_pago_proveedor' => $forma_pago_proveedor\n , 'forma_pago_ventas' => $forma_pago_ventas\n , 'vrBrutoTotal' => ($vrBrutoTotal)\n , 'vrImpuestoTotal' => ($vrImpuestoTotal)\n , 'vrDescuentoTotal' => ($vrDescuentoTotal)\n , 'vrTotal' => ($vrTotal)\n , 'ventas_anuladas' => $ventasAnuladas\n , 'ventas_devueltas' => $ventasDevueltas,\n );\n }\n }", "title": "" }, { "docid": "862a8f273836d7056fdadda5b601ac84", "score": "0.6242221", "text": "public function estaVencido()\n {\n }", "title": "" }, { "docid": "02dd28eafee0c7eb66f350c6c8703c6b", "score": "0.6241412", "text": "function siguienteEstadoSolicitud()\r\n {\r\n $this->procedimiento = 'mat.ft_solicitud_ime';\r\n $this->transaccion = 'MAT_SIG_IME';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\r\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\r\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\r\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\r\n $this->setParametro('obs', 'obs', 'text');\r\n $this->setParametro('json_procesos', 'json_procesos', 'text');\r\n /*Aumentando para realizar control (Ismael Valdivia 19/02/2020)*/\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('idPoAlkym', 'idPoAlkym', 'int4');\r\n $this->setParametro('nro_po', 'nro_po', 'varchar');\r\n /**************************************************************/\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "092faabaaaa3c607b2f816703d2f037e", "score": "0.62252724", "text": "function cambiarEstado(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE catalogo_tipo_usuario SET cau_estado='$estado' WHERE cau_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "title": "" }, { "docid": "1194cc95a37d73fdc547a3cda439efcc", "score": "0.6219407", "text": "public function olvidocontrasena()\n\t\t{\n\t\t\t$this->consulta(\" SELECT ced_usu FROM tusuario WHERE ced_usu = '$this->c_$cedula' AND respuesta1='$this->c_respuesta1' AND respuesta2='$this->c_respuesta2'\");\n\t\t//true para validar if\n\t\t\treturn true;\n\t }", "title": "" }, { "docid": "13a3851f7b57f51bdeba21edfb2195a5", "score": "0.61971545", "text": "function activoIncompleto(){\n\t\n\t$con = ConectarBD();\n\t$strSql = \"SELECT * FROM deprecactivos WHERE estatus = 1;\";\n\t$ejec = mysql_query($strSql,$con);\n\t\t\t\n\t\t$faltaCompletar = mysql_num_rows($ejec) ;\n\t\tif($faltaCompletar){\n\t\t\treturn print(\"<script language='javascript'>\n\t\t\t\n\t\t\twindow.onload = function(e){ \n\t\t\t\talert('Existen activos con datos incompletos');\n\t\t\t\tdocument.getElementById('BtnBuscar').click();\n\t\t\t}\n\t\t </script>\");\n\t\t}\n}", "title": "" }, { "docid": "668a23e663a7faa400dfb6097ae7c3f0", "score": "0.6183886", "text": "public function confirmar() {\n $hash = filter_input(INPUT_GET, 'codigo');\n $Usuario = cargarModelo('Usuario');\n $Usuario->id = $this->descifrar($hash);\n $Usuario->buscar();\n if ($Usuario->buscar()) {\n $Usuario->activar();\n redireccionar('inicio.principal');\n } else {\n $this->error(\"confirmacion\");\n }\n }", "title": "" }, { "docid": "fa312008614127ccc9c6da624beee545", "score": "0.6163746", "text": "public function verificarEstudiante(){\n\n\t\tif(Session::get(\"autenticado\")){\n\t\t\t$this->redirect(\"site/index\");\n\t\t}\n\t\t\t\n\t\t\n\t\t$model = new Site();\n\t\t$this->_view->titulo = \"Verificación\";\n\t\t\n\n\t\tif($model->requestPost()){\n\n\n\t\t\t//validaciones\n\n\t\t\tif(!$model->cedula){\n\t\t\t\t$this->_view->error = \"Por favor, debe introducir un número de cédula.\";\n\t\t\t\t$this->_view->render(\"verificarEstudiante\",\"site\");\n\t\t\t\texit;\n\t\t\t}\t\n\n\t\t\t//fin validaciones\n\t\t\t$nac = $model->nac;\n\t\t\t$result = \t$model->searchByQuery(\"select * from estudiante where nac = '$nac' and cedula_estudiante = '$model->cedula' \");\t\n\n\n\t\t\tif($result){\n\n\t\t\t\t//guardamos en $control el resultado que devuelva la funcion, para evaluar si el numero de cedula tiene un usuario registrado o no\n\t\t\t\t$control = \t$this->userControl($model->cedula);\n\n\t\t\t\tif($control){\n\n\t\t\t\t\t//en caso de ser true, quiere decir que ya tiene un usuario registrado, por lo que lo redirigimos al login\n\t\t\t\t\t$this->redirect(\"site/login&ok=8\");\n\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$this->redirect(\"site/registro&ok=5&ci=\".$model->cedula);\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\t$this->redirect(\"site/verificarEstudiante&ok=4\");\n\t\t\t}\n\t\t}else{\n\n\n\t\t\t$this->_view->render(\"verificarEstudiante\", \"registro\");\n\t\t} \n\t}", "title": "" }, { "docid": "41164d733bbb45a5fedce5a254dcaef1", "score": "0.6157594", "text": "public function activar($parroquia){\n\t\t\t\t\t\t\t\t\t$db=DB::conectar();\n\t\t\t\t\t\t\t\t\t$update=$db->prepare('UPDATE parroquia SET estado = 1 WHERE id = :id;');\n\t\t\t\t\t\t\t\t\t$update->bindValue('id',$parroquia->getId());\n\t\t\t\t\t\t\t\t\t$update->execute();\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "0739a2267b3ea8156e49f39eeda96f1c", "score": "0.6147582", "text": "public static function estados_cuotas($idcuenta)\n {\n $fecha_actual = Carbon::now();\n $fecha_actual = $fecha_actual->format('Y-m-d');\n\n //Obtenemos el detalle_liquidacion a modificar\n $cuenta = Cuenta::findOrFail($idcuenta);\n $prestamo = Prestamo::findOrFail($cuenta->idprestamo);\n $tipo_credito = TipoCredito::findOrFail($cuenta->idtipocredito);\n\n $liquidaciones = DetalleLiquidacion::where('idcuenta','=',$cuenta->idcuenta)\n ->orderby('iddetalleliquidacion', 'asc')\n ->get();\n\n $monto_capital = $prestamo->monto;\n $n=0;\n\n foreach ($liquidaciones as $liq) \n {\n if ($liq->abonocapital == \"NO\") {\n $monto_capital = $liq->monto - $liq->cuotacapital;\n \n }\n elseif($liq->abonocapital == \"SI\")\n {\n $monto_capital = $liq->monto - $liq->totaldiario;\n }\n\n elseif ($liq->abonocapital == null) \n {\n if($monto_capital > 0)\n {\n if ($liq->fechadiaria >= $fecha_actual) {\n $liq->estado = 'PENDIENTE';\n $liq->update();\n }elseif ($liq->fechadiaria < $fecha_actual) {\n $liq->estado = 'ATRASO';\n $liq->update();\n }\n\n $intereses = round($monto_capital * $tipo_credito->interes, 2);\n $cuotacapital = round($prestamo->cuotadiaria - $intereses);\n $monto_capital = $monto_capital - $cuotacapital;\n $n = $n +1;\n\n }else{\n $liq->estado = 'NO VALIDO';\n $liq->update();\n }\n }\n\n\n }\n return $n;\n\n }", "title": "" }, { "docid": "04430ae9f52d55da1205c3aa858f77b5", "score": "0.6136762", "text": "function cargar_cuenta_de_activos() {\n $sql = \"SELECT * FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '33%' ORDER BY cuenta_plan_contable\";\n $res = $this->Consulta_Mysql($sql);\n return $res;\n }", "title": "" }, { "docid": "c3f06c343036f4380333e8714f6fd610", "score": "0.61323434", "text": "public function estatusEstuche(){\n if ($this->estado_entrega_estuche == \"1\") {\n $this->estado_entrega_estuche = \"Entregados\";\n }elseif ($this->estado_entrega_estuche == \"0\"){\n $this->estado_entrega_estuche = \"No entregados\";\n }elseif ($this->estado_entrega_estuche == null){\n $this->estado_entrega_estuche = \"No posee estuches\";\n }\n\n return $this->estado_entrega_estuche;\n }", "title": "" }, { "docid": "f8464d689ce96efb6939ba30dd220bb3", "score": "0.6121788", "text": "public function cuenta_login_escritorio() {\n\t\t$control = true;\n\t\t$cant_desk = 0;\n\t\t//$str = \"select count(ID_REG_CLIE) as CANT_DESK from audit_cliente where COMENTARIO_CLIE not like '%ha Cerrado%' and COMENTARIO_CLIE not like '%ha sido registrada%' and COMENTARIO_CLIE not like '%ha actualizado%' and COMENTARIO_CLIE not like '%ha sido eliminado%' and COMENTARIO_CLIE not like '%admin%' and COMENTARIO_CLIE not like '%Administrador%' and COMENTARIO_CLIE like '%Escritorio%';\";\n\t\t$str = \"select count(ID_REG_CLIE) as CANT_DESK from audit_cliente where COMENTARIO_CLIE like '%ha Iniciado%' and COMENTARIO_CLIE not like '%admin%' and COMENTARIO_CLIE not like '%Administrador%' and COMENTARIO_CLIE like '%Escritorio%';\";\n\t\t$ejecutar = mysql_query($str) or die(mysql_error());\n\t\t$num_reg = mysql_num_rows($ejecutar);\n\t\tif ($num_reg == 0)\n\t\t{\n\t\t\t$control = false;\n\t\t\treturn $control;\n\t\t}\n\t\telse {\n\t\t\t$arreglo = mysql_fetch_array($ejecutar);\n\t\t\t$cant_desk = $arreglo[\"CANT_DESK\"];\n\t\t\treturn $cant_desk;\n\t\t}\n\t}", "title": "" }, { "docid": "4bf2a6e85c1f231758dff2fdb6c2870c", "score": "0.61037195", "text": "public function buscar(){\n\t\t// si cedula no es vacía busca por cedula\n\t\tif (!empty($_POST['cedula'])) {\n\t\t\t$lista_pacientes[]=Paciente::getByCedula($_POST['cedula']);\n\t\t\t$botones=0;\n\t\t\trequire_once('Views/Paciente/show.php');\n\t\t}else{//si está vacía trae todos los registros\n\t\t\t$this->show();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "434a1033ad06144bd523ec646c5a687f", "score": "0.60993767", "text": "public function verAsignado()\n\t{\n \t echo \"El asignado es: \" . $this->asignado;\n\t\t// la palabra reservada $this se usa para accesar a miembros dentro de a misma clase.\n\t}", "title": "" }, { "docid": "6d6fe39b0500f12a28353ddc9ff6e6f8", "score": "0.6098159", "text": "public function activarPaquetes()\n {\n $tienda = new TiendaController;\n $activacion = new ActivacionController;\n // $fecha = Carbon::now();\n // $compras2 = DB::table('coinpayment_transactions')->where('status', '=', 100)->whereDate('created_at', '<=', $fecha->subDays(1))->get();\n // foreach ($compras2 as $compra) {\n // $tienda->accionSolicitud($compra->order_id, 'wc-completed', 'Coinbase');\n // $tienda->actualizarBD($compra->order_id, 'wc-completed', 'Coinbase');\n // // dump($compra);\n // }\n $solicitudes = $tienda->ArregloCompra3();\n foreach ($solicitudes as $solicitud) {\n if ($solicitud['estado'] == 'Completado') {\n $comisioncontroller = new ComisionesController;\n $comisioncontroller->registePackageToRentabilizar($solicitud['iduser']);\n $activacion->activarUsuarios($solicitud['iduser']);\n }\n }\n }", "title": "" }, { "docid": "4bacd36f2a72c1bc8a4faaebae5bc35e", "score": "0.60952", "text": "public function prepararEncomenda()\n {\n if(empty($_SESSION[\"cliente\"])) {\n //user nao logado\n\n $_SESSION[\"tmp_carrinho\"] = true;\n Store::redirect(\"login\");\n return;\n }\n\n Store::redirect(\"preparar_encomenda_resumo\");\n\n }", "title": "" }, { "docid": "8feabc5446396912852b92faa9fe6a4f", "score": "0.60898626", "text": "function ActualizarEstadoSolicitud($idsolicitud){\r\n $con = new ConexionBD;\r\n if($con->conectar()==true){ \r\n\t$query=\"SELECT id,idexamen FROM sec_detallesolicitudestudios \r\n\t\tWHERE idsolicitudestudio=$idsolicitud AND estadodetalle <> 7 and EstadoDetalle <> 6\";\r\n\t$detalle=pg_num_rows(pg_query($query));\r\n\tif(!empty($detalle)){\r\n\t\t$query=\"UPDATE sec_solicitudestudios SET estado= 3 WHERE id=$idsolicitud\";\r\n\t\t$result=pg_query($query);\t\t\r\n\t\treturn true;\t \r\n }else\r\n\t\t$query=\"UPDATE sec_solicitudestudios SET estado= 4 WHERE id=$idsolicitud\";\r\n\t\t$result=pg_query($query);\r\n\t\treturn false;\r\n }\r\n }", "title": "" }, { "docid": "914e87f1027e8f7f4280c2897e5d7a9e", "score": "0.60867274", "text": "public function actionactivamoneda(){\n if(isset($_GET['codmon'])){\n $codmon= strtoupper(MiFactoria::cleanInput($_GET['codmon']));\n ///ACTUALIZANDO EL STATUS DE LA MONEDA \n $regmoneda=Monedas::model()->findByPk($codmon);\n if(is_null($regmoneda)){\n MiFactoria::mensaje('error','La moneda '.$codmon.' No existe');\n \n } else{\n //veridicando que este habilitada \n \n $regmoneda->setScenario('status');\n $regmoneda->habilitado='1';\n $regmoneda->save();\n \n yii::app()->tipocambio->agregarmoneda($codmon,$seguir=false);\n MiFactoria::mensaje('success','Se agrego la moneda al sistema');\n }\n \n \n }else{\n MiFactoria::mensaje('error','NO ha especificado una moneda para agregar');\n }\n $this->redirect('cambio');\n \n \n }", "title": "" }, { "docid": "a5237d978a2a596c6f26be4d685ef96d", "score": "0.6076477", "text": "public function verificarUsuario(){\n\t\t\n\t\t$this->model->verificarUsuario();\n\t}", "title": "" }, { "docid": "4ba6e2212f11d7c74d0d59549f571fb1", "score": "0.6062932", "text": "function CheckVisione() {\n\t\t$conn = $this->conn;\n\t\t$service = $this->service;\n \n\t\t$remote_userid = $this->user->userid;\n\t\t$in = $this->session_vars;\n if ($this -> config_service['BookPkService'] && (isset($this -> session_vars['INVIOCO']) || $this -> session_vars['CREATE'] == 'Update DB') && $this -> session_vars['ESAM'] === '0') {\n $check_se_nuovo = \"select count(*) conto from {$this->service}_REGISTRAZIONE where {$this->config_service['PK_SERVICE']}=:pk_service\";\n $query = new query($this -> conn);\n $bind['PK_SERVICE'] = $this -> pk_service;\n $query -> get_row($check_se_nuovo, $bind);\n if ($query -> row['CONTO'] == '0') {\n $pk_service = $this -> pk_service;\n $this -> pk_service = 'next';\n $replaced = true;\n }\n }\n\t\t//controllo il centro dell'oggetto (es. paziente o pratica) richiesto\n\t\tif($this->pk_service!='' && $this->pk_service!='next'){\n\t\t\t$check_str=\"select count(*) vista from user_objects where object_name='{$service}_PK_OBJ_CENTER'\";\n\t\t\t$check_query=new query($conn);\n\t\t\t$check_query->set_sql($check_str);\n\t\t\t$check_query->exec();//non richiede binding\n\t\t\t$check_query->get_row();\n\t\t\tif($check_query->row['VISTA']==0){\n\t\t\t\t//mail(\"[email protected],[email protected]\", \"DA SISTEMARE Errore[\".$in['remote_userid'].\"]\",\"Manca l'oggetto {$service}_PK_OBJ_CENTER\",\"From: ERROR_\".$service.\"@{$_SERVER['SERVER_NAME']}\\r\\n\");\n\t\t\t}else{\n\t\t\t\t$real_center_str=\"select center from {$service}_PK_OBJ_CENTER where pk_service=:pk_service\";\n\t\t\t\t$real_center_query=new query($conn);\n\t\t\t\t//$real_center_query->set_sql($real_center_str);\n\t\t\t\tunset($bind_pk);\n\t\t\t\t$bind_pk['PK_SERVICE']=$this->pk_service;\n\t\t\t\t$real_center_query->exec($real_center_str,$bind_pk);//binded\n\t\t\t\t$real_center_query->get_row();\n\t\t\t\t$real_center=$real_center_query->row['CENTER'];\n\t\t\t\tif($real_center!=$this->session_vars ['CENTER'] && $this->session_vars ['CENTER']!='')\n\t\t\t\terror_page ( $remote_userid, $this->testo ( \"badRequest\" ), $this->testo ( \"mismatchedCenter\" ) );\n\t\t\t\telse if($this->session_vars ['CENTER']=='')$this->session_vars ['CENTER']=$real_center;\n\t\t\t}\n\n\t\t}\n\t\t$query = new query ( $conn );\n\t\t$sql = \"select uc.CENTER, uc.TIPOLOGIA from \" . $service . \"_UTENTI_CENTRI uc where uc.userid=:userid\";\n\t\tunset($bind_userid);\n\t\t$bind_userid['USERID']=strtoupper ( $remote_userid );\n\t\t$query->exec ($sql,$bind_userid);//binded\n\t\tif ($query->numrows == 0)\n\t\terror_page ( $remote_userid, $this->testo ( \"userNotCenter\" ), $this->testo ( \"userNotHaveCenter\" ) );\n\t\tif ($query->numrows == 1) {\n\t\t\t$query->get_row ();\n\t\t\t$this->session_vars ['USER_TIP'] = $query->row ['TIPOLOGIA'];\n\t\t\tif (isset ( $this->session_vars ['CENTER'] ) && $this->session_vars ['CENTER'] != $query->row ['CENTER'])\n\t\t\terror_page ( $remote_userid, $this->testo ( \"userNotCenter\" ), $this->testo ( \"userNotHaveCenter\" ) );\n\t\t\t//\t\t\tif (isset ( $this->session_vars ['CENTER'] ) && $this->session_vars ['CENTER'] != $query->row ['CENTER'] && $in ['SEARCH'] == \"\")\n\t\t\tif (isset ( $this->center ) && $this->center != $query->row ['CENTER'] && $in ['SEARCH'] == \"\")\n\t\t\terror_page ( $remote_userid, $this->testo ( \"userNotCenter\" ), $this->testo ( \"userNotHaveCenter\" ) );\n\t\t\t$this->session_vars ['CENTER'] = $query->row ['CENTER'];\n\t\t\t$this->centers = \"'\" . $query->row ['CENTER'] . \"'\";\n\t\t} else {\n\t\t\t$flag_centro=false;\n\t\t\twhile ( $query->get_row () ) {\n\t\t\t\tif ($this->centers != '')\n\t\t\t\t$this->centers .= \",\";\n\t\t\t\t$this->session_vars ['USER_TIP'] = $query->row ['TIPOLOGIA'];\n\t\t\t\t$this->centers .= \"'\" . $query->row ['CENTER'] . \"'\";\n\t\t\t\tif($this->session_vars ['CENTER']==$query->row ['CENTER'])$flag_check_centro=true;\n\t\t\t}\n\t\t\t//echo $query->tb_res();\n\t\t\tif(!$flag_check_centro && $this->session_vars ['CENTER']!='')error_page ( $remote_userid, $this->testo ( \"userNotCenter\" ), $this->testo ( \"userNotHaveCenter\" ) );\n\t\t}\n\t\tif (isset ( $this->workflow )) {\n\t\t\t$this->session_vars ['WFact'] = $this->session_vars ['USER_TIP'];\n\t\t\t$stato = new WF_STATO ( $this->conn, null, $this->workflow->prefix );\n\t\t\t$stato->getById ( $this->GetStato () );\n\t\t\t//\t\t\tprint_r($stato);\n\t\t\t$functionCheck = \"VisibilitaStato_\" . $this->GetStato ();\n\t\t\t$attore_stato = $stato->getAttore ();\n\t\t\t//print_r($attore_stato);\n\n\t\t\tif (isset ( $this->pk_service ) && $this->pk_service != '' && $attore_stato != '') {\n\t\t\t\tif (method_exists ( $this, $functionCheck )) {\n\t\t\t\t\t$this->{$functionCheck} ();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif ($attore_stato != '' && $this->session_vars ['USER_TIP'] == $attore_stato->getNome ()) {\n\t\t\t\t$this->session_vars ['USER_TIP'] = 'DE';\n\t\t\t} else if ($attore_stato != '' && $this->user->profilo == $this->config_service ['DM'] && $this->user->profilo != '') {\n\t\t\t\t$this->session_vars ['USER_TIP'] = \"DM\";\n\t\t\t} else {\n\t\t\t\t$this->session_vars ['USER_TIP'] = 'RO';\n\t\t\t}\n\t\t}\n\t\tglobal $in;\n\t\t$in = $this->session_vars;\n\t\tif ($this -> config_service['BookPkService'] && $replaced) {\n $this -> pk_service = $pk_service;\n }\n\t}", "title": "" }, { "docid": "6d44b99debd81375f4203b41ce2af9d6", "score": "0.6058954", "text": "function anteriorEstado(){\n $this->procedimiento='misc.ft_conta_alm_ime';\n $this->transaccion='MIS_ANTEST_IME';\n $this->tipo_procedimiento='IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('obs','obs','varchar');\n\t\t$this->setParametro('estado_destino','estado_destino','varchar');\n\t\t$this->setParametro('id_conta_alm','id_conta_alm','int4');\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "f26316526228ae0d2167dcbf3cd02106", "score": "0.60522723", "text": "function obten_casos_inactivos() {\n\tglobal $connection;\n\t$consulta = \" SELECT *\n\t\t\t\t\t\tFROM interesado_cs\n\t\t\t\t\t\tWHERE interesado_cs.activo = 'No' \n\t\t\t\t\t\tORDER BY recordatorio ASC\";\n\t\t\t\t\t\t\n\t$usuarios_set = mysql_query($consulta, $connection);\n\tconfirm_query($usuarios_set);\n\treturn $usuarios_set;\n}", "title": "" }, { "docid": "82b7786902c23de95a08e7267f288e5e", "score": "0.6051205", "text": "function insertarEstado(){\n\t\t$this->procedimiento='sast.ft_estado_ime';\n\t\t$this->transaccion='ST_EST_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('orden','orden','int4');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "b855a5ca1fa2bc8f7fcbcfd3ae2bcdba", "score": "0.6044649", "text": "public function cuentaContable($tipo='pagar'){\n $val=$this->nombreCuenta($tipo);\n if($val['ok']){\n if($tipo=='pagar')\n return (string)CHtml::link($val['message'],array(\"plancuentasnec/update\",\"id\"=>$this->cuentacontableporpagar));\n else\n return (string)CHtml::link($val['message'],array(\"plancuentasnec/update\",\"id\"=>$this->cuentacontableanticipo));\n }else{\n return $val['message'];\n }\n\n }", "title": "" }, { "docid": "28708fe323da02fe1078aa7bd7c80939", "score": "0.6040433", "text": "public function VerAbonos($credito) {\n $db = new dbConn();\n \n $a = $db->query(\"SELECT * FROM creditos_abonos WHERE credito = '$credito' and edo = 1 and td = \".$_SESSION[\"td\"].\" order by id desc\");\n\n if($a->num_rows > 0){\n\n if ($r = $db->select(\"factura, tx\", \"creditos\", \"WHERE hash = '$credito' and edo = 1 and td = \".$_SESSION[\"td\"].\"\")) { \n $factura = $r[\"factura\"]; $tx = $r[\"tx\"];\n } unset($r); \n\n echo '<table class=\"table table-striped table-sm\">\n <thead>\n <tr>\n <th scope=\"col\">Nombre</th>\n <th scope=\"col\">Abono</th>\n <th scope=\"col\">Fecha</th>\n <th scope=\"col\">Hora</th>\n <th scope=\"col\">Eliminar</th>\n </tr>\n </thead>\n <tbody>';\n $n = 1;\n foreach ($a as $b) {\n echo '<tr>\n <th scope=\"row\">'.$b[\"nombre\"].'</th>\n <td>'.Helpers::Dinero($b[\"abono\"]).'</td>\n <td>'.$b[\"fecha\"].'</td>\n <td>'.$b[\"hora\"].'</td>';\n\n if($n == 1 and $b[\"fecha\"] == date(\"d-m-Y\")){\n echo '<td><a id=\"delabono\" hash=\"'.$b[\"hash\"].'\" op=\"108\" credito=\"'.$b[\"credito\"].'\" factura=\"'.$factura.'\" tx=\"'.$tx.'\"><i class=\"fa fa-minus-circle fa-lg red-text\"></i></a></td>';\n } else {\n echo '<td><i class=\"fa fa-ban fa-lg green-text\"></i></td>';\n }\n echo '</tr>';\n $n ++;\n }\n echo '</tbody>\n </table>';\n } else{\n Alerts::Mensajex(\"A&uacuten no se ha realizado ningun abono\",\"danger\",$boton,$boton2);\n } $a->close();\n\n \n }", "title": "" }, { "docid": "f4c54645692b64d6567c96c4d6812e7e", "score": "0.60388446", "text": "public function CuentaTodos($condiciones) {\n $sql = 'SELECT count(*) as total FROM usuario where 1 ' . $condiciones;\n //echo $sql;\n $datos = $this->BD->Query($sql);\n //creamos un nuevo usuario y le insertamos los valores de la BD \n $num = 0;\n if (!$datos->EOF) {\n $num = $datos->fields[\"total\"];\n }\n return $num;\n }", "title": "" }, { "docid": "dc3c9875cdb69d61f8edde0e38ae577c", "score": "0.60337114", "text": "function cambiarEC($idcuenta,$valorEstado){\n \n $newEstado = \"-1\";\n \n switch ($valorEstado){\n case 0:\n $newEstado = \"Desactivada\";\n break;\n case 1:\n $newEstado = \"Activada\";\n break;\n case 2:\n $newEstado = \"Bloqueada\";\n break;\n default:\n $newEstado = \"Problema\";\n break;\n } \n \n $changeS = \"UPDATE `cuenta` SET Cuen_Estado='$newEstado'\"\n . \"WHERE Id_Cuenta='$idcuenta'\";\n $result = mysql_query($changeS) or die(mysql_error());\n \n if($result){\n return 0; //no problem.\n }else{\n return -1; //failed to change.\n }\n }", "title": "" }, { "docid": "4daf23845ebf37957776e69016baaabc", "score": "0.60322434", "text": "public function contnuevos(){\n $sql=\"SELECT COUNT(*) FROM reg_user where fecha_inscrip < 12-12-2017\";\n $res= mysqli_query(Conectar::con(), $sql);\n\n while($reg= mysqli_fetch_assoc($res))\n {\n $this->visita[]=$reg;\n }\n return $this->visita;\n }", "title": "" }, { "docid": "8716d3cd1c82d2a8c392914157141125", "score": "0.6029117", "text": "function verificar($usua_enviador, $usua_receptor)\n\t{\n\t\t/*Queremos comprobar si un usuario es amigo de otro usuario asi que cada uno puede entrar en categoria de usuario enviador o receptor indistintamente */\n\t\t$con = conexion(\"root\", \"\");\n\t\t$consulta = $con->prepare(\"select * from amigos where (usua_enviador = :usua_enviador and usua_receptor = :usua_receptor) or (usua_enviador = :usua_receptor and usua_receptor = :usua_enviador) \");\n\t\t$consulta->execute(array(\n\t\t\t\t\t\t\t':usua_enviador' => $usua_enviador,\n\t\t\t\t\t\t\t':usua_receptor' => $usua_receptor,\n\t\t\t\t\n\n\t\t\t));\n\n\t\t$resultados = $consulta->fetchAll();\n\t\treturn $resultados;\n\t\t\n\t/* $_SESSION['CodUsua'] siempre tendra el codigo del usuario que esta navegando en el computador nas $_GET['CodUsua'] es una variable que se recibira cada vez que se llame a perfil.php para procesados por usurio individual con respecto a $_SESSION['CodUsua']*/\n\t}", "title": "" }, { "docid": "86118fb8476837cf5edf8d0ce45e3b59", "score": "0.6028621", "text": "public function totalActivos(){\n\t\t$user = User::model()->findByPk(Yii::app()->user->id);\n\t\t$pedidos = Orden::model()->findAllByAttributes(array('users_id'=>$user->id));\n\t\t$activo=0;\n\n\t\tforeach($pedidos as $pedido){\n\t\t\tif($pedido->estado < 5)\n\t\t\t\t$activo++;\n\t\t}\n\n\t\treturn $activo;\n\t}", "title": "" }, { "docid": "df0eb455f252dbadf0be91dc4c0d8ab3", "score": "0.6027421", "text": "public function anularAction() {\r\n $this->setResponse(\"json\");\r\n $id_usuario = $this->getPostParam('id_usuario');\r\n $hora = date(\"H:i:s\");\r\n if ($this->normal == 1) {\r\n $turno = new Turnos();\r\n $turno->updateAll(\"rechazado= 1, atendido=0,hora_inicio_atencion='$hora', id_username=$id_usuario\", \"id= $this->id_turno\");\r\n } else {\r\n $turnosTransferidos = new TurnosTransferidos();\r\n $turno->updateAll(\"rechazado= 1, atendido=1 \", \"id= $this->id_t_t_atender\");\r\n }\r\n $this->anulado = 1;\r\n return ($this->anulado);\r\n }", "title": "" }, { "docid": "c233e3ca83c1596af742ab2ab70cb547", "score": "0.6016822", "text": "public function estadoCuenta(){\t\r\n\t\r\n\t\t$idTarBonita = $this->input->post('idTarBonita');\r\n\t\t$valor = $this->input->post('estado');\r\n\t\t$estado = array (\r\n\t\t //\"estadoCuentaClienteOk\"\t=>\t\"$valor\"\r\n\t\t);\r\n\t\t// trae la cabecera\r\n\t\t$parametros = $this->Bonitas->conexiones();\r\n\t\t\r\n\t\t// Cambio el metodo de la cabecera a \"PUT\"\r\n\t\t$parametros[\"http\"][\"method\"] = \"POST\";\t\r\n\t\t//$parametros[\"http\"][\"content\"] = json_encode($estado);\t\r\n\t\t// Variable tipo resource referencia a un recurso externo.\r\n\t\t$param = stream_context_create($parametros);\r\n\t\t$result = $this->Tareas->estadoCuenta($idTarBonita,$param);\r\n\t\techo json_encode($result);\r\n\t}", "title": "" }, { "docid": "9e9d19130d1b588b549883907a27fd95", "score": "0.6016354", "text": "function activerUti() {\r\n \tmysql_query(\"UPDATE if_utilisateur SET actif='$this->actif' WHERE numuti='$this->numuti'\");\t\r\n }", "title": "" }, { "docid": "6771c7dfafe3f4a871bbd37e0428c4c7", "score": "0.60121226", "text": "public function ordenesSistema()\n {\n $tienda = new TiendaController;\n $fecha = Carbon::now();\n $compras = DB::table('coinpayment_transactions')->where([['status', '=', 0]])->whereDate('created_at', '>=', $fecha->subDays(1))->get();\n foreach ($compras as $compra) {\n $result = CoinPayment::getstatusbytxnid($compra->txn_id);\n // dump($compra, $result);\n if (is_array($result)) {\n DB::table('coinpayment_transactions')->where('id', '=', $compra->id)->update(['status' => $result['status']]);\n // $tienda->actualizarBD($compra->order_id, 'wc-completed', 'Coinbase');\n // $tienda->accionSolicitud($compra->order_id, 'wc-completed', 'Coinbase');\n }\n }\n\n $compras2 = DB::table('coinpayment_transactions')->where('status', '=', 100)->whereDate('created_at', '>=', $fecha->subDays(2))->get();\n foreach ($compras2 as $compra) {\n $checkCompra = DB::table('wp_posts')->where([\n ['ID', '=', $compra->order_id],\n ['post_status', '=', 'wc-on-hold']\n ])->first();\n if ($checkCompra != null) {\n dump($compra);\n $tienda->actualizarBD($compra->order_id, 'wc-completed', 'Coinbase');\n // $tienda->accionSolicitud($compra->order_id, 'wc-completed', 'Coinbase');\n }\n }\n }", "title": "" }, { "docid": "f48f9617ac4c2efcaa93fac15a6684ea", "score": "0.6006323", "text": "function cambiarEstado(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE catalogo_metodo SET ctm_estado='$estado' WHERE ctm_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "title": "" }, { "docid": "3547e9fcdaafea071b3cd443e7aee9b4", "score": "0.60030496", "text": "function modificarEstado(){\n\t\t$this->procedimiento='sast.ft_estado_ime';\n\t\t$this->transaccion='ST_EST_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_estado','id_estado','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('orden','orden','int4');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "62594ec4fe64f7ab2db1b59cbc82fcf7", "score": "0.6002882", "text": "function verEstados(){\n\n\t\t\t\t$resultado= array();\n\t\t\t\t$conecta = new \\Conexion\\Conexion(BDNOMBRE, HOST, USUARIO, CONTRA, CHARSET);\n\t\t\t\t$sql = 'SELECT * from estado ORDER BY id';\n\t\t\t\t\n\t\t\t\t$conecta->abrirConexion();\n\t\t\t\t\n\t\t\t\t$resultado = $conecta->consultaPreparada($sql);\n\n\t\t\t\t\n\t\t\t\t$conecta->cerrarConexion();\t\n\n\t\t\t\treturn json_encode($resultado);\n\t\t\t}", "title": "" }, { "docid": "ad6980bcdb9dbf8697f00a8e3552c628", "score": "0.599081", "text": "public function cuentaContable($tipo='compra'){\n $val=$this->nombreCuenta($tipo);\n if($val['ok']){\n if($tipo=='compra')\n return (string)CHtml::link($val['message'],array(\"plancuentasnec/update\",\"id\"=>$this->cuentacontablecompras));\n else\n return (string)CHtml::link($val['message'],array(\"plancuentasnec/update\",\"id\"=>$this->cuentacontableventas));\n }else{\n return $val['message'];\n }\n\n }", "title": "" }, { "docid": "367d3c28565e6fb12a013807d172df25", "score": "0.5990616", "text": "function _comprobante2019(){\n error_reporting(E_ALL);\n $db = new SuperDataBase();\n //Antes de todo verificamos si el pedido sigue abierto\n $r_abierto = $db->executeQuery(\"Select * from pedido where pkPediido = '\".$_REQUEST[\"pkPediido\"].\"' AND (estado = 0 OR estado = 4)\");\n if($row_abierto = $db->fecth_array($r_abierto)){\n //Obtenemos fecha cierre original y total original del pedido\n\n //Establecemos si se va a poner en el ticket la propina\n if(isset($_REQUEST[\"propina\"])){\n $query_ipropina = \"Update pedido set subTotal = '\".$_REQUEST[\"propina\"].\"' where pkPediido = '\".$_REQUEST[\"pkPediido\"].\"'\";\n $db->executeQuery($query_ipropina);\n\n if(intval($_REQUEST[\"propina\"]) === 1){\n setcookie(\"fpropina\",'IEZ', time() + 3600000, '/');\n }else{\n setcookie(\"fpropina\",'NOU', time() - 3600000, '/');\n }\n }\n\n //Util para creditos\n $fecha_original = $row_abierto[\"fechaCierre\"];\n $total_original = $row_abierto[\"total\"];\n\n //Obtenemos Fecha de cierre\n $query_cierre = \"Select fecha from cierrediario where pkCierreDiario = 1\";\n $rc = $db->executeQuery($query_cierre);\n $fecha_cierre_c = null;\n if ($row = $db->fecth_array($rc)){\n $fecha_cierre_c = $row[\"fecha\"];\n }\n\n //Obtenemos tipos de cambio\n $cambios = array();\n $query_cambio = \"Select * from tipo_cambio where fecha_cierre = '\".$fecha_cierre_c.\"'\";\n $result_cambio = $db->executeQuery($query_cambio);\n while($row = $db->fecth_array($result_cambio)){\n $cambios[$row[\"moneda\"]] = $row[\"cambio\"];\n }\n\n $usuario = UserLogin::get_id();\n //Para conservar logica tipo pago de tabla pedido\n $tipo_pago = 1;\n $nombre_tarjeta = \"\";\n $vuelto_procesado = 0;\n $total_otros = floatval($_REQUEST[\"pagado_otros\"]);\n $total_efectivo = floatval($_REQUEST[\"pagado_efectivo\"]);\n $vuelto = floatval($_REQUEST[\"vuelto\"]);\n $total_cuenta = floatval($_REQUEST[\"total\"]);\n $descuento_dinero = floatval($_REQUEST[\"descuento_monto\"]);\n\n $id_pedido = $_REQUEST['pkPediido'];\n\n //Logica para pagos parciales\n $parcial = intval($_REQUEST[\"parcial\"]);\n if($parcial === 1){\n //Insertamos nuevo pedido\n $query_nuevo_pedido = \"insert into pedido (pkPediido,pkMesa,fechaApertura,idUser,dateModify, fechaCierre) values(NULL,'\".$_REQUEST[\"mesa\"].\"',now(),'\".$usuario.\"',now(),'\".$fecha_cierre_c.\"');\";\n $db->executeQuery($query_nuevo_pedido);\n //Obtenemos codigo generado \n $id_pedido = $db->getId();\n }\n\n //Array para respuesta\n $array_respuesta = array();\n $array_respuesta[\"exito\"] = 1;\n $array_respuesta[\"mensaje\"] = \"\";\n $array_respuesta[\"id_comprobante\"] = $id_pedido;\n\n //Verficamos si existe la variable sin pago\n //Si existe es un credito\n //Si es un credito guardamos datos adicionales\n //Y verificamos si no se deben ingresar pagos a caja\n $credito = 0;\n if(isset($_REQUEST[\"sin_pago\"])){\n if(intval($_REQUEST[\"sin_pago\"]) === 0){\n $credito = 1;\n }else{\n $credito = 2;\n }\n }\n\n if($credito < 2){\n\n $total_detraccion = 0;\n\n if (isset($_REQUEST['total_detraccion'])) {\n if ($_REQUEST['total_detraccion'] > 0) {\n\n $query_detraccion = \"Select * from cloud_config where parametro = 'porcentaje_detraccion'\"; \n $res_detraccion = $db->executeQueryEx($query_detraccion);\n if ($row_detraccion = $db->fecth_array($res_detraccion)) {\n $query_detraccion2 = \"select * from porcentaje_detraccion where id = ${row_detraccion['valor']}\";\n $res_detraccion2 = $db->executeQueryEx($query_detraccion2);\n if ($row_detraccion2 = $db->fecth_array($res_detraccion2)) {\n \n $codigo_detraccion = $row_detraccion2['codigo'];\n $porcentaje_detraccion = floatval($row_detraccion2['porcentaje']);\n $total_detraccion = floatval($row_detraccion2['porcentaje'] * $total_cuenta / 100);\n }\n }\n }\n\n }\n\n //Guardamos medios de pago y propinas\n $array_pagos = json_decode($_REQUEST['pagos'], true);\n $hubo_pagos = 0;\n for ($i = 0; $i < count($array_pagos); $i++) {\n if($array_pagos[$i][0] === \"PAGO\"){\n $monto_insertar = floatval($array_pagos[$i][7]);\n if(intval($array_pagos[$i][1])>1){\n $tipo_pago = 2;\n $nombre_tarjeta .= $array_pagos[$i][5].\"|\";\n }else{\n $tipo_pago = 1;\n $nombre_tarjeta .= $array_pagos[$i][5].\"|\";\n //Procesamos vuelto para pagos en efectivo\n if(intval($array_pagos[$i][2]) === 1){\n //Si es moneda nacional\n if($vuelto > 0){\n if($vuelto_procesado === 0){\n if($monto_insertar > $vuelto){\n $monto_insertar = $monto_insertar - $vuelto;\n $vuelto_procesado = 1;\n }\n }\n } \n }else{\n //Si es moneda extranjera\n if($vuelto > 0){\n if($vuelto_procesado === 0){\n $monto_con_cambio = round(($monto_insertar*$cambios[$array_pagos[$i][2]]),2);\n $vuelto_con_cambio = round(($vuelto/$cambios[$array_pagos[$i][2]]),2);\n if($monto_con_cambio > $vuelto_con_cambio){\n $monto_insertar = $monto_insertar - $vuelto_con_cambio;\n $vuelto_procesado = 1;\n }\n }\n } \n }\n }\n $hubo_pagos = 1;\n $query_pago = \"Insert into movimiento_dinero values(NULL,'\".$id_pedido.\"','PED','\".$monto_insertar.\"','\".$array_pagos[$i][1].\"','\".$array_pagos[$i][2].\"','\".$fecha_cierre_c.\"',now(),'\".$usuario.\"','\".$_COOKIE[\"c\"].\"','\".$array_pagos[$i][4].\"',NULL,1)\";\n $db->executeQuery($query_pago);\n }else{\n $query_propina = \"Insert into pedido_propina values(NULL,'\".$id_pedido.\"','\".$array_pagos[$i][3].\"','\".$array_pagos[$i][1].\"','\".$array_pagos[$i][2].\"','\".$array_pagos[$i][7].\"','\".$fecha_cierre_c.\"',now())\";\n $db->executeQuery($query_propina);\n }\n }\n //Si no hay pago pagamos toda la cuenta en efectivo\n if($hubo_pagos === 0){\n $tipo_pago = 1;\n $nombre_tarjeta .= \"EFECTIVO\";\n $total_efectivo = $total_cuenta;\n\n $query_default = \"Insert into movimiento_dinero values(NULL,'\".$id_pedido.\"','PED','\".($total_cuenta - $total_detraccion).\"','1','1','\".$fecha_cierre_c.\"',now(),'\".$usuario.\"','\".$_COOKIE[\"c\"].\"',NULL,NULL,1)\";\n $db->executeQuery($query_default);\n }else{\n $nombre_tarjeta = substr($nombre_tarjeta,0,-1);\n }\n\n if ($total_detraccion > 0) {\n\n $query_detra = \"insert into pedido_detraccion (pedido_id, codigo_detraccion, porcentaje_detraccion, total) values \";\n $query_detra .= \"($id_pedido, '$codigo_detraccion', $porcentaje_detraccion, $total_detraccion)\";\n $db->executeQuery($query_detra);\n\n $query_detra = \"Insert into movimiento_dinero values(NULL,'\".$id_pedido.\"','PED','\".($total_detraccion).\"','0','1','\".$fecha_cierre_c.\"',now(),'\".$usuario.\"','\".$_COOKIE[\"c\"].\"','DETRACCION',NULL,1)\";\n $db->executeQuery($query_detra);\n }\n }\n\n if (intval($_REQUEST[\"tipo_comprobante\"]) === 0){\n //Pago sin comprobante\n //Si es pago parcial actualizamos los detalles enviados\n if($parcial === 1){\n $db->executeQuery(\"SET SQL_SAFE_UPDATES = 0;\");\n $array_platos = json_decode($_POST['productos'], true);\n for ($i = 0; $i < count($array_platos); $i++) {\n //Recorremos array enviado\n $pos = strpos($array_platos[$i]['pkPedido'], \"C\");\n if ($pos === false) {\n //Si es detalle normal\n $query_cambio = \"Update detallepedido set pkPediido = '\".$id_pedido.\"' where pkDetallePedido = '\".$array_platos[$i]['pkPedido'].\"'\";\n $db->executeQuery($query_cambio);\n }else{\n // //Si es detalle cambiado\n // //Actualizamos cambio facturacion\n // $id_cambio = substr($array_platos[$i]['pkPedido'],1);\n // $query_cambio_c = \"Update cambio_facturacion set pk_pedido_destino = '\".$id_pedido.\"' where id = '\".$id_cambio.\"'\";\n // $db->executeQuery($query_cambio_c);\n // //Obtenemos id detalle original\n // $query_detalle_original = \"Select pk_detalle from cambio_facturacion where id = '\".$id_cambio.\"'\";\n // $id_detalle_original = null;\n // $rdet = $db->executeQuery($query_detalle_original);\n // if ($rowd = $db->fecth_array($rdet)){\n // $id_detalle_original = $rowd[\"pk_detalle\"];\n // }\n // //Actualizamos detalle original\n // $query_cambio = \"Update detallepedido set pkPediido = '\".$id_pedido.\"' where pkDetallePedido = '\".$id_detalle_original.\"'\";\n // $db->executeQuery($query_cambio);\n }\n }\n }\n\n //Finalizamos pedido\n $query_pago = \"Update pedido set dateModify=now(), total='\".$total_cuenta.\"', fechaFin=now(), descuento='\".$descuento_dinero.\"',idUser='\".$usuario.\"', estado=1, tipo_pago='\".$tipo_pago.\"', fechaCierre='\".$fecha_cierre_c.\"', total_efectivo='\".$total_efectivo.\"', total_tarjeta='\".$total_otros.\"', nombreTarjeta='\".$nombre_tarjeta.\"' where pkPediido = '\".$id_pedido.\"'\";\n $db->executeQuery($query_pago);\n\n //Efectivo Usado\n $db->executeQuery(\"Insert into pedido_efectivo values (NULL,'\".$id_pedido.\"','\".$total_efectivo.\"')\");\n\n //Cerramos mesa\n $query_mesa = \"update mesas set estado = 0 where pkMesa = '\".$_REQUEST[\"mesa\"].\"'\";\n $db->executeQuery($query_mesa);\n\n //Insertamos el pedido en que caja fue hecho\n $query_caja = \"Insert into accion_caja values(NULL,'\".$id_pedido.\"','PED','\".$_COOKIE[\"c\"].\"')\";\n $db->executeQuery($query_caja);\n\n //Verificamos si es credito e insertamos\n if($credito > 0){\n $query_credito = \"Insert into creditos values (NULL,'\".$id_pedido.\"','\".$fecha_original.\"','\".$fecha_cierre_c.\"','\".$total_original.\"','\".$total_cuenta.\"','\".$credito.\"')\";\n $db->executeQuery($query_credito);\n }\n\n //Finalizamos e imprimimos\n echo json_encode($array_respuesta);\n }else{\n //Pago con comprobante\n $objModelComprobante = new Application_Models_ComprobanteModel();\n $correlativo = NULL;\n $dni = \"\";\n $ruc = \"\";\n\n //Operaciones segun tipo de comprobante\n if(intval($_REQUEST[\"tipo_comprobante\"]) == 1){\n \n if (strlen($_REQUEST['documento']) == 8) {\n //Actualizamos cliente\n $dni = $_REQUEST['documento'];\n $rdoc = 0;\n if ($dni != \"\") {\n $objPersona = new Application_Models_WorkPeopleModel();\n $rdoc = $objPersona->_verficaPersona($dni, urlencode($_REQUEST['cliente']), urlencode($_REQUEST['direccion']), urlencode($_REQUEST['correo']));\n }\n\n if($_REQUEST[\"documento\"] == \"-\"){\n $dni = $rdoc;\n }\n \n } else if (strlen($_REQUEST['documento']) == 11) {\n //Actualizamos cliente\n $ruc = $_REQUEST['documento'];\n if ($ruc != \"\") {\n $objPersona = new Application_Models_WorkPeopleModel();\n $objPersona->_verficaPersonaJuridica($ruc, urlencode($_REQUEST['cliente']), urlencode($_REQUEST['direccion']) ,$_REQUEST['correo']);\n }\n }\n\n //Obtenemos correlativo\n $c1 = \"Select max(ncomprobante) as actual from comprobante where pkTipoComprobante = 1\";\n $s1 = $db->executeQuery($c1);\n if ($row = $db->fecth_array($s1)){\n $correlativo = intval($row[\"actual\"])+1;\n }\n }else{\n //Actualizamos cliente\n $ruc = $_REQUEST['documento'];\n if ($ruc != \"\") {\n $objPersona = new Application_Models_WorkPeopleModel();\n $objPersona->_verficaPersonaJuridica($ruc, urlencode($_REQUEST['cliente']), urlencode($_REQUEST['direccion']) ,$_REQUEST['correo']);\n }\n\n //Obtenemos correlativo\n $c1 = \"Select max(ncomprobante) as actual from comprobante where pkTipoComprobante = 2\";\n $s1 = $db->executeQuery($c1);\n if ($row = $db->fecth_array($s1)){\n $correlativo = intval($row[\"actual\"])+1;\n }\n }\n\n //Si es pago parcial actualizamos los detalles enviados\n if($parcial === 1){\n $db->executeQuery(\"SET SQL_SAFE_UPDATES = 0;\");\n $array_platos = json_decode($_POST['productos'], true);\n for ($i = 0; $i < count($array_platos); $i++) {\n //Recorremos array enviado\n $pos = strpos($array_platos[$i]['pkPedido'], \"C\");\n if ($pos === false) {\n //Si es detalle normal\n $query_cambio = \"Update detallepedido set pkPediido = '\".$id_pedido.\"' where pkDetallePedido = '\".$array_platos[$i]['pkPedido'].\"'\";\n $db->executeQuery($query_cambio);\n }else{\n // //Si es detalle cambiado\n // //Actualizamos cambio facturacion\n // $id_cambio = substr($array_platos[$i]['pkPedido'],1);\n // $query_cambio_c = \"Update cambio_facturacion set pk_pedido_destino = '\".$id_pedido.\"' where id = '\".$id_cambio.\"'\";\n // $db->executeQuery($query_cambio_c);\n // //Obtenemos id detalle original\n // $query_detalle_original = \"Select pk_detalle from cambio_facturacion where id = '\".$id_cambio.\"'\";\n // $id_detalle_original = null;\n // $rdet = $db->executeQuery($query_detalle_original);\n // if ($rowd = $db->fecth_array($rdet)){\n // $id_detalle_original = $rowd[\"pk_detalle\"];\n // }\n // //Actualizamos detalle original\n // $query_cambio = \"Update detallepedido set pkPediido = '\".$id_pedido.\"' where pkDetallePedido = '\".$id_detalle_original.\"'\";\n // $db->executeQuery($query_cambio);\n }\n }\n }\n\n //series\n $serie_comprobante = \"\";\n if(intval($_REQUEST[\"tipo_comprobante\"]) == 1){\n $c0 = \"Select * from cloud_config where parametro = 'sfactura'\";\n $s0 = $db->executeQuery($c0);\n if ($row = $db->fecth_array($s0)){\n $serie_comprobante = $row[\"valor\"];\n }\n }else{\n $c0 = \"Select * from cloud_config where parametro = 'sboleta'\";\n $s0 = $db->executeQuery($c0);\n if ($row = $db->fecth_array($s0)){\n $serie_comprobante = $row[\"valor\"];\n }\n }\n\n\n //Insertamos cabecera comprobante\n $query_cabecera = \"Insert into comprobante values(NULL,'\".$_REQUEST[\"tipo_comprobante\"].\"',0,0,0,0,0,'\".$tipo_pago.\"','\".$total_efectivo.\"','\".$total_otros.\"','\".$nombre_tarjeta.\"',now(),now(),'\".$usuario.\"','\".$descuento_dinero.\"','0','\".$usuario.\"',now(),'SU009','\".$serie_comprobante.\"','\".$correlativo.\"','\".$ruc.\"','\".$dni.\"')\";\n //echo $query_cabecera;\n $db->executeQuery($query_cabecera);\n \n //Obtenemos codigo generado \n $serie_interna = $db->getId();\n \n //Agregamos detalle\n $query_detalle_primario = \"Insert into detallecomprobante values(NULL,'\".$serie_interna.\"','\".$id_pedido.\"','\".$total_cuenta.\"')\"; \n $db->executeQuery($query_detalle_primario);\n\n //Actualizamos pagos\n $query_pago = \"Update pedido set dateModify=now(), total='\".$total_cuenta.\"', fechaFin=now(), descuento='\".$descuento_dinero.\"',idUser='\".$usuario.\"', tipo_pago='\".$tipo_pago.\"', fechaCierre='\".$fecha_cierre_c.\"', total_efectivo='\".$total_efectivo.\"', total_tarjeta='\".$total_otros.\"', nombreTarjeta='\".$nombre_tarjeta.\"' where pkPediido = '\".$id_pedido.\"'\";\n $db->executeQuery($query_pago);\n \n //Agregamos items a la factura\n\n $array_platos = json_decode($_POST['productos'], true);\n for ($i = 0; $i < count($array_platos); $i++) {\n //Recorremos array enviado\n if(floatval($array_platos[$i]['precio'])>0 && intval($array_platos[$i]['estado'])<>3){\n //Solo agregamos detalles con precio mayor a cero\n $pos = strpos($array_platos[$i]['pkPedido'], \"C\");\n if ($pos === false) {\n $objModelComprobante->addDetallePedidoComprobante($serie_interna, $array_platos[$i]['pkPedido']);\n }\n }\n }\n\n //Verificamos si es credito e insertamos\n if($credito > 0){\n $query_credito = \"Insert into creditos values (NULL,'\".$id_pedido.\"','\".$fecha_original.\"','\".$fecha_cierre_c.\"','\".$total_original.\"','\".$total_cuenta.\"','\".$credito.\"')\";\n $db->executeQuery($query_credito);\n }\n\n $extras_parcial = [\n \"pedido_original\" => $_REQUEST['pkPediido'],\n \"platos\" => json_decode($_POST['productos'], true),\n ];\n\n //Finalmente invocamos a FE\n if($parcial === 1){\n $this->generaElectronica($serie_interna,$id_pedido,2,$extras_parcial);\n }else{\n $this->generaElectronica($serie_interna,$id_pedido,1); \n }\n\n //Efectivo Usado\n $db->executeQuery(\"Insert into pedido_efectivo values (NULL,'\".$id_pedido.\"','\".$total_efectivo.\"')\");\n }\n }else{\n //Array para respuesta\n $array_respuesta = array();\n $array_respuesta[\"exito\"] = 2;\n $array_respuesta[\"mensaje\"] = \"¡El pedido ya finalizo, no se puede cobrar!\";\n $array_respuesta[\"id_comprobante\"] = 0;\n }\n }", "title": "" }, { "docid": "71ed51d2daa8e4eb77cbe5bf2f8ffe5c", "score": "0.598528", "text": "public static function getAccesoriosActivos() {\n $conn = getConn();\n $sql = \"SELECT * FROM tso_accesorios WHERE esta_activo = TRUE\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $accesoriosData = $stmt->fetchAll();\n $accesorios = array();\n\n foreach ($accesoriosData as $a) {\n if (isset($a)) {\n $accesorio = new stdClass();\n $accesorio->id = $a[\"id\"];\n $accesorio->nombre = $a[\"nombre\"];\n $accesorio->codAccesorio = $a[\"cod_accesorio\"];\n $accesorio->codInstalacion = $a[\"cod_instalacion\"];\n $accesorio->precioInstalacion = $a[\"precio_instalacion\"];\n $accesorio->precioAccesorio = $a[\"precio_accesorio\"];\n $accesorio->precioInstalacion = $a[\"precio_instalacion\"];\n $accesorio->precioMensualidad = $a[\"precio_mensualidad\"];\n $accesorio->descripcion = $a[\"descripcion\"];\n $accesorio->beneficios = $a[\"beneficios\"];\n $accesorio->aplicacion = $a[\"aplicacion\"];\n $accesorio->imagen_aplicacion_uno = $a[\"imagen_aplicacion_uno\"];\n $accesorio->imagen_aplicacion_dos = $a[\"imagen_aplicacion_dos\"];\n $accesorio->image = $a[\"imagen\"];\n $accesorio->posicionX = $a[\"posicion_x\"];\n $accesorio->posicionY = $a[\"posicion_y\"];\n array_push($accesorios, $accesorio);\n }\n }\n\n return (count($accesorios) <= 0 ) ? null : $accesorios;\n }", "title": "" }, { "docid": "16f0563f3715181f9fb16a9412c5e67c", "score": "0.5982259", "text": "public function acceder(){\n\t\t$nombre = $_POST['nombre'];\n\t\t$apellido= $_POST['apellido'];\n\t\t$nickname= $_POST['nickname'];\n\t\t$fechaNacimiento= $_POST['date'];\n\t\t//echo $fechaNacimiento;\n\t\t$mail= $_POST['mail'];\n\t\t$telefono= $_POST['telefono'];\n\t\t$password = $_POST['password'];\n\t\t$password_cifrada = password_hash($password,PASSWORD_DEFAULT); \n\t\t/* Coste de la función por defecto: 10\n\t\t\tpassword_hash($password,PASSWORD_DEFAULT,array(\"cost\")=>12);\n\t\t\thttp://php.net/manual/es/faq.passwords.php\n\t\t*/\n\t\t//echo $password_cifrada;\n\t\t$sexo= $_POST['sexo'];\n\t\t//$fotografia = \"no\";\n\n\n\t\t$idUsuario = $_POST['idInvitado'];\n\t\t$estado = 1;\n\n\t\t//echo $idUsuario.\" \".$nombre.\" \".$apellido.\" \".$nickname.\" \".$fechaNacimiento.\" \".$mail.\" \".$telefono.\" \".$password_cifrada.\" \".$sexo;\n\n\t\t$this->Usuario->setInvitado($idUsuario,$nombre,$apellido,$nickname, $mail, $sexo, $password_cifrada, $telefono, $fechaNacimiento, $estado);\n\n\n\t\t$subirImagen = $this->guardarImagen($idUsuario);\n\t\t$mensaje = 0;\n\t\tif ($subirImagen == 0 ){\t// hubo un error\n\t\t\t$data['error'] = 0;\n\t\t\t//$this->Usuario->eliminarUsuario($idUsuarioNuevo);\n\t\t\t//$this->view->show('formularioRegistro.php', $data);\n\t\t} else {\t// todo ok, iniciar sesión\n\t\t\t//$data['idInvitado'] = $idUsuario;\n\t\t\t$this->view->show('loginInvitado.php');\n\t\t}\n\t\n\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "bddabb966337a443234179bda908e31f", "score": "0.59800845", "text": "function updateEstadoCorreo()\r\n {\r\n\r\n $this->procedimiento = 'mat.ft_solicitud_ime';\r\n $this->transaccion = 'MAT_UPD_ESTCORR_IME';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('estado_correo', 'estado_correo', 'varchar'); \r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "e2b8450903af0f87d1fcc84ae39c2bd2", "score": "0.59682596", "text": "function siguienteEstadoReclamo()\n\t{\n\t\t$this->procedimiento = 'rec.ft_reclamo_ime';\n\t\t$this->transaccion = 'REC_SIGEREC_IME';\n\t\t$this->tipo_procedimiento = 'IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n\t\t$this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n\t\t$this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n\t\t$this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n\t\t$this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n\t\t$this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n\t\t$this->setParametro('obs', 'obs', 'text');\n\t\t$this->setParametro('json_procesos', 'json_procesos', 'text');\n\n\t\t$this->setParametro('f_actual', 'f_actual', 'timestamp');\n\t\t$this->setParametro('nombreVista', 'nombreVista', 'varchar');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "7bddeea041639a86b95aa7a6f1f76100", "score": "0.59669507", "text": "function listarEstadoCuentaDetallado()\r\n {\r\n $this->procedimiento = 'conta.ft_int_transaccion_sel';\r\n $this->transaccion = 'CONTA_DECOM_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\r\n $this->setParametro('id_cuenta', 'id_cuenta', 'int4');\r\n $this->setParametro('id_partida', 'id_partida', 'int4');\r\n $this->setParametro('id_orden_trabajo', 'id_orden_trabajo', 'int4');\r\n $this->setParametro('id_tipo_cc', 'id_tipo_cc', 'int4');\r\n $this->setParametro('tipo_filtro', 'tipo_filtro', 'varchar');\r\n //captura parametros adicionales para el count\r\n $this->capturaCount('total_debe', 'numeric');\r\n $this->capturaCount('total_haber', 'numeric');\r\n $this->capturaCount('total_debe_mt', 'numeric');\r\n $this->capturaCount('total_haber_mt', 'numeric');\r\n $this->capturaCount('total_debe_ma', 'numeric');\r\n $this->capturaCount('total_haber_ma', 'numeric');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_int_transaccion', 'int4');\r\n $this->captura('id_partida', 'int4');\r\n $this->captura('id_centro_costo', 'int4');\r\n $this->captura('id_partida_ejecucion', 'int4');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('id_int_transaccion_fk', 'int4');\r\n $this->captura('id_cuenta', 'int4');\r\n $this->captura('glosa', 'varchar');\r\n $this->captura('id_int_comprobante', 'int4');\r\n $this->captura('id_auxiliar', 'int4');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n\r\n $this->captura('importe_debe_mb', 'numeric');\r\n $this->captura('importe_haber_mb', 'numeric');\r\n $this->captura('importe_saldo_mb', 'numeric');\r\n $this->captura('importe_gasto_mb', 'numeric');\r\n $this->captura('importe_recurso_mb', 'numeric');\r\n\r\n $this->captura('importe_debe_mt', 'numeric');\r\n $this->captura('importe_haber_mt', 'numeric');\r\n $this->captura('importe_gasto_mt', 'numeric');\r\n $this->captura('importe_recurso_mt', 'numeric');\r\n\r\n $this->captura('importe_debe_ma', 'numeric');\r\n $this->captura('importe_haber_ma', 'numeric');\r\n $this->captura('importe_gasto_ma', 'numeric');\r\n $this->captura('importe_recurso_ma', 'numeric');\r\n\r\n $this->captura('desc_partida', 'text');\r\n $this->captura('desc_centro_costo', 'text');\r\n $this->captura('desc_cuenta', 'text');\r\n $this->captura('desc_auxiliar', 'text');\r\n $this->captura('tipo_partida', 'varchar');\r\n $this->captura('id_orden_trabajo', 'int4');\r\n $this->captura('desc_orden', 'varchar');\r\n $this->captura('nro_cbte', 'varchar');\r\n $this->captura('nro_tramite', 'varchar');\r\n $this->captura('nombre_corto', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('glosa1', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('id_estado_wf', 'int4');\r\n //$this->captura('cbte_relacional','varchar');\r\n $this->captura('c31', 'varchar');\r\n $this->captura('descripcion', 'varchar');\r\n //$this->captura('desc_cuenta', 'varchar');\r\n $this->captura('fecha_costo_ini', 'date');\r\n $this->captura('fecha_costo_fin', 'date');\r\n $this->captura('comprobante_fks', 'varchar');\r\n $this->captura('codigo', 'varchar');\r\n $this->captura('nro_documentos', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "839ba5898795a5bc53756f413e0c6cc8", "score": "0.59661835", "text": "function listarIntTransaccionCuenta()\r\n {\r\n $this->procedimiento = 'conta.ft_int_transaccion_sel';\r\n $this->transaccion = 'CONTA_INTCUE_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_tipo_cc', 'id_tipo_cc', 'int4');\r\n $this->setParametro('id_periodo', 'id_periodo', 'int4');\r\n $this->setParametro('fecha_ini', 'fecha_ini', 'date');\r\n $this->setParametro('fecha_fin', 'fecha_fin', 'date');\r\n\r\n //captura parametros adicionales para el count\r\n $this->capturaCount('total_debe', 'numeric');\r\n $this->capturaCount('total_haber', 'numeric');\r\n $this->capturaCount('total_debe_mt', 'numeric');\r\n $this->capturaCount('total_haber_mt', 'numeric');\r\n $this->capturaCount('total_debe_ma', 'numeric');\r\n $this->capturaCount('total_haber_ma', 'numeric');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_cuenta', 'int4');\r\n $this->captura('importe_debe_mb', 'numeric');\r\n $this->captura('importe_haber_mb', 'numeric');\r\n $this->captura('importe_debe_mt', 'numeric');\r\n $this->captura('importe_haber_mt', 'numeric');\r\n $this->captura('importe_debe_ma', 'numeric');\r\n $this->captura('importe_haber_ma', 'numeric');\r\n $this->captura('codigo_cuenta', 'varchar');\r\n $this->captura('tipo_cuenta', 'varchar');\r\n $this->captura('descripcion_cuenta', 'varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "917b66f9ac0b4af88182b343110c1fe3", "score": "0.5964344", "text": "public function activar_comentario($email,$id){\n\t\t$sql = \"SELECT * FROM comentarios WHERE MD5(email) = ? AND MD5(id) = ?\";\n\n $res = $this->db->query($sql, array($email, $id));\n // $res = $this->db->get_where('comentarios', array(md5('email') => $email, md5('id') => $id));\n\n if ($res->num_rows() > 0) {\n $rows = $res->result_array();\n $sql = \"UPDATE comentarios SET activo = 1 WHERE id = '\" . $rows[0]['id'] . \"'\";\n\t\t\t$res = $this->db->query($sql);\n $rows[0]['titulo'] = $this->getTitleArticle($rows[0]['id_articulo']);\n\t\t\treturn $rows[0];\n } else {\n return 0;\n }\n\n\t}", "title": "" }, { "docid": "0256076d24e8ab5c2a2571ed22165760", "score": "0.5958492", "text": "function verRecepciones() {\r\n session_cache_limiter('private_no_expire');\r\n if (isset($_SESSION['user'])) {\r\n $data = new pegaso;\r\n $pagina = $this->load_template('Compra Venta');\r\n $html = $this->load_page('app/views/pages/p.recepcion.php');\r\n ob_start();\r\n echo 'Bloqueado por el area de Sistemas';\r\n //break;\r\n $Recepciones = $data->verRecepciones();\r\n // var_dump($Recepciones);\r\n if (count($Recepciones) > 0) {\r\n include 'app/views/pages/p.recepcion.php';\r\n $table = ob_get_clean();\r\n $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $table, $pagina);\r\n } else {\r\n $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $html . '<div class=\"alert-danger\"><center><h2>Hubo un error al mostrar los datos</h2><center></div>', $pagina);\r\n }\r\n $this->view_page($pagina);\r\n } else {\r\n $e = \"Favor de Iniciar Sesión\";\r\n header('Location: index.php?action=login&e=' . urlencode($e));\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "5ff4fcced1bbd8100df68458d0174291", "score": "0.5957256", "text": "function aplicarComprobante()\n\t{\n\t\tif(strlen($this->ncf) < 10 && $this->tipoImpuesto > 0 && $this->tipo == \"factura\")\n\t\t{\n\t\t\tasgMng::query('lock tables tipocomprobantes');\n\t\t\t$sql = \"select tc.id, tc.ultimoNCF from tipoimpuesto ti\nleft join tipocomprobantes tc on tc.id = ti.tipoNCF\nwhere ti.id = {$this->tipoImpuesto}\";\n\t\t\t\n\t\t\t$rs = asgMng::query($sql);\n\t\t\tif(mysqli_num_rows($rs) > 0)\n\t\t\t{\n\t\t\t\t$row = mysqli_fetch_array($rs);\n\t\t\t\t$uncf = $row[\"ultimoNCF\"];\n\t\t\t\t$uncf++;\n\t\t\t\t$this->ncf = strtoupper($uncf);\n\t\t\t\t$this->guardar();\n\t\t\t\t$id = $row[\"id\"];\n\t\t\t\t$sql = \"update tipocomprobantes set ultimoNCF = '$uncf' where id = $id\";\n\t\t\t\tasgMng::query($sql);\n\t\t\t}\n\t\t\tasgMng::query('unlock tables');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1f0f335fabec5f6d432f8e5cce2429e2", "score": "0.59497803", "text": "public function userSessionCondominion()\n {\n //se possui mais de um irá para um tela de escolha de condominio\n //se possui 1 irá salvar na session o id do condominio\n //se não possui nenhum condominio vai para a tela de cadastro de condominio\n\n $usersCondominium = $this->usersCondominiumRepository\n ->with(['user', 'condominium'])\n ->findWhere([\n 'user_id' => Auth::user()->id\n ]);\n\n if (count($usersCondominium) > 1) {\n //multiplos condominios\n //salva todos os condominios na session\n foreach ($usersCondominium as $row) {\n $this->getCondominiumSession($row);\n }\n\n } elseif (count($usersCondominium) == 1) {\n $this->getCondominiumSession($usersCondominium[0]);\n }\n\n return true;\n }", "title": "" }, { "docid": "72f7c679429add68315c85174242cbb2", "score": "0.5946878", "text": "public function ordenes_compras()\n {\n $ventas = DB::SELECT(\"SELECT * FROM ventas WHERE id_usuario = \".Auth::user()->id );\n \n foreach( $ventas as $venta )\n {\n $vendedor = DB::SELECT(\"SELECT * FROM usuarios WHERE id = \".$venta->id_usuario);\n\n $facturas = DB::SELECT(\"SELECT facturas.factura FROM solicitud_factura\n INNER JOIN solicitud ON solicitud.id = solicitud_factura.id_solicitud\n INNER JOIN facturas ON facturas.id = solicitud_factura.id_factura\n WHERE solicitud.cancelado = 0 and facturado = 1\");\n\n $total = DB::SELECT(\"SELECT SUM(total) as total FROM movimiento_productos WHERE id_venta = \".$venta->id);\n\n $total = $total[0]->total * 1.16;\n \n\n //Se lo debo falta crear la tabla de pagos para sacar este\n // $pendiente = ;\n } \n\n }", "title": "" }, { "docid": "47b4bcdb6281c129b4893e2b7f3ba844", "score": "0.59421533", "text": "function inicioEstadoSolicitud()\r\n {\r\n $this->procedimiento = 'mat.ft_solicitud_ime';\r\n $this->transaccion = 'MAT_INI_INS';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('operacion', 'operacion', 'varchar');\r\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\r\n\r\n $this->setParametro('id_funcionario', 'id_funcionario', 'int4');\r\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\r\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\r\n $this->setParametro('obs', 'obs', 'text');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "d1a177033064e7aef2a3e34670ff5f33", "score": "0.5930416", "text": "function cuenta_registros()\r\n{\r\n\t$global=new Conecciones();\r\n\t$DB=$global->db_local_v1;\r\n\t\r\n\t$status=$DB->Conectar(\"bolas_sag\");\r\n\tif ($status===false)\r\n\t{\r\n\t\techo \"Error al conectar a la base de Datos\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$sql=\"select count(*) from log \";\r\n\t\t//echo $sql;\r\n\t\t$resultado=$DB->consultaSQL($sql, true);\r\n\t\treturn $resultado[0][0];\r\n\t}\r\n\treturn 1;\r\n}", "title": "" }, { "docid": "85d5cbbc0065f68f973cc7faac003f7f", "score": "0.5927176", "text": "public function actualizarComentarios() {\n\n\n $comentario = CafeteriasComentarios::actualizarContador([\n 'id_usuario' => $_SESSION['id'],\n 'id_cafeteria' => $_POST['id']\n ]);\n\n if ($comentario) {\n echo('OK');\n } else {\n echo('ERROR');\n }\n }", "title": "" }, { "docid": "820aa95aa96590f2141b3ad2f18a55d3", "score": "0.59261876", "text": "public function abrirConta($t) {\r\n $this->setTipo($t);\r\n $this->setStatus(true);\r\n if ($t == 'CC' ){\r\n $this->setSaldo(50); // dar sempre ferencia p esse metodo\r\n } elseif ($t == 'CP') {\r\n $this->saldo = 150;\r\n }\r\n \r\n }", "title": "" }, { "docid": "d4dec98d1385e933bcf3cd566e7de683", "score": "0.5925929", "text": "public function getCuentaCobrar()\n {\n $this->db->select(\"cc.montoTotal, cc.mes, cc.estado, p.nombres, p.primerApellido, p.segundoApellido, i.tipoInmueble, i.nroDocumento, i.numManzano\");\n $this->db->from(\"cuentaxCobrar cc\");\n $this->db->join('propietario p', 'p.idPropietario=cc.idPropietario');\n $this->db->join('inmueble i', 'i.idInmueble=cc.idInmueble');\n //$this->db->where('cc.estado', 0);\n $results=$this->db->get();\n return $results->result();\n }", "title": "" }, { "docid": "98af69d18db3607eb77358be2cfdccc7", "score": "0.5923359", "text": "public function tienda_correspondiente($Tienda){\n\n //special area \n if($_SESSION['datapay']['tienda'] == 'special_area'){\n $Tienda->buy_special();\n //star area \n }else if($_SESSION['datapay']['tienda'] == 'star_area'){\n $Tienda->buy_star();\n //banners \n }else if($_SESSION['datapay']['tienda'] == 'banner'){\n $Tienda->buy_banner();\n //promocionar anuncios\n }else if($_SESSION['datapay']['tienda'] == 'promocionar'){\n $Tienda->buy_promo();\n //traduccion de anuncios \n }else if($_SESSION['datapay']['tienda'] == 'traduccion'){\n $Tienda->buy_tradd(); \n //paquetes de anuncios \n }else if($_SESSION['datapay']['tienda'] == 'paqueteria'){\n if(!empty($_SESSION['datapay']['renew'])){\n //renovando paquete existente\n $Tienda->renew_paquete();\n }else if(!empty($_SESSION['datapay']['rebuy'])){\n //recomptrando un paquete caducado\n $Tienda->rebuy_paquete();\n }else{\n //comprando paquete nuevo\n $Tienda->buy_paqueteria(); \n }\n }\n //end\n\t}", "title": "" }, { "docid": "4c9ee592d2fe18111940fd51c929c8ff", "score": "0.59180355", "text": "public function cotizarOrden($orden_id)\n {\n //dd($orden_id);\n $orden = Orden::where('id', $orden_id)->first();\n\n //Validamos si el estado es 3 Por cotizar Asignado y lo cambiamos a estado 4 Cotizado\n if($orden->estado_id == 3)\n {\n //Cambiamos el estado de la orden\n $orden->estado_id = 4;\n $orden->update();\n\n //Creamos el historial con el cambio de estado de la orden\n $historialOrden = new historialOrden;\n $historialOrden->orden_id = $orden_id;\n $historialOrden->estadoActual_id = 4;\n $historialOrden->userAsignado_id = auth()->user()->id;\n $historialOrden->save();\n\n //Activamos el evento para el envio del Correo\n NotificationEvent::dispatch(User::where('id',$orden->user_id)->first(),[$orden_id],\"CambioEstadoCotizado\");\n\n //Retornamos a la vista anterior\n //dd('Lego Aqui');\n\n $user = auth()->user()->id;\n\n $ordenAsignadas = Orden::select('ordens.id','ordens.estado_id','ordens.created_at','historial_ordens.userAsignado_id')\n ->join('historial_ordens','historial_ordens.orden_id','=','ordens.id')\n ->where('historial_ordens.userAsignado_id','=',$user)->first()\n ->whereIn('ordens.estado_id',[3,6,12])\n ->get();\n //dd($ordenAsignadas);\n\n //dd('La consulta trae valores');\n return view('trabajos.ordenes.asignadas_a_mi', compact('ordenAsignadas')); \n \n }\n\n //Validamos si el estado es 4 Cotizado y lo cambiamos a estado 8 Orden Sin Asignar\n if($orden->estado_id == 4)\n {\n $orden->estado_id = 8;\n $orden->update();\n\n $historialOrden = new historialOrden;\n $historialOrden->orden_id = $orden_id;\n $historialOrden->estadoActual_id = 8;\n $historialOrden->userAsignado_id = auth()->user()->id;\n $historialOrden->save();\n\n $user = auth()->user()->id;\n $ordenes = Orden::select('ordens.id','Trm','ordens.estado_id','ordens.created_at','estado_ordens.nombreEstado','users.name','convencions.nombreConvencion')\n ->join('estado_ordens','ordens.estado_id','=','estado_ordens.id')\n ->join('users','ordens.user_id','=','users.id')\n ->join('convencions','ordens.convencion_id','=','convencions.id')\n ->where('user_id','=',$user)\n ->get();\n //dd($ordenes);\n\n $user = User::where('rol_id','=',1)\n ->get();\n //dd($user);\n\n OrdenAceptada::dispatch($user,$orden_id);\n return view('trabajos.ordenes.misOrdenes', compact('ordenes'))->with('flash','La orden fue aceptada');\n }else{\n //dd('que paso');\n }\n }", "title": "" }, { "docid": "0514e2e7a9b0f8b8c625c08238d99bef", "score": "0.591774", "text": "public function controlCuota($mensaje = '') {\n if(isset($_SESSION['id'])) { // Si el usuario esta logueado\n if($_SESSION['rol'] == \"administrador\" or $_SESSION['rol'] == \"gestion\") { // Si el usuario es administrador o gestion\n $listado = $this->model('Listado_model');\n $cuotas = $listado->listarCuotas();\n $template = loadTwig(\"ABMCuota.twig\", $mensaje);\n $template->display(array('cuotas' => $cuotas));\n }\n else\n $this->controlador('Home')->vistaNoEncontrada(); // Redirigir a otro lado porque no es administrador o gestion\n }\n else\n $this->controlador('Home')->vistaNoEncontrada(); // Redirigir a otro lado porque no esta logueado\n }", "title": "" }, { "docid": "d9dd2d5368abb8644a3bf89767a4aea4", "score": "0.59098566", "text": "private function compteBloquejat() {\r\n \r\n $_SESSION[\"logout\"] = \"compteBloquejat\";\r\n \r\n /** crida al mètode per mostrar l'error */\r\n $this->doError ( );\r\n \r\n }", "title": "" }, { "docid": "8cd244b12d00d7642f0ede6a2f44aeda", "score": "0.5908855", "text": "function obten_casos() {\n\tglobal $connection;\n\t$consulta = \" SELECT *\n\t\t\t\t\t\tFROM interesado_cs\n\t\t\t\t\t\tWHERE activo = 'Si'\n\t\t\t\t\t\tORDER BY recordatorio ASC\";\n\t\t\t\t\t\t\n\t$usuarios_set = mysql_query($consulta, $connection);\n\tconfirm_query($usuarios_set);\n\treturn $usuarios_set;\n}", "title": "" }, { "docid": "35a6ff26160eb61a679e00891604ade1", "score": "0.5901032", "text": "public function autorizacion2($idTipo,$idSolicitud,$idEstado){\n\t\tif($idTipo==1){\n\t\t\t//busca la solicitud de no marcacion\t\t\t\n\t\t\t$solnomarcacion=SolNoMarcacion::find($idSolicitud);\n\t\t\t//verifica el estado si tiene estado de ingresada, actualiza el estado\n\t\t\tif($solnomarcacion->idEstado==1){\n\t\t\t\t//busca el jefe inmediato para autorizar la solicitud\n\t\t\t\t$jefeInmediato=DB::connection('sqlsrv')->table('dnm_rrhh_si.RH.empleados')\n\t\t\t\t\t\t\t->where('idPlazaFuncional',DB::raw('(select idPlazaFuncionalPadre \n\t\t\t\t\t\t\t\t\tfrom dnm_rrhh_si.RH.plazasFuncionales where \n\t\t\t\t\t\t\t\t\tidPlazaFuncional=(select idPlazaFuncional from dnm_rrhh_si.RH.empleados where idEmpleado='.$solnomarcacion->idEmpleadoCrea.'))'))\n\t\t\t\t\t\t\t->first();\n\t\t\t\t// se obtiene los datos para mostrar lo que se autorizo \t\t\t\n\t\t\t\t$data['solicitante']=User::where('idEmpleado',$solnomarcacion->idEmpleadoCrea)->first();\n\t\t\t\t$solmotv=SolicitudMotivo::find($solnomarcacion->motivo);\n\t\t\t\t$motivo=CatMotivos::find($solmotv->idMotivo);\n\t\t\t\t$empleado=CatEmpleados::find($solnomarcacion->idEmpleadoCrea);\n\t\t\t\t$unidad=Unidades::getUnidadByIdEmpleado($empleado->idEmpleado);\n\t\t\t\t$data['motivo']=$motivo;\n\t\t\t\t$data['unidad']=$unidad;\n\t\t\t\t$data['autorizada']=1;\n\t\t\t\t\n\t\t\t\t// se le cambia el estado a la solicitud ya sea denegada o autorizada\n\t\t\t\t$solnomarcacion->autorizacion1=$jefeInmediato->idPlazaFuncional;\n\t\t\t\t$solnomarcacion->idEstado=$idEstado;\n\t\t\t\t//$solnomarcacion->fechaModificacion=date('Y-m-d H:i:s.000');\n\t\t\t\t$solnomarcacion->save();\n\t\t\t\t$sol=DB::connection('sqlsrv')->table('dnm_rrhh_si.Permisos.solicitudNoMarcacion as soln')\n\t\t\t\t\t->join('dnm_rrhh_si.Permisos.estadoSolicitud as est','soln.idEstado','=','est.idEstadoSol')\n\t\t\t\t\t->select('est.*','soln.*')\n\t\t\t\t\t->where('idSolNoMarca','=',$idSolicitud)->first();\n\t\t\t\t\t\n\t\t\t\t$data['solicitud']=$sol;\n\t\t\t\t//dd($solnomarcacion);\n\t\t\t\t//dd($data);\n\t\t\t\treturn view ('emails.confirmacion',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// si no tiene idEstado igual a 0 solo se muestra el tipo de estado que tiene la solicitud,\n\t\t\t\t//ya sea autorizada o denegada.\n\t\t\t\t$sol=DB::connection('sqlsrv')->table('dnm_rrhh_si.Permisos.solicitudNoMarcacion as soln')\n\t\t\t\t\t->join('dnm_rrhh_si.Permisos.estadoSolicitud as est','soln.idEstado','=','est.idEstadoSol')\n\t\t\t\t\t->select('est.*','soln.*')\n\t\t\t\t\t->where('idSolNoMarca','=',$idSolicitud)->first();\n\t\t\t\t\t\n\t\t\t\t$data['solicitud']=$sol;\n\t\t\t\t$data['autorizada']=0;\n\t\t\t\treturn view ('emails.confirmacion',$data);\n\t\t\t}\n\t\t}\n\t\telseif($idTipo==2){\n\t\t\t\n\t\t\t$sollicencia=SolLicencia::find($idSolicitud);\n\t\t\tif($sollicencia->idEstado==1 || $idEstado==4 || $idEstado==6 || $idEstado==2){\n\t\t\t\t//busca el jefe inmediato para autorizar la solicitud\n\t\t\t\t$jefeInmediato=DB::connection('sqlsrv')->table('dnm_rrhh_si.RH.empleados')\n\t\t\t\t\t\t\t->where('idPlazaFuncional',DB::raw('(select idPlazaFuncionalPadre \n\t\t\t\t\t\t\t\t\tfrom dnm_rrhh_si.RH.plazasFuncionales where \n\t\t\t\t\t\t\t\t\tidPlazaFuncional=(select idPlazaFuncional from dnm_rrhh_si.RH.empleados where idEmpleado='.$sollicencia->idEmpleadoCrea.'))'))\n\t\t\t\t\t\t\t->first();\n\t\t\t\tif($idEstado==3 || $idEstado==4 || $idEstado==6){\n\t\t\t\t\t$sollicencia->autorizacion2=$jefeInmediato->idEmpleado;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$sollicencia->autorizacion1=$jefeInmediato->idEmpleado;\n\t\t\t\t}\n\t\t\t\t$sollicencia->idEstado=$idEstado;\n\t\t\t\t//$solnomarcacion->fechaModificacion=date('Y-m-d H:i:s.000');\n\t\t\t\t$sollicencia->save();\n\t\t\t\t\n\t\t\t\t//dd($sollicencia);\n\t\t\t\t$data['solicitante']=User::where('idEmpleado',$sollicencia->idEmpleadoCrea)->first();\n\t\t\t\t$solmotv=SolicitudMotivo::find($sollicencia->enConcepto);\n\t\t\t\t$motivo=CatMotivos::find($solmotv->idMotivo);\n\t\t\t\t$empleado=CatEmpleados::find($sollicencia->idEmpleadoCrea);\n\t\t\t\t$unidad=Unidades::getUnidadByIdEmpleado($empleado->idEmpleado);\n\t\t\t\t$data['motivo']=$motivo;\n\t\t\t\t$data['unidad']=$unidad;\n\t\t\t\t$sol=DB::connection('sqlsrv')->\n\t\t\t\t\t table('dnm_rrhh_si.Permisos.solicitudLicencia as sol')\n\t\t\t\t\t ->join('dnm_rrhh_si.Permisos.estadoSolicitud as est','sol.idEstado','=','est.idEstadoSol')\n\t\t\t\t\t ->where('idSolLicencia','=',$idSolicitud)->first();\n\t\t\t\t$data['solicitud']=$sol;\n\t\t\t\t$data['autorizada']=1;\n\t\t\t\t//dd($data);\n\t\t\t\treturn view ('emails.confirmacion',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['autorizada']=0;\n\t\t\t\t$sol=DB::connection('sqlsrv')->\n\t\t\t\t\t table('dnm_rrhh_si.Permisos.solicitudLicencia as sol')\n\t\t\t\t\t ->join('dnm_rrhh_si.Permisos.estadoSolicitud as est','sol.idEstado','=','est.idEstadoSol')\n\t\t\t\t\t ->where('idSolLicencia','=',$idSolicitud)->first();\n\t\t\t\t$data['solicitud']=$sol;\n\t\t\t\t//dd($data);\n\t\t\t\treturn view ('emails.confirmacion',$data);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1d45a22f7bac83d3b575a9dd12abc1d3", "score": "0.5896732", "text": "function getEstadoCuenta($id){\n \n $getEstado = \"SELECT Cuen_Estado FROM `cuenta`\n WHERE id_Cuenta='$id'\";\n $result = mysql_query($getEstado) or die(mysql_error());\n $arr = mysql_fetch_array($result);\n \n if($result){\n return $arr['Cuen_Estado'];\n }else{\n return -1;\n }\n }", "title": "" }, { "docid": "ced32686453f72a44009000d606871e4", "score": "0.58960074", "text": "public function finTurno(){ //id, turnoActual, nTurno\n\t\t$app = App::getSingleton();\n\t\t$conn = $app->conexionBd();\n\t\t$idPartida = $this->id;\n\t\t$siguienteTurno = self::siguienteTurno();\n\t\t$n = $this->nTurno + 1;\n\t\t$idPartida = $conn->real_escape_string($idPartida);\n\t\t$siguienteTurno = $conn->real_escape_string($siguienteTurno);\n\t\t//Estas dos lineas hay que ver si funcionan\n\t\tself::comprobarMaster();\n\t\tself::comprobarAventurero();\n\t\t$update = \"UPDATE partidas SET turno = '$n', turno_actual = '$siguienteTurno', robaMaster = 'Si',robaAventurero = 'Si' WHERE id = '$idPartida'\";\n\t\t$rs = $conn->query($update);\n\t\t//$rs->free();\n\t\t\n\t\tif($this->wipes == 5){\n\t\t\t$update = \"UPDATE partidas SET finalizada = 'Si', ganador = 'Master' WHERE id = '$idPartida'\";\n\t\t\t$rs = $conn->query($update);\n\t\t\t\n\t\t\tself::actualizarGanadas($this->jugador2);\n\t\t\tself::actualizarPerdidas($this->jugador1);\n\t\t\tunset($_SESSION['partida']);\n\t\t\tself::borrarPartida();\n\t\t\t//$rs->free();\n\t\t}\n\t\tif($this->bossesRestantes == 0){\n\t\t\t$update = \"UPDATE partidas SET finalizada = 'Si', ganador = 'Aventurero' WHERE id = '$idPartida'\";\n\t\t\t$rs = $conn->query($update);\n\t\t\tself::actualizarGanadas($this->jugador1);\n\t\t\tself::actualizarPerdidas($this->jugador2);\n\t\t\tunset($_SESSION['partida']);\n\t\t\tself::borrarPartida();\n\t\t\t//$rs->free();\n\t\t}\n\t\tself::subirEnergia();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "79ded662f36841d96589c28f92b3d7c8", "score": "0.58955884", "text": "function anteriorEstadoSolicitud()\r\n {\r\n $this->procedimiento = 'mat.ft_solicitud_ime';\r\n $this->transaccion = 'MAT_ANT_INS';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('operacion', 'operacion', 'varchar');\r\n\r\n $this->setParametro('id_funcionario', 'id_funcionario', 'int4');\r\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\r\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\r\n $this->setParametro('obs', 'obs', 'text');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "7bf95c75b0381f1f11278dbecce47229", "score": "0.5895097", "text": "function cekAkses() {\n\t\t$datausr = $this->auth->getDetail();\n\t\t$Qgroup = $this->db->query('SELECT * FROM `group` WHERE idgroup='.$datausr['idgroup']);\n\t\t$dataGroup = $this->db->fetchAssoc($Qgroup);\n\t\t// print_r($datausr);\n\t\tif ($datausr['idgroup'] == 1) {\n\t\t\t$this->userAkses = 'admin';\n\t\t} else if ($datausr['idgroup'] == 2) {\n\t\t\t$this->userAkses = 'instansi'; // [anovedit] atau skpd\n\t\t\t$sqlInstansi = 'SELECT * FROM instansi AS i \n\t\t\t\t\tLEFT JOIN users AS u ON u.`idinstansi` = i.`idinstansi` \n\t\t\t\t\tWHERE u.`iduser`='.$datausr['iduser'];\n\t\t\t$qInstansi = $this->db->query($sqlInstansi);\n\t\t\t$this->activeInstansi = $this->db->fetchAssoc($qInstansi);\n\t\t} else if ($datausr['idgroup'] == 3) {\n\t\t\t$this->userAkses = 'bidang';\n\t\t\t// $this->activeBidang = $this->db->fetchAssoc($qInstansi);\n\t\t}\n\t}", "title": "" }, { "docid": "0b2812067e3dec9f190d0a9e358b5357", "score": "0.5894892", "text": "function aprobar($curso){\n $sql=\"SELECT COUNT(1) ESTADO FROM CURSOAPROBADO WHERE CARNET=\\\"\".$_SESSION['usuario'].\"\\\" AND IDCURSO=$curso;\";\n $res=consultar($sql);\n $row = mysql_fetch_array($res);\n if($row['ESTADO']==0){ //1=aprobado, else = 0\n //si no, aprobarlo\n $sql=\"INSERT INTO CURSOAPROBADO VALUES($curso,\\\"\".$_SESSION['usuario'].\"\\\");\";\n ejecutar($sql);\n }\n}", "title": "" }, { "docid": "1b127589656b0fe2c189af8b04590ff4", "score": "0.58939", "text": "function VerOrdenesAA() {\r\n session_cache_limiter('private_no_expire');\r\n if (isset($_SESSION['user'])) {\r\n $data = new pegaso;\r\n $pagina = $this->load_template('Compra Venta');\r\n $html = $this->load_page('app/views/pages/p.ordenesaavanzar.php');\r\n ob_start();\r\n $orden = $data->DataOrdenesAA();\r\n if (count($orden) > 0) {\r\n include 'app/views/pages/p.ordenesaavanzar.php';\r\n $table = ob_get_clean();\r\n $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $table, $pagina);\r\n } else {\r\n $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $html . '<div class=\"alert-danger\"><center><h2>Hubo un error al mostrar los datos</h2><center></div>', $pagina);\r\n }\r\n $this->view_page($pagina);\r\n } else {\r\n $e = \"Favor de Iniciar Sesión\";\r\n header('Location: index.php?action=login&e=' . urlencode($e));\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "b85c09533f705bc56567135dfd041bcb", "score": "0.5893676", "text": "function verificar_pagamento() {\n\t\t$this->loadModel('Usuario');\n\n\t\t$pagamento = $this->Usuario->find('all', \n\t\t\tarray('conditions' => \n\t\t\t\tarray('Usuario.id' => $this->instancia)\n\t\t\t)\n\t\t);\n\n\t\treturn $pagamento[0]['Usuario']['ativo'];\n\t}", "title": "" }, { "docid": "d85cc30ef6288daf17fedeb0dbd907bd", "score": "0.5892405", "text": "public function ingresoUsuarioController(){\n\t\tif(isset($_POST['correo']) && isset($_POST['password'])){\n\t\t\t$resultado = Crud::ingresoUsuarioModel($_POST['correo'], $_POST['password']); //se ejecuta la funcion del modelo\n\t\t\t//se verifica que lo retornado por el modelo no este vacio\n\t\t\tif(!empty($resultado)){\n\t\t\t\t$_SESSION['login']=true; //iniciar la variable de sesion login\n\t\t\t\t$_SESSION['maestro_info']= $resultado; //guardar los datos del maestro en una sesion\n\t\t\t\techo \"<script>window.location='index.php';</script>\";\n\t\t\t}else{\n\t\t\t\t//mostrar mensaje en caso de no existir el usuario\n\t\t\t\techo \"<script>alert('Email o password incorrectos');</script>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "27370e56e0c9d8ce266d8f69b5817fab", "score": "0.58915424", "text": "public function atenderAction() {\r\n //INICIO ACTUALIZAR EL TURNO CON FECHAS DE INICIO DE ATENCION\r\n //Al dar clic sobre atender debe iniciar la duración de la atención\r\n //Termina al dar clic en siguiente turno\r\n $fecha_inicio_atencion = date(\"Y-m-d\");\r\n $hora_inicio_atencion = date(\"H:i:s\");\r\n $this->fecha_inicio_atencion = $fecha_inicio_atencion;\r\n $this->hora_inicio_atencion = $hora_inicio_atencion;\r\n\r\n $datos = SessionNamespace::get('datosUsuarioSMC');\r\n $id_usuario = $datos->getId();\r\n if ($this->normal == 1) {\r\n $turno = new Turnos();\r\n $turno->updateAll(\"fecha_inicio_atencion= '$fecha_inicio_atencion', hora_inicio_atencion= '$hora_inicio_atencion', id_username= $id_usuario \", \"id= $this->id_turno\");\r\n } else {\r\n $turnosTrasferidos = new TurnosTransferidos();\r\n $turnosTrasferidos->updateAll(\"fecha_inicio_atencion= '$fecha_inicio_atencion', hora_inicio_atencion= '$hora_inicio_atencion'\", \"id= $this->id_t_t_atender\");\r\n }\r\n //FIN ACTUALIZAR EL TURNO CON FECHAS DE INICIO DE ATENCI�?N\r\n }", "title": "" }, { "docid": "17b44528befc1e7dd739d0b02b22f577", "score": "0.58886904", "text": "function alta(){\n\t\t\t//returns 0 upon succes.\n\t\t\t//return -1 upon a PDOException and displays its error message.\n\t\t\t//returns -2 if the admin tried to suscribe himself.\n\t\t\t$error = 0;\n\t\t\t$id_usuario = $this->params_in[1];\n\t\t\tif($id_usuario != $_SESSION['idusuario']){\n\t\t\t\ttry{\n\t\t\t\t\t$sql = \"UPDATE usuarios SET activo = 1 WHERE id_usuario = ?\";\n\t\t\t\t\t$query = $this->db->prepare($sql);\n\t\t\t\t\t$query->bindParam(1, $id_usuario);\n\t\t\t\t\t$query->execute();\n\t\t\t\t}catch (PDOException $e) {\n\t\t echo \"Error:\" . $e->getMessage();\n\t\t $error = -1;\n\t\t }\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$error = -2;\n\t\t\t}\n\t return $error;\n\t\t}", "title": "" }, { "docid": "3357b5cf52e84a5fd14ac138cf5f40f1", "score": "0.58879024", "text": "public function getStatusEntrega()\n {\n return $this->statusEntrega;\n }", "title": "" }, { "docid": "1785346cb0700be9a05da6bbd55e51b4", "score": "0.5885045", "text": "public function usuario_autentificado(){\n\n session_start();\n function revisar_usuario_session(){\n\n if($_SESSION['tipo_usuario']=='Cliente'){\n\n return isset($_SESSION['usuario']);\n }else{\n return 0;\n }\n }\n\n if(!revisar_usuario_session()){\n header('location: index.php');\n exit();\n }\n\n\n }", "title": "" }, { "docid": "30827dd8da5be7a158310388621fc03a", "score": "0.588213", "text": "public function getPaymentStatus()\n {\n $pago_id = \\Session::get('paypal_payment_id');\n\n // clear the session cliente ID\n \\Session::forget('paypal_payment_id');\n\n $clienteId = Input::get('PayerID');\n $token = Input::get('token');\n\n if (empty($clienteId) || empty($token)) {\n return redirect('/tienda')\n ->with('mensaje', 'Se ha cancelado la compra');\n }\n\n $pago = Payment::get($pago_id, $this->_api_context);\n\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n $resultado = $pago->execute($execution, $this->_api_context);\n\n if ($resultado->getState() == 'approved') {\n\n $this->saveOrder();\n\n \\Session::forget('carrito');\n\n return redirect('/tienda')\n ->with('mensaje', 'Compra realizada de forma correcta');\n }\n return redirect('/tienda')\n ->with('mensaje', 'La compra fue cancelada');\n }", "title": "" }, { "docid": "65f65a17d2a892226ab5cdb16f84b77f", "score": "0.5876004", "text": "public function getEstados() {\n /*\n $conex = WolfConex::conex();\n \n $sql = \"select * from cliente where login = '\".$data[\"user_login\"].\"' and contrasena = '\". md5($data[\"pass_login\"]) .\"' and estado = 1 \";\n $result = mysqli_query($conex->getLinkConnect(), $sql);\n $row = mysqli_fetch_array($result);\n \n //$result = $conex->Execute($sql);\n if ( !mysqli_num_rows($result) > 0 ){\n echo json_encode( [\"respuesta\" => false ] );\n } else {\n \n $_SESSION[\"clientId\"] = $row[\"cliente_id\"];\n $_SESSION[\"clientNombre\"] = $row[\"nombre\"];\n $_SESSION[\"clientLogin\"] = $row[\"login\"];\n $_SESSION[\"clientImg\"] = $row[\"foto\"];\n if ( $row[\"es_admin\"] ){\n $_SESSION[\"clientIsAdmin\"] = $row[\"es_admin\"];\n }\n \n echo json_encode( [ \"respuesta\" => true, \"usuario\" => $row[\"login\"] ] );\n }\n \n \n return true;\n */\n \n $estados = [ \"-1\" => \"Todos\", \"0\" => \"Pendiente\", \"1\" => \"Activo\", \"2\" => \"Rechazado\", \"3\" => \"Inactivo\" ];\n return $estados;\n }", "title": "" }, { "docid": "6c7729565382896282a9b30c4a3152fe", "score": "0.58752453", "text": "function IncapacidadId($id,$usuario){\n //Fecha y hora actual\n $fecha = date(\"Y-m-d H:i:s\");\n //Construimos la consulta\n $sql=\"SELECT incapa_temporal FROM empleados WHERE id=\".$id;\n //Realizamos la consulta\n $resultado = $this->realizarConsulta($sql);\n $almacena = $resultado->fetch_assoc();\n $sacar = current($almacena);\n\n if($sacar==0){\n\n $sql=\"UPDATE empleados SET incapa_temporal =1, fecha_mod='\".$fecha.\"', usuario_mod='\".$usuario.\"' WHERE id=\".$id;\n $actIncapacidad=$this->realizarConsulta($sql);\n }else{\n $sql=\"UPDATE empleados SET incapa_temporal =0, fecha_mod='\".$fecha.\"', usuario_mod='\".$usuario.\"' WHERE id=\".$id;\n $actIncapacidad=$this->realizarConsulta($sql);\n }\n if ($actIncapacidad=!false){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "8ac5ed7173e0ec2930c978e249771826", "score": "0.58724964", "text": "public function GuardarEntradaInventario()\n\t{\n\t\t//echo $this->id_compra.' id nota de remision = '.$this->id_nota_remision;\n\t\t\n\t\n\t $query =\"INSERT INTO entradas(tipoentrada,idusuarios,idnota_remision,idcompras,fecha_entrada,descripcion,idsucursales) VALUES ('$this->tipo','$this->idusuario','$this->id_nota_remision','$this->id_compra','$this->fecha_compra','$this->descripcion','$this->sucursal');\";\t\t\n\t\t\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->identrada_detalle = $this->db->id_ultimo();\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "bb13c49cc259624608750684bcb4427a", "score": "0.58700347", "text": "function seleccionarEstado($configuracion)\n {\n $totalEstudiantes='';\n $totalInscripciones='';\n if(isset($_REQUEST['proyecto']))\n {\n\n $arreglo=explode(\"-\",$_REQUEST['proyecto']);\n $planEstudio=$arreglo[0];\n $codProyecto=$arreglo[1];\n $nombreProyecto=$arreglo[2];\n\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\n }else if(isset($_REQUEST['codProyecto']) && isset($_REQUEST['planEstudio']))\n {\n $codProyecto=$_REQUEST['codProyecto'];\n $planEstudio=$_REQUEST['planEstudio'];\n $nombreProyecto=$_REQUEST['nombreProyecto'];\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\n }\n\n else{\n $cadena_sql=$this->sql->cadena_sql($configuracion,\"datos_coordinador\",$this->usuario);//echo $cadena_sql;exit;\n $resultado_datosCoordinador=$this->ejecutarSQL($configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n\n $_REQUEST['planEstudio']=$planEstudio=$resultado_datosCoordinador[0][2];\n $_REQUEST['codProyecto']=$codProyecto=$resultado_datosCoordinador[0][0];\n $_REQUEST['nombreProyecto']=$nombreProyecto=$resultado_datosCoordinador[0][1];\n\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\n }\n $variables=array($codProyecto, $this->ano, $this->periodo);\n $cadena_sql=$this->sql->cadena_sql($configuracion,\"consultar_estudiantes\", $variables);//echo $cadena_sql;exit;\n $resultado_periodo=$this->ejecutarSQL($configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n\n $this->encabezadoModulo($configuracion, $planEstudio, $codProyecto, $nombreProyecto);\n \n if(is_array($resultado_periodo))\n {\n ?>\n<form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<?echo $this->formulario?>'>\n<table class=\"contenidotabla centrar\">\n <tr>\n <td class=\"centrar\">\n <select id=\"id_estado\" name=\"id_estado\" >\n <?\n for($i=0;$i<count($resultado_periodo);$i++)\n {\n if($resultado_periodo[$i][2]>0)\n {\n ?>\n <option value=\"<?echo $resultado_periodo[$i][0]?>\"><?echo $resultado_periodo[$i][0].\" - \".$resultado_periodo[$i][1]?></option>\n <?\n }\n }\n ?>\n </select>\n <input type=\"hidden\" name=\"opcion\" value=\"cancelarEstado\">\n <input type=\"hidden\" name=\"action\" value=\"<?echo $this->formulario?>\">\n <input type=\"hidden\" name=\"codProyecto\" value=\"<?echo $codProyecto?>\">\n <input type=\"hidden\" name=\"nombreProyecto\" value=\"<?echo $nombreProyecto?>\">\n <input type=\"hidden\" name=\"planEstudio\" value=\"<?echo $planEstudio?>\">\n <input type=\"image\" src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/viewrel.png\">\n </td>\n </tr>\n</table>\n</form>\n<table class=\"contenidotabla centrar\" align=\"center\">\n <tr class=\"cuadro_brownOscuro\">\n <td class=\"texto_subtituloPrincipal centrar\">\n ESTADO\n </td>\n <td class=\"texto_subtituloPrincipal centrar\">\n NOMBRE ESTADO\n </td>\n <td class=\"texto_subtituloPrincipal centrar\">\n N&Uacute;MERO DE ESTUDIANTES\n </td>\n <td class=\"texto_subtituloPrincipal centrar\">\n N&Uacute;MERO DE INSCRIPCIONES\n </td>\n </tr>\n\n <?\n for($a=0;$a<count($resultado_periodo);$a++)\n {\n $pagina=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\n $variable=\"pagina=registroCancelarInscripcionEstudiantesInactivos\";\n $variable.=\"&opcion=cancelar\";\n $variable.=\"&codProyecto=\".$codProyecto;\n $variable.=\"&nombreProyecto=\".$nombreProyecto;\n $variable.=\"&planEstudio=\".$planEstudio;\n $variable.=\"&id_estado=\".$resultado_periodo[$a][0];\n\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\n $this->cripto=new encriptar();\n $variable=$this->cripto->codificar_url($variable,$configuracion);\n\n $totalEstudiantes=$totalEstudiantes+$resultado_periodo[$a][2];\n $totalInscripciones=$totalInscripciones+$resultado_periodo[$a][3];\n \n ?>\n <tr>\n <td class=\"cuadro_plano centrar\"><a href=\"<?echo $pagina.$variable?>\"><?echo $resultado_periodo[$a][0]?></a></td>\n <td class=\"cuadro_plano centrar\"><a href=\"<?echo $pagina.$variable?>\"><?echo $resultado_periodo[$a][1]?></a></td>\n <td class=\"cuadro_plano centrar\"><?echo $resultado_periodo[$a][2]?></td>\n <td class=\"cuadro_plano centrar\"><?echo $resultado_periodo[$a][3]?></td>\n </tr>\n <?\n }\n ?></table>\n<table class=\"contenidotabla centrar\">\n <tr class=\"centrar\">\n <td class=\"centrar\">\n <table class=\"contenidotablaNotamanno centrar\" align=\"center\">\n <tr class=\"centrar\">\n <td class=\"texto_subtituloPrincipal\" colspan=\"<?echo count($resultado_periodo)?>\">\n ESTUDIANTES INACTIVOS CON ESPACIOS ACAD&Eacute;MICOS INSCRITOS\n </td>\n </tr>\n <tr>\n\n <?\n for($i=0;$i<count($resultado_periodo);$i++)\n {\n $tamanno=($resultado_periodo[$i][2]/$totalEstudiantes)*100;\n $pagina=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\n $ruta=\"pagina=registroCancelarInscripcionEstudiantesInactivos\";\n $ruta.=\"&opcion=cancelar\";\n $ruta.=\"&codProyecto=\".$codProyecto;\n $ruta.=\"&nombreProyecto=\".$nombreProyecto;\n $ruta.=\"&planEstudio=\".$planEstudio;\n $ruta.=\"&id_estado=\".$resultado_periodo[$i][0];\n\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\n $this->cripto=new encriptar();\n $ruta=$this->cripto->codificar_url($ruta,$configuracion);\n ?>\n <td class=\"centrar\" valign=\"bottom\">\n <a class=\"centrar\" href=\"<?echo $pagina.$ruta?>\">\n <img src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/barra_<?echo $i?>.png\" height=\"<?echo $tamanno?>\" width=\"30\" border=\"0\" alt=\"Estado <?echo $resultado_periodo[$i][0]?>\"><br>\n <strong><?echo round($tamanno,1).\"%\"?>\n <br>\n <?echo $resultado_periodo[$i][0]?></strong>\n </a>\n </td>\n <?\n }\n ?>\n\n </tr>\n <tr class=\"centrar\">\n <td colspan=\"<?echo count($resultado_periodo)?>\">\n TOTAL DE ESTUDIANTES INACTIVOS CON ASIGNATURAS INSCRITAS: <?echo $totalEstudiantes?>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n</table>\n\n\n <?\n }\n else\n {\n ?><table class=\"contenidotabla2\" align=\"center\">\n <tr>\n <td class=\"cuadro_color centrar\">\n No existen estudiantes inactivos con espacios inscritos\n </td>\n </tr>\n </table>\n <?\n }\n\n }", "title": "" }, { "docid": "803fffd09a9c5168b0ff944911e19cf6", "score": "0.5864397", "text": "public function checkOnUpdate()\n\t\t{\n\t\t\t\n\t\t\t$selecaoActive = $this->data['Contract']['active'];\n\n\t\t\tdebug($this->data);\n\n\t\t\t// pesquisa o contrato\n\t\t\t$pesquisa = $this->read(null, $this->data['Contract']['id']);\n\n\t\t\tdebug($this->data);\n\n\t\t\t// pega a flag do contrato pesquisado\n\t\t\t$bancoActive = $pesquisa['Contract']['active'];\n\n\t\t\t// debug($pesquisa['Contract']['active']);\n\t\t\t// debug($selecaoActive);\n\n\t\t\t// // se o usuario selecionou o checkbox faça\n\t\t\t// if ( $selecaoActive )\n\t\t\t// {\n\t\t\t// \t// exit;\n\n\t\t\t// \t// Se o que o usuário ativou o checkbox e no banco está inativo, ou se são diferentes, faça\n\t\t\t// \tif ( $selecaoActive != $bancoActive )\n\t\t\t// \t{\n\n\t\t\t// \t\texit;\n\n\t\t\t// \t\t$argumento2 = array\n\t\t\t// \t\t(\n\t\t\t// \t\t\t'conditions' => array\n\t\t\t// \t\t\t(\n\t\t\t// \t\t\t\t'Contract.person_id' => $this->data['Contract']['person_id'],\n\t\t\t// \t\t\t\t'Contract.active' => '1'\n\t\t\t// \t\t\t),\n\n\t\t\t// \t\t\t'fields' => array\n\t\t\t// \t\t\t(\n\t\t\t// \t\t\t\t'Contract.person_id', \n\t\t\t// \t\t\t\t'Contract.active'\n\t\t\t// \t\t\t)\n\t\t\t// \t\t);\n\n\n\n\t\t\t// \t\t// Conte quantos registros existem ativos da pessoa em questão !\n\t\t\t// \t\t$pesquisa = $this->find('count', $argumento2);\n\n\t\t\t// \t\tdebug($pesquisa);\n\n\n\t\t\t// \t\t// Se for diferente de zero é pq existem contratos, ou seja, pare por ai...\n\t\t\t// \t\tif ($pesquisa != 0)\n\t\t\t// \t\t{\n\t\t\t// \t\t\t$this->invalidate('active', 'É permitido no máximo um contrato ativo por pessoa, e esse cliente já possui um cadastro ativo.');\n\t\t\t// \t\t\treturn false;\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// }\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "cd71c682b32164cbf1d29b99312efb00", "score": "0.5853268", "text": "public function activar($request){\n $estado = Categoria::where('categoria', 'estado')\n ->where('valor', 'activo')\n ->get()\n ->first();\n \n return $this->cambiarEstado($estado, $request);\n }", "title": "" }, { "docid": "635412508393056eb9dd97d3a5177b74", "score": "0.5851729", "text": "function siguienteEstadoSolicitudBorrador()\r\n {\r\n $this->procedimiento = 'mat.ft_solicitud_ime';\r\n $this->transaccion = 'MAT_SIG_BORR_IME';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\r\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\r\n $this->setParametro('estado', 'estado', 'varchar');\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "0c64d2be1d73c8ad4c9858825cfaf3fd", "score": "0.58504397", "text": "public static function AtualizarStatusMotorista(){\n self::$id = $_POST['id'];\n self::$status = $_POST['status'];\n try {\n self::query(\"UPDATE tbUsuario set ds_status = \".self::$status.\" where id_usuario = \".self::$id.\"\");\n echo \"1\";\n } catch(Exception $e) {\n echo $e;\n }\n }", "title": "" }, { "docid": "5787347b5d72a05d4aa4361f91bfba47", "score": "0.584843", "text": "public function actionProcesarContratos() {\n $d = new \\DateTime('first day of this month');\n $d->sub(new \\DateInterval('P1D'));\n $fecha_hasta=$d->format('Y-m-d');\n $query=\"SELECT count(*) as cantidad FROM auditoria_contratos WHERE fecha_contrato='{$fecha_hasta}'\";\n $connection = Yii::$app->getDb();\n $cantidad = $connection->createCommand($query)->queryScalar();\n if($cantidad==0){\n //SE BUSCA TODOS LOS CONTRATOS ACTIVOS CON FECHA DE VENCIMIENTO HASTA LA FECHA A PROCESAR\n\n $query = \"SELECT id_operacion_inmobiliaria,cod_propiedad FROM a2_operaciones_inmobiliarias WHERE estado='ACTIVO' AND \n DATE(CONCAT(hasta_anio,'-',hasta_mes,'-',dia_venc_mensual))<=DATE('{$fecha_hasta}')\";\n\n $connection = Yii::$app->getDb();\n $model = $connection->createCommand($query)->queryAll();\n foreach($model as $row){\n $query=\"SELECT id_operacion_inmobiliaria,cod_propiedad FROM a2_operaciones_inmobiliarias WHERE \n estado='PENDIENTE' AND cod_propiedad=\".$row['cod_propiedad'];\n $connection = Yii::$app->getDb();\n $contrato_pendiente = $connection->createCommand($query)->queryOne();\n\n $transaction = \\Yii::$app->db->beginTransaction();\n if($contrato_pendiente){\n $query = \"UPDATE a2_operaciones_inmobiliarias SET estado='FINALIZADO'\n WHERE id_operacion_inmobiliaria=\".$row['id_operacion_inmobiliaria'];\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute(); \n\n $query = \"INSERT INTO auditoria_contratos (operacion_id,fecha_contrato,fecha_procesamiento,\n estado_contrato) VALUES (\".$row['id_operacion_inmobiliaria'].\",'{$fecha_hasta}','\".date('Y-m-d').\"','RENOVADO')\";\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute(); \n\n $query = \"UPDATE a2_operaciones_inmobiliarias SET estado='ACTIVO'\n WHERE id_operacion_inmobiliaria=\".$contrato_pendiente['id_operacion_inmobiliaria']; \n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute();\n\n $query = \"INSERT INTO auditoria_contratos (operacion_id,fecha_contrato,fecha_procesamiento,\n estado_contrato) VALUES (\".$contrato_pendiente['id_operacion_inmobiliaria'].\",'{$fecha_hasta}','\".date('Y-m-d').\"','ACTIVO')\";\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute();\n $transaction->commit();\n }else{\n $query = \"UPDATE a2_operaciones_inmobiliarias SET estado='FINALIZADO'\n WHERE id_operacion_inmobiliaria=\".$row['id_operacion_inmobiliaria'];\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute(); \n\n $query = \"INSERT INTO auditoria_contratos (operacion_id,fecha_contrato,fecha_procesamiento,\n estado_contrato) VALUES (\".$row['id_operacion_inmobiliaria'].\",'{$fecha_hasta}','\".date('Y-m-d').\"','FINALIZADO')\";\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute();\n $transaction->commit();\n } \n }\n $query = \"SELECT id_operacion_inmobiliaria,cod_propiedad FROM a2_operaciones_inmobiliarias WHERE \n estado='PENDIENTE' AND DATE(CONCAT(hasta_anio,'-',hasta_mes,'-',dia_venc_mensual))>=DATE('{$fecha_hasta}')\";\n\n $connection = Yii::$app->getDb();\n $model = $connection->createCommand($query)->queryAll();\n foreach($model as $row){\n $query=\"SELECT id_operacion_inmobiliaria,cod_propiedad FROM a2_operaciones_inmobiliarias WHERE \n estado='ACTIVO' AND cod_propiedad=\".$row['cod_propiedad'];\n $connection = Yii::$app->getDb();\n $contrato_activo = $connection->createCommand($query)->queryOne();\n\n $transaction = \\Yii::$app->db->beginTransaction();\n if(!$contrato_activo){\n $query = \"UPDATE a2_operaciones_inmobiliarias SET estado='ACTIVO'\n WHERE id_operacion_inmobiliaria=\".$row['id_operacion_inmobiliaria'];\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute(); \n\n $query = \"INSERT INTO auditoria_contratos (operacion_id,fecha_contrato,fecha_procesamiento,\n estado_contrato) VALUES (\".$row['id_operacion_inmobiliaria'].\",'{$fecha_hasta}','\".date('Y-m-d').\"','ACTIVO')\";\n\n $connection = Yii::$app->getDb();\n $connection->createCommand($query)->execute();\n $transaction->commit();\n }\n }\n }\n }", "title": "" }, { "docid": "e8e96b63f7b9665950f6f81c0b4ee83c", "score": "0.58478683", "text": "private function calcularEstado() {\n $estado = 0;\n if ($this->estaHabilitada()) {\n if ($this->fecha_inicio == \"--\") {\n $estado = 1;\n } else {\n if ($this->fecha_fin == \"--\") {\n $estado = 2;\n } else {\n $estado = 3;\n }\n }\n } else {\n $estado = 0;\n }\n return $estado;\n }", "title": "" }, { "docid": "4082f7587febd9e9805748674cb8ae7e", "score": "0.5843226", "text": "public function actualizarEntradasCero() {\n $em = $this->getEntityManager();\n $sql = \"\n UPDATE inv_producto_mov SET cantidad_entrada = 0 WHERE cantidad_entrada is null\n \";\n $em->getConnection()->executeQuery($sql);\n return;\n }", "title": "" }, { "docid": "223e3f2ff959c16c92d74190fc54da12", "score": "0.5836947", "text": "public function UltimoAutorizado(){\n\t\t$this->Autorizacion('wsfe');\n\t\t$cuitemisor =(float) $this->cuit_emisor;\n\t\t$auth = array('Token'=>$this->token, 'Sign'=>$this->sign, 'Cuit'=>$cuitemisor);\n\t\t$FECompUltimoAutorizado = array('Auth'=> $auth, 'PtoVta'=>intval($this->punto_venta), 'CbteTipo'=>intval($this->tipo_comprobante));\n\t\t//INICIAR CLIENTE SOAP\n\t\t $client=new \\SoapClient($this->WSDL_ULT, array(\n\t\t 'soap_version' => SOAP_1_2,\n\t\t 'location' => $this->URL_ULT,\n\t\t 'trace' => 1\n\t\t ));\n\t\t//ENVIAR DATOS\n\t\t$results=$client->FECompUltimoAutorizado($FECompUltimoAutorizado);\n\t\t $json_obj = json_encode($results);\n\t\t if (is_soap_fault($results)) \n\t\t {\n\t\t exit(\"SOAP Fault: \".$results->faultcode.\"\\n\".$results->faultstring.\"\\n\");\n\t\t }\n\n\t\tfile_put_contents(storage_path().\"/app/public/facturacion/xml/\".Auth::user()->cuit.'/'.$this->cuit_emisor.\"_request-compultimoautorizado.xml\",$client->__getLastRequest());\n\t\tfile_put_contents(storage_path().\"/app/public/facturacion/xml/\".Auth::user()->cuit.'/'.$this->cuit_emisor.\"_response-compultimoautorizado.json\",$json_obj);\n\t\t$response = json_decode($json_obj, true);\n\t\treturn $response['FECompUltimoAutorizadoResult']['CbteNro'];\n\t}", "title": "" } ]
905bdfb7cda9df60fe0b0c43d4af2442
Function to run at plugin activation.
[ { "docid": "13c4d8964b60d02c695b3a8d0f626fb0", "score": "0.0", "text": "function activate() {\n\tflush_rewrite_rules();\n}", "title": "" } ]
[ { "docid": "add157ddb88768e15755aeacb0dc6f76", "score": "0.8290024", "text": "static function activate_plugin() {\n\t}", "title": "" }, { "docid": "2b9a642d30acff9dc1859b6680572d14", "score": "0.8104246", "text": "function pluginActivated() : void;", "title": "" }, { "docid": "53c7f0df0e7bc3756be6b4a223420811", "score": "0.8097099", "text": "function plugin_activate(){\r\n\tInc\\Base\\Activate::activate();\r\n}", "title": "" }, { "docid": "62dafaddbc2f1d2f4d5a7a4c65766c89", "score": "0.8094395", "text": "public function activation () {\n\t\t$this->register_plugin_version();\n\t}", "title": "" }, { "docid": "70fb38d865bfddec50fa49b9a8532f44", "score": "0.80741376", "text": "function _activation() {\n\t\t\tglobal $scrape_core;\n\t\t\t$scrape_core->install_init();\t\t// Call plugin initializer\n\t\t}", "title": "" }, { "docid": "009d5c2925063d70ad61ba8dc78a0ef9", "score": "0.80673957", "text": "public function activation () {\r\n\t\t$this->register_plugin_version();\r\n\t}", "title": "" }, { "docid": "009d5c2925063d70ad61ba8dc78a0ef9", "score": "0.80673957", "text": "public function activation () {\r\n\t\t$this->register_plugin_version();\r\n\t}", "title": "" }, { "docid": "49613f527c2782591d3288804b43ba2e", "score": "0.7946449", "text": "public static function activate() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-activator.php';\n PLUGINNAME_Activator::activate();\n }", "title": "" }, { "docid": "29e1028c548534614839684b6be5f499", "score": "0.7845341", "text": "public function activate() {\n\t\t/**\n\t\t * Fires when the plugin is being activated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action( 'tml_activate' );\n\t}", "title": "" }, { "docid": "c39a0757a09e080d60ed9939a5704400", "score": "0.7763745", "text": "public function plugin_activate() {\n\n\t\t// call custom content type function\n\t\t$this->register_3d_notes();\n\t\t$this->register_user_notes();\n\n\t\t// create static pages\n\t\t$this->create_static_pages();\n\n\t\t// flush permalinks\n\t\tflush_rewrite_rules();\n\n\t\t//create database entry\n\t\t$this->create_db();\n\n\n\t}", "title": "" }, { "docid": "be0f99459d09a66f0c6d9721b2f64d93", "score": "0.77129745", "text": "public function activate() {\n\t\t$installer = new TMPlugin\\Installer();\n\t\t$installer->run();\n\t}", "title": "" }, { "docid": "4a55b72496bf96a705c1fc04f0f2c9e0", "score": "0.7705339", "text": "function luis_plugin_activate(){\n Activate::activate();//we just call the static method inside active.php(because we have the autoload) \n}", "title": "" }, { "docid": "73fa0ba501349af9f90683c11ba8646a", "score": "0.7682741", "text": "function ss_plugin_activate() {\r\n // do stuff like create a db table.\r\n}", "title": "" }, { "docid": "9f2f0614ccaf46ea346f0a2b885e0492", "score": "0.76357794", "text": "public function init() {\n\t\tregister_activation_hook( $this->name, [ $this, 'callback_activation_hook' ] );\n\t\tadd_action( 'plugins_loaded', [ $this, 'callback_plugins_loaded' ], 0 );\n\t}", "title": "" }, { "docid": "956c1f9deb191599e645c0d72b243cf4", "score": "0.753665", "text": "public function activate() {\n\t\t// Current plugin version.\n\t\tif ( $this->is_network() ) {\n\t\t\t$version = get_site_option( 'pluginbase_version', '1.0.0' );\n\t\t} else {\n\t\t\t$version = get_option( 'pluginbase_version', '1.0.0' );\n\t\t}\n\n\t\t// Set plugin owner.\n\t\t$this->set_plugin_owner();\n\t\t// Assign capabilities.\n\t\t$this->assign_caps();\n\n\t\t/**\n\t\t * Action hook to execute after activation.\n\t\t *\n\t\t * @param int Old version.\n\t\t * @param int New version.\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\tdo_action( 'pluginbase/after_activate', $version, SMUSHTOOLKIT_VERSION );\n\t}", "title": "" }, { "docid": "8a2cc0609713b27fcf4c34ae730294f0", "score": "0.7530189", "text": "function activate_bentbreed_plugin(){\n Activate::Activate();\n}", "title": "" }, { "docid": "32df8911b3c2cfd031c3943c64b7fcc3", "score": "0.7512188", "text": "public function on_activate_plugin() {\n\t\t\n\t\t\t$this->data->update_database ();\n\t\t}", "title": "" }, { "docid": "4fc7670dbb5ac7b345a526e5f60e324e", "score": "0.7341479", "text": "public function activate() {\n\n\t\tWP_Event_Manager_Ajax::add_endpoint();\n\n\t\t$this->post_types->register_post_types();\n\n\t\tWP_Event_Manager_Install::install();\n\t\t\n\t\t//show notice after activating plugin\n\t\tupdate_option('event_manager_rating_showcase_admin_notices_dismiss','0');\n\t\t\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "63b0ac19c47cad2998842e455da66cdb", "score": "0.7306886", "text": "function register_activation_hook(){\n\t}", "title": "" }, { "docid": "f96b88c874bf5da386f150dea20c3b1e", "score": "0.7297466", "text": "function abs_activate_plugin() {\n \n // setup custom database tables\n abs_creat_tble();\n \n\n \n}", "title": "" }, { "docid": "b772cffacbbc404d888fc9050f26ed3f", "score": "0.7289524", "text": "public static function activate() {\n\n\t\t// Check for skelet compatibility\n\t\tif ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {\n\t\t\tdeactivate_plugins( plugin_basename( dirname( __FILE__ ) ) );\n\t\t\twp_die( 'The plugin requires PHP 5.3 and above to function.' );\n\t\t}\n \t}", "title": "" }, { "docid": "d6394729a2e7b7797ea02c3e2eaad492", "score": "0.72835463", "text": "public static function activate()\r\n {\r\n global $MY_BOOTSTRAP_MENU_DEBUG;\r\n if (isset($MY_BOOTSTRAP_MENU_DEBUG)) $MY_BOOTSTRAP_MENU_DEBUG->MSG('Activating Plugin');\r\n }", "title": "" }, { "docid": "5a44820151b16054d913cbcac322bf6b", "score": "0.7264261", "text": "public static function installPlugin() {\n\t\tself::runInstall();\n\t\t// set variable to check for on activation\n\t\tupdate_option('wpifw_activated', 1);\n\t}", "title": "" }, { "docid": "6441ae9d9dbbc003ba14fac5a5c48438", "score": "0.72623473", "text": "function plugin_new_activate() {\n\t\\Pdfw\\Classes\\Activate::activate();\n}", "title": "" }, { "docid": "80bcbb4d8aa0b4b254726796edf896fb", "score": "0.72597575", "text": "public function plugin_activation() {\n\t\t$this->story_init();\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "5f036a94763e7b4cd18260f700f894b7", "score": "0.72553843", "text": "function on_activate() {\n }", "title": "" }, { "docid": "5435dbd02b928482434fdc1b47fcc9ce", "score": "0.72204316", "text": "function waltzsoft_plugin_activation() {\n\t\t$plugins = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'Redux Framework',\n\t\t\t\t'slug' => 'redux-framework',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Auto Post Thumbnail',\n\t\t\t\t'slug' => 'auto-post-thumbnail',\n\t\t\t\t'required' => false\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TinyMCE Advanced',\n\t\t\t\t'slug' => 'tinymce-advanced',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Wordpress Importer',\n\t\t\t\t'slug' => 'wordpress-importer',\n\t\t\t\t'required' => false\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'WP User Avatar',\n\t\t\t\t'slug' => 'wp-user-avatar',\n\t\t\t\t'required' => true\n\t\t\t)\n\t\t);\t\n\t\t// Thiet lap TGM\n\t\t$configs = array(\n\t\t\t'id' => 'tmgpa',\n\t\t\t'menu' => 'tgmpa_plugin_installs',\n\t\t\t'has_notice' => true,\n\t\t\t'dismissable' => false,\n\t\t\t'is_automatic' => true\n\t\t);\n\t\ttgmpa( $plugins, $configs );\n\t}", "title": "" }, { "docid": "4333255e7581487d98075aab4275c7cd", "score": "0.7198832", "text": "public function track_jetpack_activate()\n {\n }", "title": "" }, { "docid": "46f9e60ae9e374c62e9982efbcd87f4e", "score": "0.718294", "text": "function activate_alecaddd_plugin() {\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "30f4e412a5dbfe28b9fb218b7e257090", "score": "0.7181614", "text": "function activate(){\n\t\t// Although the cpt fn will be called with init but still to avoid any accidental failure lets call this fn on plugin activation\n\t\t// custom_post_type(); // can't be called like this since it is OOP\n\t\t$this->custom_post_type();\n\t\t// echo 'The plugin was activated successfully'; // This will create header already sent error\n\t\t// generate a CPT\n\t\t// flush rewrite rules\n\t\tflush_rewrite_rules(); // all archives, posts etc related to our new cpt will automatically work // global fn\n\t}", "title": "" }, { "docid": "e503118979e1e8218af0d1aff36f7c0c", "score": "0.7174488", "text": "function activate_mplugin() {\n\trequire_once MPLUGIN__PLUGIN_DIR . 'inc/class.mplugin-activator.php';\n\t$activate = new Mplugin_Activator();\n\t$activate->activate();\n\n}", "title": "" }, { "docid": "4b84febf0505424cf02bf5b51d8cf6e5", "score": "0.716144", "text": "public function activationHook() {\r\n\t\tdo_action( 'kt_data_installer_activation_hook' );\r\n\t}", "title": "" }, { "docid": "8b61ed09109b211dd00f0e065fec20ce", "score": "0.71490735", "text": "private function setupActivationHooks()\n {\n register_activation_hook( $this->pluginFile, [ $this, 'createSchedule' ] );\n register_deactivation_hook( $this->pluginFile, [ $this, 'clearCronSchedule' ] );\n }", "title": "" }, { "docid": "40c7a1ac2abc4defdaa9d2d177176f25", "score": "0.71437263", "text": "function my_plugin_activation() {\n $plugins = array(\n array(\n 'name' => 'Redux Framework',\n 'slug' => 'redux-framework',\n 'required' => true,\n 'version' => '3.6.4',\n ), \n array(\n 'name' => 'Contact form 7', // The plugin name\n 'slug' => 'contact-form-7', // The plugin slug (typically the folder name)\n 'required' => true, // If false, the plugin is only 'recommended' instead of required\n ), \n );\n \n // Thiet lap TGM\n $configs = array(\n 'menu' => 'fr_plugin_install',\n 'has_notice' => true,\n 'dismissable' => false,\n 'is_automatic' => true\n );\n tgmpa( $plugins, $configs );\n }", "title": "" }, { "docid": "9d2b43efe5d3f86acc3d3964f2d3f83e", "score": "0.7136075", "text": "public function activate_plugin() {\n\t\t$this->create_developer_role();\n\t\t$this->create_dashboard_page();\n\t}", "title": "" }, { "docid": "9b8352b1cd3e90b7fbbb3d539a255399", "score": "0.71158", "text": "public static function activate() {\n\t\t\n\t}", "title": "" }, { "docid": "02b2d364c3d53dac6f8ef3b9754c6a90", "score": "0.71018463", "text": "public static function plugin_activation()\n\t{\n\t\t// include nag class\n\t\trequire_once(DCM_PLUGIN_CLASSES . '/digitsol-custom-navwalker.php');\n\t}", "title": "" }, { "docid": "b36e1b87d782612a7df78c13d6b8bb8e", "score": "0.7101809", "text": "function orgnk_jobs_activate_plugin() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'inc/class-activator.php';\n\tOrganik_Jobs_Activator::activate();\n}", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.70988715", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.70988715", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "fcf9bbfb8ed836bdedd2b195f2de0705", "score": "0.7091076", "text": "function pmpro_custom_activate() {\n\n add_option( 'Activated_Plugin', 'PMRPO-Custom' );\n \n /* activation code here */\n}", "title": "" }, { "docid": "8502fdeaed7fa1bc7154c9b634afaa58", "score": "0.708773", "text": "public function activate_plugin() {\n require_once(PCUSU_PLUGIN_DIR . 'classes/PingFmCustomUrlUpdater.php');\n\n $updater = new PingFmCustomUrlUpdater();\n $updater->check_need_upgrade();\n\n $this->register_custom_post_type();\n\n add_filter('rewrite_rules_array', array($this, 'insert_rewrite_rules'));\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "025efd7413d47236a543ecbff67d044d", "score": "0.7081572", "text": "function activate() {\n\t\t$wp_path_to_this_file = preg_replace('/(.*)plugins\\/(.*)$/', WP_PLUGIN_DIR.\"/$2\", __FILE__);\n\t\t$this_plugin = plugin_basename(trim($wp_path_to_this_file));\n\t\t$active_plugins = get_option('active_plugins');\n\t\t$this_plugin_key = array_search($this_plugin, $active_plugins);\n\t\tif ($this_plugin_key !== false) { \n\t\t\tarray_splice($active_plugins, $this_plugin_key, 1);\n\t\t\tarray_push($active_plugins, $this_plugin);\n\t\t\tupdate_option('active_plugins', $active_plugins);\n\t\t}\n\t}", "title": "" }, { "docid": "9a4c96731db14eaf6758c3641fd7d74c", "score": "0.70627594", "text": "public static function activated() {\n\n\t}", "title": "" }, { "docid": "a93f9b654fa6bd136439e2e5cff4e8a3", "score": "0.70616347", "text": "public static function activate() {}", "title": "" }, { "docid": "82cb67f8711f2502b94622879f3a331c", "score": "0.70598614", "text": "public static function activate()\n {\n\n }", "title": "" }, { "docid": "2939a26e65f1d85867f8065d4fcb8e7a", "score": "0.7046712", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "2939a26e65f1d85867f8065d4fcb8e7a", "score": "0.7046712", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "dd7a427186f286870fdc0d498bbb8b54", "score": "0.70455897", "text": "public function pluginActivate(){ \n //call our custom content type function\n $this->registerNewContentType(); \n //flush permalinks\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "309d363dc4653f6d0f13fd680b4f78cd", "score": "0.70410234", "text": "function bbps_activate() {\n\tregister_uninstall_hook( __FILE__, 'bbps_uninstall' );\n\t//Load text domain\n\t//load_plugin_textdomain( 'bbps', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\tload_plugin_textdomain( 'bbps-forum', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t//include the options page now so we can save the options on activation.\n\tinclude_once( plugin_dir_path(__FILE__).'includes/bbps-core-options.php' );\n\tdo_action( 'bbps-activation' );\n}", "title": "" }, { "docid": "5f7abc7997d568d9ae3c5e4a22517cab", "score": "0.70393205", "text": "function activate_phu_plugin()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/PhuPluginActivator.php';\n PhuPluginActivator::activate();\n}", "title": "" }, { "docid": "5a26d2983a56f58c74be88984d7255f6", "score": "0.7037741", "text": "public function activate_plugin()\n {\n require_once AFMetaPluginRoot.'af_meta_options_install.php';\n $installor = new AFMetaOptionsSetup($this->version, $this->table_name);\n $installor->activate_plugin();\n }", "title": "" }, { "docid": "7078b8404904f559db5e5a83e7a2721a", "score": "0.7035617", "text": "function slb_activate_plugin() {\n\n\t//setup custom database table\n\tslb_create_pliguin_tables(); \n}", "title": "" }, { "docid": "98c3558cc65d30797ea3e12b9bba8293", "score": "0.70355284", "text": "public function activate(): void\n {\n $this->initWpHooks();\n }", "title": "" }, { "docid": "b7c458aaf619c2c7b802f9a4228bccda", "score": "0.703244", "text": "public function on_plugin_activation( $network_wide ) {\n\t\t$this->run_upgrades();\n\t}", "title": "" }, { "docid": "81bb0b144e8176b00d34c5052ac7a116", "score": "0.7030261", "text": "public function init(){\n\n\t\t$this->constants();\n\t\t$this->includes();\n\n\t\tadd_action( 'admin_notices', array( $this, 'check_required_plugins' ) );\n\n\t\t// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\t\tregister_uninstall_hook( __FILE__, array( __CLASS__, 'uninstall' ) );\n\n\t}", "title": "" }, { "docid": "62906e3f8f1d92406d40e67ca91fb84a", "score": "0.70294964", "text": "function plugin_activation() {\r\n\t\t$this->staff_init();\r\n\t\tflush_rewrite_rules();\r\n\t}", "title": "" }, { "docid": "8b1907e1ba3510e5a98c964348807270", "score": "0.7026281", "text": "public static function activate() {\n\n\t\t\n\t}", "title": "" }, { "docid": "1bdbb84c47e8bcd99fe25d2d3d8c938f", "score": "0.70243937", "text": "function activate( $pluginFile ) {\n\t\t\t\tregister_activation_hook(\n\t\t\t\t\t$pluginFile, array( $this, 'onActivate' )\n\t\t\t\t);\n\t\t\t}", "title": "" }, { "docid": "72e08288b4f92a9c39c52481c11fa169", "score": "0.7021344", "text": "public static function on_plugin_activation(){\n self::remove_user_roles();\n self::add_user_roles();\n }", "title": "" }, { "docid": "e295a934eaec17e4eab7f3615165f00e", "score": "0.701526", "text": "function __construct(){\n register_activation_hook(__FILE__,array($this, 'activate_plugin'));\n\n /* The deactivation hook is executed when the plugin is deactivated */\n register_deactivation_hook(__FILE__,array($this, 'deactivate_plugin'));\n\n add_action('wpsc_init',array($this,'wpsc_init'));\n }", "title": "" }, { "docid": "391e729713a3281e66a799e160e9fa46", "score": "0.7012867", "text": "public function bootstrap(){\n\t\t\\register_activation_hook( __FILE__, array( $this, 'activate' ) );\n\n\t}", "title": "" }, { "docid": "4a4f146e2021a994a04ad13ea4636757", "score": "0.700229", "text": "public static function init() {\n\n\t\tadd_action( 'plugins_loaded', array( self::get_instance(), 'setup' ) );\n\n\t}", "title": "" }, { "docid": "ea5a15293ab2add1b0a74f24cce25645", "score": "0.6997856", "text": "function activate_plugin($name)\n{\n return Plugins::instance()->activate_plugin($name);\n}", "title": "" }, { "docid": "685925c78cfe719dd040ae5569e6648c", "score": "0.69961286", "text": "public function on_plugins_loaded()\n {\n }", "title": "" }, { "docid": "be4421f76b9dd74501a1a1cd4f3a9491", "score": "0.6972798", "text": "public function init() {\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\t\t// Required plugins\n\t\tadd_action( 'tgmpa_register', array( $this, 'required_plugins' ) );\n\t\t// Do the things\n\t\tadd_action( 'rest_api_init', \t array( $this, 'register_rest_endpoint' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );\n\t}", "title": "" }, { "docid": "878d7715c6c6bb56026b5e69f583d8af", "score": "0.6969435", "text": "function emwi_activation()\n{\n require_once(trailingslashit(plugin_dir_path(__FILE__) . 'includes') . 'class-emwi-installer.php');\n EMWI_Installer::install();\n\n //emwi_schedule_anything();\n}", "title": "" }, { "docid": "4211b5473413430687da37c0d4c40ce6", "score": "0.6964033", "text": "public function activatePlugin()\n\t{\n\t\tif( !$this->isPluginReady ) {\n\t\t\t$this->deleteLangsOption();\n\t\t} else {\n\t\t\t$locales = $this->getLocales();\n\t\t\t$this->updateLangsOption( $locales );\n\t\t}\n\t}", "title": "" }, { "docid": "94f3b79176af4d10397e8ed309da0265", "score": "0.69371873", "text": "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\t}", "title": "" }, { "docid": "7b4ba95af8eed7b51d591145bccecb22", "score": "0.69280255", "text": "static function activate() {\n\t\t}", "title": "" }, { "docid": "227dd0837fbea1b7638548fdeee0f3be", "score": "0.691957", "text": "function activate()\n\t{\n\t\tparent::activate();\n\t\t\n\n\t\tdo_action( $this->WPB_PREFIX.'_activate' );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "85ed99dfe0c68e64da0a2cc6b2c62dc7", "score": "0.690971", "text": "function activate_oop_plugin()\n{\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "385b95fa442aac7aaf2ac07f13c27562", "score": "0.6898296", "text": "function activate() {}", "title": "" }, { "docid": "12f2f3e5fb1e07f95b91e42a113560b6", "score": "0.68949217", "text": "function plugin_activation() {\n global $wpdb;\n if ( is_multisite() ) {\n $current_blog = $wpdb->blogid;\n // Get all blogs in the network and activate plugin on each one\n $blog_ids = $wpdb->get_col( \"SELECT blog_id FROM $wpdb->blogs\" );\n foreach ( $blog_ids as $blog_id ) {\n switch_to_blog( $blog_id );\n if( !get_option( APSL_SETTINGS ) ) {\n include( 'inc/backend/activation.php' );\n }\n }\n }else{\n if( !get_option( APSL_SETTINGS ) ) {\n include( 'inc/backend/activation.php' );\n }\n }\n //install database\n self:: apsl_database_install();\n\n }", "title": "" }, { "docid": "659eda9305e122b414d0ac39aadc103d", "score": "0.68938404", "text": "public function plugin_activate_hook() {\n add_option('wc_sales_notification_do_activation_redirect', true);\n }", "title": "" }, { "docid": "639ce383b63e5ddec906e7f699791358", "score": "0.689194", "text": "public function activate() {\n\t\t$installed = get_option( 'wepen_installed' );\n\n\t\tif ( ! $installed ) {\n\t\t\tupdate_option( 'wepen_installed', time() );\n\t\t}\n\n\t\tupdate_option( 'wepen_version', WEPEN_VERSION );\n\n\t\tif ( ! wp_next_scheduled( 'wepen_cron_hook' ) ) {\n\t\t\twp_schedule_event( time(), 'daily', 'wepen_cron_hook' );\n\t\t}\n\t}", "title": "" }, { "docid": "114e104089ee2d14f87cae76f2ba9334", "score": "0.68757814", "text": "function activate() {\n install();\n}", "title": "" }, { "docid": "67990e6355e7507ec308b3283aa81c37", "score": "0.6863227", "text": "public function plugin_setup() {\n\t\t// Register autoloader.\n\t\tspl_autoload_register( array( $this, 'autoload' ) );\n\t}", "title": "" }, { "docid": "243a10aa41e46d848fb7b96cdfe2311a", "score": "0.6862866", "text": "public function activated(string $plugin_name);", "title": "" }, { "docid": "278f9bcb06ead1f797ed6b07db25b0f1", "score": "0.6859339", "text": "function glome_plugin_activate()\n{\n add_option('glome_plugin_do_activation_redirect', true);\n\n if (! function_exists ('register_post_status'))\n {\n deactivate_plugins(basename(dirname(__FILE__)) . '/' . basename(__FILE__));\n exit;\n }\n update_option('glome_plugin_activation_message', 0);\n\n // check and set the Glome API domain\n // the function will sanitize the value; see glome_api.php\n $domain = get_api_domain();\n}", "title": "" }, { "docid": "2da9d1652d096c3796c1302ad71bd138", "score": "0.68533677", "text": "public function init_plugin() {\n $this->init_hooks();\n }", "title": "" }, { "docid": "e8fc30e45dd8b6eaffb867a4757ed5ed", "score": "0.6846242", "text": "function activate_volunteer_management_and_tracking() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-volunteer-management-and-tracking-activator.php';\n Volunteer_Management_And_Tracking_Activator::activate();\n}", "title": "" }, { "docid": "db62d1297be471c63b3a89d054777c7d", "score": "0.6837209", "text": "function register_activation() {\r\n\t\tReg::inst()->register_activation_hooks();\r\n\t}", "title": "" }, { "docid": "b0c9c0dd9565c523eab08b57a4864c7d", "score": "0.68344754", "text": "function upactivate() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/file.php' );\n \n\t\t// activate pre-bundled plugins\n\t\tdelete_plugins( ['akismet/akismet.php'] );\n activate_plugin( 'advanced-custom-fields-pro/acf.php' );\n activate_plugin( 'advanced-custom-fields-font-awesome/acf-font-awesome.php' );\n activate_plugin( 'contact-form-7/wp-contact-form-7.php' );\n activate_plugin( 'regenerate-thumbnails/regenerate-thumbnails.php' );\n activate_plugin( 'wp-pagenavi/wp-pagenavi.php' );\n activate_plugin( 'wordpress-seo/wp-seo.php' );\n\t}", "title": "" }, { "docid": "c5dfcfbe7f4176bba9855626fc410558", "score": "0.6814524", "text": "function activate_captaincore() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-captaincore-activator.php';\n\tCaptaincore_Activator::activate();\n}", "title": "" }, { "docid": "0a257259e0c36404c81113c8fa613add", "score": "0.6798933", "text": "function activate_once() {\n\t\t\n\t}", "title": "" }, { "docid": "89a25378554e55aa4ff4ebdd8fd34104", "score": "0.6798534", "text": "public function activated_plugin($filename)\n {\n }", "title": "" }, { "docid": "8ad1c34547662220e7466608ddbc760b", "score": "0.67937756", "text": "public static function activated_plugin($filename)\n {\n }", "title": "" }, { "docid": "a724c43b0ae31ff828031f08bbfd00ef", "score": "0.6786617", "text": "function activate_workshopwpd_plugin() {\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "6323ca357034c32b4853607daf7ec0cd", "score": "0.6785491", "text": "private function pluginInit()\n\t{\n\t}", "title": "" }, { "docid": "abbb4dd1aed89c9c8c499a181de22f7a", "score": "0.67752194", "text": "public function __construct() {\n\n register_activation_hook( __FILE__, [ $this, 'activate' ] );\n register_deactivation_hook( __FILE__, [ $this, 'deactivate' ] );\n // Localize our plugin\n add_action( 'init', array( $this, 'localization_setup' ) );\n add_action( 'erp_loaded', [$this, 'init_plugin'] );\n }", "title": "" }, { "docid": "75045fcc68f46be285f6f43bb02444ad", "score": "0.6775178", "text": "function activation() {\n\t\t$this->set_up_database();\n\t\t$this->cron_job_registration();\n\t}", "title": "" }, { "docid": "15be40e40816ab6a9cd8748d7bda9aec", "score": "0.6768471", "text": "public function on_activation() {\n\t\t// even though this should only run when first installed, still check to see if there is a scheduled\n\t\t// cron job called 'auto_expire_event_hook'. if so, don't add.\n\t\tif ( ! wp_next_scheduled( 'auto_expire_event_hook' ) ) {\n\t\t\twp_schedule_event( time(), 'hourly', 'auto_expire_event_hook' );\n\t\t\t// run every hour (not really needed now, but later we may expire events with more granularity)\n\t\t}\n\t}", "title": "" }, { "docid": "1af9031d732e28a9e2c8228b6c2eddfb", "score": "0.67671484", "text": "function activation_hook() {\n\t\t// Kill activation if requirements not met and auto deactivate is true\n\t\tif ($this->auto_deactivate_sans_requirements && !$this->required_plugins_active) {\n\t\t\t$message = '';\n\n\t\t\tforeach ($this->admin_notices as $admin_notice) {\n\t\t\t\t$message .= __(esc_html($admin_notice['message']), $this->text_domain) . '<br>';\n\t\t\t}\n\n\t\t\tdie('<strong>' . $this->plugin_name . '</strong>: <br>' . $message);\n\t\t}\n\t}", "title": "" }, { "docid": "22175219d9ecb50a2e5b6541c01ef40b", "score": "0.6764786", "text": "public static function activate()\n {\n self::check_php_version_compatibility();\n self::check_wp_version_compatibility();\n\n self::init_db();\n self::add_default_options();\n }", "title": "" }, { "docid": "f912775e5bcee4ff50bb509870c338cb", "score": "0.6760364", "text": "public function activate()\n {\n if (Manager::getInstance()->isPluginActivated(\"Login\") == true) {\n Manager::getInstance()->deactivatePlugin(\"Login\");\n }\n }", "title": "" }, { "docid": "093774db22f758837601a982ab90836c", "score": "0.67560196", "text": "public function trigger_activate_plugin($name)\n {\n // Call plugin activate function\n @call_user_func($name.\"_activate\");\n }", "title": "" }, { "docid": "86f4be16c344fa32d44c2a6331ff3b82", "score": "0.67539185", "text": "public function init_hooks() {\n\n\t\t/*\n\t\t * Activation Plugin Hook\n\t\t */\n\t\tregister_activation_hook( __FILE__, array( '\\WP_PLUGIN\\config\\install', 'run_install' ) );\n\n\t\t/*\n\t\t * Uninstall Plugin Hook\n\t\t */\n\t\tregister_deactivation_hook( __FILE__, array( '\\WP_PLUGIN\\config\\uninstall', 'run_uninstall' ) );\n\n\t\t/*\n\t\t * Load i18n\n\t\t */\n\t\tif ( self::$use_i18n === true ) {\n\t\t\tnew \\WP_PLUGIN\\config\\i18n( 'wp-plugin' );\n\t\t}\n\n\t\t//Check $ENVIRONMENT Mode\n\t\tif ( self::$ENVIRONMENT == \"development\" ) {\n\t\t\tinclude_once dirname( __FILE__ ) . '/inc/core/debug.php';\n\t\t\tnew \\WP_PLUGIN\\core\\debug();\n\t\t}\n\n\t}", "title": "" }, { "docid": "2861612c16b9d89e6d61aeb0fb84d995", "score": "0.67465675", "text": "public function loaded()\n {\n add_action('jetpack_activate_module', array($this, 'on_jetpack_activate_module'), 10, 2);\n add_action('jetpack_deactivate_module', array($this, 'on_jetpack_deactivate_module'), 10, 2);\n }", "title": "" }, { "docid": "231af1f78f3b51b4b482361a1acebc6b", "score": "0.6745305", "text": "private function activate(){\n\n\n\t\t}", "title": "" }, { "docid": "56227b48f51ae48239fe2b0f85b4df48", "score": "0.67406654", "text": "static function on_activate() {\n\t\t/**\n\t\t * Verify the WordPress version.\n\t\t */\n\t\tglobal $wp_version;\n\t\tif ( version_compare( $wp_version, '4.5', '<' ) ) { // TODO: Move the magic string.\n\t\t\twp_die( \"This plugin requires WordPress version 4.5 or higher.\" );\n\t\t}\n\n\t\t/**\n\t\t * Create (or update) the database.\n\t\t */\n\t\tif(Plugin::USES_CUSTOM_TABLES){ // If the plugin uses custom tables at all, let's get to work...\n\t\t\t// If the tables haven't been installed...\n\t\t\tif(!Tables::areInstalled()){\n\t\t\t\t// ...create them now.\n\t\t\t\tTables::create();\n\t\t\t}\n\t\t\telse if(!Tables::areUpToDate()){ // If they've been installed, but aren't up to date...\n\t\t\t\t// ...upgrade them.\n\t\t\t\tTables::upgrade();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Set up the plugin's page.\n\t\t */\n\t\t// What's the name of the plugin's page?\n\t\t$pagename = Plugin::get_base_name('-');\n\t\t// Has the plugin already created the page?\n\t\t$page = Plugin::get_page_by_name( $pagename );\n\t\t// If not...\n\t\tif ( empty( $page ) ) {\n\t\t\t// ...let's do so now.\n\t\t\t$shortcode = Plugin::get_base_name('-'); // The content of the post is just the shortcode.\n\t\t\t$new = array(\n\t\t\t\t'post_name' => $pagename,\n\t\t\t\t'post_title' => Plugin::$page_title,\n\t\t\t\t'post_content' => '[' . $shortcode . ']',\n\t\t\t\t// The content is just an instance of the short code.\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'post_type' => 'page'\n\t\t\t);\n\t\t\twp_insert_post( $new, true );\n\t\t} else {\n\t\t\t// Otherwise, make sure it's \"published\".\n\t\t\t$update = array(\n\t\t\t\t'ID' => $page->ID,\n\t\t\t\t'post_status' => 'publish'\n\t\t\t);\n\t\t\twp_update_post( $update );\n\t\t}\n\t}", "title": "" } ]
1f60bc20c6337ac259be022fa05ca7e8
////// get data from token ////////////
[ { "docid": "1636adc5b8f880fa09cb691a79a3b2c6", "score": "0.74749345", "text": "public function GetTokenData()\n {\n $received_Token = $this->input->request_headers('Authorization');\n try\n {\n $jwtData = $this->objOfJwt->DecodeToken($received_Token['Token']);\n echo json_encode($jwtData);\n }\n catch (Exception $e)\n {\n http_response_code('401');\n echo json_encode(array( \"status\" => false, \"message\" => 'Token incorrect'));\n exit;\n }\n }", "title": "" } ]
[ { "docid": "bacc95bf9012bc1aed94e7b35e898875", "score": "0.7799785", "text": "public function GetToken($data){ \n \n return $this->token;\n \n }", "title": "" }, { "docid": "70b63b6a1bbb204999c7be5312363659", "score": "0.73074114", "text": "public function readToken() {}", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.7276129", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.7276129", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.7276129", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.7276129", "text": "public function getToken();", "title": "" }, { "docid": "b1893eb70e008c8b9f373592c97a6980", "score": "0.7260552", "text": "public final function get($token)\n {\n }", "title": "" }, { "docid": "85c2a42a156b0e721688fdce58695d93", "score": "0.7161567", "text": "function read($token);", "title": "" }, { "docid": "2815b82116b48b7f778b04f22b7ec77d", "score": "0.7097696", "text": "public function GetTokenData()\n {\n $received_Token = $this->input->request_headers('Authorization');\n if (isset($received_Token['Token'])) {\n try\n {\n $jwtData = $this->tokenHandler->DecodeToken($received_Token['Token']);\n return json_encode($jwtData);\n }\n catch (Exception $e)\n {\n http_response_code('401');\n echo json_encode(array( \"status\" => false, \"message\" => $e->getMessage()));\n exit;\n }\n }else{\n echo json_encode(array( \"status\" => false, \"message\" => \"Invalid Token\"));\n }\n }", "title": "" }, { "docid": "e5e4fbd2309d9cd767115745ffac52d5", "score": "0.69596595", "text": "public function data()\n {\n return [\n 'token' => $this->token\n ];\n }", "title": "" }, { "docid": "fcc5917dbe1d5f6b62a27dbd36457e9e", "score": "0.6941674", "text": "public function getToken ()\n {\n return $this->token;\n }", "title": "" }, { "docid": "cb5c96e5033980c2d15e529ac18a05f5", "score": "0.6871532", "text": "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "title": "" }, { "docid": "d47e9c7b2e893a08556d4b98eff59c12", "score": "0.6850668", "text": "public function getToken(): string;", "title": "" }, { "docid": "d47e9c7b2e893a08556d4b98eff59c12", "score": "0.6850668", "text": "public function getToken(): string;", "title": "" }, { "docid": "d47e9c7b2e893a08556d4b98eff59c12", "score": "0.6850668", "text": "public function getToken(): string;", "title": "" }, { "docid": "d47e9c7b2e893a08556d4b98eff59c12", "score": "0.6850668", "text": "public function getToken(): string;", "title": "" }, { "docid": "146c3f6a8526092771329ddcf42e5ff0", "score": "0.6817459", "text": "public function getToken() {\n return $this->token;\n }", "title": "" }, { "docid": "fce42933cb0e924440569b86eb7c531c", "score": "0.680828", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "5e70670154de63382dfdbf601e375a25", "score": "0.6793848", "text": "public function getToken()\r\n {\r\n return $this->token;\r\n }", "title": "" }, { "docid": "5e70670154de63382dfdbf601e375a25", "score": "0.6793848", "text": "public function getToken()\r\n {\r\n return $this->token;\r\n }", "title": "" }, { "docid": "5d993893955b86e853943d4de9043607", "score": "0.6780379", "text": "public function ReadToken($token) {\r\n\t\t$sql = \"\r\n\t\tSELECT * FROM redefinicao_senha WHERE = '$token'\";\t\t\r\n\t\t\r\n\t\t$DB = new DB();\r\n\t\t$DB->open();\r\n\t\t$Data = $DB->fetchData($sql);\r\n\t\t\r\n\t\t$DB->close();\r\n\t\treturn $Data[0]; \r\n\t}", "title": "" }, { "docid": "6029e1beefecec9d5c511e598f0f9c75", "score": "0.6763532", "text": "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "title": "" }, { "docid": "bd85219f86ff3371e8bb595848c802f0", "score": "0.6732189", "text": "public function getToken()\n\t{\n\n\t}", "title": "" }, { "docid": "77b1d3ddda3aadd2c9a4f0f60aada49a", "score": "0.6699725", "text": "function decode_get() {\n $token = $this->head('Token');\n $auth = $this->head('Auth');\n $resp = array();\n\n if ($token) {\n $tokendt = JWT::decode($token, $this->config->item('jwt_key'));\n $resp['token'] = $tokendt;\n }\n\n if ($auth) {\n $authdt = JWT::decode($auth, $this->config->item('jwt_key'));\n $resp['auth'] = $authdt;\n }\n\n $this->response($resp, 200); \n }", "title": "" }, { "docid": "5ad74aa806cce4d34a453900b8559262", "score": "0.6678187", "text": "function getTokenData($request) {\n $authHeader = $request->getHeader('Authorization');\n list($jwt) = sscanf($authHeader[0], 'Bearer %s');\n $secretKey = base64_decode(jwt_key);\n $token = JWT::decode($jwt, $secretKey, jwt_algorithm);\n return ((array) $token->data);\n}", "title": "" }, { "docid": "92a3c4dff1142ccbab4aa80786f85393", "score": "0.6654129", "text": "public function get_token() {\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "8f8af9a4c534b0aa9c7c0844095ac7cb", "score": "0.66323185", "text": "public function getToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "18f71471c2cd69219de9c8cb23677571", "score": "0.6623681", "text": "public function userByToken();", "title": "" }, { "docid": "2c18c46f8ce3ee36edebab4adc5aa054", "score": "0.6615867", "text": "public static function getToken()\n {\n return isset(self::$_data[self::KEY_TOKEN]) ? self::$_data[self::KEY_TOKEN] : NULL;\n }", "title": "" }, { "docid": "4c35115d03a4b2ad4c1a90a7a50ba9f4", "score": "0.6612959", "text": "public function getToken() {\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "0cbb00b007019017b11fb8defa0a2252", "score": "0.6608626", "text": "public function read($idtoken);", "title": "" }, { "docid": "148d8aee9ea92c184b673e5882db9174", "score": "0.66031253", "text": "public function getToken() {\n return $this->token;\n }", "title": "" }, { "docid": "5bdffb9be442c09b10e829ab03dc6170", "score": "0.66028106", "text": "abstract public function getAuthToken();", "title": "" }, { "docid": "1ba8956db13bf123e50fc6c1b000a104", "score": "0.6598164", "text": "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "title": "" }, { "docid": "dba65a55592fdfc53598a907afcc2b03", "score": "0.6587391", "text": "public function getToken() {\n\t\treturn $this->_token;\n\t}", "title": "" }, { "docid": "92cfa809bd48a75a5699251b1c3f37fb", "score": "0.65789634", "text": "public function getToken()\n\t{\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "efe9f7333416c8cfdd550f067496bd9b", "score": "0.65322846", "text": "public function fetchToken($token)\n {\n $Sql = \"SELECT * FROM `db_token` WHERE jwt_token = :jwt_token\";\n Parent::query($Sql);\n Parent::bindParams('jwt_token', $token);\n\n $Data = Parent::fetch();\n if (!empty($Data)) {\n return array(\n 'status' => true,\n 'data' => $Data\n );\n }\n\n return array(\n 'status' => false,\n 'data' => []\n );\n }", "title": "" }, { "docid": "0bad8041e4b5ed3cad50fba42971f848", "score": "0.6517523", "text": "public function LoginToken_get()\n {\n $tokenData['user_id'] = '1';\n $tokenData['role'] = 'admin';\n $tokenData['first_name'] = 'Al';\n $tokenData['last_name'] = 'Mobin';\n $tokenData['phone'] = '+8801921040960';\n $jwtToken = $this->tokenHandler->GenerateToken($tokenData);\n $token = $jwtToken;\n echo json_encode(array('Token'=>$jwtToken));\n }", "title": "" }, { "docid": "589d924a1ebf6a0c0736b72cba470f0c", "score": "0.6504704", "text": "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "title": "" }, { "docid": "5a280c019e49b66a80ad60ffd18d3d83", "score": "0.6490819", "text": "private function _readValue($token) {}", "title": "" }, { "docid": "da3fdd8536bf4ee2f149e22717cd60d4", "score": "0.64891493", "text": "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "title": "" }, { "docid": "25ef768ecf5cf47b404688e9bfb1d831", "score": "0.6479581", "text": "public static function getTokenData() {\n\n\t\t$tokenData = [];\n\n\t\t$tokenData[SSOData::CLAIM_AUDIENCE] = 'testPlugin';\n\t\t$tokenData[SSOData::CLAIM_EXPIRE_AT] = strtotime('10 minutes');\n\t\t$tokenData[SSOData::CLAIM_NOT_BEFORE] = strtotime('-1 minute');\n\t\t$tokenData[SSOData::CLAIM_ISSUED_AT] = time();\n\t\t$tokenData[SSOData::CLAIM_ISSUER] = 'api.staffbase.com';\n\t\t$tokenData[SSOData::CLAIM_INSTANCE_ID] = '55c79b6ee4b06c6fb19bd1e2';\n\t\t$tokenData[SSOData::CLAIM_INSTANCE_NAME] = 'Our locations';\n\t\t$tokenData[SSOData::CLAIM_USER_ID] = '541954c3e4b08bbdce1a340a';\n\t\t$tokenData[SSOData::CLAIM_USER_EXTERNAL_ID] = 'jdoe';\n\t\t$tokenData[SSOData::CLAIM_USER_FULL_NAME] = 'John Doe';\n\t\t$tokenData[SSOData::CLAIM_USER_FIRST_NAME] = 'John';\n\t\t$tokenData[SSOData::CLAIM_USER_LAST_NAME] = 'Doe';\n\t\t$tokenData[SSOData::CLAIM_USER_ROLE] = 'editor';\n\t\t$tokenData[SSOData::CLAIM_ENTITY_TYPE] = 'user';\n\t\t$tokenData[SSOData::CLAIM_THEME_TEXT_COLOR] = '#00ABAB';\n\t\t$tokenData[SSOData::CLAIM_THEME_BACKGROUND_COLOR] = '#FFAABB';\n\t\t$tokenData[SSOData::CLAIM_USER_LOCALE] = 'en_US';\n\t\t$tokenData[SSOData::CLAIM_USER_TAGS] = ['profile:field1:val', 'profile:field2:val'];\n\n\t\treturn $tokenData;\n\t}", "title": "" }, { "docid": "bae513beba40a6b78d4687b2ce101796", "score": "0.6479087", "text": "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "bb7b711ef9ac607e2a70946d762d4631", "score": "0.6462047", "text": "function getAuthToken()\n {\n \treturn $this->_authToken;\n }", "title": "" }, { "docid": "68b67d66f87e416253d64d1efaba4167", "score": "0.6460434", "text": "public function token()\n {\n return $this->token['token'] ?? null;\n }", "title": "" }, { "docid": "873d76c0024a10bb110a3acc79ad096d", "score": "0.64428526", "text": "public function token()\n {\n return $this->metadata();\n }", "title": "" }, { "docid": "459cbd97db7758daa6dc3169520c5a01", "score": "0.6441686", "text": "private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}", "title": "" }, { "docid": "6e39d846fbc4cbc9f3d7a70891c3fea7", "score": "0.64378166", "text": "public function getTokenDetails($url, $token);", "title": "" }, { "docid": "ca2e4d9806c73b71c0810498bcfbb9ac", "score": "0.64242905", "text": "abstract protected function retrieveSessionToken() ;", "title": "" }, { "docid": "01b5a510e01b02e04d2488002d616dbc", "score": "0.64001405", "text": "abstract protected function getUserByToken($token): array;", "title": "" }, { "docid": "2b26a08c53610e3dd7c22a0538d03723", "score": "0.6386461", "text": "public function getAuthInfo($token) {\n \t$response = $this->requestApi->callAPI('POST', $this->requestUrl('/auth/me'),false, $token);\n \treturn $response;\n\t}", "title": "" }, { "docid": "4952d343f33520b39dfb3b996461b810", "score": "0.63793874", "text": "public function getUserTokens();", "title": "" }, { "docid": "e9c530f8e61499533e8e366ff05b7e8f", "score": "0.63469243", "text": "private function initTokenData() {\n $accessToken = \\Libs\\Util\\AccessTokenReader::instance($this->request);\n if (!$accessToken->isValid()) {\n return FALSE;\n }\n $this->tokenData = $accessToken;\n $this->access_token = $accessToken->token;\n $this->user_id = $accessToken->user_id;\n $this->client_id = $accessToken->client_id;\n $this->device_token = $accessToken->device_token == NULL ? '' : $accessToken->device_token;\n $this->imei = $accessToken->imei;\n $this->udid = $accessToken->udid;\n $this->mac = $accessToken->mac;\n $this->platform = $this->getPlatform();\n }", "title": "" }, { "docid": "166c75984d9c4ac065b0b181f56b0ee9", "score": "0.6338437", "text": "private function _getToken()\n {\n $postData = array(\n 'UserApiKey' => $this->username,\n 'SecretKey' => $this->password,\n 'System' => 'joomla_acy_3_5_v_3_0'\n );\n $postString = json_encode($postData);\n\n $ch = curl_init($this->apidomain.$this->getApiTokenUrl());\n curl_setopt(\n $ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json'\n )\n );\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n $response = json_decode($result);\n $resp = false;\n if (is_object($response)) {\n @$IsSuccessful = $response->IsSuccessful;\n if ($IsSuccessful == true) {\n @$TokenKey = $response->TokenKey;\n $resp = $TokenKey;\n } else {\n $resp = false;\n }\n }\n return $resp;\n }", "title": "" }, { "docid": "4c2e469d0bae283c1faf68080eebe48e", "score": "0.63377476", "text": "function &get_xoops_token()\n{\n\tif ( class_exists('XoopsMultiTokenHandler') )\n\t{\n\t\t$token =& XoopsMultiTokenHandler::quickCreate( $this->_TOKEN_NAME );\n\t\t$name = $token->getTokenName();\n\t\t$value = $token->getTokenValue();\n\t}\n\telse\n\t{\n\t\t$name = 'token';\n\t\t$value = 0;\n\t}\n\t$arr = array($name, $value);\n\treturn $arr;\n}", "title": "" }, { "docid": "6f502bfe799563c2471e77f420411025", "score": "0.6333804", "text": "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "title": "" }, { "docid": "c36c3acbf6069fc8830b40d329472278", "score": "0.63284427", "text": "public function getToken(): TokenInterface;", "title": "" }, { "docid": "c36c3acbf6069fc8830b40d329472278", "score": "0.63284427", "text": "public function getToken(): TokenInterface;", "title": "" }, { "docid": "e5e5f1c9478b13ead2c44e1f6ed98fad", "score": "0.6321886", "text": "public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }", "title": "" }, { "docid": "9c347661f5f1483c14120ea4e8b1da9d", "score": "0.63193643", "text": "abstract protected function getUserByToken($token);", "title": "" }, { "docid": "afe9cdc94006f612d08a68a7829890e1", "score": "0.63190806", "text": "public function retrieveByToken($identifier, $token){\n\n }", "title": "" }, { "docid": "977b8d7315fe15a7b82d14ec56156c7b", "score": "0.63086647", "text": "public function getTokenInfo() {\n\t\t\t$error = [\"error\" => \"invalid_token\"];\n\t\t\tif( !isset($_GET[\"access_token\"]) ) return $error;\n\t\t\t$token = $this->getAccessToken($_GET[\"access_token\"]);\n\t\t\tif( $token === NULL ) return $error;\n\t\t\t$client = $this->getClient($token[\"client_id\"]);\n\t\t\tif( $client === FALSE ) return $error;\n\t\t\treturn [\n\t\t\t\t\"audience\"\t=> $client[\"client_id\"],\n\t\t\t\t\"userid\"\t=> $client[\"user_id\"],\n\t\t\t\t\"scope\"\t\t=> $token[\"scope\"],\n\t\t\t\t\"expires\"\t=> $token[\"expires\"] - time()\n\t\t\t\t\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "ca23f3d2b7a0cd4ab441b503ac93597c", "score": "0.6307399", "text": "function retrieveAddressForToken()\n{\n $usertoken = $_SESSION['usertoken'];\n\n $payload = array(\n 'identifier' => $usertoken, //required\n );\n\n //this will return a jsonencoded array with a payment information about the user if found\n $endpoint = 'https://api.coinbee.io/retrieve/address/identifier';\n\n return doCurl($endpoint, $payload);\n}", "title": "" }, { "docid": "f2f0beede66730c005693c1f7e9ee518", "score": "0.6296759", "text": "public function ssoGetToken($token)\n {\n $apiEndpoint = '/1/session/'.$token;\n $apiReturn = $this->runCrowdAPI($apiEndpoint, \"GET\", array());\n if ($apiReturn['status'] == '200') {\n return $apiReturn['data']['token'];\n }\n return null;\n }", "title": "" }, { "docid": "3f418c92ae03ddbc8e4ac8f270089ecd", "score": "0.6295061", "text": "public function index()\n {\n $token=Request::input()[''];\n }", "title": "" }, { "docid": "2988b9d414fbf0312e060381544e4d95", "score": "0.6289058", "text": "function token(){\n return Request::session('internal_token');\n}", "title": "" }, { "docid": "d31f3eee70134d85bd8fd9af22309a9a", "score": "0.6288983", "text": "public function getToken(): string\n {\n return $this->token;\n }", "title": "" }, { "docid": "d31f3eee70134d85bd8fd9af22309a9a", "score": "0.6288983", "text": "public function getToken(): string\n {\n return $this->token;\n }", "title": "" }, { "docid": "d31f3eee70134d85bd8fd9af22309a9a", "score": "0.6288983", "text": "public function getToken(): string\n {\n return $this->token;\n }", "title": "" }, { "docid": "9987e1bf923d6235d2cfb8d0a576fe59", "score": "0.628696", "text": "public function getToken() {\n return $this->accessToken;\n }", "title": "" }, { "docid": "d1480a2015dacfd30a35f6613fca696e", "score": "0.6281132", "text": "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.62810403", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.62810403", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.62767804", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.62767804", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d5d14da9dfc76356970673257f881c54", "score": "0.6273393", "text": "public function retrieveByToken($token) {\n $id = $this->repository->decode($token)->getClaim('sub');\n \n return $this->retrieveById($id);\n }", "title": "" }, { "docid": "7541ab7249420fb8fd2d1749981c8f52", "score": "0.6271004", "text": "public function getToken() {\n\n\t\treturn $this->Token;\n\t}", "title": "" }, { "docid": "1726997db5a1e897027e027e36c9b96f", "score": "0.62671065", "text": "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c92584fc93154d755b2fd227eaa5f4db", "score": "0.6260114", "text": "private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}", "title": "" }, { "docid": "396a61f87f5e6af4a41273541c1517b7", "score": "0.6235308", "text": "private function get_token() {\n $uri = $this->settings->hostname.\"oauth/token\";\n //echo \"POST $uri\\n\";\n\n $data = array(\n \"grant_type\" => \"password\",\n \"client_id\" => $this->settings->client_id,\n \"client_secret\" => $this->settings->client_secret,\n \"username\" => $this->settings->username,\n \"password\" => $this->settings->password\n );\n $postdata = http_build_query($data);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/x-www-form-urlencoded'));\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n //echo $http_code.\"\\n\"; // output http status code\n\n curl_close($ch);\n $token = NULL;\n if ($http_code == 200) {\n $token = json_decode($curl_response);\n //var_dump($token); // print entire token object\n }\n return $token;\n }", "title": "" }, { "docid": "54677bc85eb1e49727a29ebe1fc2ab1e", "score": "0.6229427", "text": "public function retrieveByToken($identifier, $token){\n\t\t\n\t}", "title": "" }, { "docid": "f15817b15d45d9aeea3d3144bc9e70f0", "score": "0.6212967", "text": "public function getAuthDataFromResponse(): array;", "title": "" }, { "docid": "2608ad4ecf01b3213744e6027857fa24", "score": "0.6212908", "text": "public function getToken() : string {\n return $this->token;\n }", "title": "" }, { "docid": "744d83c044f41d06a8d67293d93e3001", "score": "0.62102735", "text": "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "title": "" }, { "docid": "cddf2188f86ad9098617fd696e97ce2e", "score": "0.6207611", "text": "public function get_request_token($callback);", "title": "" }, { "docid": "e7a6f5d1cb4f1a67552b71187541f545", "score": "0.6202448", "text": "function extract_access_token()\r\n{\r\n $header = $_SERVER['HTTP_AUTHORIZATION'];\r\n\r\n if ($header != null && preg_match('/^Bearer[ ]+(.+)/i', $header, $captured))\r\n {\r\n return $captured;\r\n }\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET')\r\n {\r\n return $_GET['access_token'];\r\n }\r\n else\r\n {\r\n return $_POST['access_token'];\r\n }\r\n}", "title": "" } ]
14f456bb5ccf554c014e9019af2e1e1a
Created by PhpStorm. User: Gebruiker Date: 432018 Time: 13:54
[ { "docid": "affa2f7c40170d6940a80f83e8d93ddd", "score": "0.0", "text": "function winstCalc ($a, $b){\n\n $minutenaLijn1 = 15;\n $minutenaLijn2 = 10;\n $minutenbLijn1 = 10;\n $minutenbLijn2 = 12;\n\n\n\n}", "title": "" } ]
[ { "docid": "8055020c5cdd5700075fcb1e2e4f7e34", "score": "0.6428461", "text": "function ________utils___________(){}", "title": "" }, { "docid": "22bae140fa7265016d7d6f2608f79b16", "score": "0.6141894", "text": "public function how_it_works(){\n\t\t\n\t}", "title": "" }, { "docid": "7ab73e8cb2c0babdfa7bdbdea1195143", "score": "0.61010516", "text": "private function upgrade_1591()\n {\n }", "title": "" }, { "docid": "900d95daa4673256fdf61e0bb64bf32b", "score": "0.60584134", "text": "private function upgrade_1911()\n {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.60473686", "text": "private function __() {\n }", "title": "" }, { "docid": "bd1eb215191232548b266acaf734ab12", "score": "0.60080296", "text": "private function __()\n {\n }", "title": "" }, { "docid": "d7015ee715630a1ee9faa153c5e56517", "score": "0.5937526", "text": "public function fornecedor();", "title": "" }, { "docid": "a6616f0de4c3a2ec33f58e2c49af602f", "score": "0.5882761", "text": "private function __construct ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "b939f62514db2d0ad67844ec0cb66b83", "score": "0.58724713", "text": "public function __construct() {\n\t\t;\n\t}", "title": "" }, { "docid": "d9dcb048a105274d7e32634a8705f3ff", "score": "0.58421606", "text": "private function upgrade_145()\n {\n }", "title": "" }, { "docid": "6688547035b17a16e3a1dbc95f5f69d2", "score": "0.5796486", "text": "private function upgrade_157()\n {\n }", "title": "" }, { "docid": "e3b0b5e571047af745681fafeb74919b", "score": "0.57949305", "text": "function __construct(){ //May not even be needed honestly.\n\n }", "title": "" }, { "docid": "dcf917738bba884de5b951b75e992a6f", "score": "0.578552", "text": "private function upgrade_63()\n {\n }", "title": "" }, { "docid": "34fd3986b54350a19892686272e3f9fa", "score": "0.5748523", "text": "private function upgrade_149()\n {\n }", "title": "" }, { "docid": "1996906b6e02b3d7fb418c17bc444ca4", "score": "0.57474506", "text": "private function upgrade_77()\n {\n }", "title": "" }, { "docid": "6bebcf1d3be2c29f88943346a016b0f0", "score": "0.5741981", "text": "private function upgrade_179()\n {\n }", "title": "" }, { "docid": "5ca1d4c14c62fe9427a47c2d7320d223", "score": "0.5741705", "text": "private function upgrade_1771()\n {\n }", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5711375", "text": "private function __construct () {}", "title": "" }, { "docid": "eab05314dee97d3237d06a72762b7633", "score": "0.56810427", "text": "public function __construct()\n\t{\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "86555a5ffa99017ec874f7c0dadaeeb1", "score": "0.5675535", "text": "public function bgrewriteaof() {}", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.56663144", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.56663144", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "4035e742ed1810ce710a2d8ca00bc253", "score": "0.5655084", "text": "private function __construct()\r\n {}", "title": "" }, { "docid": "4035e742ed1810ce710a2d8ca00bc253", "score": "0.5655084", "text": "private function __construct()\r\n {}", "title": "" }, { "docid": "2be480987f54f4187ce2b034bde9c5f6", "score": "0.5651289", "text": "private function __construct() {\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.56465954", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.56465954", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.56465954", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.5644343", "text": "private function __construct() { }", "title": "" }, { "docid": "e3783e5c3251d8c30f520ffe5407d276", "score": "0.5637244", "text": "private function __construct(){ }", "title": "" }, { "docid": "abb5f713358da5529853b6431479b471", "score": "0.5627673", "text": "private function upgrade_1403()\n {\n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5626907", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5626907", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5626907", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5626907", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5626907", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.561236", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.561236", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "fb76b3a53fbc9e552595fb36e96cdb87", "score": "0.5597495", "text": "private function __construct() {\n\t\n\t}", "title": "" }, { "docid": "dfa96017852e7b163b0619b83aa006ec", "score": "0.5589489", "text": "private function upgrade_753()\n {\n }", "title": "" }, { "docid": "778527224327c15785b049793c6e119d", "score": "0.55881256", "text": "private function __construct(){\r\n \r\n }", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5587523", "text": "private function __construct() {}", "title": "" } ]
9879cb6537f4cdd242204c89625c9b96
Called before layoutenabled entity view display entity has been saved.
[ { "docid": "26da556c4ed187df18230e91159c441c", "score": "0.6969019", "text": "protected function handleEntityViewDisplayPreSave(EntityViewDisplayInterface $entity) {\n if ($entity instanceof LayoutEntityDisplayInterface && empty($entity->handleEntityViewDisplayPreSaveSkip)) {\n $storage = [];\n $this->handleEntityViewDisplayPreSaveRecursive($entity->getSections(), $entity, $storage);\n if (!empty($storage)) {\n foreach ($entity->getThirdPartySettings('exo_alchemist') as $key => $serialized_block) {\n $entity->unsetThirdPartySetting('exo_alchemist', $key);\n }\n foreach ($storage as $key => $serialized_block) {\n $entity->setThirdPartySetting('exo_alchemist', $key, $serialized_block);\n }\n }\n // Make sure to clear out any temp storage we might have.\n $this->layoutTempstoreRepository->delete($this->getSectionStorageForEntity($entity));\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "3c2878519f49c1d6cd7dfd72cc34a53a", "score": "0.6664658", "text": "protected function handleLayoutEntityPreSave(EntityInterface $entity) {\n if (!empty($entity->exoAlchemistClone)) {\n $to_storage = $this->getSectionStorageForEntity($entity);\n $this->cloneComponents($to_storage);\n }\n if (!$entity->isNew()) {\n // Handle component creation and removal as implemented by the builder.\n if (!empty($entity->_exoComponent)) {\n foreach ($entity->_exoComponent as $view_mode => $data) {\n $builder = $this->getEntityBuilder($entity, $data['temporary'], $view_mode);\n if ($sections = $builder->getTemporaryValue('sections')) {\n $builder->doSave($sections);\n }\n if ($remove = $builder->getTemporaryValue('remove')) {\n foreach ($remove as $component) {\n $builder->doRemove($component);\n }\n }\n }\n unset($entity->_exoComponent);\n }\n if (!$entity instanceof LayoutEntityDisplayInterface) {\n $from_storage = $this->getSectionStorageForEntity($entity->original);\n $to_storage = $this->getSectionStorageForEntity($entity);\n\n // Remove all locked sections so that layout builder will not try to\n // duplicate them. They will be added back in dynamically.\n foreach (static::getLockedSections($to_storage->getSections()) as $section) {\n foreach ($section->getComponents() as $uuid => $component) {\n $section->removeComponent($uuid);\n }\n }\n\n // When moving from default storage to override storage.\n if ($from_storage instanceof DefaultsSectionStorageInterface && $to_storage instanceof OverridesSectionStorageInterface) {\n $this->onDefaultToOverride($entity, $from_storage, $to_storage);\n }\n // When moving from override storage to default storage.\n if ($from_storage instanceof OverridesSectionStorageInterface && $to_storage instanceof DefaultsSectionStorageInterface) {\n $this->onOverrideToDefault($entity, $from_storage, $to_storage);\n }\n // When updated an override storage.\n if ($from_storage instanceof OverridesSectionStorageInterface && $to_storage instanceof OverridesSectionStorageInterface) {\n $this->onOverrideToOverride($entity, $from_storage, $to_storage);\n }\n }\n }\n else {\n if (!empty($entity->_exoComponent)) {\n // Core layout builder will try to process sections. It cannot handle\n // sections set on new nodes. We remove the sections here and re-add\n // them in ::handlePostSave().\n $section_storage = $this->getSectionStorageForEntity($entity);\n if ($section_storage) {\n $section_storage->removeAllSections(TRUE);\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "872486e9cfe422f5019739fbe3fed3c1", "score": "0.60609907", "text": "public function handlePreSave(EntityInterface $entity) {\n if ($this->isLayoutCompatibleEntity($entity)) {\n $this->exoComponentManager->handleEntityEvent('preSave', $entity);\n $this->handleLayoutEntityPreSave($entity);\n if ($entity->getEntityTypeId() == 'entity_view_display') {\n // Because layout builder removed block_serialized before we can get to\n // it, we manually call layout_builder_entity_presave when appropriate.\n $this->handleEntityViewDisplayPreSave($entity);\n }\n // Call core's presave.\n layout_builder_entity_presave($entity);\n\n // Support global components.\n if ($sections = $this->getEntitySections($entity)) {\n foreach ($sections as $section) {\n foreach ($section->getComponents() as $component) {\n $plugin = $component->getPlugin();\n if ($plugin instanceof DerivativeInspectionInterface && $plugin->getBaseId() === 'global_block') {\n /** @var \\Drupal\\layout_builder\\Plugin\\Block\\InlineBlock $plugin */\n $plugin = $component->getPlugin();\n $plugin->saveBlockContent();\n $post_save_configuration = $plugin->getConfiguration();\n $component->setConfiguration($post_save_configuration);\n }\n }\n }\n }\n }\n if ($this->isComponentEntity($entity)) {\n $this->handleComponentEntityPreSave($entity);\n }\n return $this;\n }", "title": "" }, { "docid": "73d34430e5e303a91e92191785d39c87", "score": "0.6013655", "text": "protected function afterRender() {\n }", "title": "" }, { "docid": "a5e254281504d7f86b3dffc760b48ff9", "score": "0.5968773", "text": "function save(){\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "16ecbbd6eaeed2fccdbb0b26c2b9e8fa", "score": "0.59123766", "text": "protected function afterSave() {}", "title": "" }, { "docid": "1b960a7f99544a78ead50a049af68a1a", "score": "0.59058744", "text": "protected function _beforeSave()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "64f6469fa6cbbca16fcf8ff4b2e7908c", "score": "0.58913875", "text": "protected function beforeSave()\n {\n $this->dispatcher->getEventsManager()->fire(Events::BEFORE_SAVE, $this);\n }", "title": "" }, { "docid": "34a0e08a8a49e59ef773f9740da1cb2e", "score": "0.5812433", "text": "function afterSave() {\n // so we need to reorder. Maybe in the future we can check to see if this\n // is actually needed\n\n $this->reorder();\n }", "title": "" }, { "docid": "c3c4476913809a497661cea66be18b99", "score": "0.5807253", "text": "protected function _afterSave() {}", "title": "" }, { "docid": "f15b28738b5dc5cb262fb895a417d567", "score": "0.5795441", "text": "public function init(){\n\n if( $this->_request->getParam( 'Zend_View_Helper_Action', 0 ) == 0 ){\n $no_layout = (int)$this->_request->getParam( 'no_layout', 0 );\n $no_entity_template = (int)$this->_request->getParam( 'no_entity_template', 0 );\n\n if( $no_layout != 0 || $no_entity_template != 0 ){\n $this->_helper->layout()->disableLayout(); \n }\n\n if( $no_entity_template == 0 ){\n $this->_helper->viewRenderer->setNoController( true );\t\t\t\t\n\n $this->_helper->viewRenderer('entity/object');\n $this->view->entity_script = 'description/'.$this->getRequest()->getActionName().'.phtml';\n }\n }\n }", "title": "" }, { "docid": "756a111afaf01bc7e91ce043d4ac0360", "score": "0.5769119", "text": "public function prePersist()\n {\n if($this->isAutoZoom())\n unset($this->center);\n else\n unset($this->bound);\n }", "title": "" }, { "docid": "9ff1cea2fa3f99af930d70782f4d9626", "score": "0.57654685", "text": "protected function _beforeSave() {}", "title": "" }, { "docid": "ff6abb0e46152bb8a11bc74e9d9e5a8a", "score": "0.5762969", "text": "protected function _afterSave()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "8aca34216e749fb937082071e568d7db", "score": "0.5720976", "text": "function beforeRender(){\n\t\t$this->recordActivity();\n\t}", "title": "" }, { "docid": "afcc992b60dd0c7654b5c9e6b566b671", "score": "0.5712349", "text": "protected function beforeEdit()\n {\n $this->dispatcher->getEventsManager()->fire(Events::BEFORE_EDIT, $this);\n }", "title": "" }, { "docid": "2c40d91b0b94e3a14902c69cef99adc1", "score": "0.5676265", "text": "function beforeRender() {\n\t}", "title": "" }, { "docid": "2c40d91b0b94e3a14902c69cef99adc1", "score": "0.5676265", "text": "function beforeRender() {\n\t}", "title": "" }, { "docid": "8c127a76370acc2923af7f9e34c0b050", "score": "0.5673632", "text": "function beforeRender(){\n\t\tif ($this->auto) {\n\t\t\t$this->for_layout();\n\t\t}\n\t}", "title": "" }, { "docid": "377e7f57ec94a0fd4849fe066c57707a", "score": "0.5656386", "text": "public function beforeSave()\n {\n if (!$this->hasStoreId() && !$this->getStoreId()) {\n $this->_cleanupData();\n $xmlModel = $this->processorFactory->create();\n $this->setMetaXml($xmlModel->processData($this));\n }\n\n parent::beforeSave();\n }", "title": "" }, { "docid": "9a925626d159711d6d81c8355695060e", "score": "0.5655761", "text": "public function saveDisplayOption(){\n\t\tAuth::handleAdminLogin();\n\t\t$this->model->saveDisplayOption();\n\t}", "title": "" }, { "docid": "43eba6425bd9fd5a3179274e017ad77f", "score": "0.564024", "text": "function hook_entity_view(\\Drupal\\Core\\Entity\\EntityInterface $entity, \\Drupal\\entity\\Plugin\\Core\\Entity\\EntityDisplay $display, $view_mode, $langcode) {\n // Only do the extra work if the component is configured to be displayed.\n // This assumes a 'mymodule_addition' extra field has been defined for the\n // entity bundle in hook_field_extra_fields().\n if ($display->getComponent('mymodule_addition')) {\n $entity->content['mymodule_addition'] = array(\n '#markup' => mymodule_addition($entity),\n '#theme' => 'mymodule_my_additional_field',\n );\n }\n}", "title": "" }, { "docid": "42ca8aa0abcaca8a1edfb65d96987517", "score": "0.5631381", "text": "public function init(){\n\n if( $this->_request->getParam( 'Zend_View_Helper_Action', 0 ) == 0 ){\n $no_layout = (int)$this->_request->getParam( 'no_layout', 0 );\n $no_entity_template = (int)$this->_request->getParam( 'no_entity_template', 0 );\n\n if( $no_layout != 0 || $no_entity_template != 0 ){\n $this->_helper->layout()->disableLayout(); \n }\n\n if( $no_entity_template == 0 ){\n $this->_helper->viewRenderer->setNoController( true );\t\t\t\t\n\n $this->_helper->viewRenderer('entity/object');\n $this->view->addScriptPath(APPLICATION_PATH.'/modules/entity/views/scripts/');\n $this->view->entity_script = 'image/'.$this->getRequest()->getActionName().'.phtml';\n }\n }\n }", "title": "" }, { "docid": "bf4d76efefbc1a2cc8c439308ee8ff99", "score": "0.5605621", "text": "protected function before_save()\n\t{\n\t}", "title": "" }, { "docid": "ad0e6de2ccbeffde843d6fd4dbb4f12f", "score": "0.5593792", "text": "public function beforeSave() {\n $this->name = $this->title_name;\n $this->created_version = parent::CREATED_VERSION_PARAMOUNT;\n $this->create_type = parent::CREATE_TYPE_REGULAR;\n// if($this->getIsNewRecord()) {\n// $this->status = parent::STATUS_DRAFT;\n// }\n\n // Set delivery spec attributes\n $this->setDeliverySpecAttributes();\n \n return parent::beforeSave();\n }", "title": "" }, { "docid": "535a8e9cc093523134d9b144bc1567dc", "score": "0.5567174", "text": "function beforeRender() {\n\t\t// Nothing doing here - all the magic happens elsewhere.\n\t}", "title": "" }, { "docid": "4769cd9e190148a2f681314ec82122b6", "score": "0.55403286", "text": "protected function onBeforeEdit()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4ce090d81879c080c9e5526c97800cb1", "score": "0.55328774", "text": "protected function beforeRender()\n {\n }", "title": "" }, { "docid": "6a81f9b7c82de16faf044eed6f90ce65", "score": "0.5529803", "text": "protected function onBeforeEdit()\n\t{\n\t\t/** @var \\Akeeba\\ReleaseSystem\\Admin\\Model\\DownloadIDLabels $model */\n\t\t$model = $this->getModel()->savestate(false);\n\n\t\t// If there is no record loaded, try loading a record based on the id passed in the input object\n\t\tif (!$model->getId())\n\t\t{\n\t\t\t$ids = $this->getIDsFromRequest($model, true);\n\n\t\t\tif ($model->getId() != reset($ids))\n\t\t\t{\n\t\t\t\t$key = strtoupper($this->container->componentName . '_ERR_' . $model->getName() . '_NOTFOUND');\n\t\t\t\tthrow new ItemNotFound(\\JText::_($key), 404);\n\t\t\t}\n\t\t}\n\n\t\tif ($model->primary)\n\t\t{\n\t\t\tthrow new \\RuntimeException(\\JText::_('COM_ARS_DLIDLABELS_ERR_CANTEDITDEFAULT'), 403);\n\t\t}\n\n\t\tif (!$this->container->platform->isFrontend())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ($model->user_id != $this->container->platform->getUser()->id)\n\t\t{\n\t\t\tthrow new \\RuntimeException(\\JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'), 403);\n\t\t}\n\n\t\t$this->layout = 'form';\n\t}", "title": "" }, { "docid": "5a4ddacaa4c8b742850f137763bd7fdb", "score": "0.55191725", "text": "public function on_before_render() {\n parent::on_before_render();\n }", "title": "" }, { "docid": "95219fdd29110cf6117ca77f0b84aef2", "score": "0.5518075", "text": "protected function handleEntityViewDisplayPreSaveRecursive(array $sections, LayoutEntityDisplayInterface $entity, array &$storage = []) {\n foreach ($sections as $section) {\n foreach ($section->getComponents() as $uuid => $component) {\n if (ExoComponentManager::isExoComponent($component)) {\n // We can skip this when manually adding a field.\n if (substr(\\Drupal::routeMatch()->getRouteName(), 0, 34) === 'field_ui.field_storage_config_add_') {\n continue;\n }\n $key = 'component_' . $component->getUuid();\n $existing_block = $entity->getThirdPartySetting('exo_alchemist', $key, NULL);\n $stored_block = unserialize($existing_block ?? '');\n $configuration = $component->get('configuration');\n $is_updated = !empty($configuration['block_serialized']);\n $do_save = FALSE;\n /** @var \\Drupal\\block_content\\BlockContentInterface $block */\n // If we have a block_uuid we want to make sure we ignore the revision\n // id as it may not be the same across environments.\n $block = $this->exoComponentManager->entityLoadFromComponent($component, empty($configuration['block_uuid']));\n if (!$existing_block && !$block) {\n // This is a serious issue as we have no way to build this entity.\n continue;\n }\n if (!$block && $stored_block) {\n $block = $stored_block->createDuplicate();\n $block->set('uuid', $stored_block->uuid());\n $do_save = TRUE;\n }\n if ($section_storage = $this->getSectionStorageForEntity($block)) {\n $nested_sections = $section_storage->getSections();\n if ($existing_block) {\n if ($stored_storage = $this->getSectionStorageForEntity($stored_block)) {\n $stored_sections = $stored_storage->getSections();\n if ($nested_sections != $stored_sections) {\n $is_updated = TRUE;\n }\n }\n }\n $block->enforceIsNew(FALSE);\n $this->handleEntityViewDisplayPreSaveRecursive($nested_sections, $entity, $storage);\n }\n // Check rescursive before adding to storage so that children are\n // built first.\n $storage[$key] = $existing_block;\n if (!$existing_block || $is_updated) {\n $storage[$key] = serialize($block);\n }\n else {\n /** @var \\Drupal\\block_content\\BlockContentInterface $stored_block */\n if ($stored_block->getChangedTime() > $block->getChangedTime()) {\n foreach ($stored_block->getFields(FALSE) as $key => $items) {\n if (in_array($key, ['id', 'revision_id', 'revision_user'])) {\n continue;\n }\n $block->set($key, $items->getValue());\n }\n $do_save = TRUE;\n }\n }\n if ($do_save) {\n $block->save();\n }\n $configuration['block_uuid'] = $block->uuid();\n $configuration['block_revision_id'] = $block->get('revision_id')->value;\n $component->setConfiguration($configuration);\n }\n else {\n // Remove all non-exo components.\n $section->removeComponent($uuid);\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "339afa40ea476eedb0d8df7de6af5561", "score": "0.55173904", "text": "protected function preSave(){}", "title": "" }, { "docid": "d4b6e8bc5fd20d9f8e8e44c197e13c5d", "score": "0.5515171", "text": "public function afterSave()\n {\n \n }", "title": "" }, { "docid": "63e7ed63918a3fc6ad269f804121f2c7", "score": "0.551302", "text": "protected function beforeRender() {\n }", "title": "" }, { "docid": "62e67a1aa25dbede5871eacc002380a1", "score": "0.5509836", "text": "public function beforeSave()\n {\n if (!$this->getRmaEntityId() && $this->getRma()) {\n $this->setRmaEntityId($this->getRma()->getId());\n }\n if ($this->getQtyAuthorized() === '') {\n $this->unsQtyAuthorized();\n }\n if ($this->getQtyReturned() === '') {\n $this->unsQtyReturned();\n }\n if ($this->getQtyApproved() === '') {\n $this->unsQtyApproved();\n }\n parent::beforeSave();\n }", "title": "" }, { "docid": "c347acfe066018e923379380ca0e5cec", "score": "0.55058724", "text": "public function afterSave()\n {\n //custom code here...\n }", "title": "" }, { "docid": "31b965ce8efb26a30aa0e90fc6e58735", "score": "0.5487042", "text": "protected function prePersist()\n {\n // THIS IS REQUIRED!\n parent::prePersist();\n\n // do whatever you want...\n }", "title": "" }, { "docid": "1f23eb54e25b669b28ee6f40e872db14", "score": "0.54846025", "text": "function beforeRender(){}", "title": "" }, { "docid": "b5eafd85e44bad3f095101c09428e2dd", "score": "0.5482156", "text": "protected function beforeSave() \n { \n $this->prepareImages();\n \n if (empty($this->url_name))\n $this->url_name = StaticPages::translit($this->title);\n\n if (empty($this->menu_name))\n $this->menu_name = $this->title;\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "692182a273c216fdd803892dc9d86f83", "score": "0.5473015", "text": "public function afterSave()\n {\n }", "title": "" }, { "docid": "692182a273c216fdd803892dc9d86f83", "score": "0.5473015", "text": "public function afterSave()\n {\n }", "title": "" }, { "docid": "bd2b6ca3be2ef3540f076e0272ce0ea8", "score": "0.5453388", "text": "protected function _beforeSave()\n {\n $storeView = $this->getStoreView();\n if (is_array($storeView)) {\n $storeView = implode(',', $storeView);\n }\n if ($storeView) {\n $this->setStoreView($storeView);\n }\n\n // convert ShowAt from Array to String\n $showAt = $this->getShowAt();\n if (is_array($showAt)) {\n $showAt = implode(',', $showAt);\n }\n if ($showAt) {\n $this->setShowAt($showAt);\n }\n return $this;\n }", "title": "" }, { "docid": "760ca562a014f8bbb4d51732c8007560", "score": "0.5442198", "text": "protected function onBeforeSave()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e0d3077c5236c40f56b67f3074b544ef", "score": "0.54417014", "text": "public function beforeRender () {\n\t\tparent::beforeRender();\n\t\t\n\t\t$this->layout = 'admin_layout';\n\t\t\n\t}", "title": "" }, { "docid": "768101af564121bde774e1c208565fa0", "score": "0.54259175", "text": "protected function __post_render()\n {\n\n }", "title": "" }, { "docid": "d94f4e723ee04093664e5fd04d3d77cd", "score": "0.5424525", "text": "public function beforeSave() {\n if(isset($this->data['Entry']['content']) && is_array($this->data['Entry']['content'])) {\n $this->data['Entry']['content'] = $this->serializeAndEncode($this->data['Entry']['content']);\n } else if(isset($this->data['content']) && is_array($this->data['content'])) {\n $this->data['content'] = $this->serializeAndEncode($this->data['content']);\n }\n \n return parent::beforeSave();\n }", "title": "" }, { "docid": "d04fba6e352adc7e5f7ba158059a996c", "score": "0.54204804", "text": "public function __postRender() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b66e742fd47001db4238c57de387ffcf", "score": "0.54076016", "text": "public function on_before_update()\n {\n $data_class = $this->data_class;\n $display_order_property = $data_class->get_display_order_property()->get_property();\n $display_order_value = $data_class->get_default_property($display_order_property);\n $data_manager = $data_class->package() . '\\Storage\\DataManager';\n \n if (isset($this->old_display_order_condition))\n {\n $original_value = $this->old_display_order ? $this->old_display_order : $display_order_value;\n \n if (! $data_manager::move_display_orders(\n $data_class->get_display_order_property()->get_class(), \n $display_order_property, \n $original_value, \n null, \n $this->old_display_order_condition))\n {\n return false;\n }\n \n $next_display_order = $data_manager::retrieve_next_value(\n $data_class->get_display_order_property()->get_class(), \n $data_class->get_display_order_property()->get_property(), \n $this->get_display_order_condition());\n \n if (! isset($this->old_display_order) || is_null($display_order_value))\n {\n $data_class->set_default_property($display_order_property, $next_display_order);\n }\n else\n {\n $this->old_display_order = $next_display_order;\n }\n \n unset($this->old_display_order_condition);\n }\n \n if (isset($this->old_display_order) && ! is_null($display_order_value))\n {\n if (! $data_manager::move_display_orders(\n $data_class->get_display_order_property()->get_class(), \n $display_order_property, \n $this->old_display_order, \n $display_order_value, \n $this->get_display_order_condition()))\n {\n return false;\n }\n \n unset($this->old_display_order);\n }\n \n return true;\n }", "title": "" }, { "docid": "370db23d08f4ebfb5c9e8bcbae526be4", "score": "0.54031557", "text": "public function beforeRender() {\n }", "title": "" }, { "docid": "fff14c2562dc595c269c31985eeeb08e", "score": "0.53977025", "text": "public function prepareStoreViewCode()\n {\n\n // re-set the store view code\n $this->setStoreViewCode(null);\n\n // initialize the store view code\n if ($storeViewCode = $this->getValue(ColumnKeys::STORE_VIEW_CODE)) {\n $this->setStoreViewCode($storeViewCode);\n }\n }", "title": "" }, { "docid": "01811dc671cbc12c113add56b7898d4c", "score": "0.5397407", "text": "function hook_entity_prepare_view($entity_type, array $entities, array $displays, $view_mode) {\n // Load a specific node into the user object for later theming.\n if (!empty($entities) && $entity_type == 'user') {\n // Only do the extra work if the component is configured to be\n // displayed. This assumes a 'mymodule_addition' extra field has been\n // defined for the entity bundle in hook_field_extra_fields().\n $ids = array();\n foreach ($entities as $id => $entity) {\n if ($displays[$entity->bundle()]->getComponent('mymodule_addition')) {\n $ids[] = $id;\n }\n }\n if ($ids) {\n $nodes = mymodule_get_user_nodes($ids);\n foreach ($ids as $id) {\n $entities[$id]->user_node = $nodes[$id];\n }\n }\n }\n}", "title": "" }, { "docid": "d84bd8118946996462b75d7b6cf31275", "score": "0.5387814", "text": "public function initializeAction()\n\t{\n\t\t$this->contentObject = $this->configurationManager->getContentObject();\n\t\t$this->setRenderingModelName('Tx_Jqct_Domain_Model_' . ucfirst($this->getRenderingMethod()));\n\t}", "title": "" }, { "docid": "4d222488ecc64287f2f481ab066858ff", "score": "0.5387011", "text": "protected function handleComponentEntityPreSave(ContentEntityInterface $entity) {\n if (substr($entity->bundle(), 0, 4) == 'exo_' && $entity->id() && $entity->isNew()) {\n // This is an ugly workaround of the lack of deep serialization. Entities\n // nested more than 1 level are never serialized and we therefore we set\n // these entities as \"new\" so that they are serialized and then we set\n // them back here.\n // @see \\Drupal\\exo_alchemist\\Form/ExoFieldUpdateForm::submitForm().\n // @see https://www.drupal.org/project/drupal/issues/2824097\n // @todo Remove when patch added to core.\n $entity->enforceIsNew(FALSE);\n $entity->original = \\Drupal::entityTypeManager()->getStorage('block_content')->load($entity->id());\n }\n return $this;\n }", "title": "" }, { "docid": "0bf2f6899b927b431942b4db0cb9d18a", "score": "0.5382805", "text": "protected function postPersist()\n {\n // THIS IS REQUIRED!\n parent::postPersist();\n\n // do whatever you want...\n }", "title": "" }, { "docid": "c1c1f09843360663a8d17ae3ccba9f22", "score": "0.5380566", "text": "protected function _beforeSave() {\n if (!is_string($this->getOrderItems()))\n $this->setOrderItems(serialize($this->getOrderItems()));\n if (!is_string($this->getPrintLabel()))\n $this->setPrintLabel(serialize($this->getPrintLabel()));\n }", "title": "" }, { "docid": "fd1ffd8874466d57e8aeaaa72bd3f91c", "score": "0.5373059", "text": "protected function afterEdit()\n {\n $this->dispatcher->getEventsManager()->fire(Events::AFTER_EDIT, $this);\n }", "title": "" }, { "docid": "58dac6ee631855c146f7517ed8c36df5", "score": "0.5370097", "text": "protected function setupShowOperation()\n {\n // but we can easily take over, and have full control of what columns are shown,\n // by changing this config for the Show operation\n $this->crud->set('show.setFromDb', false);\n\n\n }", "title": "" }, { "docid": "8024520187aedec762d41282ad0bcd04", "score": "0.53696615", "text": "public function afterLoad(Model $entity): void\n {\n if (isset($entity->getDataRef()[$this->shortName])) {\n $this->setId($entity, $entity->getDataRef()[$this->shortName]);\n unset($entity->getDataRef()[$this->shortName]);\n }\n }", "title": "" }, { "docid": "515e62cd7822a9dec8298388e33aa760", "score": "0.5349948", "text": "public function beforeSave()\n {\n if(parent::beforeSave())\n {\n // Your code here\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "fc2f00340f7a551da0c011a9003811da", "score": "0.5348241", "text": "public function beforeSaving()\n {\n //\n }", "title": "" }, { "docid": "4f976e9f4d4f9ab262c5897fd497ebad", "score": "0.53480804", "text": "public function ___beforeRender()\n\t{\n\t \n\t}", "title": "" }, { "docid": "4a98585163e1d227a721fca09a263ca0", "score": "0.5346529", "text": "public function afterSave()\n {\n $this->save();\n }", "title": "" }, { "docid": "f34d34879a8d5c984d466284cd2da13d", "score": "0.5338606", "text": "public function afterSetModelAttributes()\n {\n //custom code here...\n }", "title": "" }, { "docid": "0efa3768322b87f7bd776af1314f129f", "score": "0.5335097", "text": "function hook_entity_view_alter(&$build, Drupal\\Core\\Entity\\EntityInterface $entity, \\Drupal\\entity\\Plugin\\Core\\Entity\\EntityDisplay $display) {\n if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {\n // Change its weight.\n $build['an_additional_field']['#weight'] = -10;\n\n // Add a #post_render callback to act on the rendered HTML of the entity.\n $build['#post_render'][] = 'my_module_node_post_render';\n }\n}", "title": "" }, { "docid": "c0439bf54fa2d15bb2f243d1dfe22535", "score": "0.5331248", "text": "public function preSave(){}", "title": "" }, { "docid": "3eacd158a7204e0225c6f15e8c046b72", "score": "0.53294367", "text": "protected function afterSave()\n {\n return true;\n }", "title": "" }, { "docid": "ad31633a81b652abb035f820a5a1d853", "score": "0.53180957", "text": "protected function _beforeSave(){\n\t\t$datetime = date('Y-m-d H:i:s');\n \tif(!$this->getId()){\n \t\t$this->setData('created_at', $datetime);\n \t}\n \t$this->setData('updated_at', $datetime);\n \tparent::_beforeSave();\n }", "title": "" }, { "docid": "c2ada7452ac1b5867e6ab638794e648c", "score": "0.53092855", "text": "public function beforeSave()\n {\n //custom code here...\n return true;\n }", "title": "" }, { "docid": "a9db23bfedb3b503f2ed6061dfd963df", "score": "0.53088206", "text": "public function afterSave() {\n if ($this->isQAReportInfoChanged()) {\n $this->setQAReportChangedAt();\n }\n\n parent::afterSave();\n }", "title": "" }, { "docid": "dd4ed931d67f3e00993772b870427cc0", "score": "0.5299794", "text": "public function before()\n {\n if ($this->_record->id === null) {\n $this->_new = true;\n // pass owner id category from construct model\n $this->dependId = $this->_tmpDependId < 1 ? 1 : $this->_tmpDependId;\n } else {\n // make tmp id for frontend form\n $this->id = $this->_record->id;\n $path = $this->_record->path;\n // nesting levels\n if (Str::contains('/', $path)) {\n $nestedPath = explode('/', $path);\n $this->path = array_pop($nestedPath);\n $this->_pathNested = implode('/', $nestedPath);\n // get owner category id by nesting path\n $owner = ContentCategory::getByPath($this->_pathNested);\n if ($owner !== null) {\n $this->dependId = $owner->id;\n }\n } else {\n $this->path = $path;\n }\n\n // set data from record\n $this->title = $this->_record->title;\n $this->description = $this->_record->description;\n if ($this->_record->configs !== null && !Any::isEmpty($this->_record->configs)) {\n $this->configs = $this->_record->configs;\n }\n }\n }", "title": "" }, { "docid": "8d7d20322fd484cf05f9ed64c41ec4d5", "score": "0.52973884", "text": "protected function setAddEditDataAndShowView($entity) {\n// $this->fields['sender_warehouse']['options'][''] = '--Не выбрано--';\n// if (!empty($entity['sender_city'])) {\n// $result = ManagerHolder::get('Warehouse')->getAllWhere(array('city_id' => $entity['sender_city']['id']), 'id, name');\n// foreach ($result as $item) {\n// $this->fields['sender_warehouse']['options'][$item['id']] = $item['name'];\n// }\n// }\n\n parent::setAddEditDataAndShowView($entity);\n }", "title": "" }, { "docid": "1ac4c8fa6bcc7a0242c48eb2778b93ab", "score": "0.5296718", "text": "protected function beforeUpdate()\n {\n $this->dispatcher->getEventsManager()->fire(Events::BEFORE_UPDATE, $this);\n $this->beforeSave();\n }", "title": "" }, { "docid": "7af051b7146d1de6acf65ae74b3150d2", "score": "0.5291138", "text": "public function beforeRender(): void\n {\n }", "title": "" }, { "docid": "8358f7a7b1eb4f5bb8a9de08f1e3b828", "score": "0.5283954", "text": "public function onPreSave(): void\n {\n if (null === $this->getName()) {\n $this->setName(\"\");\n }\n\n if (null === $this->getActive()) {\n $this->setActive(false);\n }\n\n if (null === $this->getFormedAt()) {\n $this->setFormedAt(new DateTime(\"now\"));\n }\n }", "title": "" }, { "docid": "ced67953276b315cd81adf808d9615fe", "score": "0.5272249", "text": "public function after_save() {\r\n }", "title": "" }, { "docid": "eabd10d18b1803c970e54cc2346cdf19", "score": "0.5268653", "text": "public function afterFindContent()\r\n {\r\n $this->owner->on( 'beforeContent', function ($event) {\r\n $this->updateContentBeforeLoad();\r\n });\r\n }", "title": "" }, { "docid": "76e5dcdb06ab3e2bd95d0429d1f8f9f9", "score": "0.52640086", "text": "function editorInitiateLayoutEditor() {\n\t\t$monographId = Request::getUserVar('monographId');\n\t\t$this->validate($monographId);\n\t\t$press =& $this->press;\n\t\t$submission =& $this->submission;\n\n\t\t$proofAssignmentDao =& DAORegistry::getDAO('ProofAssignmentDAO');\n\t\t$proofAssignment =& $proofAssignmentDao->getProofAssignmentByMonographId($monographId);\n\t\t$proofAssignment->setDateLayoutEditorNotified(Core::getCurrentDate());\n\t\t$proofAssignmentDao->updateProofAssignment($proofAssignment);\n\n\t\tRequest::redirect(null, null, 'submissionEditing', $monographId);\n\t}", "title": "" }, { "docid": "606d13ad5b3f8487663761055f2bcf52", "score": "0.52619797", "text": "public function before_render() {\r\n\t}", "title": "" }, { "docid": "bffe73f1b930a370b23713f0294ad08a", "score": "0.5250853", "text": "protected function beforeSave() {\n return true;\n }", "title": "" }, { "docid": "fa3b2f17d53545de831c047f98296267", "score": "0.5246786", "text": "protected function beforeSave()\n {\n return true;\n }", "title": "" }, { "docid": "852b991666a5fa64d3fceefb442ad7a1", "score": "0.5244847", "text": "public function beforeRender()\n {\n $admin = $this->params['admin'];\n $url = $this->params->url;\n if ($this->params['action'] === 'admin_login' || $this->params['action'] === 'register') {\n $this->layout = 'clean';\n } else if (isset($admin) === true && $admin === true) {\n $this->layout = 'admin';\n $this->SiPermission->check();\n $this->notifications();\n } else if (isset($this->params['hq']) === true && $this->params['hq'] === true) {\n $this->layout = 'hq';\n } else {\n $this->layout = 'public';\n }\n\n $this->set('userData', $this->Auth->user());\n\n if (isset($this->seo_description) === true) {\n $this->set('seo_description', $this->seo_description);\n } else {\n $this->set(\n 'seo_description',\n __('Manage, analyze and make decisions for your business from anywhere: OnneBlue.')\n );\n }\n\n if (isset($this->seo_keywords) === true) {\n $this->set('seo_keywords', $this->seo_keywords);\n } else {\n $this->set(\n 'seo_keywords',\n __('harvest, erp, manage, analyze, make decisions, business, simplicity, system, mobile')\n );\n }\n\n }", "title": "" }, { "docid": "fef9b184a552389e9b46cc431f668343", "score": "0.5232986", "text": "public function before_save() {\r\n \r\n }", "title": "" }, { "docid": "8ae9fe0f7dcf7f6da1ef5629b8ad37c1", "score": "0.5229462", "text": "protected function _afterLoad() {\n $this->setValue(null);\n }", "title": "" }, { "docid": "043b2e5aaa9a4daabb0ace22ee5429ea", "score": "0.5224044", "text": "protected function _loadDOFieldsDisplay()\n {\n\n $config = $this->metaGen->config;\n $fieldsDisplayConfig = $config->getFieldDisplay();\n $fieldsDisplay = array();\n foreach ($fieldsDisplayConfig as $fieldName => $fieldStatus)\n {\n if ($fieldStatus == true)\n {\n $fieldsDisplay[$fieldName] = $this->_fields[$fieldName];\n }\n }\n\n $this->_fieldsDisplay = $fieldsDisplay;\n }", "title": "" }, { "docid": "2d33f91f8b81368040d5575ba445bb58", "score": "0.52231926", "text": "function beforeUpdate(&$dataEntity) {\n\t}", "title": "" }, { "docid": "951f01b8a0fe3ebfcb84e346c39ce062", "score": "0.52201074", "text": "protected function _preloadDisplayProperties()\n {\n $this->_addDisplayAttribute('linkId', $this->linkId);\n }", "title": "" }, { "docid": "017fb1eb6248d0cbc77027a61addcb2b", "score": "0.5217461", "text": "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n if (Versioned::get_by_stage('KnowledgeHubLandingPage', 'Stage')->count() > 0) {\n $this->ParentID = Versioned::get_by_stage('KnowledgeHubLandingPage', 'Stage')->first()->ID;\n }\n }", "title": "" }, { "docid": "4a580125063148c0dd4c1b7d2bbe8757", "score": "0.5217092", "text": "public function beforeSave(Event $event, EntityInterface $entity)\n {\n $config = $this->getConfig();\n\n\t\t$entity->set($config['field'], 1);\n\n }", "title": "" }, { "docid": "b8df3367002bd23f8e06b2f15f589384", "score": "0.5215579", "text": "public function afterSave() //@codingStandardsIgnoreLine\n {\n /**\n * Fix saving attribute in admin\n */\n $this->_eavConfig->clear();\n return parent::afterSave();\n }", "title": "" }, { "docid": "4e5ff3a65624f7ab255ca41578c6d39e", "score": "0.52064407", "text": "private function showEntityPage() {\n\t\t$outputPage = $this->getOutput();\n\t\t$editable = $this->isEditable();\n\n\t\t// NOTE: page-wide property, independent of user permissions\n\t\t$outputPage->addJsConfigVars( 'wbIsEditView', $editable );\n\n\t\t$user = $this->getUser();\n\t\t$parserOptions = $this->page->makeParserOptions( $user );\n\n\t\t$this->page->setParserOptions( $parserOptions );\n\t\t$this->page->view();\n\n\t\t$this->overrideTitleText( $outputPage );\n\t}", "title": "" }, { "docid": "8769ad33c6102ec23a2ad524028e49f5", "score": "0.52048564", "text": "public function controller_action_layout_load_before(Varien_Event_Observer $observer) \n { \n $action = $observer->getAction();\n if ($action->getFullActionName() != 'adminhtml_sales_order_create_loadBlock' ||\n !$action->getRequest()->getParam('json')) {\n return;\n }\n $layout = $observer->getLayout();\n $layout->getUpdate()->addHandle('adminhtml_sales_order_create_load_block_totals');\n }", "title": "" }, { "docid": "6e446aa1de56c5bf7c8f6542067e4e82", "score": "0.5202729", "text": "public function observeLayoutHandleInitialization(Varien_Event_Observer $observer)\n {\n /* @var $controllerAction Mage_Core_Controller_Varien_Action */\n $controllerAction = $observer->getEvent()->getAction();\n $fullActionName = $controllerAction->getFullActionName();\n if ($this->getConfig()->isEnabled() && in_array($fullActionName, $this->getConfig()->getControllerActions())) {\n if ($this->getConfig()->getDisplayPosition() === EcomDev_ProductPageShipping_Model_Config::DISPLAY_POSITION_LEFT) {\n // Display the form in the left column on the page\n $controllerAction->getLayout()->getUpdate()->addHandle(\n EcomDev_ProductPageShipping_Model_Config::LAYOUT_HANDLE_LEFT\n );\n } elseif ($this->getConfig()->getDisplayPosition() === EcomDev_ProductPageShipping_Model_Config::DISPLAY_POSITION_RIGHT) {\n // Display the form in the right column on the page\n $controllerAction->getLayout()->getUpdate()->addHandle(\n EcomDev_ProductPageShipping_Model_Config::LAYOUT_HANDLE_RIGHT\n );\n }\n }\n }", "title": "" }, { "docid": "e1dc5f2d8e17c1dbb07d1b75456d079c", "score": "0.51966286", "text": "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n if (!$this->InternalCode) {\n $this->InternalCode = $this->Label;\n }\n if (!$this->HasImages) {\n $this->FolderID = 0;\n }\n if ($this->Options) {\n $optionsForFields = $this->Config()->get(\"available_form_fields_list\");\n if (!isset($optionsForFields[$this->DefaultFormField])) {\n //get the first one if none is set.\n $this->DefaultFormField = key($optionsForFields);\n }\n } else {\n $optionsForFields = $this->Config()->get(\"available_form_fields_free\");\n if (!isset($optionsForFields[$this->DefaultFormField])) {\n //get the first one if none is set.\n $this->DefaultFormField = key($optionsForFields);\n }\n }\n }", "title": "" }, { "docid": "d0294e8e23a5789df288e64faae30c8b", "score": "0.51894474", "text": "public function afterSave()\n {\n // if ($this->default)\n // {\n // self::model()->updateAll(array(\n // 'default'=>0,\n // ), 'id != '.$this->id);\n // }\n // return parent::afterSave();\n }", "title": "" }, { "docid": "13242a47761b385cd84dd71c421d9af7", "score": "0.5187818", "text": "protected function _preSave() {\n $this->_checkForExisting();\n }", "title": "" }, { "docid": "eac4c5a437208c3a56c3361c2f6814a8", "score": "0.518359", "text": "protected function beforeSave()\n {\n // TODO: $this->forum_id\n $this->slug = Topic::slugify($this->title);\n $this->created_at = new CDbExpression('NOW()');\n $this->poster_id = Yii::app()->user->id;\n $user = User::model()->findByPk($this->poster_id);\n $this->last_reply_user = $user->name;\n $this->last_reply_on = new CDbExpression('NOW()');\n $this->num_hits = 1;\n }", "title": "" }, { "docid": "cf9f157b87da49552593849e726091d4", "score": "0.516522", "text": "public function onBeforeRun()\n {\n if ($this->owner->model->getIsNewRecord() && !$this->owner->model->hasErrors()) {\n $this->owner->model->parent_id = Yii::$app->getRequest()->get('parent');\n }\n }", "title": "" }, { "docid": "965c2ef9adbdc4310ea9868b47938328", "score": "0.51641744", "text": "public function beforeSave()\n {\n // Relations handler.\n foreach ($this->tags as $m) $m->save();\n foreach ($this->links as $m) $m->save();\n foreach ($this->files as $m) $m->save();\n\n if ($this->isNewRecord) {\n // Save current time.\n $this->create_time = new CDbExpression('NOW()');\n }\n\n // Allow null date database field.\n if (empty($this->publication_date)) {\n $this->publication_date = null;\n }\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "2cb102543945f75cc079c70233eb779a", "score": "0.5162411", "text": "public function afterView()\n {\n }", "title": "" }, { "docid": "6acadd9a924710b6b948524e7aa2de57", "score": "0.51572037", "text": "protected function attachToEntityPreSave()\n {\n $this->getEventManager()->attach(\n static::SERVICE_NAME . '::entity_pre_save',\n function(Event $event) {\n $entity = $event->getParam('entity');\n $tablePrefix = $event->getParam('table_prefix');\n if (\n $this->entityCacheEnabled &&\n false !== ($id = $this->getIdForEntity($entity))) {\n $key = $this->getEntityCacheKey($id, $tablePrefix);\n if (isset($this->entityCacheObjectStorage[$key])) {\n ErrorHandler::start();\n $original = unserialize($this->entityCacheObjectStorage[$key]);\n ErrorHandler::stop(true);\n $this->setChangesCommitted($original);\n ObjectUtils::transferData($entity, $original);\n\n unset($entity);\n\n return $original;\n }\n }\n }\n );\n }", "title": "" }, { "docid": "a8232172949ea0f9380304eef322172e", "score": "0.51513046", "text": "function save_position() {\n $business_center = & $this->business_center;\n if ($business_center->position != $this->position) {\n $business_center->position = $this->position;\n $business_center->save_variables_called = false;\n $business_center->save();\n }\n }", "title": "" } ]
e7f629d19eebfcc2a545c7d4994be14b
/ Hooks into the customize_register and allows you to add new sections and controls to the Theme Customize screen
[ { "docid": "633ebbfd2361765c3a8da9b935a19703", "score": "0.71784234", "text": "public static function achilles_customize_register( $wp_customize ){\n\n //add a section to customize the logo on the website\n $wp_customize->add_section('achilles_logo', array(\n 'title' => __('Logo', 'achilles'),\n 'priority' => 01,\n ));\n\n\t/**\n\t * Image Upload\n\t */\n $wp_customize->add_setting('achilles_theme_options[achilles_upload_logo]', array(\n 'default' => 'image.jpg',\n 'capability' => 'edit_theme_options',\n 'type'\t\t\t\t => 'option',\n\n ));\n\n $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'achilles_upload_logo', array(\n 'label' => __('Upload Logo', 'achilles'),\n 'section' => 'achilles_logo',\n 'settings' => 'achilles_theme_options[achilles_upload_logo]',\n )));\n\n\n //add a section to customize the body css on the website\n $wp_customize->add_section('achilles_body_styles', array(\n 'title' => __('Body Styling', 'achilles'),\n 'priority' => 02,\n ));\n\n // =============================\n // Background Color Picker\n // =============================\n $wp_customize->add_setting('achilles_theme_options[body_color]', array(\n 'default' => '#FFFFFF',\n // 'sanitize_callback' => 'sanitize_hex_color',\n 'capability' => 'edit_theme_options',\n\t\t 'transport'\t\t=> 'postMessage',\n 'type' => 'option',\n\n ));\n\n $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'body_color', array(\n 'label' => __('Body Color', 'achilles'),\n 'section' => 'achilles_body_styles',\n 'settings' => 'achilles_theme_options[body_color]',\n )));\n\n // =============================\n // Headings Color Picker\n // =============================\n $wp_customize->add_setting('achilles_theme_options[headings_color]', array(\n 'default' => '#000000',\n // 'sanitize_callback' => 'sanitize_hex_color',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n\n ));\n\n $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'headings_color', array(\n 'label' => __('Headings Color', 'achilles'),\n 'section' => 'achilles_body_styles',\n 'settings' => 'achilles_theme_options[headings_color]',\n )));\n\n\n\n\t$wp_customize->get_setting('blogname')->transport='postMessage';\n\t$wp_customize->get_setting('blogdescription')->transport='postMessage';\n\t$wp_customize->get_setting('header_textcolor')->transport='postMessage';\n\n\n\n\n\t}", "title": "" } ]
[ { "docid": "308275b5f38ef4b06f93cb2e2cff3859", "score": "0.77447695", "text": "function customize_register( $wp_customize ) {\n $wp_customize->add_panel( 'ect_plugin_options', array(\n 'title' => esc_html__( 'Essential Content Types Plugin Options', 'essential-content-types' ),\n 'priority' => 1,\n ) );\n\n $wp_customize->add_section( 'ect_service', array(\n 'title' => esc_html__( 'Services', 'essential-content-types' ),\n 'priority' => 130,\n 'panel' => 'ect_plugin_options',\n ) );\n\n $wp_customize->add_setting( 'ect_service_title', array(\n 'default' => esc_html__( 'Services', 'essential-content-types' ),\n 'type' => 'option',\n 'sanitize_callback' => 'sanitize_text_field',\n 'sanitize_js_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'ect_service_title', array(\n 'section' => 'ect_service',\n 'label' => esc_html__( 'Service Archive Title', 'essential-content-types' ),\n 'type' => 'text',\n ) );\n\n $wp_customize->add_setting( 'ect_service_content', array(\n 'default' => '',\n 'type' => 'option',\n 'sanitize_callback' => 'wp_kses_post',\n 'sanitize_js_callback' => 'wp_kses_post',\n ) );\n\n $wp_customize->add_control( 'ect_service_content', array(\n 'section' => 'ect_service',\n 'label' => esc_html__( 'Service Archive Content', 'essential-content-types' ),\n 'type' => 'textarea',\n ) );\n\n $wp_customize->add_setting( 'ect_service_featured_image', array(\n 'default' => '',\n 'type' => 'option',\n 'sanitize_callback' => 'attachment_url_to_postid',\n 'sanitize_js_callback' => 'attachment_url_to_postid',\n 'theme_supports' => 'post-thumbnails',\n ) );\n\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'ect_service_featured_image', array(\n 'section' => 'ect_service',\n 'label' => esc_html__( 'Service Archive Featured Image', 'essential-content-types' ),\n ) ) );\n }", "title": "" }, { "docid": "55d09a20a8a454b2328221511a712c59", "score": "0.7741266", "text": "function pf_add_section( $wp_customize ) {\n\n\t$wp_customize->add_section('footer', array(\n\t\t\t'title' => __('Footer','pf'),\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'priority' => 130\n\t\t));\n\t$wp_customize->add_setting('setting_copy', array());\n\t$wp_customize->add_control('copy', array(\n\t\t\t'label' => __('Copyrights', 'pf'),\n\t\t\t'section' => 'footer',\n\t\t\t'settings' => 'setting_copy',\n\t\t\t'type' => 'text'\n\t\t));\n\n\t$wp_customize->add_section('socnetworks', array(\n\t\t\t'title' => __('Social networks','pf'),\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'priority' => 120\n\t\t));\n\t$wp_customize->add_setting('setting_twitter', array());\n\t$wp_customize->add_control('twitter', array(\n\t\t\t'label' => __('Twitter', 'pf'),\n\t\t\t'section' => 'socnetworks',\n\t\t\t'settings' => 'setting_twitter',\n\t\t\t'type' => 'text'\n\t\t));\n\n\t$wp_customize->add_setting('setting_facebook', array());\n\t$wp_customize->add_control('facebook', array(\n\t\t\t'label' => __('Facebook', 'pf'),\n\t\t\t'section' => 'socnetworks',\n\t\t\t'settings' => 'setting_facebook',\n\t\t\t'type' => 'text'\n\t\t));\n\n\t$wp_customize->add_setting('setting_dribble', array());\n\t$wp_customize->add_control('dribble', array(\n\t\t\t'label' => __('Dribble', 'pf'),\n\t\t\t'section' => 'socnetworks',\n\t\t\t'settings' => 'setting_dribble',\n\t\t\t'type' => 'text'\n\t\t));\n\n\t$wp_customize->add_setting('setting_instagram', array());\n\t$wp_customize->add_control('instagram', array(\n\t\t\t'label' => __('Instagram', 'pf'),\n\t\t\t'section' => 'socnetworks',\n\t\t\t'settings' => 'setting_instagram',\n\t\t\t'type' => 'text'\n\t\t));\n\n}", "title": "" }, { "docid": "3ac69aaab061e03a3fc98d263cf801f9", "score": "0.7706635", "text": "public function register_controls()\n {\n\n /* Panel, Section, and Control Types */\n $this->register_panel_type('WP_Customize_Panel');\n $this->register_section_type('WP_Customize_Section');\n $this->register_section_type('WP_Customize_Sidebar_Section');\n $this->register_control_type('WP_Customize_Color_Control');\n $this->register_control_type('WP_Customize_Media_Control');\n $this->register_control_type('WP_Customize_Upload_Control');\n $this->register_control_type('WP_Customize_Image_Control');\n $this->register_control_type('WP_Customize_Background_Image_Control');\n $this->register_control_type('WP_Customize_Background_Position_Control');\n $this->register_control_type('WP_Customize_Cropped_Image_Control');\n $this->register_control_type('WP_Customize_Site_Icon_Control');\n $this->register_control_type('WP_Customize_Theme_Control');\n\n /* Themes */\n\n $this->add_section(new WP_Customize_Themes_Section($this, 'themes', array(\n 'title' => $this->theme()->display('Name'),\n 'capability' => 'switch_themes',\n 'priority' => 0,\n )));\n\n // Themes Setting (unused - the theme is considerably more fundamental to the Customizer experience).\n $this->add_setting(new WP_Customize_Filter_Setting($this, 'active_theme', array(\n 'capability' => 'switch_themes',\n )));\n\n require_once(ABSPATH . 'wp-admin/includes/theme.php');\n\n // Theme Controls.\n\n // Add a control for the active/original theme.\n if (!$this->is_theme_active()) {\n $themes = wp_prepare_themes_for_js(array(wp_get_theme($this->original_stylesheet)));\n $active_theme = current($themes);\n $active_theme['isActiveTheme'] = true;\n $this->add_control(new WP_Customize_Theme_Control($this, $active_theme['id'], array(\n 'theme' => $active_theme,\n 'section' => 'themes',\n 'settings' => 'active_theme',\n )));\n }\n\n $themes = wp_prepare_themes_for_js();\n foreach ($themes as $theme) {\n if ($theme['active'] || $theme['id'] === $this->original_stylesheet) {\n continue;\n }\n\n $theme_id = 'theme_' . $theme['id'];\n $theme['isActiveTheme'] = false;\n $this->add_control(new WP_Customize_Theme_Control($this, $theme_id, array(\n 'theme' => $theme,\n 'section' => 'themes',\n 'settings' => 'active_theme',\n )));\n }\n\n /* Site Identity */\n\n $this->add_section('title_tagline', array(\n 'title' => __('Site Identity'),\n 'priority' => 20,\n ));\n\n $this->add_setting('blogname', array(\n 'default' => get_option('blogname'),\n 'type' => 'option',\n 'capability' => 'manage_options',\n ));\n\n $this->add_control('blogname', array(\n 'label' => __('Site Title'),\n 'section' => 'title_tagline',\n ));\n\n $this->add_setting('blogdescription', array(\n 'default' => get_option('blogdescription'),\n 'type' => 'option',\n 'capability' => 'manage_options',\n ));\n\n $this->add_control('blogdescription', array(\n 'label' => __('Tagline'),\n 'section' => 'title_tagline',\n ));\n\n // Add a setting to hide header text if the theme doesn't support custom headers.\n if (!current_theme_supports('custom-header', 'header-text')) {\n $this->add_setting('header_text', array(\n 'theme_supports' => array('custom-logo', 'header-text'),\n 'default' => 1,\n 'sanitize_callback' => 'absint',\n ));\n\n $this->add_control('header_text', array(\n 'label' => __('Display Site Title and Tagline'),\n 'section' => 'title_tagline',\n 'settings' => 'header_text',\n 'type' => 'checkbox',\n ));\n }\n\n $this->add_setting('site_icon', array(\n 'type' => 'option',\n 'capability' => 'manage_options',\n 'transport' => 'postMessage', // Previewed with JS in the Customizer controls window.\n ));\n\n $this->add_control(new WP_Customize_Site_Icon_Control($this, 'site_icon', array(\n 'label' => __('Site Icon'),\n 'description' => sprintf(\n /* translators: %s: site icon size in pixels */\n __('The Site Icon is used as a browser and app icon for your site. Icons must be square, and at least %s pixels wide and tall.'),\n '<strong>512</strong>'\n ),\n 'section' => 'title_tagline',\n 'priority' => 60,\n 'height' => 512,\n 'width' => 512,\n )));\n\n $this->add_setting('custom_logo', array(\n 'theme_supports' => array('custom-logo'),\n 'transport' => 'postMessage',\n ));\n\n $custom_logo_args = get_theme_support('custom-logo');\n $this->add_control(new WP_Customize_Cropped_Image_Control($this, 'custom_logo', array(\n 'label' => __('Logo'),\n 'section' => 'title_tagline',\n 'priority' => 8,\n 'height' => $custom_logo_args[0]['height'],\n 'width' => $custom_logo_args[0]['width'],\n 'flex_height' => $custom_logo_args[0]['flex-height'],\n 'flex_width' => $custom_logo_args[0]['flex-width'],\n 'button_labels' => array(\n 'select' => __('Select logo'),\n 'change' => __('Change logo'),\n 'remove' => __('Remove'),\n 'default' => __('Default'),\n 'placeholder' => __('No logo selected'),\n 'frame_title' => __('Select logo'),\n 'frame_button' => __('Choose logo'),\n ),\n )));\n\n $this->selective_refresh->add_partial('custom_logo', array(\n 'settings' => array('custom_logo'),\n 'selector' => '.custom-logo-link',\n 'render_callback' => array($this, '_render_custom_logo_partial'),\n 'container_inclusive' => true,\n ));\n\n /* Colors */\n\n $this->add_section('colors', array(\n 'title' => __('Colors'),\n 'priority' => 40,\n ));\n\n $this->add_setting('header_textcolor', array(\n 'theme_supports' => array('custom-header', 'header-text'),\n 'default' => get_theme_support('custom-header', 'default-text-color'),\n\n 'sanitize_callback' => array($this, '_sanitize_header_textcolor'),\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n ));\n\n // Input type: checkbox\n // With custom value\n $this->add_control('display_header_text', array(\n 'settings' => 'header_textcolor',\n 'label' => __('Display Site Title and Tagline'),\n 'section' => 'title_tagline',\n 'type' => 'checkbox',\n 'priority' => 40,\n ));\n\n $this->add_control(new WP_Customize_Color_Control($this, 'header_textcolor', array(\n 'label' => __('Header Text Color'),\n 'section' => 'colors',\n )));\n\n // Input type: Color\n // With sanitize_callback\n $this->add_setting('background_color', array(\n 'default' => get_theme_support('custom-background', 'default-color'),\n 'theme_supports' => 'custom-background',\n\n 'sanitize_callback' => 'sanitize_hex_color_no_hash',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n ));\n\n $this->add_control(new WP_Customize_Color_Control($this, 'background_color', array(\n 'label' => __('Background Color'),\n 'section' => 'colors',\n )));\n\n /* Custom Header */\n\n if (current_theme_supports('custom-header', 'video')) {\n $title = __('Header Media');\n $description = '<p>' . __('If you add a video, the image will be used as a fallback while the video loads.') . '</p>';\n\n // @todo Customizer sections should support having notifications just like controls do. See <https://core.trac.wordpress.org/ticket/38794>.\n $description .= '<div class=\"customize-control-notifications-container header-video-not-currently-previewable\" style=\"display: none\"><ul>';\n $description .= '<li class=\"notice notice-info\">' . __('This theme doesn\\'t support video headers on this page. Navigate to the front page or another page that supports video headers.') . '</li>';\n $description .= '</ul></div>';\n $width = absint(get_theme_support('custom-header', 'width'));\n $height = absint(get_theme_support('custom-header', 'height'));\n if ($width && $height) {\n $control_description = sprintf(\n /* translators: 1: .mp4, 2: header size in pixels */\n __('Upload your video in %1$s format and minimize its file size for best results. Your theme recommends dimensions of %2$s pixels.'),\n '<code>.mp4</code>',\n sprintf('<strong>%s &times; %s</strong>', $width, $height)\n );\n } elseif ($width) {\n $control_description = sprintf(\n /* translators: 1: .mp4, 2: header width in pixels */\n __('Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a width of %2$s pixels.'),\n '<code>.mp4</code>',\n sprintf('<strong>%s</strong>', $width)\n );\n } else {\n $control_description = sprintf(\n /* translators: 1: .mp4, 2: header height in pixels */\n __('Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a height of %2$s pixels.'),\n '<code>.mp4</code>',\n sprintf('<strong>%s</strong>', $height)\n );\n }\n } else {\n $title = __('Header Image');\n $description = '';\n $control_description = '';\n }\n\n $this->add_section('header_image', array(\n 'title' => $title,\n 'description' => $description,\n 'theme_supports' => 'custom-header',\n 'priority' => 60,\n ));\n\n $this->add_setting('header_video', array(\n 'theme_supports' => array('custom-header', 'video'),\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'absint',\n 'validate_callback' => array($this, '_validate_header_video'),\n ));\n\n $this->add_setting('external_header_video', array(\n 'theme_supports' => array('custom-header', 'video'),\n 'transport' => 'postMessage',\n 'sanitize_callback' => array($this, '_sanitize_external_header_video'),\n 'validate_callback' => array($this, '_validate_external_header_video'),\n ));\n\n $this->add_setting(new WP_Customize_Filter_Setting($this, 'header_image', array(\n 'default' => sprintf(get_theme_support('custom-header', 'default-image'), get_template_directory_uri(), get_stylesheet_directory_uri()),\n 'theme_supports' => 'custom-header',\n )));\n\n $this->add_setting(new WP_Customize_Header_Image_Setting($this, 'header_image_data', array(\n 'theme_supports' => 'custom-header',\n )));\n\n /*\n\t\t * Switch image settings to postMessage when video support is enabled since\n\t\t * it entails that the_custom_header_markup() will be used, and thus selective\n\t\t * refresh can be utilized.\n\t\t */\n if (current_theme_supports('custom-header', 'video')) {\n $this->get_setting('header_image')->transport = 'postMessage';\n $this->get_setting('header_image_data')->transport = 'postMessage';\n }\n\n $this->add_control(new WP_Customize_Media_Control($this, 'header_video', array(\n 'theme_supports' => array('custom-header', 'video'),\n 'label' => __('Header Video'),\n 'description' => $control_description,\n 'section' => 'header_image',\n 'mime_type' => 'video',\n // @todo These button_labels can be removed once WP_Customize_Media_Control provides mime_type-specific labels automatically. See <https://core.trac.wordpress.org/ticket/38796>.\n 'button_labels' => array(\n 'select' => __('Select Video'),\n 'change' => __('Change Video'),\n 'placeholder' => __('No video selected'),\n 'frame_title' => __('Select Video'),\n 'frame_button' => __('Choose Video'),\n ),\n 'active_callback' => 'is_header_video_active',\n )));\n\n $this->add_control('external_header_video', array(\n 'theme_supports' => array('custom-header', 'video'),\n 'type' => 'url',\n 'description' => __('Or, enter a YouTube URL:'),\n 'section' => 'header_image',\n 'active_callback' => 'is_header_video_active',\n ));\n\n $this->add_control(new WP_Customize_Header_Image_Control($this));\n\n $this->selective_refresh->add_partial('custom_header', array(\n 'selector' => '#wp-custom-header',\n 'render_callback' => 'the_custom_header_markup',\n 'settings' => array('header_video', 'external_header_video', 'header_image'), // The image is used as a video fallback here.\n 'container_inclusive' => true,\n ));\n\n /* Custom Background */\n\n $this->add_section('background_image', array(\n 'title' => __('Background Image'),\n 'theme_supports' => 'custom-background',\n 'priority' => 80,\n ));\n\n $this->add_setting('background_image', array(\n 'default' => get_theme_support('custom-background', 'default-image'),\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n ));\n\n $this->add_setting(new WP_Customize_Background_Image_Setting($this, 'background_image_thumb', array(\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n )));\n\n $this->add_control(new WP_Customize_Background_Image_Control($this));\n\n $this->add_setting('background_preset', array(\n 'default' => get_theme_support('custom-background', 'default-preset'),\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n ));\n\n $this->add_control('background_preset', array(\n 'label' => _x('Preset', 'Background Preset'),\n 'section' => 'background_image',\n 'type' => 'select',\n 'choices' => array(\n 'default' => _x('Default', 'Default Preset'),\n 'fill' => __('Fill Screen'),\n 'fit' => __('Fit to Screen'),\n 'repeat' => _x('Repeat', 'Repeat Image'),\n 'custom' => _x('Custom', 'Custom Preset'),\n ),\n ));\n\n $this->add_setting('background_position_x', array(\n 'default' => get_theme_support('custom-background', 'default-position-x'),\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n ));\n\n $this->add_setting('background_position_y', array(\n 'default' => get_theme_support('custom-background', 'default-position-y'),\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n ));\n\n $this->add_control(new WP_Customize_Background_Position_Control($this, 'background_position', array(\n 'label' => __('Image Position'),\n 'section' => 'background_image',\n 'settings' => array(\n 'x' => 'background_position_x',\n 'y' => 'background_position_y',\n ),\n )));\n\n $this->add_setting('background_size', array(\n 'default' => get_theme_support('custom-background', 'default-size'),\n 'theme_supports' => 'custom-background',\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n ));\n\n $this->add_control('background_size', array(\n 'label' => __('Image Size'),\n 'section' => 'background_image',\n 'type' => 'select',\n 'choices' => array(\n 'auto' => __('Original'),\n 'contain' => __('Fit to Screen'),\n 'cover' => __('Fill Screen'),\n ),\n ));\n\n $this->add_setting('background_repeat', array(\n 'default' => get_theme_support('custom-background', 'default-repeat'),\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n 'theme_supports' => 'custom-background',\n ));\n\n $this->add_control('background_repeat', array(\n 'label' => __('Repeat Background Image'),\n 'section' => 'background_image',\n 'type' => 'checkbox',\n ));\n\n $this->add_setting('background_attachment', array(\n 'default' => get_theme_support('custom-background', 'default-attachment'),\n 'sanitize_callback' => array($this, '_sanitize_background_setting'),\n 'theme_supports' => 'custom-background',\n ));\n\n $this->add_control('background_attachment', array(\n 'label' => __('Scroll with Page'),\n 'section' => 'background_image',\n 'type' => 'checkbox',\n ));\n\n\n // If the theme is using the default background callback, we can update\n // the background CSS using postMessage.\n if (get_theme_support('custom-background', 'wp-head-callback') === '_custom_background_cb') {\n foreach (array('color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment') as $prop) {\n $this->get_setting('background_' . $prop)->transport = 'postMessage';\n }\n }\n\n /*\n\t\t * Static Front Page\n\t\t * See also https://core.trac.wordpress.org/ticket/19627 which introduces the the static-front-page theme_support.\n\t\t * The following replicates behavior from options-reading.php.\n\t\t */\n\n $this->add_section('static_front_page', array(\n 'title' => __('Static Front Page'),\n 'priority' => 120,\n 'description' => __('Your theme supports a static front page.'),\n 'active_callback' => array($this, 'has_published_pages'),\n ));\n\n $this->add_setting('show_on_front', array(\n 'default' => get_option('show_on_front'),\n 'capability' => 'manage_options',\n 'type' => 'option',\n ));\n\n $this->add_control('show_on_front', array(\n 'label' => __('Front page displays'),\n 'section' => 'static_front_page',\n 'type' => 'radio',\n 'choices' => array(\n 'posts' => __('Your latest posts'),\n 'page' => __('A static page'),\n ),\n ));\n\n $this->add_setting('page_on_front', array(\n 'type' => 'option',\n 'capability' => 'manage_options',\n ));\n\n $this->add_control('page_on_front', array(\n 'label' => __('Front page'),\n 'section' => 'static_front_page',\n 'type' => 'dropdown-pages',\n 'allow_addition' => true,\n ));\n\n $this->add_setting('page_for_posts', array(\n 'type' => 'option',\n 'capability' => 'manage_options',\n ));\n\n $this->add_control('page_for_posts', array(\n 'label' => __('Posts page'),\n 'section' => 'static_front_page',\n 'type' => 'dropdown-pages',\n 'allow_addition' => true,\n ));\n\n /* Custom CSS */\n $this->add_section('custom_css', array(\n 'title' => __('Additional CSS'),\n 'priority' => 200,\n 'description_hidden' => true,\n 'description' => sprintf('%s<br /><a href=\"%s\" class=\"external-link\" target=\"_blank\">%s<span class=\"screen-reader-text\">%s</span></a>',\n __('CSS allows you to customize the appearance and layout of your site with code. Separate CSS is saved for each of your themes. In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.'),\n esc_url(__('https://codex.wordpress.org/CSS')),\n __('Learn more about CSS'),\n /* translators: accessibility text */\n __('(opens in a new window)')\n ),\n ));\n\n $custom_css_setting = new WP_Customize_Custom_CSS_Setting($this, sprintf('custom_css[%s]', get_stylesheet()), array(\n 'capability' => 'edit_css',\n 'default' => sprintf(\"/*\\n%s\\n*/\", __(\"You can add your own CSS here.\\n\\nClick the help icon above to learn more.\")),\n ));\n $this->add_setting($custom_css_setting);\n\n $this->add_control('custom_css', array(\n 'type' => 'textarea',\n 'section' => 'custom_css',\n 'settings' => array('default' => $custom_css_setting->id),\n 'input_attrs' => array(\n 'class' => 'code', // Ensures contents displayed as LTR instead of RTL.\n ),\n ));\n }", "title": "" }, { "docid": "e149303e4cabad52cba86a41a3fdbd4b", "score": "0.7467191", "text": "public function add_to_customizer() {\n\t\t$this->fields_from_filters();\n\t\tadd_action( 'customize_register', array( $this, 'add_panels' ), 97 );\n\t\tadd_action( 'customize_register', array( $this, 'add_sections' ), 98 );\n\t\tadd_action( 'customize_register', array( $this, 'add_fields' ), 99 );\n\t}", "title": "" }, { "docid": "d2d03e311570fc48228ac93d2911f94a", "score": "0.7437037", "text": "function basis_add_customizer_sections( $wp_customize ) {\n\t// WPCOM\n\tif ( basis_is_wpcom() ) {\n\t\t// Add the Theme section\n\t\t$wp_customize->add_section(\n\t\t\t'basis_theme',\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Theme', 'basis' ),\n\t\t\t\t'priority' => 161,\n\t\t\t)\n\t\t);\n\t\tbasis_customize_display( $wp_customize, 'basis_theme' );\n\t\tbasis_customize_footer( $wp_customize, 'basis_theme' );\n\t}\n\t// TTF\n\telse {\n\t\t// Add the Display section\n\t\t$wp_customize->add_section(\n\t\t\t'basis_display',\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Display', 'basis' ),\n\t\t\t\t'priority' => 161,\n\t\t\t)\n\t\t);\n\t\tbasis_customize_display( $wp_customize, 'basis_display' );\n\n\t\t// Add the Footer section\n\t\t$wp_customize->add_section(\n\t\t\t'basis_footer',\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Footer', 'basis' ),\n\t\t\t\t'priority' => 162,\n\t\t\t)\n\t\t);\n\t\tbasis_customize_footer( $wp_customize, 'basis_footer' );\n\t}\n}", "title": "" }, { "docid": "868e38d3945b4681991b25a5d40ab4ab", "score": "0.7411317", "text": "function vkmn_customize_register_add_control() {\n\t\tclass MobileNav_Custom_Html extends WP_Customize_Control {\n\t\t\tpublic $type = 'customtext';\n\t\t\tpublic $custom_title_sub = ''; // we add this for the extra custom_html.\n\t\t\tpublic $custom_html = ''; // we add this for the extra custom_html.\n\t\t\tpublic function render_content() {\n\t\t\t\tif ( $this->label ) {\n\t\t\t\t\techo '<h2 class=\"admin-custom-h2\">' . wp_kses_post( $this->label ) . '</h2>';\n\t\t\t\t}\n\t\t\t\tif ( $this->custom_title_sub ) {\n\t\t\t\t\techo '<h3 class=\"admin-custom-h3\">' . wp_kses_post( $this->custom_title_sub ) . '</h3>';\n\t\t\t\t}\n\t\t\t\tif ( $this->custom_html ) {\n\t\t\t\t\techo '<div>' . wp_kses_post( $this->custom_html ) . '</div>';\n\t\t\t\t}\n\t\t\t} // public function render_content() {\n\t\t} // class MobileNav_Custom_Html extends WP_Customize_Control\n\n\t}", "title": "" }, { "docid": "44cbd6a9b132a43799e7fcc44cafe887", "score": "0.74072725", "text": "function thsp_cbp_customize_register( $wp_customize ) {\n\n\t/**\n\t * Custom controls\n\t */\nlocate_template(array('includes/customizer-boilerplate/custom-controls.php'), true, true);\n\n\n\t/*\n\t * Get all the fields using a helper function\n\t */\n\t$thsp_sections = thsp_cbp_get_fields();\n\n\n\t/*\n\t * Get name of DB entry under which options will be stored\n\t */\n\t$thsp_cbp_option = thsp_cbp_option();\n\n\n\t/**\n\t * Loop through the array and add Customizer sections\n\t */\n\tforeach( $thsp_sections as $thsp_section_key => $thsp_section_value ) {\n\n\t\t/**\n\t\t * Adds Customizer section, if needed\n\t\t */\n\t\tif( ! $thsp_section_value['existing_section'] ) {\n\n\t\t\t$thsp_section_args = $thsp_section_value['args'];\n\n\t\t\t// Add section\n\t\t\t$wp_customize->add_section(\n\t\t\t\t$thsp_section_key,\n\t\t\t\t$thsp_section_args\n\t\t\t);\n\n\t\t} // end if\n\n\t\t/*\n\t\t * Loop through 'fields' array in each section\n\t\t * and add settings and controls\n\t\t */\n\t\t$thsp_section_fields = $thsp_section_value['fields'];\n\t\tforeach( $thsp_section_fields as $thsp_field_key => $thsp_field_value ) {\n\n\t\t\t/*\n\t\t\t * Check if 'option' or 'theme_mod' is used to store option\n\t\t\t *\n\t\t\t * If nothing is set, $wp_customize->add_setting method will default to 'theme_mod'\n\t\t\t * If 'option' is used as setting type its value will be stored in an entry in\n\t\t\t * {prefix}_options table. Option name is defined by thsp_cbp_option() function\n\t\t\t */\n\t\t\tif ( isset( $thsp_field_value['setting_args']['type'] ) && 'option' == $thsp_field_value['setting_args']['type'] ) {\n\t\t\t\t$setting_control_id = $thsp_cbp_option . '[' . $thsp_field_key . ']';\n\t\t\t} else {\n\t\t\t\t$setting_control_id = $thsp_field_key;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Add default callback function, if none is defined\n\t\t\t */\n\t\t\tif ( ! isset( $thsp_field_value['setting_args']['sanitize_cb'] ) ) {\n\t\t\t\t$thsp_field_value['setting_args']['sanitize_cb'] = 'thsp_cbp_sanitize_cb';\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Adds Customizer settings\n\t\t\t */\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$setting_control_id,\n\t\t\t\t$thsp_field_value['setting_args']\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Adds Customizer control\n\t\t\t *\n\t\t\t * 'section' value must be added to 'control_args' array\n\t\t\t * so control can get added to current section\n\t\t\t */\n\t\t\t$thsp_field_value['control_args']['section'] = $thsp_section_key;\n\n\t\t\t/*\n\t\t\t * $wp_customize->add_control method requires 'choices' to be a simple key => value pair\n\t\t\t */\n\t\t\tif ( isset( $thsp_field_value['control_args']['choices'] ) ) {\n\t\t\t\t$thsp_cbp_choices = array();\n\t\t\t\tforeach( $thsp_field_value['control_args']['choices'] as $thsp_cbp_choice_key => $thsp_cbp_choice_value ) {\n\t\t\t\t\t$thsp_cbp_choices[$thsp_cbp_choice_key] = $thsp_cbp_choice_value['label'];\n\t\t\t\t}\n\t\t\t\t$thsp_field_value['control_args']['choices'] = $thsp_cbp_choices;\n\t\t\t}\n\n\n\t\t\t// Check\n\t\t\tif ( 'color' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} elseif ( 'image' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew WP_Customize_Image_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} elseif ( 'upload' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew WP_Customize_Upload_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} elseif ( 'number' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew CBP_Customizer_Number_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} elseif ( 'textarea' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew CBP_Customizer_Textarea_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} elseif ( 'images_radio' == $thsp_field_value['control_args']['type'] ) {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew CBP_Customizer_Images_Radio_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\t$setting_control_id,\n\t\t\t\t\t$thsp_field_value['control_args']\n\t\t\t\t);\n\t\t\t}\n\n\t\t} // end foreach\n\n\t} // end foreach\n\n\n\t// Remove built-in Customizer sections\n\t$thsp_cbp_remove_sections = apply_filters( 'tshp_cbp_remove_sections', array() );\n\tif ( is_array( $thsp_cbp_remove_sections) ) {\n\t\tforeach( $thsp_cbp_remove_sections as $thsp_cbp_remove_section ) {\n\t\t\t$wp_customize->remove_section( $thsp_cbp_remove_section );\n\t\t}\n\t}\n\n\t// Remove built-in Customizer settings\n\t$thsp_cbp_remove_settings = apply_filters( 'tshp_cbp_remove_settings', array() );\n\tif ( is_array( $thsp_cbp_remove_settings) ) {\n\t\tforeach( $thsp_cbp_remove_settings as $thsp_cbp_remove_setting ) {\n\t\t\t$wp_customize->remove_setting( $thsp_cbp_remove_setting );\n\t\t}\n\t}\n\n\t// Remove built-in Customizer controls\n\t$thsp_cbp_remove_controls = apply_filters( 'tshp_cbp_remove_controls', array() );\n\tif ( is_array( $thsp_cbp_remove_controls) ) {\n\t\tforeach( $thsp_cbp_remove_controls as $thsp_cbp_remove_control ) {\n\t\t\t$wp_customize->remove_control( $thsp_cbp_remove_control );\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "288c8d21095f2db0dda91b8aa1119427", "score": "0.7390557", "text": "function room_customizer_register_controls( $wp_customize ) {\n\t\t// ---------------------------------\n\t\t\n\t\t// Remove unused sections\n\t\t$wp_customize->remove_section( 'colors');\n\t\t$wp_customize->remove_section( 'static_front_page');\n\n\t\t// Reorder standard WP sections\n\t\t$wp_customize->get_panel( 'nav_menus' )->priority = 30;\n\t\t$wp_customize->get_panel( 'widgets' )->priority = 40;\n\t\t$wp_customize->get_section( 'title_tagline' )->priority = 50;\n\t\t$wp_customize->get_section( 'background_image' )->priority = 60;\n\t\t$wp_customize->get_section( 'header_image' )->priority = 80;\n\t\t\n\t\t// Modify standard WP controls\n\t\t$wp_customize->get_control( 'blogname' )->description = esc_html__('Use \"[[\" and \"]]\" to modify style and color of parts of the text, \"||\" to break current line', 'room');\n\t\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t\t\n\t\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t\t\n\t\t$sec = $wp_customize->get_section( 'background_image' );\n\t\t$sec->title = esc_html__('Background', 'room');\n\t\t$sec->description = esc_html__('Used only if \"Content - Body style\" equal to \"boxed\"', 'room');\n\t\t\n\t\t// Move standard option 'Background Color' to the section 'Background Image'\n\t\t$wp_customize->add_setting( 'background_color', array(\n\t\t\t'default' => get_theme_support( 'custom-background', 'default-color' ),\n\t\t\t'theme_supports' => 'custom-background',\n\t\t\t'transport'\t\t => 'postMessage',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'background_color', array(\n\t\t\t'label' => esc_html__( 'Background color', 'room' ),\n\t\t\t'section' => 'background_image',\n\t\t) ) );\n\t\t\n\t\t/*\n\t\t$sec = $wp_customize->get_section( 'colors' );\n\t\tif ( is_object($sec) ) {\n\t\t\t$sec->title = esc_html__('Background color', 'room');\n\t\t\t$sec->description = esc_html__('Used only if \"Content - Body style\" equal to \"boxed\"', 'room');\n\t\t\t$sec->priority = 70;\n\t\t}\n\t\t*/\n\n\t\t// Add Theme specific controls\n\t\t// ---------------------------------\n\t\t$cur_section = '';\n\t\t$i = 0;\n\t\t$options = room_storage_get('options');\n\t\tforeach ($options as $id=>$opt) {\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\tif (!empty($opt['hidden'])) continue;\n\t\t\t\n\t\t\tif ($opt['type'] == 'section') {\n\n\t\t\t\t$sec = $wp_customize->get_section( $id );\n\t\t\t\tif ( is_object($sec) && !empty($sec->title) ) {\n\t\t\t\t\t$sec->title = $opt['title'];\n\t\t\t\t\t$sec->description= $opt['desc'];\n\t\t\t\t\tif ( !empty($opt['priority']) )\t$sec->priority = $opt['priority'];\n\t\t\t\t} else {\n\t\t\t\t\t$wp_customize->add_section( esc_attr($id) , array(\n\t\t\t\t\t\t'title' => $opt['title'],\n\t\t\t\t\t\t'description'=> $opt['desc'],\n\t\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\t$cur_section = $id;\n\n\t\t\t} else if ($opt['type'] == 'select') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => $opt['options']\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'radio') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'choices' => $opt['options']\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'switch') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new Room_Customize_Switch_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'choices' => $opt['options']\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'checkbox') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'color') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'image') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'info') {\n\t\t\t\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => 'postMessage'\n\t\t\t\t) );\n\n\t\t\t\t$wp_customize->add_control( new Room_Customize_Info_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else {\t// if ($opt['type'] == 'text') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => room_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'room_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($cur_section),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t) );\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "d2f63a3cae9310436c9335706938965d", "score": "0.73555106", "text": "function themename_customize_register($wp_customize){\r\n \r\n $wp_customize->add_section('themename_color_scheme', array(\r\n 'title' => __('Color Scheme', 'themename'),\r\n 'priority' => 120,\r\n ));\r\n // =============================\r\n // = Text Input =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[text_test]', array(\r\n 'default' => 'q !',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control('themename_text_test', array(\r\n 'label' => __('Text Test', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'settings' => 'themename_theme_options[text_test]',\r\n ));\r\n // =============================\r\n // = Radio Input =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[color_scheme]', array(\r\n 'default' => 'value2',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control('themename_color_scheme', array(\r\n 'label' => __('Color Scheme', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'settings' => 'themename_theme_options[color_scheme]',\r\n 'type' => 'radio',\r\n 'choices' => array(\r\n 'value1' => 'Choice 1',\r\n 'value2' => 'Choice 2',\r\n 'value3' => 'Choice 3',\r\n ),\r\n ));\r\n // =============================\r\n // = Checkbox =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[checkbox_test]', array(\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control('display_header_text', array(\r\n 'settings' => 'themename_theme_options[checkbox_test]',\r\n 'label' => __('Display Header Text'),\r\n 'section' => 'themename_color_scheme',\r\n 'type' => 'checkbox',\r\n ));\r\n // =============================\r\n // = Select Box =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[header_select]', array(\r\n 'default' => 'value2',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control( 'example_select_box', array(\r\n 'settings' => 'themename_theme_options[header_select]',\r\n 'label' => 'Select Something:',\r\n 'section' => 'themename_color_scheme',\r\n 'type' => 'select',\r\n 'choices' => array(\r\n 'value1' => 'Choice 1',\r\n 'value2' => 'Choice 2',\r\n 'value3' => 'Choice 3',\r\n ),\r\n ));\r\n // =============================\r\n // = Image Upload =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[image_upload_test]', array(\r\n 'default' => 'image.jpg',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'image_upload_test', array(\r\n 'label' => __('Image Upload Test', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'settings' => 'themename_theme_options[image_upload_test]',\r\n )));\r\n // =============================\r\n // = File Upload =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[upload_test]', array(\r\n 'default' => 'abcdefg',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize, 'upload_test', array(\r\n 'label' => __('Upload Test', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'settings' => 'themename_theme_options[upload_test]',\r\n )));\r\n // =============================\r\n // = Color Picker =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[link_color]', array(\r\n 'default' => '000',\r\n 'sanitize_callback' => 'sanitize_hex_color',\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(\r\n 'label' => __('Link Color', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'settings' => 'themename_theme_options[link_color]',\r\n )));\r\n // =============================\r\n // = Page Dropdown =\r\n // =============================\r\n $wp_customize->add_setting('themename_theme_options[page_test]', array(\r\n 'capability' => 'edit_theme_options',\r\n 'type' => 'option',\r\n ));\r\n $wp_customize->add_control('themename_page_test', array(\r\n 'label' => __('Page Test', 'themename'),\r\n 'section' => 'themename_color_scheme',\r\n 'type' => 'dropdown-pages',\r\n 'settings' => 'themename_theme_options[page_test]',\r\n ));\r\n}", "title": "" }, { "docid": "ff12acf8bc41bff54d3a1dd0eee0d9f4", "score": "0.73490953", "text": "public function add_control( $wp_customize ) {}", "title": "" }, { "docid": "171ede91fcb0c60c529239b022bd131e", "score": "0.7337786", "text": "function mytheme_customize_register($wp_customize) {\n $wp_customize->add_section(\"my_custom_section\", array(\n \"title\" => __(\"My custom settings\", \"customizer_custom_section\"),\n \"priority\" => 20,\n ));\n // the first argument of add_setting function is the name of the control\n $wp_customize->add_setting(\"my_custom_message\", array(\n \"default\" => \"\",\n \"transport\" => \"refresh\"\n ));\n // ------------settings\n $wp_customize->add_setting(\"color_picker\", array(\n \"default\" => \"#666666\",\n \"transport\" => \"refresh\"\n ));\n $wp_customize->add_setting(\"custom_image\", array(\n \"default\" => \"\",\n \"transport\" => \"refresh\"\n ));\n $wp_customize->add_setting(\"my_custom_number\", array(\n \"default\" => \"\",\n \"transport\" => \"refresh\",\n ));\n $wp_customize->add_setting(\"my_custom_select\", array(\n \"default\" => \"\",\n \"transport\" => \"refresh\",\n ));\n $wp_customize->add_setting(\"select_column_count\", array(\n \"default\" => \"\",\n \"transport\" => \"refresh\",\n ));\n // --------------controls\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, \"my_custom_message\", array(\n \"label\" => __(\"Enter a custom message here\", \"customizer_control_label\"),\n \"section\" => \"my_custom_section\",\n \"setting\" => \"my_custom_message\",\n \"type\" => \"textarea\"\n )\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, \"color_picker\", array(\n 'label' => 'Hyperlink colors',\n 'section' => 'my_custom_section',\n 'settings' => 'color_picker'\n )\n ));\n $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, \"custom_image\", array(\n 'label' => 'Edit My Image',\n 'settings' => 'custom_image',\n 'section' => 'my_custom_section'\n\n )\n ));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize,\"my_custom_number\",\n array(\n \"label\" => __(\"Enter Custom number\", \"customizer_control_label\"),\n \"section\" => \"my_custom_section\",\n \"settings\" => \"my_custom_number\",\n \"type\" => \"number\",\n )\n ));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize,\"my_custom_select\",\n array(\n \"label\" => __(\"Dark mode theme\", \"customizer_select_label\"),\n \"section\" => \"my_custom_section\",\n \"settings\" => \"my_custom_select\",\n \"type\" => \"select\",\n \"choices\" => array(\n 'default' => 'Default - off',\n 'enabled' => 'Enabled'\n )\n )\n ));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize,\"select_column_count\",\n array(\n \"label\" => __(\"Select the amount of columns for posts\", \"customizer_select_label2\"),\n \"section\" => \"my_custom_section\",\n \"settings\" => \"select_column_count\",\n \"type\" => \"select\",\n \"choices\" => array(\n 'default' => '4 Columns default',\n '3cols' => '3 Columns',\n '2cols' => '2 Columns',\n '1col' => '1 Columns'\n )\n )\n ));\n}", "title": "" }, { "docid": "9023df6b05469090e201c6fd8f8be9a3", "score": "0.7309166", "text": "function pe_customize_register($wp_customize)\n{\n $wp_customize->register_panel_type('PE_WP_Customize_Panel');\n $wp_customize->register_section_type('PE_WP_Customize_Section');\n\n\n // Below this there is only demo code, safe to delete and add your own\n // panels/sections/controls\n\n // Add three levels on panels\n $lvl1ParentPanel = new PE_WP_Customize_Panel($wp_customize, 'lvl_1_parent_panel', array(\n 'title' => 'Level 1',\n 'priority' => 131,\n ));\n\n $wp_customize->add_panel($lvl1ParentPanel);\n\n $lvl2ParentPanel = new PE_WP_Customize_Panel($wp_customize, 'lvl_2_parent_panel', array(\n 'title' => 'Level 2',\n 'panel' => 'lvl_1_parent_panel',\n ));\n\n $wp_customize->add_panel($lvl2ParentPanel);\n\n $lvl3ParentPanel = new PE_WP_Customize_Panel($wp_customize, 'lvl_3_parent_panel', array(\n 'title' => 'Level 3',\n 'panel' => 'lvl_2_parent_panel',\n 'priority' => 1,\n ));\n\n $wp_customize->add_panel($lvl3ParentPanel);\n\n // Add example section and controls to the final (third) panel\n $wp_customize->add_section('pe_section', array(\n 'title' => 'Section Test',\n 'panel' => 'lvl_3_parent_panel',\n ));\n\n $wp_customize->add_setting('pe_test', array(\n 'default' => 'default value here',\n 'sanitize_callback' => 'wp_kses_post',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('pe_test', array(\n 'type' => 'text',\n 'label' => 'Some text control',\n 'section' => 'pe_section',\n ));\n\n // Add example section and controls to the middle (second) panel\n $wp_customize->add_section('pe_section_2', array(\n 'title' => 'Section 2 Test',\n 'panel' => 'lvl_2_parent_panel',\n 'priority' => 2,\n ));\n\n $wp_customize->add_setting('pe_test_2', array(\n 'default' => 'default value here',\n 'sanitize_callback' => 'wp_kses_post',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('pe_test_2', array(\n 'type' => 'text',\n 'label' => 'Some text control 2',\n 'section' => 'pe_section_2',\n ));\n\n // Add example section and controls to another section\n $lvl1ParentSection = new PE_WP_Customize_Section($wp_customize, 'lvl_1_parent_section', array(\n 'title' => 'Level 1 Section',\n 'panel' => 'lvl_3_parent_panel',\n ));\n\n $wp_customize->add_section($lvl1ParentSection);\n\n $lv21ParentSection = new PE_WP_Customize_Section($wp_customize, 'lvl_2_parent_section', array(\n 'title' => 'Level 2 Section',\n 'section' => 'lvl_1_parent_section',\n 'panel' => 'lvl_3_parent_panel',\n ));\n\n $wp_customize->add_section($lv21ParentSection);\n\n $wp_customize->add_setting('pe_test_3', array(\n 'default' => 'default value here',\n 'sanitize_callback' => 'wp_kses_post',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('pe_test_3', array(\n 'type' => 'text',\n 'label' => 'Some text control 3',\n 'section' => 'lvl_2_parent_section',\n ));\n\n}", "title": "" }, { "docid": "f68d2e4a9975dc749a1065d6f084a15a", "score": "0.73050535", "text": "public static function ajout_personnalisation_services($wp_customize)\n{\n\n $wp_customize->add_panel('services-panel', [\n 'title' => __('Page Services'),\n 'description' => __('Personnalisation de la page Services')\n ]);\n// Section services items\n $wp_customize->add_section( 'items-text' , [\n 'panel' => 'services-panel',\n 'title' => __('Section Services : Personnalisation'),\n 'description' => __('Personnalisation du texte')\n ]);\n\n// Section services projets\n $wp_customize->add_section( 'projets-text' , [\n 'panel' => 'services-panel',\n 'title' => __('Section Projets : Personnalisation'),\n 'description' => __('Personnalisation du texte')\n ]);\n\n// Setting services items\n$wp_customize->add_setting('services-text-top-right', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n$wp_customize->add_setting('services-text-top-middle', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n\n$wp_customize->add_setting('services-text-top-left', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n\n// Setting services projets\n$wp_customize->add_setting('projets-text-top-right', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n$wp_customize->add_setting('projets-text-top-middle', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n\n$wp_customize->add_setting('projets-text-top-left', [\n 'type' => 'theme_mod',\n 'sanitize_callback' => 'sanitize_textarea_field'\n]);\n\n// Control services items\n\n $wp_customize->add_control('services-text-top-left-control',\n [\n 'section' => 'items-text',\n 'settings' => 'services-text-top-left',\n 'label' => __('Titre de la section à gauche'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n $wp_customize->add_control('services-text-top-middle-control',\n [\n 'section' => 'items-text',\n 'settings' => 'services-text-top-middle',\n 'label' => __('Titre de la section en vert'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n $wp_customize->add_control('services-text-top- right-control',\n [\n 'section' => 'items-text',\n 'settings' => 'services-text-top-right',\n 'label' => __('Titre de la section à droite'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n\n // Control services projets\n\n $wp_customize->add_control('projets-text-top-left-control',\n [\n 'section' => 'projets-text',\n 'settings' => 'projets-text-top-left',\n 'label' => __('Titre de la section à gauche'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n $wp_customize->add_control('projets-text-top-middle-control',\n [\n 'section' => 'projets-text',\n 'settings' => 'projets-text-top-middle',\n 'label' => __('Titre de la section en vert'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n $wp_customize->add_control('projets-text-top- right-control',\n [\n 'section' => 'projets-text',\n 'settings' => 'projets-text-top-right',\n 'label' => __('Titre de la section à droite'),\n 'description' => __('Personnalisez le titre'),\n 'type' => 'textarea'\n ]);\n\n }", "title": "" }, { "docid": "0c0aa3d81901cc4745474e55a5e014cf", "score": "0.7283703", "text": "function fs_customize_register($wp_customize) {\n\t \n\t// Create Some Sections\n\t$wp_customize->add_section('fs_color_section', array(\n\t\t'title' \t\t=> __('Theme Colors', 'from-scratch'),\n\t\t'description' \t=> __('Colors customisation', 'from-scratch'),\n\t\t'priority'\t\t=> 30,\n\t));\n\t$wp_customize->add_section('fs_pictures_section', array(\n\t\t'title' \t\t=> __('Theme Pictures', 'from-scratch'),\n\t\t'description' \t=> __('Pictures customisation', 'from-scratch'),\n\t\t'priority'\t\t=> 40,\n\t));\n\t\n\t\n\t// Primary color\n\t\n\t$wp_customize->add_setting('primary_color', array(\n\t\t'default'\t\t\t=> '9c0',\n\t\t'sanitize_callback'\t=> 'sanitize_hex_color',\n\t\t'capability'\t\t=> 'edit_theme_options',\n\t\t'type'\t\t\t\t=> 'theme_mod',\n\t\t'transport'\t\t\t=> 'refresh', \n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_control($wp_customize, 'primary_color_ctrl', array(\n\t\t'label'\t\t=> __('Primary color', 'from-scratch'),\n\t\t'section'\t=> 'colors',\n\t\t'settings'\t=> 'primary_color',\n\t)));\n\t\n\t\n\t// Secondary color\n\t\n\t$wp_customize->add_setting('secondary_color', array(\n\t\t'default'\t\t\t=> '606060',\n\t\t'sanitize_callback'\t=> 'sanitize_hex_color',\n\t\t'capability'\t\t=> 'edit_theme_options',\n\t\t'type'\t\t\t\t=> 'theme_mod',\n\t\t'transport'\t\t\t=> 'refresh', \n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_control($wp_customize, 'secondary_color_ctrl', array(\n\t\t'label'\t\t=> __('Secondary color', 'from-scratch'),\n\t\t'section'\t=> 'colors',\n\t\t'settings'\t=> 'secondary_color',\n\t)));\n\t\n\t\n\t// Footer text\n\t\n\t$wp_customize->add_setting('footer_text', array(\n\t\t'default'\t\t\t\t=> '',\n\t\t'sanitize_callback'\t\t=> 'sanitize_text_field'\n\t));\n\t$wp_customize->add_control('footer_text_ctrl', array(\n\t\t'label'\t\t\t=> __('Custom footer text', 'from-scratch'),\n\t\t'description'\t=> __('Add a custom text instead of the year and blog name.', 'from-scratch'),\n\t\t'section'\t\t=> 'title_tagline',\n\t\t'settings'\t\t=> 'footer_text',\n\t));\t\n\t\n\t// WP Credits\n\t\n\t$wp_customize->add_setting('display_wp', array(\n\t\t'default'\t\t\t\t=> true,\n\t\t'sanitize_callback'\t\t=> 'fs_customizer_sanitize_checkbox'\n\t));\n\t\n\t$wp_customize->add_control('display_wp_ctrl', array(\n\t\t'type'\t\t\t=> 'checkbox',\n\t\t'label'\t\t\t=> __('Display WordPress Link', 'from-scratch'),\n\t\t'section'\t\t=> 'title_tagline',\n\t\t'settings'\t\t=> 'display_wp',\n\t));\n\t\n\t// Site logo\n\t\n\t$wp_customize->add_setting('site_logo', array(\n\t\t'default'\t\t\t\t=> '',\n\t\t'sanitize_callback'\t\t=> 'esc_url_raw'\n\t));\n\t\n\t$wp_customize->add_control( new WP_Customize_Image_control($wp_customize, 'site_logo_ctrl', array(\n\t\t'label'\t\t\t=> __('Site Logo', 'from-scratch'),\n\t\t'section'\t\t=> 'title_tagline',\n\t\t'settings'\t\t=> 'site_logo',\n\t)));\n\t\n\t\n\t\n\t \n}", "title": "" }, { "docid": "ada7825b895821e3af916e70a3542e7a", "score": "0.7225744", "text": "function wildbirds_customize_register($wp_customize){\n //All our sections, settings, and controls will be added here\n \n //-------------------------------- BACKGROUND COLOR -----------------------------------------------//\n $wp_customize->add_setting( 'wildbirds_backgroundColor' , array(\n 'default' => '#ffffff',\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wildbirds_backgroundColor', array(\n 'label' => __( 'Background Colour', 'wildbirds' ),\n 'description' => 'Change the background Colour',\n 'section' => 'colors',\n 'settings' => 'wildbirds_backgroundColor',\n ) ) );\n\n\n $wp_customize->add_section('homepage_content', array(\n 'title' => __('Homepage Content', 'wildbirds'),\n 'description' => sprintf(__('Options for home page','wildbirds')),\n 'priority' => 130\n));\n$wp_customize->add_setting('homepage_banner_image', array(\n 'default' => get_bloginfo('template_directory').'/images/glennstory.jpg',\n \n 'type' => 'theme_mod'\n));\n\n// $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'homepage_banner_image', array(\n// 'label' => __('Banner Image', 'wildbirds'),\n// 'section' => 'homepage_content',\n// 'settings' => 'homepage_banner_image',\n// 'priority'=> 1\n// )));\n\n}", "title": "" }, { "docid": "79ea5daf802582fce5e0813b65e88196", "score": "0.7210023", "text": "function eightstore_lite_custom_customize_register( $wp_customize ) {\r\n\t//Adding the General Setup Panel\r\n\t$wp_customize->add_panel('general_setups',array(\r\n\t\t'priority' => '10',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'title' => __('General Setup','eightstore-lite'),\r\n\t\t'description' => __('Manage General Setup for the site','eightstore-lite')\r\n\t));\r\n\r\n\t//Add Default Sections to General Panel\r\n\t$wp_customize->get_section('title_tagline')->panel = 'general_setups'; //priority 20\r\n\t$wp_customize->get_section('colors')->panel = 'general_setups'; //priority 40\r\n\t$wp_customize->get_section('header_image')->panel = 'general_setups'; //priority 60\r\n\t$wp_customize->get_section('background_image')->panel = 'general_setups'; //priority 80\r\n\t//$wp_customize->get_section('nav')->panel = 'general_setups'; //priority 100\r\n\t$wp_customize->get_section('static_front_page')->panel = 'general_setups'; //priority 120\r\n\r\n\tif ( isset( $wp_customize->selective_refresh ) ) {\r\n\t\t$wp_customize->selective_refresh->add_partial( 'header_image', array(\r\n\t\t\t'selector' => '.header-image',\r\n\t\t\t'container_inclusive' => true,\r\n\t\t) );\r\n\t\t$wp_customize->selective_refresh->add_partial( 'blogname', array(\r\n\t\t\t'selector' => '.site-titles',\r\n\t\t\t'container_inclusive' => true,\r\n\t\t) );\r\n\t}\r\n\r\n\t$wp_customize->add_section('header_search',array(\r\n\t\t'title' => __('Header Search Setting','eightstore-lite'),\r\n\t\t'priority' => '25',\r\n\t\t'panel' => 'general_setups'\r\n\t));\r\n\t$wp_customize->add_setting('hide_header_search',array(\r\n\t\t'default' => '0',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'hide_header_search',array(\r\n\t\t'type' => 'switch',\r\n\t\t'label' => __('Hide Search From Header','eightstore-lite'),\r\n\t\t'description' => __('Selecting Yes will Hide Search Bar From Header','eightstore-lite'),\r\n\t\t'section' => 'header_search'\r\n\t)));\r\n\t\r\n\t//Webpage Layout\r\n\t$wp_customize->add_section('webpage_layout',array(\r\n\t\t'title' => __('Layout Setting', 'eightstore-lite'),\r\n\t\t'priority' => '140',\r\n\t\t'panel' => 'general_setups',\r\n\t));\r\n\r\n\t$wp_customize->add_setting('webpage_layout',array(\r\n\t\t'default' => 'fullwidth',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_radio_webpagelayout'\r\n\t));\r\n\r\n\t$wp_customize->add_control('webpage_layout',array(\r\n\t\t'type' => 'radio',\r\n\t\t'label' => __('Website Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Make your website either box layout or full width from click away', 'eightstore-lite'),\r\n\t\t'section' => 'webpage_layout',\r\n\t\t'choices' => array(\r\n\t\t\t'boxed' => __('Boxed Layout', 'eightstore-lite'),\r\n\t\t\t'fullwidth' => __('Full Width', 'eightstore-lite')\r\n\t\t)\r\n\t));\r\n\t\r\n\t//Responsive Setting\r\n\t$wp_customize->add_section('responsive_setting',\r\n\t\tarray(\r\n\t\t\t'title' => __('Responsive Mode', 'eightstore-lite'),\r\n\t\t\t'priority' => '160',\r\n\t\t\t'panel' => 'general_setups'\r\n\t\t)\r\n\t);\r\n\r\n\t$wp_customize->add_setting('is_mode_responsive',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'is_mode_responsive',array(\r\n\t\t'type' => 'switch',\r\n\t\t'label' => __('Disable Responsive Design', 'eightstore-lite'),\r\n\t\t'description' => __('Selecting Yes will disable the responsive design','eightstore-lite'),\r\n\t\t'section' => 'responsive_setting'\r\n\t)));\r\n\r\n\t//Add New Panel for topheader Setups\r\n\t$wp_customize->add_panel('home_topheader_setups',array(\r\n\t\t'priority' => '10',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'title' => __( 'Top Header Setup', 'eightstore-lite' ),\r\n\t\t'description' => __( 'Setup the ticker,call to for top header', 'eightstore-lite' ),\r\n\t));\r\n\r\n\t$wp_customize->add_section('eightstore_ticker',array(\r\n\t\t'title' => __('Ticker Setting', 'eightstore-lite'),\r\n\t\t'priority' => '2',\r\n\t\t'panel' => 'home_topheader_setups'\r\n\t));\r\n\r\n\t$wp_customize->add_setting('eightstore_ticker_checkbox',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_ticker_checkbox',array(\r\n\t\t'section' => 'eightstore_ticker',\r\n\t\t'label' => __('Enable Ticker', 'eightstore-lite'),\r\n\t\t'type' => 'switch',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t//ticker title\r\n\t$wp_customize->add_setting('eightstore_ticker_title',array(\r\n\t\t'default' => 'Latest',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text'\r\n\t));\r\n\t$wp_customize->add_control('eightstore_ticker_title',array(\r\n\t\t'section' => 'eightstore_ticker',\r\n\t\t'label' => __('Ticker Title', 'eightstore-lite'),\r\n\t\t'type' => 'text'\r\n\t));\r\n\r\n\t//select category for ticker\r\n\t$wp_customize->add_setting('ticker_setting_category',array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_Category_Control( $wp_customize,'ticker_setting_category', array(\r\n\t\t'label' => __('Select a category to show in ticker','eightstore-lite'),\r\n\t\t'section' => 'eightstore_ticker',\r\n\t)));\r\n\r\n\t$wp_customize->add_section('top_header_callto',array(\r\n\t\t'title' => __('Top Header Call-To','eightstore-lite'),\r\n\t\t'priority' => '10',\r\n\t\t'panel' => 'home_topheader_setups'\r\n\t));\r\n\t$wp_customize->add_setting('callto_text',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t\t'transport' => 'postMessage'\r\n\t));\r\n\t$wp_customize->add_control('callto_text',array(\r\n\t\t'type' => 'textarea',\r\n\t\t'label' => __('Call To Content','eightstore-lite'),\r\n\t\t'description' => 'Enter text or HTML for call to action',\r\n\t\t'section' => 'top_header_callto'\r\n\t));\r\n\r\n\t//Add New Panel for Homepage Sections\r\n\t$wp_customize->add_panel('homepage_sections',array(\r\n\t\t'priority' => '20',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'title' => __( 'Homepage Sections', 'eightstore-lite' ),\r\n\t\t'description' => __( 'Setup some sections of homepage, Some sections are available from widgets', 'eightstore-lite' ),\r\n\t));\r\n\r\n\t//Slider Baisc setup sections\r\n\t$wp_customize->add_section('gs_slider',array(\r\n\t\t'priority' => '10',\r\n\t\t'title' => __( 'Slider Setup', 'eightstore-lite' ),\r\n\t\t'description' => __( 'Setup the slider banner and other settings for homepage', 'eightstore-lite' ),\r\n\t\t'panel' => 'homepage_sections'\r\n\t));\r\n\t$wp_customize->add_setting('display_slider',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'display_slider',array(\r\n\t\t'type' => 'switch_yesno',\r\n\t\t'label' => __('Display Slider on Homepage', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\r\n\t//select category for slider\r\n\t$wp_customize->add_setting('slider_setting_category',array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_Category_Control( $wp_customize,'slider_setting_category', array(\r\n\t\t'label' => __('Select a category to show in slider','eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('display_pager',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'display_pager',array(\r\n\t\t'type' => 'switch_yesno',\r\n\t\t'label' => __('Display Pagers of Slider', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t$wp_customize->add_setting('display_controls',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'display_controls',array(\r\n\t\t'type' => 'switch_yesno',\r\n\t\t'label' => __('Display Controls of Slider', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t$wp_customize->add_setting('enable_auto_transition',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'enable_auto_transition',array(\r\n\t\t'type' => 'switch_yesno',\r\n\t\t'label' => __('Turn on auto transition of slider', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t//transition type\r\n\t$wp_customize->add_setting('transition_type', array(\r\n\t\t'default' => 'false',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_transition_type'\r\n\t));\r\n\r\n\t$wp_customize->add_control('transition_type', array(\r\n\t\t'type' => 'select',\r\n\t\t'label' => __('Transition Type(Slide/Fade)', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'choices' => array(\r\n\t\t\t'true' => __('Fade', 'eightstore-lite'),\r\n\t\t\t'false' => __('Slide', 'eightstore-lite'),\r\n\t\t)\r\n\t));\r\n\t$wp_customize->add_setting('transition_speed',array(\r\n\t\t'default' => '1000',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text'\r\n\t));\r\n\t$wp_customize->add_control('transition_speed',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Transition Speed', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t));\r\n\t$wp_customize->add_setting('display_captions',array(\r\n\t\t'default' => '1',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'display_captions',array(\r\n\t\t'type' => 'switch_yesno',\r\n\t\t'label' => __('Display Captions over Slider', 'eightstore-lite'),\r\n\t\t'description' => __('Display titles and description over Slider', 'eightstore-lite'),\r\n\t\t'section' => 'gs_slider',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\r\n\t//section block below slider\r\n\t$wp_customize->add_section('eightstore_category_promo',array(\r\n\t\t'title' => __('Promotional Block Below Slider', 'eightstore-lite'),\r\n\t\t'priority' => '20',\r\n\t\t'panel' => 'homepage_sections'\r\n\t));\r\n\r\n\t//select category for promotional block\r\n\t$wp_customize->add_setting('es_category_promo_setting_category',array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_Category_Control( $wp_customize,'es_category_promo_setting_category', array(\r\n\t\t'label' => __('Select a category to show in Category Promotional Block','eightstore-lite'),\r\n\t\t'section' => 'eightstore_category_promo',\r\n\t)));\r\n\r\n\t//newsletter section\r\n\t$wp_customize->add_section('eightstore_form',array(\r\n\t\t'title' => __('Newsletter Form Setting', 'eightstore-lite'),\r\n\t\t'priority' => '30',\r\n\t\t'panel' => 'homepage_sections'\r\n\t));\r\n\r\n\t//testimonial title\r\n\t$wp_customize->add_setting('eightstore_form_shortcode',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text'\r\n\t));\r\n\t$wp_customize->add_control('eightstore_form_shortcode',array(\r\n\t\t'section' => 'eightstore_form',\r\n\t\t'label' => __('Newsletter Form Shortcode', 'eightstore-lite'),\r\n\t\t'description' => __('Add form shortcode e.g.[ufbl form_id=\"1\"]', 'eightstore-lite'),\r\n\t\t'type' => 'text'\r\n\t));\r\n\r\n\t//blog section\r\n\t$wp_customize->add_section('eightstore_blog',array(\r\n\t\t'title' => __('Blog Setting', 'eightstore-lite'),\r\n\t\t'priority' => '30',\r\n\t\t'panel' => 'homepage_sections'\r\n\t));\r\n\r\n\t$wp_customize->add_setting('eightstore_blog_section',array(\r\n\t\t'default' => '0',\r\n\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_blog_section',array(\r\n\t\t'section' => 'eightstore_blog',\r\n\t\t'label' => __('Enable Blog Section', 'eightstore-lite'),\r\n\t\t'type' => 'switch',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t\r\n\t//blog title\r\n\t$wp_customize->add_setting('eightstore_blog_title',array(\r\n\t\t'default' => 'Our Blogs',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text'\r\n\t));\r\n\t$wp_customize->add_control('eightstore_blog_title',array(\r\n\t\t'section' => 'eightstore_blog',\r\n\t\t'label' => __('Blog Title', 'eightstore-lite'),\r\n\t\t'type' => 'text'\r\n\t));\r\n\r\n\t//select category for blog\r\n\t$wp_customize->add_setting('eightstore_blog_setting_category',array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_Category_Control( $wp_customize,'eightstore_blog_setting_category', array(\r\n\t\t'label' => __('Select a category to show in blog','eightstore-lite'),\r\n\t\t'section' => 'eightstore_blog',\r\n\t)));\r\n\r\n\t//testimonial section\r\n\t$wp_customize->add_section('eightstore_testimonial',array(\r\n\t\t'title' => __('Testimonial Setting', 'eightstore-lite'),\r\n\t\t'priority' => '40',\r\n\t\t'panel' => 'homepage_sections'\r\n\t));\r\n\r\n\t$wp_customize->add_setting('eightstore_testimonial_section',array(\r\n\t\t'default' => '0',\r\n\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_testimonial_section',array(\r\n\t\t'section' => 'eightstore_testimonial',\r\n\t\t'label' => __('Enable Testimonial Section', 'eightstore-lite'),\r\n\t\t'type' => 'switch',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\t\r\n\t//testimonial title\r\n\t$wp_customize->add_setting('eightstore_testimonial_title',array(\r\n\t\t'default' => 'Our Testimonials',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text'\r\n\t));\r\n\t$wp_customize->add_control('eightstore_testimonial_title',array(\r\n\t\t'section' => 'eightstore_testimonial',\r\n\t\t'label' => __('Testimonial Title', 'eightstore-lite'),\r\n\t\t'type' => 'text'\r\n\t));\r\n\r\n\t//select category for testimonial\r\n\t$wp_customize->add_setting('eightstore_testimonial_setting_category',array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_Category_Control( $wp_customize,'eightstore_testimonial_setting_category', array(\r\n\t\t'label' => __('Select a category to show in testimonial','eightstore-lite'),\r\n\t\t'section' => 'eightstore_testimonial',\r\n\t)));\r\n\r\n\t\t//Adding the Inner Pages Panel\r\n\t$wp_customize->add_panel('inner_page_setups',array(\r\n\t\t'priority' => '25',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'title' => __('Inner Page Setup','eightstore-lite'),\r\n\t\t'description' => __('Manage inner page setup for the site','eightstore-lite')\r\n\t));\r\n\t\t//single page landing page layout\r\n\t\r\n\t//Single Page\r\n\t$wp_customize->add_section('single_page_settings',array(\r\n\t\t'title' => __('Single Page Settings', 'eightstore-lite'),\r\n\t\t'priority' => '150',\r\n\t\t'panel' => 'inner_page_setups'\r\n\t));\r\n\r\n\t$wp_customize->add_setting('single_page_layout',array(\r\n\t\t'default'=>'sidebar-right',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_page_layouts'\r\n\t));\r\n\r\n\t//define image path\r\n\t$imagepath = get_template_directory_uri() . '/inc/images/'; \r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_ChooseImage_Control($wp_customize,'single_page_layout',array(\r\n\t\t'type' => 'radioimage',\r\n\t\t'label' => __('Single Page Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Choose layout for single page landing webpage', 'eightstore-lite'),\r\n\t\t'section' => 'single_page_settings',\r\n\t\t'choices' => array( \r\n\t\t\t'sidebar-left' => $imagepath.'sidebar-left.png', \r\n\t\t\t'sidebar-right' => $imagepath.'sidebar-right.png', \r\n\t\t\t'sidebar-both' => $imagepath.'sidebar-both.png',\r\n\t\t\t'sidebar-no' => $imagepath.'sidebar-no.png',\r\n\t\t)\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('eightstore_inner_cta',array(\r\n\t\t'default' => '0',\r\n\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_inner_cta',array(\r\n\t\t'section' => 'single_page_settings',\r\n\t\t'label' => __('Enable Call to Action Section', 'eightstore-lite'),\r\n\t\t'description' => __('Call to Action Section added on Widget Promo 3 on Inner Pages', 'eightstore-lite'),\r\n\t\t'type' => 'switch',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\r\n\t\t//Single Post\r\n\t$wp_customize->add_section('single_post_settings',array(\r\n\t\t'title' => __('Single Post Settings', 'eightstore-lite'),\r\n\t\t'priority' => '150',\r\n\t\t'panel' => 'inner_page_setups'\r\n\t));\r\n\r\n\t//single post page\r\n\t$wp_customize->add_setting('single_post_layout',array(\r\n\t\t'default' => 'sidebar-right',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_page_layouts'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_ChooseImage_Control($wp_customize,'single_post_layout',array(\r\n\t\t'type' => 'radioimage',\r\n\t\t'label' => __('Single Post Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Choose layout for single post landing webpage', 'eightstore-lite'),\r\n\t\t'section' => 'single_post_settings',\r\n\t\t'choices' => array( \r\n\t\t\t'sidebar-left' => $imagepath.'sidebar-left.png', \r\n\t\t\t'sidebar-right' => $imagepath.'sidebar-right.png', \r\n\t\t\t'sidebar-both' => $imagepath.'sidebar-both.png',\r\n\t\t\t'sidebar-no' => $imagepath.'sidebar-no.png',\r\n\t\t)\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('eightstore_inner_cta_post',array(\r\n\t\t'default' => '0',\r\n\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_inner_cta_post',array(\r\n\t\t'section' => 'single_post_settings',\r\n\t\t'label' => __('Enable Call to Action Section', 'eightstore-lite'),\r\n\t\t'description' => __('Call to Action Section added on Widget Promo 3 on Single Posts', 'eightstore-lite'),\r\n\t\t'type' => 'switch',\r\n\t\t'output' => array('Yes', 'No')\r\n\t)));\r\n\r\n\t//Archive Pages\r\n\t$wp_customize->add_section('archive_page_settings',array(\r\n\t\t'title' => __('Archive Pages Settings', 'eightstore-lite'),\r\n\t\t'priority' => '150',\r\n\t\t'panel' => 'inner_page_setups'\r\n\t));\r\n\r\n\r\n\t//archive pages layout\r\n\t$wp_customize->add_setting('archive_page_layout',array(\r\n\t\t'default' => 'sidebar-right',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_page_layouts'\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new Eightstore_lite_WP_Customize_ChooseImage_Control($wp_customize,'archive_page_layout',array(\r\n\t\t'type' => 'radioimage',\r\n\t\t'label' => __('Archive Page Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Choose layout for archive pages landing webpage', 'eightstore-lite'),\r\n\t\t'section' => 'archive_page_settings',\r\n\t\t'choices' => array( \r\n\t\t\t'sidebar-left' => $imagepath.'sidebar-left.png', \r\n\t\t\t'sidebar-right' => $imagepath.'sidebar-right.png', \r\n\t\t\t'sidebar-both' => $imagepath.'sidebar-both.png',\r\n\t\t\t'sidebar-no' => $imagepath.'sidebar-no.png', \r\n\t\t)\r\n\t)));\r\n\r\n\t//Social Settings panel\r\n\t$wp_customize->add_panel('social_setting', array(\r\n\t\t'capabitity' => 'edit_theme_options',\r\n\t\t'priority' => 30,\r\n\t\t'title' => __('Social Links Settings', 'eightstore-lite')\r\n\t));\r\n\r\n //social Settings section\r\n\t$wp_customize->add_section('social_setting', array(\r\n\t\t'priority' => 10,\r\n\t\t'title' => __('Social Section', 'eightstore-lite'),\r\n\t\t'panel' => 'social_setting',\r\n\t));\r\n\r\n //socail setting in header\r\n\t$wp_customize->add_setting('social_icons_in_header', array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer',\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'social_icons_in_header', array(\r\n\t\t'type' => 'switch',\r\n\t\t'label' => __('Display Social Icons in Header', 'eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t)));\r\n\r\n\t$wp_customize->selective_refresh->add_partial( 'social_icons_in_header', array(\r\n\t\t'selector' => '.es-social-header',\r\n\t\t'container_inclusive' => true,\r\n\t) );\r\n\r\n\t$wp_customize->add_setting('social_icons_in_footer', array(\r\n\t\t'default' => '0',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer',\r\n\t));\r\n\r\n\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'social_icons_in_footer', array(\r\n\t\t'type' => 'switch',\r\n\t\t'label' => __('Display Social Icons in Footer', 'eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t)));\r\n\r\n\t$wp_customize->selective_refresh->add_partial( 'social_icons_in_footer', array(\r\n\t\t'selector' => '.es-social-footer',\r\n\t\t'container_inclusive' => true,\r\n\t) );\r\n\r\n //social facebook link\r\n\t$wp_customize->add_setting('social_facebook', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_facebook',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Facebook','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_facebook'\r\n\t));\r\n\r\n //social twitter link\r\n\t$wp_customize->add_setting('social_twitter', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_twitter',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Twitter','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_twitter'\r\n\t));\r\n\r\n //social googleplus link\r\n\t$wp_customize->add_setting('social_googleplus', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_googleplus',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Google Plus','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_googleplus'\r\n\t));\r\n\r\n //social youtube link\r\n\t$wp_customize->add_setting('social_youtube', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_youtube',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('YouTube','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_youtube'\r\n\t));\r\n\r\n //social pinterest link\r\n\t$wp_customize->add_setting('social_pinterest', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_pinterest',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Pinterest','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_pinterest'\r\n\t));\r\n\r\n //social linkedin link\r\n\t$wp_customize->add_setting('social_linkedin', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_linkedin',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Linkedin','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_linkedin'\r\n\t));\r\n\r\n //social vimeo link\r\n\t$wp_customize->add_setting('social_vimeo', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_vimeo',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Vimeo','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_vimeo'\r\n\t));\r\n\r\n //social instagram link\r\n\t$wp_customize->add_setting('social_instagram', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_instagram',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Instagram','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_instagram'\r\n\t));\r\n\r\n //social skype link\r\n\t$wp_customize->add_setting('social_skype', array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('social_skype',array(\r\n\t\t'type' => 'text',\r\n\t\t'label' => __('Skype','eightstore-lite'),\r\n\t\t'section' => 'social_setting',\r\n\t\t'setting' => 'social_skype'\r\n\t));\r\n\t\r\n\t$wp_customize->add_panel('paymentlogo_setting',array(\r\n\t\t'priority' => '40',\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'title' => __('Footer Settings', 'eightstore-lite' ),\r\n\t\t'description' => __( 'This allows to edit the footer copyright and payment logos', 'eightstore-lite' ),\r\n\t));\r\n\r\n\t//top footer layout\r\n\t$wp_customize->add_section('footer_top_layout_section',\r\n\t\tarray(\r\n\t\t\t'title' => __('Top Footer Layout', 'eightstore-lite'),\r\n\t\t\t'priority' => '1',\r\n\t\t\t'panel' => 'paymentlogo_setting'\r\n\t\t)\r\n\t);\r\n\r\n\t$wp_customize->add_setting('footer_top_layout',array(\r\n\t\t'default' => '3',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer'\r\n\t));\r\n\r\n\t$wp_customize->add_control('footer_top_layout',array(\r\n\t\t'type' => 'radio',\r\n\t\t'label' => __('Top Footer Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Choose layout for top footer widgets', 'eightstore-lite'),\r\n\t\t'section' => 'footer_top_layout_section',\r\n\t\t'choices' => array(\r\n\t\t\t'3' => __('3 Columns', 'eightstore-lite'),\r\n\t\t\t'4' => __('4 Columns', 'eightstore-lite')\r\n\t\t)\r\n\t));\r\n\r\n\t//main Footer LAyout\r\n\t$wp_customize->add_section('footer_layout_section',\r\n\t\tarray(\r\n\t\t\t'title' => __('Main Footer Layout', 'eightstore-lite'),\r\n\t\t\t'priority' => '1',\r\n\t\t\t'panel' => 'paymentlogo_setting'\r\n\t\t)\r\n\t);\r\n\r\n\t$wp_customize->add_setting('footer_layout',array(\r\n\t\t'default' => 'centered',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_radio_footerlayout'\r\n\t));\r\n\r\n\t$wp_customize->add_control('footer_layout',array(\r\n\t\t'type' => 'radio',\r\n\t\t'label' => __('Footer Layout', 'eightstore-lite'),\r\n\t\t'description' => __('Choose layout for copyright text and partner logos', 'eightstore-lite'),\r\n\t\t'section' => 'footer_layout_section',\r\n\t\t'choices' => array(\r\n\t\t\t'centered' => __('Centered Layout', 'eightstore-lite'),\r\n\t\t\t'left-right' => __('Left Right Aligned', 'eightstore-lite')\r\n\t\t)\r\n\t));\r\n\r\n\t//Footer Copyright Text\r\n\t$wp_customize->add_section('footer_copyright',\r\n\t\tarray(\r\n\t\t\t'title' => __('Footer Copyright Area', 'eightstore-lite'),\r\n\t\t\t'priority' => '1',\r\n\t\t\t'panel' => 'paymentlogo_setting'\r\n\t\t)\r\n\t);\r\n\r\n\t$wp_customize->add_setting('footer_copyright_text',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('footer_copyright_text',array(\r\n\t\t'type' => 'textarea',\r\n\t\t'label' => __('Footer Copyright Area Text', 'eightstore-lite'),\r\n\t\t'description' => __('Enter text or Html to show in the footer.', 'eightstore-lite'),\r\n\t\t'section' => 'footer_copyright',\r\n\t));\r\n\r\n\t$wp_customize->selective_refresh->add_partial( 'footer_copyright_text', array(\r\n\t\t'selector' => '.custom-copyright',\r\n\t\t'container_inclusive' => true,\r\n\t) );\r\n\r\n\t//Payment Partners logo\r\n\t$wp_customize->add_section('paymentlogo_images',array(\r\n\t\t'title' => __('Payment Logo Images', 'eightstore-lite'),\r\n\t\t'priority' => '2',\r\n\t\t'panel' => 'paymentlogo_setting',\r\n\t));\r\n\r\n\t$wp_customize->add_setting('paymentlogo1_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'paymentlogo1_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Payment Logo 1 Image', 'eightstore-lite'),\r\n\t\t'section' => 'paymentlogo_images',\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('paymentlogo2_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'paymentlogo2_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Payment Logo 2 Image', 'eightstore-lite'),\r\n\t\t'section' => 'paymentlogo_images',\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('paymentlogo3_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'paymentlogo3_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Payment Logo 3 Image', 'eightstore-lite'),\r\n\t\t'section' => 'paymentlogo_images',\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('paymentlogo4_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'paymentlogo4_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Payment Logo 4 Image', 'eightstore-lite'),\r\n\t\t'section' => 'paymentlogo_images',\r\n\t)));\r\n\r\n\t//SSL adn other Seal images\r\n\t$wp_customize->add_section('other_images',array(\r\n\t\t'title' => __('Other Logo Images', 'eightstore-lite'),\r\n\t\t'priority' => '2',\r\n\t\t'panel' => 'paymentlogo_setting',\r\n\t));\r\n\r\n\t$wp_customize->add_setting('other1_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'other1_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload SSL Seal Image', 'eightstore-lite'),\r\n\t\t'section' => 'other_images',\r\n\t))); \r\n\r\n\t$wp_customize->add_setting('other2_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'other2_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Other Seal 1 Image', 'eightstore-lite'),\r\n\t\t'section' => 'other_images',\r\n\t)));\r\n\r\n\t$wp_customize->add_setting('other3_image',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'other3_image',array(\r\n\t\t'type' => 'image',\r\n\t\t'label' => __('Upload Other Seal 2 Image', 'eightstore-lite'),\r\n\t\t'section' => 'other_images',\r\n\t)));\r\n\r\n\tif(is_woocommerce_available()):\r\n\t//Woocommerce custom options\r\n\t\t$wp_customize->add_panel('woocommerce_setting',array(\r\n\t\t\t'priority' => '50',\r\n\t\t\t'capability' => 'edit_theme_options',\r\n\t\t\t'theme_supports' => '',\r\n\t\t\t'title' => __('Woocommerce Setting', 'eightstore-lite' ),\r\n\t\t\t'description' => __( 'This allows to set wocommerce settings', 'eightstore-lite' ),\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_section('woocommerce_section',array(\r\n\t\t\t'title' => __('Woocommerce Options', 'eightstore-lite'),\r\n\t\t\t'priority' => '2',\r\n\t\t\t'panel' => 'woocommerce_setting',\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_setting('wc_custom_placeholder',array(\r\n\t\t\t'default' => '',\r\n\t\t\t'sanitize_callback' => 'esc_url_raw'\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wc_custom_placeholder',array(\r\n\t\t\t'type' => 'image',\r\n\t\t\t'label' => __('Upload Custom Placeholder', 'eightstore-lite'),\r\n\t\t\t'section' => 'woocommerce_section',\r\n\t\t)));\r\n\t\t$wp_customize->add_section('wc_products_shop',array(\r\n\t\t\t'title' => __('Products In Shop', 'eightstore-lite'),\r\n\t\t\t'priority' => '2',\r\n\t\t\t'panel' => 'woocommerce_setting',\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_setting('wc_product_number_rows',array(\r\n\t\t\t'default' => '4',\r\n\t\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer_product_rows'\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_control('wc_product_number_rows',array(\r\n\t\t\t'type' => 'number',\r\n\t\t\t'label' => __('Number of Products In a Row', 'eightstore-lite'),\r\n\t\t\t'description' => __('Enter number of products to be shown in one row of shop (Max Value 5. Values Greater than 5 will be treated as 5)', 'eightstore-lite'),\r\n\t\t\t'section' => 'wc_products_shop',\r\n\t\t));\r\n\t\t$wp_customize->add_setting('wc_product_number_total',array(\r\n\t\t\t'default' => '12',\r\n\t\t\t'sanitize_callback' => 'eightstore_lite_sanitize_integer',\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_control('wc_product_number_total',array(\r\n\t\t\t'type' => 'number',\r\n\t\t\t'label' => __('Number of Products', 'eightstore-lite'),\r\n\t\t\t'description' => __('Enter number of products to be shown in one page of shop <br /><strong> This will only work after saving and reloading the page</strong>.', 'eightstore-lite'),\r\n\t\t\t'section' => 'wc_products_shop',\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_section('woocommerce_shop_pages',array(\r\n\t\t\t'title' => __('Woocommerce Shop Pages', 'eightstore-lite'),\r\n\t\t\t'priority' => '2',\r\n\t\t\t'panel' => 'woocommerce_setting',\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_setting('eightstore_shop_slider',array(\r\n\t\t\t'default' => '0',\r\n\t\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_shop_slider',array(\r\n\t\t\t'section' => 'woocommerce_shop_pages',\r\n\t\t\t'label' => __('Enable Slider Section', 'eightstore-lite'),\r\n\t\t\t'description' => __('Slider Section added on Shop Pages', 'eightstore-lite'),\r\n\t\t\t'type' => 'switch',\r\n\t\t\t'output' => array('Yes', 'No')\r\n\t\t)));\r\n\r\n\t\t$wp_customize->add_setting('eightstore_shop_cta',array(\r\n\t\t\t'default' => '0',\r\n\t\t\t'sanitize_callback' => 'eightstore_lite_checkbox_sanitize'\r\n\t\t));\r\n\r\n\t\t$wp_customize->add_control(new Eightstore_lite_WP_Customize_Switch_Control($wp_customize,'eightstore_shop_cta',array(\r\n\t\t\t'section' => 'woocommerce_shop_pages',\r\n\t\t\t'label' => __('Enable Call to Action Section', 'eightstore-lite'),\r\n\t\t\t'description' => __('Call to Action Section added on Widget Promo 2 on Shop Pages', 'eightstore-lite'),\r\n\t\t\t'type' => 'switch',\r\n\t\t\t'output' => array('Yes', 'No')\r\n\t\t)));\r\n\r\n\tendif;\r\n\r\n\t//Typography settings\r\n\t$wp_customize->add_panel( 'typography_panel',array(\r\n\t\t'priority' => 30,\r\n\t\t'capability' => 'edit_theme_options',\r\n\t\t'theme_supports' => '',\r\n\t\t'description' => 'Choose color and fonts/typography settings.',\r\n\t\t'title' => __( 'Typography Settings','eightstore-lite' ),\r\n\t));\r\n\t\r\n //typogarphy settings\r\n\t$wp_customize->add_section( 'eightstore_lite_typography_option' , array(\r\n\t\t'title' => __('Typography Options','eightstore-lite'),\r\n\t\t'priority' => 20,\r\n\t\t'panel' => 'typography_panel',\r\n\t) );\r\n\t\r\n //heading typography \r\n\t$wp_customize->add_setting('heading_typography',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new Eightstore_lite_Typography_Dropdown( $wp_customize ,'heading_typography',array(\r\n\t\t'label' => __('<h3>Choose Fonts for Heading Text.</h3>','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_option',\r\n\t\t'description' => __('Choose a font for the heading H1, H2, H3, H4, H5, H6 text','eightstore-lite'),\r\n\t\t'type' => 'select',\r\n\t)));\r\n\r\n //heading typography \r\n\t$wp_customize->add_setting('body_typography',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new Eightstore_lite_Typography_Dropdown( $wp_customize ,'body_typography',array(\r\n\t\t'label' => __('<h3>Choose Fonts for Body Text.</h3>','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_option',\r\n\t\t'description' => __('Choose fonts for body text.','eightstore-lite'),\r\n\t\t'type' => 'select',\r\n\t)));\r\n\r\n //typography formating\r\n\t$wp_customize->add_section( 'eightstore_lite_typography_format' , array(\r\n\t\t'title' => __('Typography Formating','eightstore-lite'),\r\n\t\t'priority' => 20,\r\n\t\t'panel' => 'typography_panel',\r\n\t));\r\n\t\r\n //body fonts size\r\n\t$wp_customize->add_setting('typography_size_body',array(\r\n\t\t'default' => '14',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( 'typography_size_body',array(\r\n\t\t'label' => __('Body Fonts Size.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t\t'type' => 'number',\r\n\t));\r\n\r\n //body color\r\n\t$wp_customize->add_setting('typography_color_body',array(\r\n\t\t'default' => '#000000',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize , 'typography_color_body',array(\r\n\t\t'label' => __('Choose Body Text Color.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t)));\r\n\r\n //heading typography formating h1 \r\n\t$wp_customize->add_setting('typography_format_h1',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control('typography_format_h1',array(\r\n\t\t'label' => __('Choose Fonts Size for H1 Text.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t\t'type' => 'number',\r\n\t));\r\n\r\n //text color h1\r\n\t$wp_customize->add_setting('typography_color_h1',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize , 'typography_color_h1',array(\r\n\t\t'label' => __('Choose H1 Text Color.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t)));\r\n\r\n //heading typography formating h2 \r\n\t$wp_customize->add_setting('typography_format_h2',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control('typography_format_h2',array(\r\n\t\t'label' => __('Choose Fonts Size for H2 Text.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t\t'type' => 'number',\r\n\t));\r\n\r\n//text color h2\r\n\t$wp_customize->add_setting('typography_color_h2',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize , 'typography_color_h2',array(\r\n\t\t'label' => __('Choose H2 Text Color.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t)));\r\n\r\n //heading typography formating h13 \r\n\t$wp_customize->add_setting('typography_format_h3',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control('typography_format_h3',array(\r\n\t\t'label' => __('Choose Fonts Size for H3 Text.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t\t'type' => 'number',\r\n\t));\r\n\t\r\n //text color h3\r\n\t$wp_customize->add_setting('typography_color_h3',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize , 'typography_color_h3',array(\r\n\t\t'label' => __('Choose H3 Text Color.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t)));\r\n\r\n //heading typography formating h4 \r\n\t$wp_customize->add_setting('typography_format_h4',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control('typography_format_h4',array(\r\n\t\t'label' => __('Choose Fonts Size for H4 Text.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t\t'type' => 'number',\r\n\t));\r\n\r\n //text color h4\r\n\t$wp_customize->add_setting('typography_color_h4',array(\r\n\t\t'default' => '',\r\n\t\t'transport' => 'postMessage',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\t\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize , 'typography_color_h4',array(\r\n\t\t'label' => __('Choose H4 Text Color.','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_typography_format',\r\n\t)));\r\n\r\n\r\n\t//Custom Css Js Tools Section\r\n\t$wp_customize->add_section( 'eightstore_lite_custom_tools' , array(\r\n\t\t'title' => __('Custom Tools','eightstore-lite'),\r\n\t\t'priority' => 220,\r\n\t) );\r\n\r\n \t//custom css\r\n\t$wp_customize->add_setting('eightstore_lite_custom_tools_css',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('eightstore_lite_custom_tools_css',array(\r\n\t\t'type' => 'textarea',\r\n\t\t'label' => __('Custom Css','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_custom_tools',\r\n\t));\r\n\r\n \t//custom js\r\n\t$wp_customize->add_setting('eightstore_lite_custom_tools_js',array(\r\n\t\t'default' => '',\r\n\t\t'sanitize_callback' => 'eightstore_lite_sanitize_text',\r\n\t));\r\n\r\n\t$wp_customize->add_control('eightstore_lite_custom_tools_js',array(\r\n\t\t'type' => 'textarea',\r\n\t\t'label' => __('Custom Js','eightstore-lite'),\r\n\t\t'section' => 'eightstore_lite_custom_tools',\r\n\t));\r\n}", "title": "" }, { "docid": "d29a8e7cbdda3ba466ce79d323586d70", "score": "0.7188926", "text": "function registerCustomFields()\n\t\t{\n\t\t\t/* Register Settings */\n\t\t\tregister_setting( $setting['option_group'], $setting['option_name'], ( isset($setting['callback'] ) ? $setting['callback'] : '' ) );\n\n\t\t\t/* Add Settings Section */\n\t\t\tadd_settings_section( $id, $title, $callback, $page );\n\n\t\t}", "title": "" }, { "docid": "bac4e9610a7f9f8de7f5a2604626451a", "score": "0.7164728", "text": "function loor_layout_customize_register($wp_customize) {\n\t// layout options\n\t$wp_customize->add_panel('loor_site_main', array(\n\t\t'priority' => 1,\n\t\t'title' => __('Main Options', 'loor')\n\t));\n\t$wp_customize->add_section('loor_site_main_section', array(\n\t\t'priority' => 10,\n\t\t'title' => __('Layout options', 'loor') ,\n\t\t'description' => __('', 'loor') ,\n\t\t'panel' => 'loor_site_main'\n\t));\n\t$wp_customize->add_setting('loor_site_main_layout', array(\n\t\t'default' => 'wide',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_site_main_layout', array(\n\t\t'type' => 'select',\n\t\t'label' => 'Layout',\n\t\t'description' => __('', 'loor') ,\n\t\t'section' => 'loor_site_main_section',\n\t\t'choices' => array(\n\t\t\t'boxed' => 'Boxed',\n\t\t\t'wide' => 'Wide'\n\t\t)\n\t));\n\t$wp_customize->add_setting('loor_body_background', array(\n\t\t'default' => '#ffffff',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_body_background', array(\n\t\t'label' => __('Main content', 'loor'),\n\t\t'description' => __('Main content background color', 'loor') ,\n\t\t'section' => 'loor_site_main_section',\n\t\t'settings' => 'loor_body_background'\n\t)));\n\t$wp_customize->add_setting('loor_html_background', array(\n\t\t'default' => '#ffffff',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_html_background', array(\n\t\t'label' => __('Background color', 'loor'),\n\t\t'description' => __('The background color of your site that is displayed behind your boxed content area. This option is only available if you select the boxed layout.', 'loor') ,\n\t\t'section' => 'loor_site_main_section',\n\t\t'settings' => 'loor_html_background'\n\t)));\n\t$wp_customize->add_setting('loor_html_background_url', array(\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'esc_url'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'loor_html_background_url', array(\n\t\t'label' => __('Background Image', 'loor'),\n\t\t'description' => __('The background image of your site. This option is only available if you select the boxed layout.', 'loor') ,\n\t\t'section' => 'loor_site_main_section',\n\t\t'settings' => 'loor_html_background_url'\n\t)));\n\t$wp_customize->add_setting('loor_html_background_repeat', array(\n\t\t'default' => 'repeat',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_html_background_repeat', array(\n\t\t'type' => 'select',\n\t\t'label' => __('Background repeat', 'loor'),\n\t\t'section' => 'loor_site_main_section',\n\t\t'choices' => array(\n\t\t\t'no-repeat' => 'No-repeat',\n\t\t\t'repeat' => 'Repeat'\n\t\t)\n\t));\n\t$wp_customize->add_setting('loor_html_background_size', array(\n\t\t'default' => 'auto',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_html_background_size', array(\n\t\t'type' => 'select',\n\t\t'label' => __('Background size', 'loor'),\n\t\t'section' => 'loor_site_main_section',\n\t\t'choices' => array(\n\t\t\t'auto' => 'auto',\n\t\t\t'cover' => 'Cover',\n\t\t\t'contain' => 'Contain'\n\t\t)\n\t));\n\t$wp_customize->add_setting('loor_html_background_attachment', array(\n\t\t'default' => 'scroll',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_html_background_attachment', array(\n\t\t'type' => 'select',\n\t\t'label' => __('Background attachment', 'loor'),\n\t\t'section' => 'loor_site_main_section',\n\t\t'choices' => array(\n\t\t\t'auto' => 'auto',\n\t\t\t'scroll' => 'Scroll',\n\t\t\t'fixed' => 'Fixed'\n\t\t)\n\t));\n\n\t\n\t// colors\n\t$wp_customize->add_section('loor_main_colors', array(\n\t\t'priority' => 30,\n\t\t'title' => __('General styling', 'loor') ,\n\t\t'description' => __('Choose colors here. The color settings of some particular parts like a head, footer, product and etc. You can edit in the \"Site options\" and \"Store options\" tab.', 'loor') ,\n\t\t'panel' => 'loor_site_main'\n\t));\n\t$wp_customize->add_setting('loor_main_font_color', array(\n\t\t'default' => '#545454',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_font_color', array(\n\t\t'label' => __('Main font color', 'loor') ,\n\t\t'description' => __('Main font color for content', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_main_font_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_them_color', array(\n\t\t'default' => '#ccaf7e',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_them_color', array(\n\t\t'label' => __('Theme color', 'loor') ,\n\t\t'description' => __('Font color for rating stars, active tabs and anchor links', 'loor'),\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_main_them_color'\n\t)));\n\t\n\t// buttons style\n\t$wp_customize->add_setting('loor_button_background_color', array(\n\t\t'default' => '#242628',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_background_color', array(\n\t\t'label' => __('Button background', 'loor') ,\n\t\t'description' => __('Color for background of buttons', 'loor'),\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_background_color'\n\t)));\n\t$wp_customize->add_setting('loor_button_font_color', array(\n\t\t'default' => '#ffffff',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_font_color', array(\n\t\t'label' => __('Button font color', 'loor') ,\n\t\t'description' => __('Color for font of buttons', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_font_color'\n\t)));\n\t$wp_customize->add_setting('loor_button_border_color', array(\n\t\t'default' => '#242628',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_border_color', array(\n\t\t'label' => __('Button border color', 'loor') ,\n\t\t'description' => __('Color for border of buttons', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_border_color'\n\t)));\n\t$wp_customize->add_setting('loor_button_background_color_hover', array(\n\t\t'default' => '#B99B62',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_background_color_hover', array(\n\t\t'label' => __('Button highlight background', 'loor') ,\n\t\t'description' => __('Background color for button when mouse is over it', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_background_color_hover'\n\t)));\n\t$wp_customize->add_setting('loor_button_font_color_hover', array(\n\t\t'default' => '#ffffff',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_font_color_hover', array(\n\t\t'label' => __('Button highlight font', 'loor') ,\n\t\t'description' => __('Font color for button when mouse is over it', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_font_color_hover'\n\t)));\n\t$wp_customize->add_setting('loor_button_border_color_hover', array(\n\t\t'default' => '#B99B62',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_button_border_color_hover', array(\n\t\t'label' => __('Button highlight border', 'loor') ,\n\t\t'description' => __('Border color for button when mouse is over it', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_border_color_hover'\n\t)));\n\t$wp_customize->add_setting('loor_button_border_radius', array(\n\t\t'default' => '0',\n\t\t'sanitize_callback' => 'absint'\n\t));\n\t$wp_customize->add_control('loor_button_border_radius', array(\n\t\t'label' => __('Border radius for buttons in px.', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_border_radius'\n\t));\n\t$wp_customize->add_setting('loor_button_letter_spacing', array(\n\t\t'default' => '1',\n\t\t'sanitize_callback' => 'wp_filter_post_kses'\n\t));\n\t$wp_customize->add_control('loor_button_letter_spacing', array(\n\t\t'label' => __('Letter spacing for buttons in px.', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_button_letter_spacing'\n\t));\n\t\n\t$wp_customize->add_setting('loor_inputs_border_radius', array(\n\t\t'default' => '2',\n\t\t'sanitize_callback' => 'absint'\n\t));\n\t$wp_customize->add_control('loor_inputs_border_radius', array(\n\t\t'label' => __('Border radius for inputs in px.', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_inputs_border_radius'\n\t));\n\t\n\t$wp_customize->add_setting('loor_site_loading', array(\n\t\t'default' => 'black',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_site_loading', array(\n\t\t'type' => 'select',\n\t\t'label' => 'Loading icon',\n\t\t'description' => __('Color for loading icon', 'loor'),\n\t\t'section' => 'loor_main_colors',\n\t\t'choices' => array(\n\t\t\t'white' => 'White',\n\t\t\t'black' => 'Black'\n\t\t)\n\t));\n\n\t// select style\n\t$wp_customize->add_setting('loor_select_border_color', array(\n\t\t'default' => '#d9d9d9',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_select_border_color', array(\n\t\t'label' => __('Border color of the form field', 'loor') ,\n\t\t'description' => __('Style for input, textarea and select box', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_select_border_color'\n\t)));\n\t$wp_customize->add_setting('loor_select_font_color', array(\n\t\t'default' => '#555555',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_select_font_color', array(\n\t\t'label' => __('Font color of the form field', 'loor') ,\n\t\t'description' => __('Style for input, textarea and select box', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_select_font_color'\n\t)));\n\t$wp_customize->add_setting('loor_select_background_color', array(\n\t\t'default' => '#ffffff',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_select_background_color', array(\n\t\t'label' => __('Background color of the form field', 'loor') ,\n\t\t'description' => __('Style for input, textarea and select box', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_select_background_color'\n\t)));\n\t$wp_customize->add_setting('loor_select_arrow_color', array(\n\t\t'default' => '#d9d9d9',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_select_arrow_color', array(\n\t\t'label' => __('Arrow color of the select box ', 'loor') ,\n\t\t'description' => __('Color for arrow of select box', 'loor') ,\n\t\t'section' => 'loor_main_colors',\n\t\t'settings' => 'loor_select_arrow_color'\n\t)));\n\n\t// Blog styling\n\t$wp_customize->add_section('loor_blog_colors', array(\n\t\t'priority' => 30,\n\t\t'title' => __('Blog styling', 'loor') ,\n\t\t'description' => __('Edit the color and layout settings for the blog page, posts and single pages.', 'loor') ,\n\t\t'panel' => 'loor_site_main'\n\t));\n\t$wp_customize->add_setting('loor_blog_layout', array(\n\t\t'default' => 'no-sidebar',\n\t\t'sanitize_callback' => 'loor_sanitize_choices'\n\t));\n\t$wp_customize->add_control('loor_blog_layout', array(\n\t\t'type' => 'select',\n\t\t'label' => 'Blog layout',\n\t\t'section' => 'loor_blog_colors',\n\t\t'choices' => array(\n\t\t\t'no-sidebar' => 'Full width, no sidebar',\n\t\t\t'left-sidebar' => 'With left sidebar',\n\t\t\t'right-sidebar' => 'With right sidebar',\n\t\t\t'masonry' => 'Masonry'\n\t\t)\n\t));\n\t$wp_customize->add_setting('loor_main_blog_sidebar_widget_title_color', array(\n\t\t'default' => '#545454',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_sidebar_widget_title_color', array(\n\t\t'label' => __('Sidebar widget title color', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_sidebar_widget_title_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_sidebar_link_color', array(\n\t\t'default' => '#ccaf7e',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_sidebar_link_color', array(\n\t\t'label' => __('Sidebar links color', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_sidebar_link_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_sidebar_link_color_hover', array(\n\t\t'default' => '#1A1A1A',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_sidebar_link_color_hover', array(\n\t\t'label' => __('Sidebar links color when mouse is over it', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_sidebar_link_color_hover'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_title_color', array(\n\t\t'default' => '#1A1A1A',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_title_color', array(\n\t\t'label' => __('Font color for titles', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_title_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_title_border_color', array(\n\t\t'default' => '#f0f0f0',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_title_border_color', array(\n\t\t'label' => __('Underline color', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_title_border_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_tags_color', array(\n\t\t'default' => '#ACACAC',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_tags_color', array(\n\t\t'label' => __('Font color for tags', 'loor') ,\n\t\t'description' => __('Font color for date, tags and captions.', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_tags_color'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_links_color_hover', array(\n\t\t'default' => '#ccaf7e',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_links_color_hover', array(\n\t\t'label' => __('Font color for links', 'loor') ,\n\t\t'description' => __('Font color for tags and titles when mouse is over them', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_links_color_hover'\n\t)));\n\t$wp_customize->add_setting('loor_main_blog_separator_color', array(\n\t\t'default' => '#F1F1F1',\n\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t));\n\t$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loor_main_blog_separator_color', array(\n\t\t'label' => __('Color of separator', 'loor') ,\n\t\t'section' => 'loor_blog_colors',\n\t\t'settings' => 'loor_main_blog_separator_color'\n\t)));\n}", "title": "" }, { "docid": "5b4e579028d8b0a957ea72299f05004a", "score": "0.71177596", "text": "function register( $wp_customize ) {\n\tif ( ! material_is_plugin_active() ) {\n\t\t// Add color palettes section.\n\t\t$args = [\n\t\t\t'priority' => 50,\n\t\t\t'title' => esc_html__( 'Color Palettes', 'material-design-google' ),\n\t\t];\n\n\t\tCustomizer\\add_section( $wp_customize, 'colors', $args );\n\t}\n\n\tadd_settings( $wp_customize );\n}", "title": "" }, { "docid": "acf71d53eaee1c3650327161fc78dcf3", "score": "0.71128476", "text": "function ms_customizer_menu() {\r\n add_theme_page( 'Customize', 'Customize', 'edit_theme_options','customize.php');\r\n}", "title": "" }, { "docid": "844f3b9009733a627c456d3d5ba7165b", "score": "0.71017164", "text": "function harmonica_customize_post_register( $wp_customize ) {\n\n\t/* Add the post section. */\n\t$wp_customize->add_section(\n\t\t'post_section',\n\t\tarray(\n\t\t\t'title' => esc_html__( 'Posts', 'harmonica' ),\n\t\t\t'priority' => 120,\n\t\t\t'capability' => 'edit_theme_options'\n\t\t)\n\t);\n\n\t/* Add the 'content_archive' setting. */\n\t$wp_customize->add_setting(\n\t\t\"post_excerpt\",\n\t\tarray(\n\t\t\t'default' => 'excerpts',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'content_archive' setting. */\n\t$wp_customize->add_control( \n\t\t'post_excerpt',\n\t\tarray(\n\t\t\t'priority' => 1,\n\t\t\t'type' => 'select',\n\t\t\t'label' => '',\n\t\t\t'section' => 'post_section',\n\t\t\t'settings' => 'post_excerpt',\n\t\t\t'choices' => array(\n\t 'full' => 'Display full post',\n\t 'excerpts' => 'Display post excerpts',\n\t )\t \n\t\t)\n\t);\t\n\n\t/* Add the 'no_more_link_scroll' setting. */\n\t$wp_customize->add_setting(\n\t\t\"more_scroll\",\n\t\tarray(\n\t\t\t'default' => '1',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'more_link_scroll' setting. */\n\t$wp_customize->add_control( \n\t\tnew harmonica_Customize_Control_Checkbox( \n\t\t\t$wp_customize,\n\t\t\t'more_scroll',\n\t\t\tarray(\n\t\t\t\t'priority' => 2,\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__( 'More Link Page Scroll', 'harmonica' ),\n\t\t\t\t'section' => 'post_section',\n\t\t\t\t'settings' => 'more_scroll',\n\t\t\t\t'extra'\t=> esc_html__( 'By default, clicking the .more-link anchor opens and scrolls the page to section of the document containing the named anchor. This section is where you put the <!--more--> tag within a post type.', 'harmonica' ),\n\t\t\t)\n\t\t)\n\t);\t\n\n\t/* Add the 'content_archive_limit' setting. */\n\t$wp_customize->add_setting(\n\t\t\"excerpt_chars_limit\",\n\t\tarray(\n\t\t\t'default' => '0',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'content_archive_limit' setting. */\n\t$wp_customize->add_control(\n\t\tnew harmonica_Customize_Control_Char( \n\t\t\t$wp_customize,\n\t\t\t'excerpt_chars_limit',\n\t\t\tarray(\n\t\t\t\t'priority' => 3,\n\t\t\t\t'label' => esc_html__( 'Limit content to', 'harmonica' ),\n\t\t\t\t'section' => 'post_section',\n\t\t\t\t'settings' => 'excerpt_chars_limit',\n\t\t\t\t'extra' => esc_html__( 'Select \"Display post excerpts\" will limit the text and strip all formatting from the text displayed. Set 0 characters will display the first 55 words (default)', 'harmonica' ),\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Add the 'more_text' setting. */\n\t$wp_customize->add_setting(\n\t\t\"more_text\",\n\t\tarray(\n\t\t\t'default' => '[Read more...]',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'more_text' setting. */\n\t$wp_customize->add_control( \n\t\t'more_text',\n\t\tarray(\n\t\t\t'priority' => 4,\n\t\t\t'type' => 'text',\n\t\t\t'label' => esc_html__( 'More Text', 'harmonica' ),\n\t\t\t'section' => 'post_section',\n\t\t\t'settings' => 'more_text',\n\t\t)\n\t);\t\n\n\t/* Add the 'content_archive_thumbnail' setting. */\n\t$wp_customize->add_setting(\n\t\t\"post_thumbnail\",\n\t\tarray(\n\t\t\t'default' => '1',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'content_archive_thumbnail' setting. */\n\t$wp_customize->add_control( \n\t\t'post_thumbnail',\n\t\tarray(\n\t\t\t'priority' => 5,\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Include the Featured Image?', 'harmonica' ),\n\t\t\t'section' => 'post_section',\n\t\t\t'settings' => 'post_thumbnail'\n\t\t)\n\t);\t\n\n\t/* Add the 'image_size' setting. */\n\t$wp_customize->add_setting(\n\t\t\"image_size\",\n\t\tarray(\n\t\t\t'default' => 'large',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'image_size' setting. */\n\t$sizes = harmonica_get_image_sizes();\n\t$imagesizes = array();\n\tforeach ( (array) $sizes as $name => $size ) {\n\t\t$imagesizes[esc_attr( $name )] = esc_attr( $name ) . ' (' . absint( $size['width'] ) . ' &#x000D7; ' . absint( $size['height'] ) . ')';\n\t}\n\t\t\n\t$wp_customize->add_control( \n\t\t'image_size',\n\t\tarray(\n\t\t\t'priority' => 6,\n\t\t\t'type' => 'select',\n\t\t\t'label' => esc_html__( 'Image size', 'harmonica' ),\n\t\t\t'section' => 'post_section',\n\t\t\t'settings' => 'image_size',\n\t\t\t'choices' => $imagesizes,\n\t\t)\n\t);\n\n\t/* Add the 'single_nav' setting. */\n\t$wp_customize->add_setting(\n\t\t\"single_nav\",\n\t\tarray(\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t)\n\t);\n\n\t/* Add the checkbox control for the 'more_link_scroll' setting. */\n\t$wp_customize->add_control( \n\t\t'single_nav',\n\t\tarray(\n\t\t\t'priority' => 7,\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Enable single post Prev Next navigation links?', 'harmonica' ),\n\t\t\t'section' => 'post_section',\n\t\t\t'settings' => 'single_nav',\n\t\t)\n\t);\t\n\n\twp_enqueue_style( 'harmonica-customizer', trailingslashit( harmonica_CSS ) . \"customizer.css\" );\n\t\n}", "title": "" }, { "docid": "a955c303fbcac8555e20e4d681538814", "score": "0.7080357", "text": "function theme_icarus_customize_register(WP_Customize_Manager $wp_customize) // zet het tye erbij voor meer overzicht\n{\n /*\n * add_section je geeft mee: een zelfgekozen id en een array met een title\n */\n $wp_customize->add_section('header_footer_color', [\n 'title' => 'Header Footer kleur'\n ]);\n\n /*\n *add_setting je geeft mee een zelfgekozen id, deze wordt aangeroepen in get_theme_mod\n */\n $wp_customize->add_setting(\n 'header_footer_background_color',\n array(\n 'default' => '#87fa96',\n // 'sanitize_callback' => 'sanitize_hex_color', waarom is dit?\n 'transport' => 'postMessage',\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control( //deze altijd instatieren als je een kleur wil aanpassen(je hebt bv ook checkbox of radiobutton etc)\n $wp_customize,\n 'header_footer_background_color',//naam van de setting waar de control in moet komen\n array(\n 'label' => __('Header & Footer Background Color', 'ThemeIcarus'),\n 'section' => 'header_footer_color', //hoe kom je achter de id s van die sections\n )\n )\n );\n}", "title": "" }, { "docid": "c1ff524b5021a80a97f8f70ddd794581", "score": "0.7070419", "text": "protected function _register_controls() {\n $this->start_controls_section('post_selection', [\n 'label' => 'Post',\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT\n ]);\n\n //hier kunnen we de naam verandere dat boven de control2 select komt \n //post wordt in post_select.php gezet bij data.name op lijn 32\n //label wordt in post_select.php gezet bij data.label op lijn 28\n $this->add_control('post', [\n 'label' => ' Select post',\n 'type' => 'wpc-post-select',\n ]);\n \n \n //deze switcher laat de titel zien of niet\n $this->add_control(\n\t\t\t'show_title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show post' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t\t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\n //hier kan je de kleur aanpassen van de titel\n $this->add_control(\n\t\t\t'title_color',\n\t\t\t[\n\t\t\t\t'label' => __( 'change title color'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .title' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n //deze switcher laat de beschrijving (eerste tekst) zien of niet\n $this->add_control(\n\t\t\t'show_excerpt',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show excerpt'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t\t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\n //hier kan je de kleur aanpassen van de beschrijving (eerste tekst) \n $this->add_control(\n\t\t\t'excerpt_color',\n\t\t\t[\n\t\t\t\t'label' => __( 'change color excerpt'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .title' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n //deze switcher laat de tweede beschrijving (tweede tekst) zien of niet\n $this->add_control(\n\t\t\t'show_content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show content'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t\t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\n\n //deze switcher laat de thumbnail foto zien of niet\n $this->add_control(\n\t\t\t'show_thumbnail',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show thumbnail'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t\t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t ]\n\t\t);\n\n \n\n\n $this->end_controls_section();\n }", "title": "" }, { "docid": "3f78873fd73a69e5466736fe98a24d35", "score": "0.7048186", "text": "function youandmeif_fp_callout( $wp_customize ) {\n \n $wp_customize->add_section('unme-fp-intro', array(\n 'title' => 'FrontPage Intro'\n ));\n \n // Who we are section\n $wp_customize->add_setting('unme-fp-headline', array(\n 'default' => 'Headline Text'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-headline-control', array(\n 'label' => 'Headline',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-headline' \n )));\n \n $wp_customize->add_setting('unme-fp-txt', array(\n 'default' => 'Sample paragraph text'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-txt-control', array(\n 'label' => 'Headline Description',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-txt',\n 'type' => 'textarea'\n )));\n\n $wp_customize->add_setting('unme-fp-link');\n\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-link-control', array(\n 'label' => 'Link',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-link',\n 'type' => 'dropdown-pages'\n )));\n\n $wp_customize->add_setting('unme-fp-img');\n\n $wp_customize->add_control( new WP_Customize_Cropped_Image_Control($wp_customize, 'unme-fp-img-control', array(\n 'label' => 'Image',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-img',\n 'width' => 500,\n 'height' => 250,\n 'flex-width' => true,\n 'flex-height' => true,\n )));\n \n // what and why section\n // what section\n $wp_customize->add_setting('unme-fp-head2', array(\n 'default' => 'Headline Text'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-head2-control', array(\n 'label' => 'Headline 2',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-head2' \n )));\n \n $wp_customize->add_setting('unme-fp-txt-head2', array(\n 'default' => 'Sample paragraph text two'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-txt-head2-control', array(\n 'label' => 'Headline Description two',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-txt-head2',\n 'type' => 'textarea'\n )));\n \n $wp_customize->add_setting('unme-fp-link-head2');\n \n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-link-head2-control', array(\n 'label' => 'Link',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-link-head2',\n 'type' => 'dropdown-pages'\n )));\n \n // why section\n $wp_customize->add_setting('unme-fp-head3', array(\n 'default' => 'Headline Text'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-head3-control', array(\n 'label' => 'Headline 3',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-head3' \n )));\n \n $wp_customize->add_setting('unme-fp-txt-head3', array(\n 'default' => 'Sample paragraph text three'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-txt-head3-control', array(\n 'label' => 'Headline Description three',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-txt-head3',\n 'type' => 'textarea'\n )));\n \n $wp_customize->add_setting('unme-fp-link-head3');\n \n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-link-head3-control', array(\n 'label' => 'Link',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-link-head3',\n 'type' => 'dropdown-pages'\n )));\n \n // quote section\n $wp_customize->add_setting('unme-fp-quote', array(\n 'default' => 'Quote section'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, 'unme-fp-txt-head3-control', array(\n 'label' => 'Quote section here',\n 'section' => 'unme-fp-intro',\n 'settings' => 'unme-fp-quote',\n 'type' => 'textarea'\n )));\n \n $wp_customize->add_section('unme-get-involve', array(\n 'title' => 'Get Involve Section'\n ));\n //\n $wp_customize->add_setting('unme-gi-img');\n\n $wp_customize->add_control( new WP_Customize_Cropped_Image_Control($wp_customize, 'unme-gi-img-control', array(\n 'label' => 'Image',\n 'section' => 'unme-get-involve',\n 'settings' => 'unme-gi-img',\n 'width' => 2000,\n 'height' => 1000,\n 'flex-width' => true,\n 'flex-height' => true,\n )));\n}", "title": "" }, { "docid": "6c6af45a7d1b5db365806789093400f1", "score": "0.70428526", "text": "function myknowledgebase_theme_customizer( $wp_customize ) { \r\n\t\t$wp_customize->add_section( 'myknowledgebase_logo_section' , array( \r\n\t\t\t'title' => __( 'Logo', 'myknowledgebase' ), \r\n\t\t\t'priority' => 30, \r\n\t\t\t'description' => __( 'Upload a logo to replace blogname and description in header.', 'myknowledgebase' ),\r\n\t\t) );\r\n\t\t$wp_customize->add_setting( 'myknowledgebase_logo', array( \r\n\t\t\t'capability' => 'edit_theme_options', \r\n\t\t\t'sanitize_callback' => 'esc_url_raw', \r\n\t\t) ); \r\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'myknowledgebase_logo', array( \r\n\t\t\t'label' => __( 'Logo', 'myknowledgebase' ), \r\n\t\t\t'section' => 'myknowledgebase_logo_section', \r\n\t\t\t'settings' => 'myknowledgebase_logo', \r\n\t\t) ) );\r\n\t\t$wp_customize->add_section( 'myknowledgebase_posts_section' , array( \t\r\n\t\t\t'title' => __( 'Knowledgebase', 'myknowledgebase' ), \r\n\t\t\t'priority' => 31, \r\n\t\t\t'description' => __( 'Set amount of posts for each knowledgebase category.', 'myknowledgebase' ),\r\n\t\t) );\r\n\t\t$wp_customize->add_setting( 'myknowledgebase_posts', array( \r\n\t\t\t'capability' => 'edit_theme_options', \r\n\t\t\t'sanitize_callback' => 'sanitize_text_field', \r\n\t\t) ); \r\n\t\t$wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'myknowledgebase_posts', array( \r\n\t\t\t'label' => __( 'Posts per category', 'myknowledgebase' ), \r\n\t\t\t'description' => __( 'Only numeric characters allowed.', 'myknowledgebase' ), \r\n\t\t\t'section' => 'myknowledgebase_posts_section', \r\n\t\t\t'type' => 'number', \r\n\t\t\t'settings' => 'myknowledgebase_posts', \r\n\t\t) ) );\r\n\t\t$wp_customize->add_section( 'myknowledgebase_search_section' , array( \t\r\n\t\t\t'title' => __( 'Search Bar', 'myknowledgebase' ), \r\n\t\t\t'priority' => 32, \r\n\t\t\t'description' => __( 'Change title of the knowledgebase search bar.', 'myknowledgebase' ),\r\n\t\t) );\r\n\t\t$wp_customize->add_setting( 'myknowledgebase_search', array( \r\n\t\t\t'capability' => 'edit_theme_options', \r\n\t\t\t'sanitize_callback' => 'sanitize_text_field', \r\n\t\t) ); \r\n\t\t$wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'myknowledgebase_search', array( \r\n\t\t\t'label' => __( 'Search Bar Title', 'myknowledgebase' ), \r\n\t\t\t'description' => __( 'This will overwrite the default title.', 'myknowledgebase' ), \r\n\t\t\t'section' => 'myknowledgebase_search_section', \r\n\t\t\t'settings' => 'myknowledgebase_search', \r\n\t\t) ) );\r\n\r\n\t}", "title": "" }, { "docid": "5935b38ef9e6e2380609a0776645a1a1", "score": "0.7040409", "text": "public function register( $wp_customize )\n\t\t{\n\t\t\tforeach( $this->_sections as $section ) {\n\t\t\t\t$wp_customize->add_section($section['id'], array(\n\t\t\t\t\t'title' => $section['label'],\n\t\t\t\t\t'priority' => $section['priority']\n\t\t\t\t));\n\n\t\t\t\tforeach( $section['settings'] as $setting ) {\n\t\t\t\t\t$value = get_theme_mod($setting['key']);\n\n\t\t\t\t\t$wp_customize->add_setting($setting['key'], array(\n\t\t\t\t\t\t'default' => $setting['default'],\n\t\t\t\t\t\t'transport' => $setting['transport'],\n\t\t\t\t\t\t'sanitize_callback' => null\n\t\t\t\t\t));\n\n\t\t\t\t\t$wp_customize->add_control(new $setting['type']($wp_customize, $setting['key'], array(\n\t\t\t\t\t\t'label' => $setting['label'],\n\t\t\t\t\t\t'section' => $section['id'],\n\t\t\t\t\t\t'settings' => $setting['key'],\n\t\t\t\t\t\t'priority' => $setting['priority']\n\t\t\t\t\t)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->appendCustomizerScripts($wp_customize);\n\t\t}", "title": "" }, { "docid": "e0b2b4b1ef5c5f8f2ab84bf1060cbded", "score": "0.7020016", "text": "public function register_customize_sections( $wp_customize ) {\n\n\t\t/*\n\t\t * Rename Existing Sections\n\t\t */\n\n\t\t// Yoast SEO\n\t\t$wp_customize->add_section( 'wpseo_breadcrumbs_customizer_section' , array(\n\t\t\t'title'\t\t=> __('Breadcrumbs','ecclesio'),\n\t\t\t'priority'\t=> 120,\n\t\t));\n\n\t\t/*\n\t\t * Add Sections\n\t\t */\n\n\t\t// New section for \"Church Information\".\n\t\t$wp_customize->add_section( 'ecclesio_church_info', array(\n\t\t\t'title' => __( 'Church Info', 'ecclesio' ),\n\t\t\t'priority' => 101\n\t\t) );\n\t\t// New section for \"Church Information\".\n\t\t$wp_customize->add_section( 'ecclesio_church_social', array(\n\t\t\t'title' => __( 'Social Media', 'ecclesio' ),\n\t\t\t'priority' => 102\n\t\t) );\n\t\t// New section for \"Colors\".\n\t\t$wp_customize->add_section( 'ecclesio_theme_colors', array(\n\t\t\t'title' => __( 'Theme Colors', 'ecclesio' ),\n\t\t\t'priority' => 20\n\t\t) );\n\t\t// New section for \"Sermon Archive Options\".\n\t\t$wp_customize->add_section( 'ecclesio_church_sermons', array(\n\t\t\t'title' => __( 'Sermon Archive', 'ecclesio' ),\n\t\t\t'active_callback' => 'is_archive_sermons',\n\t\t\t'priority' => 19 //place above \"Site Identity\"\n\t\t) );\n\t\t// New section for \"Event Archive Options\".\n\t\t$wp_customize->add_section( 'ecclesio_church_events', array(\n\t\t\t'title' => __( 'Event Archive', 'ecclesio' ),\n\t\t\t'active_callback' => 'is_archive_events',\n\t\t\t'priority' => 19 //place above \"Site Identity\"\n\t\t) );\n\t\t// New section for \"Footer\".\n\t\t$wp_customize->add_section( 'ecclesio_church_footer', array(\n\t\t\t'title' => __( 'Footer Options', 'ecclesio' ),\n\t\t\t'priority' => 190 //place above \"Additional CSS\"\n\t\t) );\n\n\t\t/*\n\t\t * Add settings to sections.\n\t\t */\n\t\t$this->ecclesio_title_tagline_section( $wp_customize );\n\t\t$this->ecclesio_church_info_section( $wp_customize );\n\t\t$this->ecclesio_church_social_section( $wp_customize );\n\t\t$this->ecclesio_theme_colors_section( $wp_customize );\n\t\t$this->ecclesio_church_sermons_section( $wp_customize );\n\t\t$this->ecclesio_church_events_section( $wp_customize );\n\t\t$this->ecclesio_church_footer_section( $wp_customize );\n\t}", "title": "" }, { "docid": "3d8466ecd18d93449f5efb74267122cd", "score": "0.70060086", "text": "function shoestrap_advanced_customizer( $wp_customize ){\n \n $sections = array();\n $sections[] = array( 'slug' => 'shoestrap_advanced', 'title' => __( 'Advanced', 'shoestrap' ), 'priority' => 9 );\n\n foreach( $sections as $section ){\n $wp_customize->add_section( $section['slug'], array( 'title' => $section['title'], 'priority' => $section['priority'] ) );\n }\n\n $settings = array();\n $settings[] = array( 'slug' => 'shoestrap_advanced_head', 'default' => '' );\n $settings[] = array( 'slug' => 'shoestrap_advanced_footer', 'default' => '' );\n\n foreach( $settings as $setting ){\n $wp_customize->add_setting( $setting['slug'], array( 'default' => $setting['default'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options' ) );\n }\n\n // Header scripts (css/js)\n $wp_customize->add_control( new Shoestrap_Customize_Textarea_Control( $wp_customize, 'shoestrap_advanced_head', array(\n 'label' => 'Header Scripts (CSS/JS)',\n 'section' => 'shoestrap_advanced',\n 'settings' => 'shoestrap_advanced_head',\n 'priority' => 1,\n )));\n\n // Footer scripts (css/js)\n $wp_customize->add_control( new Shoestrap_Customize_Textarea_Control( $wp_customize, 'shoestrap_advanced_footer', array(\n 'label' => 'Footer Scripts (CSS/JS)',\n 'section' => 'shoestrap_advanced',\n 'settings' => 'shoestrap_advanced_footer',\n 'priority' => 2,\n )));\n}", "title": "" }, { "docid": "5331811a98c0dcbd767c4857198042a7", "score": "0.70038843", "text": "public function register_feature_customize_sections( $wp_customize ) {\n $this->feature_info_section( $wp_customize );\n }", "title": "" }, { "docid": "30800a6b7a7406ccbd4bb18c33a529a9", "score": "0.70030224", "text": "function rm_layout_customizer($wp_customize){\n\n\t//HABILITAR O PRIMEIRO MENU OU NÃO\n\t$wp_customize->add_setting('rm_topMenu_show', array('default' => 'yes'));\n\n\t//HABILITAR A AREA DE PESQUISA\n\t$wp_customize->add_setting('rm_search_show', array('default' => 'yes'));\n\n\t//POLITICA DE PRIVACIDADE\n\t$wp_customize->add_setting('rm_privacy_url', array('default' => 'yes'));\n\n\t$wp_customize->add_section('rm_layout_section', array(\n\t\t'title' => 'Opções de Layout',\n\t\t'priority' => 2,\n\t\t'panel' => 'opcoes'\n\t));\n\n\t/*\n\t\tOUTROS CAMPOS PARA O ADD CONTROL\n\t\tINSRIDOS NO TYPE\n\t\ttext, checkbox, textarea, select, radio, dropdown-pages\t\n\t*/\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Control( $wp_customize, \"rm_topMenu_show\", array(\n\t\t\t'label' => 'Mostrar Menu Superior',\n\t\t\t'section' => 'rm_layout_section',\n\t\t\t'settigs' => 'rm_topMenu_show',\n\t\t\t'type' => 'checkbox',\n\t\t\t'choices' => array( 'yes' => 'Sim' )\n\t\t) )\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Control( $wp_customize, \"rm_search_show\", array(\n\t\t\t'label' => 'Mostrar Barra de Busca',\n\t\t\t'section' => 'rm_layout_section',\n\t\t\t'settigs' => 'rm_search_show',\n\t\t\t'type' => 'checkbox',\n\t\t\t'choices' => array( 'yes' => 'Sim' )\n\t\t) )\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Control( $wp_customize, \"rm_privacy_url\", array(\n\t\t\t'label' => 'Mostrar a Pagina de Politica de Privacidade',\n\t\t\t'section' => 'rm_layout_section',\n\t\t\t'settigs' => 'rm_privacy_url',\n\t\t\t'type' => 'dropdown-pages',\n\t\t) )\n\t);\n\n\t\n\n}", "title": "" }, { "docid": "c8e89720315450c306c78a8055db85f2", "score": "0.69951516", "text": "protected function _register_controls() {\n\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'houzez-theme-functionality' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'houzez_grid_type',\n [\n 'label' => esc_html__( 'Choose Grid', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'grid_v1' => esc_html__( 'Grid v1', 'houzez-theme-functionality'),\n 'grid_v2' => esc_html__( 'Grid v2', 'houzez-theme-functionality'),\n 'grid_v3' => esc_html__( 'Grid v3', 'houzez-theme-functionality'),\n 'grid_v4' => esc_html__( 'Grid v4', 'houzez-theme-functionality'),\n ],\n 'description' => '',\n 'default' => 'grid_v1',\n ]\n );\n\n $this->add_control(\n 'houzez_grid_from',\n [\n 'label' => esc_html__( 'Choose Taxonomy', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'property_type' => 'Types',\n 'property_status' => 'Status',\n 'property_label' => 'Label',\n 'property_country' => 'Country',\n 'property_state' => 'State',\n 'property_city' => 'City',\n 'property_area' => 'Area',\n ],\n 'description' => '',\n 'default' => 'property_type',\n ]\n );\n\n \n // Property taxonomies controls\n $prop_taxonomies = get_object_taxonomies( 'property', 'objects' );\n unset( $prop_taxonomies['property_feature'] );\n\n $page_filters = houzez_option('houzez_page_filters');\n\n if( isset($page_filters) && !empty($page_filters) ) {\n foreach ($page_filters as $filter) {\n unset( $prop_taxonomies[$filter] );\n }\n }\n\n if ( ! empty( $prop_taxonomies ) && ! is_wp_error( $prop_taxonomies ) ) {\n foreach ( $prop_taxonomies as $single_tax ) {\n\n $options_array = array();\n $terms = get_terms( $single_tax->name );\n\n if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {\n foreach ( $terms as $term ) {\n $options_array[ $term->slug ] = $term->name;\n }\n }\n\n $this->add_control(\n $single_tax->name,\n [\n 'label' => $single_tax->label,\n 'type' => Controls_Manager::SELECT2,\n 'multiple' => true,\n 'label_block' => true,\n 'options' => $options_array,\n 'condition' => [\n 'houzez_grid_from' => $single_tax->name,\n ],\n ]\n );\n }\n }\n \n\n $this->add_control(\n 'houzez_show_child',\n [\n 'label' => esc_html__( 'Show Child', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n '0' => esc_html__( 'No', 'houzez-theme-functionality'),\n '1' => esc_html__( 'Yes', 'houzez-theme-functionality')\n ],\n 'description' => '',\n 'default' => '0',\n ]\n );\n\n $this->add_control(\n 'houzez_hide_empty',\n [\n 'label' => esc_html__( 'Hide Empty', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n '0' => esc_html__( 'No', 'houzez-theme-functionality'),\n '1' => esc_html__( 'Yes', 'houzez-theme-functionality')\n ],\n 'description' => '',\n 'default' => '1',\n ]\n );\n\n $this->add_control(\n 'houzez_hide_count',\n [\n 'label' => esc_html__( 'Hide Count', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n '0' => esc_html__( 'No', 'houzez-theme-functionality'),\n '1' => esc_html__( 'Yes', 'houzez-theme-functionality')\n ],\n 'description' => '',\n 'default' => '0',\n ]\n );\n\n $this->add_control(\n 'orderby',\n [\n 'label' => esc_html__( 'Order By', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'name' => esc_html__( 'Name', 'houzez-theme-functionality'),\n 'count' => esc_html__( 'Count', 'houzez-theme-functionality'),\n 'id' => esc_html__( 'ID', 'houzez-theme-functionality')\n ],\n 'description' => '',\n 'default' => 'name',\n ]\n );\n\n $this->add_control(\n 'order',\n [\n 'label' => esc_html__( 'Order', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'ASC' => esc_html__( 'ASC', 'houzez-theme-functionality'),\n 'DESC' => esc_html__( 'DESC', 'houzez-theme-functionality')\n ],\n 'default' => 'ASC',\n ]\n );\n\n\n $this->add_control(\n 'no_of_terms',\n [\n 'label' => esc_html__('Number of Items to Show', 'houzez-theme-functionality'),\n 'type' => Controls_Manager::TEXT,\n 'description' => '',\n 'default' => '',\n ]\n );\n \n $this->end_controls_section();\n\n\n /*--------------------------------------------------------------------------------\n * Typography\n * -------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'typography_section',\n [\n 'label' => esc_html__( 'Typography', 'houzez-theme-functionality' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'grid_title_typography',\n 'label' => esc_html__( 'Title Typography', 'houzez-theme-functionality' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .taxonomy-title',\n 'fields_options' => [\n // Inner control name\n 'font_weight' => [\n // Inner control settings\n 'default' => '500',\n ],\n 'font_family' => [\n 'default' => 'Roboto',\n ],\n 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 24 ] ],\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'grid_subtitle_typography',\n 'label' => esc_html__( 'Subtitle Typography', 'houzez-theme-functionality' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .taxonomy-subtitle',\n 'fields_options' => [\n // Inner control name\n 'font_weight' => [\n // Inner control settings\n 'default' => '300',\n ],\n 'font_family' => [\n 'default' => 'Roboto',\n ],\n 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 14 ] ],\n ],\n ]\n );\n\n $this->add_control(\n 'grid_title_color',\n [\n 'label' => esc_html__( 'Title Color', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'selectors' => [\n '{{WRAPPER}} .taxonomy-title' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'grid_subtitle_color',\n [\n 'label' => esc_html__( 'Subtitle Color', 'houzez-theme-functionality' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'selectors' => [\n '{{WRAPPER}} .taxonomy-subtitle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n \n $this->end_controls_section();\n\n }", "title": "" }, { "docid": "c6b73a6ee1a7c96730be09bb47c94b63", "score": "0.69930744", "text": "function worthy_customizer( $wp_customize ) {\n\n\n $wp_customize->add_section(\n 'worthy_section_one',\n array(\n 'title' => 'Worthy Settings',\n 'description' => 'This is for the copyright section.',\n 'priority' => 35,\n )\n );\n\n $wp_customize->add_setting(\n 'copyright_textbox',\n array('default' => 'Default copyright text',)\n );\n $wp_customize->add_setting(\n 'link-color',\n array(\n 'default' => '#000000',\n 'sanitize_callback' => 'sanitize_hex_color',\n )\n );\n $wp_customize->add_setting(\n 'brandbg-color',\n array('default' => 'rgba(85, 172, 238, 0.7)',)\n );\n $wp_customize->add_setting( 'worthy-header' );\n $wp_customize->add_setting( 'worthy-logo' );\n $wp_customize->add_setting(\n 'header-title',\n array('default' => '<h1>We are <span>worthy</span></h1><p class=\"lead\">And we can</p>',)\n );\n\n $wp_customize->add_control(\n 'copyright_textbox',\n array(\n 'label' => 'Copyright text',\n 'section' => 'worthy_section_one',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control(\n 'brandbg-color',\n array(\n 'label' => 'Transparent background color for bg overlay in category listings:',\n 'section' => 'worthy_section_one',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'link-color',\n array(\n 'label' => 'Main brand link color',\n 'section' => 'worthy_section_one',\n 'settings' => 'link-color',\n )\n )\n );\n\n\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'worthy-header',\n array(\n 'label' => 'Worthy Header Image Upload',\n 'section' => 'worthy_section_one',\n 'settings' => 'worthy-header'\n )\n )\n );\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'worthy-logo',\n array(\n 'label' => 'Worthy Navbar Logo Image Upload',\n 'section' => 'worthy_section_one',\n 'settings' => 'worthy-logo'\n )\n )\n );\n $wp_customize->add_control(\n 'header-title',\n array(\n 'label' => 'Text/HTML for front page header image',\n 'section' => 'worthy_section_one',\n 'type' => 'textarea',\n )\n );\n\n\n\n\n\n}", "title": "" }, { "docid": "a4d7166c87e13324a37a677bf22f5062", "score": "0.6990569", "text": "protected function _register_controls() {\n\n $this->start_controls_section(\n 'section_content',\n [\n 'label' => __( 'Content', 'elementor-super-cat' ),\n ]\n );\n\n $this->add_control(\n 'post_id',\n [\n 'label' => __( 'CSS ID of the post widget', 'elementor-super-cat' ),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'taxonomy_name',\n [\n 'label' => __( 'Name of taxonomy to filter', 'elementor-super-cat' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => \"category\"\n ]\n );\n\n $this->add_control(\n 'all_text',\n [\n 'label' => __( 'Text to show for <b>Show All</b>', 'elementor-super-cat' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => \"all\"\n ]\n );\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n\t\t\t'section_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Style', 'elementor-super-cat' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'color_filter',\n\t\t\t[\n\t\t\t\t'label' => __( 'Color', 'elementor-super-cat' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .elementor-portfolio__filter' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'color_filter_active',\n\t\t\t[\n\t\t\t\t'label' => __( 'Active Color', 'elementor-super-cat' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .elementor-portfolio__filter.elementor-active' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\t'typography',\n\t\t\t[\n\t\t\t\t'name' => 'typography_filter',\n\t\t\t\t'selector' => '{{WRAPPER}} .elementor-portfolio__filter',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'filter_item_spacing',\n\t\t\t[\n\t\t\t\t'label' => __( 'Space Between', 'elementor-super-cat' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 10,\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .elementor-portfolio__filter:not(:last-child)' => 'margin-right: calc({{SIZE}}{{UNIT}}/2)',\n\t\t\t\t\t'{{WRAPPER}} .elementor-portfolio__filter:not(:first-child)' => 'margin-left: calc({{SIZE}}{{UNIT}}/2)',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'filter_spacing',\n\t\t\t[\n\t\t\t\t'label' => __( 'Spacing', 'elementor-super-cat' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 10,\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .elementor-portfolio__filters' => 'margin-bottom: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\n }", "title": "" }, { "docid": "10218682dcb53fad99dce510853156b5", "score": "0.6979755", "text": "public function customizer_admin() {\r\n add_theme_page( 'Customize', 'Customize', 'edit_theme_options', 'customize.php' );\r\n }", "title": "" }, { "docid": "ea57dfb01bf5acf75572b2704172f152", "score": "0.6961329", "text": "function header_customize_register($wp_customize) {\n\t$wp_customize->add_section('section_header', array(\n\t\t\"title\" => 'Header',\n\t\t\"priority\" => 28,\n\t\t\"description\" => __( 'Header-Einstellungen', 'theme-slug' )\n\t));\n\n\t$wp_customize->add_setting('image_header_background', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_background', array(\n\t\t\t'label' => __( 'Header-Hintergrund-Bild', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_background',\n\t\t))\n\t);\n\n\t$wp_customize->add_setting('image_header_background2', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_background2', array(\n\t\t\t'label' => __( 'Header-Hintergrund-Bild2', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_background2',\n\t\t))\n\t);\n\n\t$wp_customize->add_setting('image_header_background3', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_background3', array(\n\t\t\t'label' => __( 'Header-Hintergrund-Bild3', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_background3',\n\t\t))\n\t);\n\n\t$wp_customize->add_setting('image_header_background4', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_background4', array(\n\t\t\t'label' => __( 'Header-Hintergrund-Bild4', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_background4',\n\t\t))\n\t);\n\n\t$wp_customize->add_setting('image_header_background5', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_background5', array(\n\t\t\t'label' => __( 'Header-Hintergrund-Bild5', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_background5',\n\t\t))\n\t);\n\n\t$wp_customize->add_setting('image_header_logo', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_header_logo', array(\n\t\t\t'label' => __( 'Header-Logo', 'theme-slug' ),\n\t\t\t'section' => 'section_header',\n\t\t\t'settings' => 'image_header_logo',\n\t\t))\n\t);\n}", "title": "" }, { "docid": "d8b88a5317bc6f929889870571cf6bd9", "score": "0.69594634", "text": "function bcwmk_customize_register($wp_customize)\n{\n bcwmk_social_customizer_section($wp_customize);\n bcwmk_bg_img_customizer_section($wp_customize);\n}", "title": "" }, { "docid": "d47eb7ba7e40bc68d9b2f3206c784afa", "score": "0.6951141", "text": "function leader_customize_register($wp_customize) {\n\n\t$settings = array(\n\t\tarray(\n\t\t\t'panel' => 'leader_header_options',\n\t\t\t'panel_title' => __('Header', 'leadership'),\n\t\t\t'description' => __('Change the Header Settings from here as you want', 'leadership'),\n\t\t\t'sections' => \n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t'section' => 'leader_header_section',\n\t\t\t\t\t'title' => 'Logo',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_logo',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('Upload White Logo', 'leadership'),\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t'type' => 'image'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_black_logo',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('Upload Black Logo', 'leadership'),\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t'type' => 'image'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'panel' => 'leader_heading_options',\n\t\t\t'panel_title' => __('Headings', 'leadership'),\n\t\t\t'description' => __('Change the heading settings from here as you want', 'leadership'),\n\t\t\t'sections' => \n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t'section' => 'leader_heading_section',\n\t\t\t\t\t'title' => 'Site Headings',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_recent_blog_text',\n\t\t\t\t\t\t\t'default' => __( 'Recent Blog Articles', 'leadership' ),\n\t\t\t\t\t\t\t'label' => __('Recent Blog Text', 'leadership'),\n\t\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_group_services_text',\n\t\t\t\t\t\t\t'default' => __( 'The Leadership Group Services', 'leadership' ),\n\t\t\t\t\t\t\t'label' => __('Services Title', 'leadership'),\n\t\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_case_studies_text',\n\t\t\t\t\t\t\t'default' => __( 'A selection of case studies', 'leadership' ),\n\t\t\t\t\t\t\t'label' => __('Case Studies Title', 'leadership'),\n\t\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'panel' => 'leader_blog_options',\n\t\t\t'panel_title' => __('Blog', 'leadership'),\n\t\t\t'description' => __('Change the blog settings from here as you want', 'leadership'),\n\t\t\t'sections' => \n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section' => 'leader_blog_section',\n\t\t\t\t\t\t'title' => 'Blogs',\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'slug' => 'leader_featured_blog_title',\n\t\t\t\t\t\t\t\t'default' => __( 'The Leadership Blog', 'leadership' ),\n\t\t\t\t\t\t\t\t'label' => __('Blog Heading', 'leadership'),\n\t\t\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'slug' => 'leader_featured_article',\n\t\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t\t'label' => __('Featured Articles', 'leadership'),\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'choices' => get_posts_array(),\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),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section' => 'leader_recent_article_section',\n\t\t\t\t\t\t'title' => 'Recent Articles',\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'slug' => 'leader_recent_article_logo',\n\t\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t\t'label' => __('Upload Recent Article Image', 'leadership'),\n\t\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t\t'type' => 'image'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'slug' => 'leader_recent_article_link',\n\t\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t\t'label' => __('Link', 'leadership'),\n\t\t\t\t\t\t\t\t'type' => 'text',\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)\n\t\t\t\t\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'panel' => 'leader_about_options',\n\t\t\t'panel_title' => __('About', 'leadership'),\n\t\t\t'description' => __('Change the about settings from here as you want', 'leadership'),\n\t\t\t'sections' => \n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t'section' => 'leader_about_section',\n\t\t\t\t\t'title' => 'About',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_about_picture',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('Picture', 'leadership'),\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t'type' => 'image'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_about_title',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('About', 'leadership'),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_about_description',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('Description', 'leadership'),\n\t\t\t\t\t\t\t'type' => 'textarea',\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)\n\t\t\t\t\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'panel' => 'leader_footer_options',\n\t\t\t'panel_title' => __('Footer', 'leadership'),\n\t\t\t'description' => __('Change the Footer Settings from here as you want', 'leadership'),\n\t\t\t'sections' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'section' => 'leader_footer_section',\n\t\t\t\t\t'title' => __('Copyright' , 'leadership'),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_qr_logo',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('QR Logo', 'leadership'),\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t'type' => 'image'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_copyright',\n\t\t\t\t\t\t\t'default' => '©The leadership group 2015. All rights reserved.',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Copyright Text', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_developer',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Design & Development Text', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_developer_logo',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'label' => __('Developer Logo', 'leadership'),\n\t\t\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t\t\t\t\t'type' => 'image'\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'section' => 'leader_social_media_section',\n\t\t\t\t\t'title' => 'Social Media',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_enable_facebook',\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __('Enable facebook', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_facebook',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Facebook', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_enable_twitter',\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __('Enable twitter', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_twitter',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Twitter', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_enable_google_plus',\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __('Enable Google +', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_google_plus',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Google +', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_enable_pinterest',\n\t\t\t\t\t\t\t'default' => 1,\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __('Enable Pinterest', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_social_media_pinterest',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Pinterest', 'leadership'),\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'section' => 'leader_contact_us_section',\n\t\t\t\t\t'title' => 'Contact Us',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_contact_us_address',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Address', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_contact_us_phone',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Phone', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_contact_us_toll_free',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Toll Free', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_contact_us_fax',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Fax', 'leadership'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'slug' => 'leader_contact_us_email',\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __('Email', 'leadership'),\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\n\tforeach ($settings as $panel) {\n\n\t\t$wp_customize->add_panel($panel['panel'], array(\n\t \t'capabitity' => 'edit_theme_options',\n\t \t'description' => $panel['description'],\n\t \t'title' => $panel['panel_title']\n\t \t));\n\n\n\t \tforeach ($panel['sections'] as $section) {\n\n\t\t\t$wp_customize->add_section($section['section'], array( \n\t\t\t\t'title' => $section['title'], \n\t\t\t\t'panel' => $panel['panel']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tforeach ($section['options'] as $option) {\n\t\t\t\t$wp_customize->add_setting($option['slug'], array(\n\t\t\t\t\t'default' => $option['default'],\n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t));\n\n\t\t\t\tif ($option['type'] == 'image') {\n\t\t\t\t\t$wp_customize->add_control(new \\WP_Customize_Image_Control($wp_customize, $option['slug'], array(\n\t\t\t\t\t\t'label' => $option['label'],\n\t\t\t\t\t\t'section' => $section['section'],\n\t\t\t\t\t\t'setting' => $option['slug'],\n\t\t\t\t\t\t'input_attrs' => isset( $option['input_attrs'] ) ? (array) $option['input_attrs'] : array(),\n\t\t\t\t\t)));\n\n\t\t\t\t} elseif ( $option['type'] == 'select' ) {\n\t\t\t\t\t$wp_customize->add_control($option['slug'], array(\n\t\t\t\t\t\t'type' => $option['type'],\n\t\t\t\t\t\t'label' => $option['label'],\n\t\t\t\t\t\t'section' => $section['section'],\n\t\t\t\t\t\t'settings' => $option['slug'],\n\t\t\t\t\t\t'choices' => $option['choices'],\n\t\t\t\t\t\t'input_attrs' => isset( $option['input_attrs'] ) ? (array) $option['input_attrs'] : array(),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\n\t\t\t\t} else {\n\t\t\t\t\t$wp_customize->add_control($option['slug'], array(\n\t\t\t\t\t\t'type' => $option['type'],\n\t\t\t\t\t\t'label' => $option['label'],\n\t\t\t\t\t\t'section' => $section['section'],\n\t\t\t\t\t\t'settings' => $option['slug'],\n\t\t\t\t\t\t'input_attrs' => isset( $option['input_attrs'] ) ? (array) $option['input_attrs'] : array(),\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}", "title": "" }, { "docid": "18a2a166ef2e603c4bff1d6b0a96a112", "score": "0.69480276", "text": "function montheme_personnalisation($wp_customize){\n // Ajout de la section\n $wp_customize->add_section('ma_section', array(\n 'title' => 'Options de mon thème',\n 'description' => 'Personnalisation du thème',\n 'priority' => 200,\n ));\n\n // Ajout du réglage de couleur des leins\n $wp_customize->add_setting('couleur_liens', array(\n 'default' => '000',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'capability' => 'edit_theme_options',\n 'type' => 'theme_mod',\n 'transport' => 'refresh',\n ));\n // Ajout du contrôle\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'link_color', array(\n 'label' => 'Couleur des liens',\n 'section' => 'ma_section',\n 'settings' => 'couleur_liens',\n )));\n\n // Ajout personnalisation de l’image d’entête\n $wp_customize->add_setting('charge_image');\n // Ajout du controle\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'charge_image', array(\n 'label' => 'Arrière-plan (1140x250px)',\n 'section' => 'ma_section',\n 'settings' => 'charge_image',\n )));\n\n}", "title": "" }, { "docid": "0c65f590bfe2807a24884918ca522dd7", "score": "0.6939279", "text": "function gridbox_customize_register_slideshow_settings($wp_customize)\n{\n // Add Section for Theme Options.\n $wp_customize->add_section('gridbox_section_slideshow', [\n 'title' => esc_html__('Slide Show Settings', 'gridbox'),\n 'priority' => 10,\n /* 'panel' => 'gridbox_options_panel',*/\n ]);\n\n for ($i=0; $i<10; $i++) {\n $wp_customize->add_setting(\n 'upload_setting'.$i,\n [\n 'default' => '',\n 'type' => 'theme_mod'\n ]\n );\n\n $wp_customize->add_setting(\n 'description_setting'.$i,\n [\n 'default' => '',\n 'type' => 'theme_mod'\n ]\n );\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'upload_controller'.$i, [\n 'label' => 'Add New Slide',\n 'section' => 'gridbox_section_slideshow',\n 'settings' => 'upload_setting'.$i,\n 'allow_addition' => true, /*Show UI for adding new content*/\n ]));\n\n $wp_customize->add_control('description_controller'.$i,\n [\n 'label' => 'Description',\n 'section' => 'gridbox_section_slideshow',\n 'settings' => 'description_setting'.$i,\n 'allow_addition' => true, /*Show UI for adding new content*/\n ]\n );\n }\n\n\n}", "title": "" }, { "docid": "f9f76143cfe1389837fe3e5af59a6053", "score": "0.69329566", "text": "public function setSections() {\n\n // Array of social options\n $social_options = array(\n 'Twitter' => 'Twitter',\n 'Facebook' => 'Facebook',\n 'Google Plus' => 'Google Plus',\n 'Pinterest' => 'Pinterest',\n 'RSS' => 'RSS',\n );\n\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if ( is_dir( $sample_patterns_path ) ) :\n\n if ( $sample_patterns_dir = opendir( $sample_patterns_path ) ) :\n $sample_patterns = array();\n\n while ( ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) !== false ) {\n\n if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) {\n $name = explode( '.', $sample_patterns_file );\n $name = str_replace( '.' . end( $name ), '', $sample_patterns_file );\n $sample_patterns[] = array(\n 'alt' => $name,\n 'img' => $sample_patterns_url . $sample_patterns_file\n );\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get( 'Name' );\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf( __( 'Customize &#8220;%s&#8221;', 'e_shopper' ), $this->theme->display( 'Name' ) );\n\n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr( $class ); ?>\">\n <?php if ( $screenshot ) : ?>\n <?php if ( current_user_can( 'edit_theme_options' ) ) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\"\n title=\"<?php echo esc_attr( $customize_title ); ?>\">\n <img src=\"<?php echo esc_url( $screenshot ); ?>\"\n alt=\"<?php esc_attr_e( 'Current theme preview', 'e_shopper' ); ?>\"/>\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url( $screenshot ); ?>\"\n alt=\"<?php esc_attr_e( 'Current theme preview', 'e_shopper' ); ?>\"/>\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display( 'Name' ); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf( __( 'By %s', 'e_shopper' ), $this->theme->display( 'Author' ) ); ?></li>\n <li><?php printf( __( 'Version %s', 'e_shopper' ), $this->theme->display( 'Version' ) ); ?></li>\n <li><?php echo '<strong>' . __( 'Tags', 'e_shopper' ) . ':</strong> '; ?><?php printf( $this->theme->display( 'Tags' ) ); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display( 'Description' ); ?></p>\n <?php\n if ( $this->theme->parent() ) {\n printf( ' <p class=\"howto\">' . __( 'This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.', 'e_shopper' ) . '</p>', __( 'http://codex.wordpress.org/Child_Themes', 'e_shopper' ), $this->theme->parent()->display( 'Name' ) );\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if ( file_exists( dirname( __FILE__ ) . '/info-html.html' ) ) {\n Redux_Functions::initWpFilesystem();\n\n global $wp_filesystem;\n\n $sampleHTML = $wp_filesystem->get_contents( dirname( __FILE__ ) . '/info-html.html' );\n }\n\n // Define Logo & Favicon Path\n define('THEMELOGO', get_template_directory_uri().'/images/home/logo.png');\n define('THEMEFAVICON', get_template_directory_uri().'/favicon.png');\n\n // ACTUAL DECLARATION OF SECTIONS\n //General Settings\n $this->sections[] = array(\n 'title' => __('General Settings', 'e_shopper'),\n 'heading' => __('General Settings', 'e_shopper'),\n 'desc' => __('Here you can uploading site logo and favicon, enable/disable header modules.', 'e_shopper'),\n 'icon' => 'el el-wrench',\n 'submenu' => true,\n 'fields' => array(\n array(\n 'title' => __('Logo', 'e_shopper'),\n 'subtitle' => __('Use this field to upload your custom logo for use in the theme header. Max width: 242px', 'e_shopper'),\n 'id' => 'custom_logo',\n 'default' => array(\n 'url'=> THEMELOGO\n ),\n 'type' => 'media',\n 'url' => true,\n ),\n\n array( \n 'title' => __( 'Favicon', 'e_shopper' ),\n 'subtitle' => __( 'Use this field to upload your custom favicon.', 'e_shopper' ),\n 'id' => 'custom_favicon',\n 'default' => array(\n 'url'=> THEMEFAVICON\n ),\n 'type' => 'media',\n 'url' => true,\n ),\n\n array(\n 'title' => __('Top Mini Header Module', 'e_shopper'),\n 'subtitle' => __('Select to enable/disable display Top Mini Header Module.', 'e_shopper'),\n 'id' => 'disable_header_mini',\n 'default' => true,\n 'on' => __('Enable', 'e_shopper'),\n 'off' => __('Disable', 'e_shopper'),\n 'type' => 'switch',\n ),\n\n array( \n 'title' => __('Contact Email', 'e_shopper'),\n 'subtitle' => __('Set your email address. This is showing on Top Mini Header.', 'e_shopper' ),\n 'id' => 'contact_email',\n 'default' => '[email protected]',\n 'validate' => 'email',\n 'msg' => 'Not a valid email address.',\n 'type' => 'text',\n ),\n\n array(\n 'title' => __('Contact Phone', 'e_shopper'),\n 'subtitle' => __('Set your phone number. You can add multiple phone numbers.', 'e_shopper'),\n 'id' => 'contact_phone',\n 'type' => 'multi_text',\n 'default' => array ('+2 95 01 88 821'),\n ),\n ),\n );\n\n //Homepage Settings\n $this->sections[] = array(\n 'title' => __('Homepage Settings', 'e_shopper'),\n 'heading' => __('Homepage Settings', 'e_shopper'),\n 'desc' => __('Here you can set homepage modules.', 'e_shopper'),\n 'icon' => 'el-icon-home',\n 'fields' => array(\n array(\n 'title' => __('Account Menu Page', 'e_shopper'),\n 'subtitle' => __('Select page from list.', 'e_shopper'),\n 'desc' => __( 'Select page for Account Menu. Leave it blank to disable', 'e_shopper' ),\n 'id' => 'account_page',\n 'type' => 'select',\n 'multi' => false,\n 'data' => 'page',\n 'placeholder' => __('Select page for Account Menu.', 'e_shopper'),\n ),\n\n array(\n 'title' => __('Wishlist Menu Page', 'e_shopper'),\n 'subtitle' => __('Select page from list.', 'e_shopper'),\n 'desc' => __( 'Select page for Wishlist Menu. Leave it blank to disable', 'e_shopper' ),\n 'id' => 'wishlist_page',\n 'type' => 'select',\n 'multi' => false,\n 'data' => 'page',\n 'placeholder' => __('Select page for Wishlist Menu.', 'e_shopper'),\n ),\n\n array(\n 'title' => __('Checkout Menu Page', 'e_shopper'),\n 'subtitle' => __('Select page from list.', 'e_shopper'),\n 'desc' => __( 'Select page for Checkout Menu. Leave it blank to disable', 'e_shopper' ),\n 'id' => 'checkout_page',\n 'type' => 'select',\n 'multi' => false,\n 'data' => 'page',\n 'placeholder' => __('Select page for Checkout Menu.', 'e_shopper'),\n ),\n\n array(\n 'title' => __('Cart Menu Page', 'e_shopper'),\n 'subtitle' => __('Select page from list.', 'e_shopper'),\n 'desc' => __( 'Select page for Cart Menu. Leave it blank to disable', 'e_shopper' ),\n 'id' => 'cart_page',\n 'type' => 'select',\n 'multi' => false,\n 'data' => 'page',\n 'placeholder' => __('Select page for Cart Menu.', 'e_shopper'),\n ),\n\n array(\n 'title' => __('Login Menu Page', 'e_shopper'),\n 'subtitle' => __('Select page from list.', 'e_shopper'),\n 'desc' => __( 'Select page for Login Menu. Leave it blank to disable', 'e_shopper' ),\n 'id' => 'login_page',\n 'type' => 'select',\n 'multi' => false,\n 'data' => 'page',\n 'placeholder' => __('Select page for Login Menu.', 'e_shopper'),\n ),\n )\n );\n\n //Blog Settings\n $this->sections[] = array(\n 'title' => __('Blog Settings', 'e_shopper'),\n 'heading' => __('Blog Settings', 'e_shopper'),\n 'desc' => __('Here you can set blog listing style and customize post style.', 'e_shopper'),\n 'icon' => 'el-icon-th-list',\n 'fields' => array(\n array(\n 'title' => __('Blog Listing Style', 'e_shopper'),\n 'subtitle' => __('Select blog listing style for archive pages.', 'e_shopper'),\n 'id' => 'disable_listing_style',\n 'default' => true,\n 'on' => __('Modern Style', 'e_shopper'),\n 'off' => __('Blog Style', 'e_shopper'),\n 'type' => 'switch',\n ),\n\n array( \n 'title' => __('Read More Button Text', 'e_shopper'),\n 'subtitle' => __('This is the text that will replace Load More.', 'e_shopper'),\n 'id' => 'read_more_text',\n 'default' => 'Read More',\n 'type' => 'text',\n ),\n\n array( \n 'title' => __('Load More Button Text', 'e_shopper'),\n 'subtitle' => __('This is the text for Jetpack\\'s Infinite Scroll.', 'e_shopper'),\n 'id' => 'load_more_text',\n 'default' => '+ Load More',\n 'type' => 'text',\n ),\n\n array( \n 'title' => __('Related Posts Module Title', 'e_shopper'),\n 'subtitle' => __('This is the title for Related Posts Module.', 'e_shopper'),\n 'id' => 'related_title',\n 'default' => 'Related Posts',\n 'type' => 'text',\n ),\n\n array(\n 'title' => __('Post Featured Image', 'e_shopper'),\n 'subtitle' => __('Select to enable/disable display Post Featured Image on header.', 'e_shopper'),\n 'id' => 'disable_featured_img',\n 'default' => true,\n 'on' => __('Enable', 'e_shopper'),\n 'off' => __('Disable', 'e_shopper'),\n 'type' => 'switch',\n ),\n\n array(\n 'title' => __('Post Navigation Module', 'e_shopper'),\n 'subtitle' => __('Select to enable/disable display Post Navigation Module for next and previous posts.', 'e_shopper'),\n 'id' => 'disable_post_nav',\n 'default' => true,\n 'on' => __('Enable', 'e_shopper'),\n 'off' => __('Disable', 'e_shopper'),\n 'type' => 'switch',\n ),\n )\n );\n\n //Social Settings\n $this->sections[] = array(\n 'title' => __('Social Settings', 'e_shopper'),\n 'heading' => __('Social Settings', 'e_shopper'),\n 'desc' => __('Here you can set your social profiles.', 'e_shopper'),\n 'icon' => 'el-icon-group',\n 'fields' => array(\n array(\n 'id' => 'social_facebook',\n 'type' => 'text',\n 'title' => __( 'Facebook Profile Link', 'e_shopper' ),\n 'subtitle' => __( 'This must be a URL.', 'e_shopper' ),\n 'desc' => __( 'Here you put Facebook Profile Link. Leave it blank to disable', 'e_shopper' ),\n 'validate' => 'url',\n 'default' => 'http://facebook.com/smtir',\n 'text_hint' => array(\n 'title' => '',\n 'content' => 'Please enter a valid <strong>URL</strong> in this field.'\n )\n ),\n\n array(\n 'id' => 'social_twitter',\n 'type' => 'text',\n 'title' => __( 'Twitter Profile Link', 'e_shopper' ),\n 'subtitle' => __( 'This must be a URL.', 'e_shopper' ),\n 'desc' => __( 'Here you put Twitter Profile Link. Leave it blank to disable', 'e_shopper' ),\n 'validate' => 'url',\n 'default' => 'http://twitter.com/rm2334',\n 'text_hint' => array(\n 'title' => '',\n 'content' => 'Please enter a valid <strong>URL</strong> in this field.'\n )\n ),\n \n array(\n 'id' => 'social_linkedin',\n 'type' => 'text',\n 'title' => __( 'Linkedin Profile Link', 'e_shopper' ),\n 'subtitle' => __( 'This must be a URL.', 'e_shopper' ),\n 'desc' => __( 'Here you put Linkedin Profile Link. Leave it blank to disable', 'e_shopper' ),\n 'validate' => 'url',\n 'default' => '',\n 'text_hint' => array(\n 'title' => '',\n 'content' => 'Please enter a valid <strong>URL</strong> in this field.'\n )\n ),\n\n array(\n 'id' => 'social_dribbble',\n 'type' => 'text',\n 'title' => __( 'Dribbble Profile Link', 'e_shopper' ),\n 'subtitle' => __( 'This must be a URL.', 'e_shopper' ),\n 'desc' => __( 'Here you put Dribbble Profile Link. Leave it blank to disable', 'e_shopper' ),\n 'validate' => 'url',\n 'default' => '',\n 'text_hint' => array(\n 'title' => '',\n 'content' => 'Please enter a valid <strong>URL</strong> in this field.'\n )\n ),\n\n array(\n 'id' => 'social_gplus',\n 'type' => 'text',\n 'title' => __( 'Google Plus Profile Link', 'e_shopper' ),\n 'subtitle' => __( 'This must be a URL.', 'e_shopper' ),\n 'desc' => __( 'Here you put Google Plus Profile Link. Leave it blank to disable', 'e_shopper' ),\n 'validate' => 'url',\n 'default' => 'http://gplus.com',\n 'text_hint' => array(\n 'title' => '',\n 'content' => 'Please enter a valid <strong>URL</strong> in this field.'\n )\n ), \n )\n );\n\n //Footer Settings\n $this->sections[] = array(\n 'title' => __('Footer Settings', 'e_shopper'),\n 'heading' => __('Footer Settings', 'e_shopper'),\n 'desc' => __('Here you can set site copyright information.', 'e_shopper'),\n 'icon' => 'el-icon-chevron-down',\n 'fields' => array(\n array(\n 'title' => __('Custom Copyright', 'e_shopper'),\n 'subtitle' => __('Add your own custom text/html for copyright region.', 'e_shopper'),\n 'id' => 'custom_copyright',\n 'default' => '',\n 'type' => 'editor',\n ),\n )\n );\n\n //Footer Slide Settings\n $this->sections[] = array(\n 'title' => __('Footer Slide Image', 'e_shopper'),\n 'heading' => __('Footer Slide Section', 'e_shopper'),\n 'desc' => __('Here you can set Footer Slide Image, Heading Text, Map.', 'e_shopper'),\n 'icon' => 'el el-caret-right',\n 'fields' => array(\n array(\n 'title' => __('Footer Slide Heading Text', 'e_shopper'),\n 'subtitle' => __('Add your own custom text/html for Footer Slide Heading Text.', 'e_shopper'),\n 'desc' => __('Leave it blank to disable.', 'e_shopper'),\n 'id' => 'footer_heading',\n 'default' => '<h2><span>e</span>-shopper</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,sed do eiusmod tempor</p>',\n 'type' => 'editor',\n ),\n\n array(\n 'id' => 'footer_slide',\n 'type' => 'slides',\n 'title' => __('Footer Slide Image', 'e_shopper'),\n 'subtitle' => __('Here you can footer image slide.', 'e_shopper'),\n 'desc' => __('Please dont add more than Four Slide', 'e_shopper')\n ),\n\n array(\n 'title' => __('Footer Slide Map Text', 'e_shopper'),\n 'subtitle' => __('Add your own Footer Slide Map Text.', 'e_shopper'),\n 'desc' => __('Leave it blank to disable.', 'e_shopper'),\n 'id' => 'footer_map',\n 'default' => '',\n 'type' => 'text',\n ),\n )\n );\n\n //Contact Page Settings\n $this->sections[] = array(\n 'title' => __('Contact Page Settings', 'e_shopper'),\n 'heading' => __('Contact Page Settings', 'e_shopper'),\n 'desc' => __('Here you can set information for contact page.', 'e_shopper'),\n 'icon' => 'el-icon-envelope',\n 'fields' => array(\n array(\n 'title' => __('Google Map Module', 'e_shopper'),\n 'subtitle' => __('Select to enable/disable display Google Map.', 'e_shopper'),\n 'id' => 'disable_map',\n 'default' => true,\n 'on' => __('Enable', 'e_shopper'),\n 'off' => __('Disable', 'e_shopper'),\n 'type' => 'switch',\n ),\n\n array(\n 'title' => __('Google Map Embed Code', 'e_shopper'),\n 'subtitle' => __('Please refer to <a href=\"http://themeart.co/document/e_shopper-theme-documentation/#google-map-settings\" target=\"_blank\">theme documentation</a> for how to Embed a Google Map with iFrame.', 'e_shopper'),\n 'id' => 'map_code',\n 'default' => '<iframe src=\"https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d1584.2679903399307!2d-122.09496935581758!3d37.42444119584552!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x808fba1a7f2db7e7%3A0x59c3e570fe8e0c73!2sGoogle+West+Campus+6%2C+2350+Bayshore+Pkwy%2C+Mountain+View%2C+CA+94043%2C+USA!5e0!3m2!1sen!2s!4v1422891258666\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0\"></iframe>',\n 'type' => 'ace_editor',\n 'mode' => 'html',\n 'theme' => 'monokai',\n ),\n\n array( \n 'title' => __('Contact Email', 'e_shopper'),\n 'subtitle' => __('Set your email address. This is where the contact form will send a message to.', 'e_shopper' ),\n 'id' => 'contact_email_i',\n 'default' => '[email protected]',\n 'validate' => 'email',\n 'msg' => 'Not a valid email address.',\n 'type' => 'text',\n ),\n\n array(\n 'title' => __('Contact Mail Subject', 'e_shopper'),\n 'subtitle' => __('Add some topics for your mail subject.', 'e_shopper'),\n 'id' => 'contact_subject',\n 'type' => 'multi_text',\n 'default' => array ('Aloha'),\n ),\n )\n );\n\n //404 Page Settings\n $this->sections[] = array(\n 'title' => __('404 Page Settings', 'e_shopper'),\n 'heading' => __('404 Page Settings', 'e_shopper'),\n 'desc' => __('Here you can set information for 404 page.', 'e_shopper'),\n 'icon' => 'el-icon-error',\n 'fields' => array(\n array(\n 'title' => __('404 Image', 'e_shopper'),\n 'subtitle' => __('Use this field to upload your custom 404 image.', 'e_shopper'),\n 'id' => '404_image',\n 'default' => '',\n 'type' => 'media',\n 'url' => true,\n ),\n\n array(\n 'title' => __('Notice Information', 'e_shopper'),\n 'subtitle' => __('Add notice information for 404 page.', 'e_shopper'),\n 'id' => '404_info',\n 'default' => \"We're sorry, but we can't find the page you were looking for. It's probably some thing we've done wrong but now we know about it and we'll try to fix it. In the meantime, try one of these options:\",\n 'type' => 'editor',\n ),\n )\n );\n\n //Custom CSS\n $this->sections[] = array(\n 'icon' => 'el-icon-css',\n 'title' => __('Custom CSS', 'e_shopper'),\n 'fields' => array(\n array(\n 'title' => __('Custom CSS', 'e_shopper'),\n 'subtitle' => __('Insert any custom CSS.', 'e_shopper'),\n 'id' => 'custom_css',\n 'type' => 'ace_editor',\n 'mode' => 'css',\n 'theme' => 'monokai',\n ),\n ),\n );\n\n $this->sections[] = array(\n 'title' => __('Import / Export', 'e_shopper'),\n 'desc' => __('Import and Export your theme settings from file, text or URL.', 'e_shopper'),\n 'icon' => 'el-icon-refresh',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your theme options',\n 'full_width' => false,\n ),\n ),\n );\n\n $this->sections[] = array(\n 'type' => 'divide',\n );\n\n\n }", "title": "" }, { "docid": "ef61c7bc724f2d67a815cf2ff8fe0d7e", "score": "0.69289714", "text": "function ale_customize_register($wp_customize){\n\t$wp_customize->add_section('ads', array(\n\t\t'title' => __('My settings', 'aletheme'),\n\t\t'priority' => 30,\n\t));\n\t//contact me\n\t$wp_customize->add_setting('ads_code_111', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n \n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_111', array(\n\t\t'label' => __( 'contact me', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_111',\n\t\t'type' => 'input',\n\t)));\n\t//Dribbble\n\t$wp_customize->add_setting('ads_code', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n \n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code', array(\n\t\t'label' => __( 'Dribbble', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code',\n\t\t'type' => 'input',\n\t)));\n //LinkedIn\n $wp_customize->add_setting('ads_code_1', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_1', array(\n\t\t'label' => __( 'LinkedIn', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_1',\n\t\t'type' => 'input',\n\t)));\n\t//Twitter\n $wp_customize->add_setting('ads_code_2', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_2', array(\n\t\t'label' => __( 'Twitter', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_2',\n\t\t'type' => 'input',\n\t)));\n\t//Medium\n $wp_customize->add_setting('ads_code_3', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_3', array(\n\t\t'label' => __( 'Medium', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_3',\n\t\t'type' => 'input',\n\t)));\n\t//Instagram\n $wp_customize->add_setting('ads_code_4', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_4', array(\n\t\t'label' => __( 'Instagram', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_4',\n\t\t'type' => 'input',\n\t)));\n\t//Behance\n $wp_customize->add_setting('ads_code_5', array(\n\t\t'default' => '',\n\t\t'transport' => 'postMEssage',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_5', array(\n\t\t'label' => __( 'Behance', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_5',\n\t\t'type' => 'input',\n\t)));\n\t//Hello, my name - title 1\n $wp_customize->add_setting('ads_code_6', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_6', array(\n\t\t'label' => __( 'Hello, my name - title 1', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_6',\n\t\t'type' => 'input',\n\t)));\n\t//I’m a Product designer 1\n $wp_customize->add_setting('ads_code_7', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_7', array(\n\t\t'label' => __( 'I’m a Product designer - description 1', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_7',\n\t\t'type' => 'textarea',\n\t)));\n\t//Hello- title 2\n $wp_customize->add_setting('ads_code_8', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_8', array(\n\t\t'label' => __( 'Hello- title 2', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_8',\n\t\t'type' => 'input',\n\t)));\n\t//I’m a Product designer 2\n $wp_customize->add_setting('ads_code_9', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_9', array(\n\t\t'label' => __( 'Lets get', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_9',\n\t\t'type' => 'textarea',\n\t)));\n\t//I'm dani adnor\n $wp_customize->add_setting('ads_code_91', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_91', array(\n\t\t'label' => __( \"I'm Dani Andor - description\", 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_91',\n\t\t'type' => 'textarea',\n\t)));\n\t//Project\n $wp_customize->add_setting('ads_code_92', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_92', array(\n\t\t'label' => __( 'Project', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_92',\n\t\t'type' => 'input',\n\t)));\n\t// Take a look\n $wp_customize->add_setting('ads_code_93', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_93', array(\n\t\t'label' => __( 'Take a look', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_93',\n\t\t'type' => 'input',\n\t)));\n\t// Check out\n $wp_customize->add_setting('ads_code_94', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_94', array(\n\t\t'label' => __( 'Check out', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_94',\n\t\t'type' => 'input',\n\t)));\n\t// Experience \n $wp_customize->add_setting('ads_code_95', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_95', array(\n\t\t'label' => __( 'Experience', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_95',\n\t\t'type' => 'input',\n\t)));\n\t// Several years of \n $wp_customize->add_setting('ads_code_96', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_96', array(\n\t\t'label' => __( 'Several years of ', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_96',\n\t\t'type' => 'textarea',\n\t)));\n\n\t//Have a great idea? - title 3\n $wp_customize->add_setting('ads_code_10', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_10', array(\n\t\t'label' => __( 'Have a great idea? - title 3', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_10',\n\t\t'type' => 'textarea',\n\t)));\n\t//Lets work together\n $wp_customize->add_setting('ads_code_11', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_11', array(\n\t\t'label' => __( 'Lets work together', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_11',\n\t\t'type' => 'textarea',\n\t)));\n\t//If you looking for\n $wp_customize->add_setting('ads_code_12', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_12', array(\n\t\t'label' => __( 'If you are looking for a UI/UX - description 3', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_12',\n\t\t'type' => 'textarea',\n\t)));\n\n\t//Fulfilli\n $wp_customize->add_setting('ads_code_13', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_13', array(\n\t\t'label' => __( 'Fulfilli', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_13',\n\t\t'type' => 'input',\n\t)));\n\n\t//Effective Experiments\n $wp_customize->add_setting('ads_code_14', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_14', array(\n\t\t'label' => __( 'Effective Experiments', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_14',\n\t\t'type' => 'input',\n\t)));\n\t//Cognetik\n\t$wp_customize->add_setting('ads_code_15', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_15', array(\n\t\t'label' => __( 'Cognetik', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_15',\n\t\t'type' => 'input',\n\t)));\n\t//FlipSnack\n\t$wp_customize->add_setting('ads_code_16', array(\n\t\t'default' => '',\n\t\t'transport' => 'refresh',\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'ads_code_16', array(\n\t\t'label' => __( 'FlipSnack', 'aletheme'),\n\t\t'section' => 'ads',\n\t\t'settings' => 'ads_code_16',\n\t\t'type' => 'input',\n\t)));\n}", "title": "" }, { "docid": "ba83329d0112ffb81a365c73c2a868d2", "score": "0.69269985", "text": "protected function _register_controls(){\n //Name of the content section\n $this->start_controls_section(\n 'about',\n array(\n 'label' => __('About', 'reveal'),\n 'tab' => Controls_Manager::TAB_CONTENT\n )\n );\n\n //input fields for the content\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'reveal' ),\n 'type' => Controls_Manager::TEXT\n )\n ); // end add_control\n\n //button for the slider\n $this->add_control(\n 'sub_title',\n array(\n 'label' => __( 'Sub Title', 'reveal' ),\n 'type' => Controls_Manager::TEXT\n )\n );\n\n //about image\n $this->add_control(\n 'image',\n array(\n 'label' => __( 'Add Slider Images', 'reveal' ),\n 'type' => Controls_Manager::MEDIA\n )\n );\n\n //Reapeater\n $repeater = new Repeater();\n\n $repeater->add_control(\n 'list_icon', [\n 'label' => __( 'Icon', 'reveal' ),\n 'type' => Controls_Manager::ICON,\n 'default' => __( 'List Title' , 'reveal' ),\n 'label_block' => true,\n ]\n );\n\n $repeater->add_control(\n 'list_content', [\n 'label' => __( 'Content Text', 'reveal' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'default' => __( 'List Content' , 'reveal' ),\n 'show_label' => true,\n ]\n );\n\n $this->add_control(\n 'list',\n [\n 'label' => __( 'About List Content', 'reveal' ),\n 'type' => Controls_Manager::REPEATER,\n 'fields' => $repeater->get_controls()\n ]\n );\n\n\n\n\n $this->end_controls_section(); //end of field creation\n\n //Section for style sheet\n $this->start_controls_section( //input field label\n 'content_style', //unique id\n [\n 'label' => __( 'Style', 'reveal' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n $this->end_controls_section();\n\n\n\n }", "title": "" }, { "docid": "b2998186a563fe29ac683b4ef57ef574", "score": "0.69198936", "text": "private function register_common_controls() {\n\t\t$slug = $this->section_data['slug'];\n\t\t$initially_hidden = $this->get_initial_section_status();\n\t\t$control_section = $this->get_control_section();\n\n\t\t$controls_to_add = array();\n\t\tif ( array_key_exists( 'controls', $this->section_data ) ) {\n\t\t\t$controls_to_add = $this->section_data['controls'];\n\t\t}\n\n\t\t$controls = array();\n\t\tif ( in_array( 'hide', $controls_to_add, true ) || empty( $controls_to_add ) ) {\n\t\t\t$controls[ 'hestia_' . $slug . '_hide' ] = array(\n\t\t\t\t'setting' => array(\n\t\t\t\t\t'sanitize_callback' => 'hestia_sanitize_checkbox',\n\t\t\t\t\t'default' => $initially_hidden,\n\t\t\t\t\t'transport' => $this->selective_refresh,\n\t\t\t\t),\n\t\t\t\t'control' => array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__( 'Disable section', 'hestia' ),\n\t\t\t\t\t'section' => $control_section,\n\t\t\t\t\t'priority' => 1,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif ( in_array( 'title', $controls_to_add, true ) || empty( $controls_to_add ) ) {\n\t\t\t$controls[ 'hestia_' . $slug . '_title' ] = array(\n\t\t\t\t'setting' => array(\n\t\t\t\t\t'sanitize_callback' => 'wp_kses_post',\n\t\t\t\t\t'transport' => $this->selective_refresh,\n\t\t\t\t),\n\t\t\t\t'control' => array(\n\t\t\t\t\t'label' => esc_html__( 'Section Title', 'hestia' ),\n\t\t\t\t\t'section' => $control_section,\n\t\t\t\t\t'priority' => 5,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif ( in_array( 'subtitle', $controls_to_add, true ) || empty( $controls_to_add ) ) {\n\t\t\t$controls[ 'hestia_' . $slug . '_subtitle' ] = array(\n\t\t\t\t'setting' => array(\n\t\t\t\t\t'sanitize_callback' => 'wp_kses_post',\n\t\t\t\t\t'transport' => $this->selective_refresh,\n\t\t\t\t),\n\t\t\t\t'control' => array(\n\t\t\t\t\t'label' => esc_html__( 'Section Subtitle', 'hestia' ),\n\t\t\t\t\t'section' => $control_section,\n\t\t\t\t\t'priority' => 10,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $controls as $control_name => $control_data ) {\n\t\t\t$this->add_control(\n\t\t\t\tnew Hestia_Customizer_Control(\n\t\t\t\t\t$control_name,\n\t\t\t\t\t$control_data['setting'],\n\t\t\t\t\t$control_data['control']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "0cbcec96dcc3999c23cbdb43acbf88a2", "score": "0.6914615", "text": "function eddwp_customize_register( $wp_customize ) {\n\n\t/**\n\t * Extends controls class to add textarea with description\n\t */\n\tclass EDDWP_WP_Customize_Textarea_Control extends WP_Customize_Control {\n\t\tpublic $type = 'textarea';\n\t\tpublic $description = '';\n\t\tpublic function render_content() { ?>\n\n\t\t\t<label>\n\t\t\t<span class=\"customize-control-title\">\n\t\t\t\t<?php echo esc_html( $this->label ) . ' '; ?>\n\t\t\t\t<span class=\"eddwp-toggle-wrap\">\n\t\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t\t<a href=\"#\" class=\"eddwp-toggle-description\">?</a>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t\t\t<div class=\"control-description eddwp-control-description\"><?php echo esc_html( $this->description ); ?></div>\n\t\t\t\t<textarea rows=\"5\" style=\"width:98%;\" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>\n\t\t\t</label>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Extends controls class to add descriptions to text input controls\n\t */\n\tclass EDDWP_WP_Customize_Text_Control extends WP_Customize_Control {\n\t\tpublic $type = 'customtext';\n\t\tpublic $description = '';\n\t\tpublic function render_content() { ?>\n\n\t\t\t<label>\n\t\t\t<span class=\"customize-control-title\">\n\t\t\t\t<?php echo esc_html( $this->label ) . ' '; ?>\n\t\t\t\t<span class=\"eddwp-toggle-wrap\">\n\t\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t\t<a href=\"#\" class=\"eddwp-toggle-description\">?</a>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t\t\t<div class=\"control-description eddwp-control-description\"><?php echo esc_html( $this->description ); ?></div>\n\t\t\t\t<input type=\"text\" value=\"<?php echo esc_attr( $this->value() ); ?>\" <?php $this->link(); ?> />\n\t\t\t</label>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Allow arbitrary HTML controls\n\t */\n\tclass EDDWP_Customizer_HTML extends WP_Customize_Control {\n\t\tpublic $content = '';\n\t\tpublic function render_content() {\n\t\t\tif ( isset( $this->label ) ) {\n\t\t\t\techo '<hr><h3 class=\"settings-heading\">' . $this->label . '</h3>';\n\t\t\t}\n\t\t\tif ( isset( $this->description ) ) {\n\t\t\t\techo '<div class=\"description customize-control-description settings-description\">' . $this->description . '</div>';\n\t\t\t}\n\t\t}\n\t}\n\n\n\t/** =============\n\t * direct links\n\t */\n\t$wp_customize->add_section( 'eddwp_direct_links', array(\n\t\t'title' => 'Direct Links',\n\t) );\n\n\t// terms & conditions\n\t$wp_customize->add_setting( 'eddwp_terms_link', array(\n\t\t'default' => null,\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_terms_link', array(\n\t\t'label' => 'Terms & Conditions URL',\n\t\t'section' => 'eddwp_direct_links',\n\t\t'priority' => 10,\n\t) ) );\n\n\t// EDD core download URL\n\t$wp_customize->add_setting( 'eddwp_download_core', array(\n\t\t'default' => null,\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_download_core', array(\n\t\t'label' => 'EDD Core Download URL',\n\t\t'section' => 'eddwp_direct_links',\n\t\t'priority' => 20,\n\t) ) );\n\n\t// EDD demo URL\n\t$wp_customize->add_setting( 'eddwp_demo_link', array(\n\t\t'default' => null,\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_demo_link', array(\n\t\t'label' => 'EDD Demo URL',\n\t\t'section' => 'eddwp_direct_links',\n\t\t'priority' => 30,\n\t) ) );\n\n\n\t/** =============\n\t * sales promotion\n\t */\n\t$wp_customize->add_section( 'eddwp_sales_promotion', array(\n\t\t'title' => 'Sales Promotion',\n\t) );\n\n\t// Starter Package settings\n\t$wp_customize->add_setting( 'eddwp_starter_package_settings', array() );\n\t$wp_customize->add_control( new EDDWP_Customizer_HTML( $wp_customize, 'eddwp_starter_package_settings', array(\n\t\t'section' => 'eddwp_sales_promotion',\n\t\t'priority' => 10,\n\t\t'label' => 'Starter Package settings',\n\t\t'description' => 'Not much is needed as the Starter Package stands alone. But when needed, random settings for the page can be found here.'\n\t) ) );\n\n\t// Starter Package discount percentage\n\t$wp_customize->add_setting( 'eddwp_starter_package_discount_percentage', array(\n\t\t'default' => '30',\n\t\t'sanitize_callback' => 'eddwp_sanitize_integer'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_starter_package_discount_percentage', array(\n\t\t'label' => 'Starter Package Discount Percentage',\n\t\t'section' => 'eddwp_sales_promotion',\n\t\t'description' => 'This is just a visual display of the discount percentage applied to the Starter Package products. It\\'s here simply so changing this doesn\\'t require site updates. Product fields still have to be adjusted manually in the form when this value changes.',\n\t\t'priority' => 11,\n\t) ) );\n\n\t// Active discount adjustments\n\t$wp_customize->add_setting( 'eddwp_active_discount_adjustment', array() );\n\t$wp_customize->add_control( new EDDWP_Customizer_HTML( $wp_customize, 'eddwp_active_discount_adjustment', array(\n\t\t'section' => 'eddwp_sales_promotion',\n\t\t'priority' => 20,\n\t\t'label' => 'Active discount adjustments',\n\t\t'description' => 'We only run one major promotion at a time. During this period, the presence of an active discount code in the \"Active discount code\" field below will trigger the settings below it.',\n\t) ) );\n\n\t// Active discount code\n\t$wp_customize->add_setting( 'eddwp_active_discount_code', array(\n\t\t'default' => null,\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_active_discount_code', array(\n\t\t'label' => 'Active discount code',\n\t\t'section' => 'eddwp_sales_promotion',\n\t\t'description' => 'The status of this discount code triggers the settings below. As in, if this code is active, the rest of the settings in this section will go into effect. That means a scheduled discount code can be entered here, and its effects will be automated based on start and end dates.',\n\t\t'priority' => 21,\n\t) ) );\n\n\t// Alternate Click to Tweet text\n\t$wp_customize->add_setting( 'eddwp_alt_ctt_text_purchase_confirmation', array(\n\t\t'default' => 'I just saved big on @eddwp extensions! Check it out! #WordPress',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea',\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Textarea_Control( $wp_customize, 'eddwp_alt_ctt_text_purchase_confirmation', array(\n\t\t'label' => 'Purchase Confirmation CTT text',\n\t\t'section' => 'eddwp_sales_promotion',\n\t\t'description' => 'This text will override the default \"Click To Tweet\" text on the Purchase Confirmation page if there is an active discount code in the \"Active discount code\" setting above.',\n\t\t'priority' => 22,\n\t) ) );\n\n\n\t/** =============\n\t * Purchase Confirmation\n\t */\n\t$wp_customize->add_section( 'eddwp_purchase_confirmation_settings', array(\n\t\t'title' => 'Purchase Confirmation',\n\t) );\n\n\t// show Click to Tweet\n\t$wp_customize->add_setting( 'eddwp_click_to_tweet_purchase_confirmation', array(\n\t\t'default'\t\t\t=> 0,\n\t\t'sanitize_callback'\t=> 'eddwp_sanitize_checkbox'\n\t) );\n\t$wp_customize->add_control( 'eddwp_click_to_tweet_purchase_confirmation', array(\n\t\t'label' => 'Show Click to Tweet',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'priority' => 10,\n\t\t'type' => 'checkbox',\n\t) );\n\n\t// Click to Tweet text\n\t$wp_customize->add_setting( 'eddwp_ctt_text_purchase_confirmation', array(\n\t\t'default' => \"I've just purchased extensions from @eddwp for #WordPress!\",\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea',\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Textarea_Control( $wp_customize, 'eddwp_ctt_text_purchase_confirmation', array(\n\t\t'label' => 'Click to Tweet Text',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'description' => 'This is the value of a shortcode attribute. You are not allowed to enter HTML here. Keep it short... tweet size.',\n\t\t'priority' => 20,\n\t) ) );\n\n\t// Click to Tweet tweet URL\n\t$wp_customize->add_setting( 'eddwp_ctt_url_purchase_confirmation', array(\n\t\t'default' => 'https://easydigitaldownloads.com/downloads/',\n\t\t'sanitize_callback' => 'eddwp_sanitize_text'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_ctt_url_purchase_confirmation', array(\n\t\t'label' => 'URL attached to the tweet',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'priority' => 30,\n\t) ) );\n\n\t// show cross-site promotions\n\t$wp_customize->add_setting( 'eddwp_cross_site_promotion_purchase_confirmation', array(\n\t\t'default'\t\t\t=> 1,\n\t\t'sanitize_callback'\t=> 'eddwp_sanitize_checkbox'\n\t) );\n\t$wp_customize->add_control( 'eddwp_cross_site_promotion_purchase_confirmation', array(\n\t\t'label' => 'Show Cross-site Promotions',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'priority' => 40,\n\t\t'type' => 'checkbox',\n\t) );\n\n\t// AffiliateWP title\n\t$wp_customize->add_setting( 'eddwp_cross_site_affwp_title_purchase_confirmation', array(\n\t\t'default' => 'Need an affiliate program?',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_cross_site_affwp_title_purchase_confirmation', array(\n\t\t'label' => 'Title for AffiliateWP section',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'priority' => 50,\n\t) ) );\n\n\t// AffiliateWP text\n\t$wp_customize->add_setting( 'eddwp_cross_site_affwp_text_purchase_confirmation', array(\n\t\t'default' => 'The best affiliate marketing plugin for WordPress.',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea',\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Textarea_Control( $wp_customize, 'eddwp_cross_site_affwp_text_purchase_confirmation', array(\n\t\t'label' => 'Text for AffiliateWP section',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'description' => 'Unless we have a very specific reason, this should probably match the AffiliateWP site tagline.',\n\t\t'priority' => 60,\n\t) ) );\n\n\t// Restrict Content Pro title\n\t$wp_customize->add_setting( 'eddwp_cross_site_rcp_title_purchase_confirmation', array(\n\t\t'default' => 'How about a membership site?',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea_lite'\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Text_Control( $wp_customize, 'eddwp_cross_site_rcp_title_purchase_confirmation', array(\n\t\t'label' => 'Title for Restrict Content Pro section',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'priority' => 70,\n\t) ) );\n\n\t// Restrict Content Pro text\n\t$wp_customize->add_setting( 'eddwp_cross_site_rcp_text_purchase_confirmation', array(\n\t\t'default' => 'A full-featured, powerful membership solution for WordPress.',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea',\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Textarea_Control( $wp_customize, 'eddwp_cross_site_rcp_text_purchase_confirmation', array(\n\t\t'label' => 'Text for Restrict Content Pro section',\n\t\t'section' => 'eddwp_purchase_confirmation_settings',\n\t\t'description' => 'Unless we have a very specific reason, this should probably match the Restrict Content Pro site tagline.',\n\t\t'priority' => 80,\n\t) ) );\n\n\n\t/** =============\n\t * Support Page\n\t */\n\t$wp_customize->add_section( 'eddwp_support_page_settings', array(\n\t\t'title' => 'Support Page',\n\t) );\n\n\t// Show Customer Notice\n\t$wp_customize->add_setting( 'eddwp_show_customer_notice_support_page', array(\n\t\t'default' => 0,\n\t\t'sanitize_callback' => 'eddwp_sanitize_checkbox',\n\t) );\n\t$wp_customize->add_control( 'eddwp_show_customer_notice_support_page', array(\n\t\t'label' => 'Show Customer Notice',\n\t\t'section' => 'eddwp_support_page_settings',\n\t\t'priority' => 10,\n\t\t'type' => 'checkbox',\n\t) );\n\n\t// Notice Text\n\t$wp_customize->add_setting( 'eddwp_customer_notice_text_support_page', array(\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'eddwp_sanitize_textarea',\n\t) );\n\t$wp_customize->add_control( new EDDWP_WP_Customize_Textarea_Control( $wp_customize, 'eddwp_customer_notice_text_support_page', array(\n\t\t'label' => 'Text for the customer notice',\n\t\t'section' => 'eddwp_support_page_settings',\n\t\t'description' => 'Display a notice to customers on the support page alerting them of known issues or relevant information.',\n\t\t'priority' => 80,\n\t) ) );\n\n\t// Notice class\n\t$wp_customize->add_setting( 'eddwp_customer_notice_class_support_page', array(\n\t\t'default' => '',\n\t) );\n\t$wp_customize->add_control( 'eddwp_customer_notice_class_support_page', array(\n\t\t'label' => 'Class for the notice to use.',\n\t\t'section' => 'eddwp_support_page_settings',\n\t\t'description' => 'Choose from one of the base EDD Alert classes.',\n\t\t'priority' => 80,\n\t\t'type' => 'select',\n\t\t'choices' => array( 'error' => 'Error (Red)', 'success' => 'Success (Green)', 'warn' => 'Warning (Yellow)', 'info' => 'Info (Blue)' ),\n\t) );\n}", "title": "" }, { "docid": "215992dd6f902a188bfdb9e9976a1032", "score": "0.68913037", "text": "public function after_add_controls() {\n\t\tif ( $this->section_data === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->register_frontpage_section();\n\t\t$this->register_common_controls();\n\t}", "title": "" }, { "docid": "d454c036b35490c46a68d6a3ba708d7c", "score": "0.6883985", "text": "function trinity_customizer($wp_customize){\n\t$wp_customize->add_section('trinity_header',array(\n\t\t'title' => __('Header','trinity'),\n\t\t'description' => 'Customize Header of theme'\n\t));\n\t$wp_customize->add_setting('header_logo',array(\n\t\t'default' => get_template_directory_uri().'/images/logo.png'\n\t));\n\t$wp_customize->add_setting('header_banner',array(\n\t\t'default' => get_template_directory_uri().'/images/banner.jpg'\n\t));\n\t\n\t$wp_customize->add_control(new WP_Customize_Image_control($wp_customize,'header_logo',array(\n\t\t'label' => __('Change Logo Image','trinity'),\n\t\t'section' => 'trinity_header',\n\t\t'settings' => 'header_logo'\n\t)));\n\t$wp_customize->add_control(new WP_Customize_Image_control($wp_customize,'header_banner',array(\n\t\t'label' => __('Change Header Background Image','trinity'),\n\t\t'section' => 'trinity_header',\n\t\t'settings' => 'header_banner'\n\t)));\n\t\n\t/* Footer Section */\n\t$wp_customize->add_section('trinity_footer',array(\n\t\t'title' => __('Footer','trinity'),\n\t\t'description' => 'Customize Footer of theme'\n\t));\n\t\n\t$wp_customize->add_setting('copyright',array(\n\t\t'default' => 'Copyright 2015 Website'\n\t));\n\t$wp_customize->add_setting('social_fb',array(\n\t\t'default' => 'http://www.facebook.com'\n\t));\n\t$wp_customize->add_setting('social_gp',array(\n\t\t'default' => 'http://plus.google.com'\n\t));\n\t$wp_customize->add_setting('social_tw',array(\n\t\t'default' => 'http://www.twitter.com'\n\t));\n\t$wp_customize->add_setting('social_rss',array(\n\t\t'default' => get_bloginfo('rss_url')\n\t));\n\t$wp_customize->add_control('copyright',array(\n\t\t'label' => __('Change Copyright Text','trinity'),\n\t\t'section' => 'trinity_footer',\n\t\t'settings' => 'copyright'\n\t));\n\t$wp_customize->add_control('social_fb',array(\n\t\t'label' => __('Change Facebook link','trinity'),\n\t\t'section' => 'trinity_footer',\n\t\t'settings' => 'social_fb'\n\t));\n\t$wp_customize->add_control('social_gp',array(\n\t\t'label' => __('Change Google Plus link','trinity'),\n\t\t'section' => 'trinity_footer',\n\t\t'settings' => 'social_gp'\n\t));\n\t$wp_customize->add_control('social_tw',array(\n\t\t'label' => __('Change Twitter link','trinity'),\n\t\t'section' => 'trinity_footer',\n\t\t'settings' => 'social_tw'\n\t));\n\t$wp_customize->add_control('social_rss',array(\n\t\t'label' => __('Change RSS feed link','trinity'),\n\t\t'section' => 'trinity_footer',\n\t\t'settings' => 'social_rss'\n\t));\n}", "title": "" }, { "docid": "dff06d2ad9bc4e862e9ca6b8c25cec1d", "score": "0.6883063", "text": "public static function register($wp_customize) {\n \n //1. Define a new section (if desired) to the Theme Customizer\n $wp_customize->add_section('de_customizer_options', array(\n 'title' => __('DE Options', ET_DOMAIN) ,\n 'priority' => 35,\n 'capability' => 'edit_theme_options',\n 'description' => __('Allows you to customize some example settings for DirectoryEngine.', ET_DOMAIN) ,\n \n //Descriptive tooltip\n \n \n ));\n \n //2. Register new settings to the WP database...\n $wp_customize->add_setting('header_bg_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('body_bg_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('footer_bg_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('btm_footer_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('main_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('second_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('project_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n $wp_customize->add_setting('profile_color', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n ));\n \n //3. Finally, we define the control itself (which links a setting to a section and renders the HTML controls)...\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_bg_color', array(\n 'label' => __('Header Background Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'header_bg_color',\n 'priority' => 10,\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'body_bg_color', array(\n 'label' => __('Body Background Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'body_bg_color',\n 'priority' => 10,\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_bg_color', array(\n 'label' => __('Footer Background Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'footer_bg_color',\n 'priority' => 10,\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'btm_footer_color', array(\n 'label' => __('Copyright Background Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'btm_footer_color',\n 'priority' => 10,\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'main_color', array(\n 'label' => __('Main Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'main_color',\n 'description' => __(\"Site main color, such view profile, apply project button\", ET_DOMAIN) ,\n 'priority' => 10,\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'second_color', array(\n 'label' => __('Secondary Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'second_color',\n 'description' => __(\"On background have 2 color, it is the gray\", ET_DOMAIN) ,\n 'priority' => 10\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'project_color', array(\n 'label' => __('Project Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'project_color',\n 'description' => __(\"Profile main color, such as link, title, create project button\", ET_DOMAIN) ,\n 'priority' => 10\n )));\n \n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'profile_color', array(\n 'label' => __('Profile Color', ET_DOMAIN) ,\n 'section' => 'colors',\n 'settings' => 'profile_color',\n 'description' => __(\"Profile main color, such as professional title\", ET_DOMAIN) ,\n 'priority' => 10,\n )));\n \n //4. We can also change built-in settings by modifying properties. For instance, let's make some stuff use live preview JS...\n $wp_customize->get_setting('blogname')->transport = 'postMessage';\n $wp_customize->get_setting('blogdescription')->transport = 'postMessage';\n $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';\n $wp_customize->get_setting('background_color')->transport = 'postMessage';\n }", "title": "" }, { "docid": "88276cab21fd11ab3dcaf411dab85619", "score": "0.6874423", "text": "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'plugin-name' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\n $this->add_control(\n\t\t\t'title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title', 'elementor-stellar' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'default' => __( 'Default title', 'elementor-stellar' ),\n\t\t\t\t'placeholder' => __( 'Type your title here', 'elementor-stellar' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'description',\n\t\t\t[\n\t\t\t\t'label' => __( 'Description', 'plugin-domain' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXTAREA,\n\t\t\t\t'rows' => 10,\n\t\t\t\t'default' => __( 'Default description', 'plugin-domain' ),\n\t\t\t\t'placeholder' => __( 'Type your description here', 'plugin-domain' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'image',\n\t\t\t[\n\t\t\t\t'label' => __( 'Choose Image', 'plugin-domain' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::MEDIA,\n\t\t\t\t'default' => [\n\t\t\t\t\t'url' => \\Elementor\\Utils::get_placeholder_image_src(),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'url',\n\t\t\t[\n\t\t\t\t'label' => __( 'URL', 'plugin-name' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'input_type' => 'url',\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'plugin-name' ),\n\t\t\t]\n\t\t);\n\n $this->end_controls_section();\n\n\n\n\t}", "title": "" }, { "docid": "08c448da23f680ace90b374ba263a74a", "score": "0.6874423", "text": "function hestia_portfolio_customize_register( $wp_customize ) {\n\n\t$portfolio_enabled = hestia_jetpack_portfolio_configured();\n\tif ( $portfolio_enabled === false ) {\n\t\treturn;\n\t}\n\n\t$selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;\n\n\t$wp_customize->add_section(\n\t\t'hestia_portfolio', array(\n\t\t\t'title' => esc_html__( 'Portfolio', 'hestia-pro' ),\n\t\t\t'panel' => 'hestia_frontpage_sections',\n\t\t\t'priority' => apply_filters( 'hestia_section_priority', 25, 'hestia_portfolio' ),\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'hestia_portfolio_hide', array(\n\t\t\t'sanitize_callback' => 'hestia_sanitize_checkbox',\n\t\t\t'default' => true,\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'hestia_portfolio_hide', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Disable section','hestia-pro' ),\n\t\t\t'section' => 'hestia_portfolio',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'hestia_portfolio_title', array(\n\t\t\t'default' => esc_html__( 'Portfolio', 'hestia-pro' ),\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'transport' => $selective_refresh ? 'postMessage' : 'refresh',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'hestia_portfolio_title', array(\n\t\t\t'label' => esc_html__( 'Section Title', 'hestia-pro' ),\n\t\t\t'section' => 'hestia_portfolio',\n\t\t\t'priority' => 5,\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'hestia_portfolio_subtitle', array(\n\t\t\t'default' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'hestia-pro' ),\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'transport' => $selective_refresh ? 'postMessage' : 'refresh',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'hestia_portfolio_subtitle', array(\n\t\t\t'label' => esc_html__( 'Section Subtitle', 'hestia-pro' ),\n\t\t\t'section' => 'hestia_portfolio',\n\t\t\t'priority' => 10,\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'hestia_portfolio_items', array(\n\t\t\t'default' => 3,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'transport' => $selective_refresh ? 'postMessage' : 'refresh',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'hestia_portfolio_items', array(\n\t\t\t'label' => esc_html__( 'Number of Items', 'hestia-pro' ),\n\t\t\t'section' => 'hestia_portfolio',\n\t\t\t'priority' => 15,\n\t\t\t'type' => 'number',\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'hestia_portfolio_boxes_type', array(\n\t\t\t'default' => false,\n\t\t\t'sanitize_callback' => 'hestia_sanitize_checkbox',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'hestia_portfolio_boxes_type', array(\n\t\t\t'label' => esc_html__( 'Enable big boxes?', 'hestia-pro' ),\n\t\t\t'description' => esc_html__( 'You must have more then 3 portfolio items displayed in this section in order to see the difference.','hestia-pro' ),\n\t\t\t'section' => 'hestia_portfolio',\n\t\t\t'priority' => 20,\n\t\t\t'type' => 'checkbox',\n\t\t)\n\t);\n\n}", "title": "" }, { "docid": "0f987808608edf5a4d47c46f245c56a5", "score": "0.6870871", "text": "public function add_sections( $wp_customize ) {\n\n\t\tif ( ! empty( self::$sections ) ) {\n\n\t\t\tforeach ( self::$sections as $section ) {\n\t\t\t\t$wp_customize->add_section( sanitize_key( $section['id'] ), array(\n\t\t\t\t\t'title' => esc_textarea( $section['title'] ),\n\t\t\t\t\t'priority' => esc_attr( $section['priority'] ),\n\t\t\t\t\t'panel' => esc_attr( $section['panel'] ),\n\t\t\t\t\t'description' => esc_textarea( $section['description'] ),\n\t\t\t\t\t'active_callback' => $section['active_callback'],\n\t\t\t\t) );\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "1a9ca867b51843364388fe23c27ae562", "score": "0.687046", "text": "function mt_add_pages() {\r\n\t// Add a new menu under Options:\r\n\tadd_theme_page('Customize aq+', 'Customize aq+', 8, 'aq_customize', 'mt_theme_page');\r\n}", "title": "" }, { "docid": "8eb04c72a85d99871c9dd19111844e08", "score": "0.68601096", "text": "private function feature_info_section( $wp_customize ) {\n \t// new pannel for feature info section\n \t$wp_customize->add_section('best-it-feature-info-sections', array(\n 'title' => __('feature Section'),\n 'priority' => 2,\n 'description' => __('The feature info section is only displayed feature the company', 'best-it'),\n ));\n // setting for feature info setting\n \t$wp_customize->add_setting('best-it-feature-info-display', array(\n 'default' => 'No',\n 'sanitize_callback' => array( $this, 'sanitize_feature_display_custom_option' )\n ));\n // control for feature info control\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-info-control', array(\n 'label' => __('Display feature section?'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-info-display',\n 'type' => 'select',\n 'choices' => array('No' => 'No', 'Yes' => 'Yes')\n )));\n\n // setting for feature Title\n \t$wp_customize->add_setting('best-it-feature-title-display', array(\n 'default' => 'Welcome to Datasoft International LTD',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_title_option' )\n ));\n // control for feature Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-title-control', array(\n 'label' => __('Input feature Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-title-display',\n 'type' => 'text',\n ))); \n\n\n // setting for feature details\n \t$wp_customize->add_setting('best-it-feature-deatils-display', array(\n 'default' => 'feature deatils',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_deatils_option' )\n ));\n // control for feature details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-deatils-control', array(\n 'label' => __('Input feature deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-deatils-display',\n 'type' => 'textarea',\n )));\n\n // setting for feature main image\n $wp_customize->add_setting('feature_section_main_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature main image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_main_image_control', array(\n 'label' => __( 'Feature main image', 'theme-slug' ),\n 'settings' => 'feature_section_main_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n\n\n // setting for feature 01 Title\n $wp_customize->add_setting('best-it-feature-01-title-display', array(\n 'default' => 'Input Feature 01 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_01_title_option' )\n ));\n // control for feature 01 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-01-title-control', array(\n 'label' => __('Input feature 01 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-01-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 01 details\n $wp_customize->add_setting('best-it-feature-01-details-display', array(\n 'default' => 'Input Feature 01 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_01_details_option' )\n ));\n // control for feature 01 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-01-details-control', array(\n 'label' => __('Input feature 01 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-01-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 01 image\n $wp_customize->add_setting('feature_section_01_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 01 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_01_image_control', array(\n 'label' => __( 'Feature 01 image', 'theme-slug' ),\n 'settings' => 'feature_section_01_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n\n // setting for feature 02 Title\n $wp_customize->add_setting('best-it-feature-02-title-display', array(\n 'default' => 'Input Feature 02 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_02_title_option' )\n ));\n // control for feature 02 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-02-title-control', array(\n 'label' => __('Input feature 02 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-02-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 02 details\n $wp_customize->add_setting('best-it-feature-02-details-display', array(\n 'default' => 'Input Feature 02 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_02_details_option' )\n ));\n // control for feature 02 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-02-details-control', array(\n 'label' => __('Input feature 02 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-02-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 02 image\n $wp_customize->add_setting('feature_section_02_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 02 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_02_image_control', array(\n 'label' => __( 'Feature 02 image', 'theme-slug' ),\n 'settings' => 'feature_section_02_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n // setting for feature 03 Title\n $wp_customize->add_setting('best-it-feature-03-title-display', array(\n 'default' => 'Input Feature 03 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_03_title_option' )\n ));\n // control for feature 03 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-03-title-control', array(\n 'label' => __('Input feature 03 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-03-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 03 details\n $wp_customize->add_setting('best-it-feature-03-details-display', array(\n 'default' => 'Input Feature 03 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_03_details_option' )\n ));\n // control for feature 03 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-03-details-control', array(\n 'label' => __('Input feature 03 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-03-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 03 image\n $wp_customize->add_setting('feature_section_03_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 03 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_03_image_control', array(\n 'label' => __( 'Feature 03 image', 'theme-slug' ),\n 'settings' => 'feature_section_03_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n\n // setting for feature 04 Title\n $wp_customize->add_setting('best-it-feature-04-title-display', array(\n 'default' => 'Input Feature 04 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_04_title_option' )\n ));\n // control for feature 04 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-04-title-control', array(\n 'label' => __('Input feature 04 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-04-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 04 details\n $wp_customize->add_setting('best-it-feature-04-details-display', array(\n 'default' => 'Input Feature 04 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_04_details_option' )\n ));\n // control for feature 04 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-04-details-control', array(\n 'label' => __('Input feature 04 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-04-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 04 image\n $wp_customize->add_setting('feature_section_04_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 04 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_04_image_control', array(\n 'label' => __( 'Feature 04 image', 'theme-slug' ),\n 'settings' => 'feature_section_04_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n // setting for feature 05 Title\n $wp_customize->add_setting('best-it-feature-05-title-display', array(\n 'default' => 'Input Feature 05 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_05_title_option' )\n ));\n // control for feature 05 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-05-title-control', array(\n 'label' => __('Input feature 05 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-05-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 05 details\n $wp_customize->add_setting('best-it-feature-05-details-display', array(\n 'default' => 'Input Feature 05 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_05_details_option' )\n ));\n // control for feature 05 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-05-details-control', array(\n 'label' => __('Input feature 05 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-05-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 05 image\n $wp_customize->add_setting('feature_section_05_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 05 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_05_image_control', array(\n 'label' => __( 'Feature 05 image', 'theme-slug' ),\n 'settings' => 'feature_section_05_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n // setting for feature 06 Title\n $wp_customize->add_setting('best-it-feature-06-title-display', array(\n 'default' => 'Input Feature 06 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_06_title_option' )\n ));\n // control for feature 06 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-06-title-control', array(\n 'label' => __('Input feature 06 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-06-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 06 details\n $wp_customize->add_setting('best-it-feature-06-details-display', array(\n 'default' => 'Input Feature 06 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_06_details_option' )\n ));\n // control for feature 06 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-06-details-control', array(\n 'label' => __('Input feature 06 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-06-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 06 image\n $wp_customize->add_setting('feature_section_06_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 04 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_06_image_control', array(\n 'label' => __( 'Feature 06 image', 'theme-slug' ),\n 'settings' => 'feature_section_06_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n\n\n // setting for feature 07 Title\n $wp_customize->add_setting('best-it-feature-07-title-display', array(\n 'default' => 'Input Feature 07 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_07_title_option' )\n ));\n // control for feature 07 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-07-title-control', array(\n 'label' => __('Input feature 07 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-07-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 07 details\n $wp_customize->add_setting('best-it-feature-07-details-display', array(\n 'default' => 'Input Feature 07 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_07_details_option' )\n ));\n // control for feature 07 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-07-details-control', array(\n 'label' => __('Input feature 07 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-07-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 07 image\n $wp_customize->add_setting('feature_section_07_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 07 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_07_image_control', array(\n 'label' => __( 'Feature 07 image', 'theme-slug' ),\n 'settings' => 'feature_section_07_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n\n\n // setting for feature 08 Title\n $wp_customize->add_setting('best-it-feature-08-title-display', array(\n 'default' => 'Input Feature 08 Title:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_08_title_option' )\n ));\n // control for feature 08 Title\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-08-title-control', array(\n 'label' => __('Input feature 08 Title:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-08-title-display',\n 'type' => 'text',\n )));\n\n // setting for feature 08 details\n $wp_customize->add_setting('best-it-feature-08-details-display', array(\n 'default' => 'Input Feature 08 details:',\n 'sanitize_callback' => array( $this, 'sanitize_custom_feature_08_details_option' )\n ));\n // control for feature 08 details\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'best-it-feature-08-details-control', array(\n 'label' => __('Input feature 08 deatils:'),\n 'section' => 'best-it-feature-info-sections',\n 'settings' => 'best-it-feature-08-details-display',\n 'type' => 'text',\n )));\n\n\n // setting for feature 08 image\n $wp_customize->add_setting('feature_section_08_image', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n ));\n\n // setting for feature 08 image\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ' \n feature_section_08_image_control', array(\n 'label' => __( 'Feature 08 image', 'theme-slug' ),\n 'settings' => 'feature_section_08_image',\n 'section' => 'best-it-feature-info-sections',\n ))\n );\n }", "title": "" }, { "docid": "0130e110899b91cc6a01711dd9e3d423", "score": "0.6858527", "text": "function audioman_testimonial_options( $wp_customize ) {\n // Add note to Jetpack Testimonial Section\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_jetpack_testimonial_cpt_note',\n 'sanitize_callback' => 'sanitize_text_field',\n 'custom_control' => 'Audioman_Note_Control',\n 'label' => sprintf( esc_html__( 'For Testimonial Options for this Theme, go %1$shere%2$s', 'audioman' ),\n '<a href=\"javascript:wp.customize.section( \\'audioman_testimonials\\' ).focus();\">',\n '</a>'\n ),\n 'section' => 'jetpack_testimonials',\n 'type' => 'description',\n 'priority' => 1,\n )\n );\n\n $wp_customize->add_section( 'audioman_testimonials', array(\n 'panel' => 'audioman_theme_options',\n 'title' => esc_html__( 'Testimonials', 'audioman' ),\n )\n );\n\n $action = 'install-plugin';\n $slug = 'essential-content-types';\n\n $install_url = wp_nonce_url(\n add_query_arg(\n array(\n 'action' => $action,\n 'plugin' => $slug\n ),\n admin_url( 'update.php' )\n ),\n $action . '_' . $slug\n );\n\n // Add note to ECT Featured Content Section\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_testimonial_note_1',\n 'sanitize_callback' => 'sanitize_text_field',\n 'custom_control' => 'Audioman_Note_Control',\n 'active_callback' => 'audioman_is_ect_testimonial_inactive',\n /* translators: 1: <a>/link tag start, 2: </a>/link tag close. */\n 'label' => sprintf( esc_html__( 'For Testimonial, install %1$sEssential Content Types%2$s Plugin with Testimonial Content Type Enabled', 'audioman' ),\n '<a target=\"_blank\" href=\"' . esc_url( $install_url ) . '\">',\n '</a>'\n\n ),\n 'section' => 'audioman_testimonials',\n 'type' => 'description',\n 'priority' => 1,\n )\n );\n\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_testimonial_option',\n 'default' => 'disabled',\n 'sanitize_callback' => 'audioman_sanitize_select',\n 'active_callback' => 'audioman_is_ect_testimonial_active',\n 'choices' => audioman_section_visibility_options(),\n 'label' => esc_html__( 'Enable on', 'audioman' ),\n 'section' => 'audioman_testimonials',\n 'type' => 'select',\n 'priority' => 1,\n )\n );\n\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_testimonial_cpt_note',\n 'sanitize_callback' => 'sanitize_text_field',\n 'custom_control' => 'Audioman_Note_Control',\n 'active_callback' => 'audioman_is_testimonial_active',\n 'label' => sprintf( esc_html__( 'For CPT heading and sub-heading, go %1$shere%2$s', 'audioman' ),\n '<a href=\"javascript:wp.customize.section( \\'jetpack_testimonials\\' ).focus();\">',\n '</a>'\n ),\n 'section' => 'audioman_testimonials',\n 'type' => 'description',\n )\n );\n\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_testimonial_number',\n 'default' => '3',\n 'sanitize_callback' => 'audioman_sanitize_number_range',\n 'active_callback' => 'audioman_is_testimonial_active',\n 'label' => esc_html__( 'Number of items to show', 'audioman' ),\n 'section' => 'audioman_testimonials',\n 'type' => 'number',\n 'input_attrs' => array(\n 'style' => 'width: 100px;',\n 'min' => 0,\n ),\n )\n );\n\n $number = get_theme_mod( 'audioman_testimonial_number', 3 );\n\n for ( $i = 1; $i <= $number ; $i++ ) {\n //for CPT\n audioman_register_option( $wp_customize, array(\n 'name' => 'audioman_testimonial_cpt_' . $i,\n 'sanitize_callback' => 'audioman_sanitize_post',\n 'active_callback' => 'audioman_is_testimonial_active',\n 'label' => esc_html__( 'Testimonial', 'audioman' ) . ' ' . $i ,\n 'section' => 'audioman_testimonials',\n 'type' => 'select',\n 'choices' => audioman_generate_post_array( 'jetpack-testimonial' ),\n )\n );\n } // End for().\n}", "title": "" }, { "docid": "974b952f55667bbb7264ad7db412bcad", "score": "0.68469334", "text": "public function thelandscaper_customize_register( $wp_customize ) {\n\n\n\t\t// Add Custom Panel to Live Customizer for Theme Options\n\t\t$wp_customize->add_panel( 'qt_theme_panel', array(\n\t\t\t'title' \t=> esc_html__( 'Theme Options', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All the Theme Options', 'the-landscaper-wp' ),\n\t\t\t'priority' \t=> 10,\n\t\t) );\n\n\t\t// Add Custom Sections to the Theme Panel\n\t\t$wp_customize->add_section( 'qt_section_logo', array(\n\t\t\t'title' \t=> esc_html__( 'Logo', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All logo settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t=> 10,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_header', array(\n\t\t\t'title' \t \t=> esc_html__( 'Header', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All header settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t=> 15,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t $wp_customize->add_section( 'qt_section_navigation', array(\n\t\t\t'title' \t \t=> esc_html__( 'Navigation', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All navigation settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 20,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_slider', array(\n\t\t\t'title' \t \t=> esc_html__( 'Slider', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All default theme slider settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 25,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t $wp_customize->add_section( 'qt_section_main_title', array(\n\t\t\t'title' \t \t=> esc_html__( 'Page Header', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All page header settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 30,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t $wp_customize->add_section( 'qt_section_breadcrumbs', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Breadcrumbs', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All breadcrumbs settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 35,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_theme_colors', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Layout &amp; Colors', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'Theme layout and color settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 40,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_blog', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Blog', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'Blog settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 45,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t $wp_customize->add_section( 'qt_section_gallery', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Single Gallery', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'Gallery settings for the single gallery posts', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 50,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t if( thelandscaper_woocommerce_active() ) {\n\t $wp_customize->add_section( 'qt_section_shop', array(\n\t 'title'\t\t \t=> esc_html__( 'Shop', 'the-landscaper-wp' ),\n\t 'description' \t=> esc_html__( 'WooCommerce shop settings', 'the-landscaper-wp' ),\n\t 'priority' \t \t=> 55,\n\t 'panel' \t=> 'qt_theme_panel',\n\t ) );\n\t\t}\n\t $wp_customize->add_section( 'qt_section_footer', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Footer', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'All footer settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 60,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_typography', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Typography', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> sprintf( esc_html__( 'Simply change the default Google font to another with these settings. If you\\'re looking for more advanced font controls please install the %s plugin or use the child theme to enqueue custom fonts', 'the-landscaper-wp' ), '<a href=\"'. esc_url( '//wordpress.org/plugins/easy-google-fonts/' ) .'\" target=\"_blank\">Easy Google Fonts</a>' ),\n\t\t\t'priority' \t \t=> 65,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t\t$wp_customize->add_section( 'qt_section_other', array(\n\t\t\t'title'\t\t \t=> esc_html__( 'Other', 'the-landscaper-wp' ),\n\t\t\t'description'\t=> esc_html__( 'All other uncategorized settings', 'the-landscaper-wp' ),\n\t\t\t'priority' \t \t=> 70,\n\t\t\t'panel' \t=> 'qt_theme_panel',\n\t\t) );\n\t $wp_customize->add_section( 'qt_section_custom', array(\n 'title'\t\t \t=> esc_html__( 'Custom', 'the-landscaper-wp' ),\n 'description'\t=> esc_html__( 'It is recommended to type custom CSS in a text editor and then paste it into the field below', 'the-landscaper-wp' ),\n 'priority' \t \t=> 75,\n 'panel' \t=> 'qt_theme_panel',\n\t ) );\n\n\n\t\t// Section Settings: Logo\n\t\t$wp_customize->add_setting( 'qt_logo', array( \n\t\t\t'default' \t\t\t=> get_template_directory_uri().'/assets/images/logo.png',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( \n\t\t\t$wp_customize, 'qt_logo', array(\n\t 'label' \t \t=> esc_html__('Theme logo', 'the-landscaper-wp'),\n\t 'description' \t=> esc_html__( 'Recommended height is not higher than 90 pixels', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_logo',\n\t 'settings' \t \t=> 'qt_logo',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_logo_retina', array( \n\t\t\t'default' \t\t\t=> get_template_directory_uri().'/assets/images/logo_2x.png',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'qt_logo_retina', array(\n \t'label' \t \t=> esc_html__('Theme logo retina (2x)', 'the-landscaper-wp' ),\n\t 'description' \t=> esc_html__( 'Please upload as 2x regular logo size. Else leave empty', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_logo',\n\t 'settings' \t \t=> 'qt_logo_retina',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_logo_transparent', array( \n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( \n\t\t\t$wp_customize, 'qt_logo_transparent', array(\n\t 'label' \t \t=> esc_html__('Theme logo transparent', 'the-landscaper-wp'),\n\t 'description' \t=> esc_html__( 'Transparent logo used for sidebar and transparent header layout', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_logo',\n\t 'settings' \t \t=> 'qt_logo_transparent',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_logo_retina_transparent', array( \n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'qt_logo_retina_transparent', array(\n \t'label' \t \t=> esc_html__('Theme logo retina transparent (2x)', 'the-landscaper-wp' ),\n \t'description' \t=> esc_html__( 'Transparent retina (2x) logo used for the sidebar and transparent header layout', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_logo',\n\t 'settings' \t \t=> 'qt_logo_retina_transparent',\n\t\t\t\t'priority' \t=> 20,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_logo_margin_top', array(\n\t \t'default' \t\t\t=> '0',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_logo_margin_top', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Top Margin Logo', 'the-landscaper-wp'),\n\t\t 'description' \t\t=> esc_html__( 'Don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_logo',\n\t\t 'settings' \t\t\t=> 'qt_logo_margin_top',\n\t\t 'priority' \t\t\t=> 25,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 5,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_logo_width', array(\n\t \t'transport' \t\t\t=> 'refresh',\n\t \t'sanitize_callback' \t=> 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_logo_width', array(\n\t\t 'label' \t\t\t\t=> esc_html__( 'Logo width', 'the-landscaper-wp'),\n\t\t 'description' \t\t\t=> esc_html__( 'Upload logo in correct size is preferred. Define margin in pixels (don\\'t inlcude px) ', 'the-landscaper-wp' ),\n\t \t'type' \t\t\t\t\t=> 'number',\n\t\t 'section' \t\t\t\t=> 'qt_section_logo',\n\t\t 'settings' \t\t\t\t=> 'qt_logo_width',\n\t\t 'priority' \t\t\t\t=> 30,\n\t\t 'input_attrs'\t\t\t=> array(\n\t\t\t\t'min' \t\t\t\t\t=> 0,\n\t\t\t\t'max' \t\t\t\t\t=> 500,\n\t\t\t\t'step' \t\t\t\t\t=> 10,\n\t\t\t),\n\t\t) );\n\n\t\t// Header\n\t\t$wp_customize->add_setting( 'qt_topbar', array(\n\t \t'default' \t\t\t\t=> 'show',\n\t \t'transport'\t\t\t\t=> 'refresh',\n\t \t'type'\t\t\t\t\t=> 'theme_mod',\n\t \t'capability'\t\t\t=> 'edit_theme_options',\n\t \t'sanitize_callback' \t=> 'thelandscaper_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_topbar', array(\n\t\t\t'label' \t\t\t\t=> esc_html__( 'Display topbar', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t\t=> 'qt_section_header',\n\t\t\t'settings' \t\t\t\t=> 'qt_topbar',\n\t\t\t'type' \t\t\t\t=> 'select',\n\t\t\t'choices' \t\t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp' ),\n\t\t\t\t'hide' \t\t\t\t=> esc_html__( 'Hide', 'the-landscaper-wp' ),\n\t\t\t\t'hide_mobile' \t\t=> esc_html__( 'Hide on Mobile', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t\t=> 1,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_nav_layout', array(\n\t \t'default' \t\t\t=> 'default',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_nav_layout', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Header layout', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> thelandscaper_max_mega_menu_active(),\n\t\t\t'section' \t\t\t=> 'qt_section_header',\n\t\t\t'settings' \t\t\t=> 'qt_nav_layout',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'default' \t\t=> esc_html__( 'Default', 'the-landscaper-wp' ),\n\t\t\t\t'wide' \t\t\t=> esc_html__( 'Wide', 'the-landscaper-wp'),\n\t\t\t\t'transparent' \t=> esc_html__( 'Transparent', 'the-landscaper-wp'),\n\t\t\t\t'sidebar' \t\t=> esc_html__( 'Sidebar', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 50,\n\t\t) );\n\n\t\t/* Settings for the default & wide header */\n\t\trequire get_template_directory() . '/inc/customizer-settings/header-default-settings.php';\n\n\t\t/* Settings for the transparent header */\n\t\trequire get_template_directory() . '/inc/customizer-settings/header-transparent-settings.php';\n\n\t\t/* Settings for the sidebar header */\n\t\trequire get_template_directory() . '/inc/customizer-settings/header-sidebar-settings.php';\n\n\n\t\t// Section Settings: Navigation\n\t\t$wp_customize->add_setting( 'qt_nav_mobile_bg', array(\n\t\t\t'default' \t\t\t=> '#a2c046',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_nav_mobile_bg', array(\n\t\t\t\t'label' => esc_html__( 'Mobile navigation background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_navigation',\n\t\t\t\t'settings' \t=> 'qt_nav_mobile_bg',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_nav_mobile_textcolor', array(\n\t\t 'default' \t\t=> '#ffffff',\n\t\t 'transport'\t\t\t=> 'refresh',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_nav_mobile_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Mobile navigation link color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_navigation',\n\t\t\t\t'settings' \t=> 'qt_nav_mobile_textcolor',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_nav_mobile_submenu_bg', array(\n\t\t 'default' \t\t=> '#9ab643',\n\t\t 'transport'\t\t\t=> 'refresh',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_nav_mobile_submenu_bg', array(\n\t\t\t\t'label' \t=> esc_html__( 'Mobile submenu background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_navigation',\n\t\t\t\t'settings' \t=> 'qt_nav_mobile_submenu_bg',\n\t\t\t\t'priority' \t=> 20,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_nav_mobile_submenu_textcolor', array(\n\t\t 'default' \t\t=> '#ffffff',\n\t\t 'transport'\t\t\t=> 'refresh',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_nav_mobile_submenu_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Mobile submenu link color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_navigation',\n\t\t\t\t'settings' \t=> 'qt_nav_mobile_submenu_textcolor',\n\t\t\t\t'priority' \t=> 25,\n\t\t\t)\n\t\t) );\n\n\n\t\t// Section Settings: Slider\n\t\t$wp_customize->add_setting( 'qt_slider_small_heading_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_small_heading_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Small heading color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_small_heading_color',\n\t\t\t'priority' \t\t\t=> 10,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_heading_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_heading_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Heading color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_heading_color',\n\t\t\t'priority' \t\t\t=> 15,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_content_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_content_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Content color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_content_color',\n\t\t\t'priority' \t\t\t=> 20,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_primary_button_background_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_primary_button_background_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Primary button background color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_primary_button_background_color',\n\t\t\t'priority' \t\t\t=> 25,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_primary_button_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_primary_button_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Primary button text color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_primary_button_color',\n\t\t\t'priority' \t\t\t=> 30,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_control_background_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_control_background_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Control background color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_control_background_color',\n\t\t\t'priority' \t\t\t=> 35,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_control_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_control_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Control arrow color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_control_color',\n\t\t\t'priority' \t\t\t=> 40,\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'qt_slider_mobile_background_color', array(\n\t\t 'transport'\t\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' \t=> 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'qt_slider_mobile_background_color', array(\n\t\t\t'label' \t\t\t=> esc_html__( '(Mobile) Slider background color', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_slider',\n\t\t\t'settings' \t\t\t=> 'qt_slider_mobile_background_color',\n\t\t\t'priority' \t\t\t=> 45,\n\t\t) ) );\n\n\n\t\t// Section Settings: Main Title Area\n\t\t$wp_customize->add_setting( 'qt_maintitle_color', array(\n\t \t'default' \t\t=> '#333333',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t \t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_maintitle_color', array(\n\t\t\t\t'label' \t=> esc_html__( 'Page title color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_main_title',\n\t\t\t\t'settings' \t=> 'qt_maintitle_color',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_subtitle_color', array(\n\t \t'default' \t\t=> '#999999',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t \t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_subtitle_color', array(\n\t\t\t\t'label' \t=> esc_html__( 'Subtitle color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_main_title',\n\t\t\t\t'settings' \t=> 'qt_subtitle_color',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_maintitle_bgcolor', array(\n\t \t'default' \t\t=> '#f2f2f2',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t \t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_maintitle_bgcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_main_title',\n\t\t\t\t'settings' \t=> 'qt_maintitle_bgcolor',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_maintitle_layout', array(\n \t'default' \t\t\t=> 'small',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_maintitle_layout', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Page header', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_main_title',\n\t\t\t'settings' \t\t\t=> 'qt_maintitle_layout',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'small' \t\t=> esc_html__( 'Small', 'the-landscaper-wp'),\n\t\t\t\t'large' \t\t=> esc_html__( 'Large', 'the-landscaper-wp'),\n\t\t\t\t'hide' \t\t\t=> esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_maintitle_align', array(\n \t'default' \t\t\t=> 'left',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_maintitle_align', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Title alignment', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_main_title',\n\t\t\t'settings' \t\t\t=> 'qt_maintitle_align',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'left' \t\t=> esc_html__( 'Left', 'the-landscaper-wp'),\n\t\t\t\t'center' \t\t=> esc_html__( 'Center', 'the-landscaper-wp'),\n\t\t\t\t'right' \t => esc_html__( 'Right', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 25,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_maintitle_bgimage', array(\n\t\t\t'default' \t \t\t=> get_template_directory_uri().'/assets/images/leafs.png',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( \n\t\t\t$wp_customize, 'qt_maintitle_bgimage', array(\n\t 'label' \t \t=> esc_html__( 'Background pattern', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_main_title',\n\t 'settings' \t \t=> 'qt_maintitle_bgimage',\n\t\t\t\t'priority' \t=> 30,\n\t\t\t)\n\t\t) );\n\n\n\t\t// Section Settings: Breadcrumbs\n\t\t$wp_customize->add_setting( 'qt_breadcrumbs_textcolor', array(\n\t\t 'default' \t\t=> '#999999',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_breadcrumbs_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Breadcrumbs text color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_breadcrumbs',\n\t\t\t\t'settings' \t=> 'qt_breadcrumbs_textcolor',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_breadcrumbs_activecolor', array(\n\t\t 'default' \t\t=> '#a2c046',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_breadcrumbs_activecolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Breadcrumbs active color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_breadcrumbs',\n\t\t\t\t'settings' \t=> 'qt_breadcrumbs_activecolor',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_breadcrumbs_bg_color', array(\n\t\t\t'default' \t\t\t=> '#ffffff',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_breadcrumbs_bg_color', array(\n\t\t\t\t'label' \t=> esc_html__( 'Breadcrumbs background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_breadcrumbs',\n\t\t\t\t'settings' \t=> 'qt_breadcrumbs_bg_color',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_breadcrumbs_align', array(\n \t'default' \t\t\t=> 'left',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_breadcrumbs_align', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Breadcrumbs alignment', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_breadcrumbs',\n\t\t\t'settings' \t\t\t=> 'qt_breadcrumbs_align',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'left' \t\t=> esc_html__( 'Left', 'the-landscaper-wp' ),\n\t\t\t\t'center' \t\t=> esc_html__( 'Center', 'the-landscaper-wp' ),\n\t\t\t\t'right' \t => esc_html__( 'Right', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 20,\n\t\t) );\n\t\t$wp_customize->add_setting( 'qt_breadcrumbs', array(\n \t'default' \t\t\t=> 'show',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_breadcrumbs', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display breadcrumbs', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_breadcrumbs',\n\t\t\t'settings' \t\t\t=> 'qt_breadcrumbs',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t\t=> esc_html__( 'Show', 'the-landscaper-wp' ),\n\t\t\t\t'hide' \t\t\t=> esc_html__( 'Hide', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 25,\n\t\t) );\n\n\n\t\t// Section Settings: Theme Layout & Colors\n\t\t$wp_customize->add_setting( 'qt_boxed_bg', array(\n\t\t\t'default' \t\t\t=> '#ffffff',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_boxed_bg', array(\n\t\t\t\t'label' \t=> esc_html__( 'Background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings'\t \t=> 'qt_boxed_bg',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_textcolor', array(\n\t\t 'default' \t\t=> '#a5a5a5',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Text color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_textcolor',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_primary_color', array(\n\t \t'default' \t\t=> '#a2c046',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_primary_color', array(\n\t\t\t\t'label' \t=> esc_html__( 'Primary color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_primary_color',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_primary_btncolor', array(\n\t \t'default' \t\t=> '#a2c046',\n\t \t'transport'\t\t\t=> 'refresh',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_primary_btncolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Button background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_primary_btncolor',\n\t\t\t\t'priority' \t=> 20,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_primary_btntext', array(\n\t \t'default' \t\t=> '#ffffff',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_primary_btntext', array(\n\t\t\t\t'label' \t=> esc_html__( 'Button text color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_primary_btntext',\n\t\t\t\t'priority' \t=> 25,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_widgettitle', array(\n\t \t'default' \t\t=> '#9fc612',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_widgettitle', array(\n\t\t\t\t'label' \t=> esc_html__( 'Widget title color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_widgettitle',\n\t\t\t\t'priority' \t=> 30,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_widgettitle_span', array(\n\t \t'default' \t\t=> '#464646',\n\t \t'transport'\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_theme_widgettitle_span', array(\n\t\t\t\t'label' \t=> esc_html__( 'First word in widget title', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_theme_colors',\n\t\t\t\t'settings' \t=> 'qt_theme_widgettitle_span',\n\t\t\t\t'priority' \t=> 35,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_layout', array(\n \t'default' \t\t\t=> 'wide',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_theme_layout', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Theme layout', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_theme_colors',\n\t\t\t'settings' \t\t\t=> 'qt_theme_layout',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'wide' \t\t=> esc_html__( 'Wide', 'the-landscaper-wp' ),\n\t\t\t\t'boxed' \t\t=> esc_html__( 'Boxed', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 40,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_widgettitle_border', array(\n \t'default' \t\t\t=> 'dashed',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_theme_widgettitle_border', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Theme border style', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_theme_colors',\n\t\t\t'settings' \t\t\t=> 'qt_theme_widgettitle_border',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'solid' \t\t=> esc_html__( 'Solid', 'the-landscaper-wp' ),\n\t\t\t\t'dashed' \t \t=> esc_html__( 'Dashed', 'the-landscaper-wp' ),\n\t\t\t\t'dotted'\t\t=> esc_html__( 'Dotted', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 45,\n\t\t) );\n\n\n\t\t// Section Settings: Blog\n\t\t$wp_customize->add_setting( 'qt_blog_metadata', array(\n \t'default' \t\t\t=> 'show',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_blog_metadata', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display the post metadata', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'The date of the QT Latest News Block widget can be turned on/off in the widget settings', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_blog',\n\t\t\t'settings' \t\t\t=> 'qt_blog_metadata',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp'),\n\t\t\t\t'hide' \t\t=> esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 5,\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting( 'qt_blog_bigdate', array(\n \t'default' \t\t\t=> 'show',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_blog_bigdate', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display large date', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'For blog posts in the list layout', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_blog',\n\t\t\t'settings' \t\t\t=> 'qt_blog_bigdate',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp'),\n\t\t\t\t'hide' \t\t=> esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 10,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_commments', array(\n \t'default' \t\t\t=> 'show',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_blog_commments', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display comment section', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'Show or hide the comment section for all blog posts', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_blog',\n\t\t\t'settings' \t\t\t=> 'qt_blog_commments',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp'),\n\t\t\t\t'hide' \t\t=> esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 15,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_read_more', array(\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_read_more', array(\n\t \t'label' \t\t\t=> esc_html__( 'Read more text', 'the-landscaper-wp' ),\n\t \t'description' \t\t=> esc_html__( 'Display if read more tag is used in post. Empty field will display default text', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_blog',\n\t \t'settings' \t\t\t=> 'qt_blog_read_more',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_custom_excerpt_length', array(\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_custom_excerpt_length', array(\n\t \t'label' \t\t\t=> esc_html__( 'Custom excerpt length', 'the-landscaper-wp' ),\n\t \t'description' \t\t=> esc_html__( 'Set a custom length for all blog excerpt text. This will overrule the default read more tag', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_blog',\n\t \t'settings' \t\t\t=> 'qt_blog_custom_excerpt_length',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 25,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_share', array(\n \t'default' \t\t\t=> 'blog',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_blog_share', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display the share buttons', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'Add social share buttons at the bottom of the post/page', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_blog',\n\t\t\t'settings' \t\t\t=> 'qt_blog_share',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'On All', 'the-landscaper-wp'),\n\t\t\t\t'blog' \t\t\t=> esc_html__( 'On Blog Posts', 'the-landscaper-wp'),\n\t\t\t\t'pages' \t\t=> esc_html__( 'On Pages', 'the-landscaper-wp'),\n\t\t\t\t'galleries' \t=> esc_html__( 'On Galleries', 'the-landscaper-wp'),\n\t\t\t\t'hide' \t\t=> esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 30,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_tooltip', array(\n\t\t\t'default'\t\t\t=> 'Share',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_tooltip', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Share tooltip text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_blog',\n\t\t 'settings' \t\t\t=> 'qt_blog_tooltip',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'active_callback' => array( $this, 'thelandscaper_hide_social_input_fields' ),\n\t\t 'priority' \t\t\t=> 35,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_twitter', array(\n\t\t\t'default'\t\t\t=> 'Twitter',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_twitter', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Twitter button text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_blog',\n\t\t 'settings' \t\t\t=> 'qt_blog_twitter',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'active_callback' => array( $this, 'thelandscaper_hide_social_input_fields' ),\n\t\t 'priority' \t\t\t=> 40,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_facebook', array(\n\t\t\t'default'\t\t\t=> 'Facebook',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_facebook', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Facebook button text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_blog',\n\t\t 'settings' \t\t\t=> 'qt_blog_facebook',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'active_callback' => array( $this, 'thelandscaper_hide_social_input_fields' ),\n\t\t 'priority' \t\t\t=> 45,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_googleplus', array(\n\t\t\t'default'\t\t\t=> 'Google+',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_googleplus', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Google+ button text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_blog',\n\t\t 'settings' \t\t\t=> 'qt_blog_googleplus',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'active_callback' => array( $this, 'thelandscaper_hide_social_input_fields' ),\n\t\t 'priority' \t\t\t=> 50,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_blog_linkedin', array(\n\t\t\t'default'\t\t\t=> 'LinkedIn',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_blog_linkedin', array(\n\t\t 'label' \t\t\t=> esc_html__( 'LinkedIn button text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_blog',\n\t\t 'settings' \t\t\t=> 'qt_blog_linkedin',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'active_callback' => array( $this, 'thelandscaper_hide_social_input_fields' ),\n\t\t 'priority' \t\t\t=> 55,\n\t\t) );\n\n\n\t\t// Section Settings: Gallery\n\t\t$wp_customize->add_setting( 'qt_gallery_title', array(\n \t'default' \t\t\t=> 'actual_title',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_gallery_title', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Position of the page title', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_gallery',\n\t\t\t'settings' \t\t\t=> 'qt_gallery_title',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'actual_title' \t=> esc_html__( 'Show Actual Item Title', 'the-landscaper-wp' ),\n\t\t\t\t'custom_title' => esc_html__( 'Show Custom Title', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 1,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_maintitle', array(\n\t \t'default' \t\t\t=> 'Gallery',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_maintitle', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Gallery page title', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Display if above option isset to custom title', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_maintitle',\n\t\t 'priority' \t\t\t=> 5,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_subtitle', array(\n\t \t'default' \t\t\t=> 'A selection of our best work',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_subtitle', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Gallery subtitle', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Display if subtitle field on specific post is empty', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_subtitle',\n\t\t 'priority' \t\t\t=> 10,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_nav', array(\n \t'default' \t\t\t=> 'show',\n \t'transport'\t\t\t=> 'refresh',\n \t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t ) );\n\t\t$wp_customize->add_control( 'qt_gallery_nav', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Display gallery navigation', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_gallery',\n\t\t\t'settings' \t\t\t=> 'qt_gallery_nav',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'show' \t=> esc_html__( 'Show', 'the-landscaper-wp'),\n\t\t\t\t'hide' => esc_html__( 'Hide', 'the-landscaper-wp'),\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 15,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_prevtext', array(\n\t \t'default' \t\t\t=> 'Previous',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_prevtext', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Previous button text', 'the-landscaper-wp'),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_prevtext',\n\t\t 'active_callback'\t=> array( $this, 'thelandscaper_show_setting_gallery_nav' ),\n\t\t 'priority' \t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_nexttext', array(\n\t \t'default' \t\t\t=> 'Next',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_nexttext', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Next button text', 'the-landscaper-wp'),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_nexttext',\n\t\t 'active_callback'\t=> array( $this, 'thelandscaper_show_setting_gallery_nav' ),\n\t\t 'priority' \t\t\t=> 25,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_summarylink', array(\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_summarylink', array(\n\t\t 'label'\t\t\t\t=> esc_html__( 'Gallery summary link', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_summarylink',\n\t\t 'active_callback'\t=> array( $this, 'thelandscaper_show_setting_gallery_nav' ),\n\t\t 'priority' \t\t\t=> 30,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_summarytext', array(\n\t\t\t'default'\t\t\t=> 'View Summary',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_summarytext', array(\n\t\t\t'label'\t\t\t\t=> esc_html__( 'Gallery summary text', 'the-landscaper-wp' ),\n\t\t\t'section'\t\t\t=> 'qt_section_gallery',\n\t\t\t'settings'\t\t\t=> 'qt_gallery_summarytext',\n\t\t\t'active_callback'\t=> array( $this, 'thelandscaper_show_setting_gallery_nav' ),\n\t\t\t'priority'\t\t\t=> 35,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_slug', array(\n\t \t'default' \t\t\t=> 'gallery',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_gallery_slug',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_slug', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Gallery URL slug', 'the-landscaper-wp' ),\n\t\t 'description'\t\t=> esc_html__( 'After changing this setting please go to Settings > Permalinks and save the page', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_slug',\n\t\t 'priority' \t\t\t=> 40,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_cat_slug', array(\n\t \t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_gallery_slug',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_cat_slug', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Gallery category URL slug', 'the-landscaper-wp' ),\n\t\t 'description'\t\t=> esc_html__( 'After changing this setting please go to Settings > Permalinks and save the page', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_cat_slug',\n\t\t 'priority' \t\t\t=> 45,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_gallery_cat_title', array(\n\t \t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_gallery_cat_title', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Gallery category title', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Prefix for the gallery category page title', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_gallery',\n\t\t 'settings' \t\t\t=> 'qt_gallery_cat_title',\n\t\t 'priority' \t\t\t=> 50,\n\t\t) );\n\n\n\t\t// Section Settings: Shop\n\t\tif( thelandscaper_woocommerce_active() ) {\n\t\t\t$wp_customize->add_setting( 'qt_shop_products_per_page', array(\n\t\t \t'default' \t\t\t=> '8',\n\t\t \t'transport'\t\t\t=> 'refresh',\n\t\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t\t) );\n\t\t\t$wp_customize->add_control( 'qt_shop_products_per_page', array(\n\t\t\t 'label' \t\t\t=> esc_html__( 'Products per page', 'the-landscaper-wp'),\n\t\t\t 'section' \t\t\t=> 'qt_section_shop',\n\t\t\t 'settings' \t\t\t=> 'qt_shop_products_per_page',\n\t\t\t 'priority' \t\t\t=> 5,\n\t\t\t) );\n\n\t\t\t$wp_customize->add_setting( 'qt_single_product_sidebar', array(\n\t\t\t\t'default'\t\t\t=> 'Right',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t ) );\n\t\t\t$wp_customize->add_control( 'qt_single_product_sidebar', array(\n\t\t\t\t'label' \t\t\t=> esc_html__( 'Single product page sidebar', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t\t\t=> 'qt_section_shop',\n\t\t\t\t'settings' \t\t\t=> 'qt_single_product_sidebar',\n\t\t\t\t'type' \t\t\t=> 'select',\n\t\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t\t'Hide' \t\t=> esc_html__( 'No sidebar', 'the-landscaper-wp'),\n\t\t\t\t\t'Left' \t\t=> esc_html__( 'Left', 'the-landscaper-wp'),\n\t\t\t\t\t'Right' \t\t=> esc_html__( 'Right', 'the-landscaper-wp'),\n\t\t\t\t),\n\t\t\t\t'priority' \t\t\t=> 10,\n\t\t\t) );\n\t\t}\n\n\n\t\t// Section Settings: Footer\n\t\t$wp_customize->add_setting( 'qt_footer_columns', array( \n\t\t\t'default' \t\t\t=> 4,\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'thelandscaper_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_footer_columns', array(\n\t\t\t'type' \t\t=> 'select',\n\t\t\t'priority' \t\t=> 0,\n\t\t\t'label' \t\t=> esc_html__( 'Footer columns', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'Select how many columns you want to display in the main footer. Select 0 to hide the top footer.', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t=> 'qt_section_footer',\n\t\t\t'settings' \t\t=> 'qt_footer_columns',\n\t\t\t'choices' \t\t=> range( 0, 4 ),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footer_textcolor', array(\n\t \t'default' \t\t=> '#757575',\n\t \t'transport'\t \t\t=> 'postMessage',\n\t \t'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footer_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Text color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footer_textcolor',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footer_widgettitle', array(\n\t\t 'default' \t\t=> '#ffffff',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footer_widgettitle', array(\n\t\t\t\t'label' \t=> esc_html__( 'Widget title color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footer_widgettitle',\n\t\t\t\t'priority' \t=> 10,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footer_bgcolor', array(\n\t\t\t'default'\t\t\t=> '#333333',\n\t\t 'transport'\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footer_bgcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Footer background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footer_bgcolor',\n\t\t\t\t'priority' \t=> 15,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footer_bgimage', array(\n\t\t\t'default' \t \t\t=> get_template_directory_uri().'/assets/images/leafs_dark.png',\n\t\t\t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'esc_url_raw',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( \n\t\t\t$wp_customize, 'qt_footer_bgimage', array(\n\t 'label' \t \t=> esc_html__( 'Background pattern', 'the-landscaper-wp' ), \n\t 'section' \t \t=> 'qt_section_footer',\n\t 'settings' \t\t=> 'qt_footer_bgimage',\n\t\t\t\t'priority' \t=> 20,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_bgcolor', array(\n\t\t\t'default'\t\t\t=> '#292929',\n\t\t 'transport'\t\t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footerbottom_bgcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Bottom footer background color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footerbottom_bgcolor',\n\t\t\t\t'priority' \t=> 25,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_textcolor', array(\n\t\t 'default' \t\t=> '#656565',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footerbottom_textcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Bottom footer text color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footerbottom_textcolor',\n\t\t\t\t'priority' \t=> 30,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_linkcolor', array(\n\t\t 'default' \t\t=> '#e4e4e4',\n\t\t 'transport'\t \t\t=> 'postMessage',\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( \n\t\t\t$wp_customize, 'qt_footerbottom_linkcolor', array(\n\t\t\t\t'label' \t=> esc_html__( 'Bottom footer link color', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t=> 'qt_section_footer',\n\t\t\t\t'settings' \t=> 'qt_footerbottom_linkcolor',\n\t\t\t\t'priority' \t=> 33,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_textleft', array(\n\t \t'default' \t\t\t=> 'Copyright 2017 The Landscaper by Qreativethemes',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_footerbottom_textleft', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Bottom footer left text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_footer',\n\t\t 'settings' \t\t\t=> 'qt_footerbottom_textleft',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'priority' \t\t\t=> 35,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_textmiddle', array(\n\t\t\t'default'\t\t\t=> 'Middle Text',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_footerbottom_textmiddle', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Bottom footer middle text', 'the-landscaper-wp' ),\n\t\t 'section' \t\t\t=> 'qt_section_footer',\n\t\t 'settings' \t\t\t=> 'qt_footerbottom_textmiddle',\n\t\t 'type' \t\t\t\t=> 'text',\n\t\t 'priority' \t\t\t=> 40,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_footerbottom_textright', array(\n\t \t'default' \t\t\t=> 'For emergency tree removal 123-777-456',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_footerbottom_textright', array(\n\t \t'label' \t\t\t=> esc_html__( 'Bottom footer right text', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_footer',\n\t \t'settings' \t\t\t=> 'qt_footerbottom_textright',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 45,\n\t\t) );\n\n\n\t\t// List the default Google fonts\n\t\trequire get_template_directory() . '/inc/customizer-settings/google-font-settings.php';\n\n\t\t// Section Settings: Typography\n\t\t$wp_customize->add_setting( 'qt_theme_primary_font', array(\n\t\t\t'default' \t\t\t=> 'Roboto',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'esc_attr',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_primary_font', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Primary font', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'Font used for body text and navigation', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_typography',\n\t\t\t'settings' \t\t\t=> 'qt_theme_primary_font',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> thelandscaper_list_google_fonts(),\n\t\t\t'priority' \t\t\t=> 5,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_primary_font_size', array(\n\t\t\t'default' \t\t\t=> '14',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_primary_font_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Primary font size', 'the-landscaper-wp'),\n\t\t 'description' \t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_primary_font_size',\n\t\t 'priority' \t\t\t=> 10,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_secondary_font', array(\n\t\t\t'default' \t\t\t=> 'Roboto Slab',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'esc_attr',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_secondary_font', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Secondary font', 'the-landscaper-wp' ),\n\t\t\t'description' \t=> esc_html__( 'Font used for the headings and titles', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_typography',\n\t\t\t'settings' \t\t\t=> 'qt_theme_secondary_font',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> thelandscaper_list_google_fonts(),\n\t\t\t'priority' \t\t\t=> 15,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_custom_heading_sizes', array(\n\t\t\t'default' \t\t\t=> 'no',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'esc_attr',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_custom_heading_sizes', array(\n\t\t\t'label' \t\t\t=> esc_html__( 'Change heading sizes?', 'the-landscaper-wp' ),\n\t\t\t'description' \t\t=> esc_html__( 'Set custom sizes for headings', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t=> 'qt_section_typography',\n\t\t\t'settings' \t\t\t=> 'qt_theme_custom_heading_sizes',\n\t\t\t'type' \t\t\t=> 'select',\n\t\t\t'choices' \t\t\t=> array(\n\t\t\t\t'yes' \t\t\t\t=> 'Yes',\n\t\t\t\t'no' \t\t\t\t=> 'No',\n\t\t\t),\n\t\t\t'priority' \t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_widget_title_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_widget_title_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Widget title size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_widget_title_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 25,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_one_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_one_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 1 (H1) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_one_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 25,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_two_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_two_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 2 (H2) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_two_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 30,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_three_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_three_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 3 (H3) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_three_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 35,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_four_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_four_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 4 (H4) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_four_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 40,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_five_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_five_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 5 (H5) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_five_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 45,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_theme_heading_six_size', array(\n\t\t\t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'absint',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_theme_heading_six_size', array(\n\t\t 'label' \t\t\t=> esc_html__( 'Header 6 (H6) size', 'the-landscaper-wp' ),\n\t\t 'description' \t\t=> esc_html__( 'Please don\\'t include px in your string', 'the-landscaper-wp' ),\n\t \t'type'\t\t => 'number',\n\t\t 'section' \t\t\t=> 'qt_section_typography',\n\t\t 'settings' \t\t\t=> 'qt_theme_heading_six_size',\n\t\t 'active_callback' => array( $this, 'thelandscaper_show_custom_heading_sizes' ),\n\t\t 'priority' \t\t\t=> 50,\n\t\t 'input_attrs' \t\t=> array(\n\t\t\t\t'min' \t\t=> 0,\n\t\t\t\t'max' \t\t=> 100,\n\t\t\t\t'step' \t\t=> 2,\n\t\t\t),\n\t\t) );\n\n\n\t\t// Section Settings: Others\n\t\t$wp_customize->add_setting( 'qt_404_page_image', array( \n\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( \n\t\t\t$wp_customize, 'qt_404_page_image', array(\n\t 'label' \t \t=> esc_html__( '404 page image', 'the-landscaper-wp'),\n\t 'description' \t=> esc_html__( 'To reach the 404 page navigate to a page that don\\'t exisint via the browser domain bar', 'the-landscaper-wp' ),\n\t 'section' \t \t=> 'qt_section_other',\n\t 'settings' \t \t=> 'qt_404_page_image',\n\t\t\t\t'priority' \t=> 5,\n\t\t\t)\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_404_page_text_title', array(\n\t \t'default' \t\t\t=> 'Oops! That page can\\'t be found',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_404_page_text_title', array(\n\t \t'label' \t\t\t=> esc_html__( '404 page text heading', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_other',\n\t \t'settings' \t\t\t=> 'qt_404_page_text_title',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 10,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_404_page_text', array(\n\t \t'default' \t\t\t=> 'Nothing was found here, try a search below',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_404_page_text', array(\n\t \t'label' \t\t\t=> esc_html__( '404 page text', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_other',\n\t \t'settings' \t\t\t=> 'qt_404_page_text',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 15,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_404_page_search', array(\n\t \t'default' \t\t\t\t=> 'show',\n\t \t'transport'\t\t\t\t=> 'refresh',\n\t \t'sanitize_callback' \t=> 'thelandscaper_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_404_page_search', array(\n\t\t\t'label' \t\t\t\t=> esc_html__( '404 page search bar', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t\t=> 'qt_section_other',\n\t\t\t'settings' \t\t\t\t=> 'qt_404_page_search',\n\t\t\t'type' \t\t\t\t=> 'select',\n\t\t\t'choices' \t\t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp' ),\n\t\t\t\t'hide' \t\t\t\t=> esc_html__( 'Hide', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_scroll_to_top_button', array(\n\t \t'default' \t\t\t\t=> 'show',\n\t \t'transport'\t\t\t\t=> 'refresh',\n\t \t'sanitize_callback' \t=> 'thelandscaper_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_scroll_to_top_button', array(\n\t\t\t'label' \t\t\t\t=> esc_html__( 'Scroll to top button', 'the-landscaper-wp' ),\n\t\t\t'section' \t\t\t\t=> 'qt_section_other',\n\t\t\t'settings' \t\t\t\t=> 'qt_scroll_to_top_button',\n\t\t\t'type' \t\t\t\t=> 'select',\n\t\t\t'choices' \t\t\t\t=> array(\n\t\t\t\t'show' \t\t\t=> esc_html__( 'Show', 'the-landscaper-wp' ),\n\t\t\t\t'hide' \t\t\t\t=> esc_html__( 'Hide', 'the-landscaper-wp' ),\n\t\t\t),\n\t\t\t'priority' \t\t\t\t=> 25,\n\t\t) );\n\n\t\tif(class_exists('Essential_Grid')) {\n\t\t\t$wp_customize->add_setting( 'qt_default_esg_style', array(\n\t\t \t'default' \t\t\t\t=> 'enable',\n\t\t \t'transport'\t\t\t\t=> 'refresh',\n\t\t \t'sanitize_callback' \t=> 'thelandscaper_sanitize_select',\n\t\t\t) );\n\t\t\t$wp_customize->add_control( 'qt_default_esg_style', array(\n\t\t\t\t'label' \t\t\t\t=> esc_html__( 'Essential Grid customizer colors', 'the-landscaper-wp' ),\n\t\t\t\t'description' \t\t\t=> esc_html__( 'Use the primary color option as base for the \\'The Landscaper\\' skins', 'the-landscaper-wp' ),\n\t\t\t\t'section' \t\t\t\t=> 'qt_section_other',\n\t\t\t\t'settings' \t\t\t\t=> 'qt_default_esg_style',\n\t\t\t\t'type' \t\t\t\t=> 'select',\n\t\t\t\t'choices' \t\t\t\t=> array(\n\t\t\t\t\t'enable' \t\t\t=> esc_html__( 'Enable', 'the-landscaper-wp' ),\n\t\t\t\t\t'disable' \t\t\t=> esc_html__( 'Disable', 'the-landscaper-wp' ),\n\t\t\t\t),\n\t\t\t\t'priority' \t\t\t\t=> 30,\n\t\t\t) );\n\t\t}\n\n\n\t\t// Section Settings: Custom CSS\n\t\t$wp_customize->add_setting( 'qt_custom_css', array(\n\t\t\t'default' \t\t\t=> '/* Add your custom CSS below */',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'wp_kses',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_custom_css', array(\n\t \t'label' \t\t\t=> esc_html__( 'Custom CSS', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_custom',\n\t \t'settings' \t\t\t=> 'qt_custom_css',\n\t \t'type' \t\t\t\t=> 'textarea',\n\t \t'priority' \t\t\t=> 5,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_custom_head_js', array(\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_js',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_custom_head_js', array(\n\t \t'label' \t\t\t=> esc_html__( 'Custom header JS', 'the-landscaper-wp' ),\n\t \t'description' \t\t=> esc_html__( 'Please use the <script></script> tags', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_custom',\n\t \t'settings' \t\t\t=> 'qt_custom_head_js',\n\t \t'type' \t\t\t\t=> 'textarea',\n\t \t'priority' \t\t\t=> 10,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_custom_foot_js', array(\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_js',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_custom_foot_js', array(\n\t \t'label' \t\t\t=> esc_html__( 'Custom footer JS', 'the-landscaper-wp' ),\n\t \t'description' \t\t=> esc_html__( 'Please use the <script></script> tags', 'the-landscaper-wp' ),\n\t \t'section' \t\t\t=> 'qt_section_custom',\n\t \t'settings' \t\t\t=> 'qt_custom_foot_js',\n\t \t'type' \t\t\t\t=> 'textarea',\n\t \t'priority' \t\t\t=> 15,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'qt_custom_google_api', array(\n\t \t'default' \t\t\t=> '',\n\t \t'transport'\t\t\t=> 'refresh',\n\t \t'sanitize_callback' => 'thelandscaper_sanitize_text',\n\t\t) );\n\t\t$wp_customize->add_control( 'qt_custom_google_api', array(\n\t \t'label' \t\t\t=> esc_html__( 'Google Maps API key', 'the-landscaper-wp' ),\n\t \t'description' \t\t=> sprintf( esc_html__( 'Enter your Google Maps API key. Create one %s', 'the-landscaper-wp' ), '<a href=\"'. esc_url( 'https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true' ) .'\" target=\"_blank\">here</a>' ),\n\t \t'section' \t\t\t=> 'qt_section_custom',\n\t \t'settings' \t\t\t=> 'qt_custom_google_api',\n\t \t'type' \t\t\t\t=> 'text',\n\t \t'priority' \t\t\t=> 20,\n\t\t) );\n\n\t\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t}", "title": "" }, { "docid": "a69f2b64c8a682fe17726428a5acf555", "score": "0.6840359", "text": "function ramza_customizer_register( $wp_customize ) {\n /**\n * Modify some WP default settings to fit the theme\n */\n $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n $wp_customize->remove_control( 'display_header_text' );\n $wp_customize->get_control( 'header_image' )->section = 'title_tagline';\n // $wp_customize->remove_section( 'background_image' );\n\n /**\n * Add hook to easily add custom options.\n *\n * @since 1.0.0\n *\n * @param WP_Customize_Manager $wp_customize Theme Customizer object.\n */\n do_action( 'ramza_register_customizer_settings', $wp_customize );\n}", "title": "" }, { "docid": "ae861dea9382a9aa435f54dcb55066d7", "score": "0.6836202", "text": "function mullins_customize_register( $wp_customize ) {\n \n // General Theme Options\n\n $wp_customize->add_section( 'mullins_customizer_section' , array(\n 'title' => __( 'Mullins Settings', THEME_ID ),\n 'priority' => 30,\n ) \n );\n \n $wp_customize->add_setting( 'mullins_logo_image' , array(\n 'default' => 'http://placehold.it/350x150',\n 'transport' => 'postMessage',\n ) \n );\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'mullins_logo_image', array(\n 'label' => __( 'Logo', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_logo_image',\n ) ) );\n \n $wp_customize->add_setting( 'mullins_primary_color' , array(\n 'default' => '#094C8B',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mullins_primary_color', array(\n 'label' => __( 'Primary Color', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_primary_color',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_secondary_color' , array(\n 'default' => '#C31A2F',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mullins_secondary_color', array(\n 'label' => __( 'Secondary Color', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_secondary_color',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_accent_1' , array(\n 'default' => '#ebebeb',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mullins_accent_1', array(\n 'label' => __( 'Accent 1', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_accent_1',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_accent_2' , array(\n 'default' => '#D6E0EB',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mullins_accent_2', array(\n 'label' => __( 'Accent 2', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_accent_2',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_background' , array(\n 'default' => '#ffffff',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mullins_background', array(\n 'label' => __( 'Background', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_background',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_address' , array(\n 'default' => '123 Some Street<br />Anytown, USA 45678',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_address', array(\n 'type' => 'textarea',\n 'label' => __( 'Address', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_address',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_phone_number' , array(\n 'default' => '(517) 867-5309',\n 'transport' => 'postMessage',\n ) \n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_phone_number', array(\n 'label' => __( 'Phone Number', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_phone_number',\n ) ) );\n \n $wp_customize->add_setting( 'mullins_email_address' , array(\n 'default' => '[email protected]',\n 'transport' => 'postMessage',\n )\n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_email_address', array(\n 'label' => __( 'Email Address', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_email_address',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_facebook_url' , array(\n 'default' => 'http://facebook.com',\n 'transport' => 'postMessage',\n ) \n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_facebook_url', array(\n 'label' => __( 'Facebook URL', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_facebook_url',\n ) ) );\n \n $wp_customize->add_setting( 'mullins_contact_shortcode' , array(\n 'default' => '[contact-form-7 id=\"31\" title=\"Schedule a Service Call\"]',\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_contact_shortcode', array(\n 'label' => __( 'Contact Form Shortcode', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_contact_shortcode',\n ) ) );\n\n $wp_customize->add_setting( 'mullins_footer_columns' , array(\n 'default' => 4,\n 'transport' => 'refresh',\n )\n );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'mullins_footer_columns', array(\n 'type' => 'number',\n 'label' => __( 'Footer Number of Columns/Widgets', THEME_ID ),\n 'section' => 'mullins_customizer_section',\n 'settings' => 'mullins_footer_columns',\n ) ) );\n\n}", "title": "" }, { "docid": "f0a0152bf4bb2e411e472ca10355da92", "score": "0.68358994", "text": "public function customize_register( $wp_customize ) {\n\n\t\t\t/**\n\t\t\t * Sections\n\t\t\t */\n\t\t\trequire_once ASTRA_ADDON_EXT_SITE_LAYOUTS_DIR . 'classes/sections/class-astra-site-layout-configuration.php';\n\t\t}", "title": "" }, { "docid": "d043bc6422328596178bdc6e72d0e782", "score": "0.6835865", "text": "function add_GRIT_Theme_Options_interface() {\n\n\tadd_theme_page(\"Theme Options\", \"Theme Options\", 'edit_themes', basename(__FILE__), 'editglobalcustomfields');\n\n}", "title": "" }, { "docid": "0be0c82c4edb2cd6239f451ab5c90e93", "score": "0.6825036", "text": "function wpb_customize_register($wp_customize){\r\n // Create custom panel.\r\n $wp_customize->add_panel( 'panel_for_images', array(\r\n 'priority' => 500,\r\n 'theme_supports' => '',\r\n 'title' => __( 'Images Panel', 'awesome' ),\r\n 'description' => __( 'Container for Images.', 'awesome' ),\r\n ) );\r\n //image section 0\r\n $wp_customize->add_section('container_image0', array(\r\n 'title' => __('Image for Single Post','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_image', array(\r\n 'label' => __('Image for Single Post', 'awesome'),\r\n 'section' => 'container_image0', \r\n 'settings' => 'single_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 0-1\r\n $wp_customize->add_section('container_image0_1', array(\r\n 'title' => __('Image for Single Food','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_food_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_food_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_food_image', array(\r\n 'label' => __('Image for Single Food', 'awesome'),\r\n 'section' => 'container_image0_1', \r\n 'settings' => 'single_food_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 0-2\r\n $wp_customize->add_section('container_image0_2', array(\r\n 'title' => __('Image for Single Lifestyle','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_lifestyle_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_lifestyle_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_lifestyle_image', array(\r\n 'label' => __('Image for Single Lifestyle', 'awesome'),\r\n 'section' => 'container_image0_2', \r\n 'settings' => 'single_lifestyle_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 0-3\r\n $wp_customize->add_section('container_image0_3', array(\r\n 'title' => __('Image for Single Cooking','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_cooking_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_cooking_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_cooking_image', array(\r\n 'label' => __('Image for Single Cooking', 'awesome'),\r\n 'section' => 'container_image0_3', \r\n 'settings' => 'single_cooking_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 0-4\r\n $wp_customize->add_section('container_image0_4', array(\r\n 'title' => __('Image for Single Video','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_video_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_video_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_video_image', array(\r\n 'label' => __('Image for Single Video', 'awesome'),\r\n 'section' => 'container_image0_4', \r\n 'settings' => 'single_video_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 0-5\r\n $wp_customize->add_section('container_image0_5', array(\r\n 'title' => __('Image for Single Event','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('single_event_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/single/single_event_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'single_event_image', array(\r\n 'label' => __('Image for Single Event', 'awesome'),\r\n 'section' => 'container_image0_5', \r\n 'settings' => 'single_event_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 1\r\n $wp_customize->add_section('container_image1', array(\r\n 'title' => __('Image for Content','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_image', array(\r\n 'label' => __('Image for Content', 'awesome'),\r\n 'section' => 'container_image1', \r\n 'settings' => 'content_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 1-1\r\n $wp_customize->add_section('container_image1_1', array(\r\n 'title' => __('Image for Content Image','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_image_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_image_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_image_image', array(\r\n 'label' => __('Image for Content Image', 'awesome'),\r\n 'section' => 'container_image1_1', \r\n 'settings' => 'content_image_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 1-2\r\n $wp_customize->add_section('container_image1_2', array(\r\n 'title' => __('Image for Content Link','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_link_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_link_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_link_image', array(\r\n 'label' => __('Image for Content Link', 'awesome'),\r\n 'section' => 'container_image1_2', \r\n 'settings' => 'content_link_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 1-3\r\n $wp_customize->add_section('container_image1_3', array(\r\n 'title' => __('Image for Content Aside ','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_aside_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_aside_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_aside_image', array(\r\n 'label' => __('Image for Content Aside', 'awesome'),\r\n 'section' => 'container_image1_3', \r\n 'settings' => 'content_aside_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 1-4\r\n $wp_customize->add_section('container_image1_4', array(\r\n 'title' => __('Image for Content Chat','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_chat_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_chat_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_chat_image', array(\r\n 'label' => __('Image for Content Chat', 'awesome'),\r\n 'section' => 'container_image1_4', \r\n 'settings' => 'content_chat_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t //image section 1-5\r\n $wp_customize->add_section('container_image1_5', array(\r\n 'title' => __('Image for Content Gallery','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_gallery_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_gallery_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_gallery_image', array(\r\n 'label' => __('Image for Gallery Chat', 'awesome'),\r\n 'section' => 'container_image1_5', \r\n 'settings' => 'content_gallery_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t //image section 1-6\r\n $wp_customize->add_section('container_image1_6', array(\r\n 'title' => __('Image for Content Status','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_status_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_status_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_status_image', array(\r\n 'label' => __('Image for Content Status', 'awesome'),\r\n 'section' => 'container_image1_6', \r\n 'settings' => 'content_status_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t //image section 1-7\r\n $wp_customize->add_section('container_image1_7', array(\r\n 'title' => __('Image for Content Quote','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_quote_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_quote_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_quote_image', array(\r\n 'label' => __('Image for Content Quote', 'awesome'),\r\n 'section' => 'container_image1_7', \r\n 'settings' => 'content_quote_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t //image section 1-8\r\n $wp_customize->add_section('container_image1_8', array(\r\n 'title' => __('Image for Content Video','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('content_video_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/content/content_video_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'content_video_image', array(\r\n 'label' => __('Image for Content Video', 'awesome'),\r\n 'section' => 'container_image1_8', \r\n 'settings' => 'content_video_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 2\r\n $wp_customize->add_section('container_image2', array(\r\n 'title' => __('Image for Category','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('category_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/category_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'category_image', array(\r\n 'label' => __('Image for Category', 'awesome'),\r\n 'section' => 'container_image2', \r\n 'settings' => 'category_image',\r\n 'priority' => 1\r\n )));\r\n //image section 2-1\r\n $wp_customize->add_section('container_image2_1', array(\r\n 'title' => __('Image for Category Food','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('food_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/food_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'food_image', array(\r\n 'label' => __('Image for Category Food', 'awesome'),\r\n 'section' => 'container_image2_1', \r\n 'settings' => 'food_image',\r\n 'priority' => 1\r\n )));\r\n //image section 2-2\r\n $wp_customize->add_section('container_image2_2', array(\r\n 'title' => __('Image for Category Lifestyle','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('lifestyle_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/lifestyle_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'lifestyle_image', array(\r\n 'label' => __('Image for Category Lifestyle', 'awesome'),\r\n 'section' => 'container_image2_2', \r\n 'settings' => 'lifestyle_image',\r\n 'priority' => 1\r\n )));\r\n //image section 2-3\r\n $wp_customize->add_section('container_image2_3', array(\r\n 'title' => __('Image for Category Cooking','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('cooking_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/cooking_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'cooking_image', array(\r\n 'label' => __('Image for Category Cooking', 'awesome'),\r\n 'section' => 'container_image2_3', \r\n 'settings' => 'cooking_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 2-4\r\n $wp_customize->add_section('container_image2_4', array(\r\n 'title' => __('Image for Category Video','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('video_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/video_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'video_image', array(\r\n 'label' => __('Image for Category Video', 'awesome'),\r\n 'section' => 'container_image2_4', \r\n 'settings' => 'video_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 2-5\r\n $wp_customize->add_section('container_image2_5', array(\r\n 'title' => __('Image for Category Popular','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('popular_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/popular_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'popular_image', array(\r\n 'label' => __('Image for Category Popular', 'awesome'),\r\n 'section' => 'container_image2_5', \r\n 'settings' => 'popular_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 2-6\r\n $wp_customize->add_section('container_image2_6', array(\r\n 'title' => __('Image for Category Event','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('event_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/category/event_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'event_image', array(\r\n 'label' => __('Image for Category Event', 'awesome'),\r\n 'section' => 'container_image2_6', \r\n 'settings' => 'event_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t\t//image section 3-0\r\n $wp_customize->add_section('container_image3_0', array(\r\n 'title' => __('Image for Page','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('page_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/page_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'page_image', array(\r\n 'label' => __('Image for Page', 'awesome'),\r\n 'section' => 'container_image3_0', \r\n 'settings' => 'page_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 3\r\n $wp_customize->add_section('container_image3', array(\r\n 'title' => __('Image for Archive','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('archive_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/archive_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'archive_image', array(\r\n 'label' => __('Image for Archive', 'awesome'),\r\n 'section' => 'container_image3', \r\n 'settings' => 'archive_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 4\r\n $wp_customize->add_section('container_image4', array(\r\n 'title' => __('Image for Author','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('author_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/author_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'author_image', array(\r\n 'label' => __('Image for Author', 'awesome'),\r\n 'section' => 'container_image4', \r\n 'settings' => 'author_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 5\r\n $wp_customize->add_section('container_image5', array(\r\n 'title' => __('Image for Search','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('search_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/search_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'search_image', array(\r\n 'label' => __('Image for Search', 'awesome'),\r\n 'section' => 'container_image5', \r\n 'settings' => 'search_image',\r\n 'priority' => 1\r\n )));\r\n\r\n //image section 6\r\n $wp_customize->add_section('container_image6', array(\r\n 'title' => __('Image for Contact','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('contact_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/contact_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'contact_image', array(\r\n 'label' => __('Image for Contact', 'awesome'),\r\n 'section' => 'container_image6', \r\n 'settings' => 'contact_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t\t//image section 6-1\r\n $wp_customize->add_section('container_image6_1', array(\r\n 'title' => __('Image for Contact Form','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('contact_form_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/contact_form_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'contact_form_image', array(\r\n 'label' => __('Image for Contact Form', 'awesome'),\r\n 'section' => 'container_image6_1', \r\n 'settings' => 'contact_form_image',\r\n 'priority' => 1\r\n )));\r\n\t\t\t\r\n\t\t\t//image section 7\r\n $wp_customize->add_section('container_image7', array(\r\n 'title' => __('Image for Error','awesome'),\r\n 'description' => sprintf(__('Options for Image', 'awesome')),\r\n 'panel' => 'panel_for_images', \r\n 'priority' => 130\r\n ));\r\n $wp_customize->add_setting('error_image', array(\r\n 'default' => get_bloginfo('template_directory').'/images/customizer/page/error_image.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'error_image', array(\r\n 'label' => __('Image for Error', 'awesome'),\r\n 'section' => 'container_image7', \r\n 'settings' => 'error_image',\r\n 'priority' => 1\r\n )));\r\n\r\n\r\n }", "title": "" }, { "docid": "ac0ebc744f64d79ee5d034d40bed5352", "score": "0.6822499", "text": "function awesome_carousel_customizer( $wp_customize ) {\r\n // FOLDER NAME IS Carousel\r\n $wp_customize->add_panel( 'carousel', array(\r\n 'priority' => 500,\r\n 'theme_supports' => '',\r\n 'title' => __( 'Carousel', 'awesome' ),\r\n 'description' => __( 'Set editable text for certain content.', 'awesome' ),\r\n ) ); \r\n /*==============================================\r\n ADD CAROUSEL 1\r\n ================================================*/\t\r\n // Add section carousel 1. like subfolder inside Carousel, belongs to panel \"Carousel\"\r\n $wp_customize->add_section( 'carousel1' , array(\r\n 'title' => __('Carousel 1','awesome'),\r\n 'panel' => 'carousel', \r\n 'priority' => 130\r\n ) ); \r\n //add carousel section 1\r\n $wp_customize->add_setting('image1', array(\r\n 'default' => get_bloginfo('template_directory').'/images/default.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'image1', array(\r\n 'label' => __('Image - use photo size 1920 x 1080 (landscape). ', 'awesome'),\r\n 'section' => 'carousel1', \r\n 'settings' => 'image1',\r\n 'priority' => 1\r\n )));\r\n\t // Add header setting\r\n $wp_customize->add_setting( 'header1', array(\r\n 'default' => __( 'first line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header1',\r\n array(\r\n 'label' => __( 'First Line', 'awesome' ),\r\n 'section' => 'carousel1',\r\n 'settings' => 'header1',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n\t// Add header setting 2\r\n $wp_customize->add_setting( 'header1_2', array(\r\n 'default' => __( 'second line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header1_2',\r\n array(\r\n 'label' => __( 'Second Line', 'awesome' ),\r\n 'section' => 'carousel1',\r\n 'settings' => 'header1_2',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n // Add subtext setting\r\n $wp_customize->add_setting( 'subtext1', array(\r\n 'default' => __( 'subtext 1', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'subtext1',\r\n array(\r\n 'label' => __( 'Subtext 1', 'awesome' ),\r\n 'section' => 'carousel1',\r\n 'settings' => 'subtext1',\r\n 'priority' => 1, \r\n 'type' => 'textarea'\r\n )\r\n )\r\n );\r\n /*==============================================\r\n ADD CAROUSEL 2\r\n ================================================*/\r\n // Add section carousel 2.\r\n $wp_customize->add_section( 'carousel2' , array(\r\n 'title' => __('Carousel 2','awesome'),\r\n 'panel' => 'carousel', \r\n 'priority' => 130\r\n ) ); \r\n //add carousel section 2\r\n $wp_customize->add_setting('image2', array(\r\n 'default' => get_bloginfo('template_directory').'/images/default.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'image2', array(\r\n 'label' => __('Image - use photo size 1920 x 1080 (landscape). ', 'awesome'),\r\n 'section' => 'carousel2', \r\n 'settings' => 'image2',\r\n 'priority' => 1\r\n ))); \r\n\t// Add header setting\r\n $wp_customize->add_setting( 'header2', array(\r\n 'default' => __( 'first line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header2',\r\n array(\r\n 'label' => __( 'First Line', 'awesome' ),\r\n 'section' => 'carousel2',\r\n 'settings' => 'header2',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n\t// Add header setting 2\r\n $wp_customize->add_setting( 'header2_2', array(\r\n 'default' => __( 'second line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header2_2',\r\n array(\r\n 'label' => __( 'Second Line', 'awesome' ),\r\n 'section' => 'carousel2',\r\n 'settings' => 'header2_2',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n // Add subtext setting\r\n $wp_customize->add_setting( 'subtext2', array(\r\n 'default' => __( 'subtext 2', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'subtext2',\r\n array(\r\n 'label' => __( 'Subtext 2', 'awesome' ),\r\n 'section' => 'carousel2',\r\n 'settings' => 'subtext2',\r\n 'priority' => 1, \r\n 'type' => 'textarea'\r\n )\r\n )\r\n ); \r\n /*==============================================\r\n ADD CAROUSEL 3\r\n ================================================*/\r\n // Add section carousel 3.\r\n $wp_customize->add_section( 'carousel3' , array(\r\n 'title' => __('Carousel 3','awesome'),\r\n 'panel' => 'carousel', \r\n 'priority' => 130\r\n ) );\r\n //add carousel section 3, setting and control\r\n $wp_customize->add_setting('image3', array(\r\n 'default' => get_bloginfo('template_directory').'/images/default.jpg',\r\n 'type' => 'theme_mod'\r\n ));\r\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'image3', array(\r\n 'label' => __('Image - use photo size 1920 x 1080 (landscape). ', 'awesome'),\r\n 'section' => 'carousel3', \r\n 'settings' => 'image3',\r\n 'priority' => 1\r\n ))); \r\n\t\t// Add header setting\r\n $wp_customize->add_setting( 'header3', array(\r\n 'default' => __( 'first line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header3',\r\n array(\r\n 'label' => __( 'First Line', 'awesome' ),\r\n 'section' => 'carousel3',\r\n 'settings' => 'header3',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n\t// Add header setting 2\r\n $wp_customize->add_setting( 'header3_2', array(\r\n 'default' => __( 'second line', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'header3_2',\r\n array(\r\n 'label' => __( 'Second Line', 'awesome' ),\r\n 'section' => 'carousel3',\r\n 'settings' => 'header3_2',\r\n 'priority' => 1,\r\n 'type' => 'text'\r\n )\r\n )\r\n );\r\n // Add subtext setting\r\n $wp_customize->add_setting( 'subtext3', array(\r\n 'default' => __( 'subtext 3', 'awesome' ),\r\n 'type' => 'theme_mod'\r\n ) );\r\n // Add control\r\n $wp_customize->add_control( new WP_Customize_Control(\r\n $wp_customize,\r\n 'subtext3',\r\n array(\r\n 'label' => __( 'Subtext 3', 'awesome' ),\r\n 'section' => 'carousel3',\r\n 'settings' => 'subtext3',\r\n 'priority' => 1, \r\n 'type' => 'textarea'\r\n )\r\n )\r\n ); \r\n}", "title": "" }, { "docid": "d7f16515235c700f8d13a931c5e86025", "score": "0.6809763", "text": "function build( $custom )\n {\n // Loop through the defined sections, sections hold our settings fields so it makes sense to define these first\n foreach( $this->sections AS $section )\n {\n $custom->add_section(\n $section['name'],\n array(\n 'title' => __( $section['title'] ),\n 'priority' => ( ! isset( $section['priority'] ) || empty( $section['priority'] ) ? 30 : $section['priority'] )\n )\n );\n }\n\n // Next, generate the actual settings\n foreach( $this->settings AS $setting )\n {\n $custom->add_setting(\n $setting['name'],\n array(\n 'default' => $setting['default'],\n 'transport' => 'postMessage'\n )\n );\n\n // Since a setting also requires a controller, we initiate the controller straight away using the setting name as identifier.\n // This means we won't get fatal errors for missing setting for a controller which may happen if we do this manually per setting!\n switch( $setting['type'] )\n {\n case 'header':\n $custom->add_control(\n new WP_Customize_Header_Image_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n break;\n case 'background':\n $custom->add_control(\n new WP_Customize_Background_Image_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n break;\n case 'image':\n $custom->add_control(\n new WP_Customize_Image_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n break;\n case 'upload':\n $custom->add_control(\n new WP_Customize_Upload_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n break;\n case 'color':\n $custom->add_control(\n new WP_Customize_Color_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n break;\n default:\n $custom->add_control(\n new WP_Customize_Control(\n $custom,\n $setting['name'],\n array(\n 'label' => __( $setting['label'] ),\n 'section' => $setting['section'],\n 'settings' => $setting['name']\n )\n )\n );\n }\n }\n }", "title": "" }, { "docid": "9ef2691104ee1e5ca7ecfdf9e707c538", "score": "0.6809058", "text": "function background_customize_register($wp_customize) {\n\t$wp_customize->add_section('section_background', array(\n\t\t\"title\" => 'Background',\n\t\t\"priority\" => 35,\n\t\t\"description\" => __( 'Background-Einstellungen', 'theme-slug' )\n\t));\n\n\t$wp_customize->add_setting('image_background', array(\n\t\t'default' => '',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t));\n\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_background', array(\n\t\t\t'label' => __( 'Background-Image', 'theme-slug' ),\n\t\t\t'section' => 'section_background',\n\t\t\t'settings' => 'image_background',\n\t\t))\n\t);\n\n}", "title": "" }, { "docid": "41c31b32be3602b9cb374735768a8c63", "score": "0.680428", "text": "function merlin_customize_register_postmeta_settings( $wp_customize ) {\n\n\t// Add Sections for Post Meta\n\t$wp_customize->add_section( 'merlin_section_postmeta', array(\n 'title' => esc_html__( 'Post Meta', 'merlin' ),\n 'priority' => 40,\n\t\t'panel' => 'merlin_options_panel' \n\t\t)\n\t);\n\t\n\t// Add Post Meta Settings\n\t$wp_customize->add_setting( 'merlin_theme_options[postmeta_headline]', array(\n 'default' => '',\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'esc_attr'\n )\n );\n $wp_customize->add_control( new Merlin_Customize_Header_Control(\n $wp_customize, 'merlin_theme_options[postmeta_headline]', array(\n 'label' => esc_html__( 'Post Meta', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[postmeta_headline]',\n 'priority' => 1\n )\n )\n );\n\t$wp_customize->add_setting( 'merlin_theme_options[meta_date]', array(\n 'default' => true,\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'merlin_sanitize_checkbox'\n\t\t)\n\t);\n $wp_customize->add_control( 'merlin_theme_options[meta_date]', array(\n 'label' => esc_html__( 'Display post date', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[meta_date]',\n 'type' => 'checkbox',\n\t\t'priority' => 2\n\t\t)\n\t);\n\t$wp_customize->add_setting( 'merlin_theme_options[meta_author]', array(\n 'default' => true,\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'merlin_sanitize_checkbox'\n\t\t)\n\t);\n $wp_customize->add_control( 'merlin_theme_options[meta_author]', array(\n 'label' => esc_html__( 'Display post author', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[meta_author]',\n 'type' => 'checkbox',\n\t\t'priority' => 3\n\t\t)\n\t);\n\t\n\t// Add Footer Meta Settings\n\t$wp_customize->add_setting( 'merlin_theme_options[footermeta_headline]', array(\n 'default' => '',\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'esc_attr'\n )\n );\n $wp_customize->add_control( new Merlin_Customize_Header_Control(\n $wp_customize, 'merlin_theme_options[footermeta_headline]', array(\n 'label' => esc_html__( 'Post Footer', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[footermeta_headline]',\n 'priority' => 4\n )\n )\n );\n\t$wp_customize->add_setting( 'merlin_theme_options[footer_meta_archives]', array(\n 'default' => true,\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'merlin_sanitize_checkbox'\n\t\t)\n\t);\n $wp_customize->add_control( 'merlin_theme_options[footer_meta_archives]', array(\n 'label' => esc_html__( 'Display post categories and comments on archive pages', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[footer_meta_archives]',\n 'type' => 'checkbox',\n\t\t'priority' => 5\n\t\t)\n\t);\n\t$wp_customize->add_setting( 'merlin_theme_options[footer_meta_single]', array(\n 'default' => true,\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'merlin_sanitize_checkbox'\n\t\t)\n\t);\n $wp_customize->add_control( 'merlin_theme_options[footer_meta_single]', array(\n 'label' => esc_html__( 'Display post categories and comments on single posts', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[footer_meta_single]',\n 'type' => 'checkbox',\n\t\t'priority' => 6\n\t\t)\n\t);\n\t$wp_customize->add_setting( 'merlin_theme_options[meta_tags]', array(\n 'default' => true,\n\t\t'type' \t=> 'option',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'merlin_sanitize_checkbox'\n\t\t)\n\t);\n $wp_customize->add_control( 'merlin_theme_options[meta_tags]', array(\n 'label' => esc_html__( 'Display post tags on single posts', 'merlin' ),\n 'section' => 'merlin_section_postmeta',\n 'settings' => 'merlin_theme_options[meta_tags]',\n 'type' => 'checkbox',\n\t\t'priority' => 7\n\t\t)\n\t);\n\n}", "title": "" }, { "docid": "4c395e17370e1203f796e9040f214f94", "score": "0.6802274", "text": "function createCustomFields() {\n\t\t\tglobal $rf_theme_name_full;\n\t\t\tif ( function_exists( 'add_meta_box' ) ) {\n\t\t\t\tadd_meta_box( 'my-custom-fields', $rf_theme_name_full.' Additional settings', array( &$this, 'displayCustomFields' ), 'post', 'normal', 'high' );\n\t\t\t\tadd_meta_box( 'my-custom-fields', $rf_theme_name_full.' Additional settings', array( &$this, 'displayCustomFields' ), 'page', 'normal', 'high' );\n\t\t\t\tadd_meta_box( 'my-custom-fields', $rf_theme_name_full.' Sections settings', array( &$this, 'displayCustomFields' ), 'section', 'normal', 'high' );\n\t\t\t\tadd_meta_box( 'my-custom-fields', $rf_theme_name_full.' Menucard settings', array( &$this, 'displayCustomFields' ), 'menucard', 'normal', 'high' );\n\t\t\t\tadd_meta_box( 'my-custom-fields', $rf_theme_name_full.' Slide settings', array( &$this, 'displayCustomFields' ), 'slide', 'normal', 'high' );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1a5ddbecae3aae9a26b4050ca27e683c", "score": "0.6784505", "text": "function pureblog_customizer( $wp_customize ) {\n// logo\n $wp_customize->add_setting( 'header_logo', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'pureblog_sanitize_number'\n ) );\n $wp_customize->add_control(new WP_Customize_Media_Control( $wp_customize, 'header_logo', array(\n 'label' => __( 'Logo', 'pureblog' ),\n 'section' => 'title_tagline',\n 'mime_type' => 'image',\n 'priority' => 10,\n ) ) );\n\n\n global $header_show;\n $wp_customize->add_setting('header_show', array(\n 'default' => 'logo-text',\n 'sanitize_callback' => 'pureblog_sanitize_radio_header'\n ));\n $wp_customize->add_control('header_show', array(\n 'type' => 'radio',\n 'label' => __('Show', 'pureblog'),\n 'section' => 'title_tagline',\n 'choices' => $header_show\n ));\n $wp_customize->add_panel('pureblog_main_options', array(\n 'capability' => 'edit_theme_options',\n 'theme_supports' => '',\n 'title' => __('Pureblog Settings', 'pureblog'),\n 'description' => __('Panel to update pureblog theme options', 'pureblog'), // Include html tags such as <p>.\n 'priority' => 10 // Mixed with top-level-section hierarchy.\n ));\n // Add Sections in Main Panel\n $wp_customize->add_section( 'pureblog_general_section' , array(\n 'title' => esc_html__( 'General Settings', 'pureblog' ),\n 'priority' => 10,\n 'panel' => 'pureblog_main_options'\n ) );\n $wp_customize->add_section( 'pureblog_styling_section' , array(\n 'title' => esc_html__( 'Styling Settings', 'pureblog' ),\n 'priority' => 20,\n 'panel' => 'pureblog_main_options'\n ) );\n $wp_customize->add_section( 'pureblog_social_section' , array(\n 'title' => esc_html__( 'Social Settings', 'pureblog' ),\n 'priority' => 30,\n 'panel' => 'pureblog_main_options'\n ) );\n $wp_customize->add_section( 'pureblog_contact_section' , array(\n 'title' => esc_html__( 'Contact Settings', 'pureblog' ),\n 'priority' => 50,\n 'panel' => 'pureblog_main_options'\n ) );\n $wp_customize->add_section( 'pureblog_footer_section' , array(\n 'title' => esc_html__( 'Footer Settings', 'pureblog' ),\n 'priority' => 50,\n 'panel' => 'pureblog_main_options'\n ) );\n\n\n // Pureblog Main Options\n $wp_customize->add_setting( 'pureblog_excerpts', array(\n 'default' => 1,\n 'sanitize_callback' => 'pureblog_sanitize_checkbox',\n ) );\n\n $wp_customize->add_control( 'pureblog_excerpts', array(\n 'label' => esc_html__( 'Show post excerpts?', 'pureblog' ),\n 'section' => 'pureblog_general_section',\n 'priority' => 10,\n 'type' => 'checkbox'\n ) );\n\n $wp_customize->add_setting( 'pureblog_page_comments', array(\n 'default' => 1,\n 'sanitize_callback' => 'pureblog_sanitize_checkbox',\n ) );\n\n $wp_customize->add_control( 'pureblog_page_comments', array(\n 'label'\t\t=> esc_html__( 'Display Comments on Static Pages?', 'pureblog' ),\n 'section'\t=> 'pureblog_general_section',\n 'priority'\t=> 20,\n 'type' => 'checkbox',\n ) );\n\n /* pureblog Styling Options */\n $wp_customize->add_setting( 'site_color', array(\n 'default' => '#000000',\n 'sanitize_callback' => 'pureblog_sanitize_hexcolor',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'site_color', array(\n 'label' => __( 'Site Color', 'pureblog' ),\n 'section' => 'pureblog_styling_section',\n ) ) );\n\n $wp_customize->add_setting( 'link_color', array(\n 'default' => '#000000',\n 'sanitize_callback' => 'pureblog_sanitize_hexcolor',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(\n 'label' => __( 'Link Color', 'pureblog' ),\n 'section' => 'pureblog_styling_section',\n ) ) );\n $wp_customize->add_setting( 'link_hover_color', array(\n 'default' => '#000000',\n 'sanitize_callback' => 'pureblog_sanitize_hexcolor',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_hover_color', array(\n 'label' => __( 'Link Hover Color', 'pureblog' ),\n 'section' => 'pureblog_styling_section',\n ) ) );\n\n $wp_customize->add_setting('custom_css', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control('custom_css', array(\n 'label' => __('Custom CSS', 'pureblog'),\n 'description' => sprintf(__('Additional CSS', 'pureblog')),\n 'section' => 'pureblog_styling_section',\n 'type' => 'textarea'\n ));\n\n // Pureblog Footer Section Options\n $wp_customize->add_setting( 'pureblog_footer_copyright', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ) );\n $wp_customize->add_control( 'pureblog_footer_copyright', array(\n 'label' => 'Copyright Text',\n 'section' => 'pureblog_footer_section',\n 'description' => sprintf(__('Copyright text that appears in footer.', 'pureblog')),\n 'type' => 'textarea',\n ) );\n $wp_customize->add_setting( 'pureblog_footer_trackingcode', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ) );\n $wp_customize->add_control( 'pureblog_footer_trackingcode', array(\n 'label' => 'Google Analytics',\n 'section' => 'pureblog_footer_section',\n 'description' => sprintf(__('Enter Google Analytics Code here!.', 'pureblog')),\n 'type' => 'textarea',\n ) );\n\n\n\n //Pureblog Contact Section\n $wp_customize->add_setting('pureblog_contact_phone', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_contact_phone', array(\n 'label' => 'Phone Number',\n 'section' => 'pureblog_contact_section',\n 'description' => sprintf(__('Your Phone Number', 'pureblog')),\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_contact_fax', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_contact_fax', array(\n 'label' => 'FAX.',\n 'section' => 'pureblog_contact_section',\n 'description' => sprintf(__('Your FAX Number', 'pureblog')),\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_contact_email', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_contact_email', array(\n 'label' => 'Email',\n 'section' => 'pureblog_contact_section',\n 'description' => sprintf(__('Your Email', 'pureblog')),\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_contact_address', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_contact_address', array(\n 'label' => 'Address',\n 'section' => 'pureblog_contact_section',\n 'description' => sprintf(__('Your Address', 'pureblog')),\n 'type' => 'textarea',\n ) );\n\n //Pureblog Social Section\n $wp_customize->add_setting('pureblog_social_facebook', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_social_facebook', array(\n 'label' => 'Facebook Url',\n 'section' => 'pureblog_social_section',\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_social_twitter', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_social_twitter', array(\n 'label' => 'Twitter Url.',\n 'section' => 'pureblog_social_section',\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_social_rssfeed', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_social_rssfeed', array(\n 'label' => 'RSS Feed URL',\n 'section' => 'pureblog_social_section',\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_social_linkedin', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_social_linkedin', array(\n 'label' => 'Linkedin URL',\n 'section' => 'pureblog_social_section',\n 'type' => 'text',\n ) );\n $wp_customize->add_setting('pureblog_social_youtube', array(\n 'default' => '',\n 'sanitize_callback' => 'pureblog_sanitize_strip_slashes'\n ));\n $wp_customize->add_control( 'pureblog_social_youtube', array(\n 'label' => 'Youtube URL',\n 'section' => 'pureblog_social_section',\n 'type' => 'text',\n ) );\n\n}", "title": "" }, { "docid": "e11d014ad3afc5bde5d0b7cedc791d6e", "score": "0.6778617", "text": "function sumerian_customize_register( $wp_customize ) {\n\n\n\t// Load custom controls.\n\trequire get_template_directory() . '/inc/customizer-controls.php';\n\n\t// Remove default sections.\n\n\t// Custom WP default control & settings.\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n\t/**\n\t * Hook to add other customize\n\t */\n\tdo_action( 'sumerian_customize_before_register', $wp_customize );\n\n\n\t$pages = get_pages();\n\t$option_pages = array();\n\t$option_pages[0] = esc_html__( 'Select page', 'sumerian' );\n\tforeach( $pages as $p ){\n\t\t$option_pages[ $p->ID ] = $p->post_title;\n\t}\n\n\t$users = get_users( array(\n\t\t'orderby' => 'display_name',\n\t\t'order' => 'ASC',\n\t\t'number' => '',\n\t) );\n\n\t$option_users[0] = esc_html__( 'Select member', 'sumerian' );\n\tforeach( $users as $user ){\n\t\t$option_users[ $user->ID ] = $user->display_name;\n\t}\n\n\t/*------------------------------------------------------------------------*/\n /* Site Identity.\n /*------------------------------------------------------------------------*/\n\n $is_old_logo = get_theme_mod( 'sumerian_site_image_logo' );\n\n $wp_customize->add_setting( 'sumerian_hide_sitetitle',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => $is_old_logo ? 1: 0,\n )\n );\n $wp_customize->add_control(\n 'sumerian_hide_sitetitle',\n array(\n 'label' \t\t=> esc_html__('Hide site title', 'sumerian'),\n 'section' \t\t=> 'title_tagline',\n 'type' => 'checkbox',\n )\n );\n\n $wp_customize->add_setting( 'sumerian_hide_tagline',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => $is_old_logo ? 1: 0,\n )\n );\n $wp_customize->add_control(\n 'sumerian_hide_tagline',\n array(\n 'label' \t\t=> esc_html__('Hide site tagline', 'sumerian'),\n 'section' \t\t=> 'title_tagline',\n 'type' => 'checkbox',\n\n )\n );\n\n // Retina Logo\n $wp_customize->add_setting( 'sumerian_retina_logo',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'sumerian_retina_logo',\n array(\n 'label' => esc_html__('Retina Logo', 'sumerian'),\n 'section' => 'title_tagline',\n )\n )\n );\n\n\n // Logo Width\n $wp_customize->add_setting( 'sumerian_logo_height',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control(\n 'sumerian_logo_height',\n array(\n 'label' => esc_html__('Logo Height In Pixel', 'sumerian'),\n 'section' => 'title_tagline',\n )\n\n );\n\n\t/*------------------------------------------------------------------------*/\n /* Site Options\n /*------------------------------------------------------------------------*/\n\t\t$wp_customize->add_panel( 'sumerian_options',\n\t\t\tarray(\n\t\t\t\t'priority' => 5,\n\t\t\t 'capability' => 'edit_theme_options',\n\t\t\t 'theme_supports' => '',\n\t\t\t 'title' => esc_html__( 'Theme Options', 'sumerian' ),\n\t\t\t 'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t/* Global Settings\n\t\t----------------------------------------------------------------------*/\n\t\t$wp_customize->add_section( 'sumerian_global_settings' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 3,\n\t\t\t\t'title' => esc_html__( 'Global', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_options',\n\t\t\t)\n\t\t);\n\n // Sidebar settings\n $wp_customize->add_setting( 'sumerian_layout',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'right-sidebar',\n //'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_layout',\n array(\n 'type' => 'select',\n 'label' => esc_html__('Site Layout', 'sumerian'),\n 'description' => esc_html__('Site Layout, apply for all pages, exclude home page and custom page templates.', 'sumerian'),\n 'section' => 'sumerian_global_settings',\n 'choices' => array(\n 'right-sidebar' => esc_html__('Right sidebar', 'sumerian'),\n 'left-sidebar' => esc_html__('Left sidebar', 'sumerian'),\n 'no-sidebar' => esc_html__('No sidebar', 'sumerian'),\n )\n )\n );\n\n\n\t\t\t// Disable Animation\n\t\t\t$wp_customize->add_setting( 'sumerian_animation_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_animation_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Disable animation effect?', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_global_settings',\n\t\t\t\t\t'description' => esc_html__('Check this box to disable all element animation when scroll.', 'sumerian')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Disable Animation\n\t\t\t$wp_customize->add_setting( 'sumerian_btt_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'transport'\t\t\t=> 'postMessage'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_btt_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Hide footer back to top?', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_global_settings',\n\t\t\t\t\t'description' => esc_html__('Check this box to hide footer back to top button.', 'sumerian')\n\t\t\t\t)\n\t\t\t);\n\n // Disable Google Font\n $wp_customize->add_setting( 'sumerian_disable_g_font',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n 'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_disable_g_font',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Disable Google Fonts', 'sumerian'),\n 'section' => 'sumerian_global_settings',\n 'description' => esc_html__('Check this if you want to disable default google fonts in theme.', 'sumerian')\n )\n );\n\n\n\t\t/* Colors\n\t\t----------------------------------------------------------------------*/\n\t\t$wp_customize->add_section( 'sumerian_colors_settings' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 4,\n\t\t\t\t'title' => esc_html__( 'Site Colors', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_options',\n\t\t\t)\n\t\t);\n\t\t\t// Primary Color\n\t\t\t$wp_customize->add_setting( 'sumerian_primary_color', array('sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '#13b5ea' ) );\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_primary_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Primary Color', 'sumerian' ),\n\t\t\t\t\t'section' => 'sumerian_colors_settings',\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'priority' => 1\n\t\t\t\t)\n\t\t\t));\n\n\n\t\t/* Header\n\t\t----------------------------------------------------------------------*/\n\t\t$wp_customize->add_section( 'sumerian_header_settings' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 5,\n\t\t\t\t'title' => esc_html__( 'Header', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_options',\n\t\t\t)\n\t\t);\n\n // Header width\n $wp_customize->add_setting( 'sumerian_header_width',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'contained',\n 'transport' => 'postMessage',\n )\n );\n\n $wp_customize->add_control( 'sumerian_header_width',\n array(\n 'type' => 'select',\n 'label' => esc_html__('Header Width', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n 'choices' => array(\n 'full-width' => esc_html__('Full Width', 'sumerian'),\n 'contained' => esc_html__('Contained', 'sumerian')\n )\n )\n );\n\n // Header Layout\n $wp_customize->add_setting( 'sumerian_header_position',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'top',\n 'transport' => 'postMessage',\n 'active_callback' => 'sumerian_showon_frontpage'\n )\n );\n\n $wp_customize->add_control( 'sumerian_header_position',\n array(\n 'type' => 'select',\n 'label' => esc_html__('Header Position', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n 'choices' => array(\n 'top' => esc_html__('Top', 'sumerian'),\n 'below_hero' => esc_html__('Below Hero Slider', 'sumerian')\n )\n )\n );\n\n // Disable Sticky Header\n $wp_customize->add_setting( 'sumerian_sticky_header_disable',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n 'transport' => 'postMessage',\n )\n );\n $wp_customize->add_control( 'sumerian_sticky_header_disable',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Disable Sticky Header?', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n 'description' => esc_html__('Check this box to disable sticky header when scroll.', 'sumerian')\n )\n );\n\n\n\n\t\t// Vertical align menu\n\t\t$wp_customize->add_setting( 'sumerian_vertical_align_menu',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_vertical_align_menu',\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__('Center vertical align for menu', 'sumerian'),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => esc_html__('If you use logo and your logo is too tall, check this box to auto vertical align menu.', 'sumerian')\n\t\t\t)\n\t\t);\n\n\t\t// Scroll to top when click to logo\n\t\t$wp_customize->add_setting( 'sumerian_header_scroll_logo',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t'default' => 0,\n\t\t\t\t'active_callback' => ''\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_header_scroll_logo',\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__('Scroll to top when click to the site logo or site title, only apply on front page.', 'sumerian'),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t)\n\t\t);\n\n\t\t// Header BG Color\n\t\t$wp_customize->add_setting( 'sumerian_header_bg_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_header_bg_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Background Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\n\t\t// Site Title Color\n\t\t$wp_customize->add_setting( 'sumerian_logo_text_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_logo_text_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Site Title Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => esc_html__( 'Only set if you don\\'t use an image logo.', 'sumerian' ),\n\t\t\t)\n\t\t));\n\n\t\t// Header Menu Color\n\t\t$wp_customize->add_setting( 'sumerian_menu_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_menu_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Menu Link Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\t\t// Header Menu Hover Color\n\t\t$wp_customize->add_setting( 'sumerian_menu_hover_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_menu_hover_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Menu Link Hover/Active Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => '',\n\n\t\t\t)\n\t\t));\n\n\t\t// Header Menu Hover BG Color\n\t\t$wp_customize->add_setting( 'sumerian_menu_hover_bg_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_menu_hover_bg_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Menu Link Hover/Active BG Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\t\t// Responsive Mobile button color\n\t\t$wp_customize->add_setting( 'sumerian_menu_toggle_button_color',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t\t\t'default' => ''\n\t\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_menu_toggle_button_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Responsive Menu Button Color', 'sumerian' ),\n\t\t\t\t'section' => 'sumerian_header_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\n // Header Transparent\n $wp_customize->add_setting( 'sumerian_header_transparent',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n 'active_callback' => 'sumerian_showon_frontpage',\n 'transport' => 'postMessage',\n )\n );\n $wp_customize->add_control( 'sumerian_header_transparent',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Header Transparent', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n 'description' => esc_html__('Apply for front page template only.', 'sumerian')\n )\n );\n\n // Transparent Logo\n $wp_customize->add_setting( 'sumerian_transparent_logo',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'sumerian_transparent_logo',\n array(\n 'label' => esc_html__('Transparent Logo', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n 'description' => esc_html__('Only apply when transparent header option is checked.', 'sumerian')\n )\n )\n );\n\n // Transparent Retina Logo\n $wp_customize->add_setting( 'sumerian_transparent_retina_logo',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport'\t\t\t=> 'postMessage'\n )\n );\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'sumerian_transparent_retina_logo',\n array(\n 'label' => esc_html__('Transparent Retina Logo', 'sumerian'),\n 'description' => esc_html__('Only apply when transparent header option is checked.', 'sumerian'),\n 'section' => 'sumerian_header_settings',\n )\n )\n );\n\n $wp_customize->add_setting( 'sumerian_transparent_site_title_c',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => ''\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'sumerian_transparent_site_title_c',\n array(\n 'label' => esc_html__( 'Transparent Site Title Color', 'sumerian' ),\n 'section' => 'sumerian_header_settings',\n 'description' => '',\n )\n ));\n\n $wp_customize->add_setting( 'sumerian_transparent_tag_title_c',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => ''\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'sumerian_transparent_tag_title_c',\n array(\n 'label' => esc_html__( 'Transparent Tagline Color', 'sumerian' ),\n 'section' => 'sumerian_header_settings',\n 'description' => '',\n )\n ));\n\n\n /* Navigation Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section( 'sumerian_nav' ,\n array(\n 'priority' => null,\n 'title' => esc_html__( 'Navigation', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_options',\n )\n );\n $wp_customize->add_setting( 'sumerian_menu_item_padding',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_menu_item_padding',\n array(\n 'label' => esc_html__('Menu Item Padding', 'sumerian'),\n 'description' => esc_html__('Padding left and right for Navigation items (pixels).', 'sumerian'),\n 'section' => 'sumerian_nav',\n )\n );\n\n /* Page Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section( 'sumerian_page' ,\n array(\n 'priority' => null,\n 'title' => esc_html__( 'Page Title Area', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_options',\n )\n );\n\n // Disable the page title bar\n $wp_customize->add_setting( 'sumerian_page_title_bar_disable',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'sumerian_page_title_bar_disable',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Disable Page Title bar?', 'sumerian'),\n 'section' => 'sumerian_page',\n 'description' => esc_html__('Check this box to disable the page title bar on all pages.', 'sumerian')\n )\n );\n\n $wp_customize->add_setting( 'sumerian_page_cover_pd_top',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_page_cover_pd_top',\n array(\n 'label' => esc_html__('Padding Top', 'sumerian'),\n 'description' => esc_html__('The page cover padding top in percent (%).', 'sumerian'),\n 'section' => 'sumerian_page',\n )\n );\n\n $wp_customize->add_setting( 'sumerian_page_cover_pd_bottom',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_page_cover_pd_bottom',\n array(\n 'label' => esc_html__('Padding Bottom', 'sumerian'),\n 'description' => esc_html__('The page cover padding bottom in percent (%).', 'sumerian'),\n 'section' => 'sumerian_page',\n )\n );\n\n $wp_customize->add_setting( 'sumerian_page_cover_color',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_color_alpha',\n 'default' => null,\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( new sumerian_Alpha_Color_Control(\n $wp_customize,\n 'sumerian_page_cover_color',\n array(\n 'label' \t\t=> esc_html__('Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_page',\n )\n )\n );\n\n // Overlay color\n $wp_customize->add_setting( 'sumerian_page_cover_overlay',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_color_alpha',\n 'default' => 'rgba(0,0,0,.3)',\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( new sumerian_Alpha_Color_Control(\n $wp_customize,\n 'sumerian_page_cover_overlay',\n array(\n 'label' \t\t=> esc_html__('Background Overlay Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_page',\n )\n )\n );\n\n $wp_customize->add_setting( 'sumerian_page_cover_align',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'center',\n 'transport' => 'postMessage'\n )\n );\n $wp_customize->add_control( 'sumerian_page_cover_align',\n array(\n 'label' => esc_html__('Content Align', 'sumerian'),\n 'section' => 'sumerian_page',\n 'type' => 'select',\n 'choices' => array(\n 'center' => esc_html__('Center', 'sumerian'),\n 'left' => esc_html__('Left', 'sumerian'),\n 'right' => esc_html__('Right', 'sumerian'),\n ),\n )\n );\n\n\n\n\n /* Single Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section( 'sumerian_single' ,\n array(\n 'priority' => null,\n 'title' => esc_html__( 'Single Post', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_options',\n )\n );\n\n $wp_customize->add_setting( 'single_thumbnail',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'single_thumbnail',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Show single post thumbnail', 'sumerian'),\n 'section' => 'sumerian_single',\n 'description' => esc_html__('Check this box to show post thumbnail on single post.', 'sumerian')\n )\n );\n\n $wp_customize->add_setting( 'single_meta',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '1',\n )\n );\n $wp_customize->add_control( 'single_meta',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Show single post meta', 'sumerian'),\n 'section' => 'sumerian_single',\n 'description' => esc_html__('Check this box to show single post meta such as post date, author, category,...', 'sumerian')\n )\n );\n\n $wp_customize->add_setting( 'single_thumbnail',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'single_thumbnail',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Show single post thumbnail', 'sumerian'),\n 'section' => 'sumerian_single',\n 'description' => esc_html__('Check this box to show featured image on single post.', 'sumerian')\n )\n );\n\n\t\t/* Footer top Social Settings\n\t\t----------------------------------------------------------------------*/\n\t\t$wp_customize->add_section( 'onepres_footer_top' ,\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Footer Socials', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_options',\n\t\t\t)\n\t\t);\n\n\t\t\t// Disable Social\n\t\t\t$wp_customize->add_setting( 'sumerian_social_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '1',\n 'transport' => 'postMessage',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_social_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Hide Footer Social?', 'sumerian'),\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'description' => esc_html__('Check this box to hide footer social section.', 'sumerian')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_setting( 'sumerian_social_footer_guide',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( new sumerian_Misc_Control( $wp_customize, 'sumerian_social_footer_guide',\n\t\t\t\tarray(\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'type' => 'custom_message',\n\t\t\t\t\t'description' => esc_html__( 'These social profiles setting below will display at the footer of your site.', 'sumerian' )\n\t\t\t\t)\n\t\t\t));\n\n\t\t\t// Footer Social Title\n\t\t\t$wp_customize->add_setting( 'sumerian_social_footer_title',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'default' => esc_html__( 'Keep Updated', 'sumerian' ),\n\t\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_social_footer_title',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Social Footer Title', 'sumerian'),\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'description' => ''\n\t\t\t\t)\n\t\t\t);\n\n // Socials\n $wp_customize->add_setting(\n 'sumerian_social_profiles',\n array(\n //'default' => '',\n 'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n 'transport' => 'postMessage', // refresh or postMessage\n ) );\n\n $wp_customize->add_control(\n new sumerian_Customize_Repeatable_Control(\n $wp_customize,\n 'sumerian_social_profiles',\n array(\n 'label' \t\t=> esc_html__('Socials', 'sumerian'),\n 'description' => '',\n 'section' => 'onepres_footer_top',\n 'live_title_id' => 'network', // apply for unput text and textarea only\n 'title_format' => esc_html__('[live_title]', 'sumerian'), // [live_title]\n 'max_item' => 5, // Maximum item can add\n 'limited_msg' \t=> wp_kses_post( __( 'Upgrade to <a target=\"_blank\" href=\"https://www.famethemes.com/plugins/sumerian-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=sumerian_customizer#get-started\">sumerian Plus</a> to be able to add more items and unlock other premium features!', 'sumerian' ) ),\n 'fields' => array(\n 'network' => array(\n 'title' => esc_html__('Social network', 'sumerian'),\n 'type' =>'text',\n ),\n 'icon' => array(\n 'title' => esc_html__('Icon', 'sumerian'),\n 'type' =>'icon',\n ),\n 'link' => array(\n 'title' => esc_html__('URL', 'sumerian'),\n 'type' =>'text',\n ),\n ),\n\n )\n )\n );\n\n\n\t\t/* Newsletter Settings\n\t\t----------------------------------------------------------------------*/\n\n\t\t\t// Disable Newsletter\n\t\t\t$wp_customize->add_setting( 'sumerian_newsletter_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '1',\n 'transport' => 'postMessage',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_newsletter_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Hide Footer Newsletter?', 'sumerian'),\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'description' => esc_html__('Check this box to hide footer newsletter form.', 'sumerian')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Mailchimp Form Title\n\t\t\t$wp_customize->add_setting( 'sumerian_newsletter_title',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'default' => esc_html__( 'Join our Newsletter', 'sumerian' ),\n 'transport' => 'postMessage', // refresh or postMessage\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_newsletter_title',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Newsletter Form Title', 'sumerian'),\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'description' => ''\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Mailchimp action url\n\t\t\t$wp_customize->add_setting( 'sumerian_newsletter_mailchimp',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t\t\t'default' => '',\n 'transport' => 'postMessage', // refresh or postMessage\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_newsletter_mailchimp',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('MailChimp Action URL', 'sumerian'),\n\t\t\t\t\t'section' => 'onepres_footer_top',\n\t\t\t\t\t'description' => __( 'The newsletter form use MailChimp, please follow <a target=\"_blank\" href=\"http://goo.gl/uRVIst\">this guide</a> to know how to get MailChimp Action URL. Example <i>//famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&amp;id=83187e0006</i>', 'sumerian' )\n\t\t\t\t)\n\t\t\t);\n\n // Footer BG Color\n $wp_customize->add_setting( 'sumerian_footer_bg', array(\n 'sanitize_callback' => 'sanitize_hex_color_no_hash',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n 'default' => '',\n 'transport' => 'postMessage'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_bg',\n array(\n 'label' => esc_html__( 'Background', 'sumerian' ),\n 'section' => 'onepres_footer_top',\n 'description' => '',\n )\n ));\n\n\n $wp_customize->add_setting( 'sumerian_footer_top_color', array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n 'transport' => 'postMessage'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_top_color',\n array(\n 'label' => esc_html__( 'Text Color', 'sumerian' ),\n 'section' => 'onepres_footer_top',\n 'description' => '',\n )\n ));\n\n\n\n\n\n /* Footer Widgets Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section( 'sumerian_footer' ,\n array(\n 'priority' => null,\n 'title' => esc_html__( 'Footer Widgets', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_options',\n )\n );\n\n $wp_customize->add_setting( 'footer_layout',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '',\n 'transport' => 'postMessage',\n )\n );\n\n $wp_customize->add_control( 'footer_layout',\n array(\n 'type' => 'select',\n 'label' => esc_html__('Layout', 'sumerian'),\n 'section' => 'sumerian_footer',\n 'default' => '0',\n 'description' => esc_html__('Number footer columns to display.', 'sumerian'),\n 'choices' => array(\n '4' => 4,\n '3' => 3,\n '2' => 2,\n '1' => 1,\n '0' => esc_html__('Disable footer widgets', 'sumerian'),\n )\n )\n );\n\n for ( $i = 1; $i<=4; $i ++ ) {\n $df = 12;\n if ( $i > 1 ) {\n $_n = 12/$i;\n $df = array();\n for ( $j = 0; $j < $i; $j++ ) {\n $df[ $j ] = $_n;\n }\n $df = join( '+', $df );\n }\n $wp_customize->add_setting('footer_custom_'.$i.'_columns',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $df,\n 'transport' => 'postMessage',\n )\n );\n $wp_customize->add_control('footer_custom_'.$i.'_columns',\n array(\n 'label' => $i == 1 ? __('Custom footer 1 column width', 'sumerian') : sprintf( __('Custom footer %s columns width', 'sumerian'), $i ),\n 'section' => 'sumerian_footer',\n 'description' => esc_html__('Enter int numbers and sum of them must smaller or equal 12, separated by \"+\"', 'sumerian'),\n )\n );\n }\n\n // sumerian_sanitize_color_alpha\n $wp_customize->add_setting( 'footer_widgets_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'footer_widgets_color',\n array(\n 'label' \t\t=> esc_html__('Text Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_footer',\n )\n )\n );\n\n $wp_customize->add_setting( 'footer_widgets_bg_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'footer_widgets_bg_color',\n array(\n 'label' \t\t=> esc_html__('Background Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_footer',\n )\n )\n );\n\n // Footer Heading color\n $wp_customize->add_setting( 'footer_widgets_title_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'footer_widgets_title_color',\n array(\n 'label' \t\t=> esc_html__('Widget Title Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_footer',\n )\n )\n );\n\n\n $wp_customize->add_setting( 'footer_widgets_link_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'footer_widgets_link_color',\n array(\n 'label' \t\t=> esc_html__('Link Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_footer',\n )\n )\n );\n\n $wp_customize->add_setting( 'footer_widgets_link_hover_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'footer_widgets_link_hover_color',\n array(\n 'label' \t\t=> esc_html__('Link Hover Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_footer',\n )\n )\n );\n\n\n\n /* Footer Copyright Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section( 'sumerian_footer_copyright' ,\n array(\n 'priority' => null,\n 'title' => esc_html__( 'Footer Copyright', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_options',\n )\n );\n\n // Footer Widgets Color\n $wp_customize->add_setting( 'sumerian_footer_info_bg', array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n 'default' => '',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_info_bg',\n array(\n 'label' => esc_html__( 'Background', 'sumerian' ),\n 'section' => 'sumerian_footer_copyright',\n 'description' => '',\n )\n ));\n\n // Footer Widgets Color\n $wp_customize->add_setting( 'sumerian_footer_c_color', array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n 'default' => '',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_c_color',\n array(\n 'label' => esc_html__( 'Text Color', 'sumerian' ),\n 'section' => 'sumerian_footer_copyright',\n 'description' => '',\n )\n ));\n\n $wp_customize->add_setting( 'sumerian_footer_c_link_color', array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n 'default' => '',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_c_link_color',\n array(\n 'label' => esc_html__( 'Link Color', 'sumerian' ),\n 'section' => 'sumerian_footer_copyright',\n 'description' => '',\n )\n ));\n\n $wp_customize->add_setting( 'sumerian_footer_c_link_hover_color', array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'sanitize_js_callback' => 'maybe_hash_hex_color',\n 'default' => '',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sumerian_footer_c_link_hover_color',\n array(\n 'label' => esc_html__( 'Link Hover Color', 'sumerian' ),\n 'section' => 'sumerian_footer_copyright',\n 'description' => '',\n )\n ));\n\n\n if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7.\n\n /* Custom CSS Settings\n ----------------------------------------------------------------------*/\n $wp_customize->add_section(\n 'sumerian_custom_code',\n array(\n 'title' => __('Custom CSS', 'sumerian'),\n 'panel' => 'sumerian_options',\n )\n );\n\n\n $wp_customize->add_setting(\n 'sumerian_custom_css',\n array(\n 'default' => '',\n 'sanitize_callback' => 'sumerian_sanitize_css',\n 'type' => 'option',\n )\n );\n\n $wp_customize->add_control(\n 'sumerian_custom_css',\n array(\n 'label' => __('Custom CSS', 'sumerian'),\n 'section' => 'sumerian_custom_code',\n 'type' => 'textarea'\n )\n );\n } else {\n $wp_customize->get_section( 'custom_css' )->priority = 994;\n }\n\n\n\t/*------------------------------------------------------------------------*/\n /* Section: Hero\n /*------------------------------------------------------------------------*/\n\n\t$wp_customize->add_panel( 'sumerian_hero_panel' ,\n\t\tarray(\n\t\t\t'priority' => 130,\n\t\t\t'title' => esc_html__( 'Section: Hero', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n\t\t// Hero settings\n\t\t$wp_customize->add_section( 'sumerian_hero_settings' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 3,\n\t\t\t\t'title' => esc_html__( 'Hero Settings', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_hero_panel',\n\t\t\t)\n\t\t);\n\n\t\t\t// Show section\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_disable',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_hero_settings',\n\t\t\t\t\t'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t\t\t)\n\t\t\t);\n\t\t\t// Section ID\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_id',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t'default' => esc_html__('hero', 'sumerian'),\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_id',\n\t\t\t\tarray(\n\t\t\t\t\t'label' \t\t=> esc_html__('Section ID:', 'sumerian'),\n\t\t\t\t\t'section' \t\t=> 'sumerian_hero_settings',\n\t\t\t\t\t'description' => esc_html__( 'The section id, we will use this for link anchor.', 'sumerian' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Show hero full screen\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_fullscreen',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t\t'default' => '',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_fullscreen',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => esc_html__('Make hero section full screen', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_hero_settings',\n\t\t\t\t\t'description' => esc_html__('Check this box to make hero section full screen.', 'sumerian'),\n\t\t\t\t)\n\t\t\t);\n\n // Show hero full screen\n $wp_customize->add_setting( 'sumerian_hero_disable_preload',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'sumerian_hero_disable_preload',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Disable Preload Icon', 'sumerian'),\n 'section' => 'sumerian_hero_settings',\n )\n );\n\n\t\t\t// Hero content padding top\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_pdtop',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t'default' => esc_html__('10', 'sumerian'),\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_pdtop',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Padding Top:', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_hero_settings',\n\t\t\t\t\t'description' => esc_html__( 'The hero content padding top in percent (%).', 'sumerian' ),\n\t\t\t\t\t'active_callback' => 'sumerian_hero_fullscreen_callback'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Hero content padding bottom\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_pdbotom',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t'default' => esc_html__('10', 'sumerian'),\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_pdbotom',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Padding Bottom:', 'sumerian'),\n\t\t\t\t\t'section' => 'sumerian_hero_settings',\n\t\t\t\t\t'description' => esc_html__( 'The hero content padding bottom in percent (%).', 'sumerian' ),\n\t\t\t\t\t'active_callback' => 'sumerian_hero_fullscreen_callback'\n\t\t\t\t)\n\t\t\t);\n\n\n /* Hero options\n ----------------------------------------------------------------------*/\n\n $wp_customize->add_setting(\n 'sumerian_hero_option_animation',\n array(\n 'default' => 'flipInX',\n 'sanitize_callback' => 'sanitize_text_field',\n )\n );\n\n /**\n * @see https://github.com/daneden/animate.css\n */\n\n $animations_css = 'bounce flash pulse rubberBand shake headShake swing tada wobble jello bounceIn bounceInDown bounceInLeft bounceInRight bounceInUp bounceOut bounceOutDown bounceOutLeft bounceOutRight bounceOutUp fadeIn fadeInDown fadeInDownBig fadeInLeft fadeInLeftBig fadeInRight fadeInRightBig fadeInUp fadeInUpBig fadeOut fadeOutDown fadeOutDownBig fadeOutLeft fadeOutLeftBig fadeOutRight fadeOutRightBig fadeOutUp fadeOutUpBig flipInX flipInY flipOutX flipOutY lightSpeedIn lightSpeedOut rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight hinge rollIn rollOut zoomIn zoomInDown zoomInLeft zoomInRight zoomInUp zoomOut zoomOutDown zoomOutLeft zoomOutRight zoomOutUp slideInDown slideInLeft slideInRight slideInUp slideOutDown slideOutLeft slideOutRight slideOutUp';\n\n $animations_css = explode( ' ', $animations_css );\n $animations = array();\n foreach ( $animations_css as $v ) {\n $v = trim( $v );\n if ( $v ){\n $animations[ $v ]= $v;\n }\n\n }\n\n $wp_customize->add_control(\n 'sumerian_hero_option_animation',\n array(\n 'label' => __( 'Text animation', 'sumerian' ),\n 'section' => 'sumerian_hero_settings',\n 'type' => 'select',\n 'choices' => $animations,\n )\n );\n\n\n $wp_customize->add_setting(\n 'sumerian_hero_option_speed',\n array(\n 'default' => '5000',\n 'sanitize_callback' => 'sanitize_text_field',\n )\n );\n\n $wp_customize->add_control(\n 'sumerian_hero_option_speed',\n array(\n 'label' => __( 'Text animation speed', 'sumerian' ),\n 'description' => esc_html__( 'The delay between the changing of each phrase in milliseconds.', 'sumerian' ),\n 'section' => 'sumerian_hero_settings',\n )\n );\n\n\n $wp_customize->add_setting(\n 'sumerian_hero_slider_fade',\n array(\n 'default' => '750',\n 'sanitize_callback' => 'sanitize_text_field',\n )\n );\n\n $wp_customize->add_control(\n 'sumerian_hero_slider_fade',\n array(\n 'label' => __( 'Slider animation speed', 'sumerian' ),\n 'description' => esc_html__( 'This is the speed at which the image will fade in. Integers in milliseconds are accepted.', 'sumerian' ),\n 'section' => 'sumerian_hero_settings',\n )\n );\n\n $wp_customize->add_setting(\n 'sumerian_hero_slider_duration',\n array(\n 'default' => '5000',\n 'sanitize_callback' => 'sanitize_text_field',\n )\n );\n\n $wp_customize->add_control(\n 'sumerian_hero_slider_duration',\n array(\n 'label' => __( 'Slider duration speed', 'sumerian' ),\n 'description' => esc_html__( 'The amount of time in between slides, expressed as the number of milliseconds.', 'sumerian' ),\n 'section' => 'sumerian_hero_settings',\n )\n );\n\n\n\n\t\t$wp_customize->add_section( 'sumerian_hero_images' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 6,\n\t\t\t\t'title' => esc_html__( 'Hero Background Media', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_hero_panel',\n\t\t\t)\n\t\t);\n\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t'sumerian_hero_images',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n\t\t\t\t\t'transport' => 'refresh', // refresh or postMessage\n\t\t\t\t\t'default' => json_encode( array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'image'=> array(\n\t\t\t\t\t\t\t\t'url' => get_template_directory_uri().'/assets/images/hero5.jpg',\n\t\t\t\t\t\t\t\t'id' => ''\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\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew sumerian_Customize_Repeatable_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hero_images',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => esc_html__('Background Images', 'sumerian'),\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t'priority' => 40,\n\t\t\t\t\t\t'section' => 'sumerian_hero_images',\n\t\t\t\t\t\t'title_format' => esc_html__( 'Background', 'sumerian'), // [live_title]\n\t\t\t\t\t\t'max_item' => 2, // Maximum item can add\n\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Background Image', 'sumerian'),\n\t\t\t\t\t\t\t\t'type' =>'media',\n\t\t\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t\t\t'url' => get_template_directory_uri().'/assets/images/hero5.jpg',\n\t\t\t\t\t\t\t\t\t'id' => ''\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t),\n\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Overlay color\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_overlay_color',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_color_alpha',\n\t\t\t\t\t'default' => 'rgba(0,0,0,.3)',\n\t\t\t\t\t//'transport' => 'refresh', // refresh or postMessage\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( new sumerian_Alpha_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hero_overlay_color',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Background Overlay Color', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_images',\n\t\t\t\t\t\t'priority' => 130,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\n // Parallax\n $wp_customize->add_setting( 'sumerian_hero_parallax',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => 0,\n 'transport' => 'refresh', // refresh or postMessage\n )\n );\n $wp_customize->add_control(\n 'sumerian_hero_parallax',\n array(\n 'label' \t\t=> esc_html__('Enable parallax effect (apply for first BG image only)', 'sumerian'),\n 'section' \t\t=> 'sumerian_hero_images',\n 'type' \t\t => 'checkbox',\n 'priority' => 50,\n 'description' => '',\n )\n );\n\n\t\t\t// Background Video\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_videobackground_upsell',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( new sumerian_Misc_Control( $wp_customize, 'sumerian_hero_videobackground_upsell',\n\t\t\t\tarray(\n\t\t\t\t\t'section' => 'sumerian_hero_images',\n\t\t\t\t\t'type' => 'custom_message',\n\t\t\t\t\t'description' => wp_kses_post( __( 'Want to add <strong>background video</strong> for hero section? Upgrade to <a target=\"_blank\" href=\"https://www.famethemes.com/plugins/sumerian-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=sumerian_customizer#get-started\">sumerian Plus</a> version.', 'sumerian' ) ),\n\t\t\t\t\t'priority' => 131,\n\t\t\t\t)\n\t\t\t));\n\n\n\n\t\t$wp_customize->add_section( 'sumerian_hero_content_layout1' ,\n\t\t\tarray(\n\t\t\t\t'priority' => 9,\n\t\t\t\t'title' => esc_html__( 'Hero Content Layout', 'sumerian' ),\n\t\t\t\t'description' => '',\n\t\t\t\t'panel' => 'sumerian_hero_panel',\n\n\t\t\t)\n\t\t);\n\n\t\t\t// Hero Layout\n\t\t\t$wp_customize->add_setting( 'sumerian_hero_layout',\n\t\t\t\tarray(\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t'default' => '1',\n\t\t\t\t)\n\t\t\t);\n\t\t\t$wp_customize->add_control( 'sumerian_hero_layout',\n\t\t\t\tarray(\n\t\t\t\t\t'label' \t\t=> esc_html__('Display Layout', 'sumerian'),\n\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'1' => esc_html__('Layout 1', 'sumerian' ),\n\t\t\t\t\t\t'2' => esc_html__('Layout 2', 'sumerian' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t\t// For Hero layout ------------------------\n\n\t\t\t\t// Large Text\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_largetext',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'mod' \t\t\t\t=> 'html',\n\t\t\t\t\t\t'default' => wp_kses_post( __( 'A SOCIAL EMPLOYEE ENGAGEMENT PORTAL', 'sumerian') ),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hcl1_largetext',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Large Text', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n\t\t\t\t\t\t'description' => esc_html__('', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t));\n\n\n $wp_customize->add_setting( 'sumerian_hcl1_r_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => null,\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'sumerian_hcl1_r_color',\n array(\n 'label' \t\t=> esc_html__('Rotating Text Color', 'sumerian'),\n 'section' \t\t=> 'sumerian_hero_content_layout1'\n )\n )\n );\n $wp_customize->add_setting( 'sumerian_hcl1_r_bg_color',\n array(\n 'sanitize_callback' => 'sanitize_hex_color',\n 'default' => null,\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize,\n 'sumerian_hcl1_r_bg_color',\n array(\n 'label' \t\t=> esc_html__('Rotating Text Background', 'sumerian'),\n 'section' \t\t=> 'sumerian_hero_content_layout1'\n )\n )\n );\n\n\t\t\t\t// Small Text\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_smalltext',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'default'\t\t\t=> wp_kses_post('', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hcl1_smalltext',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Small Text', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n\t\t\t\t\t\t'mod' \t\t\t\t=> 'html',\n\t\t\t\t\t\t'description' => esc_html__('You can use text rotate slider in this textarea too.', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\t// Button #1 Text\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_btn1_text',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'default' => esc_html__('About Us', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( 'sumerian_hcl1_btn1_text',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Button #1 Text', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Button #1 Link\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_btn1_link',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t\t\t\t'default' => esc_url( home_url( '/' )).esc_html__('#about', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( 'sumerian_hcl1_btn1_link',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Button #1 Link', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1'\n\t\t\t\t\t)\n\t\t\t\t);\n // Button #1 Style\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_btn1_style',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'default' => 'btn-theme-primary',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( 'sumerian_hcl1_btn1_style',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Button #1 style', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n 'type' => 'select',\n 'choices' => array(\n 'btn-theme-primary' => esc_html__('Button Primary', 'sumerian'),\n 'btn-secondary-outline' => esc_html__('Button Secondary', 'sumerian'),\n 'btn-default' => esc_html__('Button', 'sumerian'),\n 'btn-primary' => esc_html__('Primary', 'sumerian'),\n 'btn-success' => esc_html__('Success', 'sumerian'),\n 'btn-info' => esc_html__('Info', 'sumerian'),\n 'btn-warning' => esc_html__('Warning', 'sumerian'),\n 'btn-danger' => esc_html__('Danger', 'sumerian'),\n )\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Button #2 Text\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_btn2_text',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'default' => esc_html__('Get Started', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( 'sumerian_hcl1_btn2_text',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Button #2 Text', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Button #2 Link\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl1_btn2_link',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t\t\t\t'default' => esc_url( home_url( '/' )).esc_html__('#contact', 'sumerian'),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( 'sumerian_hcl1_btn2_link',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Button #2 Link', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1'\n\t\t\t\t\t)\n\t\t\t\t);\n\n // Button #1 Style\n $wp_customize->add_setting( 'sumerian_hcl1_btn2_style',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => 'btn-secondary-outline',\n )\n );\n $wp_customize->add_control( 'sumerian_hcl1_btn2_style',\n array(\n 'label' \t\t=> esc_html__('Button #2 style', 'sumerian'),\n 'section' \t\t=> 'sumerian_hero_content_layout1',\n 'type' => 'select',\n 'choices' => array(\n 'btn-theme-primary' => esc_html__('Button Primary', 'sumerian'),\n 'btn-secondary-outline' => esc_html__('Button Secondary', 'sumerian'),\n 'btn-default' => esc_html__('Button', 'sumerian'),\n 'btn-primary' => esc_html__('Primary', 'sumerian'),\n 'btn-success' => esc_html__('Success', 'sumerian'),\n 'btn-info' => esc_html__('Info', 'sumerian'),\n 'btn-warning' => esc_html__('Warning', 'sumerian'),\n 'btn-danger' => esc_html__('Danger', 'sumerian'),\n )\n )\n );\n\n\n\t\t\t\t/* Layout 2 ---- */\n\n\t\t\t\t// Layout 22 content text\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl2_content',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'mod' \t\t\t\t=> 'html',\n\t\t\t\t\t\t'default' => wp_kses_post( '<h1>Business Website'.\"\\n\".'Made Simple.</h1>'.\"\\n\".'We provide creative solutions to clients around the world,'.\"\\n\".'creating things that get attention and meaningful.'.\"\\n\\n\".'<a class=\"btn btn-secondary-outline btn-lg\" href=\"#\">Get Started</a>' ),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hcl2_content',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Content Text', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\t// Layout 2 image\n\t\t\t\t$wp_customize->add_setting( 'sumerian_hcl2_image',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t\t\t'mod' \t\t\t\t=> 'html',\n\t\t\t\t\t\t'default' => get_template_directory_uri().'/assets/images/sumerian_responsive.png',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_hcl2_image',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('Image', 'sumerian'),\n\t\t\t\t\t\t'section' \t\t=> 'sumerian_hero_content_layout1',\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t)\n\t\t\t\t));\n\n\n\t\t\t// END For Hero layout ------------------------\n\n\t/*------------------------------------------------------------------------*/\n\t/* Section: Sales\n\t/*------------------------------------------------------------------------*/\n\t$wp_customize->add_panel( 'sumerian_sales' ,\n\t\tarray(\n\t\t\t'priority' => 180,\n\t\t\t'title' => esc_html__( 'Section: Sales', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n $wp_customize->add_section( 'sumerian_sales_settings' ,\n array(\n 'priority' => 3,\n 'title' => esc_html__( 'Section Settings', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_sales',\n )\n );\n\n // Show Content\n $wp_customize->add_setting( 'sumerian_sales_disable',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'sumerian_sales_disable',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Hide this section?', 'sumerian'),\n 'section' => 'sumerian_sales_settings',\n 'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n )\n );\n\n // Section ID\n $wp_customize->add_setting( 'sumerian_sales_id',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => 'sales',\n )\n );\n $wp_customize->add_control( 'sumerian_sales_id',\n array(\n 'label' \t\t=> esc_html__('Section ID:', 'sumerian'),\n 'section' \t\t=> 'sumerian_sales_settings',\n 'description' => esc_html__('The section id, we will use this for link anchor.', 'sumerian' )\n )\n );\n\n // Title\n $wp_customize->add_setting( 'sumerian_sales_title',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => '',\n )\n );\n\n $wp_customize->add_control( 'sumerian_sales_title',\n array(\n 'label' \t=> esc_html__('Section heading', 'sumerian'),\n 'section' \t\t=> 'sumerian_sales_settings',\n 'description' => '',\n )\n );\n\n\t\t// Content\n\n $wp_customize->add_setting( 'sumerian_sales_desc',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => '',\n )\n );\n\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n $wp_customize,\n 'sumerian_sales_desc',\n array(\n 'label' \t=> esc_html__('Section Content', 'sumerian'),\n 'section' \t\t=> 'sumerian_sales_settings',\n 'description' => '',\n )\n ));\n\n // Parallax image\n $wp_customize->add_setting( 'sumerian_sales_image',\n array(\n 'sanitize_callback' => 'esc_url_raw',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new WP_Customize_Image_Control(\n $wp_customize,\n 'sumerian_sales_image',\n array(\n 'label' \t\t=> esc_html__('Background image', 'sumerian'),\n 'section' \t\t=> 'sumerian_sales_settings',\n )\n ));\n\n\n\t/*------------------------------------------------------------------------*/\n\t/* Section: Clients\n /*------------------------------------------------------------------------*/\n\t$wp_customize->add_panel( 'sumerian_clients' ,\n\t\tarray(\n\t\t\t'priority' => 190,\n\t\t\t'title' => esc_html__( 'Section: Clients', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'sumerian_clients_settings' ,\n\t\tarray(\n\t\t\t'priority' => 3,\n\t\t\t'title' => esc_html__( 'Section Settings', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_clients',\n\t\t)\n\t);\n\n\t// Show Content\n\t$wp_customize->add_setting( 'sumerian_clients_disable',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t'default' => 1,\n\t\t)\n\t);\n\t$wp_customize->add_control( 'sumerian_clients_disable',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t\t'section' => 'sumerian_clients_settings',\n\t\t\t'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t)\n\t);\n\n\t// Section ID\n\t$wp_customize->add_setting( 'sumerian_clients_id',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t'default' => esc_html__('clients', 'sumerian'),\n\t\t)\n\t);\n\t$wp_customize->add_control( 'sumerian_clients_id',\n\t\tarray(\n\t\t\t'label' => esc_html__('Section ID:', 'sumerian'),\n\t\t\t'section' \t\t=> 'sumerian_clients_settings',\n\t\t\t'description' => esc_html__( 'The section id, we will use this for link anchor.', 'sumerian' )\n\t\t)\n\t);\n\n\t// Title\n\t$wp_customize->add_setting( 'sumerian_clients_title',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'default' => esc_html__('Gallery', 'sumerian'),\n\t\t)\n\t);\n\t$wp_customize->add_control( 'sumerian_clients_title',\n\t\tarray(\n\t\t\t'label' => esc_html__('Section Title', 'sumerian'),\n\t\t\t'section' \t\t=> 'sumerian_clients_settings',\n\t\t\t'description' => '',\n\t\t)\n\t);\n\n\t// Sub Title\n\t$wp_customize->add_setting( 'sumerian_clients_subtitle',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'default' => esc_html__('Section subtitle', 'sumerian'),\n\t\t)\n\t);\n\t$wp_customize->add_control( 'sumerian_clients_subtitle',\n\t\tarray(\n\t\t\t'label' => esc_html__('Section Subtitle', 'sumerian'),\n\t\t\t'section' \t\t=> 'sumerian_clients_settings',\n\t\t\t'description' => '',\n\t\t)\n\t);\n\n\t// Description\n\t$wp_customize->add_setting( 'sumerian_clients_desc',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t'default' => '',\n\t\t)\n\t);\n\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t$wp_customize,\n\t\t'sumerian_clients_desc',\n\t\tarray(\n\t\t\t'label' \t\t=> esc_html__('Section Description', 'sumerian'),\n\t\t\t'section' \t\t=> 'sumerian_clients_settings',\n\t\t\t'description' => '',\n\t\t)\n\t));\n\n\t$wp_customize->add_section( 'sumerian_clients_content' ,\n\t\tarray(\n\t\t\t'priority' => 6,\n\t\t\t'title' => esc_html__( 'Section Content', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_clients',\n\t\t)\n\t);\n\n\t// Features content\n\t$wp_customize->add_setting(\n\t\t\t'sumerian_clients_logos',\n\t\t\tarray(\n\t\t\t\t\t//'default' => '',\n\t\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n\t\t\t\t\t'transport' => 'refresh', // refresh or postMessage\n\t\t\t) );\n\n\t$wp_customize->add_control(\n\t\t\tnew sumerian_Customize_Repeatable_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_clients_logos',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'label' \t\t=> esc_html__('Features content', 'sumerian'),\n\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t'section' => 'sumerian_clients_content',\n\t\t\t\t\t\t\t'live_title_id' => 'title', // apply for unput text and textarea only\n\t\t\t\t\t\t\t'title_format' => esc_html__('[live_title]', 'sumerian'), // [live_title]\n\t\t\t\t\t\t\t'max_item' => 20, // Maximum item can add\n\t\t\t\t\t\t\t'limited_msg' \t=> wp_kses_post( __( 'Hola!', 'sumerian' ) ),\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'title1' => array(\n\t\t\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'sumerian'),\n\t\t\t\t\t\t\t\t\t\t'type' =>'text',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'logo1' => array(\n\t\t\t\t\t\t\t\t\t'title' => esc_html__('Logo 1', 'sumerian'),\n\t\t\t\t\t\t\t\t\t'type' =>'media',\n\t\t\t\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'image' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'title2' => array(\n\t\t\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'sumerian'),\n\t\t\t\t\t\t\t\t\t\t'type' =>'text',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'logo2' => array(\n\t\t\t\t\t\t\t\t\t'title' => esc_html__('Logo 2', 'sumerian'),\n\t\t\t\t\t\t\t\t\t'type' =>'media',\n\t\t\t\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'image' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t)\n\t);\n\n\t\t/*------------------------------------------------------------------------*/\n\t\t/* Section: Career\n\t\t/*------------------------------------------------------------------------*/\n\t\t$wp_customize->add_panel( 'sumerian_career' ,\n\t\t array(\n\t\t 'priority' => 180,\n\t\t 'title' => esc_html__( 'Section: Career', 'sumerian' ),\n\t\t 'description' => '',\n\t\t 'active_callback' => 'sumerian_showon_frontpage'\n\t\t )\n\t\t);\n\n\t\t $wp_customize->add_section( 'sumerian_career_settings' ,\n\t\t array(\n\t\t 'priority' => 3,\n\t\t 'title' => esc_html__( 'Section Settings', 'sumerian' ),\n\t\t 'description' => '',\n\t\t 'panel' => 'sumerian_career',\n\t\t )\n\t\t );\n\n\t\t // Show Content\n\t\t $wp_customize->add_setting( 'sumerian_career_disable',\n\t\t array(\n\t\t 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t 'default' => '',\n\t\t )\n\t\t );\n\t\t $wp_customize->add_control( 'sumerian_career_disable',\n\t\t array(\n\t\t 'type' => 'checkbox',\n\t\t 'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t 'section' => 'sumerian_career_settings',\n\t\t 'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t )\n\t\t );\n\n\t\t // Section ID\n\t\t $wp_customize->add_setting( 'sumerian_career_id',\n\t\t array(\n\t\t 'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t 'default' => 'career',\n\t\t )\n\t\t );\n\t\t $wp_customize->add_control( 'sumerian_career_id',\n\t\t array(\n\t\t 'label' \t\t=> esc_html__('Section ID:', 'sumerian'),\n\t\t 'section' \t\t=> 'sumerian_career_settings',\n\t\t 'description' => esc_html__('The section id, we will use this for link anchor.', 'sumerian' )\n\t\t )\n\t\t );\n\n\t\t // Title\n\t\t $wp_customize->add_setting( 'sumerian_career_title',\n\t\t array(\n\t\t 'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t 'default' => '',\n\t\t )\n\t\t );\n\n\t\t $wp_customize->add_control( 'sumerian_career_title',\n\t\t array(\n\t\t 'label' \t=> esc_html__('Section heading', 'sumerian'),\n\t\t 'section' \t\t=> 'sumerian_career_settings',\n\t\t 'description' => '',\n\t\t )\n\t\t );\n\n\t\t // Content\n\n\t\t $wp_customize->add_setting( 'sumerian_career_desc',\n\t\t array(\n\t\t 'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t 'default' => '',\n\t\t )\n\t\t );\n\t\t $wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t $wp_customize,\n\t\t 'sumerian_career_desc',\n\t\t array(\n\t\t 'label' \t=> esc_html__('Section Content', 'sumerian'),\n\t\t 'section' \t\t=> 'sumerian_career_settings',\n\t\t 'description' => '',\n\t\t )\n\t\t ));\n\n\t\t // Parallax image\n\t\t $wp_customize->add_setting( 'sumerian_career_image',\n\t\t array(\n\t\t 'sanitize_callback' => 'esc_url_raw',\n\t\t 'default' => '',\n\t\t )\n\t\t );\n\t\t $wp_customize->add_control( new WP_Customize_Image_Control(\n\t\t $wp_customize,\n\t\t 'sumerian_career_image',\n\t\t array(\n\t\t 'label' \t\t=> esc_html__('Background image', 'sumerian'),\n\t\t 'section' \t\t=> 'sumerian_career_settings',\n\t\t )\n\t\t ));\n\n\n\t/*------------------------------------------------------------------------*/\n /* Section: About\n /*------------------------------------------------------------------------*/\n $wp_customize->add_panel( 'sumerian_about' ,\n\t\tarray(\n\t\t\t'priority' => 160,\n\t\t\t'title' => esc_html__( 'Section: About', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'sumerian_about_settings' ,\n\t\tarray(\n\t\t\t'priority' => 3,\n\t\t\t'title' => esc_html__( 'Section Settings', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_about',\n\t\t)\n\t);\n\n\t\t// Show Content\n\t\t$wp_customize->add_setting( 'sumerian_about_disable',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_about_disable',\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t\t\t'section' => 'sumerian_about_settings',\n\t\t\t\t'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t\t)\n\t\t);\n\n\t\t// Section ID\n\t\t$wp_customize->add_setting( 'sumerian_about_id',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => esc_html__('about', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_about_id',\n\t\t\tarray(\n\t\t\t\t'label' \t\t=> esc_html__('Section ID:', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_about_settings',\n\t\t\t\t'description' => esc_html__( 'The section id, we will use this for link anchor.', 'sumerian' )\n\t\t\t)\n\t\t);\n\n\t\t// Title\n\t\t$wp_customize->add_setting( 'sumerian_about_title',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('About Us', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_about_title',\n\t\t\tarray(\n\t\t\t\t'label' \t\t=> esc_html__('Section Title', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_about_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t// Sub Title\n\t\t$wp_customize->add_setting( 'sumerian_about_subtitle',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('Section subtitle', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_about_subtitle',\n\t\t\tarray(\n\t\t\t\t'label' \t\t=> esc_html__('Section Subtitle', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_about_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t// Description\n\t\t$wp_customize->add_setting( 'sumerian_about_desc',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t$wp_customize,\n\t\t\t'sumerian_about_desc',\n\t\t\tarray(\n\t\t\t\t'label' \t\t=> esc_html__('Section Description', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_about_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\t\tif ( class_exists( 'sumerian_Plus' ) ) {\n // About column\n $wp_customize->add_setting('sumerian_about_layout',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 3,\n )\n );\n\n $wp_customize->add_control('sumerian_about_layout',\n array(\n 'label' => esc_html__('Layout Settings', 'sumerian'),\n 'section' => 'sumerian_about_settings',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n 4 => esc_html__('4 Columns', 'sumerian'),\n 3 => esc_html__('3 Columns', 'sumerian'),\n 2 => esc_html__('2 Columns', 'sumerian'),\n 1 => esc_html__('1 Column', 'sumerian'),\n ),\n )\n );\n }\n\n\n\n\t$wp_customize->add_section( 'sumerian_about_content' ,\n\t\tarray(\n\t\t\t'priority' => 6,\n\t\t\t'title' => esc_html__( 'Section Content', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_about',\n\t\t)\n\t);\n\n\t\t// Order & Stlying\n\t\t$wp_customize->add_setting(\n\t\t\t'sumerian_about_boxes',\n\t\t\tarray(\n\t\t\t\t//'default' => '',\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n\t\t\t\t'transport' => 'refresh', // refresh or postMessage\n\t\t\t) );\n\n\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew sumerian_Customize_Repeatable_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'sumerian_about_boxes',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' \t\t=> esc_html__('About content page', 'sumerian'),\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t'section' => 'sumerian_about_content',\n\t\t\t\t\t\t'live_title_id' => 'content_page', // apply for unput text and textarea only\n\t\t\t\t\t\t'title_format' => esc_html__('[live_title]', 'sumerian'), // [live_title]\n\t\t\t\t\t\t'max_item' => 3, // Maximum item can add\n 'limited_msg' \t=> wp_kses_post( __('Upgrade to <a target=\"_blank\" href=\"https://www.famethemes.com/plugins/sumerian-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=sumerian_customizer#get-started\">sumerian Plus</a> to be able to add more items and unlock other premium features!', 'sumerian' ) ),\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'content_page' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Select a page', 'sumerian'),\n\t\t\t\t\t\t\t\t'type' =>'select',\n\t\t\t\t\t\t\t\t'options' => $option_pages\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'hide_title' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Hide item title', 'sumerian'),\n\t\t\t\t\t\t\t\t'type' =>'checkbox',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'enable_link' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Link to single page', 'sumerian'),\n\t\t\t\t\t\t\t\t'type' =>'checkbox',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n // About content source\n $wp_customize->add_setting( 'sumerian_about_content_source',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'content',\n )\n );\n\n $wp_customize->add_control( 'sumerian_about_content_source',\n array(\n 'label' \t\t=> esc_html__('Item content source', 'sumerian'),\n 'section' \t\t=> 'sumerian_about_content',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n 'content' => esc_html__( 'Full Page Content', 'sumerian' ),\n 'excerpt' => esc_html__( 'Page Excerpt', 'sumerian' ),\n ),\n )\n );\n\n\n\n\n /*------------------------------------------------------------------------*/\n /* Section: Features\n /*------------------------------------------------------------------------*/\n $wp_customize->add_panel( 'sumerian_features' ,\n array(\n 'priority' => 150,\n 'title' => esc_html__( 'Section: Features', 'sumerian' ),\n 'description' => '',\n 'active_callback' => 'sumerian_showon_frontpage'\n )\n );\n\n $wp_customize->add_section( 'sumerian_features_settings' ,\n array(\n 'priority' => 3,\n 'title' => esc_html__( 'Section Settings', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_features',\n )\n );\n\n // Show Content\n $wp_customize->add_setting( 'sumerian_features_disable',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_checkbox',\n 'default' => '',\n )\n );\n $wp_customize->add_control( 'sumerian_features_disable',\n array(\n 'type' => 'checkbox',\n 'label' => esc_html__('Hide this section?', 'sumerian'),\n 'section' => 'sumerian_features_settings',\n 'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n )\n );\n\n // Section ID\n $wp_customize->add_setting( 'sumerian_features_id',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => esc_html__('features', 'sumerian'),\n )\n );\n $wp_customize->add_control( 'sumerian_features_id',\n array(\n 'label' \t\t=> esc_html__('Section ID:', 'sumerian'),\n 'section' \t\t=> 'sumerian_features_settings',\n 'description' => esc_html__( 'The section id, we will use this for link anchor.', 'sumerian' )\n )\n );\n\n // Title\n $wp_customize->add_setting( 'sumerian_features_title',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => esc_html__('Features', 'sumerian'),\n )\n );\n $wp_customize->add_control( 'sumerian_features_title',\n array(\n 'label' \t\t=> esc_html__('Section Title', 'sumerian'),\n 'section' \t\t=> 'sumerian_features_settings',\n 'description' => '',\n )\n );\n\n // Sub Title\n $wp_customize->add_setting( 'sumerian_features_subtitle',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => esc_html__('Section subtitle', 'sumerian'),\n )\n );\n $wp_customize->add_control( 'sumerian_features_subtitle',\n array(\n 'label' \t\t=> esc_html__('Section Subtitle', 'sumerian'),\n 'section' \t\t=> 'sumerian_features_settings',\n 'description' => '',\n )\n );\n\n // Description\n $wp_customize->add_setting( 'sumerian_features_desc',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new sumerian_Editor_Custom_Control(\n $wp_customize,\n 'sumerian_features_desc',\n array(\n 'label' \t\t=> esc_html__('Section Description', 'sumerian'),\n 'section' \t\t=> 'sumerian_features_settings',\n 'description' => '',\n )\n ));\n\n // Features layout\n $wp_customize->add_setting( 'sumerian_features_layout',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '3',\n )\n );\n\n $wp_customize->add_control( 'sumerian_features_layout',\n array(\n 'label' \t\t=> esc_html__('Features Layout Setting', 'sumerian'),\n 'section' \t\t=> 'sumerian_features_settings',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n '3' => esc_html__( '4 Columns', 'sumerian' ),\n '4' => esc_html__( '3 Columns', 'sumerian' ),\n '6' => esc_html__( '2 Columns', 'sumerian' ),\n ),\n )\n );\n\n\n $wp_customize->add_section( 'sumerian_features_content' ,\n array(\n 'priority' => 6,\n 'title' => esc_html__( 'Section Content', 'sumerian' ),\n 'description' => '',\n 'panel' => 'sumerian_features',\n )\n );\n\n // Features content\n $wp_customize->add_setting(\n 'sumerian_features_boxes',\n array(\n //'default' => '',\n 'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n 'transport' => 'refresh', // refresh or postMessage\n ) );\n\n $wp_customize->add_control(\n new sumerian_Customize_Repeatable_Control(\n $wp_customize,\n 'sumerian_features_boxes',\n array(\n 'label' \t\t=> esc_html__('Features content', 'sumerian'),\n 'description' => '',\n 'section' => 'sumerian_features_content',\n 'live_title_id' => 'title', // apply for unput text and textarea only\n 'title_format' => esc_html__('[live_title]', 'sumerian'), // [live_title]\n 'max_item' => 20, // Maximum item can add\n 'limited_msg' \t=> wp_kses_post( __( 'Hola!', 'sumerian' ) ),\n 'fields' => array(\n 'title' => array(\n 'title' => esc_html__('Title', 'sumerian'),\n 'type' =>'text',\n ),\n\t\t\t\t\t'icon_type' => array(\n\t\t\t\t\t\t'title' => esc_html__('Custom icon', 'sumerian'),\n\t\t\t\t\t\t'type' =>'select',\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'icon' => esc_html__('Icon', 'sumerian'),\n\t\t\t\t\t\t\t'image' => esc_html__('image', 'sumerian'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n 'icon' => array(\n 'title' => esc_html__('Icon', 'sumerian'),\n 'type' =>'icon',\n\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'icon' ),\n ),\n\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t'title' => esc_html__('Image', 'sumerian'),\n\t\t\t\t\t\t'type' =>'media',\n\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'image' ),\n\t\t\t\t\t),\n 'desc' => array(\n 'title' => esc_html__('Description', 'sumerian'),\n 'type' =>'editor',\n ),\n 'link' => array(\n 'title' => esc_html__('Custom Link', 'sumerian'),\n 'type' =>'text',\n ),\n ),\n\n )\n )\n );\n\n // About content source\n $wp_customize->add_setting( 'sumerian_about_content_source',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => 'content',\n )\n );\n\n $wp_customize->add_control( 'sumerian_about_content_source',\n array(\n 'label' \t\t=> esc_html__('Item content source', 'sumerian'),\n 'section' \t\t=> 'sumerian_about_content',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n 'content' => esc_html__( 'Full Page Content', 'sumerian' ),\n 'excerpt' => esc_html__( 'Page Excerpt', 'sumerian' ),\n ),\n )\n );\n\n\n /*------------------------------------------------------------------------*/\n /* Section: Services\n /*------------------------------------------------------------------------*/\n $wp_customize->add_panel( 'sumerian_services' ,\n\t\tarray(\n\t\t\t'priority' => 170,\n\t\t\t'title' => esc_html__( 'Section: Services', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'sumerian_service_settings' ,\n\t\tarray(\n\t\t\t'priority' => 3,\n\t\t\t'title' => esc_html__( 'Section Settings', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_services',\n\t\t)\n\t);\n\n\t\t// Show Content\n\t\t$wp_customize->add_setting( 'sumerian_services_disable',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_services_disable',\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t\t\t'section' => 'sumerian_service_settings',\n\t\t\t\t'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t\t)\n\t\t);\n\n\t\t// Section ID\n\t\t$wp_customize->add_setting( 'sumerian_services_id',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => esc_html__('services', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_services_id',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section ID:', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_service_settings',\n\t\t\t\t'description' => 'The section id, we will use this for link anchor.'\n\t\t\t)\n\t\t);\n\n\t\t// Title\n\t\t$wp_customize->add_setting( 'sumerian_services_title',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('Our Services', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_services_title',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section Title', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_service_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t// Sub Title\n\t\t$wp_customize->add_setting( 'sumerian_services_subtitle',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('Section subtitle', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_services_subtitle',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section Subtitle', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_service_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n // Description\n $wp_customize->add_setting( 'sumerian_services_desc',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new sumerian_Editor_Custom_Control(\n $wp_customize,\n 'sumerian_services_desc',\n array(\n 'label' \t\t=> esc_html__('Section Description', 'sumerian'),\n 'section' \t\t=> 'sumerian_service_settings',\n 'description' => '',\n )\n ));\n\n\n // Services layout\n $wp_customize->add_setting( 'sumerian_service_layout',\n array(\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => '6',\n )\n );\n\n $wp_customize->add_control( 'sumerian_service_layout',\n array(\n 'label' \t\t=> esc_html__('Services Layout Setting', 'sumerian'),\n 'section' \t\t=> 'sumerian_service_settings',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n '3' => esc_html__( '4 Columns', 'sumerian' ),\n '4' => esc_html__( '3 Columns', 'sumerian' ),\n '6' => esc_html__( '2 Columns', 'sumerian' ),\n '12' => esc_html__( '1 Column', 'sumerian' ),\n ),\n )\n );\n\n\n\t$wp_customize->add_section( 'sumerian_service_content' ,\n\t\tarray(\n\t\t\t'priority' => 6,\n\t\t\t'title' => esc_html__( 'Section Content', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_services',\n\t\t)\n\t);\n\n\t\t// Section service content.\n\t\t$wp_customize->add_setting(\n\t\t\t'sumerian_services',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_repeatable_data_field',\n\t\t\t\t'transport' => 'refresh', // refresh or postMessage\n\t\t\t) );\n\n\n\t\t$wp_customize->add_control(\n\t\t\tnew sumerian_Customize_Repeatable_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t'sumerian_services',\n\t\t\t\tarray(\n\t\t\t\t\t'label' \t=> esc_html__('Service content', 'sumerian'),\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'section' => 'sumerian_service_content',\n\t\t\t\t\t'live_title_id' => 'content_page', // apply for unput text and textarea only\n\t\t\t\t\t'title_format' => esc_html__('[live_title]', 'sumerian'), // [live_title]\n\t\t\t\t\t'max_item' => 4, // Maximum item can add,\n 'limited_msg' \t=> wp_kses_post( __('Upgrade to <a target=\"_blank\" href=\"https://www.famethemes.com/plugins/sumerian-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=sumerian_customizer#get-started\">sumerian Plus</a> to be able to add more items and unlock other premium features!', 'sumerian' ) ),\n 'fields' => array(\n\t\t\t\t\t\t'icon_type' => array(\n\t\t\t\t\t\t\t'title' => esc_html__('Custom icon', 'sumerian'),\n\t\t\t\t\t\t\t'type' =>'select',\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t'icon' => esc_html__('Icon', 'sumerian'),\n\t\t\t\t\t\t\t\t'image' => esc_html__('image', 'sumerian'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'icon' => array(\n\t\t\t\t\t\t\t'title' => esc_html__('Icon', 'sumerian'),\n\t\t\t\t\t\t\t'type' =>'icon',\n\t\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'icon' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t'title' => esc_html__('Image', 'sumerian'),\n\t\t\t\t\t\t\t'type' =>'media',\n\t\t\t\t\t\t\t'required' => array( 'icon_type', '=', 'image' ),\n\t\t\t\t\t\t),\n\n\t\t\t\t\t\t'content_page' => array(\n\t\t\t\t\t\t\t'title' => esc_html__('Select a page', 'sumerian'),\n\t\t\t\t\t\t\t'type' =>'select',\n\t\t\t\t\t\t\t'options' => $option_pages\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'enable_link' => array(\n\t\t\t\t\t\t\t'title' => esc_html__('Link to single page', 'sumerian'),\n\t\t\t\t\t\t\t'type' =>'checkbox',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\n // Services icon size\n $wp_customize->add_setting( 'sumerian_service_icon_size',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_select',\n 'default' => '5x',\n )\n );\n\n $wp_customize->add_control( 'sumerian_service_icon_size',\n array(\n 'label' \t\t=> esc_html__('Icon Size', 'sumerian'),\n 'section' \t\t=> 'sumerian_service_content',\n 'description' => '',\n 'type' => 'select',\n 'choices' => array(\n '5x' => esc_html__( '5x', 'sumerian' ),\n '4x' => esc_html__( '4x', 'sumerian' ),\n '3x' => esc_html__( '3x', 'sumerian' ),\n '2x' => esc_html__( '2x', 'sumerian' ),\n '1x' => esc_html__( '1x', 'sumerian' ),\n ),\n )\n );\n\n\t/*------------------------------------------------------------------------*/\n /* Section: Contact\n /*------------------------------------------------------------------------*/\n $wp_customize->add_panel( 'sumerian_contact' ,\n\t\tarray(\n\t\t\t'priority' => 270,\n\t\t\t'title' => esc_html__( 'Section: Contact', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'active_callback' => 'sumerian_showon_frontpage'\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'sumerian_contact_settings' ,\n\t\tarray(\n\t\t\t'priority' => 3,\n\t\t\t'title' => esc_html__( 'Section Settings', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_contact',\n\t\t)\n\t);\n\n\t\t// Show Content\n\t\t$wp_customize->add_setting( 'sumerian_contact_disable',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_checkbox',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_disable',\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => esc_html__('Hide this section?', 'sumerian'),\n\t\t\t\t'section' => 'sumerian_contact_settings',\n\t\t\t\t'description' => esc_html__('Check this box to hide this section.', 'sumerian'),\n\t\t\t)\n\t\t);\n\n\t\t// Section ID\n\t\t$wp_customize->add_setting( 'sumerian_contact_id',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => esc_html__('contact', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_id',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section ID:', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_settings',\n\t\t\t\t'description' => esc_html__( 'The section id, we will use this for link anchor.', 'sumerian' )\n\t\t\t)\n\t\t);\n\n\t\t// Title\n\t\t$wp_customize->add_setting( 'sumerian_contact_title',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('Get in touch', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_title',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section Title', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t// Sub Title\n\t\t$wp_customize->add_setting( 'sumerian_contact_subtitle',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('Section subtitle', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_subtitle',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Section Subtitle', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_settings',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n // Description\n $wp_customize->add_setting( 'sumerian_contact_desc',\n array(\n 'sanitize_callback' => 'sumerian_sanitize_text',\n 'default' => '',\n )\n );\n $wp_customize->add_control( new sumerian_Editor_Custom_Control(\n $wp_customize,\n 'sumerian_contact_desc',\n array(\n 'label' \t\t=> esc_html__('Section Description', 'sumerian'),\n 'section' \t\t=> 'sumerian_contact_settings',\n 'description' => '',\n )\n ));\n\n\n\t$wp_customize->add_section( 'sumerian_contact_content' ,\n\t\tarray(\n\t\t\t'priority' => 6,\n\t\t\t'title' => esc_html__( 'Section Content', 'sumerian' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'sumerian_contact',\n\t\t)\n\t);\n\n\n\t\t// Contact Text\n\t\t$wp_customize->add_setting( 'sumerian_contact_left_title',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('CORPORATE HEADQUARTER', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_left_title',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Left title', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_content',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_setting( 'sumerian_contact_left_text',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t$wp_customize,\n\t\t\t'sumerian_contact_left_text',\n\t\t\tarray(\n\t\t\t\t'label' \t=> esc_html__('Contact Text', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_content',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\t\t// hr\n\t\t$wp_customize->add_setting( 'sumerian_contact_text_hr', array( 'sanitize_callback' => 'sumerian_sanitize_text' ) );\n\t\t$wp_customize->add_control( new sumerian_Misc_Control( $wp_customize, 'sumerian_contact_text_hr',\n\t\t\tarray(\n\t\t\t\t'section' => 'sumerian_contact_content',\n\t\t\t\t'type' => 'hr'\n\t\t\t)\n\t\t));\n\n\t\t$wp_customize->add_setting( 'sumerian_contact_right_title',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'default' => esc_html__('GLOBAL DEVELOPMENT CENTRE', 'sumerian'),\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( 'sumerian_contact_right_title',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Right Title', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_content',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'sumerian_contact_right_text',\n\t\t\tarray(\n\t\t\t\t'sanitize_callback' => 'sumerian_sanitize_text',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control( new sumerian_Editor_Custom_Control(\n\t\t\t$wp_customize,\n\t\t\t'sumerian_contact_right_text',\n\t\t\tarray(\n\t\t\t\t'label' \t=> esc_html__('Contact Right Text', 'sumerian'),\n\t\t\t\t'section' \t\t=> 'sumerian_contact_content',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t));\n\n\t\tdo_action( 'sumerian_customize_after_register', $wp_customize );\n\n}", "title": "" }, { "docid": "f373c75f86beac5f140afee992fc6e18", "score": "0.6774065", "text": "function marsx_customize_register( $wp_customize ) {\n\n /**\n * Remove some things in the Customizer\n */\n $wp_customize->remove_section( 'oblique_theme_info' );\n $wp_customize->remove_setting( 'oblique_color_notice' );\n $wp_customize->remove_section( 'oblique_pro_featured' );\n $wp_customize->remove_section( 'oblique_view_pro' );\n $wp_customize->remove_control( 'oblique_color_notice' );\n \n /**\n * Modify other values in the Customizer\n */\n $wp_customize->get_setting( 'logo_size' )->default = '300';\n $wp_customize->get_control( 'logo_size' )->description = __( 'Max-width for the logo. Default 300px', 'marsx' );\n $wp_customize->get_control( 'logo_style' )->choices = array(\n\t\t\t\t'hide-title' => __( 'Only logo', 'marsx' ),\n\t\t\t\t'show-title' => __( 'Logo plus site title &amp; description', 'marsx' ),\n\t\t\t);\n $wp_customize->get_setting( 'branding_padding' )->default = '200';\n $wp_customize->get_control( 'branding_padding' )->description = __( 'Top &amp; bottom padding for the branding. Default: 200px', 'marsx' );\n $wp_customize->get_control( 'branding_padding_1024' )->description = __( 'Top &amp; bottom padding for the branding. Default: 100px', 'marsx' );\n $wp_customize->get_setting( 'body_font_name' )->default = 'Fira+Sans:400italic,700italic,400,700';\n $wp_customize->get_setting( 'body_font_family' )->default = '\\'Fira Sans\\', sans-serif';\n $wp_customize->get_setting( 'headings_font_name' )->default = 'Play';\n $wp_customize->get_setting( 'headings_font_family' )->default = '\\'Play\\', sans-serif';\n $wp_customize->get_setting( 'background_color' )->default = '#282828'; // #181c1f SpaceX background color\n $wp_customize->get_setting( 'primary_color' )->default = '#f7941d';\n \n /**\n * Perform some reorganization of default sections\n */\n $wp_customize->get_section( 'title_tagline' )->title = __( 'Site Title / Logo', 'marsx' );\n $wp_customize->get_section( 'static_front_page' )->title = __( 'Home Page Settings', 'marsx' );\n $wp_customize->get_section( 'static_front_page' )->active_callback = 'is_front_page';\n $wp_customize->get_section( 'static_front_page' )->priority = 12;\n $wp_customize->get_section( 'header_image' )->priority = 11;\n $wp_customize->get_section( 'title_tagline' )->priority = 10;\n \n /**\n * Add New stuff to the Customizer\n */\n // ___Front Page Options___//\n// $wp_customize->add_section( 'home_options',\n// array(\n// 'title' => __( 'Home Page options', 'marsx' ),\n// 'priority' => 150,\n// 'active_callback' => 'is_front_page',\n// ) );\n \n /**\n * Add a Featured Headline Area\n */\n $wp_customize->add_setting( 'home_headline',\n array(\n 'default' => __( 'We are MarsX.', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'home_headline', \n array(\n 'type' => 'text',\n 'section' => 'static_front_page',\n 'label' => __( 'Home headline', 'marsx' ),\n 'description' => __( 'Put a nice attention-grabbing headline here.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'home_headline_display',\n array(\n 'default' => false,\n 'sanitize_callback' => 'marsx_sanitize_checkbox',\n ) );\n \n $wp_customize->add_control( 'home_headline_display', \n array(\n 'type' => 'checkbox',\n 'section' => 'static_front_page',\n 'label' => __( 'Display Home page headline?', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'marsx_line' );\n $wp_customize->add_control( new MarsX_Misc_Control( $wp_customize, 'marsx_line' ), array(\n 'section' => 'static_front_page',\n 'type' => 'line',\n ) );\n \n /**\n * Icon Blocks Title + Description\n */\n $wp_customize->add_setting( 'icon_blocks_title',\n array(\n 'default' => __( 'What we do', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'icon_blocks_title', \n array(\n 'type' => 'text',\n 'section' => 'static_front_page',\n 'label' => __( 'Featured Blocks', 'marsx' ),\n 'description' => __( 'Configure a headline and description for this section.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'icon_blocks_desc',\n array(\n 'default' => __( 'Making everything better', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'icon_blocks_desc', \n array(\n 'type' => 'textarea',\n 'section' => 'static_front_page',\n ) );\n \n $wp_customize->add_setting( 'icon_blocks_display',\n array(\n 'default' => false,\n 'sanitize_callback' => 'marsx_sanitize_checkbox',\n ) );\n \n $wp_customize->add_control( 'icon_blocks_display', \n array(\n 'type' => 'checkbox',\n 'section' => 'static_front_page',\n 'label' => __( 'Display Featured Blocks?', 'marsx' ),\n ) );\n \n /**\n * Icon Sections (4)\n */\n $num_icon_sections = 4;\n \n $wp_customize->add_setting( 'icon_block_1_icon',\n array(\n 'default' => 'fa-space-shuttle',\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_setting( 'icon_block_2_icon',\n array(\n 'default' => 'fa-bolt',\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_setting( 'icon_block_3_icon',\n array(\n 'default' => 'fa-hand-spock-o',\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_setting( 'icon_block_4_icon',\n array(\n 'default' => 'fa-flag-checkered',\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n // Create a setting and control for each of the icon sections available in the theme.\n for ( $i = 1; $i < ( 1 + $num_icon_sections ); $i++ ) {\n $wp_customize->add_control( 'icon_block_' . $i . '_icon', \n array(\n /* Translators: %d is the icon block number */\n 'description' => sprintf( __( 'Define Icon Block %1$d.<br>For icons, input any <a href=\"%2$s\" target=\"_blank\">Font Awesome icon</a>.', 'marsx' ), $i, 'http://fontawesome.io/icons/' ),\n 'section' => 'static_front_page',\n 'type' => 'text',\n 'sanitize_callback' => 'marsx_sanitize_text'\n ) );\n \n $wp_customize->add_setting( 'icon_block_' . $i . '_content',\n array(\n 'default' => false,\n ) );\n \n $wp_customize->add_control( 'icon_block_' . $i . '_content', \n array(\n 'type' => 'dropdown-pages',\n 'section' => 'static_front_page',\n ) );\n }\n \n /**\n * Featured Pages Title + Description\n */\n $wp_customize->add_setting( 'featured_pages_title',\n array(\n 'default' => __( 'Features', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'featured_pages_title', \n array(\n 'type' => 'text',\n 'section' => 'static_front_page',\n 'label' => __( 'Featured Pages', 'marsx' ),\n 'description' => __( 'Configure a headline and description for this section.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'featured_pages_desc',\n array(\n 'default' => __( 'Check out what we\\'re doing', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'featured_pages_desc', \n array(\n 'type' => 'textarea',\n 'section' => 'static_front_page',\n ) );\n \n $wp_customize->add_setting( 'featured_pages_display',\n array(\n 'default' => false,\n 'sanitize_callback' => 'marsx_sanitize_checkbox',\n ) );\n \n $wp_customize->add_control( 'featured_pages_display', \n array(\n 'type' => 'checkbox',\n 'section' => 'static_front_page',\n 'label' => __( 'Display Featured Pages?', 'marsx' ),\n ) );\n \n// $wp_customize->add_setting(\n// 'featured_posts_category',\n// array(\n// 'default' => false,\n// )\n// );\n// $wp_customize->add_control( 'featured_posts_category', array(\n// 'type' => 'select',\n// 'choices' => array( 'Uncategorized', 'Other' ),\n// 'section' => 'home_options',\n// 'label' => __( 'Featured Post Category (optional)', 'marsx' ),\n// ) );\n \n /**\n * Featured Pages Areas (3)\n */\n $num_f_pages_sections = 3;\n \n // Create a setting and control for each of the featured page sections available in the theme.\n for ( $i = 1; $i < ( 1 + $num_f_pages_sections ); $i++ ) {\n $wp_customize->add_setting( 'featured_page_' . $i,\n array(\n 'default' => false,\n 'sanitize_callback' => 'absint',\n ) );\n \n $wp_customize->add_control( 'featured_page_' . $i, \n array(\n /* Translators: %d is the Featured Page number. */\n 'description' => sprintf( __( 'Select Featured Page %d.', 'marsx' ), $i ),\n 'type' => 'dropdown-pages',\n 'section' => 'static_front_page',\n ) );\n }\n \n /**\n * Add a Call To Action Area\n */\n $wp_customize->add_setting( 'cta_headline',\n array(\n 'default' => __( 'Change the world with us!', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'cta_headline', \n array(\n 'type' => 'text',\n 'section' => 'static_front_page',\n 'label' => __( 'Call to Action', 'marsx' ),\n 'description' => __( 'Put a nice attention-grabbing headline here.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'cta_button',\n array(\n 'default' => __( 'Join!', 'marsx' ),\n 'sanitize_callback' => 'marsx_sanitize_text',\n ) );\n \n $wp_customize->add_control( 'cta_button', \n array(\n 'type' => 'text',\n 'section' => 'static_front_page',\n 'description' => __( 'Call to Action button text.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'cta_button_dest',\n array(\n 'default' => false,\n ) );\n \n $wp_customize->add_control( 'cta_button_dest',\n array(\n 'type' => 'dropdown-pages',\n 'section' => 'static_front_page',\n 'description' => __( 'Select the Page for the Call to Action button to link to.', 'marsx' ),\n ) );\n \n $wp_customize->add_setting( 'cta_display',\n array(\n 'default' => false,\n 'sanitize_callback' => 'marsx_sanitize_checkbox',\n ) );\n \n $wp_customize->add_control( 'cta_display', \n array(\n 'type' => 'checkbox',\n 'section' => 'static_front_page',\n 'label' => __( 'Display Call to Action?', 'marsx' ),\n ) );\n\n}", "title": "" }, { "docid": "575e770dcd5808262e172ff9660835c2", "score": "0.67731726", "text": "function twentyfourteen_customize_register( $wp_customize ) {\n\t// Add postMessage support for site title and description.\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\n\t// Add the custom accent color setting and control.\n\t$wp_customize->add_setting( 'accent_color', array(\n\t\t'default' => '#24890d',\n\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t) );\n\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent_color', array(\n\t\t'label' => __( 'Accent Color', 'twentyfourteen' ),\n\t\t'section' => 'colors',\n\t\t'settings' => 'accent_color',\n\t) ) );\n\n\tadd_filter( 'theme_mod_accent_mid', 'twentyfourteen_accent_mid' );\n\tadd_filter( 'theme_mod_accent_light', 'twentyfourteen_accent_light' );\n\n\t// Add the featured content section.\n\t$wp_customize->add_section( 'featured_content', array(\n\t\t'title' => __( 'Featured Content', 'twentyfourteen' ),\n\t\t'priority' => 120,\n\t) );\n\n\t// Add the featured content layout setting and control.\n\t$wp_customize->add_setting( 'featured_content_layout', array(\n\t\t'default' => 'grid',\n\t\t'type' => 'theme_mod',\n\t\t'capability' => 'edit_theme_options',\n\t) );\n\n\t$wp_customize->add_control( 'featured_content_layout', array(\n\t\t'label' => __( 'Layout', 'twentyfourteen' ),\n\t\t'section' => 'featured_content',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\t'grid' => __( 'Grid', 'twentyfourteen' ),\n\t\t\t'slider' => __( 'Slider', 'twentyfourteen' ),\n\t\t),\n\t) );\n}", "title": "" }, { "docid": "cdf91d821e2c55d95b7b631052500687", "score": "0.6767511", "text": "function fullfoto_customize_register( $wp_customize ) {\t\r\n\r\n\r\n$wp_customize->add_section('fullfoto_social', array(\r\n\r\n\t\t'title' => __('Social Media Links', 'fullfoto'),\r\n\r\n\t\t'discription' => 'Link your Twitter and Facebook accounts'\r\n\r\n\t));\r\n$wp_customize->add_setting('twitter_link', array(\r\n\r\n\t\t'default' => '',\r\n\r\n\t));\r\n$wp_customize->add_setting('facebook_link', array(\r\n\r\n\t\t'default' => '',\r\n\r\n\t));\r\n\r\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'facebook_link', array(\r\n 'label' => __( 'Facebook Link', 'fb' ),\r\n 'section' => 'fullfoto_social',\r\n 'settings' => 'facebook_link',\r\n ) ) );\r\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'twitter_link', array(\r\n 'label' => __( 'Twitter Link', 'tw' ),\r\n 'section' => 'fullfoto_social',\r\n 'settings' => 'twitter_link',\r\n ) ) );\r\n\r\n$wp_customize->add_setting( 'm1_logo' ); // Add setting for logo uploader\r\n \r\n // Add control for logo uploader (actual uploader)\r\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'm1_logo', array(\r\n 'label' => __( 'Upload Logo (replaces text)', 'm1' ),\r\n 'section' => 'title_tagline',\r\n 'settings' => 'm1_logo',\r\n ) ) );\r\n\r\n\t$wp_customize->add_section('fullfoto_colors', array(\r\n\r\n\t\t'title' => __('Text Colors', 'fullfoto'),\r\n\r\n\t\t'discription' => 'Modify the theme colors'\r\n\r\n\t));\r\n\r\n\t\r\n\r\n\t$wp_customize->add_setting('link_color', array(\r\n\r\n\t\t'default' => '#4be1f2',\r\n\r\n\t));\r\n\r\n\t$wp_customize->add_setting('hover_color', array(\r\n\r\n\t\t'default' => '#34c5e2',\r\n\r\n\t));\r\n\r\n\t$wp_customize->add_setting('title_color', array(\r\n\r\n\t\t'default' => '#333',\r\n\r\n\t));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'title_color', array(\r\n\r\n\t\t'label' => __('Edit Page Title Color', 'fullfoto'),\r\n\r\n\t\t'section' => 'fullfoto_colors',\r\n\r\n\t\t'settings' => 'title_color'\r\n\r\n\t) ));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(\r\n\r\n\t\t'label' => __('Edit Link Color', 'fullfoto'),\r\n\r\n\t\t'section' => 'fullfoto_colors',\r\n\r\n\t\t'settings' => 'link_color'\r\n\r\n\t) ));\r\n\r\n\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'hover_color', array(\r\n\r\n\t\t'label' => __('Edit Hover Color', 'fullfoto'),\r\n\r\n\t\t'section' => 'fullfoto_colors',\r\n\r\n\t\t'settings' => 'hover_color'\r\n\r\n\t) ));\r\n\r\n}", "title": "" }, { "docid": "fc1f4532f765a3dbc51c3c7fc6132cd4", "score": "0.6766368", "text": "protected function _register_controls()\n {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => __('Content', 'webt'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'form_heading',\n [\n 'label' => __('Heading', 'webt'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [\n 'active' => true,\n ],\n 'placeholder' => __('Enter your title', 'webt'),\n 'default' => __('Order Review', 'webt'),\n ]\n );\n\n $this->end_controls_section();\n\n // Heading\n $this->start_controls_section(\n 'form_heading_style',\n array(\n 'label' => __('Heading', 'webt'),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'form_heading_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} #order_review_heading',\n )\n );\n\n $this->add_control(\n 'form_heading_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} #order_review_heading' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'form_heading_margin',\n [\n 'label' => __('Margin', 'webt'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} #order_review_heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'form_heading_align',\n [\n 'label' => __('Alignment', 'webt'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'left' => [\n 'title' => __('Left', 'webt'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('Center', 'webt'),\n 'icon' => 'fa fa-align-center',\n ],\n 'right' => [\n 'title' => __('Right', 'webt'),\n 'icon' => 'fa fa-align-right',\n ],\n 'justify' => [\n 'title' => __('Justified', 'webt'),\n 'icon' => 'fa fa-align-justify',\n ],\n ],\n 'default' => 'left',\n 'selectors' => [\n '{{WRAPPER}} #order_review_heading' => 'text-align: {{VALUE}}',\n ],\n ]\n );\n\n $this->end_controls_section();\n\n // Table Heading\n $this->start_controls_section(\n 'order_review_table_heading_style',\n array(\n 'label' => __('Table Heading', 'webt'),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'order_review_table_heading_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th',\n )\n );\n\n $this->add_control(\n 'order_review_table_heading_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'order_review_table_heading_border',\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th',\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_heading_padding',\n [\n 'label' => __('Padding', 'webt'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_heading_align',\n [\n 'label' => __('Alignment', 'webt'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'left' => [\n 'title' => __('Left', 'webt'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('Center', 'webt'),\n 'icon' => 'fa fa-align-center',\n ],\n 'right' => [\n 'title' => __('Right', 'webt'),\n 'icon' => 'fa fa-align-right',\n ],\n 'justify' => [\n 'title' => __('Justified', 'webt'),\n 'icon' => 'fa fa-align-justify',\n ],\n ],\n 'prefix_class' => 'elementor%s-align-',\n 'default' => 'left',\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th' => 'text-align: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_heading_width',\n [\n 'label' => __('Width', 'webt'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%'],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n 'step' => 5,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table thead th' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n\n );\n\n $this->end_controls_section();\n\n // Table Cell Heading\n $this->start_controls_section(\n 'order_review_table_cell_heading_style',\n array(\n 'label' => __('Table Cell Heading', 'webt'),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'order_review_table_cell_heading_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table th',\n )\n );\n\n $this->add_control(\n 'order_review_table_cell_heading_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table th' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'order_review_table_cell_heading_border',\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table th',\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_cell_heading_padding',\n [\n 'label' => __('Padding', 'webt'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_cell_heading_align',\n [\n 'label' => __('Alignment', 'webt'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'left' => [\n 'title' => __('Left', 'webt'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('Center', 'webt'),\n 'icon' => 'fa fa-align-center',\n ],\n 'right' => [\n 'title' => __('Right', 'webt'),\n 'icon' => 'fa fa-align-right',\n ],\n 'justify' => [\n 'title' => __('Justified', 'webt'),\n 'icon' => 'fa fa-align-justify',\n ],\n ],\n 'prefix_class' => 'elementor%s-align-',\n 'default' => 'left',\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table th' => 'text-align: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_cell_heading_width',\n [\n 'label' => __('Width', 'webt'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%'],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n 'step' => 5,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table th' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n\n );\n\n $this->end_controls_section();\n\n // Table Content\n $this->start_controls_section(\n 'order_review_table_content_style',\n array(\n 'label' => __('Table Content', 'webt'),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'order_review_table_content_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table td, {{WRAPPER}} .woocommerce-checkout-review-order-table td strong',\n )\n );\n\n $this->add_control(\n 'order_review_table_content_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td' => 'color: {{VALUE}}',\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td strong' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'order_review_table_content_border',\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table td',\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_content_padding',\n [\n 'label' => __('Padding', 'webt'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_content_align',\n [\n 'label' => __('Alignment', 'webt'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'left' => [\n 'title' => __('Left', 'webt'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('Center', 'webt'),\n 'icon' => 'fa fa-align-center',\n ],\n 'right' => [\n 'title' => __('Right', 'webt'),\n 'icon' => 'fa fa-align-right',\n ],\n 'justify' => [\n 'title' => __('Justified', 'webt'),\n 'icon' => 'fa fa-align-justify',\n ],\n ],\n 'prefix_class' => 'elementor%s-align-',\n 'default' => 'left',\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td' => 'text-align: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'order_review_table_content_width',\n [\n 'label' => __('Width', 'webt'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%'],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n 'step' => 5,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n\n );\n\n $this->end_controls_section();\n\n // Price\n $this->start_controls_section(\n 'order_review_table_price_style',\n array(\n 'label' => __('Price', 'webt'),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_control(\n 'order_review_table_price_heading',\n [\n 'label' => __('Price', 'webt'),\n 'type' => Controls_Manager::HEADING,\n 'separator' => 'after',\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'order_review_table_price_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table td.product-total',\n )\n );\n\n $this->add_control(\n 'order_review_table_price_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table td.product-total' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'order_review_table_totalprice_heading',\n [\n 'label' => __('Total Price', 'webt'),\n 'type' => Controls_Manager::HEADING,\n 'separator' => 'after',\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n array(\n 'name' => 'order_review_table_totalprice_typography',\n 'label' => __('Typography', 'webt'),\n 'selector' => '{{WRAPPER}} .woocommerce-checkout-review-order-table tr.cart-subtotal td .amount, {{WRAPPER}} .woocommerce-checkout-review-order-table tr.order-total td .amount',\n )\n );\n\n $this->add_control(\n 'order_review_table_totalprice_color',\n [\n 'label' => __('Color', 'webt'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .woocommerce-checkout-review-order-table tr.cart-subtotal td .amount' => 'color: {{VALUE}}',\n '{{WRAPPER}} .woocommerce-checkout-review-order-table tr.order-total td .amount' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->end_controls_section();\n }", "title": "" }, { "docid": "6f08ba649e406b49fd08b9b30ff4429d", "score": "0.6760471", "text": "function travel_agency_customizer_demo_content( $wp_customize ) {\r\n\t\r\n $wp_customize->add_section( \r\n 'theme_demo_content',\r\n array(\r\n 'title' => __( 'Demo Content Import', 'travel-agency' ),\r\n 'priority' => 7,\r\n\t\t)\r\n );\r\n \r\n $wp_customize->add_setting(\r\n\t\t'demo_content_instruction',\r\n\t\tarray(\r\n\t\t\t'sanitize_callback' => 'wp_kses_post'\r\n\t\t)\r\n\t);\r\n\r\n\t$demo_content_description = '<div class=\"customizer-custom\">';\r\n $demo_content_description .= '<span class=\"sticky_info_row\"><label class=\"row-element\">' . __( 'Demo Import Tutorial', 'travel-agency' ) . ': </label><a href=\"' . esc_url( 'https://rarathemes.com/blog/import-demo-content-rara-themes/' ) . '\" target=\"_blank\">' . __( 'here', 'travel-agency' ) . '</a></span>';\r\n\t$demo_content_description .= '</div>';\r\n \r\n\t$wp_customize->add_control(\r\n\t\tnew Travel_Agency_Info_Text( \r\n\t\t\t$wp_customize,\r\n\t\t\t'demo_content_instruction',\r\n\t\t\tarray(\r\n\t\t\t\t'label' => __( 'About Demo Import' , 'travel-agency' ),\r\n\t\t\t\t'section' => 'theme_demo_content',\r\n\t\t\t\t'description' => $demo_content_description\r\n\t\t\t)\r\n\t\t)\r\n\t);\r\n \r\n\t$theme_demo_content_desc = '<div class=\"customizer-custom\">';\r\n\r\n\tif( ! class_exists( 'RDDI_init' ) ){\r\n\t\t$theme_demo_content_desc .= '<span class=\"sticky_info_row\"><label class=\"row-element\">' . __( 'Plugin required', 'travel-agency' ) . ': </label><a href=\"' . esc_url( 'https://wordpress.org/plugins/rara-one-click-demo-import/' ) . '\" target=\"_blank\">' . __( 'Rara One Click Demo Import', 'travel-agency' ) . '</a></span><br />';\r\n\t}\r\n\r\n\t$theme_demo_content_desc .= '<span class=\"sticky_info_row download-link\"><label class=\"row-element\">' . __( 'Download Demo Content Zip File', 'travel-agency' ) . ': </label><a href=\"' . esc_url( 'https://rarathemes.com/documentation/travel-agency-documentation/' ) . '\" target=\"_blank\" rel=\"no-follow\">' . __( 'Click here', 'travel-agency' ) . '</a></span><br />';\r\n\r\n\t$theme_demo_content_desc .= '</div>';\r\n\t$wp_customize->add_setting( \r\n 'theme_demo_content_info',\r\n array(\r\n 'default' => '',\r\n 'sanitize_callback' => 'wp_kses_post',\r\n\t\t)\r\n );\r\n\r\n\t// Demo content \r\n\t$wp_customize->add_control( \r\n new Travel_Agency_Info_Text( \r\n $wp_customize,\r\n 'theme_demo_content_info',\r\n array(\r\n 'section' => 'theme_demo_content',\r\n 'description' => $theme_demo_content_desc\r\n \t\t)\r\n )\r\n );\r\n\r\n}", "title": "" }, { "docid": "cdb6628593eb2d16bbbb692e253a2943", "score": "0.67524356", "text": "function addthis_customize_form(&$form_state) {\n $form = array();\n $form['description'] = array(\n '#type' => 'markup',\n '#value' => t('<p>Use this form to define customized Toolbox items. You may override existing services codes or define new service codes.</p>') .\n t('<p>For more information, visit !url.</p>', array('!url' => l('http://www.addthis.com/help/client-api#rendering-decoration', 'http://www.addthis.com/help/client-api#rendering-decoration'))),\n );\n $definitions = variable_get('addthis_service_customizations', array());\n $form['addthis_service_customizations'] = array(\n '#tree' => TRUE,\n );\n foreach ($definitions AS $def) {\n $form['addthis_service_customizations'][] = _addthis_customize_form_row($def);\n }\n \n // Add a form row for entering a new definition.\n $form['addthis_service_customizations'][] = _addthis_customize_form_row();\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "3ac5ff6bb9c58bdf2ce36f7c908bd28f", "score": "0.67380184", "text": "function dh_customize_register( $wp_customize ) {\n $wp_customize->remove_section( 'colors' );\n $wp_customize->add_section( 'dh_custom_colours', array( 'title' => __( 'Custom Colours', 'dh' ) ) );\n $wp_customize->add_setting( 'dh_colour_scheme', array( 'default' => 1 ) );\n\n $choices = array();\n foreach ( dh_colour_schemes() as $index => $choice ) {\n $choices[$index] = $choice['label'];\n }\n $wp_customize->add_control( 'dh_colour_scheme', array(\n 'label' => __( 'Choose colour scheme', 'dh' ),\n 'section' => 'dh_custom_colours',\n 'type' => 'radio',\n 'choices' => $choices,\n ));\n\n $wp_customize->remove_control( 'display_header_text' );\n\n // Cleaning up the frontpage section\n $wp_customize->get_section( 'static_front_page' )->title = __( 'Front Page', 'dh' );\n $wp_customize->remove_control('page_for_posts');\n $wp_customize->remove_control('show_on_front');\n if ( get_option('show_on_front', FALSE) != 'page' ) {\n delete_option('show_on_front');\n add_option('show_on_front', 'page');\n }\n if ( get_option('page_for_posts', '') != 0 ) {\n delete_option('page_for_posts');\n add_option('page_for_posts', 0);\n }\n\n $wp_customize->add_section( 'dh_comment_form', array(\n 'title' => __( 'Comment Form', 'dh' ),\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_author_enabled' );\n $wp_customize->add_control( 'dh_comment_field_author_enabled', array(\n 'label' => __( 'Enable \"Name\" field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 10,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_author_required' );\n $wp_customize->add_control( 'dh_comment_field_author_required', array(\n 'label' => __( 'Require \"Name\" field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 11,\n 'description' => '<hr/>',\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_email_enabled' );\n $wp_customize->add_control( 'dh_comment_field_email_enabled', array(\n 'label' => __( 'Enable \"E-mail\" field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 12,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_email_required' );\n $wp_customize->add_control( 'dh_comment_field_email_required', array(\n 'label' => __( 'Require \"E-mail\" field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 13,\n 'description' => '<hr/>',\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_1_enabled' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_1_enabled', array(\n 'label' => __( 'Enable custom text field 1', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 14,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_1_label' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_1_label', array(\n 'label' => __( 'Label of custom text field 1', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'text',\n 'priority' => 14.5,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_1_required' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_1_required', array(\n 'label' => __( 'Require custom text field 1', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 15,\n 'description' => '<hr/>',\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_2_enabled' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_2_enabled', array(\n 'label' => __( 'Enable custom text field 2', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 16,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_2_label' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_2_label', array(\n 'label' => __( 'Label of custom text field 2', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'text',\n 'priority' => 16.5,\n ));\n\n $wp_customize->add_setting( 'dh_comment_field_custom_text_2_required' );\n $wp_customize->add_control( 'dh_comment_field_custom_text_2_required', array(\n 'label' => __( 'Require custom text field 2', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => 17,\n 'description' => '<hr/>',\n ));\n\n for ( $i = 1; $i <= 3; $i++ ) {\n $prefix = 'dh_comment_field_custom_dd_' . $i;\n\n $wp_customize->add_setting( $prefix . '_enabled' );\n $wp_customize->add_control( $prefix . '_enabled', array(\n 'label' => __( 'Enable custom drop-down list ' . $i . ' field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => $i * 20 + 1,\n ));\n\n $wp_customize->add_setting( $prefix . '_label' );\n $wp_customize->add_control( $prefix . '_label', array(\n 'label' => __( 'Label for custom drop-down list ' . $i . ' field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'text',\n 'priority' => $i * 20 + 2,\n ));\n\n $wp_customize->add_setting( $prefix . '_items' );\n $wp_customize->add_control( $prefix . '_items', array(\n 'label' => __( 'Options for custom drop-down list ' . $i . ' field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'textarea',\n 'priority' => $i * 20 + 3,\n ));\n\n $wp_customize->add_setting( $prefix . '_required' );\n $wp_customize->add_control( $prefix . '_required', array(\n 'label' => __( 'Require custom drop-down list ' . $i . ' field', 'dh' ),\n 'section' => 'dh_comment_form',\n 'type' => 'checkbox',\n 'priority' => $i * 20 + 4,\n 'description' => '<hr/>',\n ));\n }\n\n $wp_customize->add_section( 'dh_comment_form_closed', array(\n 'title' => __( 'Comments Closed', 'dh' ),\n ));\n\n $wp_customize->add_setting( 'dh_comment_closed_text');\n $wp_customize->add_control( 'dh_comment_closed_text', array(\n 'label' => __( 'Text when comments are closed', 'dh' ),\n 'section' => 'dh_comment_form_closed',\n 'type' => 'textarea',\n ));\n\n $wp_customize->add_section( 'dh_misc', array(\n 'title' => __( 'Miscellaneous', 'dh' ),\n ));\n\n $wp_customize->add_setting( 'dh_breadcrumbs');\n $wp_customize->add_control( 'dh_breadcrumbs', array(\n 'label' => __( 'Show breadcrumbs', 'dh' ),\n 'section' => 'dh_misc',\n 'type' => 'checkbox',\n ));\n\n $wp_customize->add_setting( 'dh_search_header');\n $wp_customize->add_control( 'dh_search_header', array(\n 'label' => __( 'Show Search Box in header', 'dh' ),\n 'section' => 'dh_misc',\n 'type' => 'checkbox',\n ));\n\n $wp_customize->add_setting( 'dh_newsletter_header');\n $wp_customize->add_control( 'dh_newsletter_header', array(\n 'label' => __( 'Show Newsletter Link in header', 'dh' ),\n 'section' => 'dh_misc',\n 'type' => 'checkbox',\n ));\n\n $wp_customize->add_setting( 'dh_newsletter_header_topic_id');\n $wp_customize->add_control( 'dh_newsletter_header_topic_id', array(\n 'label' => __( 'Topic ID for Newsletter Link in header', 'dh' ),\n 'section' => 'dh_misc',\n 'type' => 'text',\n ));\n\n $wp_customize->add_setting( 'dh_numbering_auto');\n $wp_customize->add_control( 'dh_numbering_auto', array(\n 'label' => __( 'Enable auto-renumbering to avoid duplicate DH Numbers for recommendations and questions', 'dh' ),\n 'section' => 'dh_misc',\n 'type' => 'checkbox',\n ));\n}", "title": "" }, { "docid": "250fd4232f6f24d1b8e75bf10d88945e", "score": "0.6730404", "text": "function hybrid_customize_register( $wp_customize ) {\n\n\t$wp_customize->remove_section( 'title_tagline' );\n\t\n\t/* Get supported theme settings. */\n\t$supports = get_theme_support( 'hybrid-core-theme-settings' );\n\n\t/* Get the theme prefix. */\n\t$prefix = hybrid_get_prefix();\n\n\t/* Get the default theme settings. */\n\t$default_settings = hybrid_get_default_theme_settings();\n\n\t/* Add the footer section, setting, and control if theme supports the 'footer' setting. */\n\tif ( is_array( $supports[0] ) && in_array( 'footer', $supports[0] ) ) {\n\n\t\t/* Add the footer section. */\n\t\t$wp_customize->add_section(\n\t\t\t'hybrid-core-footer',\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Footer', 'hybrid-core' ),\n\t\t\t\t'priority' => 200,\n\t\t\t\t'capability' => 'edit_theme_options'\n\t\t\t)\n\t\t);\n\n\t\t/* Add the 'footer_insert' setting. */\n\t\t$wp_customize->add_setting(\n\t\t\t\"{$prefix}_theme_settings[footer_insert]\",\n\t\t\tarray(\n\t\t\t\t'default' => $default_settings['footer_insert'],\n\t\t\t\t'type' => 'option',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t)\n\t\t);\n\n\t\t/* Add the textarea control for the 'footer_insert' setting. */\n\t\t$wp_customize->add_control(\n\t\t\tnew Hybrid_Customize_Control_Textarea(\n\t\t\t\t$wp_customize,\n\t\t\t\t'hybrid-core-footer',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Footer', 'hybrid-core' ),\n\t\t\t\t\t'section' => 'hybrid-core-footer',\n\t\t\t\t\t'settings' => \"{$prefix}_theme_settings[footer_insert]\",\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t/* If viewing the customize preview screen, add a script to show a live preview. */\n\t\tif ( $wp_customize->is_preview() && !is_admin() )\n\t\t\tadd_action( 'wp_footer', 'hybrid_customize_preview_script', 21 );\n\t}\n\t\n\t/* Add the ultimate-offer section, setting, and control if theme supports the 'ultimate-offer' setting. */\n\tif ( is_array( $supports[0] ) && in_array( 'ultimate-offer', $supports[0] ) ) {\n\n\t\t/* Add the ultimate-offer (sales copy/offer) section. */\n\t\t$wp_customize->add_section(\n\t\t\t'hybrid-core-ultimate-offer',\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Sales Copy/Offer', $prefix ),\n\t\t\t\t'priority' => 300,\n\t\t\t\t'capability' => 'edit_theme_options'\n\t\t\t)\n\t\t);\n\n\t\t/* Add various 'uo_' ultimate offer settings. */\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_my_city]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_my_city'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-my-city', array(\n\t\t\t'label' => esc_html__( '[MY_CITY]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_my_city]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_my_state]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_my_state'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-my-state', array(\n\t\t\t'label' => esc_html__( '[MY_STATE]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_my_state]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_my_name]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_my_name'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-my-name', array(\n\t\t\t'label' => esc_html__( '[MY_NAME]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_my_name]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_year]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_year'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-year', array(\n\t\t\t'label' => esc_html__( '[YEAR]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_year]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_business_name]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_business_name'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-business-name', array(\n\t\t\t'label' => esc_html__( '[BUSINESS_NAME]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_business_name]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_phone_number]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_phone_number'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-phone-number', array(\n\t\t\t'label' => esc_html__( '[PHONE_NUMBER]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_phone_number]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_list_of_cities]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_list_of_cities'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-list-of-cities', array(\n\t\t\t'label' => esc_html__( '[LIST_OF_CITIES]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_list_of_cities]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_list_of_zipcodes]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_list_of_zipcodes'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control('hybrid-core-uo-list-of-zipcodes', array(\n\t\t\t'label' => esc_html__( '[LIST_OF_ZIPCODES]', $prefix),\n\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t'settings' => \"{$prefix}_theme_settings[uo_list_of_zipcodes]\",\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_trial_offer_shortcode]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_trial_offer_shortcode'] ),\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control(\n\t\t\tnew Hybrid_Customize_Control_Textarea(\n\t\t\t\t$wp_customize,\n\t\t\t\t'hybrid-core-uo-trial-offer-shortcode',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Trial Offer Form Shortcode', 'hybrid-core' ),\n\t\t\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t\t\t'settings' => \"{$prefix}_theme_settings[uo_trial_offer_shortcode]\",\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_setting(\"{$prefix}_theme_settings[uo_sign_up_button]\", array(\n\t\t\t'default' => sanitize_text_field( $default_settings['uo_sign_up_button'] ),\t//BUG showing: clearing the default value\n\t\t\t'type' => 'option',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t));\n\t\t$wp_customize->add_control(\n\t\t\tnew Hybrid_Customize_Control_Textarea(\n\t\t\t\t$wp_customize,\n\t\t\t\t'hybrid-core-uo-sign-up-button',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( '[SIGN_UP_BUTTON]', 'hybrid-core' ),\n\t\t\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t\t\t'settings' => \"{$prefix}_theme_settings[uo_sign_up_button]\",\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting(\n\t\t\t\"{$prefix}_theme_settings[uo_trial_offer_box]\",\n\t\t\tarray(\n\t\t\t\t'default' => sanitize_text_field( $default_settings['uo_trial_offer_box'] ),\n\t\t\t\t'type' => 'option',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control(\n\t\t\tnew Hybrid_Customize_Control_Textarea(\n\t\t\t\t$wp_customize,\n\t\t\t\t'hybrid-core-uo-trial-offer-box',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Trial Offer Message For Popup Box', 'hybrid-core' ),\n\t\t\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t\t\t'settings' => \"{$prefix}_theme_settings[uo_trial_offer_box]\",\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting(\n\t\t\t\"{$prefix}_theme_settings[uo_guarantee_copy]\",\n\t\t\tarray(\n\t\t\t\t'default' => sanitize_text_field( $default_settings['uo_guarantee_copy'] ),\n\t\t\t\t'type' => 'option',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'hybrid_customize_sanitize',\n\t\t\t\t'sanitize_js_callback' => 'hybrid_customize_sanitize',\n\t\t\t)\n\t\t);\n\t\t$wp_customize->add_control(\n\t\t\tnew Hybrid_Customize_Control_Textarea(\n\t\t\t\t$wp_customize,\n\t\t\t\t'hybrid-core-uo-guarantee-copy',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Guarantee Copy', 'hybrid-core' ),\n\t\t\t\t\t'section' => 'hybrid-core-ultimate-offer',\n\t\t\t\t\t'settings' => \"{$prefix}_theme_settings[uo_guarantee_copy]\",\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t}\n}", "title": "" }, { "docid": "1b286500a1a21614301d5e0f189ee0be", "score": "0.6727193", "text": "function mytheme_customize_register( $wp_customize ) {\n global $homepage_controls;\n for($i = 0; $i < count($homepage_controls); $i++){\n $name = $homepage_controls[$i][0];\n $default = $homepage_controls[$i][1];\n $type = $homepage_controls[$i][2];\n\n $id = strtolower(str_replace(' ', '', $name));\n $wp_customize->add_setting( 'homepage_' . $id , array(\n 'default' => $default\n ) );\n\n $wp_customize->add_control(\n 'control_homepage_' . $id,\n array(\n 'label' => $name,\n 'section' => 'static_front_page',\n 'settings' => 'homepage_' . $id,\n 'type' => $type\n )\n );\n }\n\n //add footer customization controls\n $wp_customize->add_section( 'footer' , array(\n 'title' => 'Footer/Social'\n ));\n $footer_urls = ['Facebook URL', 'Twitter URL', 'Instagram URL', 'Youtube URL', 'Flickr URL', 'Email URL'];\n for($i = 0; $i < count($footer_urls); $i++){\n $name = $footer_urls[$i];\n $id = strtolower(str_replace(' ', '', $name));\n $wp_customize->add_setting( 'footer_' . $id , array(\n 'default' => ''\n ) );\n\n $wp_customize->add_control(\n 'control_footer_' . $id,\n array(\n 'label' => $name,\n 'section' => 'footer',\n 'settings' => 'footer_' . $id,\n 'type' => 'url'\n )\n );\n }\n}", "title": "" }, { "docid": "c3ba0722c41e2f2a86a70d140d1ae833", "score": "0.6727108", "text": "protected function _register_controls() {\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => __('Content', 'chaman_addons'),\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_group_control(\n Groups\\CustomQuery_Control::get_type(),\n [\n 'name' => 'custom_query',\n 'label' => __('Custom Query', 'unifato_addons'),\n 'posts_per_page_field' => [\n 'default' => 5,\n ],\n 'post_type_field' => [\n 'default' => 'staff',\n ],\n ]\n );\n\n $this->end_controls_section();\n\n $this->_register_controls_parent();\n }", "title": "" }, { "docid": "c4db49b51d1256ce7edfcf8d83820f21", "score": "0.6724964", "text": "function setup( $wp_customizer ) {\n\n\t$logo_button_labels = [\n\t\t'select' => __( 'Select logo', 'blr-base-theme' ),\n\t\t'change' => __( 'Change logo', 'blr-base-theme' ),\n\t\t'remove' => __( 'Remove', 'blr-base-theme' ),\n\t\t'default' => __( 'Default', 'blr-base-theme' ),\n\t\t'placeholder' => __( 'No logo selected', 'blr-base-theme' ),\n\t\t'frame_title' => __( 'Select logo', 'blr-base-theme' ),\n\t\t'frame_button' => __( 'Choose logo', 'blr-base-theme' ),\n\t];\n\n\t$wp_customizer->add_setting( 'blr_base_theme_phone_number', [\n\t\t'default' => get_default( 'blr_base_theme_phone_number' ),\n\t]);\n\n\t$wp_customizer->add_control( 'phone_number_textbox', [\n\t\t'label' => __( 'Phone Number', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'settings' => 'blr_base_theme_phone_number',\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_company_name', [\n\t\t'default' => get_default( 'blr_base_theme_company_name' ),\n\t]);\n\n\t$wp_customizer->add_control( 'address_1_textbox', [\n\t\t'label' => __( 'Address (Line 1)', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'settings' => 'blr_base_theme_address_1',\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_address_1', [\n\t\t'default' => get_default( 'blr_base_theme_address_1' ),\n\t]);\n\n\t$wp_customizer->add_control( 'address_1_textbox', [\n\t\t'label' => __( 'Address (Line 1)', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'settings' => 'blr_base_theme_address_1',\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_address_2', [\n\t\t'default' => get_default( 'blr_base_theme_address_2' ),\n\t]);\n\n\t$wp_customizer->add_control( 'address_2_textbox', [\n\t\t'label' => __( 'Address (Line 2)', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'settings' => 'blr_base_theme_address_2',\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_copyright_text', [\n\t\t'default' => get_default( 'blr_base_theme_copyright_text' ),\n\t]);\n\n\t$wp_customizer->add_control( 'copyright_textbox', [\n\t\t'label' => __( 'Copyright Text', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'settings' => 'blr_base_theme_copyright_text',\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_primary_enabled', [\n\t\t'default' => '1',\n\t]);\n\n\t$wp_customizer->add_control( 'blr_base_theme_logo_primary_enabled', [\n\t\t'type' => 'checkbox',\n\t\t'label' => __( 'Enable Header Logo', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 60,\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_primary', [\n\t\t'default' => apply_filters(\n\t\t\t'blr/logo-image-url',\n\t\t\tget_default( 'blr_base_theme_logo_primary' ),\n\t\t\t'primary'\n\t\t),\n\t]);\n\n\t$wp_customizer->add_control(\n\t\tnew \\WP_Customize_Cropped_Image_Control(\n\t\t\t$wp_customizer,\n\t\t\t'blr_base_theme_logo_primary',\n\t\t\t[\n\t\t\t\t'label' => __( 'Header Logo', 'blr-base-theme' ),\n\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t'priority' => 60,\n\t\t\t\t'flex_height' => true,\n\t\t\t\t'flex_width' => true,\n\t\t\t\t'button_labels' => $logo_button_labels,\n\t\t\t]\n\t\t)\n\t);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_search_enabled', [\n\t\t'default' => '1',\n\t]);\n\n\t$wp_customizer->add_control( 'blr_base_theme_logo_search_enabled', [\n\t\t'type' => 'checkbox',\n\t\t'label' => __( 'Enable Search Logo', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 60,\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_search', [\n\t\t'default' => apply_filters(\n\t\t\t'blr/logo-image-url',\n\t\t\tget_default( 'blr_base_theme_logo_search' ),\n\t\t\t'search'\n\t\t),\n\t]);\n\n\t$wp_customizer->add_control(\n\t\tnew \\WP_Customize_Cropped_Image_Control(\n\t\t\t$wp_customizer,\n\t\t\t'blr_base_theme_logo_search',\n\t\t\t[\n\t\t\t\t'label' => __( 'Search Logo', 'blr-base-theme' ),\n\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t'priority' => 60,\n\t\t\t\t'flex_height' => true,\n\t\t\t\t'flex_width' => true,\n\t\t\t\t'button_labels' => $logo_button_labels,\n\t\t\t]\n\t\t)\n\t);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_footer_enabled', [\n\t\t'default' => '1',\n\t]);\n\n\t$wp_customizer->add_control( 'blr_base_theme_logo_footer_enabled', [\n\t\t'type' => 'checkbox',\n\t\t'label' => __( 'Enable Footer Logo', 'blr-base-theme' ),\n\t\t'section' => 'title_tagline',\n\t\t'priority' => 60,\n\t]);\n\n\t$wp_customizer->add_setting( 'blr_base_theme_logo_footer', [\n\t\t'default' => apply_filters(\n\t\t\t'blr/logo-image-url',\n\t\t\tget_default( 'blr_base_theme_logo_search' ),\n\t\t\t'footer'\n\t\t),\n\t]);\n\n\t$wp_customizer->add_control(\n\t\tnew \\WP_Customize_Cropped_Image_Control(\n\t\t\t$wp_customizer,\n\t\t\t'blr_base_theme_logo_footer',\n\t\t\t[\n\t\t\t\t'label' => __( 'Footer Logo', 'blr-base-theme' ),\n\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t'priority' => 60,\n\t\t\t\t'flex_height' => true,\n\t\t\t\t'flex_width' => true,\n\t\t\t\t'button_labels' => $logo_button_labels,\n\t\t\t]\n\t\t)\n\t);\n}", "title": "" }, { "docid": "9105e870e84cfc7ddd806ceaa23c0ab3", "score": "0.67248756", "text": "function mytheme_customize_register( $wp_customize ) {\n /*All our sections, settings, and controls will be added here*/\n // Background Colour\n $wp_customize->add_setting( 'freedomflow-background-colour' , array(\n 'default' => '#FEF4F3',\n 'transport' => 'refresh',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'freedomflow-background-colour-control', array(\n 'label' => __( 'Background Colour', 'freedomflow-theme' ),\n 'description' => 'Change the background Colour',\n 'section' => 'colors',\n 'settings' => 'freedomflow-background-colour',\n ) ) );\n // Header and Footer background Colour\n $wp_customize->add_setting( 'freedomflow-header-footer-colour' , array(\n 'default' => '#e0a7b3',\n 'transport' => 'refresh',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'freedomflow-header-footer-colour-control', array(\n 'label' => __( 'Header and Footer Background Colour', 'freedomflow-theme' ),\n 'description' => 'Change the Header and Footer Background Colour',\n 'section' => 'colors',\n 'settings' => 'freedomflow-header-footer-colour',\n ) ) );\n // Footer Message\n $wp_customize->add_section( 'freedomflow-footer-section' , array(\n 'title' => __( 'Footer Text', 'freedomflow-theme' ),\n 'priority' => 30,\n ));\n $wp_customize->add_setting( 'freedomflow-footer-section-message' , array(\n 'default' => 'Copyright © 2020 – Design by Isabella Whitfield',\n 'transport' => 'refresh',\n ) );\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'freedomflow-footer-section-control', array(\n 'label' => __( 'Footer Text', 'freedomflow-theme' ),\n 'section' => 'freedomflow-footer-section',\n 'settings' => 'freedomflow-footer-section-message',\n ) ) );\n // Site Title Text\n // $wp_customize->add_section( 'buySomeThyme-title-text' , array(\n // 'title' => __( 'Site Title Text', 'buySomeThyme-theme' ),\n // 'priority' => 30,\n // ));\n // $wp_customize->add_setting( 'buySomeThyme-title-text' , array(\n // 'default' => 'Buy Some Thyme',\n // 'transport' => 'refresh',\n // ) );\n // $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'buySomeThyme-title-text-control', array(\n // 'label' => __( 'Site Title Text', 'buySomeThyme-theme' ),\n // 'section' => 'buySomeThyme-title-text',\n // 'settings' => 'buySomeThyme-title-text',\n // ) ) );\n }", "title": "" }, { "docid": "c5012e22b018251201a3d3e841129343", "score": "0.6718567", "text": "function n_two_customize_register($wp_customize)\n{\n\n $wp_customize->add_section('showcase_1', array(\n 'title' => __('Showcase Column 1 Text Only', 'n_two'),\n 'description' => sprintf(__('Options for showcase', 'n_two')),\n 'priority' => 135\n ));\n\n $wp_customize->add_setting('showcase_1_heading', array(\n 'default' => _x('Custom Wordpress Theme', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_1_heading', array(\n 'label' => __('Heading', 'n_two'),\n 'section' => 'showcase_1',\n 'priority' => 3\n ));\n\n $wp_customize->add_setting('showcase_1_text', array(\n 'default' => _x('Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_1_text', array(\n 'label' => __('Text', 'n_two'),\n 'section' => 'showcase_1',\n 'priority' => 4\n ));\n\n //Column 1 text only ends here\n\n // 3 images in col 1 start \n\n $wp_customize->add_section('showcase_1_img', array(\n 'title' => __('Showcase Column 1 images ', 'n_two'),\n 'description' => sprintf(__('Options for showcase', 'n_two')),\n 'priority' => 140,\n ));\n\n $wp_customize->add_setting('small_image1', array(\n 'default' => get_bloginfo('template_directory') . '/img/lunch-1.jpg',\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'small_image1', array(\n 'label' => __('Rounded image 1', 'n_two'),\n 'section' => 'showcase_1_img',\n 'settings' => 'small_image1',\n 'priority' => 3\n )));\n\n $wp_customize->add_setting('showcase_1img1_text', array(\n 'default' => _x('Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_1img1_text', array(\n 'label' => __('Text', 'n_two'),\n 'section' => 'showcase_1_img',\n 'priority' => 4\n ));\n // img 1 & text 1 done\n\n //Image 2 & text 2 starts\n $wp_customize->add_setting('small_image2', array(\n 'default' => get_bloginfo('template_directory') . '/img/lunch-2.jpg',\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'small_image2', array(\n 'label' => __('Rounded image 2', 'n_two'),\n 'section' => 'showcase_1_img',\n 'settings' => 'small_image2',\n 'priority' => 5\n )));\n\n $wp_customize->add_setting('showcase_2img2_text', array(\n 'default' => _x('Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_2img2_text', array(\n 'label' => __('Text', 'n_two'),\n 'section' => 'showcase_1_img',\n 'priority' => 6\n ));\n // image 2 & text done\n\n // Image 3 & text 3 starts\n $wp_customize->add_setting('small_image3', array(\n 'default' => get_bloginfo('template_directory') . '/img/lunch-3.jpg',\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'small_image3', array(\n 'label' => __('Rounded image 3', 'n_two'),\n 'section' => 'showcase_1_img',\n 'settings' => 'small_image3',\n 'priority' => 7\n )));\n\n $wp_customize->add_setting('showcase_3img3_text', array(\n 'default' => _x('Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_3img3_text', array(\n 'label' => __('Text', 'n_two'),\n 'section' => 'showcase_1_img',\n 'priority' => 8\n ));\n\n // img 3 & text 3 done\n // 3 images in col1 & text ends here\n\n // Showcase cover image in column 2 container 1\n $wp_customize->add_section('showcase_2', array(\n 'title' => __('Showcase Column 2 Image Cover', 'n_two'),\n 'description' => sprintf(__('Options for showcase_2', 'n_two')),\n 'priority' => 150\n ));\n\n $wp_customize->add_setting('showcase_2_image', array(\n 'default' => get_bloginfo('template_directory') . '/img/showcase.jpg',\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'showcase_image', array(\n 'label' => __('Showcase Image', 'n_two'),\n 'section' => 'showcase_2',\n 'settings' => 'showcase_2_image',\n 'priority' => 1\n )));\n\n\n // Start panel 1 with button & text only\n\n $wp_customize->add_section('showcase_panel_01', array(\n 'title' => __('Panel_01', 'n_two'),\n 'description' => sprintf(__('Options for showcase', 'n_two')),\n 'priority' => 155\n ));\n\n $wp_customize->add_setting('btn_url_panel01', array(\n 'default' => _x('http://test.com', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('btn_url_panel01', array(\n 'label' => __('Button URL', 'n_two'),\n 'section' => 'showcase_panel_01',\n 'priority' => 5\n ));\n\n $wp_customize->add_setting('btn_text_panel01', array(\n 'default' => _x('Read More', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('btn_text_panel01', array(\n 'label' => __('Button Text', 'n_two'),\n 'section' => 'showcase_panel_01',\n 'priority' => 6\n ));\n\n // Panel 1 with text & button ends here\n\n // Container 3 image cover starts\n\n $wp_customize->add_section('showcase_3', array(\n 'title' => __('Showcase 3 Image Cover', 'n_two'),\n 'description' => sprintf(__('Options for showcase_3', 'n_two')),\n 'priority' => 180\n ));\n\n $wp_customize->add_setting('showcase_3_image', array(\n 'default' => get_bloginfo('template_directory') . '/img/showcase-03.jpg',\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'showcase_image__3', array(\n 'label' => __('Showcase Cover Image 3', 'n_two'),\n 'section' => 'showcase_3',\n 'settings' => 'showcase_3_image',\n 'priority' => 1\n )));\n\n // Container 3 image cover ends\n\n // Container 3 text heading starts\n\n $wp_customize->add_section('showcase 3 container 3', array(\n 'title' => __('Showcase 3 Heading & Text', 'n_two'),\n 'description' => sprintf(__('Options for showcase', 'n_two')),\n 'priority' => 190\n ));\n\n $wp_customize->add_setting('showcase_3_heading', array(\n 'default' => _x('Custom Wordpress Theme', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_3_heading', array(\n 'label' => __('Heading', 'n_two'),\n 'section' => 'showcase 3 container 3',\n 'priority' => 3\n ));\n // Container 3 text heading ends\n\n // Container 3 text paragraph starts\n\n $wp_customize->add_setting('showcase_3_text', array(\n 'default' => _x('Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam', 'n_two'),\n 'type' => 'theme_mod'\n ));\n\n $wp_customize->add_control('showcase_3_text', array(\n 'label' => __('Text', 'n_two'),\n 'section' => 'showcase 3 container 3',\n 'priority' => 4\n ));\n\n // Container 3 text paragraph ends\n\n\n}", "title": "" }, { "docid": "747c094928f524fb73afc21b756d67cc", "score": "0.6710796", "text": "protected function _register_controls() {\n\t\t\t\t$this->start_controls_section(\n\t\t\t\t\t'section_sc_testimonials',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Testimonials', 'trx_addons' ),\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'type',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Layout', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => apply_filters('trx_addons_sc_type', trx_addons_components_get_allowed_layouts('cpt', 'testimonials', 'sc'), 'trx_sc_testimonials'),\n\t\t\t\t\t\t'default' => 'default'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'cat',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Group', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Select category -', 'trx_addons')), trx_addons_get_list_terms(false, TRX_ADDONS_CPT_TESTIMONIALS_TAXONOMY)),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->add_query_param('');\n\n\t\t\t\t$this->end_controls_section();\n\t\t\t\t\n\t\t\t\t$this->add_slider_param(false, [\n\t\t\t\t\t'slider_pagination_thumbs' => [\n\t\t\t\t\t\t'label' => __( 'Pagination thumbs', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t\t\t'label_off' => __( 'Off', 'trx_addons' ),\n\t\t\t\t\t\t'label_on' => __( 'On', 'trx_addons' ),\n\t\t\t\t\t\t'return_value' => '1',\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'slider_pagination' => ['left', 'right', 'bottom']\n\t\t\t\t\t\t]\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t\t\n\t\t\t\t$this->add_title_param();\n\t\t\t}", "title": "" }, { "docid": "50677be71bfe1c3a7fbfec376eab5875", "score": "0.6709523", "text": "function evcd_register_page_metaboxes() {\n\n\tglobal $theme_prefix;\n\t\n\t$extra_content_sections = new_cmb2_box( array(\n\t\t'id' => $theme_prefix . 'page-sections',\n\t\t'title' => esc_html__( 'Extra Content Sections', 'evcd_textdomain' ),\n\t\t'object_types' => array( 'page', ), // Post type\n\t\t'show_on' => array( 'key' => 'page-template', 'value' => 'page-full-width.php' ),\n\t\t'priority' => 'high',\n\t\t'closed' => false,\n\t) );\n\n\t$group_field_id = $extra_content_sections->add_field( array(\n\t\t'id' => $theme_prefix . 'content-group',\n\t\t'type' => 'group',\n\t\t// 'repeatable' => false, // use false if you want non-repeatable group\n\t\t'options' => array(\n\t\t\t'group_title' => esc_html__( 'Content Section {#}', 'evcd_textdomain' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t\t'add_button' => esc_html__( 'Add Another Content Section', 'evcd_textdomain' ),\n\t\t\t'remove_button' => esc_html__( 'Remove Content Section', 'evcd_textdomain' ),\n\t\t\t'sortable' => true, // beta\n\t\t\t// 'closed' => true, // true to have the groups closed by default\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\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Content', 'evcd_textdomain' ),\n\t\t'id' => 'section-content',\n\t\t'type' => 'wysiwyg',\n\t\t'options' => array( 'textarea_rows' => 20, ),\n\t\t'before_row' => '\n\t\t\t<div class=\"cmb2-tabs\">\n\t\t\t\t<ul class=\"tabs-nav\">\n\t\t\t\t\t<li class=\"current\"><a href=\"#tab-content-1\">Content</a></li>\n\t\t\t\t\t<li><a href=\"#tab-content-2\">Styling + Options</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"tab-content tab-content-1 current\">\n\t\t\t\t\t<div>\n\t\t',\n\t\t'after_row' => '\n\t\t\t\t</div><!-- ./row -->\n\t\t',\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Content CSS classes', 'evcd_textdomain' ),\n\t\t// 'desc' => esc_html__( 'Applies css class to inner content wrapper', 'evcd_textdomain' ),\n\t\t'id' => 'content-classes',\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__( 'Class names: full, twothirds, half, third, quarter, dark, light, right, left, center, padded, two-cols, three-cols, four-cols', 'evcd_textdomain' ),\n\t\t'row_classes'\t=> 'content-classes',\n\t\t'before_row' => '\n\t\t\t<div>\n\t\t',\n\t\t'after_row' => '\n\t\t\t\t\t</div><!-- ./row -->\n\t\t\t\t</div><!-- /.tab-content -->\n\t\t',\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Section ID', 'evcd_textdomain' ),\n\t\t// 'desc' => esc_html__( 'CSS ID for this section', 'evcd_textdomain' ),\n\t\t'id' => 'section-ID',\n\t\t'type' => 'text_medium',\n\t\t'desc' => esc_html__( 'Used for menu linking. For example, if ID is \"my-section\" menu link is \"#my-section\".', 'evcd_textdomain' ),\n\t\t'row_classes'\t=> 'half',\n\t\t'before_row' => '\n\t\t\t<div class=\"tab-content tab-content-2\">\n\t\t\t\t<div>\n\t\t',\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Section Wrapper CSS classes', 'evcd_textdomain' ),\n\t\t// 'desc' => esc_html__( 'Applies css class to inner content wrapper', 'evcd_textdomain' ),\n\t\t'id' => 'section-css-classes',\n\t\t'type' => 'text_medium',\n\t\t'row_classes'\t=> 'half',\n\t\t'after_row'\t=> '\n\t\t\t\t</div><!-- ./row -->\n\t\t',\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Background Color', 'evcd_textdomain' ),\n\t\t'id' => 'section-background-color',\n\t\t'type' => 'colorpicker',\n\t\t'options' => array(\n\t\t\t'alpha' => true, // Make this a rgba color picker.\n\t\t),\n\t\t'row_classes'\t=> 'half',\n\t\t'before_row' => '<div>',\n\t\t'desc' => esc_html__( 'Note: background-color overlays background-image, so if you use both, adjust color transparency.', 'evcd_textdomain' ),\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Background Image', 'evcd_textdomain' ),\n\t\t'id' => 'section-image',\n\t\t'type' => 'file',\n\t\t'options' => array(\n\t\t\t'url' => false, // Hide the text input for the url\n\t\t),\n\t\t'row_classes'\t=> 'half',\n\t\t'after_row' => '</div><!-- ./row -->',\n\t) );\n\n\t$extra_content_sections->add_group_field( $group_field_id, array(\n\t\t'name' => esc_html__( 'Parallax Background', 'evcd_textdomain' ),\n\t\t'desc' => esc_html__( 'Does not work on mobiles.', 'evcd_textdomain' ),\n\t\t'id' => 'section-parallax',\n\t\t'type' => 'radio_inline',\n\t\t'default' => 'false',\n\t\t'options' => array(\n\t\t\t'false' => esc_html__( 'Off', 'evcd_textdomain' ),\n\t\t\t'true' => esc_html__( 'On', 'evcd_textdomain' ),\n\t\t),\n\t\t'before_row' => '<div>',\n\t\t'after_row' => '\n\t\t\t\t\t</div><!-- ./row -->\n\t\t\t\t</div><!-- /.tab-content -->\n\t\t\t</div><!-- /.cmb2-tabs -->\n\t\t',\n\t) );\n\n\t$page_options = new_cmb2_box( array(\n\t\t'id' => $theme_prefix . 'page-options',\n\t\t'title' => esc_html__( 'WGWC Theme Page Options', 'evcd_textdomain' ),\n\t\t'object_types' => array( 'page', ), // Post type\n\t\t'priority' => 'high',\n 'context' => 'side', // 'normal', 'advanced', or 'side'\n\t\t// 'closed' => true,\n\t) );\n\t\n\t$page_options->add_field( array(\n\t\t'name' => esc_html__( 'Show Page Title', 'evcd_textdomain' ),\n\t\t'id' => $theme_prefix . 'header-title',\n\t\t'type' => 'radio_inline',\n\t\t'default' => 'true',\n\t\t'options' => array(\n\t\t\t'true' => esc_html__( 'Yes', 'evcd_textdomain' ),\n\t\t\t'false' => esc_html__( 'No', 'evcd_textdomain' ),\n\t\t),\n\t) );\n\n/*\n\t// This next one is dependent on EVG Sliders plugin.\n\tif ( function_exists('sldr_reg_cpt') ) {\n\t\t$page_options->add_field( array(\n\t\t\t'name' => esc_html__( 'EVG Slider in Header', 'evcd_textdomain' ),\n\t\t\t'desc' => esc_html__( 'Choose Slider Group', 'evcd_textdomain' ),\n\t\t\t'id' => $theme_prefix . 'header-slider',\n\t\t\t'type' => 'text',\n\t\t) );\n\t}\n*/\n\n\t$page_options->add_field( array(\n\t\t'name' => esc_html__( 'SEO Title Tag', 'evcd_textdomain' ),\n\t\t'id' => $theme_prefix . 'seo-page-title',\n\t\t'type' => 'text',\n\t\t'row_classes'\t=> 'seo-title-count',\n\t\t'desc' => '55 characters max. This sets it for this page only.',\n\t\t'after_field' => '\n\t\t\t<div class=\"the-title-count\"><span id=\"title-chars\">55</span> characters remaining.</div>\n\t\t',\n\t) );\n\n\t$page_options->add_field( array(\n\t\t'name' => esc_html__( 'SEO Meta Page Description', 'evcd_textdomain' ),\n\t\t'id' => $theme_prefix . 'seo-page-description',\n\t\t'type' => 'textarea_small',\n\t\t'row_classes'\t=> 'seo-desc-count',\n\t\t'desc' => '160 characters max. This sets it for this page only, and will override what is set in Theme Options.',\n\t\t'after_field' => '\n\t\t\t<div class=\"the-count\"><span id=\"chars\">160</span> characters remaining.</div>\n\t\t',\n\t) );\n\n}", "title": "" }, { "docid": "e0ca190974b4f791c781807d4583cbd1", "score": "0.6704399", "text": "function cfe_event_info( $wp_customize ) {\n $wp_customize->add_section('cfe_event_info-section', array(\n 'title' => 'Event Settings'\n ));\n\n $wp_customize->add_setting('cfe-event-year', array(\n 'default' => '2018'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, '\n cfe-event-year-control', array(\n 'label' => 'Headline',\n 'section' => 'cfe_event_info-section',\n 'settings' => 'cfe-event-year'\n )));\n\n $wp_customize->add_setting('cfe-event-datetime', array(\n 'default' => 'Saturday September 16th-17th 2017'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, '\n cfe-event-datetime-control', array(\n 'label' => 'Headline',\n 'section' => 'cfe_event_info-section',\n 'settings' => 'cfe-event-datetime'\n )));\n\n $wp_customize->add_setting('cfe-event-location', array(\n 'default' => 'SFU Surrey'\n ));\n $wp_customize->add_control( new WP_Customize_Control($wp_customize, '\n cfe-event-location-control', array(\n 'label' => 'Headline',\n 'section' => 'cfe_event_info-section',\n 'settings' => 'cfe-event-location'\n )));\n\n \n}", "title": "" }, { "docid": "5ef0d8f5d8611f5f339b3eb7ee96276b", "score": "0.67003393", "text": "function catalyst_portfolio_customize_register( $wp_customize ) {\n $wp_customize->add_section( 'catalyst_portfolio', array(\n 'title' => 'Themefyre Portfolio',\n 'priority' => 39,\n ) );\n\n $wp_customize->add_setting( 'portfolio_layout', array(\n 'default' => get_theme_mod( 'page_layout', 'sidebar-right' ),\n 'transport' => 'refresh',\n 'sanitize_callback' => 'catalyst_sanitize_layout'\n ) );\n\n $wp_customize->add_setting( 'portfolio_project_layout', array(\n 'default' => get_theme_mod( 'page_layout', 'sidebar-right' ),\n 'transport' => 'refresh',\n 'sanitize_callback' => 'catalyst_sanitize_layout'\n ) );\n\n $wp_customize->add_setting( 'portfolio_filters', array(\n 'transport' => 'refresh',\n 'sanitize_callback' => 'catalyst_sanitize_bool'\n ) );\n\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'portfolio_layout', array(\n 'label' => esc_html__( 'Portfolio Layout', 'catalyst' ),\n 'description' => esc_html__( 'The page layout for Portfolio archive pages.', 'catalyst' ),\n 'section' => 'catalyst_portfolio',\n 'settings' => 'portfolio_layout',\n 'type' => 'select',\n 'choices' => catalyst_get_page_layout_options(),\n ) ) );\n\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'portfolio_project_layout', array(\n 'label' => esc_html__( 'Project Layout', 'catalyst' ),\n 'description' => esc_html__( 'The page layout for single project pages. This can be overriden on a per project basis using the Catalyst Page Settings meta box.', 'catalyst' ),\n 'section' => 'catalyst_portfolio',\n 'settings' => 'portfolio_project_layout',\n 'type' => 'select',\n 'choices' => catalyst_get_page_layout_options(),\n ) ) );\n\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'portfolio_filters', array(\n 'label' => esc_html__( 'Portfolio Filters', 'catalyst' ),\n 'description' => esc_html__( 'Check this box to display a list of filters for your portfolio based on your project categories.', 'catalyst' ),\n 'section' => 'catalyst_portfolio',\n 'settings' => 'portfolio_filters',\n 'type' => 'checkbox',\n ) ) );\n}", "title": "" }, { "docid": "a13c79ed738ed2a53fa2d239129a2201", "score": "0.6695785", "text": "public function add_controls() {\n\t\t$this->wpc->remove_control( 'background_color' );\n\t\t$this->section_colors_background();\n\t\t$this->controls_colors();\n\t}", "title": "" }, { "docid": "33e4a85da6900b0458f31ccc9f9801ee", "score": "0.6694323", "text": "function mytheme_customize_register($wp_customize)\n{\n // Background Colour\n $wp_customize->add_setting('backgroundColour', array(\n 'default' => '#fcfcfc',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'backgroundColourControl', array(\n 'label' => __('Background Colour', 'customTheme'),\n 'description' => 'Change the background Colour',\n 'section' => 'colors',\n 'settings' => 'backgroundColour',\n )));\n\n // Body font Colour\n $wp_customize->add_setting('textColour', array(\n 'default' => '#000000',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'textColourControl', array(\n 'label' => __('Text Colour', 'customTheme'),\n 'description' => 'Change the Text Colour',\n 'section' => 'colors',\n 'settings' => 'textColour',\n )));\n\n // header backgroundColour\n $wp_customize->add_setting('headerColour', array(\n 'default' => '#fcfcfc',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'headerColourControl', array(\n 'label' => __('Header Background Colour', 'customTheme'),\n 'description' => 'Change the Header Background Colour',\n 'section' => 'colors',\n 'settings' => 'headerColour',\n )));\n\n // header text color\n $wp_customize->add_setting('headerTextColour', array(\n 'default' => '#000000',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'headerTextColourControl', array(\n 'label' => __('Header Menu Text Colour', 'customTheme'),\n 'description' => 'Change the Header Menu Text Colour',\n 'section' => 'colors',\n 'settings' => 'headerTextColour',\n )));\n\n // header menu hover color\n $wp_customize->add_setting('headerMenuHoverColour', array(\n 'default' => '#25a31d',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'headerMenuHoverColourControl', array(\n 'label' => __('Header Menu Hover Colour', 'customTheme'),\n 'description' => 'Change the Header Menu Hover Colour',\n 'section' => 'colors',\n 'settings' => 'headerMenuHoverColour',\n )));\n\n // footer backgroundColour\n $wp_customize->add_setting('footerColour', array(\n 'default' => '#eee',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footerColourControl', array(\n 'label' => __('Footer Background Colour', 'customTheme'),\n 'description' => 'Change the Footer Background Colour',\n 'section' => 'colors',\n 'settings' => 'footerColour',\n )));\n\n // footer text color\n $wp_customize->add_setting('footerTextColour', array(\n 'default' => '#000000',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footerTextColourControl', array(\n 'label' => __('Footer Text Colour', 'customTheme'),\n 'description' => 'Change the Footer Text Colour',\n 'section' => 'colors',\n 'settings' => 'footerTextColour',\n )));\n\n // Create text section\n $wp_customize->add_section('text', array(\n 'title' => __('Text', 'customTheme'),\n 'priority' => 30,\n ));\n\n // Banner Message\n $wp_customize->add_setting('bannerText', array(\n 'default' => 'Our ambition is of communities free from harmful sexual behaviour. We work proactively with clients and partners in the community to achieve this ambition.',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'bannerTextControl', array(\n 'label' => __('Banner Text', 'customTheme'),\n 'section' => 'text',\n 'settings' => 'bannerText',\n )));\n\n // Banner button\n $wp_customize->add_setting('bannerBtn', array(\n 'default' => 'GET HELP NOW',\n 'transport' => 'refresh',\n ));\n\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'bannerBtnControl', array(\n 'label' => __('Banner Button Text', 'customTheme'),\n 'section' => 'text',\n 'settings' => 'bannerBtn',\n )));\n}", "title": "" }, { "docid": "a269351c79fc06046ea1bac1f8f8dafd", "score": "0.66893667", "text": "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'layout_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Layout', 'rovoko' ),\n\t\t\t\t'tab' => 'layout',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'project_layout',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Layout', 'rovoko' ),\n\t\t\t\t'type' => 'layoutcontrol',\n\t\t\t\t'default' => 'masonry',\n\t\t\t\t'options' => [\n\t\t\t\t\t'masonry' => [\n\t\t\t\t\t\t'label' => esc_html__( 'Masonry', 'rovoko' ),\n\t\t\t\t\t\t'image' => get_template_directory_uri() . '/assets/images/elementor/project-layout-2.jpg'\n\t\t\t\t\t],\n\t\t\t\t\t'masonry-2' => [\n\t\t\t\t\t\t'label' => esc_html__( 'Masonry 02', 'rovoko' ),\n\t\t\t\t\t\t'image' => get_template_directory_uri() . '/assets/images/elementor/project-layout-3.jpg'\n\t\t\t\t\t],\n\t\t\t\t\t'masonry-3' => [\n\t\t\t\t\t\t'label' => esc_html__( 'Masonry 03', 'rovoko' ),\n\t\t\t\t\t\t'image' => get_template_directory_uri() . '/assets/images/elementor/project-layout-4.jpg'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t\t/**************** Start Content Control Tab ****************/\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Project Masonry', 'rovoko' ),\n\t\t\t\t'tab' => 'content',\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'columns',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Grid Columns', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => '4',\n\t\t\t\t'tablet_default' => '2',\n\t\t\t\t'mobile_default' => '1',\n\t\t\t\t'options' => [\n\t\t\t\t\t'1' => '1',\n\t\t\t\t\t'2' => '2',\n\t\t\t\t\t'3' => '3',\n\t\t\t\t\t'4' => '4',\n\t\t\t\t\t'5' => '5',\n\t\t\t\t\t'6' => '6',\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper.layout-masonry .project' => 'width: calc(100% / {{VALUE}});',\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper.layout-masonry-3 .project' => 'width: calc(100% / {{VALUE}});',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'project_layout' => [ 'masonry', 'masonry-3' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'count',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Posts Per Page', 'rovoko' ),\n\t\t\t\t'description' => esc_html__( 'You can enter \"-1\" to display all posts.', 'rovoko' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => '4',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'orderby',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Order By', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => 'none',\n\t\t\t\t'options' => [\n\t\t\t\t\t'none' => esc_html__( 'Default', 'rovoko' ),\n\t\t\t\t\t'date' => esc_html__( 'Date', 'rovoko' ),\n\t\t\t\t\t'title' => esc_html__( 'Title', 'rovoko' ),\n\t\t\t\t\t'name' => esc_html__( 'Slug', 'rovoko' ),\n\t\t\t\t\t'modified' => esc_html__( 'Modified', 'rovoko' ),\n\t\t\t\t\t'author' => esc_html__( 'Author', 'rovoko' ),\n\t\t\t\t\t'rand' => esc_html__( 'Random', 'rovoko' ),\n\t\t\t\t\t'ID' => esc_html__( 'ID', 'rovoko' ),\n\t\t\t\t\t'menu_order' => esc_html__( 'Menu Order', 'rovoko' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'order',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Order', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => 'ASC',\n\t\t\t\t'options' => [\n\t\t\t\t\t'ASC' => esc_html__( 'ASC', 'rovoko' ),\n\t\t\t\t\t'DESC' => esc_html__( 'DESC', 'rovoko' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'include_cat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Include Categories', 'rovoko' ),\n\t\t\t\t'type' => 'select2',\n\t\t\t\t'label_block' => true,\n\t\t\t\t'multiple' => true,\n\t\t\t\t'options' => $this->rovoko_get_taxo_array()\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'exclude_cat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Exclude Categories', 'rovoko' ),\n\t\t\t\t'type' => 'select2',\n\t\t\t\t'label_block' => true,\n\t\t\t\t'multiple' => true,\n\t\t\t\t'options' => $this->rovoko_get_taxo_array()\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'masonry-filters',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Filters', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'all_categories',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Show all items', 'rovoko' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => '',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'filters-type',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Filters Type', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => 'default',\n\t\t\t\t'options' => [\n\t\t\t\t\t'default' => esc_html__( 'Default', 'rovoko' ),\n\t\t\t\t\t'type-2' => esc_html__( 'Type 02', 'rovoko' ),\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'project_meta',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Project Meta', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'custom-images',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Custom images size', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Image_Size::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'thumbnail',\n\t\t\t\t'default' => 'full',\n\t\t\t\t'exclude' => [ 'custom' ],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'custom-images' => 'yes'\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'title',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Display Title', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'title_tag',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'HTML Tag', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => 'h4',\n\t\t\t\t'options' => [\n\t\t\t\t\t'h1' => 'H1',\n\t\t\t\t\t'h2' => 'H2',\n\t\t\t\t\t'h3' => 'H3',\n\t\t\t\t\t'h4' => 'H4',\n\t\t\t\t\t'h5' => 'H5',\n\t\t\t\t\t'h6' => 'H6',\n\t\t\t\t\t'div' => 'div',\n\t\t\t\t\t'span' => 'span',\n\t\t\t\t\t'p' => 'p',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'title' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Display Read More', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore_type',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Button Type', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => [\n\t\t\t\t\t'fill' => esc_html__( 'Fill', 'rovoko' ),\n\t\t\t\t\t'outline' => esc_html__( 'Outline', 'rovoko' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'fill',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'readmore' => 'yes',\n\t\t\t\t\t'project_layout' => [ 'masonry-2' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'tag',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Display Tag', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'excerpt',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Display Excerpt', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'project_layout' => [ 'masonry-2' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'excerpt_length',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Excerpt Length', 'rovoko' ),\n\t\t\t\t'type' => 'number',\n\t\t\t\t'default' => '50',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'excerpt' => 'yes',\n\t\t\t\t\t'project_layout' => [ 'masonry-2' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'view_all',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Load More Projects', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'view_all_btn',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Display Load More', 'rovoko' ),\n\t\t\t\t'type' => 'switcher',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'btn_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Button Type', 'rovoko' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => [\n\t\t\t\t\t'fill' => esc_html__( 'Fill', 'rovoko' ),\n\t\t\t\t\t'outline' => esc_html__( 'Outline', 'rovoko' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'fill',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'view_all_text',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Button Text', 'rovoko' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => esc_html__( 'Load More', 'rovoko' ),\n\t\t\t\t'placeholder' => esc_html__( 'Load More', 'rovoko' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'btn-css',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'CSS Classes', 'rovoko' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'title' => esc_html__( 'Add your custom class WITHOUT the dot. e.g: my-class', 'rovoko' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t\t/**************** Start Style Control Tab ****************/\n\t\t$this->start_controls_section(\n\t\t\t'section_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Style', 'rovoko' ),\n\t\t\t\t'tab' => 'style',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'text_align',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Alignment', 'rovoko' ),\n\t\t\t\t'type' => 'choose',\n\t\t\t\t'default' => 'left',\n\t\t\t\t'options' => [\n\t\t\t\t\t'left' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Left', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Center', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-center',\n\t\t\t\t\t],\n\t\t\t\t\t'right' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Right', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-right',\n\t\t\t\t\t],\n\t\t\t\t\t'justify' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Justified', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-justify',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper' => 'text-align: {{VALUE}};',\n\t\t\t\t],\n\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'project-border-radius',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Radius', 'rovoko' ),\n\t\t\t\t'type' => 'slider',\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper.layout-masonry-3 .project .ef5-featured' => 'border-radius: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'project_layout' => [ 'masonry-3' ],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*-- Filters --*/\n\t\t$this->add_control(\n\t\t\t'filter_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Filters', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'filter_align',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Alignment', 'rovoko' ),\n\t\t\t\t'type' => 'choose',\n\t\t\t\t'default' => 'center',\n\t\t\t\t'options' => [\n\t\t\t\t\t'start' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Left', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Center', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-center',\n\t\t\t\t\t],\n\t\t\t\t\t'end' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Right', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-right',\n\t\t\t\t\t],\n\t\t\t\t\t'between' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Justified', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-justify',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'filter_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .ef5-filters .filter-item',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'filter-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Item Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .ef5-filters .filter-item' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .ef5-filters.filter-type-2 .filter-item:after' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'filter-active-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Active Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .ef5-filters .filter-item.active' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .ef5-filters .filter-item:after' => 'border-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'masonry-filters' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*--Title--*/\n\t\t$this->add_control(\n\t\t\t'title_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'title' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'title_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .rovoko-project-wrapper .project .ef5-heading',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'title' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*** Start Tabs Wrap ***/\n\t\t$this->start_controls_tabs( 'tabs_title_style', [ 'condition' => [ 'title' => 'yes' ] ] );\n\t\t$this->start_controls_tab(\n\t\t\t'title-nomal-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'title-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .ef5-heading' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'title' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->start_controls_tab(\n\t\t\t'title-hover-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'title-color-hover',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .ef5-heading:hover a' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'title' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\t\t/*** End Tabs Wrap ***/\n\t\t/*-- Tag --*/\n\t\t$this->add_control(\n\t\t\t'tag_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Tag', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'tag' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'tag_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .rovoko-project-wrapper .ef5-tagged-in',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'tag' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*** Start Tabs Wrap ***/\n\t\t$this->start_controls_tabs( 'tabs_tag_style', [ 'condition' => [ 'tag' => 'yes' ] ] );\n\t\t$this->start_controls_tab(\n\t\t\t'tag-nomal-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'tag-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .ef5-tagged-in' => 'color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->start_controls_tab(\n\t\t\t'tag-hover-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'tag-color-hover',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .ef5-tagged-in a:hover' => 'color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\t\t/*** End Tabs Wrap ***/\n\t\t/*-- Excerpt --*/\n\t\t$this->add_control(\n\t\t\t'excerpt_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Excerpt', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'excerpt' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'excerpt_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .rovoko-project-wrapper .ef5-excerpt',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'excerpt' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'excerpt-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .ef5-excerpt' => 'color: {{VALUE}};' ],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'excerpt' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*-- Readmore --*/\n\t\t$this->add_control(\n\t\t\t'readmore_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Read More', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'readmore' => 'yes',\n\t\t\t\t\t'project_layout' => [ 'masonry-2' ]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*** Start Tabs Wrap ***/\n\t\t$this->start_controls_tabs( 'tabs_readmore_style', [\n\t\t\t'condition' => [\n\t\t\t\t'readmore' => 'yes',\n\t\t\t\t'project_layout' => [ 'masonry-2' ]\n\t\t\t]\n\t\t] );\n\t\t$this->start_controls_tab(\n\t\t\t'readmore-nomal-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .readmore a' => 'background-color: {{VALUE}};' ],\n\t\t\t\t'condition' => [ 'readmore_type' => 'fill' ]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .readmore a.outline' => 'border-color: {{VALUE}};' ],\n\t\t\t\t'condition' => [ 'readmore_type' => 'outline' ]\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'readmore-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .readmore a' => 'color: {{VALUE}};' ]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->start_controls_tab(\n\t\t\t'readmore-hover-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-hover-border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .readmore a.outline:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [ 'readmore_type' => 'outline' ]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-hover-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .readmore a:hover' => 'background-color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-color-hover',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .readmore a:hover' => 'color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\t\t/*** End Tabs Wrap ***/\n\t\t/*-- Readmore icon --*/\n\t\t$this->add_control(\n\t\t\t'readmore-icon_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Read More Icon', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'readmore' => 'yes',\n\t\t\t\t\t'project_layout' => [ 'masonry-3' ]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*** Start Tabs Wrap ***/\n\t\t$this->start_controls_tabs( 'tabs_readmore-icon_style', [\n\t\t\t'condition' => [\n\t\t\t\t'readmore' => 'yes',\n\t\t\t\t'project_layout' => [ 'masonry-3' ]\n\t\t\t]\n\t\t] );\n\t\t$this->start_controls_tab(\n\t\t\t'readmore-icon-nomal-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-icon-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .readmore-icon-2' => 'background-color: {{VALUE}};' ],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'readmore-icon-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .readmore-icon-2' => 'color: {{VALUE}};' ]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->start_controls_tab(\n\t\t\t'readmore-icon-hover-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-icon-hover-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .readmore-icon-2:hover' => 'background-color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'readmore-icon-color-hover',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .readmore-icon-2:hover' => 'color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\t\t/*** End Tabs Wrap ***/\n\t\t/*-- View All --*/\n\t\t$this->add_control(\n\t\t\t'viewall_style',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'View All Button', 'rovoko' ),\n\t\t\t\t'type' => 'heading',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall_align',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Alignment', 'rovoko' ),\n\t\t\t\t'type' => 'choose',\n\t\t\t\t'default' => 'center',\n\t\t\t\t'options' => [\n\t\t\t\t\t'left' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Left', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Center', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-center',\n\t\t\t\t\t],\n\t\t\t\t\t'right' => [\n\t\t\t\t\t\t'title' => esc_html__( 'Right', 'rovoko' ),\n\t\t\t\t\t\t'icon' => 'eicon-text-align-right',\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .view-all-btn' => 'text-align: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'viewall_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t/*** Start Tabs Wrap ***/\n\t\t$this->start_controls_tabs( 'tabs_viewall_style', [\n\t\t\t'condition' => [\n\t\t\t\t'view_all_btn' => 'yes',\n\t\t\t]\n\t\t] );\n\t\t$this->start_controls_tab(\n\t\t\t'viewall-nomal-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a' => 'background-color: {{VALUE}};' ],\n\t\t\t\t'condition' => [ 'btn_style' => 'fill' ]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall-border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a.outline' => 'border-color: {{VALUE}};' ],\n\t\t\t\t'condition' => [ 'btn_style' => 'outline' ]\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'viewall-color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [ '{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a' => 'color: {{VALUE}};' ]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->start_controls_tab(\n\t\t\t'viewall-hover-tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'rovoko' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall-hover-border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a.outline:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'condition' => [ 'btn_style' => 'outline' ]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall-hover-bg',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a:hover' => 'background-color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'viewall-color-hover',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'rovoko' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .rovoko-project-wrapper .view-all-btn a:hover' => 'color: {{VALUE}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\t\t/*** End Tabs Wrap ***/\n\t\t$this->end_controls_section();\n\n\t}", "title": "" }, { "docid": "26c5ca24fce6820f0c1e627c387c43f3", "score": "0.6687368", "text": "function shopay_register_colors_fields ( $wp_customize ) {\n\n \t/**\n * Colors Section\n *\n * Theme Options > General > Colors\n * @since 1.0.0\n */\n $wp_customize->add_section( new Shopay_Customize_Section(\n \t$wp_customize, 'shopay_section_colors',\n\t array(\n\t 'priority' \t=> 20,\n\t 'panel' \t=> 'shopay_theme_options_panel',\n\t 'section'\t\t=> 'shopay_general_group',\n\t 'capability' => 'edit_theme_options',\n\t 'theme_options' => '',\n\t 'title' \t=> __( 'Colors', 'shopay' )\n\t )\n\t )\n );\n\n /**\n * Base Colors Section\n *\n * Theme Options > General > Colors > Base Colors\n * @since 1.0.0\n */\n $wp_customize->add_section( new Shopay_Customize_Section(\n $wp_customize, 'shopay_section_base_colors',\n array(\n 'priority' => 10,\n 'panel' => 'shopay_theme_options_panel',\n 'section' => 'shopay_section_colors',\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'title' => __( 'Base Colors', 'shopay' )\n )\n )\n );\n\n /**\n * Changed the section for default color control\n *\n * Theme Options > General > Colors > Base Colors\n * @since 1.0.0\n */\n $wp_customize->get_control( 'background_color' )->section = 'shopay_section_base_colors';\n\n /**\n * Color option for Header Text color.\n *\n * Theme Options > General > Colors > Base Colors\n * @since 1.0.0\n */\n $wp_customize->add_setting( 'shopay_header_textcolor',\n array(\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'default' => '#000000',\n 'sanitize_callback' => 'sanitize_hex_color'\n )\n );\n\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize, 'shopay_header_textcolor',\n array(\n 'priority' => 5,\n 'section' => 'shopay_section_base_colors',\n 'settings' => 'shopay_header_textcolor',\n 'label' => __( 'Header Text Color', 'shopay' )\n )\n )\n );\n\n /**\n * Color option for primary theme color.\n *\n * Theme Options > General > Colors > Base Colors\n * @since 1.0.0\n */\n $wp_customize->add_setting( 'shopay_primary_color',\n array(\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'default' => '#ed6d23',\n 'sanitize_callback' => 'sanitize_hex_color'\n )\n );\n\n $wp_customize->add_control( new WP_Customize_Color_Control(\n $wp_customize, 'shopay_primary_color',\n array(\n 'priority' => 20,\n 'section' => 'shopay_section_base_colors',\n 'settings' => 'shopay_primary_color',\n 'label' => __( 'Theme Color', 'shopay' )\n )\n )\n );\n\n }", "title": "" }, { "docid": "4f43d4073879e7aceb9ec13b45eeb9d6", "score": "0.6684948", "text": "function shell_customizer_register( $wp_customize ) {\r\n\r\n\t/* Skin Count */\r\n\t$skin_count = count( shell_skins() );\r\n\r\n\t/* Add skin to customizer only if additional skin available */\r\n\tif ( $skin_count > 1 ){\r\n\r\n\t\t/* Get list of available skin */\r\n\t\t$skins = shell_skins();\r\n\t\t$skin_choices = array();\r\n\t\tforeach ( $skins as $skin_id => $skin_data ){\r\n\t\t\t$skin_choices[$skin_id] = $skin_data['name'];\r\n\t\t}\r\n\r\n\t\t/* Section */\r\n\t\t$wp_customize->add_section( 'shell_theme_skin_section', array(\r\n\t\t\t'title' => _x( 'Skins', 'customizer', 'shell' ),\r\n\t\t\t'priority' => 30,\r\n\t\t));\r\n\r\n\t\t/* Settings */\r\n\t\t$wp_customize->add_setting( 'shell_theme_settings[skin]', array(\r\n\t\t\t'default' => 'default',\r\n\t\t\t'type' => 'option',\r\n\t\t));\r\n\r\n\t\t/* Control: Select Skin */\r\n\t\t$wp_customize->add_control( new WP_Customize_Control(\r\n\t\t\t\t$wp_customize,\r\n\t\t\t\t'shell_theme_settings[skin]',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'label' => _x( 'Select Skin', 'customizer', 'shell' ),\r\n\t\t\t\t\t'section' => 'shell_theme_skin_section',\r\n\t\t\t\t\t'settings' => 'shell_theme_settings[skin]',\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'choices' => $skin_choices,\r\n\t\t\t\t)\r\n\t\t));\r\n\t}\r\n}", "title": "" }, { "docid": "8cb84f2b4831e120e64271c24cd047f3", "score": "0.6684929", "text": "function elablee_misc_customizer_home_section( $wp_customize ){\n class Elablee_Dropdown_Taxonomies_Control extends WP_Customize_Control {\n\n /**\n * Control type.\n *\n * @access public\n * @var string\n */\n public $type = 'dropdown-taxonomies';\n\n /**\n * Taxonomy.\n *\n * @access public\n * @var string\n */\n public $taxonomy = '';\n\n /**\n * Constructor.\n *\n * @since 1.0.0\n *\n * @param WP_Customize_Manager $manager Customizer bootstrap instance.\n * @param string $id Control ID.\n * @param array $args Optional. Arguments to override class property defaults.\n */\n public function __construct( $manager, $id, $args = array() ) {\n\n $our_taxonomy = 'category';\n if ( isset( $args['taxonomy'] ) ) {\n $taxonomy_exist = taxonomy_exists( $args['taxonomy'] );\n if ( true === $taxonomy_exist ) {\n $our_taxonomy = $args['taxonomy'];\n }\n }\n $args['taxonomy'] = $our_taxonomy;\n $this->taxonomy = $our_taxonomy;\n\n parent::__construct( $manager, $id, $args );\n }\n\n /**\n * Render content.\n *\n * @since 1.0.0\n */\n public function render_content() {\n\n $tax_args = array(\n 'hierarchical' => 0,\n 'taxonomy' => $this->taxonomy,\n );\n $all_taxonomies = get_categories( $tax_args );\n\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <?php if ( ! empty( $this->description ) ) : ?>\n <span class=\"description customize-control-description\"><?php echo $this->description; ?></span>\n <?php endif; ?>\n <select <?php $this->link(); ?>>\n <?php\n printf( '<option value=\"%s\" %s>%s</option>', 0, selected( $this->value(), '', false ), __( 'All', 'newsever' ) );\n ?>\n <?php if ( ! empty( $all_taxonomies ) ) : ?>\n <?php foreach ( $all_taxonomies as $key => $tax ) : ?>\n <?php\n printf( '<option value=\"%s\" %s>%s</option>', esc_attr( $tax->term_id ), selected( $this->value(), $tax->term_id, false ), esc_html( $tax->name ) );\n ?>\n <?php endforeach ?>\n <?php endif ?>\n </select>\n </label>\n <?php\n }\n }\n $wp_customize->add_section( 'elablee_home_section', [\n 'title' => __( 'Elablee Home Section', 'elablee' ),\n 'priority' => 30,\n 'panel' => 'elablee'\n ]);\n $wp_customize->add_setting( 'elablee_show_first_section_posts', [\n 'default' => false\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_show_first_section_posts_input',\n array(\n 'label' => __( 'Show First Section Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_show_first_section_posts',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => __( 'Yes', 'elablee' )\n ]\n )\n )\n );\n $wp_customize->add_setting( 'elablee_first_section_category_title', [\n 'default' => 'First Section',\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_first_section_category_title_input',\n array(\n 'label' => __( 'Second section Category Title', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_first_section_category_title',\n )\n )\n );\n $wp_customize->add_setting('elablee_first_section_posts', [\n 'default' => 0,\n ]);\n $wp_customize->add_control(\n new Elablee_Dropdown_Taxonomies_Control(\n $wp_customize,\n 'elablee_first_section_posts_widget_input',\n array(\n 'label' => __( 'First Section Slider Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_first_section_posts',\n 'type' => 'dropdown-taxonomies',\n 'taxonomy' => 'category',\n 'priority' => 23\n )\n )\n );\n $wp_customize->add_setting( 'elablee_show_second_section_posts', [\n 'default' => false\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_show_second_section_posts_input',\n array(\n 'label' => __( 'Show Second Section Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_show_second_section_posts',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => __( 'Yes', 'elablee' )\n ]\n )\n )\n );\n $wp_customize->add_setting( 'elablee_second_section_category_title', [\n 'default' => 'Second Section',\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_second_section_category_title_input',\n array(\n 'label' => __( 'Second section Category Title', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_second_section_category_title',\n )\n )\n );\n $wp_customize->add_setting('elablee_second_section_posts', [\n 'default' => 0,\n ]);\n $wp_customize->add_control(\n new Elablee_Dropdown_Taxonomies_Control(\n $wp_customize,\n 'elablee_second_section_posts_input',\n array(\n 'label' => __( 'Second Section Left Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_second_section_posts',\n 'type' => 'dropdown-taxonomies',\n 'taxonomy' => 'category',\n 'priority' => 23\n )\n )\n );\n $wp_customize->add_setting( 'elablee_show_third_section_posts', [\n 'default' => false\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_show_third_section_posts_input',\n array(\n 'label' => __( 'Show Third Section Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_show_third_section_posts',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => __( 'Yes', 'elablee' )\n ]\n )\n )\n );\n $wp_customize->add_setting( 'elablee_third_section_category_title', [\n 'default' => 'Third Section'\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_third_section_category_title_input',\n array(\n 'label' => __( 'Third section Category Title', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_third_section_category_title',\n )\n )\n );\n $wp_customize->add_setting('elablee_third_section_posts', [\n 'default' => 0,\n ]);\n $wp_customize->add_control(\n new Elablee_Dropdown_Taxonomies_Control(\n $wp_customize,\n 'elablee_third_section_posts_input',\n array(\n 'label' => __( 'Third Section Left Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_third_section_posts',\n 'type' => 'dropdown-taxonomies',\n 'taxonomy' => 'category',\n 'priority' => 23\n )\n )\n );\n\n $wp_customize->add_setting( 'elablee_show_fourth_section_posts', [\n 'default' => false\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_show_fourth_section_posts_input',\n array(\n 'label' => __( 'Show Fourth Section Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_show_fourth_section_posts',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => __( 'Yes', 'elablee' )\n ]\n )\n )\n );\n $wp_customize->add_setting( 'elablee_fourth_section_category_title', [\n 'default' => 'Fourth Section'\n ]);\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n 'elablee_fourth_section_category_title_input',\n array(\n 'label' => __( 'Fourth section Category Title', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_fourth_section_category_title',\n )\n )\n );\n $wp_customize->add_setting('elablee_fourth_section_posts', [\n 'default' => 0,\n ]);\n $wp_customize->add_control(\n new Elablee_Dropdown_Taxonomies_Control(\n $wp_customize,\n 'elablee_fourth_section_posts_ctegory',\n array(\n 'label' => __( 'Fourth Section Left Posts', 'elablee' ),\n 'section' => 'elablee_home_section',\n 'settings' => 'elablee_fourth_section_posts',\n 'type' => 'dropdown-taxonomies',\n 'taxonomy' => 'category',\n 'priority' => 23\n )\n )\n );\n}", "title": "" }, { "docid": "518c07fbf0ee53980ae0f4b8b92dc14c", "score": "0.66844887", "text": "function ls_custom_css_section_cb(){\n echo \"Customize LightSaber Theme with your own CSS\";\n}", "title": "" }, { "docid": "1f27bc0e3f5a61662f985b380a160093", "score": "0.6674574", "text": "function sections_register() { \n\t// creating (registering) the custom type \n\tregister_post_type( 'sections', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */\n\t \t// let's now add all the options for this post type\n\t\tarray('labels' => array(\n\t\t\t'name' => __('Page Sections', 'post type general name'), /* This is the Title of the Group */\n\t\t\t'singular_name' => __('section', 'post type singular name'), /* This is the individual type */\n\t\t\t'add_new' => __('Add New', 'custom post type item'), /* The add new menu item */\n\t\t\t'add_new_item' => __('Add New Page Section'), /* Add New Display Title */\n\t\t\t'edit' => __( 'Edit' ), /* Edit Dialog */\n\t\t\t'edit_item' => __('Edit Page Sections'), /* Edit Display Title */\n\t\t\t'new_item' => __('New Page Section'), /* New Display Title */\n\t\t\t'view_item' => __('View Page Section'), /* View Display Title */\n\t\t\t'search_items' => __('Search Page Sections'), /* Search Custom Type Title */ \n\t\t\t'not_found' => __('Nothing found in the Database.'), /* This displays if there are no entries yet */ \n\t\t\t'not_found_in_trash' => __('Nothing found in Trash'), /* This displays if there is nothing in the trash */\n\t\t\t'parent_item_colon' => ''\n\t\t\t), /* end of arrays */\n\t\t\t'description' => __( 'For Single Page Website, Use these Sections to Fill Page' ), /* Custom Type Description */\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'menu_position' => 20, /* this is what order you want it to appear in on the left hand side menu */ \n\t\t\t'menu_icon' => get_stylesheet_directory_uri() . '/library/images/post-sections.png', /* the icon for the custom post type menu */\n\t\t\t'rewrite' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' =>true,\n\t\t\t/* the next one is important, it tells what's enabled in the post editor */\n\t\t\t'supports' => array( 'title', 'editor','thumbnail')\n\t \t) /* end of options */\n\t); /* end of register post type */\n}", "title": "" }, { "docid": "b0e9c7e5ad99cc1a4f21644de975576f", "score": "0.66739553", "text": "protected function _register_controls()\n {\n $this->start_controls_section(\n 'left_section_settings',\n [\n 'label' => __('Left settings', 'elementor-hello-world'),\n ]\n );\n \n $this->add_control(\n 'title',\n [\n 'label' => __('Title', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXT,\n 'default' => 'Do you have any question about us? Say hello'\n ]\n );\n \n $this->add_control(\n 'description',\n [\n 'label' => __('Description', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXTAREA,\n ]\n );\n \n $this->end_controls_section();\n \n $this->start_controls_section(\n 'right_section_settings',\n [\n 'label' => __('Right settings', 'elementor-hello-world'),\n ]\n );\n \n $this->add_control(\n 'button_name',\n [\n 'label' => __('Button Name', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n \n $this->add_control(\n 'button_link',\n [\n 'label' => __('Button Link', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n \n $this->end_controls_section();\n }", "title": "" }, { "docid": "fb46d32730ec71ad853d43783f7381e9", "score": "0.66578066", "text": "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if (is_dir($sample_patterns_path)) :\n\n if ($sample_patterns_dir = opendir($sample_patterns_path)) :\n $sample_patterns = array();\n\n while (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'wppm'), $this->theme->display('Name'));\n \n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n <?php if ($screenshot) : ?>\n <?php if (current_user_can('edit_theme_options')) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n <img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display('Name'); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf(__('By %s', 'wppm'), $this->theme->display('Author')); ?></li>\n <li><?php printf(__('Version %s', 'wppm'), $this->theme->display('Version')); ?></li>\n <li><?php echo '<strong>' . __('Tags', 'wppm') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n <?php\n if ($this->theme->parent()) {\n printf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'wppm'), $this->theme->parent()->display('Name'));\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if (file_exists(dirname(__FILE__) . '/info-html.html')) {\n /** @global WP_Filesystem_Direct $wp_filesystem */\n global $wp_filesystem;\n if (empty($wp_filesystem)) {\n require_once(ABSPATH . '/wp-admin/includes/file.php');\n WP_Filesystem();\n }\n $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n }\n\n\n\n\n // ACTUAL DECLARATION OF SECTIONS\n if (file_exists(dirname(__FILE__) . '/../DOCUMENTATION.md')) {\n $this->sections['plugin_docs'] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Getting Started', 'wppm'),\n 'fields' => array(\n array(\n 'id' => '17',\n 'type' => 'raw',\n 'markdown' => true,\n 'content' => file_get_contents(dirname(__FILE__) . '/../DOCUMENTATION.md')\n ),\n ),\n );\n }\n\n\n $this->sections[] = array(\n 'title' => __('General Settings', 'wppm'),\n 'desc' => __('Put in a description here', 'wppm'),\n 'icon' => 'el-icon-home',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => 'opt-company-name',\n 'type' => 'text',\n 'title' => __('Company Name', 'wppm'),\n ),\n \n array(\n 'id' => 'opt-bootstrap',\n 'type' => 'radio',\n 'title' => __('How would you like us to load Twitter Bootstrap?', 'wppm'),\n \n //Must provide key => value pairs for radio options\n 'options' => array(\n '1' => 'Load it from the CDN (//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css/js)', \n '2' => 'Load it from within this plugin. (Will overwrite if you already use bootstrap in your theme.)', \n '3' => 'I already have it loaded in another theme/plugin. Load it from there!'\n ),\n 'default' => '2'\n ),\n\n \n \n \n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-cogs',\n 'title' => __('Listing Archive Page', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'section-la-opt-start',\n 'type' => 'section',\n 'title' => __( 'Archive Page Options', 'wppm' ),\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'enable-listing-age',\n 'type' => 'checkbox',\n 'title' => __('Enable Listing Age', 'wppm'),\n 'subtitle' => __('This will display the age of the listing at the bottom of the listing.', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'section-la-opts-end',\n 'type' => 'section',\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'section-hooks-start',\n 'type' => 'section',\n 'title' => __( 'Archive Page Hooks', 'wppm' ),\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'hook-archive-top',\n 'type' => 'editor',\n 'args' => array(),\n 'title' => __('Top HTML', 'wppm'),\n 'subtitle' => __('This is text (HTML) that is displayed above the list of listings. It is optional.', 'wppm'),\n 'default' => '',\n ),\n array(\n 'id' => 'hook-archive-sidebar-bottom',\n 'type' => 'editor',\n 'args' => array(),\n 'title' => __('Sidebar Bottom HTML', 'wppm'),\n 'subtitle' => __('This is text (HTML) that is displayed below the list of units in the right sidebar of the archive page. It is optional.', 'wppm'),\n 'default' => '',\n ),\n array(\n 'id' => 'hook-archive-bottom',\n 'type' => 'editor',\n 'args' => array(),\n 'title' => __('Bottom HTML', 'wppm'),\n 'subtitle' => __('This is text (HTML) that is displayed at the bottom of the archive page. It is optional.', 'wppm'),\n 'default' => '',\n ),\n array(\n 'id' => 'section-hooks-end',\n 'type' => 'section',\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-website',\n 'title' => __('Single Listing Page', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'section-single-opt-start',\n 'type' => 'section',\n 'title' => __( 'Single Page Options', 'wppm' ),\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'enable-google-map',\n 'type' => 'checkbox',\n 'title' => __('Globally Enable Google Maps', 'wppm'),\n 'subtitle' => __('This makes Google Maps show on all listings, this can be overwritten on the individual listing page.', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'enable-sv',\n 'type' => 'checkbox',\n 'title' => __('Globally Enable Google Street View', 'wppm'),\n 'subtitle' => __('This makes Google Street View show on all listings, this can be overwritten on the individual listing page.', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'section-single-opts-end',\n 'type' => 'section',\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'section-hooks-start',\n 'type' => 'section',\n 'title' => __( 'Single Page Hooks', 'wppm' ),\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n array(\n 'id' => 'hook-single-top',\n 'type' => 'editor',\n 'args' => array(),\n 'title' => __('Top HTML', 'wppm'),\n 'subtitle' => __('This is text (HTML) that is displayed above the listings. It is optional.', 'wppm'),\n 'default' => '',\n ),\n array(\n 'id' => 'hook-single-bottom',\n 'type' => 'editor',\n 'args' => array(),\n 'title' => __('Bottom HTML', 'wppm'),\n 'subtitle' => __('This is text (HTML) that is displayed at the bottom of the listing. It is optional.', 'wppm'),\n 'default' => '',\n ),\n array(\n 'id' => 'section-hooks-end',\n 'type' => 'section',\n 'indent' => false, // Indent all options below until the next 'section' option is set.\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Document Settings', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'opt-enable-app-download',\n 'type' => 'checkbox',\n 'title' => __('Enable Application Downloads', 'wppm'),\n 'subtitle' => __('This will allow users to download an Application for Rent. (You can upload your application below)', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'opt-default-application',\n 'type' => 'media',\n 'title' => __('Fallback Application to Rent', 'wppm'),\n 'preview' => false,\n 'mode' => '',\n 'subtitle' => __('Upload your fallback Application to Rent. This can be overwritten on individual property pages if you have different applications for different properties.', 'wppm')\n ),\n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Email Settings', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'opt-enable-email-a-friend',\n 'type' => 'checkbox',\n 'title' => __('Enable Email To A Friend', 'wppm'),\n 'subtitle' => __('This will allow users to email properties to a friend.', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'opt-eaf-from',\n 'type' => 'text',\n 'title' => __('\"From\" Email Address', 'wppm'),\n 'subtitle' => __('Enter a valid email address that the \"Email A Friend\" emails will be sent from.', 'wppm'),\n 'validate' => 'email',\n 'msg' => 'Please enter a valid email address.',\n 'default' => get_bloginfo('admin_email'),\n ),\n array(\n 'id' => 'opt-eaf-subject',\n 'type' => 'text',\n 'title' => __('Email Subject', 'wppm'),\n ),\n array(\n 'id' => 'opt-eaf-template',\n 'type' => 'editor',\n 'args' => array('media_buttons' => false),\n 'title' => __('Email A Friend Template', 'wppm'),\n 'subtitle' => __('You can use the following fields from the Email A Friend Form: {{property-link}}, {{your-name}}, {{your-email}}, {{friends-name}}, {{friends-email}} ', 'wppm'),\n 'default' => '',\n ),\n ),\n );\n\n\n\n\n\n\n \n \n /*$this->sections[] = array(\n 'icon' => 'el-icon-check',\n 'title' => __('Radio/Checkbox Fields', 'wppm'),\n 'desc' => __('<p class=\"description\">This is the Description. Again HTML is allowed</p>', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'opt-checkbox',\n 'type' => 'checkbox',\n 'title' => __('Checkbox Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'default' => '1'// 1 = on | 0 = off\n ),\n array(\n 'id' => 'opt-multi-check',\n 'type' => 'checkbox',\n 'title' => __('Multi Checkbox Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value pairs for multi checkbox options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ),\n \n //See how std has changed? you also don't need to specify opts that are 0.\n 'default' => array(\n '1' => '1', \n '2' => '0', \n '3' => '0'\n )\n ),\n array(\n 'id' => 'opt-checkbox-data',\n 'type' => 'checkbox',\n 'title' => __('Multi Checkbox Option (with menu data)', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'data' => 'menu'\n ),\n array(\n 'id' => 'opt-checkbox-sidebar',\n 'type' => 'checkbox',\n 'title' => __('Multi Checkbox Option (with sidebar data)', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'data' => 'sidebars'\n ),\n array(\n 'id' => 'opt-radio',\n 'type' => 'radio',\n 'title' => __('Radio Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value pairs for radio options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'opt-radio-data',\n 'type' => 'radio',\n 'title' => __('Multi Checkbox Option (with menu data)', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'data' => 'menu'\n ),\n array(\n 'id' => 'opt-image-select',\n 'type' => 'image_select',\n 'title' => __('Images Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value(array:title|img) pairs for radio options\n 'options' => array(\n '1' => array('title' => 'Opt 1', 'img' => 'images/align-none.png'),\n '2' => array('title' => 'Opt 2', 'img' => 'images/align-left.png'),\n '3' => array('title' => 'Opt 3', 'img' => 'images/align-center.png'),\n '4' => array('title' => 'Opt 4', 'img' => 'images/align-right.png')\n ), \n 'default' => '2'\n ),\n array(\n 'id' => 'opt-image-select-layout',\n 'type' => 'image_select',\n 'title' => __('Images Option for Layout', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This uses some of the built in images, you can use them for layout options.', 'wppm'),\n \n //Must provide key => value(array:title|img) pairs for radio options\n 'options' => array(\n '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n '2' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png'),\n '3' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '4' => array('alt' => '3 Column Middle', 'img' => ReduxFramework::$_url . 'assets/img/3cm.png'),\n '5' => array('alt' => '3 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/3cl.png'),\n '6' => array('alt' => '3 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/3cr.png')\n ), \n 'default' => '2'\n ),\n array(\n 'id' => 'opt-sortable',\n 'type' => 'sortable',\n 'title' => __('Sortable Text Option', 'wppm'),\n 'subtitle' => __('Define and reorder these however you want.', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'options' => array(\n 'si1' => 'Item 1',\n 'si2' => 'Item 2',\n 'si3' => 'Item 3',\n )\n ),\n array(\n 'id' => 'opt-check-sortable',\n 'type' => 'sortable',\n 'mode' => 'checkbox', // checkbox or text\n 'title' => __('Sortable Text Option', 'wppm'),\n 'subtitle' => __('Define and reorder these however you want.', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'options' => array(\n 'si1' => 'Item 1',\n 'si2' => 'Item 2',\n 'si3' => 'Item 3',\n )\n ),\n )\n );*/\n \n /*$this->sections[] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Select Fields', 'wppm'),\n 'desc' => __('<p class=\"description\">This is the Description. Again HTML is allowed</p>', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'opt-select',\n 'type' => 'select',\n 'title' => __('Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value pairs for select options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'opt-multi-select',\n 'type' => 'select',\n 'multi' => true,\n 'title' => __('Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value pairs for radio options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ), \n 'required' => array('select', 'equals', array('1', '3')),\n 'default' => array('2', '3')\n ),\n array(\n 'id' => 'opt-select-image',\n 'type' => 'select_image',\n 'title' => __('Select Image', 'wppm'),\n 'subtitle' => __('A preview of the selected image will appear underneath the select box.', 'wppm'),\n 'options' => $sample_patterns,\n // Alternatively\n //'options' => Array(\n // 'img_name' => 'img_path'\n // )\n 'default' => 'tree_bark.png',\n ),\n array(\n 'id' => 'opt-info',\n 'type' => 'info',\n 'desc' => __('You can easily add a variety of data from WordPress.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-categories',\n 'type' => 'select',\n 'data' => 'categories',\n 'title' => __('Categories Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-categories-multi',\n 'type' => 'select',\n 'data' => 'categories',\n 'multi' => true,\n 'title' => __('Categories Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-pages',\n 'type' => 'select',\n 'data' => 'pages',\n 'title' => __('Pages Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-pages',\n 'type' => 'select',\n 'data' => 'pages',\n 'multi' => true,\n 'title' => __('Pages Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-tags',\n 'type' => 'select',\n 'data' => 'tags',\n 'title' => __('Tags Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-tags',\n 'type' => 'select',\n 'data' => 'tags',\n 'multi' => true,\n 'title' => __('Tags Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-menus',\n 'type' => 'select',\n 'data' => 'menus',\n 'title' => __('Menus Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-menus',\n 'type' => 'select',\n 'data' => 'menu',\n 'multi' => true,\n 'title' => __('Menus Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-post-type',\n 'type' => 'select',\n 'data' => 'post_type',\n 'title' => __('Post Type Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-post-type',\n 'type' => 'select',\n 'data' => 'post_type',\n 'multi' => true,\n 'title' => __('Post Type Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-sortable',\n 'type' => 'select',\n 'data' => 'post_type',\n 'multi' => true,\n 'sortable' => true,\n 'title' => __('Post Type Multi Select Option + Sortable', 'wppm'),\n 'subtitle' => __('This field also has sortable enabled!', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-posts',\n 'type' => 'select',\n 'data' => 'post',\n 'title' => __('Posts Select Option2', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-multi-select-posts',\n 'type' => 'select',\n 'data' => 'post',\n 'multi' => true,\n 'title' => __('Posts Multi Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-roles',\n 'type' => 'select',\n 'data' => 'roles',\n 'title' => __('User Role Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-capabilities',\n 'type' => 'select',\n 'data' => 'capabilities',\n 'multi' => true,\n 'title' => __('Capabilities Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n ),\n array(\n 'id' => 'opt-select-elusive',\n 'type' => 'select',\n 'data' => 'elusive-icons',\n 'title' => __('Elusive Icons Select Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('Here\\'s a list of all the elusive icons by name and icon.', 'wppm'),\n ),\n )\n );*/\n\n \n \n // You can append a new section at any time.\n /*$this->sections[] = array(\n 'icon' => 'el-icon-eye-open',\n 'title' => __('Additional Fields', 'wppm'),\n 'desc' => __('<p class=\"description\">This is the Description. Again HTML is allowed</p>', 'wppm'),\n 'fields' => array(\n array(\n 'id' => 'opt-datepicker',\n 'type' => 'date',\n 'title' => __('Date Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm')\n ),\n array(\n 'id' => 'opt-divide',\n 'type' => 'divide'\n ),\n array(\n 'id' => 'opt-button-set',\n 'type' => 'button_set',\n 'title' => __('Button Set Option', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n \n //Must provide key => value pairs for radio options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ), \n 'default' => '2'\n ),\n array(\n 'id' => 'opt-button-set-multi',\n 'type' => 'button_set',\n 'title' => __('Button Set, Multi Select', 'wppm'),\n 'subtitle' => __('No validation can be done on this field type', 'wppm'),\n 'desc' => __('This is the description field, again good for additional info.', 'wppm'),\n 'multi' => true,\n \n //Must provide key => value pairs for radio options\n 'options' => array(\n '1' => 'Opt 1', \n '2' => 'Opt 2', \n '3' => 'Opt 3'\n ), \n 'default' => array('2', '3')\n ),\n array(\n 'id' => 'opt-info-field',\n 'type' => 'info',\n 'required' => array('18', 'equals', array('1', '2')),\n 'desc' => __('This is the info field, if you want to break sections up.', 'wppm')\n ),\n array(\n 'id' => 'opt-info-warning',\n 'type' => 'info',\n 'style' => 'warning',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info field with the warning style applied and a header.', 'wppm')\n ),\n array(\n 'id' => 'opt-info-success',\n 'type' => 'info',\n 'style' => 'success',\n 'icon' => 'el-icon-info-sign',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info field with the success style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-info-critical',\n 'type' => 'info',\n 'style' => 'critical',\n 'icon' => 'el-icon-info-sign',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info field with the critical style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-raw_info',\n 'type' => 'info',\n 'required' => array('18', 'equals', array('1', '2')),\n 'raw_html' => true,\n 'desc' => $sampleHTML,\n ),\n array(\n 'id' => 'opt-info-normal',\n 'type' => 'info',\n 'notice' => true,\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info notice field with the normal style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-notice-info',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'info',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info notice field with the info style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-notice-warning',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'warning',\n 'icon' => 'el-icon-info-sign',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info notice field with the warning style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-notice-success',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'success',\n 'icon' => 'el-icon-info-sign',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an info notice field with the success style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-notice-critical',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'critical',\n 'icon' => 'el-icon-info-sign',\n 'title' => __('This is a title.', 'wppm'),\n 'desc' => __('This is an notice field with the critical style applied, a header and an icon.', 'wppm')\n ),\n array(\n 'id' => 'opt-custom-callback',\n 'type' => 'callback',\n 'title' => __('Custom Field Callback', 'wppm'),\n 'subtitle' => __('This is a completely unique field type', 'wppm'),\n 'desc' => __('This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'wppm'),\n 'callback' => 'redux_my_custom_field'\n ),\n )\n );*/\n\n /*$this->sections[] = array(\n 'title' => __('Import / Export', 'wppm'),\n 'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'wppm'),\n 'icon' => 'el-icon-refresh',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your Redux options',\n 'full_width' => false,\n ),\n ),\n ); */ \n \n $this->sections[] = array(\n 'type' => 'divide',\n );\n\n $theme_info = '<div class=\"redux-framework-section-desc\">';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-uri\">' . __('<strong>Plugin URL:</strong> ', 'wppm') . '<a href=\"http://www.wp-property-manager.com\" target=\"_blank\">WP-Property-Manager.com</a></p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-author\">' . __('<strong>Author:</strong> ', 'wppm') . 'Jay Pedersen</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-version\">' . __('<strong>Version:</strong> ', 'wppm') .'0.8</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-description\">WP Property Manger is a Wordpress plugin that allows you to beautifully display properties for rent.</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description heme-uri\"><a target=\"_blank\" href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PXLBAMLFKX8AN\">Donate to support further development of this plugin</a></p>';\n $theme_info .= '</div>';\n\n $this->sections[] = array(\n 'icon' => 'el-icon-info-sign',\n 'title' => __('Plugin Information', 'wppm'),\n 'desc' => __($theme_info, 'wppm'),\n );\n\n if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {\n $tabs['docs'] = array(\n 'icon' => 'el-icon-book',\n 'title' => __('Documentation', 'wppm'),\n 'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html'))\n );\n }\n }", "title": "" }, { "docid": "8524af852c4cebc2681c023624455581", "score": "0.6656089", "text": "function neuf_customize_register( $wp_customize ) {\n\n /* Footer Section */\n $wp_customize->add_section( 'neuf_footer_section' , array(\n 'title' => __( 'Footer text', 'neuf' ),\n 'priority' => 30,\n ) );\n $wp_customize->add_setting( 'footer_kolofon' , array(\n 'default' => '',\n ) );\n $wp_customize->add_control(\n new Customize_Textarea_Control( $wp_customize, 'footer_kolofon', array(\n 'label' => __( 'Text (address, editor, etc)', 'neuf'),\n 'section' => 'neuf_footer_section',\n 'settings' => 'footer_kolofon',\n ) )\n );\n}", "title": "" }, { "docid": "bae5bdb6f328faccc1d29a74f7694fe1", "score": "0.66542476", "text": "function ucfwp_define_customizer_sections( $wp_customize ) {\n\t$wp_customize->add_section(\n\t\tUCFWP_THEME_CUSTOMIZER_PREFIX . 'nav_settings',\n\t\tarray(\n\t\t\t'title' => 'Navigation Settings',\n\t\t\t'panel' => 'nav_menus'\n\t\t)\n\t);\n\n\t$wp_customize->add_section(\n\t\tUCFWP_THEME_CUSTOMIZER_PREFIX . 'icons',\n\t\tarray(\n\t\t\t'title' => 'Icons'\n\t\t)\n\t);\n\n\t$wp_customize->add_section(\n\t\tUCFWP_THEME_CUSTOMIZER_PREFIX . 'webfonts',\n\t\tarray(\n\t\t\t'title' => 'Web Fonts'\n\t\t)\n\t);\n\n\t$wp_customize->add_section(\n\t\tUCFWP_THEME_CUSTOMIZER_PREFIX . 'analytics',\n\t\tarray(\n\t\t\t'title' => 'Analytics'\n\t\t)\n\t);\n\n\t$wp_customize->add_section(\n\t\tUCFWP_THEME_CUSTOMIZER_PREFIX . 'performance',\n\t\tarray(\n\t\t\t'title' => 'Performance'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "d6ca8879ead9b6f946bb5ef82c194c80", "score": "0.66506195", "text": "function wcnc2015_customizer( $wp_customize ) {\n\n\t// First, add a new section\n\t// (if you don't want to use one of\n\t// the default customizer sections)\n\t$wp_customize->add_section(\n\t\t'wcnc2015-demo-settings',\n\t\tarray(\n\t\t\t'title'\t\t\t=> 'Demo Settings',\n\t\t\t'description'\t=> 'These are demo settings.',\n\t\t\t'priority'\t\t=> 12\n\t\t)\n\t);\n\n\t// Second, add your settings\n\t// (we're duplicationg the settings\n\t// we created on our options page)\n\t$wp_customize->add_setting(\n\t\t'my-options-data[extra_tagline]',\n\t\tarray(\n\t\t\t'type'\t\t=> 'option', // could also use 'theme_mod'\n\t\t\t'sanitize_callback'\t=> 'text_washing_machine',\n\t\t\t'default'\t\t\t=> wcnc2015_get_option( 'extra_tagline' )\n\t\t)\n\t);\n\t$wp_customize->add_setting(\n\t\t'my-options-data[footer_text]',\n\t\tarray(\n\t\t\t'type'\t\t=> 'option', // could also use 'theme_mod'\n\t\t\t'sanitize_callback'\t=> 'text_washing_machine',\n\t\t\t'default'\t\t\t=> wcnc2015_get_option( 'footer_text' )\n\t\t)\n\t);\n\n\t// Third, add your controls (fields)\n\t$wp_customize->add_control(\n\t\t'my-options-data[extra_tagline]',\n\t\tarray(\n\t\t\t'label'\t\t=> 'Extra Header Tagline',\n\t\t\t'section'\t=> 'wcnc2015-demo-settings',\n\t\t\t'type'\t\t=> 'text'\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'my-options-data[footer_text]',\n\t\tarray(\n\t\t\t'label'\t\t=> 'Footer Text',\n\t\t\t'section'\t=> 'wcnc2015-demo-settings',\n\t\t\t'type'\t\t=> 'text'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "094445f2812890eeaf35ee96b313bcfe", "score": "0.6648395", "text": "function di_defaults_customizer_register( $wp_customize ) {\n\n\t// Defaults panel (Display Defaults)\n\t$wp_customize->add_panel( 'di_display_defaults',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => __( 'Display Defaults', 'display-innovations' ),\n\t\t\t'description' => __( 'Manage Display Defaults.', 'display-innovations' ),\n\t\t) );\n\t// Add Section (Default Banner)\n\t$wp_customize->add_section( 'di_section_default_banner',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => __( 'Default Banner', 'display-innovations' ),\n\t\t\t'description' => 'The Default Banner ( used by the default banner option in Displays',\n\t\t\t'panel' => 'di_display_defaults',\n\t\t) );\n\t// Create a setting for the site logo\n\t$wp_customize->add_setting( 'di_default_banner' );\n\t// Bind a control to setting for site logo\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'di_default_banner',\n\t\tarray(\n\t\t\t'label' => 'Upload Default Banner',\n\t\t\t'section' => 'di_section_default_banner',\n\t\t\t'settings' => 'di_default_banner',\n\t\t) ) );\n\n\t$wp_customize->add_section( 'di_section_social',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => __( 'Social Icons', 'display-innovations' ),\n\t\t\t'description' => 'Social Icon Options',\n\t\t\t'panel' => 'di_display_defaults',\n\t\t) );\n\n\t$wp_customize->add_setting( 'di_social_twitter' );\n\t$wp_customize->add_control( 'di_social_twitter',\n\t\tarray(\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 10,\n\t\t\t'section' => 'di_section_social',\n\t\t\t'label' => __( 'Twitter Name', 'display-innovations' ),\n\t\t\t'description' => 'Enter Your Twitter name',\n\t\t) );\n\t$wp_customize->add_setting( 'di_social_linkedin' );\n\t$wp_customize->add_control( 'di_social_linkedin',\n\t\tarray(\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 10,\n\t\t\t'section' => 'di_section_social',\n\t\t\t'label' => __( 'linkedIn Name', 'display-innovations' ),\n\t\t\t'description' => 'Enter Your linkedIn name',\n\t\t) );\n\t$wp_customize->add_setting( 'di_social_youtube' );\n\t$wp_customize->add_control( 'di_social_youtube',\n\t\tarray(\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 10,\n\t\t\t'section' => 'di_section_social',\n\t\t\t'label' => __( 'YouTube Name', 'display-innovations' ),\n\t\t\t'description' => 'Enter Your YouTube name',\n\t\t) );\n\n\n\t// Add Section (default Tech spec text)\n\t$wp_customize->add_section( 'di_section_tech_specs',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => __( 'Technical Specs', 'display-innovations' ),\n\t\t\t'description' => '',\n\t\t\t'panel' => 'di_display_defaults',\n\t\t) );\n\t// Create a setting for the default Tech spec text\n\t$wp_customize->add_setting( 'di_default_tech_specs',\n\t\tarray(\n\t\t\t'default' => '',\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => '',\n\t\t\t//'sanitize_callback' => 'esc_textarea',\n\t\t) );\n\t// Bind a control to setting for default Tech spec text\n\t$wp_customize->add_control( 'di_default_tech_specs',\n\t\tarray(\n\t\t\t'type' => 'textarea',\n\t\t\t'priority' => 10,\n\t\t\t'section' => 'di_section_tech_specs',\n\t\t\t'label' => __( 'Default Technical Specs', 'display-innovations' ),\n\t\t\t'description' => 'Default Technical Specifications',\n\t\t) );\n\n\n}", "title": "" }, { "docid": "630ef0b69b4ded6ba6310216f9959b4b", "score": "0.6646828", "text": "public function customize_register_panel( $wp_customize ) {\r\n\r\n\t\t\t/**\r\n\t\t\t * Register Extended Panel\r\n\t\t\t */\r\n\t\t\t$wp_customize->register_panel_type( 'Astra_WP_Customize_Panel' );\r\n\t\t\t$wp_customize->register_section_type( 'Astra_WP_Customize_Section' );\r\n\t\t\t$wp_customize->register_section_type( 'Astra_WP_Customize_Separator' );\r\n\r\n\t\t\tif ( ! defined( 'ASTRA_EXT_VER' ) ) {\r\n\t\t\t\t$wp_customize->register_section_type( 'Astra_Pro_Customizer' );\r\n\t\t\t}\r\n\r\n\t\t\t// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/extend-customizer/class-astra-wp-customize-panel.php';\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/extend-customizer/class-astra-wp-customize-section.php';\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/extend-customizer/class-astra-wp-customize-separator.php';\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/customizer-controls.php';\r\n\t\t\t// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\r\n\r\n\t\t\t/**\r\n\t\t\t * Add Controls\r\n\t\t\t */\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'color',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'WP_Customize_Color_Control',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_hex_color' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-sortable',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Sortable',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-radio-image',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Radio_Image',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-slider',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Slider',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive-slider',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive_Slider',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_typo' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive-spacing',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive_Spacing',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-divider',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Divider',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-heading',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Heading',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-hidden',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Hidden',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-link',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Link',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-color',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Color',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-description',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Description',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-background',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Background',\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_background_obj' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'image',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'WP_Customize_Image_Control',\r\n\t\t\t\t\t'sanitize_callback' => 'esc_url_raw',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-font',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Typography',\r\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'number',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-border',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Border',\r\n\t\t\t\t\t'santize_callback' => 'sanitize_border',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive-color',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive_Color',\r\n\t\t\t\t\t'santize_callback' => 'sanitize_responsive_color',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Add Controls\r\n\t\t\t */\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive-background',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive_Background',\r\n\t\t\t\t\t'santize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_background' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-customizer-link',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Customizer_Link',\r\n\t\t\t\t\t'santize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_customizer_links' ),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-settings-group',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Settings_Group',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-select',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Select',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tAstra_Customizer_Control_Base::add_control(\r\n\t\t\t\t'ast-responsive-select',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'callback' => 'Astra_Control_Responsive_Select',\r\n\t\t\t\t\t'sanitize_callback' => '',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Helper files\r\n\t\t\t */\r\n\t\t\t// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/class-astra-customizer-partials.php';\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/class-astra-customizer-callback.php';\r\n\t\t\trequire ASTRA_THEME_DIR . 'inc/customizer/class-astra-customizer-sanitizes.php';\r\n\t\t\t// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\r\n\t\t}", "title": "" }, { "docid": "d67d4c8c14b641dfc06fe2be2fb9d3de", "score": "0.6642353", "text": "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Carousel Settings', 'xstore-core' ),\n\t\t\t\t'tab' \t=> \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'space',\n\t\t\t[\n\t\t\t\t'label' \t=>\t__( 'Add space between slides', 'xstore-core' ),\n\t\t\t\t'type' \t\t=>\t\\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t'multiple' \t=>\tfalse,\n\t\t\t\t'options' \t=>\tarray(\n\t\t\t\t\t'yes' \t=> esc_html__('Yes', 'xstore-core'),\n\t\t\t\t\t'no' \t=> esc_html__('No', 'xstore-core'),\n\t\t\t\t),\n\t\t\t\t'default' \t=>\t'',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'el_class',\n\t\t\t[\n\t\t\t\t'label' \t=> __( 'Extra Class', 'xstore-core' ),\n\t\t\t\t'type' \t\t=>\t\\Elementor\\Controls_Manager::TEXT,\n\t\t\t]\n\t\t);\n\n\t\t// Get slider controls from trait\n\t\tElementor::get_slider_params( $this );\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'banner_item_settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Banner With Mask Item', 'xstore-core' ),\n\t\t\t\t'tab' \t=> \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$repeater = new \\Elementor\\Repeater();\n\n\t\tElementor::get_banner_with_mask( $repeater, true );\n\n\t\t$this->add_control(\n\t\t\t'banner_with_mask',\n\t\t\t[\n\t\t\t\t'label' => __( 'Banner With Mask', 'xstore-core' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'title' => __( 'Banner With Mask', 'xstore-core' ),\n\t\t\t\t\t\t'content' => __( 'Banner With Mask Item.', 'xstore-core' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t}", "title": "" }, { "docid": "a19fb7bdd1dfcd4bf2ac317d286a58ef", "score": "0.6639279", "text": "function lila_customize_register( $wp_customize ) {\n $wp_customize->add_section( 'lila_front_page', array(\n 'title' => 'Front Page Header',\n 'description' => 'Options for the front page.',\n 'priority' => 35,\n )\n );\n\n // Add round icon scheme setting and control.\n $wp_customize->add_setting( 'lila_front_page_image', array(\n 'type' => 'theme_mod',\n 'default' => get_template_directory_uri() . '/images/icon.jpg',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n\n $wp_customize->add_control(\n new WP_Customize_Image_Control( $wp_customize,\n 'lila_front_page_image', array(\n 'label' => 'Round Icon Image',\n 'description' => 'Square image will look best.',\n 'settings' => 'lila_front_page_image',\n 'section' => 'lila_front_page',\n ) ) );\n\n // Add speech bubble text setting and control.\n $wp_customize->add_setting( 'lila_front_page_speech_bubble', array(\n 'type' => 'theme_mod', // default value\n 'default' => 'Hello!',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'lila_sanitize_text',\n ) );\n\n $wp_customize->add_control( 'lila_front_page_speech_bubble', array(\n 'type' => 'text',\n 'default' => 'Speech!',\n 'priority' => 10,\n 'section' => 'lila_front_page',\n 'label' => __( 'Speech Bubble', 'lila' ),\n 'active_callback' => 'is_front_page',\n 'settings' => 'lila_front_page_speech_bubble',\n ) );\n\n // Add text blurb setting and control.\n $wp_customize->add_setting( 'lila_front_page_blurb', array(\n 'type' => 'theme_mod', // default value\n 'default' => 'I\\'m sure you have interesting stuff to say. You should probably put that stuff here.',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'lila_sanitize_text',\n ) );\n\n $wp_customize->add_control( 'lila_front_page_blurb', array(\n 'type' => 'textarea',\n 'priority' => 15,\n 'section' => 'lila_front_page',\n 'label' => __( 'Blurb', 'lila' ),\n 'description' => __( 'Text under the speech bubble.', 'lila' ),\n 'active_callback' => 'is_front_page',\n 'settings' => 'lila_front_page_blurb',\n ) );\n\n // Add footer section to customizer.\n $wp_customize->add_section( 'lila_footer', array(\n 'title' => 'Footer',\n 'description' => 'Options for the footer.',\n 'priority' => 45,\n )\n );\n\n // Add colophon setting and control.\n $wp_customize->add_setting( 'lila_colophon', array(\n 'type' => 'theme_mod', // default value\n 'default' => '&copy; Your Stuff Here',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'lila_sanitize_text',\n ) );\n\n $wp_customize->add_control( 'lila_colophon', array(\n 'priority' => 5,\n 'section' => 'lila_footer',\n 'label' => __( 'Colophon', 'lila' ),\n 'settings' => 'lila_colophon',\n ) );\n}", "title": "" } ]
e4782c73062d8ca7fd80d0e04018117a
Configure the CrudPanel object. Apply settings to all operations.
[ { "docid": "453478eb2dc7902b70c9de38747390b3", "score": "0.54925245", "text": "public function setup()\n {\n CRUD::setModel(\\App\\Models\\User::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/user');\n CRUD::setEntityNameStrings('user', 'users');\n\n\n $this->crud->allowAccess('show');\n $this->crud->enableExportButtons();\n // $this->crud->enableDetailsRow();\n\n $this->crud->addFilter(\n [\n 'name' => 'type_id',\n 'type' => 'select2',\n 'label' => 'Status'\n ],\n function () {\n return User::select('type_id')->distinct()->get()->pluck('type_id', 'type_id')->toArray();\n },\n function ($value) {\n $this->crud->addClause('where', 'type_id', $value);\n }\n );\n }", "title": "" } ]
[ { "docid": "5991bc6e4b499ea16f0737708a3f1326", "score": "0.6734722", "text": "public function setup()\n {\n $this->crud->setModel(ModeOfInheritance::class);\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/moi');\n $this->crud->setEntityNameStrings('MOI', 'MOIs');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n // $this->crud->setFromDb();\n \n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'type' => 'text'\n ],\n [\n 'name' => 'abbreviation',\n 'type' => 'text'\n ],\n [\n 'name' => 'parent_id',\n 'type' => 'select',\n 'entity' => 'parent',\n 'attribute' => 'name',\n 'model' => ModeOfInheritance::class\n ],\n [\n 'name' => 'curatable',\n 'type' => 'boolean'\n ]\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n 'attributes' => [\n 'disabled' => true\n ]\n ],\n [\n 'name' => 'abbreviation',\n 'label' => 'Abbreviation',\n 'type' => 'text',\n 'attributes' => [\n 'disabled' => true\n ]\n ],\n [\n 'name' => 'curatable',\n 'label' => 'Curatable',\n 'type' => 'boolean'\n ]\n ]);\n\n // add asterisk for fields that are required in MoiCrudControllerRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n // ------ CRUD ACCESS\n $this->crud->denyAccess(['list','create','update','delete']);\n if (Auth::user()->hasPermissionTo('list mois')) {\n $this->crud->allowAccess(['list']);\n }\n if (Auth::user()->hasPermissionTo('create mois')) {\n $this->crud->allowAccess(['create']);\n }\n if (Auth::user()->hasPermissionTo('update mois')) {\n $this->crud->allowAccess(['update']);\n }\n if (Auth::user()->hasPermissionTo('delete mois')) {\n $this->crud->allowAccess(['delete']);\n }\n }", "title": "" }, { "docid": "8afa94b65169ac95bdeda0fbe7c89d2a", "score": "0.66706693", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Comment');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/comment');\n $this->crud->setEntityNameStrings('comment', 'comments');\n\n $this->crud->query = $this->crud->query->withoutGlobalScopes();\n $this->crud->model->clearGlobalScopes();\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n// $this->crud->setFromDb();\n\n $this->crud->addColumns([\n [\n 'name' => 'article_id',\n 'type' => 'select',\n 'label' => 'Which Article is this comment for?',\n 'entity' => 'article',\n 'attribute' => 'title',\n 'model' => Article::class,\n ],\n [\n 'name' => 'user_id',\n 'type' => 'select',\n 'label' => 'If a Stats4SD staff or user added this comment, select them here',\n 'entity' => 'user',\n 'attribute' => 'name',\n 'model' => User::class,\n ],\n [\n 'name' => 'name',\n 'label' => 'Display name for comment author',\n 'type' => 'text',\n ],\n [\n 'name' => 'comment',\n 'label' => 'The comment:',\n 'type' => 'textarea',\n 'visibleInTable' => false,\n ],\n [\n 'name' => 'approved',\n 'type' => 'boolean',\n 'label' => 'Approved?',\n ],\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'article_id',\n 'type' => 'select2',\n 'label' => 'Which Article is this comment for?',\n 'entity' => 'article',\n 'attribute' => 'title',\n 'model' => Article::class,\n ],\n [\n 'name' => 'user_id',\n 'type' => 'select2',\n 'label' => 'If a Stats4SD staff or user added this comment, select them here',\n 'entity' => 'user',\n 'attribute' => 'name',\n 'model' => User::class,\n ],\n [\n 'name' => 'name',\n 'label' => 'Display name for comment author',\n 'type' => 'text',\n ],\n [\n 'name' => 'email',\n 'label' => 'Display email for comment author',\n 'type' => 'email',\n ],\n [\n 'name' => 'comment',\n 'label' => 'The comment:',\n 'type' => 'textarea',\n ],\n [\n 'name' => 'approved',\n 'type' => 'checkbox',\n 'label' => 'Should this comment be approved and appear on the front end?',\n ],\n ]);\n\n // add asterisk for fields that are required in CommentRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "17057c8e1f24b591d7eb0b5250bec0b0", "score": "0.6380901", "text": "protected function _setupCrud()\n {\n $this->loadComponent('Crud.Crud', [\n 'actions' => [\n 'add' => 'Crud.Add',\n 'delete' => 'Crud.Delete',\n 'edit' => 'Crud.Edit',\n 'index' => 'Crud.Index',\n 'view' => 'Crud.View',\n ],\n 'listeners' => [\n 'Crud.Api',\n 'Crud.RelatedModels',\n ],\n 'messages' => [\n 'domain' => 'fluxctrl',\n ],\n 'eventLogging' => Flux::read('debug', true),\n ]);\n }", "title": "" }, { "docid": "011ccdae524d3a924444d66170f1452f", "score": "0.62808526", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Action');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/actions');\n $this->crud->setEntityNameStrings(trans('fields.action'), trans('fields.actions'));\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n if (backpack_user()->role == User::ROLE_EMPLOYEE) {\n $this->crud->denyAccess(['create', 'update', 'delete']);\n $this->crud->removeAllButtons();\n\n $this->crud->setListContentClass('col-md-8 col-md-offset-2');\n }\n\n $this->crud->setDefaultPageLength(50);\n\n $this->crud->orderBy('datetime', 'DESC');\n\n $this->crud->setColumns([\n [\n 'name' => 'datetime',\n 'label' => trans('fields.datetime'),\n 'type' => 'datetime',\n ],\n [\n // 1-n relationship\n 'label' => trans('fields.option'),\n 'type' => \"select\",\n 'name' => 'option_id', // the column that contains the ID of that connected entity;\n 'entity' => 'option', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\ActionsOption\", // foreign key model\n ],\n [\n 'name' => 'gps',\n 'label' => trans('GPS/IP'),\n // 'type' => 'image',\n // 'prefix' => 'images/gps.png?ip',\n 'type' => \"model_function\",\n 'function_name' => 'getMap',\n ],\n [\n 'name' => 'device',\n 'label' => trans('fields.device'),\n 'type' => 'text',\n ],\n ]);\n\n if (backpack_user()->role == User::ROLE_COMPANY) {\n $this->crud->addColumn([ // Select2\n 'label' => trans('fields.employee'),\n 'type' => \"select\",\n 'name' => 'employee_id', // the column that contains the ID of that connected entity;\n 'entity' => 'employee', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Employee\", // foreign key model\n 'searchLogic' => function ($query, $column, $searchTerm) {\n $query->orWhereHas('employee', function ($q) use ($column, $searchTerm) {\n $q->whereHas('user', function ($q) use ($column, $searchTerm) {\n $q->where('name', 'like', '%' . $searchTerm . '%');\n });\n });\n }\n ]);\n }\n\n // Fields\n $this->crud->addFields([\n [ // DateTime\n 'name' => 'datetime',\n 'label' => trans('fields.datetime'),\n 'type' => 'datetime_picker',\n 'allows_null' => false,\n 'default' => Carbon::now(),\n ],\n [ // Select2\n 'label' => trans('fields.option'),\n 'type' => 'select2',\n 'name' => 'option_id', // the db column for the foreign key\n 'entity' => 'option', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\ActionsOption\", // foreign key model\n ],\n ]);\n\n if (backpack_user()->role == User::ROLE_COMPANY) {\n $this->crud->addField([ // Select2\n 'label' => trans('fields.employee'),\n 'type' => 'select2',\n 'name' => 'employee_id', // the db column for the foreign key\n 'entity' => 'employee', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Employee\", // foreign key model\n ]);\n }\n\n $this->crud->addFilter([ // date filter\n 'type' => 'date_range',\n 'name' => 'datetime',\n 'label' => trans('fields.date')\n ],\n false,\n function ($value) { // if the filter is active, apply these constraints\n $dates = json_decode($value);\n $this->crud->addClause('where', 'datetime', '>=', $dates->from);\n $this->crud->addClause('where', 'datetime', '<=', $dates->to . ' 23:59:59');\n });\n\n if (backpack_user()->role == User::ROLE_COMPANY) {\n $this->crud->addFilter([ // select2_ajax filter\n 'name' => 'employee_id',\n 'type' => 'select2',\n 'label' => trans('fields.employee'),\n ],\n function () {\n return Employee::with('user')->get()->pluck('name', 'id')->toArray();\n },\n function ($value) { // if the filter is active\n $this->crud->addClause('where', 'employee_id', $value);\n });\n }\n\n // add asterisk for fields that are required in TimeRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "a164927d4784c3e65a40b41b9034e402", "score": "0.62580127", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\ChemicalEquation');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/equation');\n $this->crud->setEntityNameStrings('equation', 'equations');\n $this->crud->enableDetailsRow();\n $this->crud->allowAccess('details_row');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n /*\n |--------------------------------------------------------------------------\n | COLUMNS AND FIELDS\n |--------------------------------------------------------------------------\n */\n\n // ------ CRUD COLUMNS\n $this->crud->addColumn([\n 'name' => 'id',\n 'label' => 'ID',\n 'type' => 'number'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'equation',\n 'label' => 'Equation',\n 'type' => 'text',\n 'limit' => 150\n ]);\n $this->crud->addColumn([\n 'name' => 'created_by',\n 'label' => 'Người tạo',\n 'type' => 'closure',\n 'function' => function ($post) {\n $creator_id = $post->created_by;\n $creator = User::find($creator_id);\n if (is_object($creator)) {\n return $creator->name;\n } else {\n return 'Chưa xác định';\n }\n }\n ]);\n\n // --------- FILTER\n $this->crud->addFilter([\n 'name' => 'created_by',\n 'type' => 'select2_ajax',\n 'label' => 'Người tạo',\n 'placeholder' => 'Pick a User'\n ],\n route('admin.post.filter.users.ajax'),\n function($value) {\n $this->crud->addClause('where', 'created_by', $value);\n });\n\n $this->crud->enableAjaxTable();\n\n }", "title": "" }, { "docid": "acdd8f10024d511e50d6c40a016e56f2", "score": "0.62248886", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Contact');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/contact');\n $this->crud->allowAccess(['list', 'show' ]);\n $this->crud->setEntityNameStrings('contact', 'contacts');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n// $this->crud->setFromDb();\n $this->crud->addColumns([\n [\n 'name' => 'title',\n 'label' => 'Title',\n 'type' => 'text'\n ],\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text'\n ],\n [\n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'email'\n ],\n [\"name\"=>\"phone\",\"type\"=>\"text\",\"label\"=>\"Phone\"],\n [\"name\"=>\"position\",\"type\"=>\"text\",\"label\"=>\"Position\"],\n [\"name\"=>\"stage.name\",\"type\"=>\"text\",\"label\"=>\"Stage\"],\n [\"name\"=>\"notes\",\"type\"=>\"text\",\"label\"=>\"Notes\"],\n [\"name\"=>\"city\",\"type\"=>\"text\",\"label\"=>\"City\"],\n [\"name\"=>\"experience\",\"type\"=>\"text\",\"label\"=>\"Experience\"],\n [\"name\"=>\"salary\",\"type\"=>\"text\",\"label\"=>\"Salary\"],\n [\"name\"=>\"companies\",\"type\"=>\"text\",\"label\"=>\"Companies\"],\n [\"name\"=>\"advantages\",\"type\"=>\"text\",\"label\"=>\"Advantages\"],\n [\"name\"=>\"expectations\",\"type\"=>\"text\",\"label\"=>\"Expectations\"],\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'title',\n 'label' => 'Title',\n 'type' => 'text'\n ],\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text'\n ],\n [\n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'email'\n ],\n [\n \"name\"=> \"stage_id\",\n \"type\"=> \"select\",\n \"label\"=> \"Stage\",\n 'entity' => 'stage', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Stage\",\n ],\n [\n \"name\"=> \"phone\",\n \"type\"=> \"text\",\n \"label\"=> \"Phone\"\n ],\n [\n \"name\"=> \"position\",\n \"type\"=> \"text\",\n \"label\"=> \"Position\"\n ],\n [\n \"name\"=> \"city\",\n \"type\"=> \"text\",\n \"label\"=> \"City\"\n ],\n [\n \"name\"=> \"experience\",\n \"type\"=> \"enum\",\n \"label\"=> \"Experience\"\n ],\n [\n \"name\"=> \"salary\",\n \"type\"=> \"text\",\n \"label\"=> \"Salary\"\n ],\n [\n \"name\"=> \"english_level\",\n \"type\"=> \"enum\",\n \"label\"=> \"English level\"\n ],\n [\n \"name\"=> \"cv_path\",\n \"type\"=> \"upload\",\n \"upload\" => true,\n \"label\"=> \"CV\"\n ],\n [\n \"name\"=> \"companies\",\n \"type\"=> \"text\",\n \"label\"=> \"Companies\"\n ],\n [\n \"name\"=> \"advantages\",\n \"type\"=> \"text\",\n \"label\"=> \"Advantages\"\n ],\n [\n \"name\"=> \"expectations\",\n \"type\"=> \"text\",\n \"label\"=> \"Expectations\"\n ],\n [\n \"name\"=> \"notes\",\n \"type\"=> \"text\",\n \"label\"=> \"Notes\"\n ]\n\n ]);\n\n // add asterisk for fields that are required in ContactRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "8948fcc59865f60a58f9cb26211ad89d", "score": "0.61652416", "text": "public function setup()\n {\n $this->crud->setModel('App\\User');\n $this->crud->setRoute(config('backpack.base.route_prefix').'/user');\n $this->crud->setEntityNameStrings('user', 'users');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addFilter(\n [\n 'type' => 'simple',\n 'name' => 'include_volunteers',\n 'label' => 'Show Volunteers',\n ],\n false,\n function ($value) {\n $this->includeVolunteers = $value;\n }\n );\n\n if (!$this->includeVolunteers) {\n $this->crud->addClause('whereHas', 'roles', function ($query) {\n $query->whereIn('name', ['programmer', 'super-admin', 'admin', 'coordinator']);\n });\n }\n\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->setFromDb();\n\n // add asterisk for fields that are required in UserRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n $this->crud->removeFields([\n 'password',\n 'volunteer_type_id',\n 'volunteer_status_id',\n 'institution',\n 'street1',\n 'street2',\n 'city',\n 'state',\n 'zip',\n 'last_logged_in_at',\n 'last_logged_out_at',\n 'orcid_id',\n 'hypothesis_id',\n 'already_clingen_member',\n 'already_member_cgs'\n ]);\n\n $this->crud->addFields([\n [\n 'label' => 'Roles',\n 'type' => 'select2_multiple',\n 'name' => 'roles',\n 'entity' => 'roles',\n 'attribute' => 'name',\n 'model' => Role::class,\n 'pivot' => true,\n ],\n [\n 'label' => 'Additonal Permissions',\n 'type' => 'select2_multiple',\n 'name' => 'permissions',\n 'entity' => 'Permissions',\n 'attribute' => 'name',\n 'model' => Permission::class,\n 'pivot' => true,\n ],\n ], 'both');\n\n $this->crud->modifyField(\n 'country_id',\n [\n 'type' => 'select2',\n 'name' => 'country_id',\n 'entity' => 'country',\n 'attribute' => 'name',\n 'model' => Country::class,\n ]\n );\n\n $this->crud->modifyField(\n 'timezone',\n [\n 'type' => 'select2_from_array',\n 'name' => 'timezone',\n 'label' => 'Timezone (Select city closest to you)',\n 'options' => collect((new SurveyOptions())->timezones())->pluck('name', 'id')->toArray(),\n ]\n );\n\n $this->crud->removeColumns([\n 'volunteer_type_id',\n 'volunteer_status_id',\n 'street1', 'street2',\n 'city',\n 'zip',\n 'country_id',\n 'state',\n 'last_logged_in_at',\n 'last_logged_out_at',\n 'institution',\n 'hypothesis_id',\n 'orcid_id',\n 'already_clingen_member',\n 'already_member_cgs',\n 'timezone'\n ]);\n\n $this->crud->addColumn([\n 'type' => 'relationship',\n 'name' => 'roles',\n 'label' => 'Roles',\n 'entity' => 'roles',\n 'attribute' => 'name',\n 'model' => Role::class\n ]);\n\n if (!Auth::user()->can('create users')) {\n $this->crud->RemoveButton('create');\n }\n\n if (!Auth::user()->can('update users')) {\n $this->crud->RemoveButtonFromStack('update', 'line');\n }\n\n if (!Auth::user()->can('delete users')) {\n $this->crud->RemoveButtonFromStack('delete', 'line');\n }\n\n if (Auth::user()->canImpersonate()) {\n $this->crud->addButtonFromView('line', 'impersonate-users', 'impersonate_user', 'end'); // add a button; possible types are: view, model_functiona\n }\n }", "title": "" }, { "docid": "169b96556d8ec32be8a2086e7b9c9010", "score": "0.6150914", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\AddCard');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/add_card');\n $this->crud->setEntityNameStrings('add_card', 'add_cards');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n //$this->crud->setFromDb();\n\n $this->crud->addColumn([\n 'label' => \"Card\", // Table column heading\n 'type' => \"select\",\n 'name' => 'card_id', // the column that contains the ID of that connected entity;\n 'entity' => 'card', // the method that defines the relationship in your Model\n 'attribute' => \"code\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Card\", // foreign key model\n ]);\n\n $this->crud->addColumn([\n 'label' => \"Member\", // Table column heading\n 'type' => \"select\",\n 'name' => 'member_id', // the column that contains the ID of that connected entity;\n 'entity' => 'member', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Member\", // foreign key model\n ]);\n\n $this->crud->addColumn([\n 'name' => \"created_at\", // The db column name\n 'label' => \"Time\", // Table column heading\n 'type' => \"datetime\",\n 'format' => 'l j F Y H:i:s', // use something else than the base.default_datetime_format config value\n ]);\n\n $this->crud->denyAccess('update');\n $this->crud->denyAccess('create');\n $this->crud->denyAccess('delete');\n }", "title": "" }, { "docid": "c27c5cd3af364a34d97cdefc08f2233a", "score": "0.6137436", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Subscription');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/subscription');\n $this->crud->setEntityNameStrings('email subscription', 'email subscriptions');\n\n if(! auth()->user()->can('manage subscriptions') ) {\n $this->crud->denyAccess(['list','create','update','delete']);\n }\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n ],\n [\n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'text',\n ],\n [\n 'name' => 'list',\n 'label' => 'Mailing List',\n 'type' => 'text',\n ],\n [\n 'name' => 'region.label',\n 'label' => 'CoP / RMS Region',\n 'type' => 'text',\n ],\n ]);\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->addFields([\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n ],\n [\n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'text',\n ],\n [\n 'name' => 'list',\n 'label' => 'Mailing List',\n 'type' => 'select2_from_array',\n 'options' => ['ccrp'],\n ],\n [\n 'name' => 'regions',\n 'label' => 'CoP / RMS Region',\n 'type' => 'select2',\n 'entity' => 'regions',\n 'attribute' => 'label',\n 'model' => Region::class,\n 'pivot' => true,\n ],\n ]);\n\n // add asterisk for fields that are required in SubscriptionRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "d1a11a88057a17908ee8a7e005b028b3", "score": "0.60990334", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Module');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/module');\n $this->crud->setEntityNameStrings('module', 'modules');\n $this->crud->allowAccess(['list', 'create', 'update', 'delete', 'revisions', 'reorder', 'show', 'details_row', 'bulk_edit']);\n $this->crud->enableBulkActions();\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->setFromDb();\n $this->crud->removeField('user_id');\n $this->crud->removeColumn('user_id');\n $this->crud->addButtonFromView('top', 'bulk_delete', 'bulk_delete', 'end');\n\n // add asterisk for fields that are required in ModuleRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "3af2a915022e144bfa873cf2225e4776", "score": "0.6090859", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Answer');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/answer');\n $this->crud->setEntityNameStrings('answer', 'answers');\n $this->crud->allowAccess('reorder');\n $this->crud->enableReorder('name', 1);\n\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n //$this->crud->setFromDb();\n $this->crud->addColumn(\n [\n 'name' => 'id',\n 'label' => 'ID',\n 'type' => 'text',\n ]\n );\n $this->crud->addColumn(\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n ]\n );\n // $this->crud->addColumn(\n // [\n // 'name' => 'team_2',\n // 'label' => 'Team 2',\n // 'type' => 'text',\n // ]\n // );\n $this->crud->addColumn(\n // [\n // // 1-n relationship\n // 'label' => \"Poll\", // Table column heading\n // 'type' => \"select\",\n // 'name' => 'poll_id', // the column that contains the ID of that connected entity;\n // 'entity' => 'poll', // the method that defines the relationship in your Model\n // 'attribute' => \"name\", // foreign key attribute that is shown to user\n // 'model' => \"App\\Models\\Poll\", // foreign key model\n // ]\n [ // select_from_array\n 'name' => 'poll_id',\n 'label' => \"Poll\",\n 'type' => 'select_from_array',\n 'options' => \\App\\Models\\Poll::all()->pluck('name', 'id')->toArray(),\n ]\n );\n $this->crud->addColumn(\n [\n // 1-n relationship\n 'label' => \"Question\", // Table column heading\n 'type' => \"select\",\n 'name' => 'question_id', // the column that contains the ID of that connected entity;\n 'entity' => 'question', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Question\", // foreign key model\n ]\n );\n $this->crud->addColumn(\n [\n // 1-n relationship\n 'label' => \"Category\", // Table column heading\n 'type' => \"select\",\n 'name' => 'team_id', // the column that contains the ID of that connected entity;\n 'entity' => 'team', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Team\", // foreign key model\n ]\n );\n\n $this->crud->addColumn(\n [\n 'name' => 'correct',\n 'label' => \"Correct\",\n 'type' => 'check',\n ]\n );\n\n $this->crud->addColumn(\n [\n 'name' => 'state',\n 'label' => 'published',\n 'type' => 'boolean',\n // optionally override the Yes/No texts\n 'options' => [0 => 'Unpublished', 1 => 'Published'],\n ]\n );\n\n $this->crud->addField([\n 'name' => 'name', // the name of the db column\n 'label' => 'Name', // the input label\n 'type' => 'textarea',\n ]);\n\n // $this->crud->addField([\n // 'name' => 'team_2', // the name of the db column\n // 'label' => 'Team 2', // the input label\n // 'type' => 'text',\n // ]);\n\n $this->crud->addField([ // Select2\n 'label' => \"Question\",\n 'type' => 'select2',\n 'name' => 'question_id', // the db column for the foreign key\n 'entity' => 'question', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Question\", // foreign key model\n\n 'options' => (function ($query) {\n return $query->orderBy('id', 'DESC')->get();\n }),\n 'attributes' => [\n 'class' => 'form-control changed_team',\n\n ],\n ]);\n\n $this->crud->addField([ // Select2\n 'label' => \"Category\",\n 'type' => 'select2',\n 'name' => 'team_id', // the db column for the foreign key\n 'entity' => 'team', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Team\", // foreign key model\n\n // 'options' => (function ($query) {\n // if (!empty($this->crud->entry) && $this->crud->entry->id) {\n // $ans = \\App\\Models\\Answer::find($this->crud->entry->id);\n // if (!empty($ans->question->team_1) && !empty($ans->question->team_2)) {\n // $query->whereIn('id', [$ans->question->team_1, $ans->question->team_2]);\n // }\n // }\n\n // return $query->orderBy('id', 'DESC')->get();\n // }),\n 'attributes' => [\n //'class' => 'form-control target_team',\n\n ],\n ]);\n\n $this->crud->addField(\n\n [\n 'name' => 'correct', // the name of the db column\n 'label' => 'Correct', // the input label\n 'type' => 'radio',\n 'options' => [ // the key will be stored in the db, the value will be shown as label;\n 0 => \"No\",\n 1 => \"Yes\",\n ],\n // optional\n //'inline' => false, // show the radios all on the same line?\n ]\n );\n\n $this->crud->addField([\n 'name' => 'state', // the name of the db column\n 'label' => 'Published', // the input label\n 'type' => 'radio',\n 'default' => 1,\n 'options' => [ // the key will be stored in the db, the value will be shown as label;\n 0 => \"Unpublished\",\n 1 => \"Published\",\n ],\n ]);\n\n $this->crud->addFilter([ // select2 filter\n 'name' => 'question_id',\n 'type' => 'select2',\n 'label' => 'Question',\n ], function () {\n return \\App\\Models\\Question::all()->pluck('name', 'id')->toArray();\n }, function ($value) { // if the filter is active\n $this->crud->addClause('where', 'question_id', $value);\n });\n\n // add asterisk for fields that are required in AnswerRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n $this->crud->addButtonFromView('line', 'saveNumberSeven', 'number_seven', 'beginning');\n $this->crud->addButtonFromView('line', 'Delete', 'customdelete', 'end');\n $this->crud->removeButton('delete');\n }", "title": "" }, { "docid": "3f179982bb6e32236ce38b04354d74f9", "score": "0.60812175", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Enrollment');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/enrollment');\n $this->crud->setEntityNameStrings('enrollment', 'enrollments');\n\n $this->crud->allowAccess('show');\n\n $this->crud->denyAccess('update');\n $this->crud->removeButton('delete');\n $this->crud->denyAccess('create');\n //$this->crud->addClause('parent');\n\n\n if(backpack_user()->hasRole('admin'))\n {\n $this->crud->enableExportButtons();\n }\n \n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->setColumns([\n\n [\n 'name' => 'id',\n 'label' => \"ID\",\n ],\n\n [\n // STUDENT NAME\n 'label' => __(\"Student\"), // Table column heading\n 'type' => \"select\",\n 'entity' => 'student', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'searchLogic' => function ($query, $column, $searchTerm) {\n $query->orWhereHas('student', function ($q) use ($column, $searchTerm) {\n $q->WhereHas('user', function ($q) use ($column, $searchTerm) {\n $q->where('firstname', 'like', '%'.$searchTerm.'%')\n ->orWhere('lastname', 'like', '%'.$searchTerm.'%');\n });\n });\n }\n ],\n\n\n\n [\n // COURSE NAME\n 'label' => __(\"Course\"), // Table column heading\n 'type' => \"select\",\n 'name' => 'course_id', // the column that contains the ID of that connected entity;\n 'entity' => 'course', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Course\", // foreign key model\n ],\n\n [\n 'name' => 'course.period.name',\n 'label' => __('Period'),\n 'type' => 'text'\n ],\n\n [\n // RESULT\n 'label' => __(\"Result\"), // Table column heading\n 'type' => \"select\",\n 'entity' => 'result', // the method that defines the relationship in your Model\n 'attribute' => \"result_type\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Result\", // foreign key model\n ],\n ]);\n \n\n // add asterisk for fields that are required in EnrollmentRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n\n\n $this->crud->addFilter([ // filter only pending enrollments\n 'type' => 'simple',\n 'name' => 'pending',\n 'label'=> __('Pending')\n ],\n false,\n function() {\n $this->crud->addClause('pending'); \n });\n\n\n $this->crud->addFilter([\n 'type' => 'simple',\n 'name' => 'noresult',\n 'label'=> __('No Result')\n ],\n false,\n function() {\n $this->crud->addClause('noResult'); \n });\n\n $this->crud->addFilter([\n 'type' => 'simple',\n 'name' => 'hideparents',\n 'label'=> __('Hide Parents')\n ],\n false,\n function() {\n $this->crud->addClause('real'); \n });\n\n $this->crud->addFilter([\n 'name' => 'period_id',\n 'type' => 'select2',\n 'label'=> __('Period')\n ], function() {\n return Period::all()->pluck('name', 'id')->toArray();\n }, function($value) { // if the filter is active\n $this->crud->addClause('period', $value); \n });\n\n $this->crud->addFilter([ // select2_multiple filter\n 'name' => 'result',\n 'type' => 'select2_multiple',\n 'label'=> __('Result')\n ], function() { // the options that show up in the select2\n return ResultType::all()->pluck('name', 'id')->toArray();\n }, function($values) { // if the filter is active\n foreach (json_decode($values) as $key => $value) {\n $this->crud->query = $this->crud->query->whereHas('result', function ($query) use ($value) {\n $query->where('result_type_id', $value);\n });\n }\n });\n\n\n }", "title": "" }, { "docid": "afe885c227492edb491c9a6b38f3f1cf", "score": "0.6075257", "text": "public function setup()\n {\n $this->crud->setModel('App\\VolunteerStatus');\n $this->crud->setRoute(config('backpack.base.route_prefix').'/volunteer-status');\n $this->crud->setEntityNameStrings('volunteer status', 'volunteer statuses');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->setFromDb();\n\n // add asterisk for fields that are required in VolunteerStatusRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n if (!\\Auth::user()->can('create', VolunteerStatus::class)) {\n $this->crud->RemoveButton('create');\n }\n\n if (!\\Auth::user()->can('update volunteer-statuses')) {\n $this->crud->RemoveButtonFromStack('update', 'line');\n }\n\n if (!\\Auth::user()->can('delete volunteer-statuses')) {\n $this->crud->RemoveButtonFromStack('delete', 'line');\n }\n }", "title": "" }, { "docid": "0864694ae4cd1b24aaa21fd35d809176", "score": "0.6005294", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Doenca');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/doenca');\n $this->crud->setEntityNameStrings('Doença', 'Doenças');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumn([\n 'name' => 'nome', // The db column name\n 'label' => \"Nome\", // Table column heading\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'cid', // The db column name\n 'label' => \"CID\", // Table column heading\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'descricao', // The db column name\n 'label' => \"Descrição\", // Table column heading\n 'type' => 'text'\n ]);\n\n $this->crud->addField([\n\t\t\t'name' => 'nome',\n 'label' => \"Nome\",\n 'type' => 'text'\n ]);\n $this->crud->addField([\n\t\t\t'name' => 'cid',\n 'label' => \"CID\",\n 'type' => 'text'\n ]);\n $this->crud->addField([\n\t\t\t'name' => 'descricao',\n 'label' => \"Descrição\",\n 'type' => 'text'\n\t\t]);\n\n\n // add asterisk for fields that are required in DoencaRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "4981815bff32bb49012597d5553a8ede", "score": "0.5999112", "text": "public function configureCrud(Crud $crud): Crud\n {\n return $crud\n ->setEntityPermission('ROLE_ADMIN');\n }", "title": "" }, { "docid": "3ef01fdfe36d46d36cd535312cb5e67b", "score": "0.59898", "text": "public function setup() {\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| BASIC CRUD INFORMATION\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n $this->crud->setModel(\"App\\Models\\Slider\");\n $this->crud->setRoute(\"admin/slider\");\n $this->crud->setEntityNameStrings('slider', 'slider');\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| COLUMNS AND FIELDS\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\t\t// ------ CRUD COLUMNS\n $this->crud->setColumns([['label' => \"Evenement\",\n \t\t 'type' => 'select',\n 'name' => 'conference_id',\n \t\t 'entity' => 'conference',\n \t\t 'attribute' => 'Full_Evenement',\n \t\t 'model' => \"App\\Models\\Conference\"\n \t],\n \t\n\t\t]);\n\n\t\t// ------ CRUD FIELDS\n\t\t\n\t\t$this->crud->addField([ // pdf\n\t\t 'name' => 'image',\n \t\t'label' => 'Image',\n \t\t'type' => 'browse',\n \t\t\n\t\t]);\n\t\t$this->crud->addField([ // SELECT\n 'label' => \"Evenement\",\n 'type' => 'select2',\n 'name' => 'conference_id',\n 'entity' => 'conference',\n 'attribute' => 'Full_Evenement',\n 'model' => \"App\\Models\\Conference\",\n ]);\n }", "title": "" }, { "docid": "93a11f9fd35cf30dadd7b18ff240fb3b", "score": "0.5928808", "text": "public function configure() {\n\n unset($this['id_pessoa']);\n unset($this['foto']);\n unset($this['media_geral']);\n unset($this['ch_eletiva_cursada']);\n unset($this['ch_eletiva_solicitada']);\n unset($this['ch_obrig_cursada']);\n unset($this['ch_obrig_solicitada']);\n unset($this['ch_total']);\n unset($this['id_antigo']);\n\n //vestibular\n //unset($this['id_tipo_ingresso']);\n unset($this['dt_ingresso']);\n //aluno regular\n unset($this['dt_situacao']);\n unset($this['id_situacao']);\n //\n unset($this['id_destino']);\n //\n unset($this->widgetSchema['matricula']);\n unset($this['uf_nascimento']);\n\n\n// $this->widgetSchema['matricula']->setAttribute('readonly','readonly');\n //local de trabalho\n unset($this['id_trabalho']);\n unset($this['ramal_trabalho']);\n unset($this['fone_trabalho']);\n unset($this['cep_trabalho']);\n unset($this['cod_curso']);\n// $this->widgetSchema['cod_curso'] = new sfWidgetFormPropelChoice(array(\n// 'model' => 'Tbcurso',\n// 'add_empty' => false,\n// 'order_by' => array('Descricao', 'ASC'),\n// 'expanded' => false,\n// 'multiple' => false,\n// 'label' => 'Codigo do Curso',\n// 'criteria' => $criteria\n// ));\n// $this->getValidator('cod_curso')->setOption('required', false);\n\n\n unset($this['id_3grau']);\n unset($this['ano_concl_3grau']);\n\n $pos = array();\n for ($index = 1; $index <= 50; $index++) {\n $pos[$index < 10 ? '0'.$index : ''.$index] = $index;\n }\n // ------------ Parte superior para matricula -----------\n $this->widgetSchema['ano_ingresso'] = new sfWidgetFormChoice(array('choices' => array('2011' => '2011')));\n $this->widgetSchema['semestre'] = new sfWidgetFormChoice(array('choices' => array('1' => '1', '2' => '2')));\n $this->widgetSchema['posicao'] = new sfWidgetFormChoice(array('choices' => $pos)); \n\n\n\n $this->validatorSchema['ano_ingresso'] = new sfValidatorString(array('required' => true));\n $this->validatorSchema['semestre'] = new sfValidatorString(array('required' => true));\n $this->validatorSchema['cod_curso'] = new sfValidatorString(array('required' => false));\n $this->validatorSchema['posicao'] = new sfValidatorString(array('required' => true));\n // -------------- fim da parte de matricula ------------------\n\n $this->widgetSchema['nome']->setAttribute('size', 50);\n\n $this->widgetSchema['celular']->setAttribute('size', 12);\n\n $this->widgetSchema['fone_residencial']->setAttribute('size', 12);\n\n $years = range(date('Y') - 10, date('Y') - 100);\n $this->widgetSchema['dt_nascimento'] = new sfWidgetFormDate(array(\n 'format' => '%day%/%month%/%year%',\n 'years' => array_combine($years, $years)\n ));\n $criteria = new Criteria();\n $criteria->addJoin(TbcursoversaoPeer::COD_CURSO, TbcursoPeer::COD_CURSO);\n $criteria->add(TbcursoversaoPeer::SITUACAO, 'ATIVO');\n $criteria->addOr(TbcursoversaoPeer::SITUACAO, 'ATIVA');\n $versoes = array(\n '12', //ADMINISTRAÇÃO\n '114', //ANTROPOLOGIA\n '28', //ARQ E URBANISMO\n '59', //BIOLOGIA (B)\n '23', //CIENCIAS SOCIAIS\n '18',// COMUNICAÇÃO SOCIAL\n '47', //DIREITO\n '60', //ECONOMIA MATUTINO\n '38', //ECONOMIA VESP/NOTURNO\n '50', //FISICA\n '56', //GEOGRAFIA\n '78', //GEOLOGIA\n '116', //GESTÃO TERRITORIAL INDIGENA\n '63', //HISTORIA MATUTINO\n '64', //HISTORIA NOTURNO\n '90', // INTERCULTURAL\n '110', //LITERATURA\n '111', //ESPANHOL\n '112', //FRANCES\n '113', //INGLES\n '55', //MATEMATICA (B)\n '51', //MATEMATICA (L)\n '62', //MEDICINA\n '95', //PEDAGOGIA\n '29', //PSICOLOGIA\n '61', //QUIMICA\n '66', //RELAÇÕES INTERNACIONAIS\n '108', //SECRETARIADO\n '62', //MEDICINA\n '30', //ZOOTECNIA\n '58', // BIOLOGIA (L)\n '34', //AGRONOMIA\n '96', // COMPUTAÇÃO\n '37', // ENG. CIVIL\n '109' //CONTABILIDADE\n );\n\n //versões de cursos onde irá aparecer a descricao da VERSÂO não a do curso\n $cursos_diff = array('51', '55',\n '113', '112', '111',\n '110', '63', '64',\n '60', '38', '56', '58', '59'\n );\n $criteria->addAnd(TbcursoversaoPeer::ID_VERSAO_CURSO, $versoes, Criteria::IN);\n $criteria->addAscendingOrderByColumn(TbcursoversaoPeer::DESCRICAO);\n $result = TbcursoversaoPeer::retrieveByPKs($versoes);\n\n $cursos = array();\n $curso = new Tbcursoversao();\n foreach ($result as $curso) {\n if (in_array($curso->getIdVersaoCurso(), $cursos_diff)) {\n $cursos[$curso->getIdVersaoCurso()] = $curso->getDescricao();\n } else {\n $cursos[$curso->getIdVersaoCurso()] = $curso->getTbcurso()->getDescricao();\n }\n }\n\n\n $this->widgetSchema['id_versao_curso'] = new sfWidgetFormChoice(array(\n 'expanded' => false,\n 'multiple' => false,\n 'label' => 'Curso',\n 'choices' => $cursos,\n// 'choices' => $result,\n// 'help' => 'Em Caso de dúvida pergunte ao funcionário do DERCA, (L) = Licenciatura <br> (B) = Bacharelado '\n ));\n\n\n $this->widgetSchema['sexo'] = new sfWidgetFormChoice(array(\n 'choices' => array(\n 'M' => 'Masculino',\n 'F' => 'Feminino'\n ),\n 'expanded' => true,\n 'multiple' => false\n ));\n\n\n $years = range(date('Y'), date('Y') - 100);\n $this->widgetSchema['rg_dt_exped'] = new sfWidgetFormDate(array(\n 'format' => '%day%/%month%/%year%',\n 'years' => array_combine($years, $years)\n ));\n\n $this->widgetSchema['cpf']->setAttribute('size', 11);\n $this->widgetSchema['cpf']->setAttribute('maxlength', 11);\n\n $this->validatorSchema['cpf'] = new sfValidatorRegex(array('pattern' => '/^[0-9]+$/'));\n\n $this->widgetSchema['titulo_zona']->setAttribute('size', 4);\n\n $this->widgetSchema['titulo_secao']->setAttribute('size', 4);\n\n $this->widgetSchema['pai']->setAttribute('size', 50);\n\n $this->widgetSchema['mae']->setAttribute('size', 50);\n\n $this->widgetSchema['numero']->setAttribute('size', 4);\n\n $this->widgetSchema['ano_concl_2grau']->setAttribute('size', 4);\n\n // $this->widgetSchema['ano_concl_2grau']\n // valores padrão com form em branco\n\n $this->widgetSchema->setHelp('id_2grau', 'Caso não haja a sua Instituição ,peça ao funcionário responsavel para inclui-la/Cadastra-la');\n $this->widgetSchema->setHelp('cep', 'Caso não haja o seu endereço ,peça ao funcionário responsavel para inclui-lo/Cadastra-lo');\n $this->widgetSchema->setHelp('id_versao_curso', 'Em Caso de dúvida pergunte ao funcionário do DERCA, (L) = Licenciatura <br> (B) = Bacharelado ');\n\n $this->widgetSchema['estado_civil'] = new sfWidgetFormChoice(array(\n 'choices' => array(\n 'Solteiro' => 'Solteiro',\n 'Casado' => 'Casado',\n 'Divorciado' => 'Divorciado',\n 'Viuvo' => 'Viúvo',\n 'União Estável' => 'União Estável'\n ),\n 'expanded' => false,\n 'multiple' => false\n ));\n\n $criteria = new Criteria();\n $criteria->add(TbtipoingressoPeer::ID_TIPO_INGRESSO,array(2,24), Criteria::IN);\n $this->widgetSchema['id_tipo_ingresso']->setOption('criteria', $criteria);\n\n\n $this->widgetSchema['semestre']->setDefault(sfContext::getInstance()->getUser()->getAttribute('semestre'));\n $this->widgetSchema['ano_ingresso']->setDefault(sfContext::getInstance()->getUser()->getAttribute('ano_ingresso'));\n $this->widgetSchema['posicao']->setDefault(sfContext::getInstance()->getUser()->getAttribute('posicao'));\n \n\n }", "title": "" }, { "docid": "534940c0ee21d85ea766b2485ee947e6", "score": "0.5924876", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\TipoFuncionario');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/tipo_funcionario');\n $this->crud->setEntityNameStrings('Tipo de Funcionário', 'Tipos de Funcionários');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumn([\n 'name' => 'nome', // The db column name\n 'label' => \"Nome\", // Table column heading\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'descricao', // The db column name\n 'label' => \"Descrição\", // Table column heading\n 'type' => 'text'\n ]);\n\n\n $this->crud->addField([\n\t\t\t'name' => 'nome',\n 'label' => \"Nome\",\n 'type' => 'text'\n ]);\n $this->crud->addField([\n\t\t\t'name' => 'descricao',\n 'label' => \"Descrição\",\n 'type' => 'text'\n ]);\n\n // add asterisk for fields that are required in TipoFuncionarioRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "e5553ce66efc6b76d5ee457448b05cbb", "score": "0.59011245", "text": "public function setup()\n {\n \n $this->crud->setModel('App\\Models\\Product');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/product');\n $this->crud->setEntityNameStrings('product', 'products');\n $this->crud->enableExportButtons();\n \n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n //$this->crud->setFromDb();\\\n \n $this->crud->addColumns([\n ['name'=>'id','label'=>'No','type'=>'number'],\n ['name'=>'thumbnail','label'=>'Suraty', 'type' => 'image','prefix'=>'uploads/',\n 'height' => '30px',\n 'width' => '30px',],\n ['name'=>'title','type'=>'text','label'=>'Ady'],\n ['name'=>'description','type'=>'text','label'=>'Düşüdiriliş'],\n ['name'=>'phone','label'=>'Telefon','type' => 'text'],\n ['name'=>'price','label'=>'Baha','type' => 'number'],\n ['name'=>'sany','type'=>'number','label'=>'Jemi Sany'],\n ['label'=>'Esasy kategoriýa', 'type'=>'select', 'name'=>'categoryP', 'entity'=>'category',\n 'model'=>'App\\Models\\Category','attribute' => 'name_tm', 'searchLogic' => false],\n ['name'=>'categoryC','type'=>'select','label'=>'Kiçi kategoriýa', 'entity'=>'subCategory',\n 'model'=>'App\\Models\\Category', 'attribute' => 'name_tm','searchLogic' => false],\n ['name'=>'locationP','type'=>'select','label'=>'Ýeri', 'entity'=>'location',\n 'model'=>'App\\Models\\Location','attribute' => 'name_tm', 'searchLogic' => false]\n\n\n // ['name'=>\"colors\", 'type'=>'table', 'label'=>'Colors','columns'=>['name'=>'Name','code'=>'Code']],\n // ['name'=>\"size\", 'type'=>'table', 'label'=>'Size','columns'=>['size'=>'Size']]\n\n ]);\n $this->crud->addFields([\n ['name'=>'title','type'=>'text','label'=>'Ady', 'tab' => 'Hokman Doldurulmaly'],\n ['name'=>'title_ru','type'=>'text','label'=>'Ru Ady', 'tab' => 'Rus Dili'],\n ['name'=>'title_en','type'=>'text','label'=>'En Ady', 'tab' => 'Inlis Dili'],\n\n// ['name'=>'quantity','type'=>'number','label'=>'Sany', 'tab' => 'Hokman Doldurulmaly'],\n ['name'=>'description','type'=>'text','label'=>'Düşüdirilişi', 'tab' => 'Hokman Doldurulmaly'],\n ['name'=>'quantity_attribute','type'=>'text','label'=>'Ölçeg birligi Tm', 'default' => 'Sany', 'tab' => 'Hokman Doldurulmaly'],\n ['name'=>'description_ru','type'=>'text','label'=>'Ru Düşüdirilişi', 'tab' => 'Rus Dili'],\n ['name'=>'quantity_attribute_ru','type'=>'text','label'=>'Ölçeg birligi Ru', 'default' => 'штук', 'tab' => 'Rus Dili'],\n ['name'=>'description_en','type'=>'text','label'=>'En Düşüdirilişi', 'tab' => 'Inlis Dili'],\n ['name'=>'quantity_attribute_en','type'=>'text','label'=>'Ölçeg birligi En', 'default' => 'Piece', 'tab' => 'Inlis Dili'],\n\n ['name'=>'images','type'=>'upload_multiple','label'=>'Suratlar',\n 'upload' => true, 'disk' => 'uploads', 'tab' => 'Hokman Doldurulmaly'],\n\n ['name'=>'phone','label'=>'Telefon','type' => 'number', 'tab' => 'Beylekiler'],\n ['name'=>'price','label'=>'Bahasy','type' => 'number', 'tab' => 'Hokman Doldurulmaly',\n 'attributes' => [\"step\" => \"any\"], 'suffix' => \"man.\",],\n ['name'=>'categoryP','attribute'=>'name_tm','type'=>'select','label'=>'Esasy Kategoriýa ',\n 'entity'=>'category', 'model'=>'App\\Models\\Category',\n 'options'=>(function ($query) {\n return $query->orderBy('name_tm', 'ASC')->where('depth', 1)->get();\n }), 'tab' => 'Hokman Doldurulmaly'\n ],\n ['name'=>'categoryC','attribute'=>'name_tm','type'=>'select2_nested','label'=>'Kiçi Kategoriýa', 'entity'=>'subCategory', 'model'=>'App\\Models\\Category', 'tab' => 'Hokman Doldurulmaly'],\n ['name'=>'locationP','attribute'=>'name_tm','type'=>'select','label'=>'Ýeri',\n 'entity'=>'location', 'model'=>'App\\Models\\Location',\n 'options'=>(function ($query) {\n return $query->orderBy('name_tm', 'ASC')->where('depth', 1)->get();\n }), 'tab' => 'Hokman Doldurulmaly'\n ],\n ['name'=>\"colors\", 'type'=>'table','entity_singular' => 'option', 'label'=>'Reňkler','columns'=>['name'=>'Name','code'=>'Code'], 'tab' => 'Beylekiler'],\n ['name'=>\"size\", 'type'=>'table', 'entity_singular' => 'option','label'=>'Razmerler','columns'=>['size'=>'Size','quantity'=>'Quantity'], 'tab' => 'Beylekiler']\n ]);\n\n // add asterisk for fields that are required in ProductRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "ad681a862202bb2c0c31b14b677fc416", "score": "0.5869101", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Location');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/location');\n $this->crud->setEntityNameStrings('location', 'locations');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // Columns\n $this->crud->addColumn(['name' => 'active', 'type' => 'boolean', 'label' => 'Active']);\n $this->crud->addColumn(['name' => 'title', 'type' => 'text', 'label' => 'Name']);\n $this->crud->addColumn([\n 'type' => 'select',\n 'label' => 'NOAA Station', // Table column heading\n 'name' => 'noaa_station_id', // the column that contains the ID of that connected entity;\n 'entity' => 'station', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\NoaaStation', // foreign key model\n ]);\n $this->crud->addColumn([\n 'type' => 'select',\n 'label' => 'Buoy', // Table column heading\n 'name' => 'buoy_id', // the column that contains the ID of that connected entity;\n 'entity' => 'buoy', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\Buoy', // foreign key model\n ]);\n\n // Fields\n $this->crud->addField(['name' => 'active', 'type' => 'checkbox', 'label' => 'Active']);\n $this->crud->addField(['name' => 'title', 'type' => 'text', 'label' => 'Name']);\n $this->crud->addField(['name' => 'slug', 'type' => 'text', 'label' => 'Slug']);\n $this->crud->addField(['name' => 'lat', 'type' => 'number', 'label' => 'Latitude', 'attributes' => [\"step\" => \"any\"]]);\n $this->crud->addField(['name' => 'lng', 'type' => 'number', 'label' => 'Longitude', 'attributes' \n => [\"step\" => \"any\"]]);\n $this->crud->addField(['name' => 'timezone', 'type' => 'text', 'label' => 'Timezone']);\n $this->crud->addField([ \n 'label' => 'NOAA Station',\n 'type' => 'select',\n 'name' => 'noaa_station_id', // the db column for the foreign key\n 'entity' => 'station', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\NoaaStation',\n // optional\n 'options' => (function ($query) {\n return $query->orderBy('title', 'ASC')->get();\n }), // force the related options to be a custom query, instead of all(); you can use this to filter the results show in the select\n ]);\n $this->crud->addField([ \n 'label' => 'Buoy',\n 'type' => 'select',\n 'name' => 'buoy_id', // the db column for the foreign key\n 'entity' => 'buoy', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\Buoy',\n // optional\n 'options' => (function ($query) {\n return $query->orderBy('title', 'ASC')->get();\n }), // force the related options to be a custom query, instead of all(); you can use this to filter the results show in the select\n ]);\n\n // add asterisk for fields that are required in LocationRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "77427e80d1c1b5ae6b1eda12fec80b96", "score": "0.5863179", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Article');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/article');\n $this->crud->setEntityNameStrings('文章', '文章');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumns([\n [\n 'name' => 'id',\n 'label' => '#'\n ],\n [\n 'name' => 'title',\n 'label' => '标题',\n 'type' => 'article_title',\n 'width' => '34px',\n 'height' => '25px',\n 'border-radius' => '3px',\n ],\n [\n 'name' => 'category',\n 'label' => '分类'\n ],\n [\n 'name' => 'author',\n 'label' => '来源'\n ],\n [\n 'name' => 'created_at',\n 'label' => '创建时间'\n ],\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'category',\n 'label' => '分类',\n 'type' => 'select_from_array',\n 'options' => ArticleCategory::pluck('name', 'name')->toArray(),\n 'wrapperAttributes' => [\n 'class' => 'col-md-2 form-group'\n ],\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'title',\n 'label' => '标题',\n 'wrapperAttributes' => [\n 'class' => 'col-md-10 form-group'\n ],\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'photo',\n 'label' => '图片',\n 'type' => 'browse',\n 'wrapperAttributes' => [\n 'class' => 'col-md-6 form-group'\n ],\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'media_id',\n 'label' => '来源平台',\n 'type' => 'select',\n 'entity' => 'media',\n 'model' => Media::class,\n 'attribute' => 'name',\n 'wrapperAttributes' => [\n 'class' => 'col-md-6 form-group'\n ],\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'original_link',\n 'label' => '原文链接',\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'link_data',\n 'type' => 'link_data',\n 'label' => '正文链接 (留空则显示正文)',\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'content',\n 'label' => '正文内容(正文链接为空时才会显示)',\n 'type' => 'wysiwyg',\n 'tab' => '基本信息'\n ],\n [\n 'name' => 'houses',\n 'label' => '关联房源',\n 'type' => 'checklist',\n 'entity' => 'houses',\n 'model' => House::class,\n 'attribute' => 'name',\n 'pivot' => true,\n 'tab' => '关联房源'\n ],\n ]);\n\n // add asterisk for fields that are required in ArticleRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n $this->crud->orderBy('created_at', 'desc');\n\n $this->crud->addFilter([\n 'name' => 'category',\n 'type' => 'dropdown',\n 'label' => '分类'\n ], ArticleCategory::pluck('name', 'name')->toArray(), function ($value) {\n $this->crud->addClause('where', 'category', $value);\n });\n\n $this->crud->addFilter([\n 'name' => 'media_id',\n 'type' => 'dropdown',\n 'label' => '来源'\n ], Media::pluck('name', 'id')->toArray(), function ($value) {\n $this->crud->addClause('where', 'media_id', $value);\n });\n\n $this->crud->addFilter([\n 'name' => 'title',\n 'type' => 'text',\n 'label' => '标题'\n ], '', function ($value) {\n $this->crud->addClause('where', 'title', 'like', \"%{$value}%\");\n });\n\n $this->crud->addFilter([\n 'name' => 'content',\n 'type' => 'text',\n 'label' => '正文'\n ], '', function ($value) {\n $this->crud->addClause('where', 'content', 'like', \"%{$value}%\");\n });\n\n $this->crud->addButtonFromView('line', 'article', 'article', 'beginning');\n }", "title": "" }, { "docid": "94761c0b817b5c5cd2e02a622903065b", "score": "0.5844005", "text": "protected function setupUpdateOperation()\n {\n $this->crud->removeSaveActions(['save_and_back','save_and_edit','save_and_new']);\n\n $this->crud->addField([\n 'label' => \"Nomor Surat jalan\",\n 'name' => \"dn_number\",\n 'type' => 'text',\n 'attributes' => [\n 'readonly' => 'readonly',\n ]\n ]);\n\n $this->crud->addField([\n 'name' => 'reference',\n 'label' => 'Nomor SO',\n 'type' => 'select2_from_array',\n 'options' => SalesOrder::pluck('so_number', 'id'),\n 'allows_null' => true,\n ]);\n\n $this->crud->addField([\n 'name' => 'dn_date',\n 'label' => 'Tanggal Surat Jalan',\n 'type' => 'date_picker',\n ]);\n\n $this->crud->addField([\n 'name' => 'expedition',\n 'label' => 'Expedisi',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([\n 'name' => 'etd',\n 'label' => 'Estimasi Keberangkatan',\n 'type' => 'datetime_picker',\n ]);\n\n $this->crud->addField([\n 'name' => 'eta',\n 'label' => 'Estimasi Sampai',\n 'type' => 'datetime_picker',\n ]);\n\n $this->crud->addField([\n 'name' => 'total_weight',\n 'label' => 'Berat Total Barang',\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => 'Contoh : 80 KG',\n ],\n ]);\n\n $this->crud->addField([\n 'name' => 'driver',\n 'label' => 'Nama Pengemudi',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([\n 'name' => 'driver_phone',\n 'label' => 'No Kontak Pengemudi',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([\n 'name' => 'module',\n 'value' => 'sales_order',\n 'type' => 'hidden',\n ]);\n\n $this->crud->addField([\n 'name' => 'user_id',\n 'type' => 'hidden',\n 'value' => backpack_auth()->id()\n ]);\n\n $this->crud->addField([\n 'name' => 'company_id',\n 'type' => 'hidden',\n 'value' => backpack_auth()->user()->company_id\n ]);\n }", "title": "" }, { "docid": "2706d64d2002efc92037f4e8592ac74e", "score": "0.5827779", "text": "public function configureCrud(Crud $crud): Crud\n {\n return $crud->setSearchFields(null);\n }", "title": "" }, { "docid": "2b8adba11f84e110b988c4b85fd3bbd5", "score": "0.58262956", "text": "public function setup()\n {\n $this->crud->setModel('Newpixel\\BlogCRUD\\app\\Models\\BlogTag');\n $this->crud->setRoute(config('backpack.base.route_prefix').'/'.config('blogcrud.route_prefix', 'blog').'/tag');\n $this->crud->setEntityNameStrings('Eticheta', 'Etichete');\n\n // add asterisk for fields that are required in BlogTagRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // columns\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Denumire',\n ],\n [\n 'name' => 'active',\n 'label' => 'Activ',\n 'type' => 'boolean',\n 'options' => [0 => 'Nu', 1 => 'Da'],\n ],\n [\n 'name' => 'created_at',\n 'label' => 'Adaugat la',\n 'type' => 'date',\n ],\n ]);\n\n // fields\n $this->crud->addFields(\n [\n [\n 'name' => 'name',\n 'label' => 'Denumire',\n 'type' => 'text',\n 'tab' => 'General',\n 'wrapperAttributes' => ['class' => 'form-group col-md-10'],\n ],\n [\n 'name' => 'active',\n 'label' => 'Activ',\n 'type' => 'radio',\n 'options' => [0 => 'Nu', 1 => 'Da'],\n 'inline' => true,\n 'tab' => 'General',\n 'wrapperAttributes' => ['class' => 'form-group col-md-2'],\n ],\n [\n 'name' => 'details',\n 'label' => 'Detalii',\n 'type' => 'wysiwyg',\n 'tab' => 'General',\n 'wrapperAttributes' => ['class' => 'form-group col-md-12'],\n ],\n [\n 'name' => 'title',\n 'label' => 'Meta Title',\n 'fake' => true,\n 'store_in' => 'meta',\n 'tab' => 'SEO',\n ],\n [\n 'name' => 'description',\n 'label' => 'Meta Description',\n 'type' => 'textarea',\n 'fake' => true,\n 'store_in' => 'meta',\n 'tab' => 'SEO',\n ],\n [\n 'name' => 'keywords',\n 'label' => 'Meta Keywords',\n 'fake' => true,\n 'store_in' => 'meta',\n 'tab' => 'SEO',\n ],\n ]\n );\n\n $this->crud->addFilter(\n [\n 'type' => 'simple',\n 'name' => 'trashed',\n 'label'=> 'Sterse',\n ],\n false, function ($values) {\n $this->crud->query = $this->crud->query->onlyTrashed();\n }\n );\n }", "title": "" }, { "docid": "7b18f99ce007e043f45af8039cca6804", "score": "0.5823353", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\FeeReceipt');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/fee-receipt');\n $this->crud->setEntityNameStrings('Fee Receipt', 'fee receipts');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $userAdminStudents = User::getAdminStudents();\n $userAdminStudentsWithAllStudents [] = 'All Students';\n foreach ($userAdminStudents as $userAdminStudent) {\n $userAdminStudentsWithAllStudents [] = $userAdminStudent;\n }\n// $userAdminStudentsWithAllStudents [] = User::getAdminStudents();\n// dd($userAdminStudentsWithAllStudents);\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n// $this->crud->setFromDb();\n $this->crud->addColumn([\n 'name' => 'row_number',\n 'type' => 'row_number',\n 'label' => 'Sr. #',\n 'orderable' => false,\n ]);\n if (backpack_user()->hasRole('super_admin')) {\n $this->crud->addColumn([\n 'label' => 'Admin',\n 'name' => 'admin_id',\n 'type' => 'select',\n 'entity' => 'feeType.schoolAdmin',\n 'attribute' => 'name'\n ]);\n }\n $this->crud->addColumns([\n [\n 'label' => 'Student Name',\n 'name' => 'student_id',\n 'type' => 'select',\n 'entity' => 'student',\n 'attribute' => 'name'\n ],\n [\n 'label' => 'Fee Type',\n 'name' => 'fee_type_id',\n 'type' => 'select',\n 'entity' => 'feeType',\n 'attribute' => 'type'\n ],\n [\n 'label' => 'Amount',\n 'name' => 'amount',\n ],\n [\n 'label' => 'Amount',\n 'name' => 'amount',\n ],\n\n [\n 'label' => 'Due Date',\n 'name' => 'due_date',\n 'type' => 'date'\n ],\n [\n 'label' => 'Status',\n 'name' => 'status',\n ],\n [\n 'label' => 'Submitted Amount',\n 'name' => 'submitted_amount',\n ],\n [\n 'label' => 'Submission Date',\n 'name' => 'submission_date',\n ],\n ]);\n\n if (auth()->user()->hasRole('school_admin')) {\n $this->crud->addFields([\n [\n 'name' => 'fee_type_id',\n 'label' => \"Fee Type\",\n 'type' => 'select2_from_array',\n 'options' => User::adminFeesTypes(),\n 'allows_null' => false,\n ],\n ]);\n } else {\n $this->crud->addFields([\n [\n 'name' => 'fee_type_id',\n 'label' => \"Fee Type\",\n 'type' => 'select2',\n 'entity' => 'feeType',\n 'attribute' => 'type',\n ]\n ]);\n }\n if (auth()->user()->hasRole('school_admin')) {\n $this->crud->addFields([\n [\n 'name' => 'student_id',\n 'label' => \"Student Name\",\n 'type' => 'select2_from_array',\n 'options' => $userAdminStudents,\n 'allows_null' => false,\n ],\n ]);\n } else {\n $this->crud->addFields([\n [\n 'name' => 'student_id',\n 'label' => \"Student\",\n 'type' => 'select2_from_array',\n 'options' => User::onlyStudents(),\n ]\n ]);\n }\n $this->crud->addFields([\n [\n 'label' => 'Amount',\n 'name' => 'amount',\n ],\n [\n 'label' => 'Amount',\n 'name' => 'amount',\n ],\n\n [\n 'label' => 'Due Date',\n 'name' => 'due_date',\n 'type' => 'date_picker'\n ],\n [\n 'label' => 'Status',\n 'name' => 'status',\n 'type' => 'enum'\n ],\n [\n 'label' => 'Submitted Amount',\n 'name' => 'submitted_amount',\n ],\n [\n 'label' => 'Submission Date',\n 'name' => 'submission_date',\n 'type' => 'date_picker',\n ],\n ]);\n // add asterisk for fields that are required in FeeReceiptRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n $this->crud->addFilter([ // dropdown filter\n 'name' => 'status',\n 'type' => 'dropdown',\n 'label' => 'Status'\n ], [\n 'Pending' => 'Pending',\n 'Paid' => 'Paid',\n\n ], function ($value) { // if the filter is active\n $this->crud->addClause('where', 'status', $value);\n });\n if (backpack_user()->hasRole('super_admin')) {\n $this->crud->addFilter([ // dropdown filter\n 'name' => 'admin_id',\n 'type' => 'dropdown',\n 'label' => 'Admins'\n ], Role::getAllAdmins(), function ($value) { // if the filter is active\n $this->crud->addClause('whereHas', 'feeType', function ($query) use ($value) {\n $query->where('admin_id', $value);\n });\n });\n }\n if (backpack_user()->hasRole('school_admin')) {\n $this->crud->addClause('whereHas', 'student', function ($query) {\n $query->where('admin_id', '=', backpack_user()->id);\n });\n }\n }", "title": "" }, { "docid": "c0598529fa914d29c488c5e14badbaa8", "score": "0.58217883", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Movie');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/movie');\n $this->crud->setEntityNameStrings('movie', 'movies');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n // $this->crud->setFromDb();\n\n $this->crud->addField([\n 'label' => \"Nombre\",\n 'type' => 'text',\n 'name' => 'name',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Duración (minutos)\",\n 'name' => 'duration',\n 'type' => 'number',\n 'suffix' => ' min',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Sinopsis\",\n 'name' => 'synopsis',\n 'type' => 'textarea',\n ]);\n\n $this->crud->addField([ // Select2\n 'label' => \"País\",\n 'type' => 'select2',\n 'name' => 'country_id', // the db column for the foreign key\n 'entity' => 'country', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Country\", // foreign key model\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Trailer\",\n 'name' => 'trailer',\n 'type' => 'video',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Poster (<a href='https://www.filmaffinity.com/mx/main.html' target='_blank'>Descargar de aquí</a>)\",\n 'name' => 'poster',\n 'type' => 'image',\n 'upload' => true,\n 'crop' => true,\n 'aspect_ratio' => 0,\n ]);\n\n $this->crud->addField([\n 'label' => \"Año\",\n 'name' => 'year',\n 'type' => 'number',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Director\",\n 'name' => 'director_id',\n 'type' => 'select2',\n 'entity' => 'director',\n 'attribute' => 'name',\n 'model' => 'App\\Models\\Director',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([ // SelectMultiple = n-n relationship (with pivot table)\n 'label' => \"Actores\",\n 'type' => 'select2_multiple',\n 'name' => 'actors', // the method that defines the relationship in your Model\n 'entity' => 'actors', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Actor\", // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addField([ // SelectMultiple = n-n relationship (with pivot table)\n 'label' => \"Géneros\",\n 'type' => 'select2_multiple',\n 'name' => 'genres', // the method that defines the relationship in your Model\n 'entity' => 'genres', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Genre\", // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]);\n\n $this->crud->addColumn([\n 'name' => 'name',\n 'label' => 'Nombre',\n ]);\n\n $this->crud->addColumn([\n 'name' => 'director.name',\n 'label' => 'Director',\n ]);\n\n $this->crud->addColumn([\n 'name' => 'duration',\n 'label' => 'Duración',\n 'type' => 'number',\n 'suffix' => ' min'\n ]);\n\n $this->crud->allowAccess('show');\n $this->crud->enableExportButtons();\n $this->crud->enableDetailsRow();\n\n\n // add asterisk for fields that are required in MovieRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "eb043ef9ed1a82c46c4d580b28d39b13", "score": "0.5814258", "text": "public function setUp() {\n $this->crud->setModel(\"App\\Models\\Product\");\n $this->crud->setRoute(\"panel/products\");\n $this->crud->setEntityNameStrings('product', 'products');\n\n /*\n\t\t|--------------------------------------------------------------------------\n\t\t| BASIC CRUD INFORMATION\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\n\t\t//$this->crud->setFromDb();\n\n\t\t// ------ CRUD FIELDS\n $this->crud->addField([\n 'name' => 'asin',\n 'label' => 'ASIN',\n 'type' => 'text',\n ]);\n // $this->crud->addField($options, 'update/create/both');\n // $this->crud->addFields($array_of_arrays, 'update/create/both');\n // $this->crud->removeField('name', 'update/create/both');\n // $this->crud->removeFields($array_of_names, 'update/create/both');\n\n // ------ CRUD COLUMNS\n $this->crud->addColumn([ // image\n 'label' => \"Image\",\n 'name' => \"image_url\",\n 'type' => 'image',\n ]);\n $this->crud->addColumn([\n 'name' => 'asin',\n 'label' => 'ASIN',\n ]);\n $this->crud->addColumn([\n 'name' => 'title',\n 'label' => 'Title',\n ]);\n $this->crud->addColumn([\n // run a function on the CRUD model and show its return value\n 'label' => \"Rank\", // Table column heading\n 'type' => \"model_function\",\n 'function_name' => 'getLatestProductRank', // the method in your Model\n ]);\n $this->crud->addColumn([\n // run a function on the CRUD model and show its return value\n 'label' => \"Price\", // Table column heading\n 'type' => \"model_function\",\n 'function_name' => 'getLatestProductPrice', // the method in your Model\n ]);\n\n // $this->crud->addColumn(); // add a single column, at the end of the stack\n // $this->crud->addColumns(); // add multiple columns, at the end of the stack\n // $this->crud->removeColumn('column_name'); // remove a column from the stack\n // $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack\n // $this->crud->setColumnDetails('column_name', ['attribute' => 'value']); // adjusts the properties of the passed in column (by name)\n // $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']);\n \n // ------ CRUD BUTTONS\n // possible positions: 'beginning' and 'end'; defaults to 'beginning' for the 'line' stack, 'end' for the others;\n $this->crud->addButtonFromView('line', 'Chart', 'chart', 'end');\n // $this->crud->addButton($stack, $name, $type, $content, $position); // add a button; possible types are: view, model_function\n // $this->crud->addButtonFromModelFunction($stack, $name, $model_function_name, $position); // add a button whose HTML is returned by a method in the CRUD model\n // $this->crud->addButtonFromView($stack, $name, $view, $position); // add a button whose HTML is in a view placed at resources\\views\\vendor\\backpack\\crud\\buttons\n // $this->crud->removeButton($name);\n // $this->crud->removeButtonFromStack($name, $stack);\n\n // ------ CRUD ACCESS\n $this->crud->allowAccess(['list', 'create', 'delete']);\n $this->crud->denyAccess(['update', 'reorder']);\n\n // ------ CRUD REORDER\n // $this->crud->enableReorder('label_name', MAX_TREE_LEVEL);\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('reorder');\n\n // ------ CRUD DETAILS ROW\n // $this->crud->enableDetailsRow();\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('details_row');\n // $this->crud->allowAccess('details_row');\n // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php\n\n // ------ REVISIONS\n // You also need to use \\Venturecraft\\Revisionable\\RevisionableTrait;\n // Please check out: https://laravel-backpack.readme.io/docs/crud#revisions\n // $this->crud->allowAccess('revisions');\n\n // ------ AJAX TABLE VIEW\n // Please note the drawbacks of this though:\n // - 1-n and n-n columns are not searchable\n // - date and datetime columns won't be sortable anymore\n // $this->crud->enableAjaxTable();\n \n \n // ------ DATATABLE EXPORT BUTTONS\n // Show export to PDF, CSV, XLS and Print buttons on the table view.\n // Does not work well with AJAX datatables.\n // $this->crud->enableExportButtons();\n\n // ------ ADVANCED QUERIES\n // $this->crud->addClause('active');\n // $this->crud->addClause('type', 'car');\n // $this->crud->addClause('where', 'name', '==', 'car');\n // $this->crud->addClause('whereName', 'car');\n $this->crud->addClause('whereHas', 'users', function($query) {\n $query->where('id', request()->user()->id);\n });\n // $this->crud->with(); // eager load relationships\n // $this->crud->orderBy();\n // $this->crud->groupBy();\n // $this->crud->limit();\n }", "title": "" }, { "docid": "a2c883d7456c0b6527358f5e48d95aa3", "score": "0.581058", "text": "public function setup() : void\n {\n $this->crud->setModel('App\\Models\\User');\n $this->crud->setRoute('admin/manager');\n $this->crud->setEntityNameStrings('manager', 'managers');\n\n // Don't show 'basic' users.\n $this->crud->addClause('whereIn', 'user_role_id', [2, 3]);\n }", "title": "" }, { "docid": "00ce9e3e2f25e5e3b9428d4e76877fb4", "score": "0.58079475", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Department');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/departments');\n $this->crud->setEntityNameStrings(trans('fields.department'), trans('fields.departments'));\n $this->crud->addButtonFromModelFunction('line', 'calendar', 'get_calendar_button', 'end'); // add a button whose HTML is returned by a method in the CRUD model\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->enableExportButtons();\n\n $this->crud->setColumns([\n [\n 'name' => 'name',\n 'label' => trans('fields.name'),\n 'type' => 'text',\n ],\n [\n // n-n relationship (with pivot table)\n 'label' => trans('fields.employees'),\n 'type' => \"select_multiple\",\n 'name' => 'employees', // the method that defines the relationship in your Model\n 'entity' => 'employees', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Employee\", // foreign key model\n ],\n// [\n// // n-n relationship (with pivot table)\n// 'label' => trans('fields.holidays'),\n// 'type' => \"select_multiple\",\n// 'name' => 'holidays', // the method that defines the relationship in your Model\n// 'entity' => 'holidays', // the method that defines the relationship in your Model\n// 'attribute' => \"name\", // foreign key attribute that is shown to user\n// 'model' => \"App\\Models\\WorkingPlaceHoliday\", // foreign key model\n// ],\n [\n // n-n relationship (with pivot table)\n 'label' => trans('fields.events'),\n 'type' => \"select_multiple\",\n 'name' => 'events', // the method that defines the relationship in your Model\n 'entity' => 'events', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\CalendarEvent\", // foreign key model\n ],\n ]);\n\n // Fields\n $this->crud->addFields([\n [\n 'name' => 'name',\n 'label' => trans('fields.name'),\n 'type' => 'text',\n ],\n// [\n// 'label' => trans('fields.employees'),\n// 'type' => 'select2_multiple',\n// 'name' => 'employees', // the method that defines the relationship in your Model\n// 'entity' => 'employees', // the method that defines the relationship in your Model\n// 'attribute' => 'name', // foreign key attribute that is shown to user\n// 'model' => \"App\\Models\\Employee\", // foreign key model\n// 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?\n// 'select_all' => true, // show Select All and Clear buttons?\n// ],\n [\n // n-n relationship (with pivot table)\n 'label' => trans('fields.holidays'),\n 'type' => \"select2_multiple\",\n 'name' => 'holidays', // the method that defines the relationship in your Model\n 'entity' => 'holidays', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\WorkingPlaceHoliday\", // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?\n 'select_all' => true, // show Select All and Clear buttons?\n\n ],\n [\n // n-n relationship (with pivot table)\n 'label' => trans('fields.events'),\n 'type' => \"select2_multiple\",\n 'name' => 'events', // the method that defines the relationship in your Model\n 'entity' => 'events', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\CalendarEvent\", // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?\n 'select_all' => true, // show Select All and Clear buttons?\n ],\n// [\n// 'label' => 'Working Days',\n// 'type' => 'checklist',\n// 'name' => 'workingdays',\n// 'entity' => 'workingDays',\n// 'attribute' => 'name',\n// 'model' => \"App\\Models\\WorkingDays\",\n// 'pivot' => true,\n// ],\n [\n 'name' => 'company_id',\n 'type' => 'hidden',\n 'value' => backpack_user()->company->id\n ],\n ]);\n\n // add asterisk for fields that are required in DepartmentRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "b4b6c7c232decde0a6444b03d32ebaec", "score": "0.5804681", "text": "public function setup()\n {\n $house_id = request()->route('house_id');\n $this->data[ 'house' ] = $house = House::findOrFail($house_id);\n $this->data[ 'house_id' ] = $house_id;\n\n $this->crud->setModel('App\\Models\\Information');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/house/' . $house_id . '/information');\n\n $this->crud->setEntityNameStrings('动态', '动态');\n\n $this->crud->addClause('ofHouse', $house_id);\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumns([\n [\n 'name' => 'title',\n 'label' => '标题'\n ],\n [\n 'name' => 'type',\n 'label' => '类型',\n 'type' => 'select_from_array',\n 'options' => array_combine(Information::TYPES, Information::TYPES),\n 'wrapperAttributes' => [\n 'class' => 'col-md-2 form-group'\n ]\n ],\n [\n 'name' => 'avatar',\n 'label' => '媒体头像',\n 'type' => 'image'\n ],\n [\n 'name' => 'author',\n 'label' => '媒体名称'\n ],\n [\n 'name' => 'created_at',\n 'label' => '创建时间'\n ],\n [\n 'name' => 'updated_at',\n 'label' => '更新时间'\n ],\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'type',\n 'label' => '类型',\n 'type' => 'select_from_array',\n 'options' => array_combine(Information::TYPES, Information::TYPES),\n 'wrapperAttributes' => [\n 'class' => 'col-md-2 form-group'\n ],\n 'tab' => '动态内容'\n ],\n [\n 'name' => 'title',\n 'label' => '标题',\n 'wrapperAttributes' => [\n 'class' => 'col-md-10 form-group'\n ],\n 'tab' => '动态内容'\n ],\n [\n 'name' => 'media_id',\n 'label' => '来源平台',\n 'type' => 'select',\n 'entity' => 'media',\n 'model' => Media::class,\n 'attribute' => 'name',\n 'wrapperAttributes' => [\n 'class' => 'col-md-6 form-group'\n ]\n ],\n [\n 'name' => 'content',\n 'label' => '正文',\n 'type' => 'textarea',\n 'tab' => '动态内容'\n ],\n ]);\n\n if ($this->crud->actionIs('create')) {\n $this->crud->addFields([\n [\n 'name' => 'content',\n 'label' => '正文',\n 'type' => 'textarea',\n 'tab' => '动态内容'\n ],\n [\n 'name' => 'notify',\n 'label' => '发送通知给订阅用户',\n 'type' => 'checkbox',\n 'tab' => '消息通知'\n ],\n [\n 'name' => 'message_title',\n 'label' => '通知标题(不填则使用动态标题)',\n 'tab' => '消息通知'\n ],\n [\n 'name' => 'message_content',\n 'label' => '通知内容(不填则使用动态内容)',\n 'type' => 'textarea',\n 'tab' => '消息通知'\n ]\n ]);\n }\n\n $this->crud->setListView('house.information');\n\n $this->crud->addFilter([\n 'name' => 'type',\n 'type' => 'dropdown',\n 'label' => '动态类型'\n ], array_combine(Information::TYPES, Information::TYPES), function ($value) {\n $this->crud->addClause('where', 'type', $value);\n });\n\n // add asterisk for fields that are required in InformationRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "7d6ea8b5868b868b0250221dab3c12e2", "score": "0.5783105", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Question');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/question');\n $this->crud->setEntityNameStrings('提问', '提问');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumns([\n [\n 'name' => 'content',\n 'label' => '问题',\n ],\n [\n 'name' => 'hot',\n 'label' => '热门',\n 'type' => 'check'\n ],\n [\n 'name' => 'user_id',\n 'label' => '提问用户',\n 'type' => 'user'\n ],\n [\n 'name' => 'answered',\n 'label' => '已回答',\n 'type' => 'check'\n ],\n [\n 'name' => 'view_count',\n 'label' => '浏览人数',\n ],\n ]);\n\n $this->crud->addFields([\n [\n 'name' => 'content',\n 'label' => '问题',\n 'type' => 'textarea'\n ],\n [\n 'name' => 'hot',\n 'label' => '热门',\n 'type' => 'checkbox'\n ],\n [\n 'name' => 'answer',\n 'label' => '回答内容',\n 'type' => 'textarea'\n ]\n ]);\n\n // add asterisk for fields that are required in QuestionRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n $this->crud->orderBy('created_at', 'desc');\n\n $this->crud->addFilter(\n [ // simple filter\n 'type' => 'simple',\n 'name' => 'not_answered',\n 'label'=> '未回答'\n ],\n false,\n function () {\n $this->crud->addClause('notAnswered');\n }\n );\n\n $this->crud->addFilter(\n [ // simple filter\n 'type' => 'simple',\n 'name' => 'hot',\n 'label'=> '热门'\n ],\n false,\n function () {\n $this->crud->addClause('hot');\n }\n );\n }", "title": "" }, { "docid": "132365d07a6c77dd4ed9a0029fbbe5c9", "score": "0.57518697", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Page');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/page');\n $this->crud->setEntityNameStrings('', 'Pages');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addColumns([\n [\n 'name' => 'id',\n 'label' => 'ID',\n ],\n [\n 'name' => 'key',\n 'label' => 'Key',\n ],\n [\n 'name' => 'icon',\n 'label' => 'Icon',\n 'type' => 'image',\n ],\n [\n 'name' => 'title',\n 'label' => 'Title',\n ],\n [\n 'name' => 'slug',\n 'label' => 'Slug',\n ],\n [\n 'name' => 'short_description',\n 'label' => 'Short Desc',\n ],\n ]);\n\n\n $this->crud->addFields([\n [\n 'name' => 'icon',\n 'label' => 'Icon',\n 'type' => 'browse',\n ],\n [\n 'name' => 'type',\n 'label' => \"Type Of Page\",\n 'type' => 'select2_from_array',\n 'options' => ['portfolio' => 'Portfolio', 'services' => 'Services','pages' => 'Page'],\n 'allows_null' => false,\n 'default' => 'services',\n ],\n [\n 'name' => 'key',\n 'label' => 'Key',\n 'hint' => '<span class=\"text-danger\">Do not change it!</span>'\n ],\n [\n 'name' => 'slug',\n 'label' => 'Slug',\n 'hint' => '<span style=\"color: purple\">Leave it blank in order to automate the process!</span>',\n ],\n [\n 'name' => 'title',\n 'label' => 'Title',\n ],\n [\n 'name' => 'short_description',\n 'label' => 'Short Desc',\n 'type' => 'textarea',\n 'attributes' => [\n 'style' => \"resize: none;\",\n 'rows' => 5,\n ],\n ],\n [\n 'name' => 'body',\n 'label' => 'Body',\n 'type' => 'ckeditor',\n ],\n [\n 'name' => 'images',\n 'label' => 'Images',\n 'type' => 'browse_multiple',\n 'multiple' => true,\n ],\n ]);\n\n // add asterisk for fields that are required in PageRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "bdf8eb2bdfee87128f69f5997bd07d3b", "score": "0.5734063", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Location');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/location');\n $this->crud->setEntityNameStrings('location', 'locations');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $titleArray = [\n 'name' => 'label',\n 'type' => 'text',\n ];\n\n $addressFieldArray = [ // Address\n 'name' => 'address',\n 'label' => 'Address',\n 'type' => 'address_google',\n // optional\n 'country' => '[\"uk\"]',\n 'radius' => 5000,\n 'location' => '53.6772339,-1.4042975',\n 'store_as_json' => true,\n ];\n\n $this->crud->addFields([$titleArray, $addressFieldArray]);\n $this->crud->addColumns([$titleArray]);\n\n // add asterisk for fields that are required in LocationRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "ce35ad37a5c88eb9b46f39d889c0ad4f", "score": "0.5701854", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Home');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/home');\n $this->crud->setEntityNameStrings('home', 'homes');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->setFromDb();\n\n // add asterisk for fields that are required in HomeRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "bb2b1e45f2af5f21289f45ab1262893a", "score": "0.56966776", "text": "function configureAction(){\n\t\tif(! DEVEL_MODE_ACTIVE() )\n\t\t\treturn $this->forward(ERROR_DISPATCH);\n\t\t$this->view->_js_loadPlugin('jquery');\n\t\t$this->view->configFile = $this->configFile;\n\t\t$this->view->modelFile = $this->getModelFilePath($this->modelType);\n\t\t#--- to string configuration\n\t\t$this->_toStr = $this->readModel__ToStr($this->modelType);\n\t\t$this->datasDefs = array_keys(abstractModel::_getModelStaticProp($this->modelType,'datasDefs'));\n\t\t$hasOnes = array_keys(abstractModel::_getModelStaticProp($this->modelType,'hasOne'));\n\t\t$hasMany = array_keys(abstractModel::_getModelStaticProp($this->modelType,'hasMany'));\n\t\tforeach($this->datasDefs as $v)\n\t\t\t$this->datasFields .= \"<span class=\\\"sMVC_dataField tk-border tk-corner tk-inlineStack\\\">%$v</span> &nbsp; \";\n\t\tforeach($hasOnes as $v)\n\t\t\t$this->hasOnes .= \"<span class=\\\"sMVC_dataField tk-border tk-corner tk-inlineStack\\\">%$v</span> &nbsp; \";\n\t\tforeach($hasMany as $v)\n\t\t\t$this->hasManys .= \"<span class=\\\"sMVC_dataField tk-border tk-corner tk-inlineStack\\\">%$v</span> &nbsp; \";\n\t\t#--- list fields configuration\n\t\t#- check for config file\n\t\t$this->primaryKey = abstractModel::_getModelStaticProp($this->modelType,'primaryKey');\n\t\t$this->listedFields = (isset($this->_modelConfig['LIST']))?$this->_modelConfig['LIST']:array();\n\t\t$datasDefs = $this->datasDefs;\n\t\tif( count($this->listedFields) ){ //-- restore selected order\n\t\t\tforeach(array_reverse($this->listedFields) as $k=>$v){\n\t\t\t\t$key = array_search($k,$datasDefs,true);\n\t\t\t\tif( false!==$key)\n\t\t\t\t\tunset($datasDefs[$key]);\n\t\t\t\tarray_unshift($datasDefs,$k);\n\t\t\t}\n\t\t}\n\t\t$this->listDatasDefs = $datasDefs;\n\t\t#--- forms config\n\t\t$formSettings = (!empty($this->_modelConfig['FORM']))?$this->_modelConfig['FORM']:array();\n\t\t$_idMsgs = array();\n\t\tforeach($formSettings as $k=>$setting){\n\t\t\tif( !empty($setting['type']) ){\n\t\t\t\t$inputTypes[$k] = $setting['type'];\n\t\t\t\tunset($setting['type']);\n\t\t\t}\n\t\t\tif(! empty($setting['help']) ){\n\t\t\t\t$_idMsgs[] = $setting['help'];\n\t\t\t}\n\t\t\t$inputOptions[$k] = empty($setting)?'':htmlentities(json_encode($setting));\n\t\t}\n\t\t$this->inputTypes = empty($inputTypes)?array():$inputTypes;\n\t\t$this->inputOptions = empty($inputOptions)?array():$inputOptions;\n\t\tif( !empty($this->_modelConfig['FORM_ORDER'])){\n\t\t\t$this->fieldOrder = $this->_modelConfig['FORM_ORDER'];\n\t\t\tif( isset($this->fieldOrder['fieldGroupMethod']) ){\n\t\t\t\tforeach( $this->fieldOrder as $k=>$fldGroup ){\n\t\t\t\t\tif( !empty($fldGroup['name']) )\n\t\t\t\t\t\t$_idMsgs[] = $fldGroup['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->view->listUrl = $this->view->url('list',array('modelType'=>$this->modelType));\n\t\t#--- locale settings\n\t\t$this->langs = langManager::$acceptedLanguages;\n\t\t$_idMsgs = array_merge(array('save','back','Add new item',$this->modelType,'Edit '.$this->modelType,'Add new '.$this->modelType),$this->datasDefs,$hasMany,$hasOnes,$_idMsgs);\n\t\tforeach($this->langs as $l){\n\t\t\t$messages[$l] = parse_conf_file(langManager::lookUpDic('adminmodels_'.$this->modelType,$l),true);\n\t\t\t$idMsgs[$l] = array_unique(empty($messages[$l])?$_idMsgs:array_merge($_idMsgs,array_keys($messages[$l])));\n\t\t}\n\n\t\t$this->messages = $messages;\n\t\t$this->idMsgs = $idMsgs;\n\t\t$this->view->_allowedActions = $this->_allowedActions;\n\t}", "title": "" }, { "docid": "f38ff2d5805e54c81290b16eda74f2a2", "score": "0.5681815", "text": "public function cbInit() {\n\t\t\t$this->title_field = \"name\";\n\t\t\t$this->limit = \"100\";\n\t\t\t$this->orderby = \"id,desc\";\n\t\t\t$this->global_privilege = true;\n\t\t\t$this->button_table_action = true;\n\t\t\t$this->button_bulk_action = true;\n\t\t\t$this->button_action_style = \"button_icon\";\n\t\t\t$this->button_add = true;\n\t\t\t$this->button_edit = true;\n\t\t\t$this->button_delete = true;\n\t\t\t$this->button_detail = true;\n\t\t\t$this->button_show = false;\n\t\t\t$this->button_filter = true;\n\t\t\t$this->button_import = true;\n\t\t\t$this->button_export = true;\n\t\t\t$this->table = \"leads\";\n\t\t\t# END CONFIGURATION DO NOT REMOVE THIS LINE\n\n\t\t\t# START COLUMNS DO NOT REMOVE THIS LINE\n\t\t\t$this->col = [];\n\t\t\t$this->col[] = [\"label\"=>\"Name\",\"name\"=>\"name\"];\n\t\t\t$this->col[] = [\"label\"=>\"Last Name\",\"name\"=>\"lastname\"];\n\t\t\t$this->col[] = [\"label\"=>\"Email\",\"name\"=>\"email\"];\n\t\t\t$this->col[] = [\"label\"=>\"Phone\",\"name\"=>\"phone\"];\n\t\t\t$this->col[] = [\"label\"=>\"Lead Type\",\"name\"=>\"leads_type_id\",\"join\"=>\"leads_type,name\"];\n\t\t\t$this->col[] = [\"label\"=>\"Assigned\",\"name\"=>\"cms_users_id\",\"join\"=>\"cms_users,name\"];\n\t\t\t# END COLUMNS DO NOT REMOVE THIS LINE\n\n\t\t\t# START FORM DO NOT REMOVE THIS LINE\n\t\t\t$this->form = [];\n\t\t\t$this->form[] = ['label'=>'Photo','name'=>'photo','type'=>'upload','validation'=>'image|max:10000','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Name','name'=>'name','type'=>'text','validation'=>'required|string|min:1|max:70','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Last Name','name'=>'lastname','type'=>'text','validation'=>'required|string|min:1|max:70','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Email','name'=>'email','type'=>'email','validation'=>'required|min:1|max:253|email|unique:leads','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Phone','name'=>'phone','type'=>'text','validation'=>'required|min:10|max:10|unique:leads','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Address','name'=>'address','type'=>'googlemaps','validation'=>'min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'City','name'=>'city','type'=>'text','validation'=>'min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'State','name'=>'states_id','type'=>'select2','validation'=>'required','width'=>'col-sm-10','datatable'=>'states,name'];\n\t\t\t$this->form[] = ['label'=>'Assign To','name'=>'cms_users_id','type'=>'select2','validation'=>'required','width'=>'col-sm-10','datatable'=>'cms_users,name'];\n\t\t\t$this->form[] = ['label'=>'Latitude','name'=>'latitude','type'=>'hidden','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Longitude','name'=>'longitude','type'=>'hidden','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t# END FORM DO NOT REMOVE THIS LINE\n\n\t\t\t# OLD START FORM\n\t\t\t//$this->form = [];\n\t\t\t//$this->form[] = ['label'=>'Photo','name'=>'photo','type'=>'upload','validation'=>'image|max:10000','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Name','name'=>'name','type'=>'text','validation'=>'required|string|min:1|max:70','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Last Name','name'=>'lastname','type'=>'text','validation'=>'required|string|min:1|max:70','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Email','name'=>'email','type'=>'email','validation'=>'required|min:1|max:253|email|unique:leads','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Phone','name'=>'phone','type'=>'text','validation'=>'required|min:10|max:10|unique:leads','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Address','name'=>'address','type'=>'googlemaps','validation'=>'min:1|max:255','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'City','name'=>'city','type'=>'text','validation'=>'min:1|max:255','width'=>'col-sm-10','datatable'=>'states,name'];\n\t\t\t//$this->form[] = ['label'=>'State','name'=>'states_id','type'=>'select2','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Assign To','name'=>'cms_users_id','type'=>'select2','validation'=>'required','width'=>'col-sm-10','datatable'=>'cms_users,name'];\n\t\t\t//$this->form[] = ['label'=>'Latitude','name'=>'latitude','type'=>'hidden','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Longitude','name'=>'longitude','type'=>'hidden','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t# OLD END FORM\n\n\t\t\t/*\n | ----------------------------------------------------------------------\n | Sub Module\n | ----------------------------------------------------------------------\n | @label = Label of action\n | @path = Path of sub module\n | @foreign_key \t = foreign key of sub table/module\n | @button_color = Bootstrap Class (primary,success,warning,danger)\n | @button_icon = Font Awesome Class\n | @parent_columns = Sparate with comma, e.g : name,created_at\n |\n */\n $this->sub_module = array();\n\n /*\n | ----------------------------------------------------------------------\n | Add More Action Button / Menu\n | ----------------------------------------------------------------------\n | @label = Label of action\n | @url = Target URL, you can use field alias. e.g : [id], [name], [title], etc\n | @icon = Font awesome class icon. e.g : fa fa-bars\n | @color \t = Default is primary. (primary, warning, succecss, info)\n | @showIf \t = If condition when action show. Use field alias. e.g : [id] == 1\n |\n */\n $this->addaction = array();\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Add More Button Selected\n | ----------------------------------------------------------------------\n | @label = Label of action\n | @icon \t = Icon from fontawesome\n | @name \t = Name of button\n | Then about the action, you should code at actionButtonSelected method\n |\n */\n $this->button_selected = array();\n $this->button_selected[] = ['label'=>'Send Email','icon'=>'fa fa-envelope-o','name'=>'send_email'];\n $this->button_selected[] = ['label'=>'Send SMS','icon'=>'fa fa-phone','name'=>'send_sms'];\n\n\n /*\n | ----------------------------------------------------------------------\n | Add alert message to this module at overheader\n | ----------------------------------------------------------------------\n | @message = Text of message\n | @type = warning,success,danger,info\n |\n */\n $this->alert = array();\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Add more button to header button\n | ----------------------------------------------------------------------\n | @label = Name of button\n | @url = URL Target\n | @icon = Icon from Awesome.\n |\n */\n $this->index_button = array();\n\n\n /*\n | ----------------------------------------------------------------------\n | Customize Table Row Color\n | ----------------------------------------------------------------------\n | @condition = If condition. You may use field alias. E.g : [id] == 1\n | @color = Default is none. You can use bootstrap success,info,warning,danger,primary.\n |\n */\n $this->table_row_color = array();\n\n\n /*\n | ----------------------------------------------------------------------\n | You may use this bellow array to add statistic at dashboard\n | ----------------------------------------------------------------------\n | @label, @count, @icon, @color\n |\n */\n $this->index_statistic = array();\n\n\n /*\n | ----------------------------------------------------------------------\n | Add javascript at body\n | ----------------------------------------------------------------------\n | javascript code in the variable\n | $this->script_js = \"function() { ... }\";\n |\n */\n $this->script_js = \"\n \n\t \t$(function() { \n \n\t \t})\n\t \";\n\n\n /*\n | ----------------------------------------------------------------------\n | Include HTML Code before index table\n | ----------------------------------------------------------------------\n | html code to display it before index table\n | $this->pre_index_html = \"<p>test</p>\";\n |\n */\n $this->pre_index_html = null;\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Include HTML Code after index table\n | ----------------------------------------------------------------------\n | html code to display it after index table\n | $this->post_index_html = \"<p>test</p>\";\n |\n */\n $this->post_index_html = null;\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Include Javascript File\n | ----------------------------------------------------------------------\n | URL of your javascript each array\n | $this->load_js[] = asset(\"myfile.js\");\n |\n */\n $this->load_js = array();\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Add css style at body\n | ----------------------------------------------------------------------\n | css code in the variable\n | $this->style_css = \".style{....}\";\n |\n */\n $this->style_css = NULL;\n\n\n\n /*\n | ----------------------------------------------------------------------\n | Include css File\n | ----------------------------------------------------------------------\n | URL of your css each array\n | $this->load_css[] = asset(\"myfile.css\");\n |\n */\n $this->load_css = array();\n\n\n }", "title": "" }, { "docid": "a9c4c56e5666933a91dc6fcd40ee5c37", "score": "0.5647064", "text": "public function setup() {\n $this->crud->setModel('App\\Teacher');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/teachers');\n $this->crud->setEntityNameStrings('teacher', 'teachers');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n // Columns\n $this->crud->addColumn(['name' => 'id', 'type' => 'number', 'label' => 'ID']);\n $this->crud->addColumn(['name' => 'initials_name', 'type' => 'text', 'label' => 'Name']);\n $this->crud->addButtonFromView('top', 'Обновить список преподавателей', 'moderate', 'beginning');\n $this->crud->removeButton('create');\n $this->crud->disableDetailsRow();\n $this->crud->enableResponsiveTable();\n $this->crud->denyAccess(['create', 'delete', 'update']);\n // $this->crud->addButton('top','moderate', 'view', 'moderate', 'beginning');\n // TODO: remove setFromDb() and manually define Fields and Columns\n // $this->crud->setFromDb();\n }", "title": "" }, { "docid": "6eab5130ed4883a0dce8059e69756422", "score": "0.56411445", "text": "public function configure()\n {\n // y las validaciones del modelo\n unset($this->widgetSchema['created_at']);\n unset($this->validatorSchema['created_at']);\n unset($this->widgetSchema['updated_at']);\n unset($this->validatorSchema['updated_at']);\n\n // sacamos el sf_guard_user_id\n unset($this->widgetSchema['sf_guard_user_id']);\n unset($this->validatorSchema['sf_guard_user_id']);\n\n // sacamos el campo click\n unset($this->widgetSchema['click']);\n unset($this->validatorSchema['click']);\n\n $this->widgetSchema['short_description'] = new sfWidgetFormTextarea(array(),array( 'cols' => 100,'rows' => 5));\n $this->validatorSchema['short_description'] = new sfValidatorString(array('max_length' => 150, 'required' => true));\n $this->validatorSchema['title'] = new sfValidatorString(array('max_length' => 100, 'required' => true));\n }", "title": "" }, { "docid": "c605205451c3e64361ecf7644c685016", "score": "0.5640503", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\TokenDevice');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/token-device');\n $this->crud->setEntityNameStrings('tokendevice', 'token_devices');\n\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n /*\n |--------------------------------------------------------------------------\n | COLUMNS AND FIELDS\n |--------------------------------------------------------------------------\n */\n\n // ------ CRUD COLUMNS\n $this->crud->addColumn([\n 'name'=>'id',\n 'label'=>'ID',\n 'type'=>'number'\n ]);\n $this->crud->addColumn([\n 'name' => 'user_id',\n 'label' => 'User',\n 'type' => 'closure',\n 'function' => function ($token) {\n $id = $token->user_id;\n $user = User::find($id);\n if (is_object($user)) {\n return $user->name;\n } else {\n return 'Chưa xác định';\n }\n }\n ]);\n $this->crud->addColumn([\n 'name' => 'token_device',\n 'label'=> 'Token Device',\n 'type' => 'text',\n ]);\n $this->crud->addColumn([\n 'name' => 'created_at',\n 'label' => 'Thời gian tạo',\n 'type' => 'date'\n ]);\n\n // --------- FILTER\n $this->crud->addFilter([\n 'name' => 'user_id',\n 'type' => 'select2_ajax',\n 'label' => 'User',\n 'placeholder' => 'Pick a User'\n ],\n route('admin.post.filter.users.ajax'),\n function($value) {\n $this->crud->addClause('where', 'user_id', $value);\n });\n\n $this->crud->addFilter([\n 'type' => 'date_range',\n 'name' => 'created_at',\n 'label' => 'Thời gian tạo'\n ],\n false,\n function ($value) {\n $dates = json_decode($value);\n $this->crud->addClause('where', 'created_at', '>=', $dates->from);\n $this->crud->addClause('where', 'created_at', '<=', $dates->to);\n });\n\n $this->crud->enableAjaxTable();\n\n }", "title": "" }, { "docid": "686795d9898ccc3a0fd1d4138d81c386", "score": "0.5639028", "text": "public function init()\n {\n //dump(ModelCrud::$definition);\n parent::init();\n }", "title": "" }, { "docid": "9d74e9e54aac09a0433a75e2b0fe7d9c", "score": "0.5612886", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Calibration');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/calibration');\n $this->crud->setEntityNameStrings('kalibrasi', 'kalibrasi');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n //$this->crud->setFromDb();\n $this->crud->addField([\n 'name' => 'tanggal',\n 'label' => 'Tanggal',\n 'type' => 'date_picker',\n ]);\n\n $this->crud->addField([\n 'label' => \"Alat\",\n 'type' => 'select2',\n 'name' => 'alat_id', // the db column for the foreign key\n 'entity' => 'alat', // the method that defines the relationship in your Model\n 'attribute' => 'nama', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Alat\", // foreign key model\n\n // optional\n 'options' => (function ($query) {\n return $query->orderBy('nama', 'ASC')->get();\n }), // force the related options to be a custom query, instead of all(); you \n ]);\n\n $this->crud->addField([\n 'name' => 'oleh',\n 'label' => 'Dikalibrasi oleh',\n 'type' => 'text'\n ]);\n\n $this->crud->addField([\n 'name' => 'foto1',\n 'label' => 'Foto 1',\n 'type' => 'browse'\n ]);\n\n $this->crud->addField([\n 'name' => 'foto2',\n 'label' => 'Foto 2',\n 'type' => 'browse'\n ]);\n\n $this->crud->addField([\n 'name' => 'foto3',\n 'label' => 'Foto 3',\n 'type' => 'browse'\n ]);\n\n $this->crud->addColumn([\n 'label' => \"Alat\",\n 'name' => 'alat_id', // the db column for the foreign key\n ]);\n\n $this->crud->addColumn([\n 'name' => 'tanggal',\n 'label' => 'Tanggal',\n ]);\n\n $this->crud->addColumn([\n 'name' => 'oleh',\n 'label' => 'Dikalibrasi oleh',\n ]);\n // add asterisk for fields that are required in CalibrationRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n $this->crud->allowAccess('show');\n $this->crud->enableDetailsRow();\n $this->crud->allowAccess('details_row');\n }", "title": "" }, { "docid": "ee93308b7c0b50b119bea17725067695", "score": "0.56117636", "text": "public function configureDatatable()\n {\n $query = $this->buildDatatableQuery();\n\n // Init 'Datatables' plugin\n $this->datatables = Datatables::of($query);\n\n $this->configureDatatableSearch();\n\n $this->configureCustomViewColumns();\n }", "title": "" }, { "docid": "2d05c6fe8928ffbce91588d0c96a9de9", "score": "0.5611426", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Teacher');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/teacher');\n $this->crud->setEntityNameStrings('teacher', 'teachers');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n $this->crud->setColumns([\n [\n 'label' => __('First Name'),\n 'type' => \"text\",\n 'name' => 'firstname'\n ],\n [\n 'label' => __('Last Name'),\n 'type' => \"text\",\n 'name' => 'lastname'\n ],\n [\n 'name' => 'email',\n 'label' => trans('backpack::permissionmanager.email'),\n 'type' => 'email',\n ],\n\n [\n 'name' => 'max_week_hours',\n 'label' => __('Weekly workable hours'),\n 'type' => 'number',\n ],\n\n [\n 'name' => 'hired_at',\n 'label' => __('Hire Date'),\n 'type' => 'date',\n ],\n\n ]);\n\n\n $this->crud->addFields([\n [\n 'name' => 'max_week_hours',\n 'label' => __('Weekly workable hours'),\n 'type' => 'number',\n ],\n\n [\n 'name' => 'hired_at',\n 'label' => __('Hire Date'),\n 'type' => 'date',\n ],\n\n\n ]);\n\n // add asterisk for fields that are required in TeacherRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "7a55f3abcbf8199e1d7b6cb90e4c9e9d", "score": "0.56042135", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Test');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/test');\n $this->crud->setEntityNameStrings('آزمون', 'آزمون ها');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n $time = Verta::now(); //1396-02-02 15:32:08\n $first_tab = \"اطلاعات کلی آزمون\";\n $second_tab = \"نحوه و زمان برگزاری\";\n $third_tab = \"گزینه های آزمون\";\n $forth_tab = \"فایل های آزمون\";\n\n $this->crud->addFields([\n [\n 'name' => 'title',\n 'label' => '* عنوان',\n 'type' => 'text',\n 'tab' => $first_tab,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'has_negative_score',\n 'label' => 'اعمال نمره منفی؟',\n 'type' => 'radio',\n 'tab' => $first_tab,\n 'options' => [\n 0 => \"خیر\",\n 1 => \"بله\",\n ],\n 'inline' => true,\n 'default' => true,\n ],\n\n // RESULT ACCESS\n [\n 'label' => 'دسترسی به کارنامه',\n 'name' => 'result_access_type',\n 'type' => 'toggle',\n 'tab' => $first_tab,\n 'inline' => true,\n 'options' => [\n Constant::$FREE_DATE_AND_TYPE => 'بلافاصله بعد از آزمون',\n Constant::$SPECIAL_DATE_AND_TIME => 'در تاریخ و زمان معین'\n ],\n 'hide_when' => [\n Constant::$FREE_DATE_AND_TYPE =>\n ['result_access_date_title', 'result_access_date_year','result_access_date_month',\n 'result_access_date_day', 'result_access_date_hour', 'result_access_date_min']\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n ],\n 'default' => Constant::$FREE_DATE_AND_TYPE,\n ],\n [\n 'name' => 'result_access_date_title',\n 'label' => 'تاریخ و زمان دسترسی به کارنامه',\n 'type' => 'title',\n 'tab' => $first_tab,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'result_access_date_min',\n 'label' => 'دقیقه',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->minute,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-1',\n ],\n ],\n [\n 'name' => 'result_access_date_hour',\n 'label' => 'ساعت',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->hour,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-2',\n ],\n ],\n [\n 'name' => 'result_access_date_day',\n 'label' => 'روز',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->day,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'result_access_date_month',\n 'label' => 'ماه',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->month,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'result_access_date_year',\n 'label' => 'سال',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->year,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n\n // QA ACCESS\n [\n 'label' => 'دسترسی به سوالات و پاسخنامه',\n 'name' => 'qa_access_type',\n 'type' => 'toggle',\n 'tab' => $first_tab,\n 'inline' => true,\n 'options' => [\n Constant::$FREE_DATE_AND_TYPE => 'بلافاصله بعد از آزمون',\n Constant::$SPECIAL_DATE_AND_TIME => 'در تاریخ و زمان معین'\n ],\n 'hide_when' => [\n Constant::$FREE_DATE_AND_TYPE => ['qa_access_date_title', 'qa_access_date_year', 'qa_access_date_month', 'qa_access_date_day',\n 'qa_access_date_hour', 'qa_access_date_min']\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n ],\n 'default' => Constant::$FREE_DATE_AND_TYPE,\n ],\n [\n 'name' => 'qa_access_date_title',\n 'label' => 'تاریخ و زمان دسترسی به سولات و پاسخنامه',\n 'type' => 'title',\n 'tab' => $first_tab,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'qa_access_date_min',\n 'label' => 'دقیقه',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->minute,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-1',\n ],\n ],\n [\n 'name' => 'qa_access_date_hour',\n 'label' => 'ساعت',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->hour,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-2',\n ],\n ],\n [\n 'name' => 'qa_access_date_day',\n 'label' => 'روز',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->day,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'qa_access_date_month',\n 'label' => 'ماه',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->month,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'qa_access_date_year',\n 'label' => 'سال',\n 'type' => 'number',\n 'tab' => $first_tab,\n 'default' => $time->year,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'check_for_tests_overlapping',\n 'label' => 'بررسی همزمانی با آزمون های دیگر',\n 'type' => 'checkbox',\n 'default' => true,\n ],\n [\n 'name' => 'check_for_sessions_overlapping',\n 'label' => 'بررسی همزمانی با جلسات کلاس ها',\n 'type' => 'checkbox',\n 'default' => true,\n ],\n ], 'update/create/both');\n\n $this->crud->addFields([\n [\n 'label' => 'نحوه زمان بندی آزمون',\n 'name' => 'exam_holding_type',\n 'type' => 'toggle',\n 'inline' => true,\n 'tab' => $second_tab,\n 'options' => [\n Constant::$FREE_DATE_AND_TYPE => 'شناور',\n Constant::$SPECIAL_DATE_AND_TIME => 'تاریخ و زمان مقرر',\n ],\n 'hide_when' => [\n Constant::$SPECIAL_DATE_AND_TIME => ['exam_duration']\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n ],\n 'default' => Constant::$SPECIAL_DATE_AND_TIME,\n ],\n // TEST START DATE AND TIME\n [\n 'name' => 'exam_date_start_title',\n 'label' => 'تاریخ و زمان شروع آزمون',\n 'type' => 'title',\n 'tab' => $second_tab,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'exam_date_start_min',\n 'label' => 'دقیقه',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->minute,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-1',\n ],\n ],\n [\n 'name' => 'exam_date_start_hour',\n 'label' => 'ساعت',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->hour,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-2',\n ],\n ],\n [\n 'name' => 'exam_date_start_day',\n 'label' => 'روز',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->day,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'exam_date_start_month',\n 'label' => 'ماه',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->month,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'exam_date_start_year',\n 'label' => 'سال',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->year,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n\n // TEST FINISH DATE AND TIME\n [\n 'name' => 'exam_date_finish_title',\n 'label' => 'تاریخ و زمان پایان آزمون',\n 'type' => 'title',\n 'tab' => $second_tab,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'exam_date_finish_min',\n 'label' => 'دقیقه',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->minute,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-1',\n ],\n ],\n [\n 'name' => 'exam_date_finish_hour',\n 'label' => 'ساعت',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->hour,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-2',\n ],\n ],\n [\n 'name' => 'exam_date_finish_day',\n 'label' => 'روز',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->day,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'exam_date_finish_month',\n 'label' => 'ماه',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->month,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'exam_date_finish_year',\n 'label' => 'سال',\n 'type' => 'number',\n 'tab' => $second_tab,\n 'default' => $time->year,\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n 'class' => 'form-group col-md-3',\n ],\n ],\n [\n 'name' => 'exam_duration',\n 'label' => 'مهلت آزمون (دقیقه)',\n 'tab' => $second_tab,\n 'type' => 'number',\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'style' => 'margin-top:10px',\n 'dir' => 'rtl',\n ],\n ],\n ], 'update/create/both');\n\n $this->crud->addFields([\n [\n 'name' => 'options',\n 'label' => 'گزینه های آزمون',\n 'type' => 'child',\n 'entity_singular' => 'اضافه کردن گزینه',\n 'tab' => $third_tab,\n 'columns' => [\n [\n 'label' => 'شماره سوال',\n 'type' => 'child_text',\n 'name' => 'q_number',\n ],\n [\n 'label' => 'گزینه صحیح',\n 'type' => 'child_select',\n 'name' => 'co_number',\n 'data' => [1,2,3,4],\n ],\n ],\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n ],\n ],\n [\n 'name' => 'factors',\n 'label' => 'درس های آزمون (این فیلد اختیاری است ولی درصورت مشخص کردن درس باید تمام گزینه های آزمون را پوشش دهد)',\n 'type' => 'child',\n 'entity_singular' => 'اضافه',\n 'tab' => $third_tab,\n 'columns' => [\n [\n 'label' => 'از شماره سوال',\n 'type' => 'child_text',\n 'name' => 'q_number_from',\n ],\n [\n 'label' => 'تا شماره سوال',\n 'type' => 'child_text',\n 'name' => 'q_number_to',\n ],\n [\n 'label' => 'عنوان درس',\n 'type' => 'child_text',\n 'name' => 'lesson_title',\n ],\n [\n 'label' => 'ضریب',\n 'type' => 'child_text',\n 'name' => 'value',\n ],\n ],\n 'attributes' => [\n 'dir' => 'rtl',\n ],\n 'wrapperAttributes' => [\n 'dir' => 'rtl',\n ],\n ],\n\n ], 'update/create/both');\n\n $this->crud->addFields([\n [ // Upload\n 'name' => 'questions_file',\n 'label' => '<label style=\"color:#e55619\">( فایل انتخابی باید به فرمت\n <label style=\"font-family:Arial, Helvetica, sans-serif;\">pdf</label> و حداکثر حجم 5 مگابایت باشد )</label> فایل سوالات',\n 'type' => 'upload',\n 'upload' => true,\n 'disk' => 'public',\n 'tab' => $forth_tab\n ],\n [ // Upload\n 'name' => 'answers_file',\n 'label' => '<label style=\"color:#e55619\">( فایل انتخابی باید به فرمت\n <label style=\"font-family:Arial, Helvetica, sans-serif;\">pdf</label> و حداکثر حجم 5 مگابایت باشد )</label> فایل پاسخنامه', 'type' => 'upload',\n 'upload' => true,\n 'disk' => 'public',\n 'tab' => $forth_tab\n ],\n ], 'update/create/both');\n\n $this->crud->addColumns([\n [\n 'name' => 'title',\n 'label' => 'عنوان'\n ],\n [\n 'name' => \"result_access_date\",\n 'label' => \"تاریخ دسترسی به کارنامه\"\n ],\n [\n 'name' => \"qa_access_date\",\n 'label' => \"تاریخ دسترسی به سوالات و پاسخنامه\"\n ],\n [\n 'name' => 'has_negative_score',\n 'label' => 'نمره منفی',\n 'type' => 'radio',\n 'options' => [ // the key will be stored in the db, the value will be shown as label;\n 1 => 'دارد',\n 0 => 'دارد',\n ],\n // optional\n 'inline' => true, // show the radios all on the same line?\n ],\n ]);\n\n $this->crud->addButtonFromView('line', 'export_test_records', 'export_test_records', 'beginning');\n\n }", "title": "" }, { "docid": "cf5edcd729e1e3efc2ef409454e68f6d", "score": "0.55748403", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Contact');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/contact');\n $this->crud->setEntityNameStrings('contact', 'contacts');\n\n \n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n $this->crud->setColumns([\n [\n // NAME\n 'label' => \"Name\", // Table column heading\n 'type' => \"text\",\n 'name' => 'name'\n ],\n\n [\n // STUDENT\n 'label' => \"Student\", // Table column heading\n 'type' => \"select\",\n 'name' => 'user_id', // the column that contains the ID of that connected entity;\n 'entity' => 'user', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\User\", // foreign key model\n ],\n\n [\n // RELATIONSHIP\n 'label' => \"Relationship\", // Table column heading\n 'type' => \"select\",\n 'name' => 'relationship_id', // the column that contains the ID of that connected entity;\n 'entity' => 'relationship', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\ContactRelationship\", // foreign key model\n ],\n ]);\n\n\n $this->crud->addFields([\n [ // Select2\n 'label' => \"Student\",\n 'type' => 'select2',\n 'name' => 'user_id', // the db column for the foreign key\n 'entity' => 'user', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\User\" // foreign key model\n ],\n\n [ // Select2\n 'label' => trans('firstname'),\n 'type' => 'text',\n 'name' => 'firstname'\n ],\n [ // Select2\n 'label' => trans('lastname'),\n 'type' => 'text',\n 'name' => 'lastname'\n ],\n [\n 'name' => 'email',\n 'label' => trans('backpack::permissionmanager.email'),\n 'type' => 'email',\n ],\n [\n 'name' => 'idnumber',\n 'label' => 'ID Number',\n 'type' => 'text',\n ],\n [\n 'name' => 'address',\n 'label' => 'Address',\n 'type' => 'text',\n ],\n\n [\n // RELATIONSHIP\n 'label' => \"Relationship\", // Table column heading\n 'type' => \"select\",\n 'name' => 'relationship_id', // the column that contains the ID of that connected entity;\n 'entity' => 'relationship', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\ContactRelationship\", // foreign key model\n ],\n ]);\n\n\n // add asterisk for fields that are required in ContactRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "37663974d3b274f9aaf65d9fd031a5ac", "score": "0.5566043", "text": "public function __construct()\n {\n $this->db = new CRUD;\n $this->setTotalRecord();\n }", "title": "" }, { "docid": "efef2e95ff74347a32cd93bd4384d62b", "score": "0.5551512", "text": "public function initializeAdminPanel() {}", "title": "" }, { "docid": "0d0c673569c74e983e3e11d41eaeeb27", "score": "0.55495256", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Post');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/post');\n $this->crud->setEntityNameStrings('post', 'posts');\n $this->crud->addColumn([\n 'name' => \"name\",\n 'label' => \"Tiêu đề bài viết\", // Table column heading\n 'type' => \"model_function\",\n 'function_name' => 'getSlugWithLink', // the method in your Model\n 'limit' => 120,\n ]);\n $this->crud->addColumn([\n 'name' => 'content',\n 'label' => 'Nội dung bài viết',\n 'type' => 'text',\n ]);\n $this->crud->addColumn([\n 'label' => \"Tên môn học\", // Table column heading\n 'type' => \"select\",\n 'name' => 'subject_id', // the column that contains the ID of that connected entity;\n 'entity' => 'subject', // the method that defines the relationship in your Model\n 'attribute' => \"name_subject\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Subject\",\n ]);\n\n $this->crud->addField([\n 'name' => 'name',\n 'label' => 'Tiêu đề',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([\n 'name' => 'content',\n 'label' => 'Nội dung bài viết',\n 'type' => 'ckeditor',\n ]);\n $this->crud->addField([\n 'label' => \"Tên môn học\", // Table column heading\n 'type' => \"select\",\n 'name' => 'subject_id', // the column that contains the ID of that connected entity;\n 'entity' => 'subject', // the method that defines the relationship in your Model\n 'attribute' => \"name_subject\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Subject\",\n ]);\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n// $this->crud->setFromDb();\n\n // add asterisk for fields that are required in PostRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "21ef61f1113c5735b03ac9811cfbdc71", "score": "0.5548367", "text": "protected function setupListOperation()\n {\n// $this->crud->setFromDb();\n $this->crud->setColumns([\n ['name'=>'owner_id', 'type'=>'select', 'entity'=>'owner','attribute'=>'phone', 'label' => 'Owner'],\n// ['name'=>'title', 'type'=>'text','label'=>'Title'],\n ['name'=>'description', 'type'=>'text','label'=>'Description'],\n ['name'=>'estimated_cost', 'type'=>'text', 'label' => 'Estimated cost'],\n ['name'=>'estimated_time', 'type'=>'text', 'label' => 'Estimated time'],\n ['name'=>'estimated_time_unit', 'type'=>'text', 'label' => 'Estimated time unit'],\n ['name'=>'pickup_location_id', 'type'=>'select','label'=>'Pickup location','entity'=>'pickup_location','attribute'=>'title_tk'],\n ['name'=>'pickup_address', 'type'=>'text','label'=>'Pickup address'],\n ['name'=>'destination_location_id', 'type'=>'select','label'=>'Destination location','entity'=>'destination_location','attribute'=>'title_tk'],\n ['name'=>'destination_address', 'type'=>'text','label'=>'Destination address'],\n ['name'=>'bidding_ends_at','type'=>'datetime','label'=>'Bidding ends at'],\n ['name'=>'approved', 'type'=>'check','label'=>'Approved'],\n ]);\n }", "title": "" }, { "docid": "a3be6ff57d8bd78c8c577d26ad02bbb5", "score": "0.5537423", "text": "public function setup()\n {\n $this->setupBasicCrudInformation();\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n\n // $this->crud->setFromDb();\n\n // ------ CRUD FIELDS\n // $this->crud->addField($options, 'update/create/both');\n // $this->crud->addFields($array_of_arrays, 'update/create/both');\n // $this->crud->removeField('name', 'update/create/both');\n // $this->crud->removeFields($array_of_names, 'update/create/both');\n \n $this->crud->addField([ // Select2\n 'label' => 'Metric',\n 'type' => 'select2',\n 'name' => 'metric_id', // the db column for the foreign key\n 'entity' => 'metric', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n // 'wrapperAttributes' => [\n // 'class' => 'form-group col-md-6'\n // ], // extra HTML attributes for the field wrapper - mostly for resizing fields\n // 'tab' => 'Basic Info',\n ]);\n\n $this->crud->addField([ // Select2\n 'label' => 'Category',\n 'type' => 'select2',\n 'name' => 'category_id', // the db column for the foreign key\n 'entity' => 'category', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n // 'wrapperAttributes' => [\n // 'class' => 'form-group col-md-6'\n // ], // extra HTML attributes for the field wrapper - mostly for resizing fields\n // 'tab' => 'Basic Info',\n ]);\n\n $this->crud->addField([ // Text\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n // 'tab' => 'Texts',\n\n // optional\n //'prefix' => '',\n //'suffix' => '',\n //'default' => 'some value', // default value\n //'hint' => 'Some hint text', // helpful text, show up after input\n //'attributes' => [\n //'placeholder' => 'Some text when empty',\n //'class' => 'form-control some-class'\n //], // extra HTML attributes and values your input might need\n //'wrapperAttributes' => [\n //'class' => 'form-group col-md-12'\n //], // extra HTML attributes for the field wrapper - mostly for resizing fields\n //'readonly'=>'readonly',\n ]);\n\n // Custom SKU field\n $this->crud->addField([\n 'name' => 'sku_code',\n 'label' => 'SKU',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([ // Textarea\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'ckeditor',\n // 'tab' => 'Texts',\n ]);\n\n // ------ CRUD COLUMNS\n // $this->crud->addColumn(); // add a single column, at the end of the stack\n // $this->crud->addColumns(); // add multiple columns, at the end of the stack\n // $this->crud->removeColumn('column_name'); // remove a column from the stack\n // $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack\n // $this->crud->setColumnDetails('column_name', ['attribute' => 'value']); // adjusts the properties of the passed in column (by name)\n // $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']);\n \n $this->crud->addColumn([\n // 1-n relationship\n 'label' => 'SKU', // Table column heading\n 'type' => 'select',\n 'name' => 'inventory_id', // the column that contains the ID of that connected entity;\n 'entity' => 'sku', // the method that defines the relationship in your Model\n 'attribute' => 'code', // foreign key attribute that is shown to user\n ]);\n\n // $this->crud->addColumn(); // add a single column, at the end of the stack\n $this->crud->addColumns(['name', 'description']); // add multiple columns, at the end of the stack\n\n $this->crud->addColumn([\n // 1-n relationship\n 'label' => 'Category', // Table column heading\n 'type' => 'select',\n 'name' => 'category_id', // the column that contains the ID of that connected entity;\n 'entity' => 'category', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n ]);\n\n $this->crud->addColumn([\n // 1-n relationship\n 'label' => 'Metric', // Table column heading\n 'type' => 'select',\n 'name' => 'metric_id', // the column that contains the ID of that connected entity;\n 'entity' => 'metric', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n ]);\n\n // ------ CRUD BUTTONS\n // possible positions: 'beginning' and 'end'; defaults to 'beginning' for the 'line' stack, 'end' for the others;\n // $this->crud->addButton($stack, $name, $type, $content, $position); // add a button; possible types are: view, model_function\n // $this->crud->addButtonFromModelFunction($stack, $name, $model_function_name, $position); // add a button whose HTML is returned by a method in the CRUD model\n // $this->crud->addButtonFromView($stack, $name, $view, $position); // add a button whose HTML is in a view placed at resources\\views\\vendor\\backpack\\crud\\buttons\n // $this->crud->removeButton($name);\n // $this->crud->removeButtonFromStack($name, $stack);\n // $this->crud->removeAllButtons();\n // $this->crud->removeAllButtonsFromStack('line');\n \n $this->crud->addButtonFromView('line', 'inventory_stock_decrease', 'inventory_stock_decrease', 'beginning');\n $this->crud->addButtonFromView('line', 'inventory_stock_increase', 'inventory_stock_increase', 'beginning');\n\n /*\n |--------------------------------------------------------------------------\n | PERMISSIONS\n |-------------------------------------------------------------------------\n */\n $this->setPermissions();\n\n // ------ CRUD REORDER\n // $this->crud->enableReorder('label_name', MAX_TREE_LEVEL);\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('reorder');\n\n // ------ CRUD DETAILS ROW\n // $this->crud->enableDetailsRow();\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('details_row');\n // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php\n\n // ------ REVISIONS\n // You also need to use \\Venturecraft\\Revisionable\\RevisionableTrait;\n // Please check out: https://laravel-backpack.readme.io/docs/crud#revisions\n // $this->crud->allowAccess('revisions');\n\n // ------ AJAX TABLE VIEW\n // Please note the drawbacks of this though:\n // - 1-n and n-n columns are not searchable\n // - date and datetime columns won't be sortable anymore\n // $this->crud->enableAjaxTable();\n\n // ------ DATATABLE EXPORT BUTTONS\n // Show export to PDF, CSV, XLS and Print buttons on the table view.\n // Does not work well with AJAX datatables.\n // $this->crud->enableExportButtons();\n\n // ------ ADVANCED QUERIES\n // $this->crud->addClause('active');\n // $this->crud->addClause('type', 'car');\n // $this->crud->addClause('where', 'name', '==', 'car');\n // $this->crud->addClause('whereName', 'car');\n // $this->crud->addClause('whereHas', 'posts', function($query) {\n // $query->activePosts();\n // });\n // $this->crud->addClause('withoutGlobalScopes');\n // $this->crud->addClause('withoutGlobalScope', VisibleScope::class);\n // $this->crud->with(); // eager load relationships\n // $this->crud->orderBy();\n // $this->crud->groupBy();\n // $this->crud->limit();\n }", "title": "" }, { "docid": "15046a3fd8cfe47f4019089547cf89ab", "score": "0.55324256", "text": "public function setup()\n {\n $this->crud->setModel('SmartyStudio\\EcommerceCrud\\app\\Models\\Category');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/categories');\n $this->crud->setEntityNameStrings('category', 'categories');\n\n /*\n |--------------------------------------------------------------------------\n | BUTTONS\n |--------------------------------------------------------------------------\n */\n $this->crud->enableReorder('name', 0);\n\n\t\t/*\n |--------------------------------------------------------------------------\n | COLUMNS\n |--------------------------------------------------------------------------\n */\n\t\t$this->crud->addColumns(\n\t\t\t$this->getColumns()\n\t\t);\n\n\t\t/*\n |--------------------------------------------------------------------------\n | FIELDS\n |--------------------------------------------------------------------------\n */\n\t\t$this->crud->addFields(\n\t\t\t$this->getFields()\n\t\t);\n\n /*\n |--------------------------------------------------------------------------\n | PERMISSIONS\n |-------------------------------------------------------------------------\n */\n $this->setPermissions();\n\n /*\n |--------------------------------------------------------------------------\n | AJAX TABLE VIEW\n |--------------------------------------------------------------------------\n */\n $this->crud->enableAjaxTable();\n\n\t}", "title": "" }, { "docid": "a6d6d1c6d86403bde60d0a05ca665d8c", "score": "0.55308366", "text": "public function panelInit(){\n\t\t$this->setNameModelController('rol_options');\n\t\t$this->setTitle(\"Permisos\");\n\t\t// $this->autoHeight = true;\n\t//\t$this->html = 'hola esto es una prueba';\n\t//\t$this->layout = 'fit';\n\t//\t$this->setReportDownload(true, true, true);\n\t\t\n\t\t$this->setNameTopic('Permiso');\n\t//\t$this->autoHeight = false;\n\t//\t$this->height = 333;\n\t//\t$this->bodyStyle = \"background-color: transparent;\";\n\t\t$this->setOffsetHeight(-3);\n\t\t\n\t\t\n\t\t$this->forceEnableViewLogPers(false);\n\t}", "title": "" }, { "docid": "acb0771d1625fe74f5558d19cb7f9a27", "score": "0.5506559", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Page');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/page');\n $this->crud->setEntityNameStrings('pages', 'page');\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n\t\t\n $this->crud->setFromDb();\n\n $this->crud->setColumns([\n\t\t\t[ 'name' => 'title', 'label' => \"Title\" ], \n [ 'name' => 'slug', 'label' => \"Slug\" ]\n\t\t]);\n\t\t\n\t\t$this->crud->addField([\n 'name' => 'title',\n 'label' => \"Title\"\n ]);\n\t\t$this->crud->addField([\n 'name' => 'slug',\n 'label' => \"Slug\"\n ]);\n $this->crud->addField([\n 'name' => 'content',\n 'label' => \"Contenu\",\n 'type' => \"wysiwyg\"\n ]);\n \n\t\t\n }", "title": "" }, { "docid": "df03273d5bb8b643aad279dec644fabb", "score": "0.550045", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(ViewRequest::class);\n\n $this->crud->addFields([\n [\n 'name' => 'name',\n 'type' => 'text',\n ],\n [\n 'label' => 'Project',\n 'type' => 'select',\n 'name' => 'project_id', //name to be referred by dependant\n 'entity' => 'project', //method name in the model\n 'attribute' => 'name', //attribute to be displayed, ex name, id\n 'allows_null' => false,\n 'default' => $this->getProjectDefault(),\n 'fake' => true,\n 'wrapper' => ['class' => 'form-group col-md-6']\n ],\n [\n 'label' => 'Workbook', // Table column heading\n 'type' => 'select2_from_ajax',\n 'name' => 'workbook_id', // the column that contains the ID of that connected entity;\n 'entity' => 'workbook', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'data_source' => url('api/workbook'), // url to controller search function (with /{id} should return model)\n 'placeholder' => 'Select a workbook', // placeholder for the select\n 'include_all_form_fields' => true, //sends the other form fields along with the request so it can be filtered.\n 'minimum_input_length' => 0, // minimum characters to type before querying results\n 'dependencies' => ['project_id'], // when a dependency changes, this select2 is reset to null\n 'wrapper' => ['class' => 'form-group col-md-6']\n ],\n [\n 'name' => 'is_pdf',\n 'label' => \"Is PDF\",\n 'type' => 'select_from_array',\n 'options' => ['no' => 'No', 'yes' => 'Yes'],\n 'default' => $this->isPdf() ? 'yes' : 'no',\n 'fake' => 'true',\n 'allows_null' => false,\n 'wrapper' => ['class' => 'form-group col-md-6']\n ],\n [\n 'name' => 'tableau_url',\n 'type' => 'text',\n \"visibility\" => [\n 'field_name' => 'is_pdf',\n 'value' => 'no',\n 'add_disabled' => true,\n ],\n 'wrapper' => ['class' => 'form-group col-md-6']\n ],\n [\n 'name' => 'pdf_url',\n 'label' => 'PDF',\n 'type' => 'upload',\n 'upload' => true,\n 'disk' => 'uploads',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n \"visibility\" => [\n 'field_name' => 'is_pdf',\n 'value' => 'yes',\n 'add_disabled' => true,\n ]\n ],\n [\n 'name' => 'order_number',\n 'type' => 'number',\n ],\n ]);\n }", "title": "" }, { "docid": "c5a069d4501610eb5973f28fad38bf62", "score": "0.5494204", "text": "public function cbInit() {\n\t\t\t$this->title_field = \"title\";\n\t\t\t$this->limit = \"20\";\n\t\t\t$this->orderby = \"id,desc\";\n\t\t\t$this->global_privilege = false;\n\t\t\t$this->button_table_action = true;\n\t\t\t$this->button_bulk_action = true;\n\t\t\t$this->button_action_style = \"button_icon\";\n\t\t\t$this->button_add = true;\n\t\t\t$this->button_edit = true;\n\t\t\t$this->button_delete = true;\n\t\t\t$this->button_detail = true;\n\t\t\t$this->button_show = true;\n\t\t\t$this->button_filter = true;\n\t\t\t$this->button_import = false;\n\t\t\t$this->button_export = false;\n\t\t\t$this->table = \"news\";\n\t\t\t# END CONFIGURATION DO NOT REMOVE THIS LINE\n\n\t\t\t# START COLUMNS DO NOT REMOVE THIS LINE\n\t\t\t$this->col = [];\n\t\t\t$this->col[] = [\"label\"=>\"Brand Id\",\"name\"=>\"brand_id\",\"join\"=>\"brands,title\"];\n\t\t\t$this->col[] = [\"label\"=>\"User Id\",\"name\"=>\"user_id\",\"join\"=>\"cms_users,name\"];\n\t\t\t$this->col[] = [\"label\"=>\"Title\",\"name\"=>\"title\"];\n\t\t\t$this->col[] = [\"label\"=>\"Slug\",\"name\"=>\"slug\"];\n\t\t\t$this->col[] = [\"label\"=>\"Thumbnail\",\"name\"=>\"thumbnail\",\"image\"=>true];\n\t\t\t# END COLUMNS DO NOT REMOVE THIS LINE\n\n\t\t\t# START FORM DO NOT REMOVE THIS LINE\n\t\t\t$this->form = [];\n\t\t\t$this->form[] = ['label'=>'Brand','name'=>'brand_id','type'=>'select2','validation'=>'required|min:1|max:255','width'=>'col-sm-10','datatable'=>'brands,title'];\n\t\t\t$this->form[] = ['label'=>'Title','name'=>'title','type'=>'text','validation'=>'required|string|min:3|max:70','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Slug','name'=>'slug','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10','placeholder'=>'You can only enter the letter only'];\n\t\t\t$this->form[] = ['label'=>'Thumbnail','name'=>'thumbnail','type'=>'upload','validation'=>'required|image|max:3000','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Meta Title','name'=>'meta_title','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10','help'=>'File types support : JPG, JPEG, PNG, GIF, BMP'];\n\t\t\t$this->form[] = ['label'=>'Meta Description','name'=>'meta_description','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Meta Keywords','name'=>'meta_keywords','type'=>'textarea','validation'=>'required|string|min:5|max:5000','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Body','name'=>'body','type'=>'textarea','validation'=>'required|string|min:5|max:5000','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'View Count','name'=>'view_count','type'=>'number','validation'=>'required|integer|min:0','width'=>'col-sm-10'];\n\t\t\t# END FORM DO NOT REMOVE THIS LINE\n\n\t\t\t# OLD START FORM\n\t\t\t//$this->form = [];\n\t\t\t//$this->form[] = [\"label\"=>\"Brand Id\",\"name\"=>\"brand_id\",\"type\"=>\"select2\",\"required\"=>TRUE,\"validation\"=>\"required|min:1|max:255\",\"datatable\"=>\"brand,id\"];\n\t\t\t//$this->form[] = [\"label\"=>\"User Id\",\"name\"=>\"user_id\",\"type\"=>\"select2\",\"required\"=>TRUE,\"validation\"=>\"required|integer|min:0\",\"datatable\"=>\"user,id\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Title\",\"name\"=>\"title\",\"type\"=>\"text\",\"required\"=>TRUE,\"validation\"=>\"required|string|min:3|max:70\",\"placeholder\"=>\"You can only enter the letter only\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Slug\",\"name\"=>\"slug\",\"type\"=>\"text\",\"required\"=>TRUE,\"validation\"=>\"required|min:1|max:255\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Thumbnail\",\"name\"=>\"thumbnail\",\"type\"=>\"upload\",\"required\"=>TRUE,\"validation\"=>\"required|image|max:3000\",\"help\"=>\"File types support : JPG, JPEG, PNG, GIF, BMP\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Meta Title\",\"name\"=>\"meta_title\",\"type\"=>\"text\",\"required\"=>TRUE,\"validation\"=>\"required|min:1|max:255\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Meta Description\",\"name\"=>\"meta_description\",\"type\"=>\"text\",\"required\"=>TRUE,\"validation\"=>\"required|min:1|max:255\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Meta Keywords\",\"name\"=>\"meta_keywords\",\"type\"=>\"textarea\",\"required\"=>TRUE,\"validation\"=>\"required|string|min:5|max:5000\"];\n\t\t\t//$this->form[] = [\"label\"=>\"Body\",\"name\"=>\"body\",\"type\"=>\"textarea\",\"required\"=>TRUE,\"validation\"=>\"required|string|min:5|max:5000\"];\n\t\t\t//$this->form[] = [\"label\"=>\"View Count\",\"name\"=>\"view_count\",\"type\"=>\"number\",\"required\"=>TRUE,\"validation\"=>\"required|integer|min:0\"];\n\t\t\t# OLD END FORM\n\n\t\t\t/* \n\t | ---------------------------------------------------------------------- \n\t | Sub Module\n\t | ---------------------------------------------------------------------- \n\t\t\t| @label = Label of action \n\t\t\t| @path = Path of sub module\n\t\t\t| @foreign_key \t = foreign key of sub table/module\n\t\t\t| @button_color = Bootstrap Class (primary,success,warning,danger)\n\t\t\t| @button_icon = Font Awesome Class \n\t\t\t| @parent_columns = Sparate with comma, e.g : name,created_at\n\t | \n\t */\n\t $this->sub_module = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Action Button / Menu\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @url = Target URL, you can use field alias. e.g : [id], [name], [title], etc\n\t | @icon = Font awesome class icon. e.g : fa fa-bars\n\t | @color \t = Default is primary. (primary, warning, succecss, info) \n\t | @showIf \t = If condition when action show. Use field alias. e.g : [id] == 1\n\t | \n\t */\n\t $this->addaction = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Button Selected\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @icon \t = Icon from fontawesome\n\t | @name \t = Name of button \n\t | Then about the action, you should code at actionButtonSelected method \n\t | \n\t */\n\t $this->button_selected = array();\n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add alert message to this module at overheader\n\t | ---------------------------------------------------------------------- \n\t | @message = Text of message \n\t | @type = warning,success,danger,info \n\t | \n\t */\n\t $this->alert = array();\n\t \n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add more button to header button \n\t | ---------------------------------------------------------------------- \n\t | @label = Name of button \n\t | @url = URL Target\n\t | @icon = Icon from Awesome.\n\t | \n\t */\n\t $this->index_button = array();\n\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Customize Table Row Color\n\t | ---------------------------------------------------------------------- \n\t | @condition = If condition. You may use field alias. E.g : [id] == 1\n\t | @color = Default is none. You can use bootstrap success,info,warning,danger,primary. \n\t | \n\t */\n\t $this->table_row_color = array(); \t \n\n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | You may use this bellow array to add statistic at dashboard \n\t | ---------------------------------------------------------------------- \n\t | @label, @count, @icon, @color \n\t |\n\t */\n\t $this->index_statistic = array();\n\n\n\n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add javascript at body \n\t | ---------------------------------------------------------------------- \n\t | javascript code in the variable \n\t | $this->script_js = \"function() { ... }\";\n\t |\n\t */\n\t $this->script_js = NULL;\n\n\n /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code before index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it before index table\n\t | $this->pre_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->pre_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code after index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it after index table\n\t | $this->post_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->post_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include Javascript File \n\t | ---------------------------------------------------------------------- \n\t | URL of your javascript each array \n\t | $this->load_js[] = asset(\"myfile.js\");\n\t |\n\t */\n\t $this->load_js = array();\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add css style at body \n\t | ---------------------------------------------------------------------- \n\t | css code in the variable \n\t | $this->style_css = \".style{....}\";\n\t |\n\t */\n\t $this->style_css = NULL;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include css File \n\t | ---------------------------------------------------------------------- \n\t | URL of your css each array \n\t | $this->load_css[] = asset(\"myfile.css\");\n\t |\n\t */\n\t $this->load_css = array();\n\t \n\t \n\t }", "title": "" }, { "docid": "e5fb67cd5d76001421243ef69c8461cf", "score": "0.5489655", "text": "protected function setupListOperation()\n {\n // $this->crud->setFromDb();\n $this->crud->addColumn([\n 'name' => 'AccountCode',\n 'label' => 'Account ID',\n 'type' => 'text'\n \n ]);\n \n $this->crud->addColumn([\n 'name' => 'acc_name',\n 'label' => 'Account Name',\n 'type' => 'text' \n ]);\n $this->crud->addColumn([\n 'name' => 'account_number',\n 'label' => 'Account Number',\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'acc_email',\n 'label' => 'Email',\n 'type' => 'text', \n ]);\n $this->crud->addColumn([\n 'name' => 'acc_phone',\n 'label' => 'Phone',\n 'type' => 'text', \n ]);\n $this->crud->addColumn([\n 'name' => 'industry',\n 'label' => 'Industry',\n 'type' => 'text' \n ]);\n $this->crud->addColumn([\n 'name' => 'bank_branch',\n 'label' => 'Bank Branch',\n 'type' => 'text' \n ]);\n $this->crud->addColumn([\n 'name' => 'billing_address',\n 'label' => 'Billing Address',\n 'type' => 'text' \n ]);\n $this->crud->addColumn([\n 'name' => 'valid_until',\n 'label' => 'Valid Until',\n 'type' => 'text'\n ]);\n $this->crud->addColumn([\n 'name' => 'website',\n 'label' => 'Website',\n 'type' => 'text' \n ]);\n $this->crud->addColumn([\n 'name' => 'rating',\n 'label' => 'Rating',\n 'type' => 'text' \n ]);\n }", "title": "" }, { "docid": "7428b58ce5c856e1a9380312217efd0d", "score": "0.5486521", "text": "public function cbInit() {\n\t\t\t$this->table \t\t\t = \"users\";\t \n\t\t\t$this->title_field = \"nama\";\n\t\t\t$this->limit = 20;\n\t\t\t$this->orderby = \"id,desc\";\n\t\t\t$this->show_numbering = FALSE;\n\t\t\t$this->global_privilege = FALSE;\t \n\t\t\t$this->button_table_action = TRUE; \n\t\t\t$this->button_action_style = \"button_icon\"; \n\t\t\t$this->button_add = TRUE;\n\t\t\t$this->button_delete = TRUE;\n\t\t\t$this->button_edit = TRUE;\n\t\t\t$this->button_detail = TRUE;\n\t\t\t$this->button_show = false;\n\t\t\t$this->button_filter = TRUE; \n\t\t\t$this->button_export = FALSE;\t \n\t\t\t$this->button_import = FALSE;\n\t\t\t$this->button_bulk_action = TRUE;\t\n\t\t\t$this->sidebar_mode\t\t = \"normal\"; //normal,mini,collapse,collapse-mini\n\t\t\t# END CONFIGURATION DO NOT REMOVE THIS LINE\n\n\t\t\t# START COLUMNS DO NOT REMOVE THIS LINE\n\t\t\t$this->col = [];\n\t\t\t$this->col[] = [\"label\"=>\"Photo\",\"name\"=>\"photo\",\"image\"=>true];\n\t\t\t$this->col[] = [\"label\"=>\"Nama\",\"name\"=>\"nama\"];\n\t\t\t$this->col[] = [\"label\"=>\"Email\",\"name\"=>\"email\"];\n\t\t\t$this->col[] = [\"label\"=>\"Telp\",\"name\"=>\"telp\"];\n\t\t\t$this->col[] = [\"label\"=>\"Area\",\"name\"=>\"id_area\",\"join\"=>\"area,nama\"];\n\t\t\t# END COLUMNS DO NOT REMOVE THIS LINE\n\n\t\t\t# START FORM DO NOT REMOVE THIS LINE\n\t\t\t$this->form = [];\n\t\t\t$this->form[] = ['label'=>'Nama','name'=>'nama','type'=>'text','validation'=>'required|string|min:3|max:70','width'=>'col-sm-10','placeholder'=>'You can only enter the letter only'];\n\t\t\t$this->form[] = ['label'=>'Telp','name'=>'telp','type'=>'number','validation'=>'required|string|min:3','width'=>'col-sm-10','placeholder'=>'You can only enter the letter only'];\n\t\t\t$this->form[] = ['label'=>'Area','name'=>'id_area','type'=>'select2','validation'=>'required|integer|min:0','width'=>'col-sm-10','datatable'=>'area,nama'];\n\t\t\t$this->form[] = ['label'=>'Email','name'=>'email','type'=>'email','validation'=>'required|min:1|max:255|email|unique:users','width'=>'col-sm-10','placeholder'=>'Please enter a valid email address'];\n\t\t\t$this->form[] = ['label'=>'Password','name'=>'password','type'=>'password','validation'=>'min:3|max:32','width'=>'col-sm-10','help'=>'Minimum 5 characters. Please leave empty if you did not change the password.'];\n\t\t\t$this->form[] = ['label'=>'Photo','name'=>'photo','type'=>'upload','validation'=>'required|image|max:3000','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Role','name'=>'role','type'=>'hidden','validation'=>'required|min:1|max:255','width'=>'col-sm-10','value'=>'Sales'];\n\t\t\t# END FORM DO NOT REMOVE THIS LINE \n\n\t\t\t/* \n\t | ---------------------------------------------------------------------- \n\t | Sub Module\n\t | ---------------------------------------------------------------------- \n\t\t\t| @label = Label of action \n\t\t\t| @path = Path of sub module\n\t\t\t| @foreign_key \t = foreign key of sub table/module\n\t\t\t| @button_color = Bootstrap Class (primary,success,warning,danger)\n\t\t\t| @button_icon = Font Awesome Class \n\t\t\t| @parent_columns = Sparate with comma, e.g : name,created_at\n\t | \n\t */\n\t $this->sub_module = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Action Button / Menu\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @url = Target URL, you can use field alias. e.g : [id], [name], [title], etc\n\t | @icon = Font awesome class icon. e.g : fa fa-bars\n\t | @color \t = Default is primary. (primary, warning, succecss, info) \n\t | @showIf \t = If condition when action show. Use field alias. e.g : [id] == 1\n\t | \n\t */\n\t $this->addaction = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Button Selected\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @icon \t = Icon from fontawesome\n\t | @name \t = Name of button \n\t | Then about the action, you should code at actionButtonSelected method \n\t | \n\t */\n\t $this->button_selected = array();\n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add alert message to this module at overheader\n\t | ---------------------------------------------------------------------- \n\t | @message = Text of message \n\t | @type = warning,success,danger,info \n\t | \n\t */\n\t $this->alert = array();\n\t \n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add more button to header button \n\t | ---------------------------------------------------------------------- \n\t | @label = Name of button \n\t | @url = URL Target\n\t | @icon = Icon from Awesome.\n\t | \n\t */\n\t $this->index_button = array();\n\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Customize Table Row Color\n\t | ---------------------------------------------------------------------- \n\t | @condition = If condition. You may use field alias. E.g : [id] == 1\n\t | @color = Default is none. You can use bootstrap success,info,warning,danger,primary. \n\t | \n\t */\n\t $this->table_row_color = array(); \t \n\n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | You may use this bellow array to add statistic at dashboard \n\t | ---------------------------------------------------------------------- \n\t | @label, @count, @icon, @color \n\t |\n\t */\n\t $this->index_statistic = array();\n\n\n\n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add javascript at body \n\t | ---------------------------------------------------------------------- \n\t | javascript code in the variable \n\t | $this->script_js = \"function() { ... }\";\n\t |\n\t */\n\t $this->script_js = NULL;\n\n\n /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code before index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it before index table\n\t | $this->pre_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->pre_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code after index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it after index table\n\t | $this->post_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->post_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include Javascript File \n\t | ---------------------------------------------------------------------- \n\t | URL of your javascript each array \n\t | $this->load_js[] = asset(\"myfile.js\");\n\t |\n\t */\n\t $this->load_js = array();\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add css style at body \n\t | ---------------------------------------------------------------------- \n\t | css code in the variable \n\t | $this->style_css = \".style{....}\";\n\t |\n\t */\n\t $this->style_css = NULL;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include css File \n\t | ---------------------------------------------------------------------- \n\t | URL of your css each array \n\t | $this->load_css[] = asset(\"myfile.css\");\n\t |\n\t */\n\t $this->load_css = array();\n\t \n\t \n\t }", "title": "" }, { "docid": "86dd0ecd20343d3f6776f663050a55dd", "score": "0.54712", "text": "protected function setupListOperation()\n {\n $this->crud->addClause('where', 'module', '=', 'sales_order');\n $this->crud->addColumn([\n 'name' => 'dn_number',\n 'type' => 'text',\n 'label' => 'Nomor Surat Jalan'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'reference',\n 'type' => 'select',\n 'entity' => 'salesOrder',\n 'attribute' => 'so_number',\n 'model' => 'App\\Models\\SalesOrder',\n 'label' => 'Nomor SO'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'dn_date',\n 'type' => 'date',\n 'label' => 'Tanggal Delivery Note'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'expedition',\n 'type' => 'text',\n 'label' => 'Ekspedisi'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'etd',\n 'type' => 'date',\n 'label' => 'Estimasi Keberangkatan'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'eta',\n 'type' => 'date',\n 'label' => 'Estimasi Sampai'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'description',\n 'type' => 'text',\n 'label' => 'Catatan'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'user_id',\n 'type' => 'select',\n 'entity' => 'user',\n 'attribute' => 'name',\n 'model' => 'App\\Models\\User',\n 'label' => 'Operator'\n ]);\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "title": "" }, { "docid": "15580a2a5088385bc5fab07aff1f87af", "score": "0.5457512", "text": "protected function setupListOperation()\n {\n // $this->crud->setFromDb();\n $this->crud->addColumns([\n [\n 'label' => \"ID\", // Table column heading\n 'name' => 'id', // The db column name\n 'type' => 'text'\n ],\n [\n 'label' => \"Nama User\", // Table column heading\n 'type' => \"select\",\n 'name' => 'id_konten', // The db column name\n 'entity' => 'Owner',\n 'attribute' => \"name\",\n 'model' => \"App\\User\"\n ], \n [\n 'label' => \"Judul Konten\", // Table column heading\n 'name' => 'judul', // The db column name\n 'type' => 'text'\n ], \n [\n 'name' => 'gambar', // The db column name\n 'label' => \"Gambar Konten\", // Table column heading\n 'type' => 'image',\n 'prefix' => '/uploads/images/GambarKonten/',\n ], \n [\n 'name' => 'terkumpul', // The db column name\n 'label' => \"Terkumpul\", // Table column heading\n 'type' => \"number\",\n 'prefix' => \"Rp.\",\n 'thousands_sep' => '.',\n ], \n [\n 'name' => 'target', // The db column name\n 'label' => \"Target\", // Table column heading\n 'type' => \"number\",\n 'prefix' => \"Rp.\",\n 'thousands_sep' => '.',\n ], \n [\n 'name' => \"lama_donasi\", // The db column name\n 'label' => \"Lama Donasi\", // Table column heading\n 'type' => \"date\",\n ], \n [\n 'label' => \"Nomor Rekening\", // Table column heading\n 'name' => 'nomorRekening', // The db column name\n 'type' => 'text'\n ],\n [\n 'name' => 'confirmed', // The db column name\n 'label' => \"Confirmed\", // Table column heading\n 'type' => 'boolean',\n 'options' => [0 => 'Belum Verifikasi', 1 => 'Verifikasi']\n ], \n ]);\n }", "title": "" }, { "docid": "e0b07fd6f050fffdbc7ec494030c66e0", "score": "0.5449054", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\DeviceLog');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/devices/logs');\n $this->crud->setEntityNameStrings(trans('fields.log'), trans('fields.logs'));\n\n $this->crud->denyAccess(['create', 'update', 'delete']);\n $this->crud->removeAllButtons();\n\n $this->crud->setListContentClass('col-md-8 col-md-offset-2');\n\n $this->crud->setDefaultPageLength(50);\n\n $this->crud->orderBy('created_at', 'DESC');\n\n $this->crud->setColumns([\n [\n 'name' => 'created_at',\n 'label' => trans('fields.datetime'),\n 'type' => 'datetime',\n 'format' => 'j F Y H:i:s',\n ],\n [\n 'name' => 'description',\n 'label' => trans('fields.description'),\n 'type' => 'text',\n 'limit' => 255\n ],\n [\n 'name' => 'transaction_id',\n 'label' => trans('fields.transaction_id'),\n 'type' => 'text',\n 'limit' => 255\n ],\n ]);\n\n\n }", "title": "" }, { "docid": "934bfc70acb0a8986720894f40756541", "score": "0.5446933", "text": "protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'name' => 'child_id',\n 'type' => 'select',\n 'entity' => 'child', \n 'model' => Child::class,\n 'attribute' => 'name',\n 'label' => 'Anak',\n ],\n [\n 'name' => 'schedule_id',\n 'label' => 'Kelas',\n 'type' => 'select',\n 'entity' => 'schedule', \n 'model' => Schedule::class,\n 'attribute' => 'attendance_display',\n 'searchLogic' => function ($query, $column, $searchTerm) {\n $query->orWhereHas('schedule', function($query) use ($searchTerm) {\n $query->where('name', 'like', '%'.$searchTerm.'%');\n });\n }\n ],\n [\n 'name' => 'class_date',\n 'label' => 'Tarikh Kelas',\n 'type' => 'date',\n ],\n [\n 'name' => 'attended_at',\n 'label' => 'Hadir Pada',\n ],\n ]);\n\n $this->crud->addFilter([\n 'name' => 'child',\n 'type' => 'dropdown',\n 'label' => 'Anak'\n ], Child::orderBy('name')->pluck('name', 'id')->toArray(), function($value) { // if the filter is active\n $this->crud->addClause('where', 'child_id', $value);\n });\n\n $this->crud->addFilter([\n 'type' => 'date',\n 'name' => 'class_date',\n 'label' => 'Tarikh'\n ],\n false,\n function ($value) { // if the filter is active, apply these constraints\n $this->crud->addClause('where', 'class_date', $value);\n });\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']); \n */\n }", "title": "" }, { "docid": "9110a8b08afa054f3cd569ae782cec5e", "score": "0.54360926", "text": "public function configure()\n { \n parent::configure();\n \n $user = $this->context->getUser();\n \n $this->setUri('@'.$this->context->getRouting()->getCurrentRouteName());\n \n $page = $user->getAttribute('page', null, $this->getNamespace());\n if ($page != null)\n {\n $this->getPager()->setPage($page);\n }\n \n $sort = $user->getAttribute('sort', null, $this->getNamespace());\n if ($sort != null)\n {\n $type = $user->getAttribute('type', null, $this->getNamespace());\n $this->setSort($sort, $type);\n }\n }", "title": "" }, { "docid": "efcb6596c252397c35bb621e464bf7a3", "score": "0.54308456", "text": "protected function initGrid()\n {\n $buttonClass = ($this->matchPanelStyle && !empty($this->gridOptions['panel'])) ?\n 'btn btn-' . ArrayHelper::getValue($this->gridOptions['panel'], 'type', 'default') :\n 'btn btn-default';\n Html::addCssClass($this->toggleButton, $buttonClass);\n if (empty($this->toggleButton['label'])) {\n $this->toggleButton['label'] = '<i class=\"glyphicon glyphicon-wrench\"></i> ' . Yii::t('kvdynagrid', 'Personalize');\n if (empty($this->toggleButton['data-pjax'])) {\n $this->toggleButton['data-pjax'] = false;\n }\n }\n $dynagrid = '&nbsp;';\n if ($this->showPersonalize) {\n $dynagrid = $this->render($this->_module->configView, ['model' => $this->_model, 'toggleButton' => $this->toggleButton, 'id'=>$this->_modalId]);\n }\n $checkPanel = !empty($this->gridOptions['panel']) && is_array($this->gridOptions['panel']);\n if ($checkPanel && !empty($this->gridOptions['panel']['before'])) {\n $this->gridOptions['panel']['before'] = str_replace('{dynagrid}', $dynagrid, $this->gridOptions['panel']['before']);\n }\n if ($checkPanel && !empty($this->gridOptions['panel']['after'])) {\n $this->gridOptions['panel']['after'] = str_replace('{dynagrid}', $dynagrid, $this->gridOptions['panel']['after']);\n }\n $layout = ArrayHelper::getValue($this->gridOptions, 'layout', '{summary} {items} {pager}');\n $this->gridOptions['layout'] = str_replace('{dynagrid}', $dynagrid, $layout);\n $this->registerAssets();\n }", "title": "" }, { "docid": "3af8b3ace3bb8e58078e17082b24608f", "score": "0.5429785", "text": "public function setup()\n {\n $this->crud->setModel(Project::class);\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/project');\n $this->crud->setEntityNameStrings('project', 'projects');\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n\n $this->crud->addFields([\n [\n 'label' => 'Image',\n 'type' => 'browse',\n 'name' => 'image',\n ],\n [\n 'label' => 'Technologies',\n 'type' => 'select2_multiple',\n 'name' => 'technologies',\n 'entity' => 'technology',\n 'attribute' => 'name',\n 'model' => Technology::class,\n 'pivot' => true,\n ],\n\n [\n 'label' => 'Name',\n 'name' => 'name',\n ],\n [\n 'label' => 'Slug',\n 'name' => 'slug',\n ],\n [\n 'label' => 'Title',\n 'name' => 'title',\n ],\n [\n 'label' => 'Url',\n 'name' => 'url',\n ],\n [\n 'label' => 'Repository',\n 'name' => 'repository',\n ],\n [\n 'label' => 'Highlight',\n 'name' => 'highlight',\n 'type' => 'checkbox',\n ],\n [\n 'label' => 'Description',\n 'name' => 'description',\n 'type' => 'summernote'\n ],\n ]);\n\n $this->crud->addColumns([\n [\n 'label' => 'Name',\n 'name' => 'name',\n ],\n [\n 'label' => 'Slug',\n 'name' => 'slug',\n ],\n ]);\n }", "title": "" }, { "docid": "af5a6e24d7cf2c30858e195c70fa504e", "score": "0.5429242", "text": "public function setup()\n {\n $this->xPanel->setModel('App\\Models\\Article');\n $this->xPanel->with(['user']);\n $this->xPanel->setRoute(admin_uri('articles'));\n $this->xPanel->setEntityNameStrings(trans('admin::messages.ad'), trans('admin::messages.ads'));\n //$this->xPanel->denyAccess(['create']);\n if (!request()->input('order')) {\n if (config('settings.single.articles_review_activation')) {\n $this->xPanel->orderBy('published', 'ASC');\n }\n $this->xPanel->orderBy('created_at', 'DESC');\n }\n\n $this->xPanel->addButtonFromModelFunction('top', 'bulk_delete_btn', 'bulkDeleteBtn', 'end');\n\n // Hard Filters\n if (request()->filled('active')) {\n if (request()->get('active') == 0) {\n\n $this->xPanel->addClause('where', 'published', '=', 0);\n }\n if (request()->get('active') == 1) {\n $this->xPanel->addClause('where', 'published', '=', 1);\n }\n }\n\n // Filters\n // -----------------------\n $this->xPanel->addFilter([\n 'name' => 'id',\n 'type' => 'text',\n 'label' => 'ID',\n ],\n false,\n function ($value) {\n $this->xPanel->addClause('where', 'id', '=', $value);\n });\n // -----------------------\n $this->xPanel->addFilter([\n 'name' => 'from_to',\n 'type' => 'date_range',\n 'label' => trans('admin::messages.Date range'),\n ],\n false,\n function ($value) {\n $dates = json_decode($value);\n $this->xPanel->addClause('where', 'created_at', '>=', $dates->from);\n $this->xPanel->addClause('where', 'created_at', '<=', $dates->to);\n });\n // -----------------------\n $this->xPanel->addFilter([\n 'name' => 'title',\n 'type' => 'text',\n 'label' => trans('admin::messages.Title'),\n ],\n false,\n function ($value) {\n $this->xPanel->addClause('where', 'title', 'LIKE', \"%$value%\");\n });\n // -----------------------\n\n // -----------------------\n $this->xPanel->addFilter([\n 'name' => 'status',\n 'type' => 'dropdown',\n 'label' => 'Trạng thái',\n ], [\n 1 => 'Không hoạt động',\n 2 => 'Hoạt động',\n ], function ($value) {\n if ($value == 0) {\n $this->xPanel->addClause('where', 'published', '=', 0);\n }\n if ($value == 1) {\n $this->xPanel->addClause('where', 'published', '=', 1);\n }\n });\n // -----------------------\n $this->xPanel->addFilter([\n 'name' => 'featured',\n 'type' => 'dropdown',\n 'label' => \"Nổi bật\",\n ], [\n 1 => \"Bình thường\",\n 2 => \"Nổi bật\",\n ], function ($value) {\n if ($value == 0) {\n $this->xPanel->addClause('where', 'featured', '=', 0);\n }\n if ($value == 1) {\n $this->xPanel->addClause('where', 'featured', '=', 1);\n }\n });\n\n\n /*\n |--------------------------------------------------------------------------\n | COLUMNS AND FIELDS\n |--------------------------------------------------------------------------\n */\n // COLUMNS\n $this->xPanel->addColumn([\n 'name' => 'id',\n 'label' => '',\n 'type' => 'checkbox',\n 'orderable' => false,\n ]);\n $this->xPanel->addColumn([\n 'name' => 'created_at',\n 'label' => 'Ngày tạo',\n 'type' => 'datetime',\n ]);\n\n $this->xPanel->addColumn([\n 'name' => 'title',\n 'label' => 'Tiêu đề',\n 'type' => 'model_function',\n 'function_name' => 'getTitleHtml',\n ]);\n $this->xPanel->addColumn([\n 'name' => 'visits',\n 'label' => 'LX',\n 'type' => 'text',\n ]);\n\n /*$this->xPanel->addColumn([\n 'name' => 'logo', // Put unused field column\n 'label' => trans(\"admin::messages.Logo\"),\n 'type' => 'model_function',\n 'function_name' => 'getLogoHtml',\n ]);*/\n\n /*$this->xPanel->addColumn([\n 'name' => 'country_code',\n 'label' => trans(\"admin::messages.Country\"),\n 'type' => 'model_function',\n 'function_name' => 'getCountryHtml',\n ]);*/\n\n\n $this->xPanel->addColumn([\n 'name' => 'published',\n 'label' => 'Đã duyệt',\n 'type' => \"model_function\",\n 'function_name' => 'getReviewedHtml',\n ]);\n\n\n // FIELDS\n $this->xPanel->addField([\n 'label' => 'Danh mục',\n 'name' => 'category_id',\n 'type' => 'select2_from_array',\n 'options' => $this->categories(),\n 'allows_null' => false,\n ]);\n\n $this->xPanel->addField([\n 'name' => 'logo',\n 'label' => 'Thumbnail (jpg, jpeg, png, gif)',\n 'type' => 'image',\n 'upload' => true,\n 'disk' => 'public',\n ]);\n\n $this->xPanel->addField([\n 'name' => 'title',\n 'label' => 'Tiêu đề',\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => 'Tiêu đề',\n ],\n ]);\n $this->xPanel->addField([\n 'name' => 'description',\n 'label' => 'Nội dung',\n 'type' => (config('settings.single.simditor_wysiwyg'))\n ? 'ckeditor'\n : ((!config('settings.single.simditor_wysiwyg') && config('settings.single.ckeditor_wysiwyg')) ? 'ckeditor' : 'textarea'),\n 'attributes' => [\n 'placeholder' => 'Nội dung',\n 'id' => 'description',\n 'rows' => 10,\n ],\n ]);\n\n\n $this->xPanel->addField([\n 'name' => 'tags',\n 'label' => 'Từ khóa',\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => 'Từ khóa',\n ],\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6',\n ],\n ]);\n\n $this->xPanel->addField([\n 'name' => 'published',\n 'label' => 'Xuất bản?',\n 'type' => 'checkbox',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6',\n 'style' => 'margin-top: 20px;',\n ],\n ]);\n $this->xPanel->addField([\n 'name' => 'featured',\n 'label' => 'Nổi bật ?',\n 'type' => 'checkbox',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6',\n 'style' => 'margin-top: 20px;',\n ],\n ]);\n }", "title": "" }, { "docid": "a665231e484b8a66f2035fa4a1361766", "score": "0.54285395", "text": "public function setup()\n\t{\n\t\t$this->xPanel->setModel('App\\Models\\BlogEntry');\n\t\t$this->xPanel->setRoute(config('larapen.admin.route_prefix', 'admin') . '/blog-entries');\n\t\t$this->xPanel->setEntityNameStrings(__t('blog_entry'), __t('blog_entries'));\n $this->xPanel->enableDetailsRow();\n $this->xPanel->allowAccess(['details_row']);\n\n \n /*\n\t\t|--------------------------------------------------------------------------\n\t\t| COLUMNS AND FIELDS\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\n\t\t// COLUMNS\n\t\t$this->xPanel->addColumn([\n\t\t\t'name' => 'id',\n\t\t\t'label' => \"ID\",\n\t\t]);\n $this->xPanel->addColumn([\n 'name' => 'name',\n 'label' => \"NAME\",\n ]);\n $this->xPanel->addColumn([\n 'name' => 'start_date',\n 'label' => \"START DATE\",\n ]);\n $this->xPanel->addColumn([\n 'name' => 'active',\n 'label' => __t(\"Active\"),\n 'type' => 'model_function',\n 'function_name' => 'getActiveHtml',\n ]);\n $this->xPanel->addColumn([\n 'name' => 'featured',\n 'label' => __t(\"Featured\"),\n 'type' => 'model_function',\n 'function_name' => 'getFeaturedHtml',\n ]);\n\n\t\t// FIELDS\n $this->xPanel->addField([\n 'name' => \"name\",\n 'label' => __t('Name'),\n 'type' => \"text\",\n 'attributes' => [\n 'placeholder' => __t('Name'),\n ],\n ]);\n \n\n // $this->xPanel->addField([\n // 'name' => 'category_id',\n // 'label' => __t(\"Category\"),\n // 'type' => 'select_from_array',\n // 'options' => BlogCategory::where('translation_lang',\\App::getLocale())->pluck('name','id')->toArray(),\n // 'allows_null' => false,\n // ]);\n\n\n $this->xPanel->addField([\n 'name' => 'category_id',\n 'label' => __t(\"Category\"),\n 'type' => 'select_from_array',\n 'options' => $this->getBlogCategory(),\n 'allows_null' => false,\n ]);\n\n \n\n // Country field\n // $this->xPanel->addField([\n // 'label' => __t(\"Country\"),\n // 'name' => 'country_code',\n // 'model' => 'App\\Models\\Country', \n // 'entity' => 'country',\n // 'attribute' => 'asciiname',\n // 'type' => 'select2',\n // ]);\n\n $this->xPanel->addField([\n 'label' => __t(\"Country\"),\n 'name' => 'country_code',\n 'attribute' => 'asciiname',\n 'entity' => 'country',\n 'type' => 'select_from_array',\n 'options' => $this->getActiveCountry(),\n 'allows_null' => false,\n ]);\n\n // author fields\n $this->xPanel->addField([\n 'name' => 'post_author',\n 'label' => __t(\"Author\"),\n 'type' => 'select_from_array',\n 'options' => User::where('user_type_id' , config('constant.POST_AUTHOR_ID'))->pluck('name','id')->toArray(),\n 'allows_null' => false,\n ]);\n\n // $this->xPanel->addField([\n // 'name' => 'picture',\n // 'label' => __t('Picture'),\n // 'type' => 'image',\n // 'upload' => true,\n // 'disk' => 'uploads',\n // ]);\n\n $this->xPanel->addField([\n 'name' => 'picture',\n 'label' => __t('Picture'),\n 'type' => 'simple_image',\n 'upload' => true,\n 'disk' => 'uploads'\n ]);\n\n $this->xPanel->addField([\n 'name' => \"start_date\",\n 'label' => __t('start_date'),\n 'type' => \"datetime_picker\",\n 'attributes' => [\n 'placeholder' => __t('start_date'),\n 'id' => 'startDate'\n ],\n ]);\n $this->xPanel->addField([\n 'name' => \"short_text\",\n 'label' => __t('short_text'),\n 'type' => \"textarea\",\n 'attributes' => [\n 'placeholder' => __t('short_text'),\n 'id' => 'shortText',\n 'rows' => 5\n ],\n ]);\n $this->xPanel->addField([\n 'name' => 'long_text',\n 'label' => __t(\"long_text\"),\n 'type' => (config('settings.single.simditor_wysiwyg'))\n ? 'simditor'\n : ((!config('settings.single.simditor_wysiwyg') && config('settings.single.ckeditor_wysiwyg')) ? 'ckeditor' : 'textarea'),\n 'attributes' => [\n 'placeholder' => __t(\"long_text\"),\n 'id' => 'longText',\n 'rows' => 20,\n ],\n ]);\n $this->xPanel->addField([\n 'name' => 'tags',\n 'label' => __t('Tags'),\n 'type' => 'tags',\n 'value' => $this->getBlogTags()\n ]);\n $this->xPanel->addField([\n 'name' => 'meta_title',\n 'label' => __t('Meta Title'),\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => __t('Meta Title'),\n ],\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-12',\n ],\n ]);\n\n $this->xPanel->addField([\n 'name' => 'meta_description',\n 'label' => __t('Meta Description'),\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => __t('Meta Description'),\n ],\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-12',\n ],\n ]);\n\n $this->xPanel->addField([\n 'name' => 'meta_keywords',\n 'label' => __t('Meta Keywords'),\n 'type' => 'text',\n 'attributes' => [\n 'placeholder' => __t('Meta Keywords'),\n ],\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-12',\n ],\n ]);\n $this->xPanel->addField([\n 'name' => 'active',\n 'label' => __t(\"Active\"),\n 'type' => 'checkbox',\n ]);\n $this->xPanel->addField([\n 'name' => 'featured',\n 'label' => __t(\"Featured\"),\n 'type' => 'checkbox',\n ]);\n\t}", "title": "" }, { "docid": "7f5f512d78d5c9ec7afd763ea0919e35", "score": "0.5410725", "text": "public function setup()\n {\n $this->crud->setModel(config('backpack.permissionmanager.user_model'));\n $this->crud->setEntityNameStrings(trans('backpack::permissionmanager.user'), trans('backpack::permissionmanager.users'));\n $this->crud->setRoute(config('backpack.base.route_prefix').'/user');\n $this->crud->enableAjaxTable();\n\n // Columns.\n $this->crud->setColumns([\n [\n 'name' => 'name',\n 'label' => trans('backpack::permissionmanager.name'),\n 'type' => 'text',\n ],\n [\n 'name' => 'email',\n 'label' => trans('backpack::permissionmanager.email'),\n 'type' => 'email',\n ],\n [ // n-n relationship (with pivot table)\n 'label' => trans('backpack::permissionmanager.roles'), // Table column heading\n 'type' => 'select_multiple',\n 'name' => 'roles', // the method that defines the relationship in your Model\n 'entity' => 'roles', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => config('laravel-permission.models.role'), // foreign key model\n ],\n [ // n-n relationship (with pivot table)\n 'label' => trans('backpack::permissionmanager.extra_permissions'), // Table column heading\n 'type' => 'select_multiple',\n 'name' => 'permissions', // the method that defines the relationship in your Model\n 'entity' => 'permissions', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => config('laravel-permission.models.permission'), // foreign key model\n ],\n ]);\n\n // Fields\n $this->crud->addFields([\n [\n 'name' => 'name',\n 'label' => trans('backpack::permissionmanager.name'),\n 'type' => 'text',\n ],\n [\n 'name' => 'email',\n 'label' => trans('backpack::permissionmanager.email'),\n 'type' => 'email',\n ],\n [\n 'name' => 'password',\n 'label' => trans('backpack::permissionmanager.password'),\n 'type' => 'password',\n ],\n [\n 'name' => 'password_confirmation',\n 'label' => trans('backpack::permissionmanager.password_confirmation'),\n 'type' => 'password',\n ],\n [\n // two interconnected entities\n 'label' => trans('backpack::permissionmanager.user_role_permission'),\n 'field_unique_name' => 'user_role_permission',\n 'type' => 'checklist_dependency',\n 'name' => 'roles_and_permissions', // the methods that defines the relationship in your Model\n 'subfields' => [\n 'primary' => [\n 'label' => trans('backpack::permissionmanager.roles'),\n 'name' => 'roles', // the method that defines the relationship in your Model\n 'entity' => 'roles', // the method that defines the relationship in your Model\n 'entity_secondary' => 'permissions', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => config('laravel-permission.models.role'), // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?]\n 'number_columns' => 3, //can be 1,2,3,4,6\n ],\n 'secondary' => [\n 'label' => ucfirst(trans('backpack::permissionmanager.permission_singular')),\n 'name' => 'permissions', // the method that defines the relationship in your Model\n 'entity' => 'permissions', // the method that defines the relationship in your Model\n 'entity_primary' => 'roles', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"Backpack\\PermissionManager\\app\\Models\\Permission\", // foreign key model\n 'pivot' => true, // on create&update, do you need to add/delete pivot table entries?]\n 'number_columns' => 3, //can be 1,2,3,4,6\n ],\n ],\n ],\n ]); \n $this->crud->addButtonFromModelFunction(\"line\",'impersonateButton','getImpersonateButton','end');\n $this->crud->enableExportButtons();\n }", "title": "" }, { "docid": "0d5ba78f0e5f304dca92d002d5017c06", "score": "0.54088515", "text": "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n }", "title": "" }, { "docid": "0d5ba78f0e5f304dca92d002d5017c06", "score": "0.54088515", "text": "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n }", "title": "" }, { "docid": "0d5ba78f0e5f304dca92d002d5017c06", "score": "0.54088515", "text": "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n }", "title": "" }, { "docid": "e068d523f5c4eb1b9b1ce79744770e61", "score": "0.5405376", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Rent');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/rent');\n $this->crud->setEntityNameStrings('rent', 'rents');\n\n $this->crud->addField([\n 'label' => \"Trace NO.\",\n 'type' => 'text',\n 'name' => 'traceNumber',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'renter_name',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'label' => 'Whatsapp Available',\n 'name' => 'has_whatsapp',\n 'type' => 'checkbox',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n 'wrapperAttributes' => [\n 'class' => 'col-md-12'\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'renter_phone',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'email',\n 'name' => 'renter_mail',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'date_picker',\n 'name' => 'pick_up_date',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'date_picker',\n 'name' => 'drop_off_date',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'time',\n 'name' => 'pick_up_time',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'time',\n 'name' => 'drop_off_time',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'address',\n 'name' => 'pick_up_location',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'address',\n 'name' => 'drop_off_location',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'label' => 'Needs Driver',\n 'name' => 'has_driver',\n 'type' => 'toggle',\n 'hide_when' => [\n 0 => ['driver_id'],\n ],\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n 'wrapperAttributes' => [\n 'class' => 'col-md-12',\n 'style' => 'display: none;',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'renter_nation',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'label' => \"Driver\",\n 'type' => 'select2',\n 'name' => 'driver_id',\n 'entity' => 'driver',\n 'attribute' => 'name',\n 'model' => \"App\\Models\\Driver\"\n ]);\n\n $this->crud->addField([\n 'type' => 'tinymce',\n 'name' => 'renter_notes',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'car_amount',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'paid_amount',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'remaining_amount',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'insurance_amount',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'text',\n 'name' => 'HGS_amount',\n 'attributes' => [\n 'disabled' => 'disabled',\n ],\n ]);\n\n $this->crud->addField([\n 'type' => 'hidden',\n 'name' => 'reviewed',\n ]);\n\n $this->crud->addField([\n 'name' => 'confirmed', \n 'label' => 'Confirm', \n 'type' => 'radio',\n 'options' => [ \n 1 => \"Confirm\",\n 2 => \"Cancel\"\n ],\n 'inline' => true,\n ]);\n\n $this->crud->addField([\n 'name' => 'cancelled',\n 'type' => 'hidden'\n ]);\n\n\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->setFromDb();\n\n // add asterisk for fields that are required in RentRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "8376e94086eba3aed4eec04c37765748", "score": "0.54048765", "text": "function configure()\r\n {\r\n //check rights\r\n $userlogin = getUserLogin();\r\n if (!$userlogin->hasRights('database_manage')) \r\n {\r\n appendErrorMessage(__('Configure database').': '.__('insufficient rights').'.<br/>');\r\n redirect('');\r\n }\r\n\r\n //get info about current settings\r\n $siteconfig = $this->siteconfig_db->getSiteConfig();\r\n $customFieldsInfo = $this->customfields_db->getAllFieldsInfo();\r\n \r\n //get output\r\n $headerdata = array();\r\n $headerdata['title'] = __('Site configuration');\r\n $headerdata['javascripts'] = array('tree.js','prototype.js','scriptaculous.js','builder.js','externallinks.js');\r\n \r\n $output = $this->load->view('header', $headerdata, true);\r\n\r\n \r\n $output .= $this->load->view('site/configoverview',\r\n array('siteconfig'=>$siteconfig, 'customFieldsInfo'=>$customFieldsInfo), \r\n true);\r\n \r\n $output .= $this->load->view('footer','', true);\r\n\r\n //set output\r\n $this->output->set_output($output); \r\n }", "title": "" }, { "docid": "6630ca3d0e99170c41fc5c795b9c025d", "score": "0.53771967", "text": "public function configure()\n {\n $this->widgetSchema['cp_action_ctc_date_echeance'] = new sfWidgetFormJQueryDate(array(\n 'culture' => 'fr_FR',\n 'image' => '/images/calendar.png',\n 'date_widget' => new sfWidgetFormi18nDate(array('culture' => 'fr_FR')),\n 'config' => array('firstDay' => '1')\n ));\n\n //affichage des utilisateurs du site uniquement\n\n $this->widgetSchema['cp_action_ctc_user_id'] = new sfWidgetFormDoctrineChoice(array(\n 'model' => 'sfGuardUser',\n 'query' => sfGuardUserTable::getListUserSite(),\n ));\n \n \n }", "title": "" }, { "docid": "7b7796985abaa4ac7480c9513d930bc1", "score": "0.5375485", "text": "public function setup() : void\n {\n // Eloquent model to associate with this collection\n // of views and controller actions.\n $this->crud->setModel('App\\Models\\UserRole');\n // Custom backpack route.\n $this->crud->setRoute('admin/user-role');\n // Custom strings to display within the backpack UI,\n // things like Create User Role, Delete User Roles, etc.\n $this->crud->setEntityNameStrings('user role', 'user roles');\n\n $this->crud->operation(['update'], function () {\n // Add custom fields to the update views.\n $this->crud->addField([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Name',\n ]);\n });\n }", "title": "" }, { "docid": "853f02d77e3a8cc03beb551e22baf156", "score": "0.537152", "text": "protected function setupListOperation()\n {\n // CRUD::setFromDb(); // columns\n $this->crud->addFilter(\n [\n 'name' => 'patient_form_id',\n 'type' => 'select2',\n 'label' => 'فلترة حسب المريض',\n 'placeholder' => 'اكتب اسم المريض للفلترة'\n ],\n function () {\n return PatientForm::all()->pluck('patient_with_id', 'id')->toArray();\n },\n function ($value) { // if the filter is active\n $this->crud->addClause('where', 'patient_form_id', $value);\n }\n );\n\n $this->crud->addColumn(['name' => 'patient_with_id', 'label' => trans('backpack::common.patient_name')]);\n $this->crud->addColumn(['name' => 'sugar', 'label' => trans('backpack::common.sugar')]);\n $this->crud->addColumn(['name' => 'date', 'label' => trans('backpack::common.date')]);\n $this->crud->addColumn(['name' => 'ca', 'label' => trans('backpack::common.ca')]);\n $this->crud->addColumn(['name' => 'total_protein', 'label' => trans('backpack::common.total_protein')]);\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "title": "" }, { "docid": "106640d1136d16a84daa64049baaafa6", "score": "0.5370262", "text": "public function configure()\n {\n \n $this->widgetSchema['text'] = new sfWidgetFormCKEditor(array(\n 'jsoptions'=>array(\n 'extraPlugins' => 'autogrow',\n 'toolbarCanCollapse' => false,\n 'toolbar' => array(array('Bold', 'Italic', 'NumberedList', 'BulletedList', 'Link', 'Inlink', 'Smiley'))\n\n )\n ));\n $this->widgetSchema['text']->setLabel('Добавить коментарий:');\n \n }", "title": "" }, { "docid": "168c721d9efb59d8943d4497bfdcee7b", "score": "0.5363901", "text": "public function cbInit() {\n\t\t\t$this->title_field = \"id\";\n\t\t\t$this->limit = \"20\";\n\t\t\t$this->orderby = \"id,desc\";\n\t\t\t$this->global_privilege = false;\n\t\t\t$this->button_table_action = true;\n\t\t\t$this->button_bulk_action = true;\n\t\t\t$this->button_action_style = \"button_icon\";\n\t\t\t$this->button_add = true;\n\t\t\t$this->button_edit = true;\n\t\t\t$this->button_delete = true;\n\t\t\t$this->button_detail = true;\n\t\t\t$this->button_show = true;\n\t\t\t$this->button_filter = true;\n\t\t\t$this->button_import = false;\n\t\t\t$this->button_export = false;\n\t\t\t$this->table = \"mrgs\";\n\t\t\t# END CONFIGURATION DO NOT REMOVE THIS LINE\n\n\t\t\t# START COLUMNS DO NOT REMOVE THIS LINE\n\t\t\t$this->col = [];\n\t\t\t$this->col[] = [\"label\"=>\"Район\",\"name\"=>\"id_raion\",\"join\"=>\"raions,name\"];\n\t\t\t$this->col[] = [\"label\"=>\"Ответственный за БГ\",\"name\"=>\"fio_otvetstven\"];\n\t\t\t# END COLUMNS DO NOT REMOVE THIS LINE\n\n\t\t\t# START FORM DO NOT REMOVE THIS LINE\n\t\t\t$this->form = [];\n\t\t\t$this->form[] = ['label'=>'Raion','name'=>'id_raion','type'=>'select2','validation'=>'required','width'=>'col-sm-10','datatable'=>'raions,name_full'];\n\t\t\t$this->form[] = ['label'=>'ФИО ответственного за БГ','name'=>'fio_otvetstven','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Название НПА РГ','name'=>'naim_act_rg','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Дата принятия НПА РГ','name'=>'data_npa','type'=>'date','validation'=>'required|date','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Состав РГ БГ (doc)','name'=>'file_rg_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Состав РГ БГ (pdf)','name'=>'file_rg_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Дата утверждения плана БГ','name'=>'date_plan','type'=>'date','validation'=>'required|date','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Наименование плана','name'=>'naim_plan_bg','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'План БГ (doc)','name'=>'file_plan_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'План БГ (pdf)','name'=>'file_plan_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Опросный лист (doc)','name'=>'file_opros_list_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Опросный лист (pdf)','name'=>'file_opros_list_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t$this->form[] = ['label'=>'Проект технического задания (doc)','name'=>'file_tz','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t# END FORM DO NOT REMOVE THIS LINE\n\n\t\t\t# OLD START FORM\n\t\t\t//$this->form = [];\n\t\t\t//$this->form[] = ['label'=>'Raion','name'=>'id_raion','type'=>'select2','validation'=>'required','width'=>'col-sm-10','datatable'=>'raions,full_name'];\n\t\t\t//$this->form[] = ['label'=>'ФИО ответственного за БГ','name'=>'fio_otvetstven','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Название НПА РГ','name'=>'naim_act_rg','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Дата принятия НПА РГ','name'=>'data_npa','type'=>'date','validation'=>'required|date','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Состав РГ БГ (doc)','name'=>'file_rg_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Состав РГ БГ (pdf)','name'=>'file_rg_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Дата утверждения плана БГ','name'=>'date_plan','type'=>'date','validation'=>'required|date','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Наименование плана','name'=>'naim_plan_bg','type'=>'text','validation'=>'required|min:1|max:255','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'План БГ (doc)','name'=>'file_plan_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'План БГ (pdf)','name'=>'file_plan_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Опросный лист (doc)','name'=>'file_opros_list_doc','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Опросный лист (pdf)','name'=>'file_opros_list_pdf','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t//$this->form[] = ['label'=>'Проект технического задания (doc)','name'=>'file_tz','type'=>'upload','validation'=>'required','width'=>'col-sm-10'];\n\t\t\t# OLD END FORM\n\n\t\t\t/* \n\t | ---------------------------------------------------------------------- \n\t | Sub Module\n\t | ---------------------------------------------------------------------- \n\t\t\t| @label = Label of action \n\t\t\t| @path = Path of sub module\n\t\t\t| @foreign_key \t = foreign key of sub table/module\n\t\t\t| @button_color = Bootstrap Class (primary,success,warning,danger)\n\t\t\t| @button_icon = Font Awesome Class \n\t\t\t| @parent_columns = Sparate with comma, e.g : name,created_at\n\t | \n\t */\n\t $this->sub_module = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Action Button / Menu\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @url = Target URL, you can use field alias. e.g : [id], [name], [title], etc\n\t | @icon = Font awesome class icon. e.g : fa fa-bars\n\t | @color \t = Default is primary. (primary, warning, succecss, info) \n\t | @showIf \t = If condition when action show. Use field alias. e.g : [id] == 1\n\t | \n\t */\n\t $this->addaction = array();\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add More Button Selected\n\t | ---------------------------------------------------------------------- \n\t | @label = Label of action \n\t | @icon \t = Icon from fontawesome\n\t | @name \t = Name of button \n\t | Then about the action, you should code at actionButtonSelected method \n\t | \n\t */\n\t $this->button_selected = array();\n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add alert message to this module at overheader\n\t | ---------------------------------------------------------------------- \n\t | @message = Text of message \n\t | @type = warning,success,danger,info \n\t | \n\t */\n\t $this->alert = array();\n\t \n\n\t \n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Add more button to header button \n\t | ---------------------------------------------------------------------- \n\t | @label = Name of button \n\t | @url = URL Target\n\t | @icon = Icon from Awesome.\n\t | \n\t */\n\t $this->index_button = array();\n\n\n\n\t /* \n\t | ---------------------------------------------------------------------- \n\t | Customize Table Row Color\n\t | ---------------------------------------------------------------------- \n\t | @condition = If condition. You may use field alias. E.g : [id] == 1\n\t | @color = Default is none. You can use bootstrap success,info,warning,danger,primary. \n\t | \n\t */\n\t $this->table_row_color = array(); \t \n\n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | You may use this bellow array to add statistic at dashboard \n\t | ---------------------------------------------------------------------- \n\t | @label, @count, @icon, @color \n\t |\n\t */\n\t $this->index_statistic = array();\n\n\n\n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add javascript at body \n\t | ---------------------------------------------------------------------- \n\t | javascript code in the variable \n\t | $this->script_js = \"function() { ... }\";\n\t |\n\t */\n\t $this->script_js = NULL;\n\n\n /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code before index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it before index table\n\t | $this->pre_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->pre_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include HTML Code after index table \n\t | ---------------------------------------------------------------------- \n\t | html code to display it after index table\n\t | $this->post_index_html = \"<p>test</p>\";\n\t |\n\t */\n\t $this->post_index_html = null;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include Javascript File \n\t | ---------------------------------------------------------------------- \n\t | URL of your javascript each array \n\t | $this->load_js[] = asset(\"myfile.js\");\n\t |\n\t */\n\t $this->load_js = array();\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Add css style at body \n\t | ---------------------------------------------------------------------- \n\t | css code in the variable \n\t | $this->style_css = \".style{....}\";\n\t |\n\t */\n\t $this->style_css = NULL;\n\t \n\t \n\t \n\t /*\n\t | ---------------------------------------------------------------------- \n\t | Include css File \n\t | ---------------------------------------------------------------------- \n\t | URL of your css each array \n\t | $this->load_css[] = asset(\"myfile.css\");\n\t |\n\t */\n\t $this->load_css = array();\n\t \n\t \n\t }", "title": "" }, { "docid": "38940f624eabae9f55fec97a8a53d172", "score": "0.5358114", "text": "public function SetPanelSettings()\n\t{\n\n\t\t$this->productClass = GetClass('ISC_PRODUCT');\n\t\t$this->db = $GLOBALS['ISC_CLASS_DB'];\n\n\t\t$productDetails = $this->productClass->GetProduct();\n\n\t\t$productCats\t=\texplode(',', $productDetails['prodcatids']);\n\t\t\n\t\t$GLOBALS['ShowCustomeButton']\t=\t'none';\n\n\t\tforeach($productCats\tAS\t$index\t=> $catId){\n\t\t\n\t\t\t$catSql\t\t=\t\"SELECT * FROM `[|PREFIX|]categories` WHERE `categoryid` = '$catId' \";\n\t\t\t$catQuery\t=\t$GLOBALS['ISC_CLASS_DB']->Query($catSql);\n\t\t\t$catInfo\t=\t$GLOBALS['ISC_CLASS_DB']->Fetch($catQuery);\n\n\t\t\tif(\t$catInfo['catparentid']\t==\t'13'\t){\n\t\t\t\t$GLOBALS['ShowCustomeButton']\t=\t'';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\n\t\t$pageSql\t=\t\"\tSELECT * FROM `[|PREFIX|]pages` WHERE `pageid` = '9'\t\";\n\t\t$pageQuery\t=\t$GLOBALS['ISC_CLASS_DB']->Query($pageSql);\n\t\t$pageInfo\t=\t$GLOBALS['ISC_CLASS_DB']->Fetch($pageQuery);\n\n\t\t$GLOBALS['CustomButtonLink']\t=\tPageLink($pageInfo['pageid'], $pageInfo['pagetitle']);\n\t\n\t\t\n\t}", "title": "" }, { "docid": "4b97456066de83c764903947c35e4e5a", "score": "0.5348283", "text": "protected function setupListOperation()\n {\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n // select2 filter\n $this->crud->addFilter([\n 'name' => 'addition_id',\n 'type' => 'select2',\n 'label' => 'Опция'\n ], function() {\n return \\App\\Cashbox\\Models\\Addition::all()->pluck('name','id')->toArray();\n }, function($value) { // if the filter is active\n $this->crud->addClause('where', 'addition_id', $value);\n });\n\n $this->crud->addColumn([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Заголовок',\n ]);\n\n $this->crud->addColumn([\n 'name' => 'addition', // name of relationship method in the model\n 'type' => 'relationship',\n 'label' => 'Опция', // Table column heading\n 'wrapper' => [\n // 'element' => 'a', // the element will default to \"a\" so you can skip it here\n 'href' => function ($crud, $column, $entry, $related_key) {\n return backpack_url('addition/'.$related_key.'/edit');\n },\n // 'target' => '_blank',\n // 'class' => 'some-class',\n ],\n ]);\n\n $this->crud->addColumn([\n 'name' => 'position',\n 'type' => 'number',\n 'label' => 'Позиция',\n ]);\n $this->crud->addColumn([\n 'name' => 'is_active',\n 'type' => 'check',\n 'label' => 'Активно',\n ]);\n }", "title": "" }, { "docid": "894ed15adf5b0700a3feeef354d7daf8", "score": "0.53402245", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(Container_informationRequest::class);\n\n //CRUD::setFromDb(); // fields\n $this->crud->addField([\n 'label' => 'Container Name',\n //'type' => 'text',\n 'name' => 'container_name',\n \n\n ]);\n $this->crud->addField([\n 'label' => 'Delivery Date',\n 'type' => 'date',\n 'name' => 'delivery_date',\n\n ]);\n\n $this->crud->addField([\n 'label' => 'Total Items',\n //'type' => 'date',\n 'name' => 'total_items',\n\n ]);\n\n $this->crud->addField([\n 'label' => 'Status',\n 'type' => 'select_from_array',\n 'options' => [\n 'Inprogress' => 'Inprogress', 'Future_Import' => 'Future_Import','Recieved' => 'recieved'],\n\n\n 'name' => 'status',\n 'allows_null' => false,\n 'default' => 'InProgress',\n\n ]);\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "title": "" }, { "docid": "c53aadbcd6d1d28b3367dac5f20b69eb", "score": "0.53369486", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Appointment');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/appointment');\n $this->crud->setEntityNameStrings('appointment', 'appointments');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n $this->crud->addColumn([\n 'label' => \"User\",\n 'type' => 'select',\n 'name' => 'user_id',\n 'entity' => 'user',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\User\"\n ]);\n $this->crud->addColumn([\n 'label' => \"Doctor\",\n 'type' => 'select',\n 'name' => 'doctor_id',\n 'entity' => 'doctor',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\Doctor\"\n ]);\n $this->crud->addColumn([\n 'name' => 'time',\n 'label' => \"Time\"\n ]);\n $this->crud->addColumn([\n 'name' => 'date',\n 'label' => \"Date\"\n ]);\n\n $this->crud->addField([ // Select2 = 1-n relationship\n 'label' => \"User\",\n 'type' => 'select2',\n 'name' => 'user_id',\n 'entity' => 'user',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\User\"\n ]);\n $this->crud->addField([\n 'label' => \"Doctor\",\n 'type' => 'select2',\n 'name' => 'doctor_id',\n 'entity' => 'doctor',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\Doctor\"\n ]);\n\n ## map times for admin\n $times = WorkingHour::all();\n $mappedTimes = [];\n foreach($times as $time)\n {\n \n $mappedTimes[$time->time] = Str::limit($time->time, 5, '');\n }\n $this->crud->addField([\n 'name' => 'time',\n 'label' => \"Time\",\n 'type' => 'select_from_array',\n 'options' => $mappedTimes,\n 'allows_null' => false,\n ]);\n $this->crud->addField([\n 'name' => 'date',\n 'label' => \"Date\",\n 'type' => 'date'\n ]);\n \n \n // add asterisk for fields that are required in AppointmentRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "7196ed91aa01a9608ae5c574cca03184", "score": "0.53306806", "text": "protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'name' => 'id',\n 'label' => 'ID',\n 'type' => 'text',\n ],\n [\n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n ],\n [\n 'name' => 'workbook_id',\n 'label' => 'Workbook',\n 'type' => 'relationship',\n 'wrapper' => [\n 'href' => function ($crud, $column, $entry, $related_key) {\n return '/admin/workbook/' . $entry->workbook_id . '/show';\n }\n ]\n ],\n [\n 'name' => 'tableau_url',\n 'label' => 'Tableau URL',\n 'type' => 'text',\n ],\n [\n 'name' => 'pdf_url',\n 'label' => 'PDF URL',\n 'type' => 'text',\n 'wrapper' => [\n 'href' => function ($crud, $column, $entry, $related_key) {\n return tenant_asset($entry->pdf_url);\n }\n ]\n ],\n [\n 'name' => 'order_number',\n 'label' => 'Order Number',\n 'type' => 'number',\n ],\n ]);\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "title": "" }, { "docid": "673991c418a586566a7bc4609792473b", "score": "0.53249806", "text": "function _set_config()\n {\n $this->widget_name = 'Latest Posts';\n $this->widget_description = 'Show latest blog posts';\n $this->widget_container_class = 'widget';\n\n // set additional config\n $this->cpform_additional = array(\n 'submit_class' => 'btn btn-primary',\n 'submit_value' => 'Submit'\n );\n }", "title": "" }, { "docid": "f7e4c63d25fe0613d412858fa0ab154f", "score": "0.5324689", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\DrinksCategory');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/drinkscategory');\n $this->crud->setEntityNameStrings('Drinks Category', 'Drinks Category');\n $this->crud->enableAjaxTable();\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */ // Columns.\n \n $this->crud->addColumn([\n \n 'name' => 'drink_cat_name',\n 'label' => 'Name',\n \n ]);\n\n \n $this->crud->addColumn([\n 'name' => 'image',\n 'label' => 'Image',\n 'type'=> 'image',\n \n \n \n ]);\n $this->crud->addColumn([\n 'name' => 'status',\n 'label' => 'Status',\n 'type'=>'check',\n \n ]);\n \n \n\n // Fields\n $this->crud->addFields([\n [\n 'name' => 'drink_cat_name',\n 'label' => 'Name',\n 'type' => 'text',\n ],\n [\n 'name' => 'slug',\n 'label' => 'Page URL',\n 'type' => 'text',\n ],\n [\n 'name' => 'details',\n 'label' => 'Details',\n 'type' => 'wysiwyg',\n ],\n [\n 'name' => 'image',\n 'label' => 'Image',\n 'type'=> 'browse',\n \n \n \n ],\n \n\n\n \n [\n 'name' => 'status',\n 'label' => 'Status',\n 'type' => 'checkbox',\n ],\n [\n 'name' => 'meta_title',\n 'label' => 'Meta Title',\n 'type' => 'text',\n ],\n [\n 'name' => 'meta_keyword',\n 'label' => 'Meta Keywords',\n 'type' => 'text',\n ],\n \n ]);\n }", "title": "" }, { "docid": "f32080c0e06a3b2db516fb8762ca9593", "score": "0.53193486", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(AdditionValueRequest::class);\n\n $this->crud->addField([\n 'label' => \"Опция\",\n 'type' => 'select',\n 'name' => 'addition_id', // the db column for the foreign key\n\n // optional\n // 'entity' should point to the method that defines the relationship in your Model\n // defining entity will make Backpack guess 'model' and 'attribute'\n 'entity' => 'addition',\n\n // optional - manually specify the related model and attribute\n 'model' => \"App\\Cashbox\\Models\\Addition\", // related model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n\n // optional - force the related options to be a custom query, instead of all();\n 'options' => (function ($query) {\n return $query->orderBy('name', 'ASC')->get();\n }), // you can use this to filter the results show in the select\n ]);\n\n $this->crud->addField([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Заголовок',\n ]);\n $this->crud->addField([\n 'name' => 'position',\n 'type' => 'number',\n 'label' => 'Порядок',\n ]);\n $this->crud->addField([\n 'name' => 'is_active',\n 'type' => 'checkbox',\n 'label' => 'Активно',\n ]);\n\n if (!$this->crud->getRequest()->has('order')) {\n $this->crud->orderBy('created_at', 'desc');\n }\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "title": "" }, { "docid": "e5fbc853c8b9864dee6b58b4303cba8d", "score": "0.53167796", "text": "public function configure() {\n parent::configure();\n }", "title": "" }, { "docid": "d6c3a5152c1989b4483fe01a57b7f945", "score": "0.5310467", "text": "function configure()\n\t{\n\t\t// This method should be implemented by the\n\t\t// client specific object\n\n\t\t$this->_makeThisAbstractMethod('customise');\n\t}", "title": "" }, { "docid": "12a7abba6a4119f95f29334ff716d03c", "score": "0.53092873", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Slide');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/slide');\n $this->crud->setEntityNameStrings('slide', 'slides');\n\n /*\n |--------------------------------------------------------------------------\n | REORDERING\n |--------------------------------------------------------------------------\n */\n $this->crud->enableReorder('heading', 1);\n $this->crud->allowAccess('reorder');\n $this->crud->orderBy('lft');\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n\n $typeArray = [\n 'name' => 'type',\n 'label' => \"Type\",\n 'type' => 'select_from_array_conditional',\n 'options' => ['App\\Models\\Film' => 'Film', 'App\\Models\\Strand' => 'Strand', 'App\\Models\\Season' => 'Season', 'custom' => 'Custom'],\n 'allows_null' => false,\n // 'default' => 'App\\Models\\Strand',\n 'tab' => 'Link'\n ];\n\n $filmArray = [ // Select\n 'label' => \"Film\",\n 'type' => 'select',\n 'name' => 'film_id', // the db column for the foreign key\n 'entity' => 'film', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Film\", // foreign key model\n 'tab' => 'Link'\n ];\n\n $strandArray = [ // Select\n 'label' => \"Strand\",\n 'type' => 'select',\n 'name' => 'strand_id', // the db column for the foreign key\n 'entity' => 'strand', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Strand\", // foreign key model\n 'tab' => 'Link'\n ];\n\n $seasonArray = [ // Select\n 'label' => \"Season\",\n 'type' => 'select',\n 'name' => 'season_id', // the db column for the foreign key\n 'entity' => 'season', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Season\", // foreign key model\n 'tab' => 'Link'\n ];\n\n $activeArray = [\n 'name' => 'active',\n 'label' => 'Active?',\n 'type' => 'checkbox',\n 'tab' => 'Link'\n ];\n\n $activeColArray = [\n 'name' => 'active',\n 'label' => 'Active?',\n 'type' => 'toggle',\n 'route' => '/toggleactive'\n\n ];\n\n $customIntroArray = [\n 'name' => 'separator',\n 'type' => 'custom_html',\n 'value' => '<div class=\"well\">Values set here will override those pulled in automatically through content linking.</div>',\n 'tab' => 'Custom / Override'\n ];\n\n $headingArray = [\n 'name' => 'heading',\n 'label' => 'Heading',\n 'type' => 'text',\n 'tab' => 'Custom / Override'\n ];\n\n $preheadingArray = [\n 'name' => 'pretitle',\n 'label' => 'Pre-title',\n 'type' => 'text',\n 'tab' => 'Custom / Override',\n 'hint' => 'This is blank by default.',\n ];\n\n $subheadingArray = [\n 'name' => 'subheading',\n 'label' => 'Subtitle',\n 'type' => 'text',\n 'tab' => 'Custom / Override',\n 'hint' => 'For films this defaults to showing the date range of future screenings.'\n ];\n\n $urlArray = [\n 'name' => 'url',\n 'label' => 'URL',\n 'type' => 'text',\n 'tab' => 'Custom / Override'\n ];\n\n $thumbArray = [\n 'name' => 'thumb',\n 'label' => 'Thumbnail',\n 'type' => 'image',\n 'upload' => 'true',\n 'hint' => 'Thumbnails may be cropped on the site',\n 'aspect_ratio' => 0, // ommit or set to 0 to allow any aspect ratio\n 'crop' => true, // set to true to allow cropping, false to disable\n 'tab' => 'Custom / Override'\n ];\n\n $titleColumnArray = [\n 'name' => 'titlecolumn',\n 'label' => 'Title',\n 'type' => 'closure',\n 'function' => function($entry) {\n if($entry->heading) {\n return $entry->heading;\n }\n elseif(class_exists($entry->type)) {\n $this_related_id = ($entry[lcfirst(class_basename($entry->type)) . '_id']);\n $related_item = $entry->type::find($this_related_id);\n if($related_item) {\n return $entry->getTitle($related_item);\n }\n }\n else {\n return null;\n }\n }\n ];\n\n $this->crud->addFields([$typeArray,$filmArray,$seasonArray,$strandArray,$activeArray,$customIntroArray,$preheadingArray,$headingArray,$subheadingArray,$urlArray,$thumbArray], 'both');\n $this->crud->addColumns([$titleColumnArray,$typeArray,$activeColArray]);\n }", "title": "" }, { "docid": "ec1c1aec0a83db7653d6ff974df7e8f7", "score": "0.5305359", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(ChildRequest::class);\n\n $this->crud->addFields([[\n 'name' => 'name',\n 'label' => 'Nama'\n ], [\n 'name' => 'avatar_config',\n 'label' => 'Avatar',\n 'type' => 'avatar'\n ]]);\n\n // CRUD::setFromDb(); // fields\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number'])); \n */\n }", "title": "" }, { "docid": "e1142b2aa697d6927176f3f01bc7347d", "score": "0.5297724", "text": "protected function setupListOperation()\n {\n $this->crud->setColumns([\n [ \n 'name' => 'id',\n 'label' => '#',\n 'type' => 'text',\n ],\n [ \n // any type of relationship\n 'name' => 'Machine', // name of relationship method in the model\n 'type' => 'relationship',\n 'label' => 'Machine', // Table column heading\n 'attribute' => 'number', // foreign key attribute that is shown to user\n ],\n [ \n // any type of relationship\n 'name' => 'customer', // name of relationship method in the model\n 'type' => 'text',\n 'label' => 'Customer', // Table column heading\n 'attribute' => 'number', // foreign key attribute that is shown to user\n ],\n [ \n // any type of relationship\n 'name' => 'debit', // name of relationship method in the model\n 'type' => 'number',\n 'label' => 'Debit', // Table column heading\n ],\n [ \n // any type of relationship\n 'name' => 'credit', // name of relationship method in the model\n 'type' => 'number',\n 'label' => 'Credit', // Table column heading\n ],\n [ \n 'name' => 'created_at',\n 'label' => 'Created',\n 'type' => 'date',\n ],\n [ \n 'name' => 'collector',\n 'label' => 'Collector',\n 'type' => 'text',\n ],\n ]);\n }", "title": "" }, { "docid": "d869c1e4066a94c631e7c10a24bdf81e", "score": "0.529319", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\Resource');\n $this->crud->setRoute('admin/resource');\n $this->crud->setEntityNameStrings('resource', 'resources');\n\n $this->crud->operation(['create', 'update'], function () {\n $this->crud->addField([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Title',\n ]);\n\n $this->crud->addField([\n 'name' => 'file',\n 'label' => 'File',\n 'type' => 'upload',\n 'upload' => true,\n ]);\n });\n }", "title": "" }, { "docid": "eefca259ed1e6fbc22a7bd75ac1e3aaf", "score": "0.52877736", "text": "public function configure(DataTable $dataTable, array $options)\n {\n $dataTable->add('id', TextColumn::class, ['label' => '#', 'searchable' => false]);\n $dataTable->add('clave', TextColumn::class, ['label' => 'Clave', 'searchable' => true, 'leftExpr' => \"toUpper(c.clave)\", 'rightExpr' => function ($value) {\n return '%' . strtoupper($value) . '%';\n }]);\n $dataTable->add('valor', TextColumn::class, ['label' => 'Valor', 'className' => 'cell-breakWord', 'searchable' => true, 'leftExpr' => \"toUpper(c.valor)\", 'rightExpr' => function ($value) {\n return '%' . strtoupper($value) . '%';\n }]);\n if ($this->isGranted(('ROLE_EDITOR'))) {\n $dataTable->add('acciones', TextColumn::class, ['label' => 'Acciones', 'className' => 'text-center', 'render' => function ($value, $context) {\n return '&nbsp;&nbsp;<a href=\"' . $this->generateUrl('config_show', ['id' => $context->getId()]) . '\" title=\"Ver\"><i class=\"fas fa-eye\"></i></a>' .\n '&nbsp;&nbsp;<a href=\"' . $this->generateUrl('config_edit', ['id' => $context->getId()]) . '\" title=\"Editar\"><i class=\"fas fa-pen\"></i></a>';\n }]);\n }\n\n // Orden de la grilla\n $dataTable->addOrderBy('id', DataTable::SORT_ASCENDING);\n\n // Creo el adaptador que recoger los datos\n $dataTable->createAdapter(ORMAdapter::class, [\n 'entity' => Config::class,\n 'query' => function (QueryBuilder $builder) {\n $builder\n ->select('c')\n ->from(Config::class, 'c');\n }\n ]);\n }", "title": "" }, { "docid": "386c66911601d87c749655ca7f2b8fc3", "score": "0.52877617", "text": "protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'label' => \"Username\", // Table column heading\n 'name' => 'name', // The db column name\n 'type' => 'text'\n ], \n [\n 'label' => \"Nama Lengkap User\", // Table column heading\n 'name' => 'namaLengkap', // The db column name\n 'type' => 'text'\n ], \n [\n 'name' => 'fotoKtp', // The db column name\n 'label' => \"Foto KTP User\", // Table column heading\n 'type' => 'image',\n 'prefix' => '/uploads/images/fotoktp/'\n ], \n [\n 'label' => \"Nomor KTP User\", // Table column heading\n 'name' => 'nomorKtp', // The db column name\n 'type' => 'text'\n ], \n [\n 'label' => \"Nomor HP\", // Table column heading\n 'name' => 'noHp', // The db column name\n 'type' => 'text'\n ], \n [\n 'label' => \"Alamat User\", // Table column heading\n 'name' => 'alamat', // The db column name\n 'type' => 'text'\n ], \n [\n 'name' => 'confirmed', // The db column name\n 'label' => \"Confirmed\", // Table column heading\n 'type' => 'boolean',\n 'options' => [0 => 'Belum Verifikasi', 1 => 'Verifikasi']\n ], \n ]);\n // $this->crud->setColumns(['id','role_id','namaLengkap','fotoKtp']);\n }", "title": "" }, { "docid": "8b1eda5b6f5369180de9592dbe33c21f", "score": "0.5287664", "text": "protected function setupListOperation()\n {\n\n $this->crud->addColumn([\n 'name' => 'salle_id',\n 'type' => 'select',\n 'label' => \"Salle\",\n 'entity' => 'salle',\n 'attribute' => 'name',\n 'model' => Salles::class,\n ]);\n\n $this->crud->addColumn([\n 'name' => 'departement_id',\n 'type' => 'select',\n 'label' => \"departement\",\n 'entity' => 'departement',\n 'attribute' => 'name',\n 'model' => Departements::class,\n ]);\n $this->crud->addColumn([\n 'name' => 'date_start',\n 'label' => \"date debut\",\n 'type' => 'text'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'hour_start',\n 'label' => \"heure debut\",\n 'type' => 'text'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'date_end',\n 'label' => \"date fin\",\n 'type' => 'text'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'hour_end',\n 'label' => \"heure fin\",\n 'type' => 'text'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'hour_end',\n 'label' => \"heure fin\",\n 'type' => 'text'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'status_id',\n 'type' => 'select',\n 'label' => \"Status\",\n 'entity' => 'status',\n 'attribute' => 'name',\n ]);\n }", "title": "" }, { "docid": "bffa9fffcc79625fa942bf8691462014", "score": "0.528352", "text": "protected function setupListOperation()\n {\n $this->crud->addClause('where', 'keterangan', '!=', 'Absen lapangan');\n if (backpack_user()->role == \"staff\") {\n $this->crud->addClause('where', 'userid', '=', backpack_user()->Employee->userid);\n }\n $this->crud->removeButton('delete');\n\n $this->crud->addColumn([\n 'name' => 'userid',\n 'type' => 'select',\n 'entity' => 'user',\n 'attribute' => 'name',\n 'model' => 'App\\Models\\Employee',\n 'label' => 'Nama Karyawan'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'date',\n 'type' => 'date',\n 'label' => 'Tanggal'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'keterangan',\n 'type' => 'text',\n 'label' => 'Keterangan'\n ]);\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "title": "" }, { "docid": "ebc04a6d41e6beb81f814a22b958c4ad", "score": "0.52832216", "text": "public function setUp()\n {\n $this->crud->setModel('App\\Models\\Employee');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/employee');\n $this->crud->setEntityNameStrings(trans('pos.people.employee.employee'), trans('pos.people.employee.employees'));\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n $show_fields = [\n [\n // n-n relationship (with pivot table)\n 'label' => trans('pos.people.employee.role'), // Table column heading\n 'type' => \"select_multiple\",\n 'name' => 'roles', // the method that defines the relationship in your Model\n 'entity' => 'roles', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Role\", // foreign key model\n ],\n [\n // n-n relationship (with pivot table)\n 'label' => trans('pos.people.employee.extra_permissions'), // Table column heading\n 'type' => \"select_multiple\",\n 'name' => 'permissions', // the method that defines the relationship in your Model\n 'entity' => 'permissions', // the method that defines the relationship in your Model\n 'attribute' => \"name\", // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Permission\", // foreign key model\n ],\n ];\n\n //$this->crud->setFromDb();\n $this->crud->setCreateView('employees/create');\n $this->crud->setEditView('employees/edit');\n $this->crud->setShowView('employees/show');\n\n // ------ CRUD FIELDS\n $this->crud->addColumns($show_fields);\n $this->crud->addColumns(Person::getShowFields());\n \n // $this->crud->addField($options, 'update/create/both');\n // $this->crud->addFields($array_of_arrays, 'update/create/both');\n // $this->crud->removeField('name', 'update/create/both');\n // $this->crud->removeFields($array_of_names, 'update/create/both');\n\n // ------ CRUD COLUMNS\n // $this->crud->addColumn(); // add a single column, at the end of the stack\n // $this->crud->addColumns(); // add multiple columns, at the end of the stack\n // $this->crud->removeColumn('column_name'); // remove a column from the stack\n // $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack\n // $this->crud->setColumnDetails('column_name', ['attribute' => 'value']); // adjusts the properties of the passed in column (by name)\n // $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']);\n\n // ------ CRUD BUTTONS\n // possible positions: 'beginning' and 'end'; defaults to 'beginning' for the 'line' stack, 'end' for the others;\n // $this->crud->addButton($stack, $name, $type, $content, $position); // add a button; possible types are: view, model_function\n // $this->crud->addButtonFromModelFunction($stack, $name, $model_function_name, $position); // add a button whose HTML is returned by a method in the CRUD model\n // $this->crud->addButtonFromView($stack, $name, $view, $position); // add a button whose HTML is in a view placed at resources\\views\\vendor\\backpack\\crud\\buttons\n // $this->crud->removeButton($name);\n // $this->crud->removeButtonFromStack($name, $stack);\n\n // ------ CRUD ACCESS\n $this->crud->allowAccess(['list', 'create', 'update', 'reorder', 'delete','show']);\n // $this->crud->denyAccess(['list', 'create', 'update', 'reorder', 'delete']);\n\n // ------ CRUD REORDER\n // $this->crud->enableReorder('label_name', MAX_TREE_LEVEL);\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('reorder');\n\n // ------ CRUD DETAILS ROW\n // $this->crud->enableDetailsRow();\n // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('details_row');\n // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php\n\n // ------ REVISIONS\n // You also need to use \\Venturecraft\\Revisionable\\RevisionableTrait;\n // Please check out: https://laravel-backpack.readme.io/docs/crud#revisions\n // $this->crud->allowAccess('revisions');\n\n // ------ AJAX TABLE VIEW\n // Please note the drawbacks of this though:\n // - 1-n and n-n columns are not searchable\n // - date and datetime columns won't be sortable anymore\n // $this->crud->enableAjaxTable();\n\n // ------ DATATABLE EXPORT BUTTONS\n // Show export to PDF, CSV, XLS and Print buttons on the table view.\n // Does not work well with AJAX datatables.\n // $this->crud->enableExportButtons();\n\n // ------ ADVANCED QUERIES\n // $this->crud->addClause('active');\n // $this->crud->addClause('type', 'car');\n // $this->crud->addClause('where', 'name', '==', 'car');\n // $this->crud->addClause('whereName', 'car');\n // $this->crud->addClause('whereHas', 'posts', function($query) {\n // $query->activePosts();\n // });\n // $this->crud->addClause('withoutGlobalScopes');\n // $this->crud->addClause('withoutGlobalScope', VisibleScope::class);\n // $this->crud->with(); // eager load relationships\n // $this->crud->orderBy();\n // $this->crud->groupBy();\n // $this->crud->limit();\n }", "title": "" }, { "docid": "7f740c1fc8bc58548b1b5cec9c5a483f", "score": "0.5282246", "text": "public function setup()\n {\n $this->crud->setModel('App\\Models\\TreatmentType');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/treatmenttype');\n $this->crud->setEntityNameStrings(__('treatment type'), __('treatment types'));\n\n /*\n |--------------------------------------------------------------------------\n | BASIC CRUD INFORMATION\n |--------------------------------------------------------------------------\n */\n\n // ------ CRUD COLUMNS\n $this->crud->setColumns(['name', 'operation_time', 'total_expenses', 'total_operations', 'average_expense']);\n\n $this->crud->setColumnDetails('name', [\n 'label' => __('Name'),\n ]);\n\n $this->crud->setColumnDetails('operation_time', [\n 'label' => __('Operation Time'),\n ]);\n\n // ------ ADVANCED QUERIES\n $this->crud->query->selectRaw('treatment_type_id, sum(expense) as total_expenses, count(*) as total_operations, sum(expense) / count(*) as average')\n ->leftJoin('treatments', 'treatment_types.id', '=', 'treatments.treatment_type_id')\n ->groupBy('treatment_type_id');\n\n $this->crud->setColumnDetails('total_expenses', [\n 'name' => 'total_expenses',\n 'label' => __('Total Expenses'),\n 'type' => 'model_function',\n 'function_name' => 'getTotalExpensesValue',\n 'orderable' => true,\n 'orderLogic' => function ($query, $column, $direction) {\n return $query->orderBy('total_expenses', $direction);\n },\n ]);\n\n $this->crud->setColumnDetails('total_operations', [\n 'name' => 'total_operations',\n 'label' => __('Total Operations'),\n 'type' => 'model_function',\n 'function_name' => 'getTotalOperationsValue',\n 'orderable' => true,\n 'orderLogic' => function ($query, $column, $direction) {\n return $query->orderBy('total_operations', $direction);\n },\n ]);\n\n $this->crud->setColumnDetails('average_expense', [\n 'name' => 'average_expense',\n 'label' => __('Average Expense'),\n 'type' => 'model_function',\n 'function_name' => 'getOperationsAverageValue',\n 'orderable' => true,\n 'orderLogic' => function ($query, $column, $direction) {\n return $query->orderBy('average', $direction);\n },\n ]);\n\n // ------ CRUD FIELDS\n $this->crud->addField([\n 'label' => __('Name'),\n 'name' => 'name',\n 'type' => 'text',\n ]);\n\n $this->crud->addField([\n 'label' => __('Operation Time') . ' (hh:mm)',\n 'name' => 'operation_time',\n 'type' => 'time',\n 'default' => 0,\n 'attributes' => ['min' => 0, 'max' => 3 * 24 * 60],\n ]);\n\n // Filter\n $this->crud->addFilter([\n 'name' => 'expenses',\n 'type' => 'range',\n 'label' => __('Total Expenses'),\n 'label_from' => __('Min value'),\n 'label_to' => __('Max value'),\n ],\n true,\n function ($value) {\n $range = json_decode($value);\n\n $this->crud->query->whereHas('treatments', function ($query) use ($range) {\n $query->selectRaw('treatment_type_id, sum(expense) as total_expenses')\n ->groupBy(['treatment_type_id']);\n\n if (is_numeric($range->from)) {\n $query->having('total_expenses', '>=', $range->from);\n }\n\n if (is_numeric($range->to)) {\n $query->having('total_expenses', '<=', $range->to);\n }\n\n });\n });\n\n $this->crud->addFilter([\n 'name' => 'operations',\n 'type' => 'range',\n 'label' => __('Total Operations'),\n 'label_from' => __('Min value'),\n 'label_to' => __('Max value'),\n ],\n true,\n function ($value) {\n $range = json_decode($value);\n\n $this->crud->query->whereHas('treatments', function ($query) use ($range) {\n $query->selectRaw('treatment_type_id, count(*) as total_operations')\n ->groupBy(['treatment_type_id']);\n\n if (is_numeric($range->from)) {\n $query->having('total_operations', '>=', $range->from);\n }\n\n if (is_numeric($range->to)) {\n $query->having('total_operations', '<=', $range->to);\n }\n\n });\n });\n\n // ------ CRUD ACCESS\n if (!is('admin')) {\n $this->crud->denyAccess(['list', 'create', 'update', 'delete']);\n }\n\n // ------ DATATABLE EXPORT BUTTONS\n $this->crud->enableExportButtons();\n\n // add asterisk for fields that are required in TreatmentTypeRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }", "title": "" }, { "docid": "4af9640792d7d5804b055f5ed0545d44", "score": "0.52818155", "text": "public function configure()\n {\n parent::configure();\n\n // Change the carpool id to hidden, since it is already set.\n $this->setWidget('carpool_id',new sfWidgetFormInputHidden());\n }", "title": "" }, { "docid": "381e4be64514ee78eb8dc2771ac99c2a", "score": "0.5278916", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(AcountRequest::class);\n $this->crud->setOperationSetting('contentClass', 'col-md-12 bold-labels');\n $this->crud->addFields([\n [ \n 'name' => 'debit',\n 'label' => 'Debit',\n 'type' => 'text',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n\n ],\n [ \n 'name' => 'credit',\n 'label' => 'Credit',\n 'type' => 'text',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ],\n [ // relationship\n 'type' => \"relationship\",\n 'name' => 'machine_id', // the method on your model that defines the relationship\n 'label' => \"Machine\",\n 'attribute' => \"number\", // foreign key attribute that is shown to user (identifiable attribute)\n 'placeholder' => \"Select a Machine\", // placeholder for the select2 input\n\n ],\n ]); \n\n }", "title": "" }, { "docid": "e723d694e8218d97b5151bd8086aeb48", "score": "0.52752197", "text": "public function init() {\r\n\t\t$this->trash = false;\r\n\t\t$this->gridTitle = 'Компании';\r\n\t\t//$this->where = 'active=1';\r\n\r\n\t\t$this->gridActionName = 'companies';\r\n\t\t$this->table = \"Db_Companies\";\r\n\t\t$this->fields = array(\r\n\t\t\t'id' => new ArOn_Crud_Grid_Column_Numeric('Id',null,true,false,'50'),\r\n\t\t\t//'languages_id' => new ArOn_Crud_Grid_Column_JoinOne(\"Язык выставки\",array('Db_Lang_CompaniesData'),'languages_id',null,false,'200'),\r\n\t\t\t'description' => new ArOn_Crud_Grid_Column_JoinOne(\"Описание компании\",array('Db_Lang_CompaniesData'),'description',null,false,'200'),\r\n\t\t\t//'brands_languages_id' => new ArOn_Crud_Grid_Column_JoinOne(\"Язык бренда\",array('Db_Lang_BrandsData'),'languages_id',null,false,'200'),\r\n\t\t\t'name' => new ArOn_Crud_Grid_Column_JoinOne(\"Название компании\",array('Db_Lang_CompaniesData'),'name',null,false,'200'),\r\n\t\t\t'regions_id' => new ArOn_Crud_Grid_Column_JoinOne(\"Регион\",array('Db_LocationCities','Db_LocationCountries'),'regions_id',null,false,'200'),\r\n\t\t\t'countries_id' => new ArOn_Crud_Grid_Column_JoinOne(\"Страна\",array('Db_LocationCities'),'countries_id',null,false,'200'),\r\n\t\t\t'cities_id' => new ArOn_Crud_Grid_Column_Numeric(\"Город\",null,true,false,'50'),\r\n\t\t\t//'active' => new ArOn_Crud_Grid_Column_Numeric('Активный',null,true,false,'50'),\r\n\t\t\t'category' => new ArOn_Crud_Grid_Column_JoinOne('Категория', array('Db_Companies2Categories', 'Db_BrandsCategories'), null, array('id')),\r\n\t\t\t'logo' => new ArOn_Crud_Grid_Column_Numeric(\"Город\",null,true,false,'50'),\r\n\r\n\t\t\t'active' => new ArOn_Crud_Grid_Column_JoinOne(\"Активный\",array('Db_CompaniesActive'),'active',null,false,'200'),\r\n\t\t\t'news_count'=>new ArOn_Crud_Grid_Column_JoinOne(\"Количество новостей\",array('Db_Lang_CompaniesData'),'news_count',null,false,'200'),\r\n\t\t\t'services_count'=>new ArOn_Crud_Grid_Column_JoinOne(\"Количество продуктов и сервисов\",array('Db_Lang_CompaniesData'),'services_count',null,false,'200'),\r\n\t\t);\r\n\t\t//$this->fields['active']->options = array('1'=>\"+\", '0'=>\"-\");\r\n\r\n\t\t$this->filters->setPrefix(false);\r\n\t\t$this->filters->fields = array(\r\n\t\t\t'search' => new ArOn_Crud_Grid_Filter_Field_Search('search','Язык бренда',array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_Lang_CompaniesData'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'name' => ArOn_Db_Filter_Search::LIKE,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t\t'region' => new ArOn_Crud_Grid_Filter_Field_Search('regions_id','Регион', array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_LocationCities','Db_LocationCountries'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'regions_id' => ArOn_Db_Filter_Search::EQ,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t\t'country' => new ArOn_Crud_Grid_Filter_Field_Search('countries_id','Страна',array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_LocationCities'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'countries_id' => ArOn_Db_Filter_Search::EQ,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t\t'city' => new ArOn_Crud_Grid_Filter_Field_Value('cities_id','Город',ArOn_Db_Filter_Field::EQ),\r\n\t\t\t'logo' => new ArOn_Crud_Grid_Filter_Field_Value('logo','Город',ArOn_Db_Filter_Field::EQ),\r\n\t\t\t'languages_id' => new ArOn_Crud_Grid_Filter_Field_Search('languages_id','Язык выставки',array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_Lang_CompaniesData'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'languages_id' => ArOn_Db_Filter_Search::EQ,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t\t'category' => new ArOn_Crud_Grid_Filter_Field_Select2('id','Категория', 'Db_BrandsCategories', array('Db_Companies2Categories', 'Db_BrandsCategories')),\r\n\t\t\t'active_languages_id' => new ArOn_Crud_Grid_Filter_Field_Search('active_languages_id','Язык выставки',array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_CompaniesActive'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'languages_id' => ArOn_Db_Filter_Search::EQ,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t\t'active' => new ArOn_Crud_Grid_Filter_Field_Search('active','Язык выставки',array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'path' => array('Db_CompaniesActive'),\r\n\t\t\t\t\t'filters' => array(\r\n\t\t\t\t\t\t'active' => ArOn_Db_Filter_Search::EQ,\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t)),\r\n\t\t);\r\n\t\t$this->_params['languages_id'] = DEFAULT_LANG_ID;\r\n\t\t$this->_params['active_languages_id'] = DEFAULT_LANG_ID;\r\n\t\t$this->_params['active'] = 1;\r\n\r\n\t\tparent::init();\r\n\t}", "title": "" } ]
cb639d34a9323363bc159b2c86a826cb
/ Returns permissions for a certain type
[ { "docid": "43518c20a1754e4fd5d81f48d522feb1", "score": "0.0", "text": "function getGrantedItems($gperm_name, $id = null) {\n global $xoopsUser;\n static $permissions;\n\n if (!isset($permissions[$gperm_name]) || ($id != null && !isset($permissions[$gperm_name][$id]))) {\n\n $smartModule =& $this->handler->getModuleInfo();\n\n if (is_object($smartModule)) {\n\n //Get group permissions handler\n $gperm_handler =& xoops_gethandler('groupperm');\n\n //Get user's groups\n $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);\n\n //Get all allowed item ids in this module and for this user's groups\n $userpermissions =& $gperm_handler->getItemIds($gperm_name, $groups, $smartModule->getVar('mid'));\n $permissions[$gperm_name] = $userpermissions;\n }\n }\n //Return the permission array\n return isset($permissions[$gperm_name]) ? $permissions[$gperm_name] : array();\n }", "title": "" } ]
[ { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.76303977", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.76303977", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.76303977", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.76303977", "text": "public function getPermissions();", "title": "" }, { "docid": "2f7d12d53f76e5c14667ae5b5351602b", "score": "0.7305141", "text": "public abstract function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.72809833", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.72809833", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.72809833", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.72809833", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.72809833", "text": "public function permissions();", "title": "" }, { "docid": "0da6188cc75499dc970d1658205d2d3a", "score": "0.7210877", "text": "public function getPermissions()\n {\n }", "title": "" }, { "docid": "55befd9081f35ff59de4fa4f823f2df6", "score": "0.71340835", "text": "public function getPermissions(): array;", "title": "" }, { "docid": "55befd9081f35ff59de4fa4f823f2df6", "score": "0.71340835", "text": "public function getPermissions(): array;", "title": "" }, { "docid": "d84a03cc9b9be605255d55fba408f3f1", "score": "0.7037803", "text": "public static function permissions()\n {\n return Permissions::_get();\n }", "title": "" }, { "docid": "d2ea6b3946afa913a52291d8b150c5ec", "score": "0.69142616", "text": "protected function buildPermissions(NodeType $type) {\n $type_id = $type->id();\n $type_params = ['%type_name' => $type->label()];\n\n return [\n \"grant any $type_id content permissions\" => [\n 'title' => $this->t('%type_name: grant access permissions on any content', $type_params),\n ],\n \"grant own $type_id content permissions\" => [\n 'title' => $this->t('%type_name: grant access permissions on own content (author)', $type_params),\n ],\n ];\n }", "title": "" }, { "docid": "47ef3f412c5e27d028ce52ef9c4b644c", "score": "0.6839943", "text": "public function getPermissions(): int;", "title": "" }, { "docid": "99d4634fa6e055f5c07223b0f3b4f913", "score": "0.68357885", "text": "public function getPermissionType()\n {\n return $this->permissionType;\n }", "title": "" }, { "docid": "9e520b31811ef2fc08830a8c8c9889c4", "score": "0.68162036", "text": "public function permissions()\n {\n return $this->http->get('permissions');\n }", "title": "" }, { "docid": "270af934e127df37588d0c5d7494fe5f", "score": "0.6813741", "text": "public function permissions() {\n return array(\n \"my first prog permission\" => array(\n 'title' => \"This is my first prog permission\",\n ),\n \"my second prog permission\" => array(\n 'title' => \"This is my second prog permission\",\n ),\n );\n }", "title": "" }, { "docid": "97878dc67d5ec963019070d8ca78e198", "score": "0.6792072", "text": "public function getPermission() : string{\n\t\treturn \"blocksniper.type.\" . strtolower(TypeRegistration::getTypeById(self::ID, true));\n\t}", "title": "" }, { "docid": "b10dc3104ef4240393fd613fdba9d96d", "score": "0.67681676", "text": "public static function hasPermissions($permissions,$type){\n try{\n if($permissions == \"\"){\n return true;\n }else{\n if(self::allPermissions($permissions) == false){\n return \"fail\";\n }\n if(!empty($type)){\n if( !empty($permissions[$type]) && $permissions[$type] == 1 ){\n return [$type => true];\n }\n return \"fail\";\n }\n }\n }catch(Exception $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "600d3250a6aa38fd3d98ae89ec8bc69d", "score": "0.672747", "text": "private function nodePermissions(NodeType $type) {\n // Build standard list of node permissions for this type.\n $id = $type->id();\n $perms = [\n \"create $id content on assigned domains\" => [\n 'title' => $this->t('%type_name: Create new content on assigned domains', ['%type_name' => $type->label()]),\n ],\n \"update $id content on assigned domains\" => [\n 'title' => $this->t('%type_name: Edit any content on assigned domains', ['%type_name' => $type->label()]),\n ],\n \"delete $id content on assigned domains\" => [\n 'title' => $this->t('%type_name: Delete any content on assigned domains', ['%type_name' => $type->label()]),\n ],\n ];\n\n return $perms;\n }", "title": "" }, { "docid": "a620f2f982a1a55dd41a448a191a3575", "score": "0.67225915", "text": "protected function buildPermissions(NodeType $type) {\n $type_id = $type->id();\n $type_params = array('%type_name' => $type->label());\n\n return array(\n \"view any unpublished $type_id content\" => array(\n 'title' => $this->t('%type_name: View any unpublished content', $type_params),\n ),\n );\n }", "title": "" }, { "docid": "ec4695e4633f2eb24c3546b48eee3eaa", "score": "0.6722273", "text": "public function getPermission($user = null, $type, $name) {\r\n if (is_null($user)) {\r\n $user = Engine_Api::_()->user()->getViewer();\r\n }\r\n $level_id = ($user->getIdentity()) ? $user->level_id : 5;\r\n $listingtypePermission = Engine_Api::_()->getDbTable('memberlevelpermission', 'ynmultilisting')->getAllowed($type, $level_id, $name, $this->getIdentity());\r\n if (empty($listingtypePermission)) {\r\n $value = Engine_Api::_()->authorization()->getAdapter('levels')->getAllowed($type, $level_id, $name);\r\n\t\t if (is_null($value)) {\r\n $permissionsTable = Engine_Api::_()->getDbtable('permissions', 'authorization');\r\n $row = $permissionsTable->fetchRow($permissionsTable->select()\r\n ->where('level_id = ?', $level_id)\r\n ->where('type = ?', $type)\r\n ->where('name = ?', $name));\r\n if ($row) {\r\n $value = $row->value;\r\n }\r\n }\r\n return $value;\r\n }\r\n else {\r\n if (in_array($name, array('auth_view', 'auth_comment', 'auth_share', 'auth_photo', 'auth_video', 'auth_discussion'))) {\r\n $listingtypePermission[$name] = json_decode($listingtypePermission[$name]);\r\n }\r\n return $listingtypePermission[$name];\r\n }\r\n }", "title": "" }, { "docid": "24a1712135655dcd3a0e317ba5cdb466", "score": "0.6718487", "text": "private function getPermissions()\n {\n if (class_exists($permissions = PermissionModel::class)) {\n $results = new $permissions();\n if ($results instanceof BaseModel) {\n $perms = $results->getRepo()->findAll();\n if (is_array($perms) && count($perms) > 0) {\n return $perms;\n }\n }\n }\n }", "title": "" }, { "docid": "5b90dedc4ace0ba031f8481471f7cee8", "score": "0.67109233", "text": "public static function getPermission($controller_type, $controller_id = null, $return = false){\n if (Auth::guest()) {\n $user = app('\\Bootleg\\Cms\\User')->find(1); //select the guest row.\n } else {\n $user = Auth::user();\n }\n $controller_type = trim($controller_type, '/\\\\');\n\n //$controller_type = (addslashes($controller_type));\n\n //$p = Permission::where('controller_type', $controller_type)->first();\n\n //dd($p->id);\n\n\n //a horrible looking query that grabs the permissions for a user.\n $perm = Permission::where(function ($query) use ($controller_type, $controller_id) {\n $query->where('controller_type', '=', $controller_type)\n ->where(function ($query) use ($controller_id) {\n $query->where('controller_id', '=', $controller_id)\n ->orWhere('controller_id', '=', '*');\n });\n })\n ->where(function ($query) use ($user) {\n $query->where(function ($query) use ($user) { //where user\n $query->where(function ($query) use ($user) {\n $query->where('requestor_id', '=', $user->id)\n ->orWhere('requestor_id', '=', '*');\n })\n ->where('requestor_type', '=', 'user');\n })\n ->orWhere(function ($query) use ($user) { //where role\n $query->where(function ($query) use ($user) {\n $query->where('requestor_id', '=', $user->role_id)\n ->orWhere('requestor_id', '=', '*');\n })\n ->where('requestor_type', '=', 'role');\n });\n })\n ->where(function ($query) {\n $app_id = Application::getApplication()->id;\n $query->where('application_id',$app_id)\n ->orWhere('application_id', '*');\n })\n ->orderBy('controller_id', 'desc')\n ->orderBy('requestor_id', 'desc')\n ->orderBy('requestor_type', 'desc')\n ->get();\n\n //dd($perm);\n\n $return = new stdClass();\n $return->result = false;\n foreach ($perm as $p) {\n if ($p->x == 1) {\n $return->result = true;\n $return->picked = $p;\n break;\n } elseif ($p->x == 0) {\n $return->result = false;\n $return->picked = $p;\n break;\n } else {\n //var_dump($p->id);\n //we are inheriting from the enxt level up.\n }\n }\n\n $return->set = $perm;\n return($return);\n }", "title": "" }, { "docid": "d76e09f7dcce0ef9465135572508059b", "score": "0.67085284", "text": "public function getPermissionsByCategory($cat);", "title": "" }, { "docid": "4df47dc2878ff8252bafe5bc2f1156c4", "score": "0.6670623", "text": "function showPermissions () {\r\n\t$query = \"SELECT permissionID, permissionName, permissionDesc FROM permissions\";\r\n\t$res = returnQuery($query);\r\n\r\n\twhile ( $row =& $res->fetchRow() ) {\r\n\t\t$permissionLevels[] = array($row[0], $row[1], $row[2]);\r\n\t}\r\n\t$res->free();\r\n\r\n\treturn $permissionLevels;\r\n\r\n/*\tswitch ($clearance) {\r\n\tcase 1:\r\n\t return ('User can <strong>change page content</strong>, <strong>send email</strong>, and <strong>manage user accounts</strong> (add, remove and modify)');\r\n\tcase 2:\r\n\t return ('User can <strong>change page content</strong> and <strong>send email</strong>');\r\n\tcase 3:\r\n\t return ('User can only <strong>change page content</strong>');\r\n\tcase 12:\r\n\t return ('This user only has access to .htpasswd-protected files');\r\n\t}\r\n*/\r\n}", "title": "" }, { "docid": "27c9ef7b0797796400c6e6c24f058ff7", "score": "0.6659068", "text": "public function getPermissionCategories();", "title": "" }, { "docid": "1a452dac14f8a793cc2b53a03a666a2b", "score": "0.6614102", "text": "public function allPermissions()\n {\n return [];\n }", "title": "" }, { "docid": "2c9bc8a6a38b1525bbf863effa0c7d46", "score": "0.6610609", "text": "function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( !isset($user) ) return Dataface_PermissionsTool::READ_ONLY();\n // if the user is null then nobody is logged in... read only\n $role = $user->val('Role');\n return Dataface_PermissionsTool::getRolePermissions($role);\n // Returns all of the permissions for the user's current role.\n }", "title": "" }, { "docid": "87a9d261fbb4c955249eb719a24cdbd8", "score": "0.65809965", "text": "public function permissionsGet()\n\t{\n\t\t$return = FALSE;\n\t\t\n\t\t$sql = \"\n\t\tSELECT \n\t\t\tp.alias AS alias\n\t\tFROM \n\t\t\tcommon_UserToPermission a2p\n\t\tJOIN common_Permissions p ON\n\t\t\tp.permission_id = a2p.permission_id \n\t\tWHERE \n\t\t\ta2p.user_id = \" . $this->m_user_id;\n\t\t\n\t\t$result = $this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t\n\t\tif( $this->m_common->m_db->numRows( $result ) > 0 )\n\t\t{\n\t\t\t$return = array();\n\t\t\twhile( $row = $this->m_common->m_db->fetchAssoc( $result ) )\n\t\t\t{\n\t\t\t\t$return[] = strtolower( $row['alias'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\t\t\n\t}", "title": "" }, { "docid": "6525052808f2f0d2ffb98ab8bea66f5c", "score": "0.6572616", "text": "public function getHotelPermissionAction()\n {\n $type = intval($this->getParamList('type'));\n if ($type > 0) {\n $list = Enum_HotelAdministrator::getPermission($type);\n } else {\n $list = Enum_HotelAdministrator::getPermission();\n }\n $this->echoSuccessData(array('list' => $list));\n }", "title": "" }, { "docid": "ed727dc7d74ed98055c173798ffcf24f", "score": "0.6552472", "text": "public function getPermissionByAccessTypeHelper($access_type, $permission, $current_company_id, $user) {\n try {\n\n $access = $this->generateAccessList($access_type, [], $user->x5_contact_id, $access_overwrite = false, $access_model = false, $user->company_id);\n\n return $this->generateListByAccess($access_type, $permission, $access, $current_company_id);\n } catch (Exception $e) {\n $this->postLogs(config('errorcontants.access_control'), $e);\n throw new Exception($e->getMessage(), 401);\n }\n }", "title": "" }, { "docid": "a7b13c0a03010df78a02305cf29c0488", "score": "0.6546164", "text": "public function getPermission(): string;", "title": "" }, { "docid": "f001d91461071e93b7518e2cd708f594", "score": "0.6536159", "text": "public function permissions() {\n $perms = array();\n // Generate view unpublished permissions for all node types.\n foreach (NodeType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n\n return $perms;\n }", "title": "" }, { "docid": "b8902ab4c0f9ffa0cce2e7d665abf402", "score": "0.65335256", "text": "public function index()\n {\n $this->authorize('security.permissions.index');\n return response()->json(\n Permission::orderBy('category', 'asc')->get()\n );\n }", "title": "" }, { "docid": "3f507d534f89381151c061102a3e403d", "score": "0.65092736", "text": "function ticket_cat_permissions($querybit='', $type = 'all') {\n\n\tglobal $user, $cache2;\n\n\t$a = explode(',', $user['cats_admin']);\n\t$b = explode(',', $user['cats_user']);\n\n\tif ($type == 'all') {\n\t\t$restrict = array_merge($a, $b);\n\t} elseif ($type == 'user') {\n\t\t$restrict = $b;\n\t} elseif ($type == 'admin') {\n\t\t$restrict = $a;\n\t}\n\n\t$add_restrict = array();\n\n\tforeach ($restrict as $catid) {\n\t\tif ($catid != 0) {\n\t\t\t$add_restrict = array_merge($add_restrict, $cache2->getCategoryChildren($catid));\n\t\t}\n\t}\n\n\t$restrict = array_unique(array_merge($add_restrict, $restrict));\n\n\t// return if no elements\n\t$restrict = array_remove_empty($restrict);\n\tif (!is_array($restrict)) {\n\t\treturn;\n\t}\n\n\t// make a query if that is what we are doing\n\tif ($querybit) {\n\t\treturn \" $querybit \" . array2sql($restrict);\n\t}\n\n\t// otherwise we are returning the array\n\treturn $restrict;\n\n}", "title": "" }, { "docid": "88c8a44988ba5391c53911e797061fc3", "score": "0.64933294", "text": "public function index()\n {\n return PermissionResource::collection(Permission::all());\n }", "title": "" }, { "docid": "1f44ff998e8e733577439ce50439307d", "score": "0.64803356", "text": "public function permissions() {\n $permissions = [];\n\n foreach ($this->handlerManager->getDefinitions() as $id => $info) {\n $params = [\n '%type' => $info['label'],\n ];\n\n $permissions += [\n \"create $id places\" => [\n 'title' => $this->t('Create new %type places', $params),\n ],\n \"edit own $id places\" => [\n 'title' => $this->t('Edit own %type places', $params),\n ],\n \"edit any $id places\" => [\n 'title' => $this->t('Edit any %type places', $params),\n ],\n \"delete own $id places\" => [\n 'title' => $this->t('Delete own %type places', $params),\n ],\n \"delete any $id places\" => [\n 'title' => $this->t('Delete any %type places', $params),\n ],\n ];\n }\n\n return $permissions;\n }", "title": "" }, { "docid": "872bce94704cf06214a1048b41f6dfdd", "score": "0.646666", "text": "function getPermissions($params=array()){\n\t\t$params['record'] =& $this;\n\t\treturn $this->_table->getPermissions($params);\n\t}", "title": "" }, { "docid": "dfd084b29096e2dcb36ccec1e3873a43", "score": "0.64663917", "text": "public function permissionsFor($member);", "title": "" }, { "docid": "ffeb47f95e6449ab96bab64f71c09c05", "score": "0.64615446", "text": "private function _permissions()\n {\n if (!self::$permissions) {\n if ($id = $this->options->fromCode(self::BBN_ACCESS, self::BBN_PERMISSIONS, self::BBN_APPUI)) {\n self::_set_permissions($id);\n }\n }\n\n return self::$permissions;\n }", "title": "" }, { "docid": "dc03b92560b2f86245e462df193bf7b0", "score": "0.6458803", "text": "public function permissions()\n {\n return DB::table('permissions')\n ->join('permission_role', 'permission_role.permission_id', '=', 'permissions.id')\n ->join('organization_role_users', 'organization_role_users.role_id', '=', 'permission_role.role_id')\n ->where('organization_role_users.organization_id', $this->current_organization_id)\n ->where('organization_role_users.user_id', $this->id)\n ->get();\n }", "title": "" }, { "docid": "d5407add1ada075e1d90b6006b90fce4", "score": "0.6443319", "text": "private function stats_permissions() {\r\n\t\t// Network admin is Super Man.\r\n\t\tif ( $this->is_network() ) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\r\n\t\t$network = false;\r\n\r\n\t\t// Check if network options should be considered.\r\n\t\tif ( Helpers\\General::is_networkwide() ) {\r\n\t\t\t// Can sub sites override.\r\n\t\t\t$network = ! (bool) beehive_analytics()->settings->get( 'overwrite_cap', 'permissions', true );\r\n\t\t}\r\n\r\n\t\t// Get the custom capability.\r\n\t\t$custom_cap = beehive_analytics()->settings->get( 'custom_cap', 'permissions', $network );\r\n\r\n\t\treturn array(\r\n\t\t\t'has_custom_cap' => ! empty( $custom_cap ) && current_user_can( $custom_cap ) ? 1 : 0,\r\n\t\t\t'dashboard' => Helpers\\Permission::user_report_caps( 'dashboard', $network ),\r\n\t\t\t'statistics' => Helpers\\Permission::user_report_caps( 'statistics', $network ),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "53cf28ae8ec415a4c88fbce790f47b8e", "score": "0.6438049", "text": "function getPermissions(&$record){\n\t\t$auth =& Dataface_AuthenticationTool::getInstance();\n\t\t$user =& $auth->getLoggedInUser();\n\t\tif ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();\n\t\t// if the user is null then nobody is logged in... no access.\n\t\t// This will force a login prompt.\n\t\t$role = $user->val('Role');\n\t\treturn Dataface_PermissionsTool::getRolePermissions($role);\n\t\t// Returns all of the permissions for the user's current role.\n\t}", "title": "" }, { "docid": "5d0348b9324ca5309fb08e6c24b88ac5", "score": "0.64178634", "text": "public function getAllPermissions(){\r\n\r\n\t\t$Result = new Result();\t\r\n\t\t$Result = $this->_RoleDAO->getAllPermissions();\r\n\t\t\r\n\t\tif(!$Result->getIsSuccess())\r\n\t\t\t$Result->setResultObject(\"Database failure in RoleDAO.getAllPermissions()\");\t\t\r\n\r\n\t\treturn $Result;\r\n\t}", "title": "" }, { "docid": "0d94254b90a41e684cffa134a961b42a", "score": "0.6407941", "text": "public function getPermissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "2b5165668dfade0cdfbcb24e5bc3f012", "score": "0.64014864", "text": "private function getListingPermission(EckEntityType $entity_type) {\n return [\n \"access {$entity_type->id()} entity listing\" => [\n 'title' => $this->t('Access %type_name listing page', ['%type_name' => $entity_type->label()]),\n ],\n ];\n }", "title": "" }, { "docid": "94a70c3f0d1cf3aa4066544cdae74c7d", "score": "0.6398423", "text": "private function getPermissions()\n {\n //dd(Permission::with('roles')->get());\n //return Permission::with('roles')->get();\n return Permission::all();\n }", "title": "" }, { "docid": "82e54a0a4898ebdd437ec1fa322ea684", "score": "0.6386861", "text": "function mod_access($type)\n{\n global $cat;\n\n // Allow people without a stored session to read\n $arrStats[LEVEL] = 0;\n if (isset($GLOBALS[\"objSrcUser\"]))\n {\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n $arrStats = $objSrcUser->get_stats();\n }\n\n switch($type)\n {\n case 0:\n // Give elders moderator powers\n if ($arrStats[TYPE] == 'elder' || $arrStats[TYPE] == 'coelder')\n $needed = 0;\n else\n $needed = 2;\n break;\n case 1: // staff101\n $needed = 5;\n break;\n case 3: // news\n $needed = 6;\n break;\n case 8: // dragon\n $needed = 6;\n break;\n default:\n $needed = 2;\n }\n\n if ($arrStats[LEVEL] >= $needed)\n return TRUE;\n else\n return FALSE;\n}", "title": "" }, { "docid": "4acd21581748cf3df0aea5072f7537c1", "score": "0.63802576", "text": "public function getPermission($permission);", "title": "" }, { "docid": "55bff4225d1ae3ac888c906ab9b7b5f2", "score": "0.63488066", "text": "public function providePermissions();", "title": "" }, { "docid": "417d34915f0dc885dfe986cce11419cf", "score": "0.6343324", "text": "private function _app_user_can($priv_type)\n\t{\n\t\tforeach ($this->_table->get_permissions() as $perm) {\n\t\t\t$columns = explode(',', $perm['column_names']);\n\t\t\t$can_column = $perm['column_names']=='*' OR in_array($this->_name, $columns);\n\t\t\t$can_permission = $perm['permission']=='*' OR stripos($perm['permission'], $priv_type)!==FALSE;\n\t\t\t$can_identifier = $perm['identifier']=='*'\n\t\t\t\tOR $perm['identifier']==Auth::instance()->get_user()\n\t\t\t\tOR Auth::instance()->logged_in($perm['identifier']);\n\t\t\tif ($can_column AND $can_permission AND $can_identifier) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "dbbe8ef3380be5708809c3ece708ec03", "score": "0.6338601", "text": "public function getTypePermissions(): array {\n $perms = [];\n // Load an instance of the entity type specified in the concrete class.\n $entityType = \\Drupal::entityTypeManager()->getStorage($this->getEntityTypeId())->getEntityType();\n $perms += $this->buildEntityAdminPermission($entityType);\n\n // Returns the name of the bundle type or NULL.\n $entityTypeBundle = $entityType->getBundleEntityType();\n if (!empty($entityTypeBundle)) {\n /* @var \\Drupal\\custom_entity_tools\\Entity\\EntityBundleBase $bundleType */\n $bundleType = \\Drupal::entityTypeManager()->getStorage($entityTypeBundle)->getEntityType()->getOriginalClass();\n /* @var \\Drupal\\custom_entity_tools\\Entity\\EntityBundleBaseType $entityType */\n foreach ($bundleType::loadMultiple() as $entityType) {\n $bundleOf = $entityType->getEntityType()->getBundleOf();\n $key = $bundleOf . \" \" . $entityType->id();\n $perms += $this->buildEntityPermissions($key, $entityType->label());\n }\n }\n else {\n $perms += $this->buildEntityPermissions($entityType->id(), $entityType->getLabel());\n }\n\n return $perms;\n }", "title": "" }, { "docid": "463542e8f9139b43f188f33a343ef77b", "score": "0.63244295", "text": "function getAllPermissons()\n {\n $permissions = Cache::read('permissions');\n if (empty($permissions)) {\n $permissions = $this->loadobjToCache('permissions');\n }\n\n return $permissions;\n }", "title": "" }, { "docid": "c5248820c6a628462e306bcfd6b04965", "score": "0.6312792", "text": "private function access_allowed( $page, $type )\n\t{\n\t\t$user = User::identify();\n\t\t$require_any = array();\n\t\t$result = false;\n\n\t\tswitch ( $page ) {\n\t\t\tcase 'comment':\n\t\t\tcase 'comments':\n\t\t\tcase 'ajax_comments':\n\t\t\tcase 'ajax_in_edit':\n\t\t\tcase 'ajax_update_comment':\n\t\t\t\t$require_any = array( 'manage_all_comments' => true, 'manage_own_post_comments' => true );\n\t\t\t\tbreak;\n\n\t\t\tcase 'tags':\n\t\t\tcase 'ajax_tags':\n\t\t\tcase 'ajax_get_tags':\n\t\t\t\t$require_any = array( 'manage_tags' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'options':\n\t\t\t\t$require_any = array( 'manage_options' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'themes':\n\t\t\t\t$require_any = array( 'manage_themes' => true, 'manage_theme_config' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'activate_theme':\n\t\t\t\t$require_any = array( 'manage_themes' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'preview_theme':\n\t\t\t\t$require_any = array( 'manage_themes' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'plugins':\n\t\t\t\t$require_any = array( 'manage_plugins' => true, 'manage_plugins_config' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'plugin_toggle':\n\t\t\t\t$require_any = array( 'manage_plugins' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'import':\n\t\t\t\t$require_any = array( 'manage_import' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'users':\n\t\t\tcase 'ajax_update_users':\n\t\t\tcase 'ajax_users':\n\t\t\t\t$require_any = array( 'manage_users' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'user':\n\t\t\t\t$require_any = array( 'manage_users' => true, 'manage_self' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'groups':\n\t\t\tcase 'group':\n\t\t\tcase 'ajax_update_groups':\n\t\t\tcase 'ajax_groups':\n\t\t\t\t$require_any = array( 'manage_groups' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'logs':\n\t\t\tcase 'ajax_delete_logs':\n\t\t\tcase 'ajax_logs':\n\t\t\t\t$require_any = array( 'manage_logs' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'publish':\n\t\t\tcase 'ajax_media':\n\t\t\tcase 'ajax_media_panel':\n\t\t\tcase 'ajax_media_upload':\n\t\t\t\t$type = Post::type_name( $type );\n\t\t\t\t$require_any = array(\n\t\t\t\t\t'post_any' => array( ACL::get_bitmask( 'create' ), ACL::get_bitmask( 'edit' ) ),\n\t\t\t\t\t'post_' . $type => array( ACL::get_bitmask( 'create' ), ACL::get_bitmask( 'edit' ) ),\n\t\t\t\t\t'own_posts' => array( ACL::get_bitmask( 'create' ), ACL::get_bitmask( 'edit' ) ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'delete_post':\n\t\t\t\t$type = Post::type_name( $type );\n\t\t\t\t$require_any = array(\n\t\t\t\t\t'post_any' => ACL::get_bitmask( 'delete' ),\n\t\t\t\t\t'post_' . $type => ACL::get_bitmask( 'delete' ),\n\t\t\t\t\t'own_posts' => ACL::get_bitmask( 'delete' ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'posts':\n\t\t\tcase 'ajax_posts':\n\t\t\tcase 'ajax_update_posts':\n\t\t\t\t$require_any = array(\n\t\t\t\t\t'post_any' => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),\n\t\t\t\t\t'own_posts' => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),\n\t\t\t\t);\n\t\t\t\tforeach ( Post::list_active_post_types() as $type => $type_id ) {\n\t\t\t\t\t$require_any['post_' . $type] = array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'sysinfo':\n\t\t\t\t$require_any = array( 'super_user' => true );\n\t\t\t\tbreak;\n\t\t\tcase 'dashboard':\n\t\t\tcase 'ajax_dashboard':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_add_block':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_delete_block':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'configure_block':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_save_areas':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'locale':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'admin_ajax':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_facets':\n\t\t\t\t$result = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$require_any = Plugins::filter( 'admin_access_tokens', $require_any, $page, $type );\n\n\n\t\tforeach ( $require_any as $token => $access ) {\n\t\t\t$access = Utils::single_array( $access );\n\t\t\tforeach ( $access as $mask ) {\n\t\t\t\tif ( is_bool( $mask ) && $user->can( $token ) ) {\n\t\t\t\t\t$result = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telseif ( $user->can( $token, $mask ) ) {\n\t\t\t\t\t$result = true;\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$result = Plugins::filter( 'admin_access', $result, $page, $type );\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "298baff29abde23c766aa96aa560dff4", "score": "0.63093436", "text": "public function permissionsIndex()\n {\n return QueryBuilder::for(Permission::select('id', 'name'))\n ->allowedIncludes(['users', 'roles'])\n ->paginate(100)\n ->appends(request()->query());\n }", "title": "" }, { "docid": "41828c142575e27db80627718fafd542", "score": "0.6306854", "text": "public function getPermissions(){\n\t\treturn '';\n\t}", "title": "" }, { "docid": "070d2537ce4138757baef4617707ce43", "score": "0.6298135", "text": "function getPermissions(&$record){\r\n\t\t//Check if the user is logged in & what their permissions for this table are.\r\n\t\tif( isUser() ){\r\n\t\t\t$userperms = get_userPerms('accounts_payable');\r\n\t\t\tif($userperms == \"view\")\r\n\t\t\t\treturn Dataface_PermissionsTool::getRolePermissions(\"READ ONLY\"); //Assign Read Only Permissions\r\n\t\t\telseif($userperms == \"edit\" || $userperms == \"post\"){\r\n\t\t\t\t//Check status, determine if record should be uneditable.\r\n\t\t\t\tif ( isset($record) && $record->val('post_status') == 'Posted')\r\n\t\t\t\t\t\treturn Dataface_PermissionsTool::getRolePermissions('NO_EDIT_DELETE');\r\n\t\t\t\treturn Dataface_PermissionsTool::getRolePermissions(myRole()); //Assign Permissions based on user Role (typically USER)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Default: No Access\r\n\t\treturn Dataface_PermissionsTool::NO_ACCESS();\r\n\t}", "title": "" }, { "docid": "351df4c7add53fc92293c655194d632b", "score": "0.6280211", "text": "public function getPermissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "351df4c7add53fc92293c655194d632b", "score": "0.6280211", "text": "public function getPermissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "351df4c7add53fc92293c655194d632b", "score": "0.6280211", "text": "public function getPermissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "a8091d6e912fc41552e7f7512e1bb44c", "score": "0.62756115", "text": "public function permissions(){\n $permissions = Permission::orderBy('name', 'ASC')->get();\n $modules = ModuleManager::orderBy('module_name', 'ASC')->get();\n return view('backend.admin.permissions', ['permissions'=>$permissions, 'modules'=>$modules]);\n }", "title": "" }, { "docid": "bbf6083d2c85cce94dc843addebbe76e", "score": "0.6274973", "text": "protected function getPermissions() {\n return [\n 'pmmi sales agent administration' => $this->t('Administer sales agent directory'),\n 'pmmi sales agent favorites' => $this->t(\"Access to 'My favorites' page\"),\n 'pmmi sales agent search' => $this->t('Use sales agent directory search'),\n ];\n }", "title": "" }, { "docid": "502b931244c9b663b2cca687b0f6ba59", "score": "0.6272678", "text": "public function messageTypePermissions() {\n $perms = [];\n // Generate message permissions for all message types.\n foreach (MessageType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n return $perms;\n }", "title": "" }, { "docid": "5580749a4e31116963ce170d678a9479", "score": "0.6266741", "text": "function get_permissions()\n\t{\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,true);\n\t\t$output=array();\n\t\tforeach (array_keys($groups) as $group_id)\n\t\t{\n\t\t\t$value=post_param_integer('access_'.$group_id,0);\n\t\t\t$output[$group_id]=$value;\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "865289f0a2676fba1083bfb85cc19ee1", "score": "0.62401736", "text": "public function permission($name)\n {\n return Permission::where('module_name',$name)->get();\n }", "title": "" }, { "docid": "243f73f944eeafb4c8f450346d5fd0dd", "score": "0.62371", "text": "public function permissions()\n {\n }", "title": "" }, { "docid": "8131fa5f29d7a1f0c75fcbbcbfe11e8d", "score": "0.623397", "text": "public function getPermissions()\n\t{\n\t\treturn $this->permissions;\n\t}", "title": "" }, { "docid": "42ec7baf3e1f2426cc60b60604bd4240", "score": "0.6233211", "text": "function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();\n }", "title": "" }, { "docid": "6c236ca8a65015276ee118feca78ee7e", "score": "0.62297386", "text": "public function get_all_permissions()\n\t{\n\t\treturn \\Config::get('ethanol_permissions');\n\t}", "title": "" }, { "docid": "a3f4839a8e0d9470efa0f153cb85911f", "score": "0.62267876", "text": "public function permissions()\n {\n return new PermissionsResponse($this->connector->request('get', '/permissions', $this->query));\n }", "title": "" }, { "docid": "20fc6bd17f700cc5ec8e10430d928b26", "score": "0.6213981", "text": "public function getPermissions()\n\t{\n\t\treturn $this->withDisabled()->rolesQuery()->first()['pivot']['permissions'];\n\t}", "title": "" }, { "docid": "6475ebd75ef67a9ed08865e5110f90f4", "score": "0.62118196", "text": "public function permissionType()\n {\n return $this->belongsTo('App\\SYS\\SPermissionType');\n }", "title": "" }, { "docid": "79157b85d7a2140cda7eccbbd2bce2cf", "score": "0.6203701", "text": "public function getPermissions()\n {\n return $this->config->get('rbac.permissions');\n }", "title": "" }, { "docid": "967b873103b454d2f911706ec8ec089e", "score": "0.62009346", "text": "public function nodeTypePermissions() {\n $perms = [];\n // Generate node permissions for all node types.\n foreach (NodeType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n\n return $perms;\n }", "title": "" }, { "docid": "e147c24fb9e4dec9e26da6f8f25f4c90", "score": "0.6199554", "text": "function can_access_from_url($type = \"view\")\n {\n $slug = Request::segment(1) . \"_\" . Request::segment(2);\n // $type = \"add\" / \"view\"/ \"edit\"/ \"delete\"\n $find_menu = Menu::where(\"slug\", $slug)->first();\n if (!is_null(Auth::user())) {\n if (Auth::user()->id_role == 1) {\n return true;\n } else if (isset($find_menu->id)) {\n // cek permission\n $check_permission = Permission::where(\"id_menu\", $find_menu->id)\n ->where($type, 1)\n ->where(\"id_role\", Auth::user()->id_role)\n ->first();\n if (isset($check_permission->id)) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "c5148d2888405d71d684b8ed34c16325", "score": "0.61958945", "text": "function _buildtapas_content_permissions_loop($types, $perms) {\n\n\t\n\t$result = array();\n\n\tforeach ($types as $type) {\n\t\tforeach ($perms as $perm) {\n\t\t\t$result[] = \"$perm $type content\";\n\t\t}\n\t}\n\n\treturn $result;\n\n}", "title": "" }, { "docid": "6e98bca5fc57d0906f3a2227b83c8b0e", "score": "0.6186721", "text": "public function drawPermissionTypeView() {\n $this->load->model('permission/permission_type_model');\n $column = array('id_permission_type', 'permission_type', 'permission_type_icon', 'added_date', 'added_time');\n $viewpermissionType = $this->permission_type_model->fetchFromAnyTable(\"tbl_permission_type\", null, null, $column, 10000, 0, \"RESULTSET\", array('permission_type_status' => 1), \"added_date\");\n\n $this->template->draw('permission/permissionTypeView', false, $viewpermissionType);\n }", "title": "" }, { "docid": "caa1ee3f18e3a131b861244ce7f5d6d0", "score": "0.6183515", "text": "public function getPermissions() {\n\t\treturn $this->permissions;\n\t}", "title": "" }, { "docid": "9ecb9a0975f20455d22edf8ef2f1f775", "score": "0.6182696", "text": "private function buildPermissions(EckEntityType $eck_type) {\n return array_merge(\n $this->getCreatePermission($eck_type),\n $this->getEditPermissions($eck_type),\n $this->getListingPermission($eck_type)\n );\n }", "title": "" }, { "docid": "2beb10e6e9e1232d1b4a55847452f061", "score": "0.6182575", "text": "public static function get()\n {\n return self::$permissions;\n }", "title": "" }, { "docid": "fee30b3fb860cb5e6cfb9fc23049330c", "score": "0.6176321", "text": "private function getRights()\n {\n //====================================================================//\n // Permissions\n $rights = array(); // Permission array used by this module\n $index = 0;\n\n $rights[$index][0] = 9201; // id de la permission\n $rights[$index][1] = 'Lire les Données'; // libelle de la permission\n $rights[$index][2] = 'r'; // type de la permission (deprecie a ce jour)\n $rights[$index][3] = 1; // La permission est-elle une permission par defaut\n $rights[$index][4] = 'lire';\n $index++;\n\n $rights[$index][0] = 9202; // id de la permission\n $rights[$index][1] = 'Creer/modifier des données'; // libelle de la permission\n $rights[$index][2] = 'w'; // type de la permission (deprecie a ce jour)\n $rights[$index][3] = 0; // La permission est-elle une permission par defaut\n $rights[$index][4] = 'creer';\n $index++;\n\n $rights[$index][0] = 9203; // id de la permission\n $rights[$index][1] = 'Modifier les paramètres du Module'; // libelle de la permission\n $rights[$index][2] = 'w'; // type de la permission (deprecie a ce jour)\n $rights[$index][3] = 0; // La permission est-elle une permission par defaut\n $rights[$index][4] = 'creer';\n $index++;\n\n $rights[$index][0] = 9204; // id de la permission\n $rights[$index][1] = 'Supprimer des données'; // libelle de la permission\n $rights[$index][2] = 'd'; // type de la permission (deprecie a ce jour)\n $rights[$index][3] = 0; // La permission est-elle une permission par defaut\n $rights[$index][4] = 'supprimer';\n $index++;\n\n return $rights;\n }", "title": "" }, { "docid": "f2e19b72c9cb86f4b6da13ff5d03126d", "score": "0.61747974", "text": "public function permissions(): array\n\t{\n\t\treturn $this->permissionModel->getPermissions();\n\t}", "title": "" }, { "docid": "360c9bd3fc4ff87888148d55dda5c670", "score": "0.617016", "text": "private function loadPermissions() {\n\t\t// see if cached\n\t\t$key = 'permissions-' . getlastmod();\n\t\tif ($this->isCached($key, true) AND $this->isCached('roles', true)) {\n\t\t\t$this->permissions = $this->getCached($key, true);\n\t\t\t$this->roles = $this->getCached('roles', true);\n\t\t\treturn;\n\t\t}\n\n\t\t// build permissions\n\t\t$this->permissions = [\n\t\t\tP_PUBLIC => $this->createPermStr(0, 0), // Iedereen op het Internet\n\t\t\tP_LOGGED_IN => $this->createPermStr(0, 1), // Eigen profiel raadplegen\n\t\t\tP_ADMIN => $this->createPermStr(0, 1 + 2), // Super-admin\n\t\t\tP_VERJAARDAGEN => $this->createPermStr(1, 1), // Verjaardagen van leden zien\n\t\t\tP_PROFIEL_EDIT => $this->createPermStr(1, 1 + 2), // Eigen gegevens aanpassen\n\t\t\tP_LEDEN_READ => $this->createPermStr(1, 1 + 2 + 4), // Gegevens van leden raadplegen\n\t\t\tP_OUDLEDEN_READ => $this->createPermStr(1, 1 + 2 + 4 + 8), // Gegevens van oudleden raadplegen\n\t\t\tP_LEDEN_MOD => $this->createPermStr(1, 1 + 2 + 4 + 8 + 16), // (Oud)ledengegevens aanpassen\n\t\t\tP_FORUM_READ => $this->createPermStr(2, 1), // Forum lezen\n\t\t\tP_FORUM_POST => $this->createPermStr(2, 1 + 2), // Berichten plaatsen op het forum en eigen berichten wijzigen\n\t\t\tP_FORUM_MOD => $this->createPermStr(2, 1 + 2 + 4), // Forum-moderator mag berichten van anderen wijzigen of verwijderen\n\t\t\tP_FORUM_BELANGRIJK => $this->createPermStr(2, 8), // Forum belangrijk (de)markeren [[let op: niet cumulatief]]\n\t\t\tP_FORUM_ADMIN => $this->createPermStr(2, 16), // Forum-admin mag deel-fora aanmaken en rechten wijzigen [[let op: niet cumulatief]]\n\t\t\tP_AGENDA_READ => $this->createPermStr(3, 1), // Agenda bekijken\n\t\t\tP_AGENDA_ADD => $this->createPermStr(3, 1 + 2), // Items toevoegen aan de agenda\n\t\t\tP_AGENDA_MOD => $this->createPermStr(3, 1 + 2 + 4), // Items beheren in de agenda\n\t\t\tP_DOCS_READ => $this->createPermStr(4, 1), // Documenten-rubriek lezen\n\t\t\tP_DOCS_POST => $this->createPermStr(4, 1 + 2), // Documenten verwijderen of erbij plaatsen\n\t\t\tP_DOCS_MOD => $this->createPermStr(4, 1 + 2 + 4), // Documenten aanpassen\n\t\t\tP_ALBUM_READ => $this->createPermStr(5, 1), // Foto-album bekijken\n\t\t\tP_ALBUM_DOWN => $this->createPermStr(5, 1 + 2), // Foto-album downloaden\n\t\t\tP_ALBUM_ADD => $this->createPermStr(5, 1 + 2 + 4), // Fotos uploaden en albums toevoegen\n\t\t\tP_ALBUM_MOD => $this->createPermStr(5, 1 + 2 + 4 + 8), // Foto-albums aanpassen\n\t\t\tP_ALBUM_DEL => $this->createPermStr(5, 1 + 2 + 4 + 8 + 16), // Fotos uit fotoalbum verwijderen\n\t\t\tP_BIEB_READ => $this->createPermStr(6, 1), // Bibliotheek lezen\n\t\t\tP_BIEB_EDIT => $this->createPermStr(6, 1 + 2), // Bibliotheek wijzigen\n\t\t\tP_BIEB_MOD => $this->createPermStr(6, 1 + 2 + 4), // Bibliotheek zowel wijzigen als lezen\n\t\t\tP_NEWS_POST => $this->createPermStr(7, 1), // Nieuws plaatsen en wijzigen van jezelf\n\t\t\tP_NEWS_MOD => $this->createPermStr(7, 1 + 2), // Nieuws-moderator mag berichten van anderen wijzigen of verwijderen\n\t\t\tP_NEWS_PUBLISH => $this->createPermStr(7, 1 + 2 + 4), // Nieuws publiceren en rechten bepalen\n\t\t\tP_MAAL_IK => $this->createPermStr(8, 1), // Jezelf aan en afmelden voor maaltijd en eigen abo wijzigen\n\t\t\tP_MAAL_MOD => $this->createPermStr(8, 1 + 2), // Maaltijden beheren (MaalCie P)\n\t\t\tP_MAAL_SALDI => $this->createPermStr(8, 1 + 2 + 4), // MaalCie saldo aanpassen van iedereen (MaalCie fiscus)\n\t\t\tP_CORVEE_IK => $this->createPermStr(9, 1), // Eigen voorkeuren aangeven voor corveetaken\n\t\t\tP_CORVEE_MOD => $this->createPermStr(9, 1 + 2), // Corveetaken beheren (CorveeCaesar)\n\t\t\tP_CORVEE_SCHED => $this->createPermStr(9, 1 + 2 + 4), // Automatische corvee-indeler beheren\n\t\t\tP_MAIL_POST => $this->createPermStr(10, 1), // Berichten aan de courant toevoegen\n\t\t\tP_MAIL_COMPOSE => $this->createPermStr(10, 1 + 2), // Alle berichtjes in de courant bewerken en volgorde wijzigen\n\t\t\tP_MAIL_SEND => $this->createPermStr(10, 1 + 2 + 4), // Courant verzenden\n\t\t\tP_PEILING_VOTE => $this->createPermStr(11, 1), // Stemmen op peilingen\n\t\t\tP_PEILING_EDIT => $this->createPermStr(11, 1 + 2), // Peilingen aanmaken en eigen peiling bewerken\n\t\t\tP_PEILING_MOD => $this->createPermStr(11, 1 + 2 + 4), // Peilingen aanmaken en verwijderen\n\t\t\tP_FISCAAT_READ => $this->createPermStr(12, 1), // Fiscale dingen inzien\n\t\t\tP_FISCAAT_MOD => $this->createPermStr(12, 1 + 2), // Fiscale bewerkingen maken\n\t\t\tP_ALBUM_PUBLIC_READ => $this->createPermStr(13, 1), // Publiek foto-album bekijken\n\t\t\tP_ALBUM_PUBLIC_DOWN => $this->createPermStr(13, 1 + 2), // Publiek foto-album downloaden\n\t\t\tP_ALBUM_PUBLIC_ADD => $this->createPermStr(13, 1 + 2 + 4), // Publieke fotos uploaden en publieke albums toevoegen\n\t\t\tP_ALBUM_PUBLIC_MOD => $this->createPermStr(13, 1 + 2 + 4 + 8), // Publiek foto-albums aanpassen\n\t\t\tP_ALBUM_PUBLIC_DEL => $this->createPermStr(13, 1 + 2 + 4 + 8 + 16), // Fotos uit publiek fotoalbum verwijderen\n\t\t];\n\t\t/**\n\t\t * Deze waarden worden samengesteld uit bovenstaande permissies en\n\t\t * worden in de gebruikersprofielen gebruikt als aanduiding voor\n\t\t * welke permissie-groep (Role) de gebruiker in zit (max. 1 momenteel).\n\t\t */\n\t\t$p = $this->permissions;\n\n\t\t// Permission Assignment:\n\t\t$this->roles = [];\n\n\t\t// use | $p[] for hierarchical RBAC (inheritance between roles)\n\t\t// use & ~$p[] for constrained RBAC (separation of duties)\n\n\t\t$this->roles[AccessRole::Nobody] = $p[P_PUBLIC] | $p[P_FORUM_READ] | $p[P_ALBUM_PUBLIC_READ];\n\t\t$this->roles[AccessRole::Eter] = $this->roles[AccessRole::Nobody] | $p[P_LOGGED_IN] | $p[P_PROFIEL_EDIT] | $p[P_MAAL_IK] | $p[P_AGENDA_READ];\n\t\t$this->roles[AccessRole::Lid] = $this->roles[AccessRole::Eter] | $p[P_OUDLEDEN_READ] | $p[P_FORUM_POST] | $p[P_DOCS_READ] | $p[P_BIEB_READ] | $p[P_CORVEE_IK] | $p[P_MAIL_POST] | $p[P_NEWS_POST] | $p[P_ALBUM_ADD] | $p[P_ALBUM_PUBLIC_DOWN] | $p[P_PEILING_VOTE] | $p[P_PEILING_EDIT];\n\t\t$this->roles[AccessRole::Oudlid] = $this->roles[AccessRole::Lid];\n\t\t$this->roles[AccessRole::Fiscaat] = $this->roles[AccessRole::Lid] | $p[P_FISCAAT_READ] | $p[P_FISCAAT_MOD];\n\t\t$this->roles[AccessRole::MaalCie] = $this->roles[AccessRole::Fiscaat] | $p[P_MAAL_MOD] | $p[P_CORVEE_MOD] | $p[P_MAAL_SALDI];\n\t\t$this->roles[AccessRole::BASFCie] = $this->roles[AccessRole::Lid] | $p[P_DOCS_MOD] | $p[P_ALBUM_PUBLIC_DEL] | $p[P_ALBUM_DEL] | $p[P_BIEB_MOD];\n\t\t$this->roles[AccessRole::Bestuur] = $this->roles[AccessRole::BASFCie] | $this->roles[AccessRole::MaalCie] | $p[P_LEDEN_MOD] | $p[P_FORUM_MOD] | $p[P_DOCS_MOD] | $p[P_AGENDA_MOD] | $p[P_NEWS_MOD] | $p[P_MAIL_COMPOSE] | $p[P_ALBUM_DEL] | $p[P_MAAL_MOD] | $p[P_CORVEE_MOD] | $p[P_MAIL_COMPOSE] | $p[P_FORUM_BELANGRIJK] | $p[P_PEILING_MOD];\n\t\t$this->roles[AccessRole::PubCie] = $this->roles[AccessRole::Bestuur] | $p[P_ADMIN] | $p[P_MAIL_SEND] | $p[P_CORVEE_SCHED] | $p[P_FORUM_ADMIN];\n\t\t$this->roles[AccessRole::ForumModerator] = $this->roles[AccessRole::Lid] | $p[P_FORUM_MOD];\n\n\t\t// save in cache\n\t\t$this->setCache($key, $this->permissions, true);\n\t\t$this->setCache('roles', $this->roles, true);\n\t}", "title": "" }, { "docid": "16d3401f0d5681e7222b18da5dd22679", "score": "0.6168277", "text": "public function availablePermissions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "9b5a50533a295a7a3ead065c44a22d9e", "score": "0.61646754", "text": "public function getPermissionDescription();", "title": "" }, { "docid": "a56805ee67b51adadb32260ccc57af9a", "score": "0.6157366", "text": "public function getAll()\n {\n return $this->permission->all();\n }", "title": "" }, { "docid": "3dbb4243957ddc85b14815d04a223aad", "score": "0.61569875", "text": "public function getPermissionNames();", "title": "" }, { "docid": "7e311e446ddc9089fe9ad3b247f053e5", "score": "0.6154263", "text": "public function permissionChecker();", "title": "" }, { "docid": "ad7c4c925dc485da5b25b6b04d93fa0f", "score": "0.61522865", "text": "public function get_permission_select()\n\t{\n\t\t$list = $this->recursive_permission_select(\\Config::get('ethanol_permissions'));\n\t\tsort($list);\n\t\treturn array_combine($list, $list);\n\t}", "title": "" }, { "docid": "3555a1a66cd98a9610586fe4850b5d6e", "score": "0.6139983", "text": "public function getPermissionCode();", "title": "" }, { "docid": "4d353a56f4e4fd8671757697610b64ea", "score": "0.6139296", "text": "public static function getPermissionList()\n {\n\n $arrPermissions = self::join('permission_role', 'permissions.id', '=', 'permission_role.permission_id')\n ->join('roles', 'roles.id', '=', 'permission_role.role_id')\n ->select('roles.id', 'roles.name', 'permissions.display_name', 'permission_role.permission_id')\n ->groupBY('roles.name');\n\n return $arrPermissions;\n }", "title": "" }, { "docid": "2181ee30aabe2533d696ee2cf4b39869", "score": "0.61310345", "text": "public function getAllPermissionsBits();", "title": "" }, { "docid": "834c0a48f9b505440432c5bb886004b6", "score": "0.61298025", "text": "public function getByType($type) {\n switch ($type) {\n case 'nsf': $sql = ROLE_GETALL_NSF; break;\n case 'local': $sql = ROLE_GETALL_LOCAL; break;\n default: throw new Exception(\"Type must be 'nsf' or 'local'\");\n }\n\n return $this->makeEntityArray('Role', $sql);\n }", "title": "" }, { "docid": "4b04f86e30e286acb967489a919b409f", "score": "0.61235356", "text": "public function HostingControlPanelEntityTypePermissions() {\n $perms = array();\n // Generate node permissions for all node types.\n foreach (HostingControlPanelEntityType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n\n return $perms;\n }", "title": "" }, { "docid": "bee33d4922418512f0cac5d938595219", "score": "0.61206776", "text": "public function uiSourcePermissions($source_type,$source_id){\n //$sid=$source_type.':'.$source_id;\n $permissions=DB::table('permissions')\n ->where('source_type',$source_type)\n ->where('source_id',$source_id)\n ->get();\n $temp=[];\n foreach($permissions as $perm){\n\n if($perm->user_id){\n $perm->data_id=$perm->user_id;\n $user=DB::table('users')->select(['name','email'])->where('id',$perm->user_id)->first();\n $perm->name=$user->name;\n $perm->isGroup=0;\n $perm->email=$user->email;\n \n }elseif($perm->user_group_id){\n $perm->data_id=$perm->user_group_id;\n $user_group=DB::table('user_groups')->select('name')->where('id',$perm->user_group_id)->first();\n $perm->name=$user_group->name;\n $perm->isGroup=1;\n $perm->email='group';\n }else{\n $perm->name='*Unknown*';\n $perm->isGroup='';\n }\n $temp[]=$perm;\n }\n $permissions=$temp;\n return $permissions;\n }", "title": "" }, { "docid": "56c832812cfa284fd8b2eaf890efddbf", "score": "0.61177444", "text": "public function permissions()\n {\n $permissions = $this->morphToMany(\n Config::get('laratrust.models.permission'),\n 'user',\n Config::get('laratrust.tables.permission_user'),\n Config::get('laratrust.foreign_keys.user'),\n Config::get('laratrust.foreign_keys.permission')\n );\n\n if (Config::get('laratrust.use_teams')) {\n $permissions->withPivot(Config::get('laratrust.foreign_keys.team'));\n }\n\n return $permissions;\n }", "title": "" }, { "docid": "289727bc8b36a163de6bc3986823640a", "score": "0.6110643", "text": "public function permissions()\n {\n $this->loadPermissions();\n\n return $this->permissions;\n }", "title": "" }, { "docid": "00ba65eb6ad21eb0834139b25ee58ee0", "score": "0.6107218", "text": "public function permissions()\n {\n try\n {\n return $this->hasMany('App\\AclPermission', 'role_id');\n }\n catch (Exception $e)\n {\n return false;\n }\n }", "title": "" } ]
27a8b148f877163780106742d1af9c20
Returns a workflow in a storable format.
[ { "docid": "cb750d71515833ece189ff2eb17b966c", "score": "0.6984968", "text": "public function createStorableWorkflow(WorkflowInterface $workflow);", "title": "" } ]
[ { "docid": "39193b8d66f4348de677746081202085", "score": "0.6931466", "text": "public function getStorableWorkflowList();", "title": "" }, { "docid": "153c7badacd6b1a304a882ada2cbb354", "score": "0.62430644", "text": "public function getWorkflowData();", "title": "" }, { "docid": "0f31ba8478e5beb2b9a171715cce299b", "score": "0.6191775", "text": "public function getWorkflow()\n {\n return $this->workflow;\n }", "title": "" }, { "docid": "6a88029defe259c09216c71e407f9dd8", "score": "0.5920475", "text": "public function workflow($workflow) {\n $path = sprintf(\"environments/%s/workflows\", $this->name);\n $data = array(\n 'type' => $workflow,\n 'environment' => $this->name,\n );\n $options = array('body'=>json_encode($data), 'headers'=> array('Content-type'=>'application/json'));\n $response = \\Terminus_Command::request('sites', $this->site->getId(), $path, 'POST', $options);\n\n return $response['data'];\n }", "title": "" }, { "docid": "e0ca1ecd95317b2d69ba4c8e29fd5973", "score": "0.5837287", "text": "public function createStorableWorkflowList(array $workflowList);", "title": "" }, { "docid": "79ae71d65bf8989d811184cddea4f38a", "score": "0.5814936", "text": "public function getSaveToStream()\n {\n return $this->save_to_stream;\n }", "title": "" }, { "docid": "b70670e4951db34c794db472e5a774f0", "score": "0.5702597", "text": "function save()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\r\n\r\n\t\trequire_once JPATH_COMPONENT.DS.'libs'.DS.'JSON.php';\r\n\t\t\r\n\t\t$params = JRequest::getVar( 'params', array(), 'post', 'array');\r\n\t\t$params['stations'] = array();\r\n\t\t\t\r\n\t\t$json = new Services_JSON();\r\n\t\t$stations = $json->decode($params['workflowData']);\t\r\n\t\tforeach($stations as $s){\r\n\t\t\t$obj = $json->decode($s);\r\n\t\t\t$activeHooks = array();\r\n\t\t\tforeach($obj->activeHooks as $key => $hook){\r\n\t\t\t\t$activeHooks[$hook->name] = $hook;\r\n\t\t\t\tunset($obj->activeHooks[$key]->name);\r\n\t\t\t}\r\n\t\t\t$obj->activeHooks = base64_encode(serialize($activeHooks)); \r\n\t\t\t$params['stations'][] = $obj;\r\n\t\t}\r\n\r\n\r\n\t\t// Get/Create Our model\r\n\t\t$model = & $this->getModel('workflow');\r\n\t\t\r\n\t\t//Send to the model to for saving\r\n\t\t$id = $model->save( $params );\r\n\t\t\r\n\t\t\r\n\t\tif( !$id ){\r\n\t\t\t$this->setRedirect('index.php?option=com_jwf', JText::_('Failed to save the workflow'), 'error');\r\n\t\t} else {\r\n\t\t\t$this->setRedirect('index.php?option=com_jwf', JText::_('Workflow saved'));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "20b45fb72e31ba0059d290242e6261cf", "score": "0.5653232", "text": "public function getWorkflowState()\n {\n return $this->workflowState;\n }", "title": "" }, { "docid": "20b45fb72e31ba0059d290242e6261cf", "score": "0.5653232", "text": "public function getWorkflowState()\n {\n return $this->workflowState;\n }", "title": "" }, { "docid": "181f83c8fa4e9dbe715582c82df6de1a", "score": "0.5641429", "text": "public function getWorkflow()\n {\n $service = $this->getService();\n $service->readWorkflowInformation(\n $service->createId( self::TYPE, $this->getProperty()->id ) );\n \n if( $service->isSuccessful() )\n {\n if( isset( $service->getReply()->readWorkflowInformationReturn->workflow ) )\n return new p\\Workflow(\n $service->getReply()->readWorkflowInformationReturn->\n workflow, $service );\n else\n return NULL; // no workflow\n }\n else\n {\n throw new e\\NullAssetException( \n S_SPAN . c\\M::READ_WORKFLOW_FAILURE . E_SPAN );\n }\n }", "title": "" }, { "docid": "1d38344b1a86d789666a77f1e3a70a5f", "score": "0.5497864", "text": "public function workflow()\n {\n return $this->belongsTo(Workflow, 'workflow_id');\n }", "title": "" }, { "docid": "f00e5e2685e5259b81381f2c816cf055", "score": "0.54392076", "text": "public function create() {\n return view('workflows.create');\n }", "title": "" }, { "docid": "70c3c0ef42e65ec85ba748199ec527b6", "score": "0.54287666", "text": "public function store(WorkflowRequest $request)\n {\n // persist the workflow\n // Auth::user()->pages()->create($request->all);\n\n $workflow = \\Auth::user()->workflows()->create($request->all());\n\n /* $workflow = Workflow::create($request->all()); */\n\n return view('steps.create')->with(compact('workflow'));\n }", "title": "" }, { "docid": "6585857fffce35061f55569076ec6584", "score": "0.5426836", "text": "public function getWorkflow($id)\r\n {\r\n $fields = []; \r\n $workflow = $this->repository\r\n ->pushCriteria(app('Litepie\\Repository\\Criteria\\RequestCriteria'))\r\n ->scopeQuery(function ($query) use($id){\r\n return $query->whereId($id)->orderBy('id', 'DESC');\r\n })->first();\r\n\r\n if (empty($workflow) || $workflow->status <> 'pending' ) {\r\n return $this->theme->layout('blank')->of('workflow::admin.workflow.error', compact('workflow'))->output();\r\n } \r\n\r\n if($workflow->workflowable->addInfo($workflow->action) ){\r\n $view = $workflow->workflowable->workflow['steps'][$workflow->action]['addlinfo'];\r\n if (!strpos( $view, '::' )) {\r\n $view = 'workflow::admin.workflow.'.$view;\r\n }\r\n \r\n $this->response->title(trans('workflow::workflow.names').' :: ');\r\n return $this->theme->layout('blank')->of('workflow::admin.workflow.public', compact('workflow', 'view'))->output();\r\n }\r\n\r\n return $this->workflow($workflow, []);\r\n }", "title": "" }, { "docid": "49f9b01862c1c883b979adb49a69e6b3", "score": "0.5376774", "text": "public function getLatestworkflow()\n {\n $this->data['latestWorkflows'] = false;\n $this->generatelatestworkflow();\n echo View::make('dashboard/latestworkflow',$this->data)->render();\n }", "title": "" }, { "docid": "96de018d88650b3a2a5f48e4940fddb6", "score": "0.53759587", "text": "function getWorkflowContainer();", "title": "" }, { "docid": "9ffc55088a282274fceb99d77f0dcaae", "score": "0.53345937", "text": "public static function stream()\n {\n self::$STEAM = OperateStream::getInstance();\n return self::$STEAM;\n }", "title": "" }, { "docid": "9663bc5143c4fb2002889f5a171e0650", "score": "0.53178144", "text": "public function serialize() {\n $user = 'Pantheon';\n if (isset($this->get('user')->email)) {\n $user = $this->get('user')->email;\n }\n if ($this->get('total_time')) {\n $elapsed_time = $this->get('total_time');\n } else {\n $elapsed_time = time() - $this->get('created_at');\n }\n\n $operations_data = [];\n foreach ($this->operations() as $operation) {\n $operations_data[] = $operation->serialize();\n }\n\n $data = [\n 'id' => $this->id,\n 'env' => $this->get('environment'),\n 'workflow' => $this->get('description'),\n 'user' => $user,\n 'status' => $this->getStatus(),\n 'time' => sprintf(\"%ds\", $elapsed_time),\n 'operations' => $operations_data,\n ];\n\n return $data;\n }", "title": "" }, { "docid": "e68c8719cbb0ed38cf445bdf8dc0b0b7", "score": "0.5291513", "text": "public function store()\n {\n $this->workflow->fill($this->params['workflow']);\n if ($this->workflow->save()) {\n return redirect()->back()->with('message', 'workflow Added!');\n } else {\n dd('error!');\n }\n }", "title": "" }, { "docid": "c692b52052544abb336ece5a39ba1103", "score": "0.5287129", "text": "public function getStorableFormat(){\n return $this->_properties['id'];\n }", "title": "" }, { "docid": "3221c4cdfdef684913ee93b498dbee38", "score": "0.52530515", "text": "public function getWorkflowId()\n {\n return $this->workflow_id;\n }", "title": "" }, { "docid": "ad8caab2a6dd4f7b0e73c0c78fd943b2", "score": "0.5208612", "text": "public abstract function getWorkflowCreateLog();", "title": "" }, { "docid": "dbe1bb40d44481182ce6948db8b96745", "score": "0.5187068", "text": "public function getWorkflowStatistics()\n {\n $request = '/workflow/statistics.json';\n\n $output = $this->request($request, array(), 'GET', true);\n\n if (200 !== $output['status']) {\n return false;\n }\n\n $decode = $this->decodeJson($output['var']);\n\n return $decode;\n }", "title": "" }, { "docid": "2fa17d449d8e648dbed3824d30258c5e", "score": "0.5173318", "text": "public function show(Workflow $workflow)\n {\n $model = $workflow;\n\n $stages = Buildup::ofType('STAGES')->get();\n $actions = Buildup::ofType('ACTION')->get();\n\n $roles = Role::pluck('name');\n\n return view('backend.workflow.show', compact('model', 'stages', 'actions', 'roles'));\n }", "title": "" }, { "docid": "ca112a5dff44244d96e322132bec3884", "score": "0.5168079", "text": "public function create()\n {\n return view('services::admin.workflows.create');\n }", "title": "" }, { "docid": "93e81dda89112ffb5ccf8acad228e01e", "score": "0.5154692", "text": "function build(WorkflowInterface $workflow);", "title": "" }, { "docid": "3a475273a2961372d6529e24d3eb543c", "score": "0.51134264", "text": "public static function getList()\n {\n $workflows = [];\n $app = Application::getFacadeApplication();\n $db = $app->make(Connection::class);\n $rows = $db->fetchAll('select wfID from Workflows');\n foreach ($rows as $row) {\n $wf = static::getByID($row['wfID']);\n if ($wf) {\n $workflows[] = $wf;\n }\n }\n $cmp = new Comparer();\n usort($workflows, function (Workflow $a, Workflow $b) use ($cmp) {\n return $cmp->compare($a->getWorkflowDisplayName('text'), $b->getWorkflowDisplayName('text'));\n });\n\n return $workflows;\n }", "title": "" }, { "docid": "d6c43dd63a0c4ed40bab8c743b6f7dc8", "score": "0.5093646", "text": "public function setSaveToStream($stream)\n {\n $this->save_to_stream = $stream;\n return $this;\n }", "title": "" }, { "docid": "126a3fa0dee971c8172dcebc09cd4d7e", "score": "0.50825804", "text": "public function deduceWorkflow() {\n if ($this->workflow_from === NULL) {\n return NULL;\n }\n $wf_state = WorkflowState::load($this->workflow_from);\n if (!$wf_state) {\n return NULL;\n }\n $workflow = $wf_state->getWorkflowId();\n $entity = Workflow::load($workflow);\n\n return $entity ? $entity->id() : NULL;\n }", "title": "" }, { "docid": "018e51576f1cb9e428733a7e94599f2c", "score": "0.50601447", "text": "public function getWorkflowExecution()\n {\n return $this->workflow_execution;\n }", "title": "" }, { "docid": "0c59cec322198035b2fa4c18ea330868", "score": "0.5053729", "text": "function saveTask(WorkflowTaskInterface $workflowTask);", "title": "" }, { "docid": "9172447cd6623c0cc0baacfc1d6210db", "score": "0.5021282", "text": "public static function get() {\n\t\tstatic $instance;\n\n\t\tif ( is_null( $instance ) && ! ( $instance instanceof Workflow ) ) {\n\t\t\t$instance = new Workflow();\n\t\t\t$instance->hooks();\n\t\t}\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "26b0ca6004cbe8c5291530ff0d2e8b50", "score": "0.50171", "text": "public function getStream()\n {\n return $this->_raw = (new AmfSerialize)->encode($this->_obj);\n }", "title": "" }, { "docid": "d2c1f64f5e6364753cbee36080cd548d", "score": "0.50162613", "text": "public function getStaged();", "title": "" }, { "docid": "d2c1f64f5e6364753cbee36080cd548d", "score": "0.50162613", "text": "public function getStaged();", "title": "" }, { "docid": "362028aba80cabe434ec5d4ca1b2b8ca", "score": "0.5010916", "text": "public function workflowsAction(){\n $workflows = new Workflows();\n $this->view->workflows = $workflows->getStageNamesAdmin();\n }", "title": "" }, { "docid": "1120c4194fecb41b959475fdab95dac4", "score": "0.4969254", "text": "public function getMigrationWorkflow()\n {\n return $this->migration_workflow;\n }", "title": "" }, { "docid": "b05fb9579764abc13552b367f8a87ac5", "score": "0.49351296", "text": "public function toStorage()\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "0b2d129cf16419e319d9640e8c652e15", "score": "0.49322328", "text": "public function createEmptyWorkflow();", "title": "" }, { "docid": "6fbaebdfcec39de33238640a28c37a37", "score": "0.49246356", "text": "public function createFromStoredWorkflow(WorkflowManagerInterface $wfm, $storedWorkflow);", "title": "" }, { "docid": "f4d84e9c9898a62a6f5aaca75d85b540", "score": "0.49237528", "text": "public function getWorkflowID()\n {\n return $this->wfID;\n }", "title": "" }, { "docid": "cbf702bd0fb8dba17be37b5c70328e37", "score": "0.4922704", "text": "public function index()\n {\n $workflows = Workflow::get();\n \n return view('workflows.index', compact('workflows'));\n }", "title": "" }, { "docid": "2c3bd73edaee6bfffd1b0a72874ff7a3", "score": "0.49195516", "text": "public function startAction()\n {\n $workflow = $this->getWorkflowFacade()\n ->get($this->getEvent()\n ->getRouteMatch()\n ->getParam('id', ''));\n \n return array('workflow' => $workflow);\n }", "title": "" }, { "docid": "f71392ab9361d55f708b201030932671", "score": "0.48650518", "text": "public function serialize()\n {\n return serialize($this->_layout);\n }", "title": "" }, { "docid": "e61746974b4897c71c1871cbc55fed2b", "score": "0.48581457", "text": "public function model()\n {\n return WorkflowNode::class;\n }", "title": "" }, { "docid": "bf96226dac5bb89b0b403aa87f95dcb1", "score": "0.48309404", "text": "public function getStagedData();", "title": "" }, { "docid": "c379c1772aa2fbcaac28eb7a86d49bc9", "score": "0.4819552", "text": "public function create()\n {\n $stages = Buildup::ofType('STAGES')->get();\n $actions = Buildup::ofType('ACTION')->get();\n\n $roles = Role::pluck('name');\n\n return view('backend.workflow.create', compact('stages', 'actions', 'roles'));\n }", "title": "" }, { "docid": "0bb3ee312223177524a0645c60e55667", "score": "0.48186445", "text": "public function getWorkflowIdentifier();", "title": "" }, { "docid": "b726e5622ff07b35008c55ec9965ef2c", "score": "0.4817633", "text": "protected function getWorkflowData()\n {\n $requiredFields = array(\n 'conditions_all',\n 'conditions_any',\n 'actions',\n );\n\n $data = array();\n\n $pdo = $this->getEntityManager()->getPDO();\n\n $sql = \"SELECT * FROM `workflow` WHERE `is_active` = 1 AND `deleted` = 0 \";\n $sth = $pdo->prepare($sql);\n $sth->execute();\n\n $records = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n foreach ($records as $row) {\n\n $rowData = array();\n foreach ($requiredFields as $fieldName) {\n\n if (isset($row[$fieldName])) {\n\n $ccFieldName = Util::toCamelCase($fieldName);\n\n $fieldValue = $row[$fieldName];\n if (Json::isJSON($fieldValue)) {\n $fieldValue = Json::decode($fieldValue, true);\n }\n if (!empty($fieldValue)) {\n $rowData[$ccFieldName] = $fieldValue;\n }\n }\n }\n\n $data[$row['type']] [$row['entity_type']] [$row['id']] = $rowData;\n }\n\n return $data;\n }", "title": "" }, { "docid": "9c4d6e7c51053058729060571ddb4c76", "score": "0.48158592", "text": "private function workflowConf()\n {\n return [\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW,\n 'id' => self::WORKFLOW_NAME,\n 'initial_status_id' => 'DRAFT'\n ]\n ];\n }", "title": "" }, { "docid": "1dbd4d8ee6331614b0e060653498594e", "score": "0.48157057", "text": "public function indexAction()\n {\n $list = $this->getWorkflowFacade()->listAll(); \n \n return array('workflowList' => $list);\n }", "title": "" }, { "docid": "b4164ceb253acb386c64262469aecab9", "score": "0.48150712", "text": "public function getWorkflowname()\n {\n return $this->getValue('workflowName');\n }", "title": "" }, { "docid": "d3374e800eef2097f32ad6758089b921", "score": "0.48136118", "text": "function save()\n {\n file_put_contents($this->storageFilePath\n , '<?php return '\n . str_replace(['array (',')'],['[',']'],var_export($this->data, true))\n . ';'\n );\n\n return $this;\n }", "title": "" }, { "docid": "b70cdd8b294c35cd4cb30e09b444db69", "score": "0.48106608", "text": "public function retrieve($id)\n\t{\n\t\t$data = (new App\\Db\\Query())->from('com_vtiger_workflows')->where(['workflow_id' => $id])->one();\n\t\tif ($data) {\n\t\t\t$workflow = $this->getWorkflowInstance($data['type']);\n\t\t\t$workflow->setup($data);\n\n\t\t\treturn $workflow;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "665a7ed4a6db6c2894063da04978eef5", "score": "0.47844198", "text": "private function workflowConf()\n {\n return [\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW,\n 'id' => self::PROJECTS_WORKFLOW_NAME,\n 'initial_status_id' => 'STEPA'\n ]\n ];\n }", "title": "" }, { "docid": "1356fd3ff11f20c2f3c306fe4f64f1e0", "score": "0.47829765", "text": "public function getWorkflowName()\n {\n return $this->wfName;\n }", "title": "" }, { "docid": "f8570847a28404906c08156ff0b1775d", "score": "0.47794202", "text": "public function getRequestedWorkflowName()\n {\n return $this->requestedWorkflowName;\n }", "title": "" }, { "docid": "f34437cce10ec2f88896d4e044919d02", "score": "0.47367176", "text": "public function serialize($format = null) {\n return Serializer::serialize($this, $format);\n }", "title": "" }, { "docid": "99b0c1952ce7c3629f83f48f9d388ceb", "score": "0.4688142", "text": "public function serialize()\n {\n $props = Creator::getObjectVars($this);\n return serialize($props);\n }", "title": "" }, { "docid": "4078e6796500481a4c6687149b40458b", "score": "0.46760184", "text": "public function getSerialized();", "title": "" }, { "docid": "92f86192699682ce6baee3f2f88976f7", "score": "0.4672289", "text": "public function saveDraft()\n {\n return $this->_draftAction('saveDraft');\n }", "title": "" }, { "docid": "56363898d215a7ba16ceb666a1910772", "score": "0.46559352", "text": "function getWorkflowRuntimeDefinition();", "title": "" }, { "docid": "3d7447bf7ea70d40c67cbaeef02c6e14", "score": "0.46432114", "text": "public function getInitialState(WorkflowInterface $workflow);", "title": "" }, { "docid": "83b1b876a990519914d245224206fd16", "score": "0.4634562", "text": "public function edit(Workflow $workflow)\n {\n $model = $workflow;\n\n $stages = Buildup::ofType('STAGES')->get();\n $actions = Buildup::ofType('ACTION')->get();\n\n $roles = Role::pluck('name');\n\n return view('backend.workflow.edit', compact('model', 'actions', 'stages', 'roles'));\n }", "title": "" }, { "docid": "ff8714d18cefb5ab2169edeeef5ec49e", "score": "0.46255532", "text": "function getWorkFlow($idx)\r\n\t{\r\n\t\tif ($this->workflows[$idx][1] == null)\r\n\t\t\t$this->workflows[$idx][1] = new WorkFlow($this->dbh, $this->workflows[$idx][0]);\r\n\t\t\r\n\t\treturn $this->workflows[$idx][1];\r\n\t}", "title": "" }, { "docid": "e802ba5727151acf83fde7e40c8b9751", "score": "0.45898876", "text": "protected function saveCurrentState()\n {\n\t\t$my_json = array(\n\t\t\t'currentId' => $this->currentId,\n\t\t\t'counters' => $this->domainsCount,\n\t\t);\n\n\t\tif (file_exists($this->stateFileName)) {\n\t\t\t$fd = fopen($this->stateFileName, 'a+');\n\t\t} else {\n\t\t\t$fd = fopen($this->stateFileName, 'w');\n\t\t}\n\t\tif (!$fd) {\n\t\t\tthrow new \\RuntimeException('Failed to open state file \"'.$this->stateFileName.'\"');\n\t\t}\n\t\tflock($fd, LOCK_EX);\n\t\tftruncate($fd, 0);\n\t\tfseek($fd, 0, SEEK_SET);\n\t\tfwrite($fd, json_encode($my_json));\n\t\tfflush($fd);\n\t\tflock($fd, LOCK_UN);\n\t\tfclose($fd);\n\t}", "title": "" }, { "docid": "a87fa16a8298da5c9b189b6099ed2916", "score": "0.45545968", "text": "public function index()\n {\n return view('backend.workflow.index');\n }", "title": "" }, { "docid": "0fab1ccc0eddb85e999f7f45d607804e", "score": "0.45518494", "text": "public function save()\n\t{\n\t\treturn $this->store();\n\t}", "title": "" }, { "docid": "41b2bfa040dad5e743328ba458d8e6e4", "score": "0.4545186", "text": "public function get_data() {\n\n $database = file_get_contents($this->workspace_name);\n return unserialize($database);\n }", "title": "" }, { "docid": "06519758d3db336dc5087cf0a240c2fe", "score": "0.45424423", "text": "public function getThirdPartyPaymentWorkflows()\n\t{\n\t\t$mozuClient = PaymentSettingsClient::getThirdPartyPaymentWorkflowsClient();\n\t\t$mozuClient = $mozuClient->withContext($this->apiContext);\n\t\t$mozuClient->execute();\n\t\treturn $mozuClient->getResult();\n\n\t}", "title": "" }, { "docid": "58ef681f6ee8105e544d7954c8801752", "score": "0.454175", "text": "protected function getSystemProgressiveStore()\r\n {\r\n return $this->getContainer()->get('iris.referencing.form_set.progressive_store.system_progressive_store');\r\n }", "title": "" }, { "docid": "9da4073af60e55c92174a07866a6e375", "score": "0.45408806", "text": "public function index()\n {\n //$workflows = $this->workflows->all();\n\n return view('services::admin.workflows.index', compact(''));\n }", "title": "" }, { "docid": "7e13c54f7ca13545f4d7bc417b24f347", "score": "0.45393887", "text": "public function serialize() : string\n {\n return serialize([$this->id,$this->folder,$this->author,$this->data,$this->date_creation,$this->date_last_modification,$this->description,$this->name,$this->size,$this->tags,$this->type]);\n }", "title": "" }, { "docid": "2f6b8380955d9f27edab91de217211a5", "score": "0.45329475", "text": "public function GetJournal() {\n\t\t\treturn StewardshipBatch::GetJournalForId($this->intId);\n\t\t}", "title": "" }, { "docid": "22ca3cf4d12146c507abc6d72835d3f0", "score": "0.45278934", "text": "public function save()\n {\n return $this->get();\n }", "title": "" }, { "docid": "06264feed40951221874b4229552ca0e", "score": "0.45166108", "text": "public function build()\n {\n $transactionFileName = $this->transactionDirectory . '/' . $this->id . static::TRANSACTION_EXTENSION;\n return file_put_contents($transactionFileName, serialize($this));\n }", "title": "" }, { "docid": "889d6d8efe70e58fbba490ff7bbae366", "score": "0.451381", "text": "public function getSync() {\n return $this->getFilteredStorage($this->sync, ['config.storage.sync']);\n }", "title": "" }, { "docid": "089f7640998a734bbdebc4baaeaeecbf", "score": "0.45051792", "text": "public function serialize()\n {\n return serialize($this->all());\n }", "title": "" }, { "docid": "23cc55d805b1aa524a0d98918486be34", "score": "0.4503637", "text": "public function store()\n\t{\n\t\treturn $this->projectService->store(Input::all());\n\t}", "title": "" }, { "docid": "6f05f8d86db2cecbd8384a7362f8a726", "score": "0.44995913", "text": "public function getSavedFeed()\n {\n return $this->request('feed/saved/')\n ->addPost('_uuid', $this->uuid)\n ->addPost('_uid', $this->account_id)\n ->addPost('_csrftoken', $this->token)\n ->setSignedPost(true)\n ->getResponse(new Response\\SavedFeedResponse());\n }", "title": "" }, { "docid": "4c389781a657a0edcdfc937d044cd5f1", "score": "0.44965345", "text": "public function serialize()\n {\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "4c389781a657a0edcdfc937d044cd5f1", "score": "0.44965345", "text": "public function serialize()\n {\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "4c389781a657a0edcdfc937d044cd5f1", "score": "0.44965345", "text": "public function serialize()\n {\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "823497b7bc3fc556c8d25a57278cc83e", "score": "0.44813716", "text": "public function __toString()\n {\n $dump = Yaml::dump($this->except('content'));\n return \"---\\n{$dump}---\\n{$this->content}\";\n }", "title": "" }, { "docid": "429ce1cb51032e6c045a43f99f4e9466", "score": "0.44784066", "text": "public function saveState() {\n $this->state->close('setup');\n return $this->refresh();\n }", "title": "" }, { "docid": "a5a8754fc171c8ef7efa3a360c2a726e", "score": "0.4478123", "text": "public function serialize()\r\n {\r\n return serialize($this->toArray());\r\n }", "title": "" }, { "docid": "8e5a2075a606b81589286eaedfde8a94", "score": "0.44762182", "text": "public function getSandbox()\n {\n return $this->sandbox;\n }", "title": "" }, { "docid": "565d681e6adad0aa4621f3f010be57c1", "score": "0.44740713", "text": "protected function getStoredState(): FormFlowStoredState\n {\n $normalizedData = $this->serializer->serialize($this->getData(), 'json');\n\n $storedState = new FormFlowStoredState();\n $storedState\n ->setFlowName($this->getName())\n ->setState($this->getState())\n ->setInstanceId($this->getInstanceId())\n ->setData($normalizedData)\n ->setStepStates($this->getStepStates());\n\n return $storedState;\n }", "title": "" }, { "docid": "fb0af321b4758dcfda9917f85ee5c960", "score": "0.4464715", "text": "public static function getWorkflowId(Installment $installment) {\n $workflow = InstallmentType::load($installment->bundle())->getWorkflowId();\n return $workflow;\n }", "title": "" }, { "docid": "9502ecc7fe83cd6ca25dfaaac754a07c", "score": "0.4456301", "text": "public function importAndSave($format, $stream);", "title": "" }, { "docid": "311932549a9c15c36affab4bedf8d596", "score": "0.44446734", "text": "public function getWorkspace()\n {\n return $this->hasOne(Workspace::class, ['id' => 'workspace_id']);\n }", "title": "" }, { "docid": "24a295dfb4fc900b0edaf17fa1efe914", "score": "0.44429168", "text": "public function getWorkflowTypeObject()\n {\n return empty($this->wftID) ? null : Type::getByID($this->wftID);\n }", "title": "" }, { "docid": "8ce6752682998222cc21dfad3bcf6b02", "score": "0.44287595", "text": "function writeRDFToString()\n {\n $ser = new RDF_Serializer();\n $rdf = $ser->serialize($this);\n return $rdf;\n }", "title": "" }, { "docid": "6a164e7ea8c436e92a8044007c8c8b9e", "score": "0.4424152", "text": "protected function getLatestWorkflow($site)\n {\n $workflows = $site->getWorkflows()->fetch(['paged' => false,])->all();\n $workflow = array_shift($workflows);\n $workflow->fetchWithLogs();\n return $workflow;\n }", "title": "" }, { "docid": "2f6b0961f9308ca88ac79485b03d7d64", "score": "0.44172063", "text": "public function saveOrUpdateDetails($request, $id = null)\n {\n $workflow = new WorkFlow();\n if(!empty($id)) {\n $workflow = $this->getDetailsById($id);\n $workflow->updated_at = date(\"Y-m-d H:i:s\");\n } else {\n $workflow->status = 1;\n $workflow->created_at = date(\"Y-m-d H:i:s\");\n }\n \n $workflow->services_id = trim($request->get('service'));\n $workflow->title = trim($request->get('title'));\n $workflow->slug = strtolower(str_replace(' ', '-', $workflow->title));\n $workflow->description = trim($request->get('description'));\n $workflow->save();\n\n return $workflow;\n }", "title": "" }, { "docid": "9641417cc86b6c4274fb45811100d6fd", "score": "0.44134003", "text": "function storify_story_import() {\n\treturn StorifyStoryImport::instance();\n}", "title": "" }, { "docid": "a51a9763271f28a7554fdfb768a8e3b8", "score": "0.4406206", "text": "function getManifest() {\n\t\tif (!$this->ManifestCache) {\n\t\t\t$manifest = $this->generateManifest();\n\t\t\t$this->ManifestCache = serialize($manifest);\n\t\t\t$this->write();\n\t\t\treturn $manifest;\n\t\t}\n\n\t\t// return the deserialised manifest property.\n\t\treturn unserialize($this->ManifestCache);\n\t}", "title": "" }, { "docid": "86a3d0eea625da9697edfde3e0f809f9", "score": "0.43851382", "text": "final public function __toString()\n {\n try {\n if (null === self::$yamlSerializer) {\n self::$yamlSerializer = new YamlSerializer();\n }\n return self::$yamlSerializer->serialize($this);\n } catch (\\Exception $e) {\n return sprintf(\n 'Failed to render [%s] as a string with error: %s',\n self::schema()->toString(),\n $e->getMessage()\n );\n }\n }", "title": "" }, { "docid": "f59d791c5c9014edbce443d9e791e383", "score": "0.43651757", "text": "public function getWorkflowstep()\n {\n return $this->getValue('workflowStep');\n }", "title": "" }, { "docid": "5829368890f1247ea7ccf810bdaa1fc8", "score": "0.43572643", "text": "public function to_stream($stream) {}", "title": "" } ]
997b2a1e9a77a0a0daa149cafa7fc34c
Creates data provider instance with search query applied
[ { "docid": "e9c9395512641c5f3c1cdfe626c87eae", "score": "0.0", "text": "public function search($params)\n {\n $query = RefKorolari::find();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'Kd_Rek_1' => $this->Kd_Rek_1,\n 'Kd_Rek_2' => $this->Kd_Rek_2,\n 'Kd_Rek_3' => $this->Kd_Rek_3,\n 'Kd_Rek_4' => $this->Kd_Rek_4,\n 'Kd_Rek_5' => $this->Kd_Rek_5,\n 'D_Rek_1' => $this->D_Rek_1,\n 'D_Rek_2' => $this->D_Rek_2,\n 'D_Rek_3' => $this->D_Rek_3,\n 'D_Rek_4' => $this->D_Rek_4,\n 'D_Rek_5' => $this->D_Rek_5,\n 'K_Rek_1' => $this->K_Rek_1,\n 'K_Rek_2' => $this->K_Rek_2,\n 'K_Rek_3' => $this->K_Rek_3,\n 'K_Rek_4' => $this->K_Rek_4,\n 'K_Rek_5' => $this->K_Rek_5,\n ]);\n\n return $dataProvider;\n }", "title": "" } ]
[ { "docid": "2216a09ea2a298cb2a498017dbe896ef", "score": "0.7112818", "text": "public function search() {\n if (!$this->validate()) {\n // dummy answer instance of BaseDataProvider. Bad practice\n return new ArrayDataProvider([\n 'allModels' => []\n ]);\n }\n\n $query = $this->generateQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $query\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "49378df15145a2342f7f477426b883bd", "score": "0.6958254", "text": "public function createSearch($query);", "title": "" }, { "docid": "c415d6e814888634b1a9611f71a67b3b", "score": "0.66739184", "text": "protected function prepareDataProvider() {\n\n $modelClass = $this->modelClass;\n $model = new $this->modelClass();\n $query = $modelClass::find();\n\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this, $model, $query, $modelClass);\n }\n\n if(!$this->params){\n throw new \\yii\\web\\HttpException(400, 'There are no query string');\n }\n\n $this->removeConflictParams([\n 'access-token',\n 'page',\n 'expand'\n ]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query\n ]);\n\n $params = $this->getSearchParams($model);\n if (empty($params)) {\n return $dataProvider;\n }\n\n foreach ($params as $param => $value) {\n if(in_array($param, $this->likeField)){\n $query->andFilterWhere(['like',$param,$value]);\n }else{\n $query->andFilterCompare($param,$value);\n }\n }\n\n return $dataProvider;\n }", "title": "" }, { "docid": "3f36ba7040ddacff05266dbf7986ad9c", "score": "0.66479623", "text": "public function search(): Search\n {\n return new Search($this->_provider);\n }", "title": "" }, { "docid": "3f36ba7040ddacff05266dbf7986ad9c", "score": "0.66479623", "text": "public function search(): Search\n {\n return new Search($this->_provider);\n }", "title": "" }, { "docid": "1c36bab65301492b9fbaa1481f2a4c87", "score": "0.64988077", "text": "public function search()\n {\n\n $criteria = $this->createDbCriteria();\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "9d2af95611575c348de76dfed0532b44", "score": "0.64079857", "text": "protected function applySearch()\n {\n $this->meta(['search' => $this->config('search')]);\n if ($this->searchStrategy && $this->config('search')) {\n $this->queryBuilder = call_user_func($this->searchStrategy, $this->queryBuilder, $this->config('search'));\n }\n \n return $this;\n }", "title": "" }, { "docid": "1d07d6d5f14b25ad762b0007e6befb7a", "score": "0.638324", "text": "public function createSearch(): Search;", "title": "" }, { "docid": "681f15cb1d963ae0efb148244d8a514f", "score": "0.63490534", "text": "public function search()\n {\n $this->StateProcess(get_class($this) . '_' . Y::app()->params['cfgName']);\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('descr', $this->descr, true);\n $criteria->compare('create_time', $this->create_time);\n $criteria->compare('published', $this->published);\n $criteria->compare('finished', $this->finished);\n $criteria->compare('position', $this->position);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array('defaultOrder' => 'create_time DESC'),\n 'pagination' => array('pageSize' => Config::$data['base']->pageSize)\n ));\n }", "title": "" }, { "docid": "4c0d7bdbc8c756de05a6c10dff59154c", "score": "0.6318005", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('title', $this->title);\n $criteria->compare('fid', $this->fid);\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "43d41c72bb3dcdcd05a69ebe41abaedb", "score": "0.6299215", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d371bcb349c63b4002f2cf967cfcd1a4", "score": "0.629624", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('dbview', $this->dbview, true);\n $criteria->compare('name', $this->name, true);\n $dataProvider = new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n\n return $dataProvider;\n }", "title": "" }, { "docid": "89f947b22f8e13a346616923f96a2f6a", "score": "0.6282957", "text": "static public function newSearch($clientId = null)\n {\n $currentAdapter = self::getAdapter();\n $className = self::PROVIDER_CLASS_PATH_PRE . $currentAdapter . '_Search';\n\n $newOne = new $className($clientId);\n if ($newOne instanceof Core_Model_Dataprovider_Interface_Search) {\n return $newOne;\n }\n \n throw new Core_Model_DataProvider_Exception(\n 'The data provider: ' . $currentAdapter . ' doesn\\'t have a valid search implementation.'\n );\n }", "title": "" }, { "docid": "bacba042087ab49940d4e6b26bb51eda", "score": "0.62702733", "text": "protected function _getSearchData() {}", "title": "" }, { "docid": "caf952f02e122faaf8b74c156822ea7b", "score": "0.6267036", "text": "public function search()\n {\n $criteria = new YMongoCriteria();\n $criteria->compare('_id', $this->_id);\n $criteria->compare('username', $this->username, false);\n\n // Ordering\n $criteria->setSort(array(\n 'username',\n ));\n\n return new YMongoDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "bcab6db38a78a027beb340eeb2beeb9a", "score": "0.62385887", "text": "public function search() {\n\t\t$criteria = new CDbCriteria ();\n\t\t$criteria->compare ( 'name', $this->name );\n\t\tif (isset ( $_GET ['pageSize'] ))\n\t\t\tYii::app ()->user->setState ( 'pageSize', $_GET ['pageSize'] );\n\t\treturn new CActiveDataProvider ( $this, array ('criteria' => $criteria, 'pagination' => array ('pageSize' => Yii::app ()->user->getState ( 'pageSize', Yii::app ()->params ['defaultPageSize'] ) ), 'sort' => array ('defaultOrder' => 'id DESC' ) \t\t\n\t\t));\n\t}", "title": "" }, { "docid": "38832a0db205f02d9512f160030b1bb3", "score": "0.6208045", "text": "public function GetSearchProvider() {\n return $this;\n }", "title": "" }, { "docid": "1a0f476c7dee5a04babad3c8f7c0a849", "score": "0.6205142", "text": "public function search()\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\tif(isset($this->searchText) && !empty($this->searchText))\n\t\t{\n\t\t\t$this->districtId = $this->searchText;\n\t\t\t$this->districtCode = $this->searchText;\n\t\t\t$this->districtName = $this->searchText;\n\t\t\t$this->amphurId = $this->searchText;\n\t\t\t$this->provinceId = $this->searchText;\n\t\t\t$this->geographyId = $this->searchText;\n\t\t}\n\n\t\t$criteria->compare('districtId',$this->districtId,true, 'OR');\n\t\t$criteria->compare('districtCode',$this->districtCode,true, 'OR');\n\t\t$criteria->compare('districtName',$this->districtName,true, 'OR');\n\t\t$criteria->compare('amphurId',$this->amphurId);\n\t\t$criteria->compare('provinceId',$this->provinceId);\n\t\t$criteria->compare('geographyId',$this->geographyId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "a52ab0868b05987d0ac2de3f8b71c224", "score": "0.61798626", "text": "public function prepareDataProvider()\r\n {\r\n $model = new Seo();\r\n $res = $model->search(\\Yii::$app->request->queryParams);\r\n\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "765245ca699906b68744e49fe3a97478", "score": "0.6162226", "text": "public function search () {\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\treturn new CActiveDataProvider($this, array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t\t\t\t\t\t\t ));\n\t}", "title": "" }, { "docid": "9f0ff407e0cf4c9a08eaac614391c173", "score": "0.6134632", "text": "public function search() {\n\t\t$criteria = new CDbCriteria();\n\t\tforeach ($this->form->getConfig() as $key => $config) {\n\t\t\tif ($this->hasAttribute($key)) {\n\t\t\t\t$criteria->compare($key, $this->getAttribute($key));\n\t\t\t}\n\t\t}\n\t\treturn new GActiveDataProvider($this, [\n\t\t\t\"sort\" => [\n\t\t\t\t\"defaultOrder\" => \"id asc\"\n\t\t\t],\n\t\t\t\"pagination\" => [\n\t\t\t\t\"pageSize\" => $this->getItemsPerPage()\n\t\t\t],\n\t\t\t\"form\" => $this->form,\n\t\t]);\n\t}", "title": "" }, { "docid": "0c21a553762b4b996a25b0b7e6fb1ec4", "score": "0.6130631", "text": "public function search(){\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=$this->getDbCriteria();\n\t\t\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name, true);\n//\t\t$criteria->compare('start_date',$this->start_date,true);\n//\t\t$criteria->compare('end_date',$this->end_date,true);\n\t\t$criteria->compare('organiser_type_id',$this->organiser_type_id);\n\t\t$criteria->compare('organiser_name',$this->organiser_name,true);\n\t\t\n\t\t// Add date filters\n\t\t$this->dateRangeCriteria($criteria,'start_date');\n\t\t$this->dateRangeCriteria($criteria,'end_date');\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\t\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>30,\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "cf09f64f0d0d1fb0cf58ab47fce4d551", "score": "0.6106569", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria\n ));\n }", "title": "" }, { "docid": "fe9d082fc18443aeaa820d3bd679aa64", "score": "0.6100634", "text": "public function search()\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\t\t$criteria->compare('LOWER(documentId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(workflowStateId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(employeeId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(groupId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(createDateTime)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(remarks)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('estimateHour',$this->estimateHour);\n\t\t$criteria->compare('numHour',$this->numHour);\n\t\t$criteria->compare('isOverEstimate',$this->isOverEstimate);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "1b330217146b3802ef8258a0de899c95", "score": "0.6097795", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('cat_id', $this->cat_id);\n $criteria->compare('title', $this->title, true);\n\n $pagination = array('pageSize' => Yii::app()->params['pageSize']);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => $pagination\n ));\n }", "title": "" }, { "docid": "fb2959ede26453bc0072793c8dc6b312", "score": "0.60701644", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id);\n $criteria->compare('type', $this->type, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "62bda78cbfe831400599cfc17f8fa4cb", "score": "0.605776", "text": "public function search()\n\t{\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$this->AdvancedSearch(),\n\t\t));\n\t}", "title": "" }, { "docid": "531ec13acbe6ceabafc09f82ec4e5431", "score": "0.60576546", "text": "public function searchDataProvider()\n {\n return $this->getApiRequestsData(\n __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'requests'\n );\n }", "title": "" }, { "docid": "0fefb9573aca4ebd7147bd90ef6ed03b", "score": "0.60424346", "text": "public function getSearchService();", "title": "" }, { "docid": "32d2794e151bee84476612976d7d3fc5", "score": "0.6028842", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('`id`', $this->id);\n $criteria->compare('`name_chs`', $this->name_chs, true);\n $criteria->compare('`name_eng`', $this->name_eng, true);\n $criteria->compare('`sex`', $this->sex);\n $criteria->compare('`base_like`', $this->base_like, true);\n $criteria->compare('`like`', $this->like);\n $criteria->compare('`created`', $this->created);\n $criteria->compare('`updated`', $this->updated);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => 20\n ),\n ));\n }", "title": "" }, { "docid": "ebcd1645addc59d1d9c2de394ce36ae1", "score": "0.6015354", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->compare('NAME', $this->NAME, true, 'OR');\n\t \t$criteria->with = array('CUSTOMER');\n\t\t$criteria->compare('CUSTOMER.COMPANY', $this->customer_search, true, 'OR');\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t\t\t'pageSize'=>25,\n\t\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "1aa64c0b3a0616e7db7a8aa23624db02", "score": "0.5984943", "text": "public static function newSearch($type, $data=null) {\n return self::newObject($type, $data);\n }", "title": "" }, { "docid": "ffdc32b176c92be65dad745b97a074ce", "score": "0.59792703", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider(get_class($this),\n array('criteria' => $criteria,));\n }", "title": "" }, { "docid": "c62cb6cf507aa77bb2f5c49da7a208b7", "score": "0.5972021", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "c50730a9243ea9e9a78f5b842ff9ec97", "score": "0.5971244", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('sample_id', $this->sample_id);\n $criteria->compare('deriv_id', $this->deriv_id);\n $criteria->compare('user_add', $this->user_add, true);\n $criteria->compare('date_add', $this->date_add, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "249a21e7dde65e94931e0b4a52e0a61d", "score": "0.5966664", "text": "public function search()\n {\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('weight',$this->weight);\n\t\t$criteria->compare('status',$this->status);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "4b743b93813bc0abc0dddf319d4edc23", "score": "0.59634596", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('name',$this->fullNameFilter,true,'OR');\n\t\t$criteria->compare('family',$this->fullNameFilter,true,'OR');\n\t\t$criteria->compare('post',$this->post,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('tell',$this->tell,true);\n\t\t$criteria->order = 'id DESC';\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "e28b36076ebb983a491544db61c84de7", "score": "0.59629834", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('phrase', $this->phrase, true);\n $criteria->compare('hash', $this->hash, true);\n $criteria->compare('position', $this->position, true);\n $criteria->compare('system_id', $this->system_id);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('updated_at', $this->updated_at, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "0ba34a942c34307943425623669defe3", "score": "0.59527254", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('url', $this->url, true);\n $criteria->compare('checkdate', $this->date, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('keyword', $this->keyword, true);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('position', $this->position);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('xml', $this->xml, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('region_id', $this->region_id);\n $criteria->compare('domain_id', $this->domain_id);\n\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "016f98a58c025e801be1e2d673d8ad17", "score": "0.59440255", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('property', $this->property, true);\n $criteria->compare('pattern', $this->pattern, true);\n $criteria->compare('userID', $this->userID, true);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => 20,\n ),\n ));\n }", "title": "" }, { "docid": "df74ea22f3d83b5345fe88aa917d5857", "score": "0.5930075", "text": "public function search()\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('clinic_id', $this->clinic_id);\n\t\t$criteria->compare('user_id', $this->user_id, true);\n\t\tif(is_array($this->post))\n\t\t\t$criteria->addInCondition('post', $this->post);\n\t\telse\n\t\t\t$criteria->compare('post', $this->post);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "6763e7b2027f426cba8dccce92f22f12", "score": "0.5913044", "text": "public function indexProvider(): ActiveDataProvider\n {\n return new ActiveDataProvider(['query' => $this->indexQuery()]);\n }", "title": "" }, { "docid": "1aa6beb7a0f6fe7c5060ffd6568560d0", "score": "0.5910948", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $session = new CHttpSession;\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('tenant', $this->tenant, true);\n $criteria->compare('tenant_agent', $this->tenant_agent, true);\n $criteria->compare('is_default_value', $this->is_default_value, true);\n $criteria->compare('module', $this->module, true);\n\n if(isset($session['tenant']))\n {\n $criteria->addCondition(\"t.tenant =\" . $session['tenant']);\n }\n\n // Allow Admin to View and Manage his own created Types\n //if( Yii::app()->user->role == Roles::ROLE_ADMIN )\n // $criteria->addCondition(\"created_by =\" . Yii::app()->user->id . \"'\");\n\n\n\n $data = new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n\n ));\n\n $data->setTotalItemCount(count($data->getData()));\n $data->pagination->setItemCount(count($data->getData()));\n\n return $data;\n\n }", "title": "" }, { "docid": "1d4aafe397f1d9b05545564f839702a5", "score": "0.5907576", "text": "protected function build() {\n $this->query = new Query();\n $offset = (empty($this->query_options['offset'])) ? 0 : $this->query_options['offset'];\n $limit = (empty($this->query_options['limit'])) ? 10 : $this->query_options['limit'];\n\n $keys = $this->search_api_query->getKeys();\n if (!empty($keys)) {\n if (is_string($keys)) {\n $keys = array($keys);\n }\n\n $full_text_fields = $this->search_api_query->getFields();\n $string = $this->flattenKeys($keys, $this->query_options['parse mode']);\n\n if (!empty($string)) {\n $query_string = new QueryString($string);\n $query_string->setFields(array_values($full_text_fields));\n }\n }\n\n $sort = $this->getSortQuery();\n $parsed_filters = $this->parseFilter($this->search_api_query->getFilter());\n if (!empty($parsed_filters)) {\n $search_filter = $parsed_filters[0];\n }\n\n $this->query->setFrom($offset);\n $this->query->setSize($limit);\n\n if (isset($query_string) && isset($search_filter)) {\n $bool_query = new BoolQuery();\n $bool_query->addMust($query_string);\n $bool_query->addFilter($search_filter);\n $this->query->setQuery($bool_query);\n }\n elseif (isset($query_string)) {\n $this->query->setQuery($query_string);\n }\n elseif (isset($search_filter)) {\n $this->query->setPostFilter($search_filter);\n }\n\n if (!empty($sort)) {\n $this->query->setSort($sort);\n }\n\n $this->addAggregations();\n }", "title": "" }, { "docid": "640234361835dea20062c5b7fc4fdca4", "score": "0.59017265", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('create_user',$this->create_user);\n\t\t$criteria->compare('invoice_id',$this->invoice_id);\n\t\t$criteria->compare('summa',$this->summa,true);\n\t\t$criteria->compare('externalPaymentId',$this->summa);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "551273ff8e0f9cb780d5735390715bb4", "score": "0.5885415", "text": "public function search()\r\n {\r\n $criteria=new CDbCriteria;\r\n\n if (!Yii::app()->user->isAdmin()) {\n $criteria->compare('id_user', Yii::app()->user->id);\n }\n\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, [\r\n 'criteria'=>$criteria,\r\n ]);\r\n }", "title": "" }, { "docid": "61546db3d15e7e8c403b13ff51480e3d", "score": "0.5879514", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('service_id', $this->service_id);\n $criteria->compare('appoint', $this->appoint, true);\n $criteria->compare('branch', $this->branch);\n $criteria->compare('create_date', $this->create_date, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "ab2286fa89b454321e8e36146d8af688", "score": "0.5879081", "text": "private function search(): self\n {\n $http = HttpPool::make($this->queries)\n ->setIdentifierKey('identifier')\n ->allowPrintConsole()\n ->execute()\n ;\n\n $this->items = $this->setItems($http->getResponses());\n\n return $this;\n }", "title": "" }, { "docid": "452e706ba00fb1456117a41b30a66ca9", "score": "0.58752286", "text": "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('businessId',$this->businessId);\n\t\t$criteria->compare('startDate',$this->startDate,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "16e986619971c53113fa58f85b183c5c", "score": "0.58732593", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('name', $this->name, true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t\t'criteria' => $criteria,\n\t\t\t));\n\t}", "title": "" }, { "docid": "50001ff13c6cbedd7dbd3ccec21e79ef", "score": "0.5865588", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('shop_id', $this->shop_id);\n $criteria->compare('supplier_id', $this->supplier_id);\n $criteria->compare('stage', $this->stage);\n $criteria->compare('status', $this->status);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'create_date desc'\n ),\n 'pagination' => array(\n 'pageSize' => 25\n )\n ));\n }", "title": "" }, { "docid": "e3f878d0e15ec532aa6b3ccdde139b21", "score": "0.58638763", "text": "public function search()\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('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('keyword',$this->keyword,true);\n\t\t$criteria->compare('match_mode',$this->match_mode);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('ghid',gh()->ghid,true);\n\t\t$criteria->addCondition(\"ghid='public'\",'OR');\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>15,\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "d688b41b8d31ba1c924bb5750cc3c2d5", "score": "0.5857246", "text": "public function search() {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('company', $this->company);\r\n $criteria->compare('charity', $this->charity);\r\n $criteria->compare('rotation', $this->rotation);\r\n $criteria->compare('common', $this->common);\r\n $criteria->compare('fee', $this->fee);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "title": "" }, { "docid": "0c98e3fdd78717f3b8f8e66417a7082e", "score": "0.58564764", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('t.name', $this->name, true);\n $criteria->compare('t.category_id', $this->category_id);\n \n if (!empty($this->customer_id)) {\n if (is_numeric($this->customer_id)) {\n $criteria->compare('t.customer_id', $this->customer_id);\n } else {\n $criteria->with['customer'] = array(\n 'condition' => 'customer.email LIKE :name OR customer.first_name LIKE :name OR customer.last_name LIKE :name',\n 'params' => array(':name' => '%' . $this->customer_id . '%')\n );\n }\n } elseif ($this->customer_id === null) {\n $criteria->addCondition('t.customer_id IS NULL');\n }\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => (int)Yii::app()->request->getQuery('pageSize', 20),\n 'pageVar' => 'page',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'last_updated' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "title": "" }, { "docid": "4c9ceaf8a316e90f05b6d8107671921a", "score": "0.5854346", "text": "public function search()\r\n\t{\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->compare('id_blog',$this->id_blog,true);\r\n\t\t$criteria->compare('lang',$this->lang,true);\r\n\t\t$criteria->compare('name',$this->name,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "fe7a9a9d3e17328e571093a812c9f523", "score": "0.58491987", "text": "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('disabled', $this->disabled);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('sector_id', $this->sector_id);\n\t\t$criteria->compare('specialization_id', $this->specialization_id);\n\t\t$criteria->compare('service_id', $this->service_id);\n\t\t$criteria->compare('meta_keywords', $this->meta_keywords, true);\n\t\t$criteria->compare('meta_description', $this->meta_description, true);\n\t\t$criteria->compare('page', $this->page);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => 50,\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "e0c718fb1e1e893a81bd49b64ab27710", "score": "0.5848904", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('LOWER(name)', strtolower($this->name), true);\n $criteria->compare('holiday_group', $this->holiday_group);\n $criteria->compare('city_id', $this->city_id);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('key_points', $this->key_points, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('last_updated', $this->last_updated, true);\n $criteria->compare('status', $this->status, true);\n $criteria->compare('meta_keywords', $this->meta_keywords, true);\n $criteria->compare('meta_description', $this->meta_description, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "e0c00524e56ad10680025a30811476ac", "score": "0.58479637", "text": "public function search()\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('id',$this->id);\n\t\t$criteria->compare('input_type',$this->input_type,true);\n\t\t$criteria->compare('purchase_id',$this->purchase_id);\n\t\t$criteria->compare('input_date',$this->input_date);\n\t\t$criteria->compare('warehouse_id',$this->warehouse_id);\n\t\t$criteria->compare('input_company',$this->input_company);\n\t\t$criteria->compare('input_status',$this->input_status);\n\t\t$criteria->compare('owner_company',$this->owner_company);\n\t\t$criteria->compare('ship_no',$this->ship_no,true);\n\t\t$criteria->compare('form_sn',$this->form_sn,true);\n\t\t$criteria->compare('input_time',$this->input_time);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "334e63f47cab2ff44bb9d4f6056813e3", "score": "0.58452094", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('dependencia_id',$this->dependencia_id);\n\t\t$criteria->compare('persona_id',$this->persona_id);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "91e608c017efd06a497bfa9479aabc0d", "score": "0.5829995", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n\n $criteria = new CDbCriteria();\n\n $criteria->compare('id', $this->id);\n $criteria->compare('position', $this->position);\n $criteria->compare('countryId', $this->countryId);\n $criteria->compare('code', $this->code, true);\n $criteria->compare('localRu', $this->localRu, true);\n $criteria->compare('localEn', $this->localEn, true);\n $criteria->compare('countAirports', $this->countAirports);\n $criteria->compare('metaphoneRu', $this->metaphoneRu, true);\n $criteria->compare('metaphoneRu', $this->stateCode, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "title": "" }, { "docid": "d471d27d2b7758883aec1fa48e8b4ea7", "score": "0.5819372", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('id', $this->id, true);\n $criteria->compare('open_id', $this->open_id, true);\n $criteria->compare('content', $this->content, true);\n $criteria->compare('created', $this->created, true);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "title": "" }, { "docid": "98fdc4c7223c965fff3a0d0471a96a58", "score": "0.58160955", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('first_name',$this->first_name,true);\n\t\t$criteria->compare('last_name',$this->last_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "990c9289212e3425bce2de1cc1e9ca82", "score": "0.58119273", "text": "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4150f8e43b3afc30070066a5770dd79b", "score": "0.5809613", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('short_desc', $this->short_desc, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('unit_type_id', $this->unit_type_id);\n $criteria->compare('is_base_unit', $this->is_base_unit);\n $criteria->compare('base_unit_factor', $this->base_unit_factor);\n\n return new CActiveDataProvider(get_class($this),\n array('criteria' => $criteria,));\n }", "title": "" }, { "docid": "a5988b3b72afb2f7e132c04acc72493a", "score": "0.5802751", "text": "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('domain_id', $this->domain_id, true);\n\t\t$criteria->compare('hash', $this->hash, true);\n\t\t$criteria->compare('date', $this->hash, true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "ea7bf7b3fd67642bd14b2f61a8c2aed3", "score": "0.5802616", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('title', $this->title, true);\n $criteria->compare('status', $this->status);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => $this->paginationOptions->getPageSize(),\n 'pageVar' => 'page',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'page_id' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "title": "" }, { "docid": "9dadb2733eac14ffa7a67006d5d87c08", "score": "0.5801375", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('restaurant_id', $this->restaurant_id);\n $criteria->compare('food_id', $this->food_id, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('updated', $this->updated, true);\n $criteria->compare('order', $this->order, true);\n $criteria->compare('longitude', $this->longitude, true);\n $criteria->compare('latitude', $this->latitude, true);\n $criteria->compare('customer_id', $this->customer_id, true);\n $criteria->compare('image', $this->image, true);\n $criteria->compare('visit', $this->visit);\n\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }", "title": "" }, { "docid": "1652d68ab6ebdca3fb782a20ba28e7fb", "score": "0.5786258", "text": "public function search()\n {\n $criteria=new CDbCriteria;\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name);\n $criteria->compare('password', $this->password);\n $criteria->compare('role', $this->role);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "e7689a7fe14fc3206485187bf3758799", "score": "0.5785966", "text": "protected function init()\n {\n $this->getDataProvider()->setParam('xml', 'true');\n $this->getDataProvider()->setType('Search.ff');\n }", "title": "" }, { "docid": "571ddd61437aa2e2404a30e0cbb727a7", "score": "0.578434", "text": "public function search()\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('id',$this->id,true);\n\t\t$criteria->compare('keyword_id',$this->keyword_id,true);\n\t\t$criteria->compare('type',$this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "323b431193d09e65a068abf3ad07daa3", "score": "0.57776475", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('onset_time', $this->onset_time);\n\t\t$criteria->compare('first_attender_time', $this->first_attender_time);\n\t\t$criteria->compare('reading1_id', $this->reading1_id);\n\t\t$criteria->compare('lbbb', $this->lbbb);\n\t\t$criteria->compare('rbbb', $this->rbbb);\n\t\t$criteria->compare('hospital_arrival_time', $this->hospital_arrival_time);\n\t\t\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "7b292217814067e3815eea1aa005a955", "score": "0.57774156", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('film_festival_id', $this->film_festival_id);\n $criteria->compare('cinema_id', $this->cinema_id);\n $criteria->compare('city_id', $this->city_id);\n $criteria->compare('cinema_name', $this->cinema_name, true);\n $criteria->compare('sort_num', $this->sort_num);\n $criteria->compare('created', $this->created);\n $criteria->compare('updated', $this->updated);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "1dbd347c9c5d63893fc532e783be6776", "score": "0.57742715", "text": "public function __construct($query)\n\t\t{\n\t\t\t\n\t\t\t$this->search_query = $query;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "46f587294a5f82ccb2ecba87c1c30db2", "score": "0.57689345", "text": "public function searchTable(){\n $criteria = $this->functionCriteria(true);\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "8468e1b619cfbccb718af0abaa98a0a2", "score": "0.5756438", "text": "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('updated', $this->updated, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('parentId', $this->updated);\n $criteria->compare('type', $this->type);\n $criteria->compare('published', $this->published);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination'=>array(\n 'pageSize'=>50, //could put 1, 2, 3, 10, 20, 30, etc. however many you want to display per page.\n ),\n ));\n }", "title": "" }, { "docid": "c3ee968dd5441e2b2f4b849b2a9c8ccf", "score": "0.5752827", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('customer_custom_field_id', $this->customer_custom_field_id);\n $criteria->compare('user_id', $this->branch_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "89d605b7a88b9acef3e76318ac28661b", "score": "0.57526404", "text": "public function search($params) {\n\n $query = PollsResult::find()\n ->select('answer_id, count(`answer_id`) as `res`')\n ->joinWith('idAnswer')\n ->groupBy(['answer_id'])\n ->where(['polls-result.poll_id'=>$params['poll_id']]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "d6eb02d18889401288af26ec49153522", "score": "0.5747808", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\t$sort=new CSort;\n\t\t$sort->defaultOrder = $this->getTableAlias().'.position ASC';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>$sort\n\t\t));\n\t}", "title": "" }, { "docid": "73f80edfb1565ff812dbdbcef313ddab", "score": "0.5741822", "text": "public function search()\r\n\t{\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('name',$this->name,true);\r\n\t\t$criteria->compare('verbiage',$this->verbiage,true);\r\n\t\t$criteria->compare('category',$this->category, true);\r\n\t\t$criteria->compare('text',$this->text,true);\r\n $criteria->compare('title',$this->title,true);\r\n $criteria->compare('clinic_card',$this->clinic_card,true);\r\n $criteria->compare('keywords',$this->keywords,true);\r\n $criteria->compare('description',$this->description,true);\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "de5cd3c637f892baac1b4b747886ca4b", "score": "0.5741036", "text": "public function getSearch($data)\n {\n }", "title": "" }, { "docid": "129cc737db0eeb18b9f5f2faf4431cd0", "score": "0.57353204", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idfinding',$this->idfinding);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('weight',$this->weight,true);\n\t\t$criteria->compare('cost',$this->cost,true);\n\t\t$criteria->compare('cdate',$this->cdate,true);\n\t\t$criteria->compare('mdate',$this->mdate,true);\n\t\t$criteria->compare('updby',$this->updby);\n\t\t$criteria->compare('descri',$this->descri,true);\n $criteria->compare('size',$this->size,true);\n $criteria->compare('supplier',$this->supplier,true);\n $criteria->compare('idmetal',$this->idmetal);\n $criteria->compare('miracle',$this->miracle);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "84500ee348c94821435b8feddd6d76fb", "score": "0.57351714", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sizes_id', $this->sizes_id);\n $criteria->compare('loop_type_id', $this->loop_type_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "db9f482e8f79ad7f548d817e71c3e613", "score": "0.5730961", "text": "public function search()\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('id',$this->id);\n\t\t$criteria->compare('review_questions_id',$this->review_questions_id);\n\t\t$criteria->compare('suppliers_has_references_id',$this->suppliers_has_references_id);\n\t\t$criteria->compare('answers',$this->answers,true);\n\t\t$criteria->compare('rating',$this->rating,true);\n\t\t$criteria->compare('add_date',$this->add_date,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "00ee48ac9f5c044199d546f774d4840f", "score": "0.57301885", "text": "public function search($params)\n {\n $query = WidgetDataSearch::find();\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => ['defaultOrder' => ['id' => SORT_DESC]],\n ]);\n $this->searchSort($dataProvider);\n // load処理\n if (!$this->load($params) || !$this->validate()) {\n $query->where('0=1');\n return $dataProvider;\n }\n\n $this->searchWhere($query, $params);\n return $dataProvider;\n }", "title": "" }, { "docid": "2ad919f7e26c311e20e408b8faaffe8f", "score": "0.5729856", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('web_name', $this->web_name, true);\n $criteria->compare('web_value', $this->web_value, true);\n $criteria->compare('dos_usernames_username', $this->dos_usernames_username, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "4fb1fcf9c2a8fa1a5a5c90b1fc77e38b", "score": "0.5728902", "text": "public function search()\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('id', $this->id, true);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t//$criteria->compare('desc',$this->desc,true);\n\t\t//$criteria->compare('create_user_id',$this->create_user_id,true);\n\t\t//$criteria->compare('create_date',$this->create_date,true);\n\t\t//$criteria->compare('last_update_user_id',$this->last_update_user_id,true);\n\t\t//$criteria->compare('last_update_date',$this->last_update_date,true);\n\t\t$criteria->compare('state', $this->state);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "f4d258f472b0ea39605b572444eaa088", "score": "0.572589", "text": "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('campaignId',$this->campaignId,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('lastUpdated',$this->lastUpdated,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "3472ce946e91ee612a7c2a125f1ca8a5", "score": "0.57244813", "text": "public function newSearch($attributes = array())\n\t{\n\t\t$model = new Search();\n\t\t\n\t\tif(isset($attributes['params'])) {\n\t\t\t$attributes['params'] = json_encode($attributes['params']);\n\t\t}\n\n\t\t$model->setAttributes($attributes);\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "589216e49e4445793e890883228ea2fa", "score": "0.5722271", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('email', $this->email, true);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('str', $this->str, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "e1807882f815308a57901834466b1182", "score": "0.572179", "text": "public function search()\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('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('department',$this->department);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('content',$this->content,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('slug',$this->slug,true);\n\t\t$criteria->compare('published',$this->published);\n\t\t$criteria->compare('uploaded_by',$this->uploaded_by,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "11edd02e99ffe5835ec9f0988859bf76", "score": "0.572106", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=$this->getDbCriteria();\n\t\t\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('numberInCategory', $this->numberInCategory);\n\n\t\t\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 't.name ASC';\t\t\n\t\t\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\t\n\t\t\t'sort' => $sort,\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>20,\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "4bf701018b39b918f81666dde85e76b8", "score": "0.5710631", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('oth_descrip', $this->oth_descrip);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "47d2e26b212a4680810fb8cc4a97d2dd", "score": "0.57078975", "text": "function customsearch() {\r\n $this->dbClass();\r\n }", "title": "" }, { "docid": "fa7a4bf0a8ae97aea2a6ca58ddbcb53c", "score": "0.57043755", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('age',$this->age,true);\n\t\t$criteria->compare('education',$this->education,true);\n\t\t$criteria->compare('work_age',$this->work_age,true);\n\t\t$criteria->compare('profession',$this->profession,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "5e56b6302579d4ff4e0691a0ac16dfa4", "score": "0.5703032", "text": "public function search() {\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\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('url_price',$this->url_price,true);\n\t\t$criteria->compare('db_name',$this->db_name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "c989009079ab59b3a18567994b2d0a50", "score": "0.56978875", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('dest_id',$this->dest_id,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "91da0a58045953d98acf275eb0dec547", "score": "0.5696956", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('startAddress',$this->startAddress,true);\n\t\t$criteria->compare('endAddress',$this->endAddress,true);\n\t\t$criteria->compare('interval',$this->interval);\n\t\t$criteria->compare('des',$this->des,true);\n\t\t$criteria->compare('createDt',$this->createDt,true);\n\t\t$criteria->compare('spot',$this->spot,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "9ba76d58c06822fa3a2baff9e01649bf", "score": "0.5696395", "text": "public function search($params)\n {\n $query = Restaurant::find()->innerJoinWith(['respromotion']);\n\n\n// $query = new Query;\n// $query->select([\n// 'restaurant.ResName',\n// 'restaurant.ResLowPrice',\n// 'restaurant.ResImg',\n// 'respromotion.ResPromotionName',\n// 'respromotion.ResPromotionStart',\n// 'respromotion.ResPromotionEnd'\n// ]\n// )\n// ->from('respromotion')\n// ->join('INNER JOIN', 'restaurant',\n// 'respromotion.IDRestaurant = restaurant.IDRestaurant')\n// ->andWhere('respromotion.ResPromotionStart <= \"2018-02-20\"')\n// ->andWhere('respromotion.ResPromotionEnd >= \"2018-02-20\"')\n// ->LIMIT(50);\n//\n// $command = $query->createCommand();\n// $data = $command->queryAll();\n\n\n// print(\"<pre>\".print_r($query,true).\"</pre>\");\n\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'IDRestaurant' => $this->IDRestaurant,\n 'ResLowPrice' => $this->ResLowPrice,\n 'ResTimeStart' => $this->ResTimeStart,\n 'ResTimeEnd' => $this->ResTimeEnd,\n 'IDLocation' => $this->IDLocation,\n 'IDUser' => $this->IDUser,\n ]);\n\n $query->andFilterWhere(['like', 'ResName', $this->ResName])\n ->andFilterWhere(['like', 'ResAddress', $this->ResAddress])\n ->andFilterWhere(['like', 'ResStatus', $this->ResStatus])\n ->andFilterWhere(['like', 'ResTel', $this->ResTel])\n ->andFilterWhere(['like', 'ResImg', $this->ResImg])\n ->andFilterWhere(['like', 'latlng', $this->latlng])\n ->andFilterWhere(['like', 'LoginType', $this->LoginType]);\n\n $query->andFilterWhere(['<=','respromotion.ResPromotionStart',$this->ResPromotionStart])\n ->andFilterWhere(['>=','respromotion.ResPromotionEnd',$this->ResPromotionEnd]);\n\n return $dataProvider;\n// return $query;\n\n }", "title": "" }, { "docid": "f3ef3c0e3ec3ce0f9b396e3105c25cac", "score": "0.5696036", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('template_name_ua', $this->template_name_ua, true);\n $criteria->compare('template_name_ru', $this->template_name_ru, true);\n $criteria->compare('template_name_en', $this->template_name_en, true);\n $criteria->compare('description_ua', $this->description_ua, true);\n $criteria->compare('description_ru', $this->description_ru, true);\n $criteria->compare('description_en', $this->description_en, true);\n $criteria->compare('id_organization', $this->id_organization, true);\n $criteria->compare('id_checking_account', $this->id_checking_account, true);\n $criteria->compare('duration', $this->duration, true);\n $criteria->compare('start_date', $this->start_date, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "6ad707648c8ccae79cb2789bd080e4d0", "score": "0.5692435", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('fake_code',$this->fake_code,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('sale_off_price',$this->sale_off_price,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('search_type',$this->search_type,true);\n\t\t$criteria->compare('is_promoted',$this->is_promoted);\n\t\t$criteria->compare('is_favorited',$this->is_favorited);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "7031c0b56ca980e6ab08c5791c5bb4cc", "score": "0.56902206", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type);\n\t\t//$criteria->compare('ctime',date('Y-m-d', $this->ctime));\n\t\t$criteria->compare('remark',$this->remark,true);\n\t\t$criteria->compare('fid',$this->fid);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" } ]
585b1993f9df8a19e0bee6012bbd8c9c
Getter of Trailer The trailer of the movie or TV series, season, or episode.
[ { "docid": "7be4201293783e670ce39e71a68d0821", "score": "0.6761072", "text": "public function getTrailer();", "title": "" } ]
[ { "docid": "4cae2079900ee0c6bbe207b7a4a68cc9", "score": "0.7483193", "text": "public function getTrailer()\n {\n return $this->trailer;\n }", "title": "" }, { "docid": "a2ade2a04f9e94ea493e11062c5be1d8", "score": "0.74450433", "text": "public function getTrailer() {\n\t\t$trailers = $this->getTrailers();\n\t\treturn $trailers['youtube'][0]['source'];\n\t}", "title": "" }, { "docid": "a25387d2754c259afabfb43b8baf9960", "score": "0.7142459", "text": "public function getTrailers()\r\n {\r\n //get video title and IMDBID values from Catalogue DB\r\n $imdbMetadata = Catalogue::get()->setQueriedColumns(['Title' , 'IMDBID', 'Type'])->byID($this->slug);\r\n\r\n if ($imdbMetadata !== null) {\r\n\r\n //set type because tmdb uses 'tv' instead of 'series'\r\n $type = $imdbMetadata->Type;\r\n if($imdbMetadata->Type == 'series'){\r\n $type = 'tv';\r\n }\r\n\r\n $apiSetupString = 'https://api.themoviedb.org/3/';\r\n $tmdbAPIKey = 'api_key=' . self::$TMDBAPIKey;\r\n\r\n // get ID from tmddb.org\r\n try {\r\n\r\n $apiURL = $apiSetupString. 'find/'.$imdbMetadata->IMDBID.'?'.$tmdbAPIKey.'&external_source=imdb_id';\r\n\r\n $json = file_get_contents($apiURL);\r\n $data = json_decode($json);\r\n\r\n } catch (Exception $e) {\r\n user_error('There was an issue connecting to the omdb API: ' . $e);\r\n }\r\n\r\n // now get trailers from id\r\n try {\r\n $id = $data->{$type.'_results'}[0]->{'id'};\r\n\r\n $apiURL = $apiSetupString. $type.'/'.$id.'/videos?'.$tmdbAPIKey;\r\n $json = file_get_contents($apiURL);\r\n $data = json_decode($json);\r\n\r\n\r\n $trailerKeysArray = array_keys(array_column($data->{'results'}, 'type'), 'Trailer');\r\n $trailersArray = ArrayList::create();\r\n\r\n foreach($trailerKeysArray as $value){\r\n $trailersArray->push(ArrayData::create((array)$data->{'results'}[$value]));\r\n }\r\n\r\n return $trailersArray;\r\n } catch (Exception $e) {\r\n user_error('There was an issue connecting to the tmdb API: ' . $e);\r\n }\r\n\r\n return;\r\n\r\n }\r\n }", "title": "" }, { "docid": "57f2fa928d1b2e6d972acb822c643a9c", "score": "0.6611639", "text": "public function getTrailers() {\n\t\treturn $this->_data['trailers'];\n\t}", "title": "" }, { "docid": "90fd48643b8a54ff51ccc54ff424b752", "score": "0.6215195", "text": "public static function getMovieTrailer(int $id)\n {\n $movie = Movie::where([['movies.public', '=', '1'], ['movies.id', '=', $id]])\n ->join('videos', 'videos.id', '=', 'movies.trailer')\n ->select(\n 'movies.id as id',\n 'movies.title as title',\n 'videos.name as video_name',\n 'videos.storage as video_storage',\n )\n ->first();\n\n return $movie;\n }", "title": "" }, { "docid": "e4ccd0782f34700ff506bdfac0f0bdbc", "score": "0.6022793", "text": "public static function getSeasonTrailer(int $id)\n {\n $season = Seasons::where([['series.public', '=', '1'], ['seasons.id', '=', $id]])\n ->join('series', 'seasons.series_id', '=', 'series.id')\n ->join('videos', 'videos.id', '=', 'seasons.trailer')\n ->first([\n 'series.title as series_title',\n 'seasons.title as season_title',\n 'series.id as series_id',\n 'videos.name as video_name',\n 'videos.storage as video_storage',\n ]);\n\n return $season;\n }", "title": "" }, { "docid": "5f02d1bcd9366e6054d823c5e0597c79", "score": "0.58737636", "text": "public function trailer($value)\n {\n $this->setProperty('trailer', $value);\n return $this;\n }", "title": "" }, { "docid": "5f02d1bcd9366e6054d823c5e0597c79", "score": "0.58737636", "text": "public function trailer($value)\n {\n $this->setProperty('trailer', $value);\n return $this;\n }", "title": "" }, { "docid": "260c5a87447e6b382e6af2b3cf765063", "score": "0.5434571", "text": "public function setTrailer(CnabTrailerInterface $trailer)\n {\n $this->trailer = $trailer;\n }", "title": "" }, { "docid": "c668e3f4ee93b93590cb4352648abb35", "score": "0.5327989", "text": "function scrapeRottenTomatoes($trailerRef) \r\n{\t\t\r\n\t// request trailer-ref json data and decode\r\n\t$trailerData = json_decode(file_get_contents($trailerRef), true);\r\n\tunset($trailerRef);\r\n\tif (!$trailerData) \r\n\t\treturn null;\t\r\n\t\r\n\t// parse url\r\n\t$mobileURL = str_replace('/m', '/mobile/m', $trailerData['links']['alternate']);\r\n\t$mobileURL = str_replace('trailers/', '', $mobileURL);\r\n\t\r\n\t// load trailer page html\r\n\t$html = new simple_html_dom();\r\n\t$html->load_file($mobileURL);\r\n\tunset($trailerData, $mobileURL);\r\n\t\r\n\t// find trailer button\r\n\t$a = $html->find('.trailerbutton', 0);\r\n\tunset($html);\r\n\t\r\n\t// return button href\r\n\treturn $a->href;\r\n}", "title": "" }, { "docid": "742c4f30846b109ce2f0ab350d8afd81", "score": "0.5064159", "text": "public function getTaille()\n {\n return $this->taille;\n }", "title": "" }, { "docid": "742c4f30846b109ce2f0ab350d8afd81", "score": "0.5064159", "text": "public function getTaille()\n {\n return $this->taille;\n }", "title": "" }, { "docid": "742c4f30846b109ce2f0ab350d8afd81", "score": "0.5064159", "text": "public function getTaille()\n {\n return $this->taille;\n }", "title": "" }, { "docid": "e9ae1767cb706cd0ae421e95efe43f49", "score": "0.50488937", "text": "private function getTrailerTypes() {\n\t\t$trailerTypes = array();\n\t\t$trailerTypes = $this->Vehicle->fetchTrailerTypes();\n\t\t$i = 0;\n\t\tforeach($trailerTypes as $trailer ) {\n\t\t\t$trailerTypes[$i]['name'] = str_replace(',',' ',$trailer['name']);\n\t\t\t$i++;\n\t\t}\n\t\treturn $trailerTypes;\n\t}", "title": "" }, { "docid": "8bb0f9b81b73fc6eccf7ed6e5b68bf45", "score": "0.50111055", "text": "public function getTaille()\n {\n return $this->taille;\n }", "title": "" }, { "docid": "94e1eab4ae99e78a772e402b08418b7e", "score": "0.49980924", "text": "public function getTaille() {\n\t\treturn $this->taille;\n\t}", "title": "" }, { "docid": "8d693c12660ea59a58c09c9291fa593f", "score": "0.49728516", "text": "public function getTaille() {\r\n\t\treturn $this->taille;\r\n\t}", "title": "" }, { "docid": "a67495537ec56c82b151f583f848a3fb", "score": "0.47318363", "text": "public function getTardeterca()\r\n {\r\n return $this->tardeterca;\r\n }", "title": "" }, { "docid": "54a27595f470a09986069be0aca546a6", "score": "0.47185513", "text": "public function getTerentra()\n {\n return $this->terentra;\n }", "title": "" }, { "docid": "085116be96e9a5137d22989ce218a935", "score": "0.46092522", "text": "public function getMovies()\n {\n return $this->movies;\n }", "title": "" }, { "docid": "3038312329487b6afd260b51d6eb7a83", "score": "0.4569273", "text": "public function getTravel(): Travel\n {\n return $this->travel;\n }", "title": "" }, { "docid": "17bdf4fef5fd529df328f1ce135027b8", "score": "0.45385808", "text": "public function getMetadata()\n {\n if ($this->_trailer->Root->Metadata !== null) {\n return $this->_trailer->Root->Metadata->value;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "7a057714b6df3b6914a80993747fca9a", "score": "0.45260033", "text": "public function getDirector()\r\n {\r\n return $this->director;\r\n }", "title": "" }, { "docid": "52abd5973d16a1d99899159f71529535", "score": "0.45233458", "text": "public function getTimeline()\n {\n return $this->timeline;\n }", "title": "" }, { "docid": "693c15b19f0546b7d8f1f8a719b7bcf8", "score": "0.45197445", "text": "public function get_turma()\n {\n // loads the associated object\n if (empty($this->turma))\n $this->turma = new turma($this->turma_id);\n \n // returns the associated object\n return $this->turma;\n }", "title": "" }, { "docid": "3aecc447a80f24e0fb6d1ebd48725ba5", "score": "0.45071116", "text": "public function lastWatchedMovie()\n {\n $request_url = \"{$this->trakt_url}/users/{$this->trakt_user}/history/movies\";\n $request = $this->curl->get($request_url);\n\n if (!$this->curl->error) {\n $movie = $this->curl->response[0];\n return $movie;\n }\n\n return false;\n }", "title": "" }, { "docid": "1609d9bd2d26a54be6db586e1f3a7f2f", "score": "0.4501664", "text": "public function getLivro()\n\t{\n\t\treturn $this->livro;\n\t}", "title": "" }, { "docid": "561b4cfaf3ac44a07bdfa630567fb4e8", "score": "0.44711363", "text": "public function getTimelineType()\n {\n return $this->timeline_type;\n }", "title": "" }, { "docid": "2472adb5614d80a6b44f7e42422fccd0", "score": "0.4468323", "text": "public function getRace()\n {\n return $this->race;\n }", "title": "" }, { "docid": "2472adb5614d80a6b44f7e42422fccd0", "score": "0.4468323", "text": "public function getRace()\n {\n return $this->race;\n }", "title": "" }, { "docid": "e30310d3cbd306f4cff6d6f8be9aede4", "score": "0.44664606", "text": "public function getTimeline() {\n\t\treturn $this->timeline;\n\t}", "title": "" }, { "docid": "00bb6d156523a7eb2b3f2e1c6d0882a8", "score": "0.44474223", "text": "public function getTimeline()\n\t{\n\t\treturn $this->timeline;\n\t}", "title": "" }, { "docid": "bbdd02719c001d0c8eebc8760f60e2f6", "score": "0.4429617", "text": "function getTariff() {\n\t\treturn $this->_Tariff;\n\t}", "title": "" }, { "docid": "d6ca9240752106ebba51b70061e7630e", "score": "0.44295076", "text": "public function getVideo()\n {\n return $this->video;\n }", "title": "" }, { "docid": "d6ca9240752106ebba51b70061e7630e", "score": "0.44295076", "text": "public function getVideo()\n {\n return $this->video;\n }", "title": "" }, { "docid": "3cde92b168be4d7f88614e7c66879db9", "score": "0.44138572", "text": "public function getHasTvShows ()\r\n {\r\n return $this->hasTvShows;\r\n }", "title": "" }, { "docid": "c86c2acb34b1217545f6cf3ad1c84688", "score": "0.44060516", "text": "public function getLivre() \n {\n return $this->livre;\n }", "title": "" }, { "docid": "ef0b4ae77be9c56f1309478e5cbd8b94", "score": "0.43941256", "text": "public function getCourseVideo() {\n\t\treturn ($this->courseVideo);\n\t}", "title": "" }, { "docid": "c6dab9ca25169de40227d18e762f8499", "score": "0.43895125", "text": "public function getCar() {\n return $this->car;\n }", "title": "" }, { "docid": "6437740436257b34f1f45a04fa93673f", "score": "0.43793443", "text": "function getMovie() {\n\t\tif ( !$this->_Movie instanceof mofilmMovie ) {\n\t\t\t$this->_Movie = mofilmMovieManager::getInstanceByID($this->getMovieID());\n\t\t}\n\t\treturn $this->_Movie;\n\t}", "title": "" }, { "docid": "e39158f0f61d3d6979aec86f589aa513", "score": "0.43715033", "text": "public function latest_movie()\n\t{\n\t\t$data = $this->request('Movie.getLatest', null);\n\t\treturn $data[0];\n\t}", "title": "" }, { "docid": "9e3ac4f9e3a4de5657f81cef8a6328b1", "score": "0.43705523", "text": "public function getMovie()\n {\n $movieRepository = new MovieRepository();\n $movie = $movieRepository->getOneById($this->movieId);\n\n return $movie;\n }", "title": "" }, { "docid": "0d360e32a1f39a7c3fd4fb7488e80c74", "score": "0.4345988", "text": "public function getRevisionsTimelineView()\n {\n return $this->revisionsTimelineView;\n }", "title": "" }, { "docid": "e2288d9b32a3e55db067c71344d81ae2", "score": "0.43454334", "text": "public function getTariff()\n {\n return $this->_get('v1/tariff/');\n }", "title": "" }, { "docid": "d5bed073ec4cf901b3bbf1a8b807d75c", "score": "0.43386203", "text": "public function getVideo()\n {\n return $this->get('video');\n }", "title": "" }, { "docid": "6217f1ea1b0c8cbc82eceefb972ad2b3", "score": "0.4329941", "text": "public function getRazon()\n {\n return $this->_razon;\n }", "title": "" }, { "docid": "632c08671a07850ad19b58ee325e5d9f", "score": "0.43137982", "text": "public function getReceptionsYards()\n {\n return $this->receptions_yards;\n }", "title": "" }, { "docid": "85491a1e1e2ff75d99da655c2b52e10b", "score": "0.43114403", "text": "protected static function Movie() {\n\t\tif (self::usingProxy()) {\n\t\t\treturn VCDClassFactory::getInstance('SoapMovieProxy');\n\t\t} else {\n\t\t\treturn VCDClassFactory::getInstance('vcd_movie');\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1fe371e0f3011eba352e58796e8ffe4c", "score": "0.43068427", "text": "public function getArtista()\r\n {\r\n return $this->artista;\r\n }", "title": "" }, { "docid": "6277123589ce06024537af57d826917c", "score": "0.4292733", "text": "public function getMovieId()\n {\n return $this->movieId;\n }", "title": "" }, { "docid": "a2fe9c2c0da114e1f937e038aa95cb11", "score": "0.42902902", "text": "public function getPersMovil()\n {\n return $this->pers_movil;\n }", "title": "" }, { "docid": "3569ea7385f4688e247973477df3d8a3", "score": "0.42867193", "text": "function getMovieID() {\n\t\treturn $this->_MovieID;\n\t}", "title": "" }, { "docid": "3569ea7385f4688e247973477df3d8a3", "score": "0.42867193", "text": "function getMovieID() {\n\t\treturn $this->_MovieID;\n\t}", "title": "" }, { "docid": "888a294ad88ac26e6ba0ae6939d8431c", "score": "0.428603", "text": "public function getCar()\n {\n return $this->_car;\n }", "title": "" }, { "docid": "7a70171d6cf6f5e82af8a654911d1590", "score": "0.42828378", "text": "public function getTours()\n {\n return $this->tours;\n }", "title": "" }, { "docid": "bbd9247d741e9255cd0b00e2d50359fd", "score": "0.427999", "text": "public function get_teacher()\r\n {\r\n return $this->teacher;\r\n }", "title": "" }, { "docid": "4e31c3dc22f327a9326844c45cf79e8c", "score": "0.42784756", "text": "public function getVehicle() {\n return $this->vehicle;\n }", "title": "" }, { "docid": "84a30259af5f8822857f94476790d09b", "score": "0.42776543", "text": "function getMovie() {\n\t\tif ( !$this->_Movie instanceof mofilmMovie ) {\n\t\t\tif ( $this->getMovieID() ) {\n\t\t\t\t$this->_Movie = mofilmMovieManager::getInstance()->setLoadOnlyActive(false)->getMovieByID($this->getMovieID());\n\t\t\t} elseif ( $this->getSearchResult() ) {\n\t\t\t\t$this->_Movie = $this->getSearchResult()->getFirstResult();\n\t\t\t}\n\t\t}\n\t\treturn $this->_Movie;\n\t}", "title": "" }, { "docid": "9bb050539e0cfe97dd582934e35aa10b", "score": "0.4266253", "text": "public function getSubRace()\n {\n return $this->race->getSubRace();\n }", "title": "" }, { "docid": "bdacb5143cf26123b31270abae2436d9", "score": "0.4264178", "text": "public function getRace(): ?RaceModel\n {\n return $this->getRelation('race');\n }", "title": "" }, { "docid": "04a6f192c29f197fc2c6184b900fd03b", "score": "0.42631882", "text": "public function getReaderAttribute()\n {\n if (auth()->check()) {\n $reader = $this->readers()->where('forum_threads_read.user_id', auth()->user()->getKey())->first();\n\n return (!is_null($reader)) ? $reader->pivot : null;\n }\n\n return null;\n }", "title": "" }, { "docid": "abd84a45a654f4775b72044dd6592888", "score": "0.42585152", "text": "public function revisions()\n {\n $revisions = 1;\n $currentTrailer = $this->_trailer;\n\n while ($currentTrailer->getPrev() !== null && $currentTrailer->getPrev()->Root !== null ) {\n $revisions++;\n $currentTrailer = $currentTrailer->getPrev();\n }\n\n return $revisions++;\n }", "title": "" }, { "docid": "d1855e780886490a2793fcb26b65a891", "score": "0.42408", "text": "public function getTechnologies()\n {\n return $this->technologies;\n }", "title": "" }, { "docid": "3d52003599e46caab4cf92f5d94bce1a", "score": "0.42144102", "text": "public function getTimetabledStopVisitCancellation()\n {\n return $this->timetabledStopVisitCancellation;\n }", "title": "" }, { "docid": "7b7339d70f6648b53b3412f597f7c32f", "score": "0.4214099", "text": "public function getTiers()\n {\n return $this->tiers;\n }", "title": "" }, { "docid": "cce83073952b9be265b6ebf5011cf095", "score": "0.42089176", "text": "public function getMovies() {\n $json = file_get_contents('http://' . \"titan.csit.rmit.edu.au\" . \"/~e54061/wp/moviesJSON.php\");\n $movies = json_decode($json);\n return $movies;\n }", "title": "" }, { "docid": "9bd34bebba46d7cea03446afa527d266", "score": "0.4206477", "text": "public function getTarifs()\n {\n return $this->tarifs;\n }", "title": "" }, { "docid": "897063fc16bc712c05113dae8e465f9c", "score": "0.42055243", "text": "public function getStationaryCamera()\n {\n return $this->stationary_camera;\n }", "title": "" }, { "docid": "0ffecc01b5f9e4d9b0c9de91b8b21378", "score": "0.41953632", "text": "function getLyrics() {\n\t\t\t$cache = $this->readCache();\n\t\t\treturn $cache[19];\n\t\t}", "title": "" }, { "docid": "c28af671966fc89de25666d7ae642ed1", "score": "0.41839936", "text": "public function getTechnoRecolteCire()\n {\n return $this->technoRecolteCire;\n }", "title": "" }, { "docid": "2c04cf67c2b272bdfec89fb69a86d8f7", "score": "0.41829112", "text": "public function isYoutube()\n {\n return $this->youtube;\n }", "title": "" }, { "docid": "177e0dc38a92c27948325fdf899a99f5", "score": "0.4181197", "text": "public function getIdTeatro()\n {\n return $this->idteatro;\n }", "title": "" }, { "docid": "0ddab9505b34bb67845878e1c82ec17e", "score": "0.41655883", "text": "public function getTariffTitle()\n {\n return isset($this->TariffTitle) ? $this->TariffTitle : null;\n }", "title": "" }, { "docid": "a71533bf75bc25d7e1ad8ae7a3afcf8a", "score": "0.41595772", "text": "public function getSelectedCarer() {\n\n $carers = $this->getAssociatedCarers(MissionCarers::SELECTED);\n return $carers[0];\n }", "title": "" }, { "docid": "b9dff55a98742bf680df2afbd60bd77b", "score": "0.415016", "text": "public function getTrained()\r\n {\r\n return $this->_trained;\r\n }", "title": "" }, { "docid": "ee89d2c8530586439417b13d8de7337e", "score": "0.41462556", "text": "public function getRazsoc(){\n\t\treturn $this->razsoc;\n\t}", "title": "" }, { "docid": "634f92137a21a8d6df0defb900f66bb6", "score": "0.41365662", "text": "public function getVersiculo()\n\t{\n\t\treturn $this->versiculo;\n\t}", "title": "" }, { "docid": "bc92eda896dd693c76408af0df11f3d0", "score": "0.41256392", "text": "public function getLivret()\n {\n return $this->_livret;\n }", "title": "" }, { "docid": "9e04fd16d476203b50c8da63adcff102", "score": "0.41220084", "text": "public function getTurmaId(){\n\t\t\treturn $this->turmaId;\n\t\t}", "title": "" }, { "docid": "629636f4f9032ede99a981eab453ad96", "score": "0.4109029", "text": "public function recent()\n {\n if (config()->get('auth.providers.users.table') === 'customers') {\n return $this->belongsTo(Customer::class)->where('customers.id', auth()->user()->id);\n } else {\n return $this->belongsToMany(Customer::class, 'recently_viewed_videos');\n }\n }", "title": "" }, { "docid": "ffff035d09fa0a09696b56f228bd5898", "score": "0.4107321", "text": "public function getTOW()\n {\n return $this->tow;\n }", "title": "" }, { "docid": "34f008d921ef5955e340fc9d6c006e86", "score": "0.41033491", "text": "public function getServido()\n\t {\n\t return $this->Servido;\n\t }", "title": "" }, { "docid": "2d053ca84647b8154940c1602a4ba14f", "score": "0.40970102", "text": "public function lastTerm()\n {\n $contract = Contract::where('contractor_id',$this->id)->where('deleted',0)->orderBy('created_at','desc')->first();\n $term = (!empty($contract)) ? Term::find($contract->term_id) : null;\n return $term;\n }", "title": "" }, { "docid": "57ee036554642b44e696480b57711c05", "score": "0.40864363", "text": "public function getId_trajeto()\n {\n return $this->id_trajeto;\n }", "title": "" }, { "docid": "8bd4c1e59c30b5f3615863e56afe6d7b", "score": "0.4085448", "text": "protected function getMovie()\n {\n return new Movie;\n }", "title": "" }, { "docid": "79c212159d6dda23c2d2b2521dbf19cb", "score": "0.4067066", "text": "public function getSite()\n {\n return $this->site->getSite().\"<br>&nbsp;&nbsp;Video\";\n }", "title": "" }, { "docid": "2e7db8f7601260f2a843c1a2299ed720", "score": "0.4058255", "text": "public function teacher() : Teacher\n {\n return new Teacher($this->creator);\n }", "title": "" }, { "docid": "69832056581a066dadc38ee23926c04c", "score": "0.40580514", "text": "public function videoThumbnail() {\n\t\tif($this->video) {\n\t\t\treturn \\Thinker::getVideoThumb($this->video);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "7fda4cc009a091867b5f11f11bfcdb5b", "score": "0.4057613", "text": "public function races()\n {\n return $this->morphToMany('App\\Models\\Race', 'competitor');\n }", "title": "" }, { "docid": "e31509b60ff454c0fbddef2bd7626e4b", "score": "0.40547013", "text": "public function getYear()\n {\n return intval($this->tags['TYER']);\n }", "title": "" }, { "docid": "d36959d685343802a1828e88bc718da4", "score": "0.40538445", "text": "public function getRastreio() {\n return !empty($this->rastreio) ? $this->rastreio : null;\n }", "title": "" }, { "docid": "cea078f27f5a303dcd85785556e3531d", "score": "0.4052271", "text": "public function getVideo()\n {\n return $this->getEntity()->getData($this->getAttribute()->getData('attribute_code'));\n }", "title": "" }, { "docid": "e9d7266d7aef4db6d80cff530c296c90", "score": "0.4051528", "text": "public function getTranspiler() {\n\t\treturn $this->transpiler;\n\t}", "title": "" }, { "docid": "2b35ac199819df7b0e641dcd940024dd", "score": "0.40479445", "text": "public function getTimetabledStopVisit()\n {\n return $this->timetabledStopVisit;\n }", "title": "" }, { "docid": "e39583569b7ec53ba44b69534d8621d3", "score": "0.4045754", "text": "public function torneo()\n {\n return $this->belongsTo('App\\Torneo', 'torneo_id');\n }", "title": "" }, { "docid": "0d2e7c76cc51f0595f4755734726d338", "score": "0.4043664", "text": "public function getTeachersProperty()\n {\n return Teacher::with(['level', 'user', 'state', 'lga'])->search(trim($this->searchString))->latest()->paginate(10);\n }", "title": "" }, { "docid": "65b542878b39d5144923eb182cd5c7df", "score": "0.40413088", "text": "public function race()\n {\n return $this->hasOne(RaceModel::class, RaceModel::ATTRIBUTE_ID, static::ATTRIBUTE_RACE_ID);\n }", "title": "" }, { "docid": "4eef1de7bf8301369e973b956fa59dba", "score": "0.40366587", "text": "public function getReaderAttribute()\n {\n if (!is_null(Utils::getCurrentUser()))\n {\n $reader = $this->readers()->where('user_id', '=', Utils::getCurrentUser()->id)->first();\n\n return (!is_null($reader)) ? $reader->pivot : null;\n }\n\n return null;\n }", "title": "" }, { "docid": "2be6c8a236ea79a1425d7ea47adeab92", "score": "0.4035019", "text": "public function getQuantiteLiv() {\n return $this->quantiteLiv;\n }", "title": "" }, { "docid": "702fe2195fadca6b34cb5e24c631c3a1", "score": "0.40332773", "text": "public function getArtist()\n {\n // return artists\n return $this->artist;\n }", "title": "" } ]
6718c23d3658eaabaa9e53da06111eab
return request array with snake case keys
[ { "docid": "be042465cd81907e7b8973437b934741", "score": "0.72843397", "text": "public function getSnakeCaseArray()\n {\n return $this->recursiveChangeKey(get_object_vars($this), self::SNAKE_CASE);\n }", "title": "" } ]
[ { "docid": "d2ef207a5c9108b9704060205a89b4a7", "score": "0.67144203", "text": "public function snakeCaseProvider()\n {\n return [\n ['one two three', 'one_two_three'],\n ['one.two.three', 'one_two_three'],\n ['oneTwoThree', 'one_two_three'],\n ['OneTwoThree', 'one_two_three'],\n ];\n }", "title": "" }, { "docid": "95eb5d33d30f5b405db58520def2b647", "score": "0.6586198", "text": "public function dataCamelCase()\n {\n $result = array();\n $result[] = array('some day', 'SomeDay');\n $result[] = array('UFO Village', 'UFOVillage');\n $result[] = array('strange-function', 'StrangeFunction');\n $result[] = array('test.class', 'TestClass');\n $result[] = array('some_string', 'SomeString');\n\n return $result;\n }", "title": "" }, { "docid": "d47879e7e923c553b228c6b5a71f12c4", "score": "0.62817246", "text": "function array_keys_to_snake_case(Array $array)\n {\n $returnArray = [];\n foreach ($array as $key => $value) {\n\n if (is_array($value)) {\n $returnArray[snake_case($key)] = array_keys_to_snake_case($value);\n } else {\n $returnArray[snake_case($key)] = $value;\n }\n }\n return $returnArray;\n }", "title": "" }, { "docid": "6ebc1cbc4cde1e892224c76d08efa291", "score": "0.6237584", "text": "public static function lowerKeys($array) {\n\t\treturn array_change_key_case($array);\n\t}", "title": "" }, { "docid": "3d6ae98dc52ec638bcb65db456977bb7", "score": "0.61510783", "text": "function lowercaseArrayKeys($array) {\n \n return array_key_change_case($array, CASE_LOWER);\n}", "title": "" }, { "docid": "3c8907c0802d1914bbfd30845e0650a3", "score": "0.609171", "text": "private static function lowercase_headers(array $headers) : array {\n\t\treturn array_change_key_case($headers);\n\t}", "title": "" }, { "docid": "ba7f40666ea042808b6f08991014c999", "score": "0.60435945", "text": "public function snakeKeys($array)\r\n {\r\n $result = [];\r\n foreach ($array as $key => $value) {\r\n if (is_array($value)) {\r\n $value = $this->snakeKeys($value);\r\n }\r\n $result[Str::snake($key)] = $value;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "1ebd89692d19afbd7088208344667c11", "score": "0.602485", "text": "function _keysToLowerCase($map) {\r\n $lower = array();\r\n foreach ($map as $key => $value) {\r\n $lower[strtolower($key)] = $value;\r\n }\r\n return $lower;\r\n }", "title": "" }, { "docid": "580346db27187e49eb665b4d503580a1", "score": "0.6001963", "text": "function array_keys_camel2snake(array $array)\n{\n foreach ($array as $key => &$sub) {\n if (preg_match('/(?<!^)[A-Z]/', $key)) {\n $newKey = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $key));\n $array[$newKey] = $sub;\n unset($array[$key]);\n } else if (is_array($sub)) {\n $sub = array_keys_camel2snake($sub);\n }\n }\n return $array;\n}", "title": "" }, { "docid": "0b9c0894ce8e631dafcb25bf697eac29", "score": "0.5975084", "text": "public function getCamelCaseArray()\n {\n return $this->recursiveChangeKey(get_object_vars($this));\n }", "title": "" }, { "docid": "dcbc2a784e3931b1a73522698bf52fd9", "score": "0.59168124", "text": "public function keys(Request $request)\n {\n $validator = Validator::make( $request->all(), [\n 'lang' => 'required|string',\n 'keys' => 'required'\n ] );\n\n if ( $validator->fails() ) {\n return response()->json( ['status' => 0, 'error' => $validator->errors()->all()], 406 );\n }\n\n $lang = $request->input('lang');\n $keys = $request->input('keys');\n\n // get keys\n $result = [];\n\n foreach ($keys as $key) {\n $result[$key] = trans($key, [], '', $lang);\n }\n\n return [\n 'status' => 1,\n 'result' => $result\n ];\n }", "title": "" }, { "docid": "18315caabe1b1eeadab3059d4e898c68", "score": "0.5876434", "text": "function array_keys_to_camel_case(Array $array)\n {\n $returnArray = [];\n foreach ($array as $key => $value) {\n\n if (is_array($value)) {\n $returnArray[camel_case($key)] = array_keys_to_camel_case($value);\n } else {\n $returnArray[camel_case($key)] = $value;\n }\n }\n return $returnArray;\n }", "title": "" }, { "docid": "54ebd7ee3c287827adec39c529444b2f", "score": "0.5850218", "text": "function getKeys()\n { \n return is_array($this->params[\"keyname\"]) ? $this->params[\"keyname\"] : explode(\",\", $this->params[\"keyname\"]);\n }", "title": "" }, { "docid": "cd3ff042e50fc2ab38d4b9751d7cbbe5", "score": "0.5804049", "text": "function array_keys_snake2camel(array $array)\n{\n foreach ($array as $key => &$sub) {\n if (strpos($key, '_') !== false) {\n $newKey = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $key))));\n $array[$newKey] = $sub;\n unset ($array[$key]);\n } elseif (is_array($sub)) {\n $sub = array_keys_snake2camel($sub);\n }\n }\n\n return $array;\n}", "title": "" }, { "docid": "b0ab4e4771d7e799e24283297b60e01e", "score": "0.5787742", "text": "protected function getRequestNames()\n {\n \tif (!$this->requestNames) {\n \t\t$this->setRequestNames();\n \t}\n\n \treturn $this->requestNames;\n }", "title": "" }, { "docid": "f52543a45b99ef23c795da1f036ff5f7", "score": "0.5766441", "text": "public function getArray(){\n\t\t$array = array();\n\t\tforeach ($this as $key => $value) {\n\t\t\t$array[substr($key, 1)] = $value;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "cde8f7a638508da020a18509158ef8c3", "score": "0.57446015", "text": "private function getRequestFunctions(): array\n {\n $functions = ['full' => ''];\n foreach ($this->request->all() as $key => $value) {\n $functions['full'] .= $this->formatRequestParam($key) . $this->formatRequestParam($value);\n if (!isset($functions[$key])) {\n $functions[$key] = [];\n }\n $functions[$key][] = lcfirst($this->formatRequestParam($key) . $this->formatRequestParam($value));\n $functions[$key][] = lcfirst($this->formatRequestParam($key));\n }\n $functions['full'] = lcfirst($functions['full']);\n return $functions;\n }", "title": "" }, { "docid": "da1629082dffd05e5a69c00249a8537f", "score": "0.5720471", "text": "public function getKeys(): array;", "title": "" }, { "docid": "da1629082dffd05e5a69c00249a8537f", "score": "0.5720471", "text": "public function getKeys(): array;", "title": "" }, { "docid": "1e552b05f9cde77b02f6be9b195d42fd", "score": "0.57070434", "text": "function array_keys_to_ucfirst(Array $array)\n {\n $returnArray = [];\n foreach ($array as $key => $value) {\n\n if (is_array($value)) {\n $returnArray[ucfirst($key)] = array_keys_to_ucfirst($value);\n } else {\n $returnArray[ucfirst($key)] = $value;\n }\n }\n return $returnArray;\n }", "title": "" }, { "docid": "d2e2bfba1c0b3b1553c1042d95bcf9d8", "score": "0.5700735", "text": "public static function getNames(): array;", "title": "" }, { "docid": "66c8a284273b3cbc1b4f7cbe465bd670", "score": "0.56813276", "text": "function to_camel_case(array $data): array\n{\n $out = [];\n foreach ($data as $key => $sub) {\n $out[Str::camel($key)] = is_array($sub) ? to_camel_case($sub) : $sub;\n }\n\n return $out;\n}", "title": "" }, { "docid": "c2983a06f58b3b98f2ca4d399fe2bb71", "score": "0.56794375", "text": "protected function convertHeaderNameToLowerCase()\n {\n foreach ($this->headers as $name => $header) {\n $name = strtolower($name);\n $this->headerLowercase[$name] = $header;\n }\n return $this->headerLowercase;\n }", "title": "" }, { "docid": "6827636e08c9ed45efb3773704ecfddc", "score": "0.560177", "text": "public function changeKeyNames(){\n\n $this->finalArr = array_map(function($arr) {\n\n return array(\n 'id' => $arr[0],\n 'weight' => $arr[1],\n 'value' => $arr[2],\n 'W/V' => $arr[3]\n );\n }, $this->finalArr);\n\n }", "title": "" }, { "docid": "99f21e1ea3d821635b11b36e9bc694e0", "score": "0.55969447", "text": "function array_change_key_case_rec( $input, $case=CASE_LOWER ) {\n if (!is_array($input))\n return $input;\n\n $newArray = array_change_key_case($input, $case);\n\n foreach ($newArray as $key => $array){\n if (is_array($array)){\n $newArray[$key] = array_change_key_case_rec($array, $case);\n }\n }\n return $newArray;\n }", "title": "" }, { "docid": "135433afcc19b572fec54f73966a37d4", "score": "0.55508536", "text": "public function getIgnoreCase();", "title": "" }, { "docid": "2dc17184caea10daca5aa4c2c8fed277", "score": "0.55501074", "text": "function array_change_case($params,$case=CASE_UPPER) {\n $params = array_change_key_case($params, $case);\n foreach ( $params as &$value ) {\n if (is_scalar($value)) {\n if ($case == CASE_UPPER){\n $value = strtoupper($value);\n } else {\n $value = strtolower($value);\n }\n } elseif (is_array($value)) {\n if ($case == CASE_UPPER) {\n $value = array_map(\"strtoupper\", $value);\n } else {\n $value = array_map(\"strtolower\", $value); \n }\n }\n }\n unset($value);\n return $params;\n}", "title": "" }, { "docid": "3f34a599db3768d9e829c6b4db19c566", "score": "0.55475825", "text": "function snake_case(string $str) {\n $str = preg_replace('/\\s+|-+|_+/', '_', trim($str));\n $str = preg_replace('/_+/', '_', trim($str));\n $str = preg_replace_callback('/_[A-Z]/', fn ($m) => \"_\".strtolower($m[0][1]), $str);\n $str = preg_replace_callback('/[a-z][A-Z]/', fn ($m) => $m[0][0].\"_\".strtolower($m[0][1]), $str);\n $str[0] = strtolower($str[0]);\n\n return $str;\n}", "title": "" }, { "docid": "e7e55c122c858028c61d0bb494d216b8", "score": "0.55292016", "text": "static private function parse_request()\n {\n $out = array();\n if(is_array($_REQUEST))\n {\n foreach($_REQUEST as $key => $val)\n {\n if(is_array($val))\n {\n foreach($val as $key2 => $val2)\n {\n $out[$key][$key2] = new requestVar($key);\n }\n } else $out[$key] = new requestVar($key);\n }\n }\n return $out;\n }", "title": "" }, { "docid": "20ca565961593037475334719d259442", "score": "0.5513506", "text": "public function camelKeys($array)\r\n {\r\n $result = [];\r\n foreach ($array as $key => $value) {\r\n if (is_array($value)) {\r\n $value = $this->camelKeys($value);\r\n }\r\n $result[Str::camel($key)] = $value;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.54734397", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.54734397", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.54734397", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.54734397", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.54734397", "text": "public function getKeys();", "title": "" }, { "docid": "335a8187970b4827a3ff6114bc9d18c9", "score": "0.5445246", "text": "public function providerValidKeyNames()\n {\n return [\n ['bar'],\n ['barFoo1234567890'],\n ['bar_Foo.1'],\n ['1'],\n [str_repeat('a', 64)]\n ];\n }", "title": "" }, { "docid": "c8bb0654198f838a9d3a2a5356efe538", "score": "0.5440279", "text": "function array_keys_to_lcfirst(Array $array)\n {\n $returnArray = [];\n foreach ($array as $key => $value) {\n\n if (is_array($value)) {\n $returnArray[lcfirst($key)] = array_keys_to_lcfirst($value);\n } else {\n $returnArray[lcfirst($key)] = $value;\n }\n }\n return $returnArray;\n }", "title": "" }, { "docid": "f6a26a5ee61fbf9de467a342b57b6177", "score": "0.5424028", "text": "public function camelCaseProvider()\n {\n return [\n ['my_phrase', 'myPhrase'],\n ['one two three', 'oneTwoThree'],\n ];\n }", "title": "" }, { "docid": "d574dab90fe9b305c3c51c478867712a", "score": "0.5413409", "text": "public function testFilterByKeyPrefix_returnsArray_ifKeysDoMatch()\n\t{\n\t\t$input = array('foo' => 'bar', 'baz' => 'qux', 'quux' => 'corge');\n\t\t$actual = Arr::filterByKeyPrefix($input, 'f');\n\t\t$expected = array('foo' => 'bar');\n\t\t\n\t\treturn $this->assertEquals($actual, $expected);\n\t}", "title": "" }, { "docid": "abdc0491d41e93ac7d67786fc2d0fd9b", "score": "0.5412305", "text": "public function testArrayChangeKeyCase()\n {\n $a = array('ProgramadOr' => 1, 'TesTeR' => 2);\n\n $this->assertEquals(\n array('programador' => 1, 'tester' => 2),\n array_change_key_case($a) // padrão é minusculo\n );\n\n $this->assertEquals(\n array('PROGRAMADOR' => 1, 'TESTER' => 2),\n array_change_key_case($a, CASE_UPPER)\n );\n }", "title": "" }, { "docid": "fe3c6a5f3219d8686fb148bd3fe1c7e5", "score": "0.53897417", "text": "public function keyNameJson()\n {\n return [\n 'type' => self::STRING_TYPE,\n 'location' => self::JSON,\n 'sentAs' => 'key_name',\n ];\n }", "title": "" }, { "docid": "b5188aa618eac4685c0a5944567b0966", "score": "0.53824234", "text": "public function toArray($request)\n {\n $data = $this->onlyAllowed($request);\n\n return $this->caseFormat($request, $data);\n }", "title": "" }, { "docid": "e1d05c45289825d762d33aabf7c167d0", "score": "0.53818494", "text": "public static function getNames();", "title": "" }, { "docid": "cd321647816c1a0fe260ed59aea76a7e", "score": "0.53713423", "text": "abstract public function case_sensitive();", "title": "" }, { "docid": "c142d645a877753c4e4b2e9d2a1a17f5", "score": "0.536792", "text": "private function getAllowedNames() : array\n {\n $allowedNames = $this->certificate->sans();\n \n $sslCertSubject = $this->certificate->subject();\n \n // Add the common name from the certificate.\n if (isset($sslCertSubject['CN'])) {\n $allowedNames[] = $sslCertSubject['CN'];\n }\n \n return $allowedNames;\n }", "title": "" }, { "docid": "ce54d12178f806cfa5b0f8c4565312de", "score": "0.53635305", "text": "public static function getFilterNames(): array\n {\n return [\n ['Subject', 'Subject'],\n ['Subject:', 'Subject'],\n [':Subject:', 'Subject'],\n ['Subject' . chr(32), 'Subject'],\n ['Subject' . chr(33), 'Subject' . chr(33)],\n ['Subject' . chr(126), 'Subject' . chr(126)],\n ['Subject' . chr(127), 'Subject'],\n ];\n }", "title": "" }, { "docid": "91900b010210c3134d9781ae3a087656", "score": "0.5351655", "text": "public static function upperKeys($array) {\n\t\treturn array_change_key_case($array, CASE_UPPER);\n\t}", "title": "" }, { "docid": "bd1d5300dcbf22bc657dc6f2a887daca", "score": "0.5341193", "text": "public function getNames();", "title": "" }, { "docid": "8a960ce1ea3dd6791f59e19cb6dd2dff", "score": "0.5330814", "text": "private function buildAttributesArray()\n {\n return Helper::toCamelCase($this->cleanedAttributes());\n }", "title": "" }, { "docid": "7ae1e3514de837a3673557f2f1d97750", "score": "0.532803", "text": "public static function normalizeHeaderKeys(array $headers)\n {\n $result = [];\n foreach (array_keys($headers) as $key) {\n $result[strtolower($key)] = $key;\n }\n\n return $result;\n }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "f41960357d45ef5eabaa480d2f52d5fd", "score": "0.5323313", "text": "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "title": "" }, { "docid": "35a506133348f680bdc1b6bd96c13fcf", "score": "0.53214717", "text": "public function toArrayClients()\n\t{\n\t\t$ret = array();\n\t\t$vars = $this->getVars();\n\t\tforeach (\\array_keys($vars) as $var) {\n\t\t\t$ret[$var] = $this->getVar('{$var}');\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2005383d43cce709fcc3f9ae469b7eeb", "score": "0.5318116", "text": "public function ajaxRequestPost(Request $request)\n\n {\n\n $input = $request->data;\n\n $data = new my_data();\n\n $data = $data->get_data();\n\n if($input){\n\n $result = array();\n\n foreach ($data as $key=>$val){\n\n if (strpos(mb_strtolower ($val), mb_strtolower ($input))!==false){\n\n $result[] = $val;\n\n }\n\n }\n\n }else{\n\n $result = $data;\n\n }\n\n return response()->json($result);\n\n }", "title": "" }, { "docid": "59abd77013cc1a478dbcad7df8e030a5", "score": "0.5293465", "text": "public static function GetAllNames ();", "title": "" }, { "docid": "99b1be65400b081cf24e57ed4c19e314", "score": "0.52883387", "text": "public function get_encrypt_key_select_array() {\n\t\t$keys = $this->get_key_list();\n\t\t$retval = array();\n\t\tforeach($keys as $key) {\n\t\t\tforeach ($key[\"subkeys\"] as $subkey) {\n\t\t\t\tif ($subkey[\"can_encrypt\"]) {\n\t\t\t\t\t$retval[$subkey[\"fingerprint\"]] = $this->get_key_friendly_name($key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retval;\n\t\t\n\t}", "title": "" }, { "docid": "f9521ac61051b6bc623b34590d303e53", "score": "0.5254682", "text": "public static function names(): array\n {\n return array_column(self::cases(), 'name');\n }", "title": "" }, { "docid": "f9521ac61051b6bc623b34590d303e53", "score": "0.5254682", "text": "public static function names(): array\n {\n return array_column(self::cases(), 'name');\n }", "title": "" }, { "docid": "641479493aa914f052723189ab9dac74", "score": "0.5254235", "text": "public function keys();", "title": "" }, { "docid": "df9fcb3b7b202a4485c2086d41d497da", "score": "0.5252955", "text": "function getModelli() {\n\n\t$aRet = Array();\n\n\twhile( list( $k, $v ) = @each( $_REQUEST ) ) {\n\n\t\tif( strncmp( $k, \"chk_\", strlen( \"chk_\" ) ) != 0 ) { continue; }\n\t\t$aRet[] = $v;\n\t}\n\treturn $aRet;\n}", "title": "" }, { "docid": "95ae698b2b8e7a3a74eda3c26c2b1b0d", "score": "0.5249589", "text": "public function toArray($request)\n {\n return [\n 'Full Name' => $this->first_name . \" \" . $this->last_name,\n ];\n }", "title": "" }, { "docid": "3203c764ff2b02c496cf7fdb001a5b3c", "score": "0.5240208", "text": "public static function keySet() : array\n\t{\n\t\treturn array_keys($_GET);\n\t}", "title": "" }, { "docid": "888b4ee36b0604e515235e0df234ab77", "score": "0.52335", "text": "public static function get_all_names() \n {\n $rv = array();\n foreach(array_keys($_COOKIE) as $name) \n {\n if(strpos($name,self::PREFIX)===0) \n {\n $rv[] = substr($name, strlen(self::PREFIX), strlen($name));\n }\n }\n return $rv;\n }", "title": "" }, { "docid": "d240e0ddab75de8687610ffda9f8a1c3", "score": "0.52327013", "text": "public function toArray($request)\n {\n return [\n 'keyword' => $this->keyword,\n 'value' => $this->value,\n 'remark' => $this->remark,\n ];\n }", "title": "" }, { "docid": "23d49a6689eed11eaca02ac8764329b3", "score": "0.5226886", "text": "public function named(): array;", "title": "" }, { "docid": "0fb32accbd7ec4fd86f5388e9ed908ae", "score": "0.5213939", "text": "public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t\tfor ($i = 0; $i < $cnt; $i++)\n\t\t\t\t$arKeys[$i] = explode(Config(\"COMPOSITE_KEY_SEPARATOR\"), $arKeys[$i]);\n\t\t} else {\n\t\t\tif (Param(\"fmea\") !== NULL)\n\t\t\t\t$arKey[] = Param(\"fmea\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKey[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKey[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\t\t\tif (Param(\"idCause\") !== NULL)\n\t\t\t\t$arKey[] = Param(\"idCause\");\n\t\t\telseif (IsApi() && Key(1) !== NULL)\n\t\t\t\t$arKey[] = Key(1);\n\t\t\telseif (IsApi() && Route(3) !== NULL)\n\t\t\t\t$arKey[] = Route(3);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\t\t\tif (is_array($arKeys)) $arKeys[] = $arKey;\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_array($key) || count($key) != 2)\n\t\t\t\t\tcontinue; // Just skip so other keys will still work\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "title": "" }, { "docid": "79d184ea41f85d15e827848bc58610c6", "score": "0.5207305", "text": "protected function getDataKeys() {\n return [\n 'plural' => 'clients',\n 'singular' => 'client',\n ];\n }", "title": "" }, { "docid": "7d75d01a308c56168e611b951ac4f695", "score": "0.52067727", "text": "private function post2name( $array ) {\n\t\t$result = array();\n\t\t$array = $this->flatten_array( $array );\n\t\tforeach ( $array as $key => $value ) {\n\t\t\t$parts = explode( '.', $key );\n\t\t\t$i = 0;\n\t\t\t$new_key = '';\n\t\t\tforeach ( $parts as $part ) {\n\t\t\t\tif ( $i !== 0 ) $part = '[' . $part . ']';\n\t\t\t\t$new_key .= $part;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$i = 0;\n\t\t\t$result[ $new_key ] = $value;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c660dbea840e7f118290be26a901afcb", "score": "0.52049744", "text": "public function keys()\n {\n return array_keys($this->input);\n }", "title": "" }, { "docid": "b96a7da82bfed7be7621313c0923638d", "score": "0.51911217", "text": "public function snakeKeys(): self\n {\n $this->keyCase = 'snake';\n\n return $this;\n }", "title": "" }, { "docid": "a150b4830be3287c00ecec299ca9f665", "score": "0.51887035", "text": "public function translateRequestURI()\r\n\t{\r\n\t\t$aRequest = explode(\"/\", parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH));\r\n\t\t\r\n\t\t$aKeys = array_filter($aRequest);\r\n\t\treturn array_values($aKeys);\r\n\t}", "title": "" }, { "docid": "9ab6c80f60b3fcfe251487dd3a2c1b03", "score": "0.5176787", "text": "public function getTemplateParameterNames()\n\t{\n\t\treturn array(StringHelper::strtoupper($this->fieldname));\n\t}", "title": "" }, { "docid": "896e28ba9c5954eea8c13bb85b98d77f", "score": "0.5164719", "text": "public function dataUnCamel()\n {\n $result = array();\n $result[] = array('SomeDay', ' ', 'some day');\n $result[] = array('UFOVillage', ' ', 'ufo village');\n $result[] = array('StrangeFunction', '-', 'strange-function');\n $result[] = array('TestClass', '.', 'test.class');\n $result[] = array('SomeString', '_', 'some_string');\n\n return $result;\n }", "title": "" }, { "docid": "9e193a9269db6242a7d97104c7466fd8", "score": "0.5150269", "text": "private function transform_headers() : array {\n\t\t$result = [];\n\t\tforeach ($this->headers as $key=>$value) {\n\t\t\t$result = array_merge($result, [$key . ': ' . $value]);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ebc7b125db7ea35d4db82213b2aae302", "score": "0.51471895", "text": "public function getKeys()\n {\n $catalog = $this->fetch($this->catalog_key);\n $catalog = \\is_array($catalog) ? $catalog : Array();\n $arr = Array();\n foreach ($catalog as $k => $v) {\n $arr[\\preg_replace(\"~^\" . $this->namespace . \"~\", '', $k)] = $v;\n }\n \\ksort($arr);\n return $arr;\n }", "title": "" }, { "docid": "95fe6fe9f0f6c30bc2c93c748427f168", "score": "0.513773", "text": "public function variable_names($super_global = \\phpbb\\request\\request_interface::REQUEST)\n\t{\n\t\tif (!isset($this->input[$super_global]))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\treturn array_keys($this->input[$super_global]);\n\t}", "title": "" }, { "docid": "cf0d37b70ce63aa7f5caee1d94916509", "score": "0.5134795", "text": "public function lower()\n {\n return $this->map('mb_strtolower');\n }", "title": "" }, { "docid": "cabc067f77b901f6fa09dad25bfa5042", "score": "0.5134177", "text": "protected function getKeysInCurrentBase()\n\t{\n\t\t$paramType = $this->getParameter('source');\n\n\t\t$array = $this->validationParameters->getAll($paramType);\n\t\t$names = $this->curBase->getValue($array, array());\n\n\t\treturn is_array($names) ? array_keys($names) : array();\n\t}", "title": "" }, { "docid": "d08bc56ff5e31239f86dba6402a73199", "score": "0.5125054", "text": "function getKey() {\r\n return [\"film\", \"daftarfilm\", \"listfilm\"];\r\n}", "title": "" }, { "docid": "d9a24595f4bef6231a7e17a72af18a81", "score": "0.51151896", "text": "protected function getRequestHeaders()\n\t{\n\t\t$headers = [];\n\n\t\tforeach ($this->psrRequest->getHeaders() as $header => $values) {\n\t\t\tif (strtoupper(substr($header, 0, 5)) === 'HTTP_') {\n\t\t\t\t$header = substr($header, 5);\n\t\t\t}\n\n\t\t\t$header = str_replace('_', ' ', $header);\n\t\t\t$header = ucwords(strtolower($header));\n\t\t\t$header = str_replace(' ', '-', $header);\n\n\t\t\t$headers[$header] = $values;\n\t\t}\n\n\t\tksort($headers);\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "736a734c664e21b08729d7855bd7ced7", "score": "0.510965", "text": "protected function getAllowedKeys()\n {\n $name = $this->getName();\n if (!array_key_exists($name, static::$allowedKeys)) {\n static::$allowedKeys[$name] = [];\n foreach ($this->getApi()->getInputValues() as $input) {\n static::$allowedKeys[$name][] = $input->getName();\n }\n foreach ($this->getApi()->getTables() as $table) {\n static::$allowedKeys[$name][] = $table->getName();\n }\n }\n return static::$allowedKeys[$name];\n }", "title": "" }, { "docid": "8a0df9ee2e4a1cb10eb17c2d74a4cf6c", "score": "0.5106595", "text": "public function get_request()\r\n\t{\r\n\r\n\t\t##------------------------------------------------------------\r\n\t\t# \tSEPARO LOS NOMBRE DE LO OBTENIDO\r\n\t\t#$a_rep \t=explode(\",\",$v_get_resp);\r\n\r\n\t\t\tforeach($_REQUEST as $nombre_campo => $valor){ \r\n\t\t\t $asignacion = \"\\$a_vect['\" . $nombre_campo . \"']='\" . $valor . \"';\"; \r\n\t\t\t \r\n\t\t\t $a_vect[''. $nombre_campo .'']\t=$valor;\r\n\r\n\t\t\t} \r\n\r\n\t\t\t\treturn $a_vect;\r\n\t}", "title": "" }, { "docid": "ac85e084e5eca65fa7645ce5b6111d3e", "score": "0.5104335", "text": "public function lowerKey($key);", "title": "" }, { "docid": "86f8bf2d44be1371070a10973c058952", "score": "0.51042235", "text": "public function keys() {}", "title": "" }, { "docid": "86f8bf2d44be1371070a10973c058952", "score": "0.51042235", "text": "public function keys() {}", "title": "" }, { "docid": "86f8bf2d44be1371070a10973c058952", "score": "0.51042235", "text": "public function keys() {}", "title": "" }, { "docid": "1cb05c94ab0374fdac0fefc6dc764eb0", "score": "0.5103546", "text": "public function caseRequest($field)\n {\n switch ($this->case) {\n case 'snake':\n return $this->caseSnake($field);\n default:\n return $this->caseCamel($field);\n }\n }", "title": "" }, { "docid": "454f1f51fd6e1803aaabf6e3d1475980", "score": "0.5098184", "text": "public function valueKeys(): array;", "title": "" }, { "docid": "22f0272b7cdd10e5030703e9fb46ca2c", "score": "0.5097671", "text": "public static function all(): array\n {\n if (!self::$headers) {\n $headers = Arrays::filterByKeys($_SERVER, Functions::startsWith('HTTP_'));\n self::$headers = Arrays::mapKeys($headers, function ($key) {\n return str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))));\n });\n }\n return self::$headers;\n }", "title": "" }, { "docid": "55224f9db54229f418b9d2e5b5623006", "score": "0.50925183", "text": "private static function camelCaseToSnakeCase($input)\n {\n $matches = [];\n preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);\n foreach ($matches[0] as &$match) {\n $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);\n }\n return implode('_', $matches[0]);\n }", "title": "" }, { "docid": "4ac8c35f4a0b6e02cde70f02aa43c917", "score": "0.5091372", "text": "function arrayLower($array) {\n\tif (! is_array($array))\n\t\treturn $array;\n\n\t$newarray = array();\n\tforeach ($array as $key => $value) {\n\t\t$newarray[$key] = strtolower($value);\n\t}\n\n\treturn $newarray;\n}", "title": "" }, { "docid": "302044fc20c0fcac169e214b9f4f0ca6", "score": "0.5084787", "text": "function asKey($str) {\r\n return preg_replace(\"/[^0-9a-z_]/\",'',strtolower($str));\r\n}", "title": "" }, { "docid": "8bea0103f55c5bc1b6cecad0e487b44f", "score": "0.50795895", "text": "public static function fromCamelCaseToSnakeCase($input)\n {\n preg_match_all('/([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)/', $input, $matches);\n $ret = $matches[0];\n\n foreach ($ret as &$match) {\n $match = $match === strtoupper($match) ? strtolower($match) : lcfirst($match);\n }\n\n return implode('_', $ret);\n }", "title": "" }, { "docid": "96a79ba461ea38dc63967c4f3132ea95", "score": "0.50688887", "text": "public function allTerms(Request $request) {\n \t// Grab all terms and return them as a json array\n \n \t\t// Option to get all lowercase options?\n \t\t$lowercase = $request->input('lowercase');\n\n \t\t$tags = Tag::all();\n\n \t$tag_array = array();\n\n \t// Loop through tags. Checks if lowercase is set and only get them if it is\n \tforeach($tags as $tag) {\n \t\tif($lowercase == true) {\n \t\t\t$starts = $this->startsWithUpper($tag->tag_name);\n\n \t\t\tif(!$starts) {\n \t\t\t\t$tag_array[] = array('term' => $tag->tag_name);\n \t\t\t}\n \t\t} else {\n \t\t\t$tag_array[] = array('term' => $tag->tag_name);\n \t\t}\n \t}\n\n \tsort($tag_array);\n\n \treturn response()->json($tag_array);\n }", "title": "" }, { "docid": "389b9c5be37d3f9987d016d2bd54c506", "score": "0.5068141", "text": "function toKeyVal()\n\t{\n\t\t$data = $this->find('all');\n\t\t$toReturn = array();\n\t\tforeach ($data as $item)\n\t\t{\n\t\t\t$names = explode('.', $item[$this->name]['c_key']);\n\t\t\t$toReturn = $this->array_inflate($toReturn, $names, $item[$this->name]['c_value']);\n\t\t}\n\t\treturn $toReturn;\n\t}", "title": "" }, { "docid": "48e73b1baabeb86dda18b499df1115ff", "score": "0.5063703", "text": "private function getKeysWithPrefix()\n {\n\n return $this->redisClient->keys($this->input->getArgument('prefix') . '*');\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "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 }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "text": "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 }", "title": "" }, { "docid": "e3c740412fbdcfbb4c5f134b55955877", "score": "0.66060185", "text": "public function deleteStorage($id);", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "86a97ef20b44d79f474926937530d353", "score": "0.63162404", "text": "public function remove($resourceId)\n {\n return $this->rResourceMixin->remove($resourceId);\n }", "title": "" }, { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.624805", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "0145806453a1e9f5ee0809b4db0b14d3", "score": "0.61310524", "text": "public function markAsDeleted(ResolvedResource $resource);", "title": "" }, { "docid": "6c6fe1826f8ec4ac06c5e0ef405b8b7a", "score": "0.6100814", "text": "function deleteResource($id) {\n\t\t\t$id = sqlescape($id);\n\t\t\t$r = $this->getResource($id);\n\t\t\tif ($r) {\n\t\t\t\tsqlquery(\"DELETE FROM bigtree_resources WHERE file = '\".sqlescape($r[\"file\"]).\"'\");\n\t\t\t\t$storage = new BigTreeStorage;\n\t\t\t\t$storage->delete($r[\"file\"]);\n\t\t\t\tforeach ($r[\"thumbs\"] as $thumb) {\n\t\t\t\t\t$storage->delete($thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "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}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "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}", "title": "" }, { "docid": "d7a9a477b41e565ba02b2968aa02b2d8", "score": "0.6054318", "text": "public function remove ($resource = false, $key = false) {\n\t\t$resource = ($resource) ? $resource : $this->resource;\n\t\t$key = ($key) ? $key : $this->key;\n\n\t\treturn DB::execute ('delete from `#prefix#lock` where resource = ? and resource_id = ?', $resource, $key);\n\t}", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "0edce8e39abb5191d53e16b1ad17f69f", "score": "0.5964138", "text": "public function destroy($id)\n {\n $suplier = Supplier::where('id',$id)->first();\n $photo = $suplier->photo;\n if($photo)\n {\n unlink($photo);\n Supplier::where('id',$id)->delete();\n\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "83e24f29d0e8d9db1e7e13447c37580c", "score": "0.58936465", "text": "public function deleteResource(Resource $resource)\n {\n //unset all fields (for now)\n foreach (get_class_methods($resource) as $method) {\n if (0 === strpos($method, 'set')) {\n $resource->$method(null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "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}", "title": "" }, { "docid": "682325cf5de8624768bd5dbfad42738d", "score": "0.5875408", "text": "public function action_remove()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.remove');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested to be removed.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has been removed.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t\t$record->delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "7760e18034429a581e9c1073281ca346", "score": "0.5874566", "text": "public function delete ()\n {\n $this->unlock();\n sem_remove( $this->getResource() );\n $this->resource = NULL;\n return $this;\n }", "title": "" }, { "docid": "16ede02ea64f8d696ab94948fa4d095a", "score": "0.5870248", "text": "public function destroyFile($resource, File $file)\n {\n $file->delete();\n return $file->{$resource};\n }", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "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 }", "title": "" }, { "docid": "e02a61dc8d778d6f70e60505035c99d1", "score": "0.58621585", "text": "public function onDelete(DeleteResourceEvent $event)\n {\n $em = $this->container->get('doctrine.orm.entity_manager');\n $em->remove($event->getResource());\n $event->stopPropagation();\n }", "title": "" }, { "docid": "ee70945e791659b8782f1f156e69304e", "score": "0.5847799", "text": "public function delete()\n {\n return $this->getStorage()->delete($this->path().DIRECTORY_SEPARATOR.$this->name());\n }", "title": "" }, { "docid": "fbd716173957d995532e7a5839e6a5dc", "score": "0.58406353", "text": "public function rm($item);", "title": "" }, { "docid": "df76e304787c6be76144a24a799b6900", "score": "0.5835866", "text": "public function removeAction()\n {\n Pi::service('log')->mute();\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $row = $this->getModel('media')->find($id);\n\n if ($row && $row->url) {\n // Delete media\n unlink(Pi::path($row->url));\n\n // Update db\n $row->url = '';\n $row->type = '';\n $row->size = 0;\n $row->meta = '';\n $affectedRows = $row->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'media');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id) ? $session->$id : $session->$fakeId;\n\n unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n $affectedRows = 1;\n }\n\n echo json_encode([\n 'status' => $affectedRows ? self::AJAX_RESULT_TRUE : self::AJAX_RESULT_FALSE,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "e47bb1b7bccbeb8651920ef7986252ae", "score": "0.5819071", "text": "protected function destroy(User $resource)\n {\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "7e3f12eaa72d671def04991239bd33f4", "score": "0.58077335", "text": "public function destroy(Resource $resource)\n\t{\n\t\t$resource->delete();\n\n return ['success' => true, 'message' => 'Resource deleted'];\n\t}", "title": "" }, { "docid": "3e2addfb4f78b979aaadcf2a7b28b1c4", "score": "0.5783091", "text": "public function destroy(Request $request, $id)\n {\n\n $file= Documents::whereId($id)->firstOrFail();\n\n //unlink(public_path('storage',$file->id));\n\n $file->delete();\n return back();\n\n\n }", "title": "" }, { "docid": "5bc196208c1decbb644cd5cece6edd3f", "score": "0.5773983", "text": "public function unlink($uri) {\n $this->uri = $uri; // set instance URI\n return unlink($this->get_local_path());\n }", "title": "" }, { "docid": "f97458f1a249bea8589e37ce4a19458a", "score": "0.5770823", "text": "public function destroy($id)\n {\n// $info = $request->img;\n// dd($info);\n// dd($id);\n $info = Zhou::where('id',$id)->select('file')->first()->toArray();\n// dd('/storage/'.$info['file']);\n unlink('./storage/'.$info['file']);\n $data = Zhou::where('id',$id)->delete();\n\n\n// dd();\n if($data){\n return json_encode(['code'=>200]);\n }\n }", "title": "" }, { "docid": "27c91ef0cac551b90c12d8956a711079", "score": "0.5768296", "text": "public function deleteFromStore()\n\t{\n\t\t$this->isInStore(true);\n\n\t\t$store = GAMA_Store::singleton();\n\n\t\t// ===============\n\t\tapp_lock(LOCK_EX);\n\t\t// ===============\n\t\ttry\n\t\t{\n\t\t\t// make sure there are no instances of this class\n\t\t\t$count = $store->sqlFetchValue(\n\t\t\t\t'select count(*) from RESOURCE where type=?', $this->id);\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related instances first');\n\t\t\t}\n\n\t\t\t// make sure there are no properties using this class\n\t\t\t$count = $store->sqlFetchValue('\n\t\t\t\tselect count(*) from PROPERTY\n\t\t\t\twhere dom=? or rng=?\n\t\t\t\t', $this->id, $this->id );\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related properties first');\n\t\t\t}\n\t\t\t\n\t\t\t// now we can delete the class\n\t\t\t$store->sql('delete from RESOURCE where id=?', $this->id);\n\n\t\t\t// we should also update our cache\n\t\t\t$this->reloadFromStore();\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\tapp_unlock();\n\t\t\tthrow $e;\n\t\t}\n\t\t\t\n\t\t// ==========\n\t\tapp_unlock();\n\t\t// ==========\n\t\t\n\t\tdebug(\"Resource deleted: $this->uri\");\n\t}", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "text": "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}", "title": "" }, { "docid": "ddf3faf7670af66339c535dd8de7c088", "score": "0.57453483", "text": "public function destroy(Request $request)\n {\n Storage::delete($request->path);\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "38e5a4eab7d9a854a4348b6f78b1554b", "score": "0.571345", "text": "public function destroy($resource, $id)\n {\n $this->repository->delete($id);\n return response(null, 204);\n }", "title": "" }, { "docid": "20950b5737f7cbea0d1cc5dc11a68eb1", "score": "0.57047796", "text": "public function delete() {\n $filePath = $this->getPath();\n if (is_file($filePath) && is_writable($filePath)) {\n unlink($filePath);\n }\n parent::delete();\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "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 }", "title": "" }, { "docid": "405f641d9f45ae5d1d63de363880f02b", "score": "0.5691377", "text": "public function destroy($id)\n\n {\n\n $product = Product::findOrFail($id);\n\n\n\n// unlink(public_path(). $icon->file);\n\n\n\n// $photo->delete();\n//\n// $icon->delete();\n Photo::where('product_id',$id)->delete();\n $product->delete();\n\n\n\n\n\n return redirect()->route('admin.products.index');\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "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 }", "title": "" }, { "docid": "f3ecd01b9c9cfcc917a40e1827e8d6a1", "score": "0.56522495", "text": "public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }", "title": "" }, { "docid": "85a8d03b0c01970f57fe2403d38a7103", "score": "0.56494105", "text": "public function delete(): void\n {\n\t\tif(@unlink($this->getPath())) {\n\t\t\t$this->deleteCacheEntries();\n\t\t\tself::unsetInstance($this->getPath());\n\t\t}\n\t\telse {\n\t\t\tthrow new FilesystemFileException(\"Delete of file '{$this->getPath()}' failed.\", FilesystemFileException::FILE_DELETE_FAILED);\n\t\t}\n\t}", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "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 }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "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 }", "title": "" }, { "docid": "0cb73bdc807934bf8edf7e5eccafdd2b", "score": "0.56407464", "text": "public function delete() {\n $this->storageController->connect();\n $query = sprintf('DELETE FROM items WHERE name=\"%s\"', $this->name);\n $this->storageController->query($query);\n $this->storageController->close();\n\n $this->is_new = TRUE;\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "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 }", "title": "" }, { "docid": "83377e4a1bcc3dc2e77329262b4d9a6d", "score": "0.5628369", "text": "public function delete()\n {\n fclose($this->inputStream);\n }", "title": "" }, { "docid": "9db585fcb135fe60165f9be69e476584", "score": "0.5622851", "text": "private function _remove($id)\n\t{\n\t\t$store = $this->model_store->find($id);\n\n\t\tif (!empty($store->IMAGE)) {\n\t\t\t$path = FCPATH . '/uploads/store/' . $store->IMAGE;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $this->model_store->remove($id);\n\t}", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "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 }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "eb981a32d53ea8153aa2cec46a4f509f", "score": "0.5581215", "text": "public function destroy($id)\n {\n// if(Auth::user()->role == User::ROLE_SUPERADMIN) {\n $product = ProductItem::findOrFail($id);\n if($product->image_name != '') {\n $image_path = app_path(\"../../files/product/\" . $product->image_name);\n unlink($image_path);\n }\n\n ProductItem::destroy($id);\n\n Alert::success('Your data already deleted !', 'Success !');\n\n return redirect('admin/product');\n// }\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "9063023fcee6a479bc40053db38d89e0", "score": "0.557017", "text": "public function destroy($id)\n {\n //\n\n\n $post = Post::withTrashed()->where('id',$id)->firstOrFail();\n\n if ($post->trashed()){\n /////$path = 'test.txt';\n /////Storage::disk('s3')->put($path, 'hello');\n ///// Storage::disk('s3')->delete($path);\n //return $post->image;\n\n if(Storage::disk('s3')->exists($post->filename)) {\n Storage::disk('s3')->delete($post->filename);\n } else {\n $post->deleteImage();\n $post->forceDelete();\n\n }\n\n\n return redirect(route('trashed-posts.index'))->with('status', 'Post deleted successfully');\n }\n else {\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n }\n\n // return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n\n }", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "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 }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "b45d20ef7b675860a322ba4b6d1dbd5a", "score": "0.55559915", "text": "public function destroy($id)\n {\n $file_data = Media::find($id)->first();\n if(file_exists($file_data->path)){\n @unlink(public_path(), $file_data->path);\n }\n Media::where('id', $id)->delete();\n return redirect()->back()->with('message', 'Media deleted successfully!');\n }", "title": "" }, { "docid": "e98c4608a62ab3f2b92573a4bed86a6f", "score": "0.5551504", "text": "abstract public function Resource_Link_delete($resource_link);", "title": "" }, { "docid": "35753424e21be7d9c22ced54d549e939", "score": "0.5540951", "text": "public function remove()\n\t{\n\t\tif(self::exists($this->name))\n\t\t{\n\t\t\t$this->value = false;\n\t\t\t$this->encodedValue = null;\n\t\t\t$this->sendHeader();\n\n\t\t\t$cookiePath = $this->getMetaFilePath();\n\n\t\t\tif(File::exists($cookiePath))\n\t\t\t\tFile::remove($cookiePath);\n\t\t}\n\t}", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "39fd8b9a4b5864c48e07d66807e5775f", "score": "0.5539789", "text": "public function destroy($id)\n {\n $image = Slider::findOrFail($id);\n //dd($image);\n// $image_path = app_path(\"images/{$image}\");\n// //dd($image_path);\n// if (File::exists($image_path)) {\n// File::delete($image_path);\n// //File::delete(\"images/{$image}\");\n// unlink($image_path);\n// }\n// File::delete(public_path(\"images/{$image->path}\"));\n $image->delete();\n return redirect('admin-group-1/slider');\n }", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.55343556", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "bd7d7fbce770fd39cf8081927084d5c3", "score": "0.55334973", "text": "public function destroy($id)\n {\n $brand = Brand::findOrFail($id);\n\n if (Storage::disk('public')->exists('Brand/'.$brand->brand_image)) {\n Storage::disk('public')->delete('Brand/'.$brand->brand_image);\n }\n $brand->delete();\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "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 }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
23308993fd7f96ad09a43e91a1ed4ee2
Get the cache key for a certain type and page. A type of cache would be something like 'page', 'post' or 'video'. Example key format for sitemap type "post", page 1: wpseo_sitemap_post_1:akfw3e_23azBa .
[ { "docid": "13ca2b1fe03d453e26daed876bde5918", "score": "0.6438147", "text": "public static function get_storage_key($type = \\null, $page = 1)\n {\n }", "title": "" } ]
[ { "docid": "85620203376b472271412b8dca02d6fd", "score": "0.79336846", "text": "private function get_cache_key($type) {\n\t\t$key = I18n::get_locale();\n\t\t$key .= $type . $_SERVER['REQUEST_URI'];\n\t\treturn md5($key);\n\t}", "title": "" }, { "docid": "f45e62005a9de8dca6e4891ac6764118", "score": "0.68079656", "text": "public function cacheKey($project_id, $type = null)\n\t{\n\t\t$key = \"p:{$project_id}:s:{$this->id}\";\n\n\t\tif($type !== null)\n\t\t\t$key = \"{$type}|\" . $key;\n\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "c0f467d562084817e497c121e231489e", "score": "0.6399667", "text": "private function getPageKey() {\n\t\t$s = DIRECTORY_SEPARATOR;\n $versionString = $this->getVersionHash();\n if ($versionString === null) {\n // If there is no version string,\n // then the cache won't function properly.. We may end up with no version string if\n // memcache has purged the app details or user details keys, or if these haven't yet \n // been set in the cache.\n if ($this->DEBUG_LEVEL >= self::DEBUG_LEVEL_VERBOSE) {\n $this->debug(\"getPageKey: no version string hash cached\");\n header('X-Scaler-Debug-Reason: No version string hash cached');\n }\n return null;\n }\n\t\treturn $this->KEY_PREFIX . $this->CACHE_PATH.$s.$this->getEnvironmentId().$s.$this->getPageId().'@'.$versionString;\n }", "title": "" }, { "docid": "6c0cd539db8be26a3fc1aa74a747df5c", "score": "0.62740177", "text": "private function get_sitemap_from_cache($type, $page_number)\n {\n }", "title": "" }, { "docid": "a1ed1d574323885f1aaaafbe256f4030", "score": "0.6263196", "text": "public function getCacheKey();", "title": "" }, { "docid": "56ecebd8f8126e0522912359676a90ed", "score": "0.6244689", "text": "public function cacheKey(): string;", "title": "" }, { "docid": "07f9123ac77ae20151936f1e1a9c51b9", "score": "0.62267596", "text": "public function getCacheKey(): string;", "title": "" }, { "docid": "4d5f6ce07040b97196f49d1adee93c72", "score": "0.62202555", "text": "protected function getCacheKey(): string\n {\n $request = $this->getRequest();\n\n return sprintf(\n '%s.%s.%s.%s.%s',\n Str::slug($this->getCachePrefix(), '.'),\n Str::slug(str_replace('\\\\', '_', static::class)),\n $request->input('range', 'no-range'),\n $request->input('timezone', 'no-timezone'),\n $request->input('twelveHourTime', '24-hour-time')\n );\n }", "title": "" }, { "docid": "50f6dcf1a528686e3770f282e39db688", "score": "0.60960823", "text": "public static function getCacheClass( $type ) {\n\n $suffix = 'dummy';\n\n if ( in_array( $type, array( 'mysql', 'postgresql', 'sqlite' ) ) ) {;\n $suffix = 'sql';\n } elseif ( in_array( $type, array( 'apc', 'memcache' ) ) ) {\n $suffix = $type;\n }\n\n return 'HGMCache' . ucwords( $suffix );\n }", "title": "" }, { "docid": "0bf9be4d1301302447f547c1e96ca06b", "score": "0.6090821", "text": "public function get_cache_file_path( $type, $site_type ) {\n\t\treturn $this->cache_path . $type . '-' . $site_type . '-meta.txt';\n\t}", "title": "" }, { "docid": "31ba00bfb9c0cd2f162b83e2f6681a38", "score": "0.6071089", "text": "final protected function getCacheKey($cacheId = array())\n\t{\n\t\tif(!is_array($cacheId))\n\t\t\t$cacheId = array((string) $cacheId);\n\n\t\t$cacheId['SITE_ID'] = SITE_ID;\n\t\t$cacheId['LANGUAGE_ID'] = LANGUAGE_ID;\n\t\t// if there are two or more caches with the same id, but with different cache_time, make them separate\n\t\t$cacheId['CACHE_TIME'] = intval($this->arResult['CACHE_TIME']);\n\n\t\tif(defined(\"SITE_TEMPLATE_ID\"))\n\t\t\t$cacheId['SITE_TEMPLATE_ID'] = SITE_TEMPLATE_ID;\n\n\t\treturn implode('|', $cacheId);\n\t}", "title": "" }, { "docid": "7704fab0ce4590c6cdd6585ac8650b56", "score": "0.6009702", "text": "private function getCacheKey($cache_name,$cache_param=null){\r\n if($cache_param){\r\n if(is_numeric($cache_param)){\r\n return $cache_name.'@'.$cache_param;\r\n }else if(is_string($cache_param)){\r\n if(preg_match('/^[a-z0-9\\-\\_]+$/i',$cache_param)){\r\n return $cache_name.'@'.$cache_param;\r\n }else{\r\n return $cache_name.'@'.md5($cache_param);\r\n }\r\n }else if(is_array($cache_param)){\r\n return $cache_name.'@'.md5(json_encode($cache_param));\r\n }\r\n }else{\r\n return $cache_name;\r\n }\r\n }", "title": "" }, { "docid": "a8040aff64692c0052413bba62c567fd", "score": "0.59840006", "text": "function sitemap_cache_key() {\n\t// en.wordpress.com and other xx.wordpress.com blogs\n\t// have same blog id but need separate URLS in the sitemap\n\t// otherwise we get de.wordpress.com URLs for en.wordpress.com/sitemap.xml\n\t$sitemap_cache_key = 'sitemap-blog-' . get_locale() . '-' . $GLOBALS['blog_id'];\n\n\treturn apply_filters( 'sitemap_cache_key', $sitemap_cache_key );\n}", "title": "" }, { "docid": "bee6c469954ab5ce7074c593d33242fa", "score": "0.5976477", "text": "public function cacheType(): string\n\t{\n\t\treturn $this->cache_type;\n\t}", "title": "" }, { "docid": "484135ed59d0848dbc551c67b930f370", "score": "0.59046745", "text": "protected function cacheMeta(MvcEvent $e, $type = 'page')\n {\n $route = $e->getRouteMatch();\n $module = $route->getParam('module');\n $controller = $route->getParam('controller');\n $action = $route->getparam('action');\n\n $cacheInfo = [\n 'type' => 'page',\n 'ttl' => 0,\n 'level' => '',\n ];\n $info = Pi::registry('page_cache')->read(\n $module,\n $this->application->getSection(),\n $type\n );\n if (empty($info)) {\n return $cacheInfo;\n }\n\n $key = sprintf('%s-%s-%s', $module, $controller, $action);\n if (isset($info[$key])) {\n $cacheInfo = $info[$key];\n } elseif (isset($info[sprintf('%s-%s', $module, $controller)])) {\n $cacheInfo = $info[sprintf('%s-%s', $module, $controller)];\n } elseif (isset($info[$module])) {\n $cacheInfo = $info[$module];\n } else {\n return $cacheInfo;\n }\n\n\n return $cacheInfo;\n }", "title": "" }, { "docid": "5a52499b3bd4a925725f6821fe20311d", "score": "0.5883447", "text": "private static function get_page_cache_dir($type = 'scripts') {\n $dir = self::get_current_id();\n if (!$dir) {\n return false;\n }\n $cache_dir = $type . '/' . current($dir) . '/';\n if (key($dir)) {\n $cache_dir.=key($dir) . '/';\n }\n if(themify_is_touch()){\n $cache_dir.='mobile/';\n if (!is_dir($cache_dir)) {\n wp_mkdir_p($cache_dir);\n }\n }\n return $cache_dir;\n }", "title": "" }, { "docid": "4e66d1501e2bcbe9609b4c8e33d1c88d", "score": "0.5851265", "text": "protected function cacheKey() {\n if ($this->cacheKey) {\n return $this->cacheKey;\n }\n \n if (!$url = $this->url()) {\n throw new KurogoDataException(\"URL could not be determined\");\n }\n \n $key = 'url_' . md5($url);\n\n if ($data = $this->data()) {\n $key .= \"_\" . md5($data);\n }\n return $key;\n }", "title": "" }, { "docid": "5e66763484e1b7f4692eaabb2e4ace4b", "score": "0.5750972", "text": "private function getCacheKey(string $text): string\n\t{\n\t\t// Use MD5 to favor speed over security, which is not an issue here, and Symfony Cache itself uses MD5 as well\n\t\t// Don't hash the locale to make it visible inside cache files\n\t\treturn md5($text) . '.' . $this->translator->getDefaultLocale();\n\t}", "title": "" }, { "docid": "f173bae12e74af069c0a32206f00268c", "score": "0.5740205", "text": "public function GetCache($type)\n\t{\n\t\tif($type == '') $type = 'system';\n\t\tif(!self::$entity[$type])\n\t\t{\n\t\t\t$file = CACHEROOT.DS.$type.\".cache\";\n\t\t\tif(!file_exists( $file) )\n\t\t\t{\n\t\t\t\tself::Create($file);\n\t\t\t}\n\t\t\t$vars = file_get_contents( $file );\n\t\t\tif(!empty( $vars )) $obj = json_decode( $vars );\n\t\t\telse $obj = array();\n\t\t\tself::$entity[$type] = new CacheFileEntity($obj);\t\n\t\t}\n\t\treturn self::$entity[$type];\n\t}", "title": "" }, { "docid": "92f9c7af45d507c267de51af9fc7976d", "score": "0.57288843", "text": "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "title": "" }, { "docid": "1a157c4797105e3ca4545833e8ef3708", "score": "0.5718457", "text": "protected function getCacheKey(Model $model, $type, $allowed = true)\n {\n return implode('-', [\n $this->tag(),\n $type,\n $model->getMorphClass(),\n $model->getKey(),\n $allowed ? 'a' : 'f',\n ]);\n }", "title": "" }, { "docid": "4076a2437897ddff68fa953914662766", "score": "0.57165694", "text": "public static function key($type)\n {\n return collect(self::all())->search($type);\n }", "title": "" }, { "docid": "4ecd0b004a4b8cb7fc442a450e69d8bf", "score": "0.57143354", "text": "public function getCacheType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "7a23af32373bf951bf05727bca789177", "score": "0.5710687", "text": "function cache_key($request_uri,$params=array())\n {\n return $request_uri;\n }", "title": "" }, { "docid": "048e97e8bd4f0e195c662d486e7a43ca", "score": "0.56656307", "text": "protected function getCacheKey($menuCode)\n {\n return \"{$this->key}-{$menuCode}\";\n }", "title": "" }, { "docid": "f1ad0fdcc3dab7256e24325117e1b1ed", "score": "0.56371593", "text": "public function load_cache( $type, $site_type ) {\n\t\treturn $this->load_cache_file( $type, $site_type );\n\t}", "title": "" }, { "docid": "a22f424a7d7cd28d1d7ac76976123555", "score": "0.5615422", "text": "public function getCacheKeyInfo()\n {\n $helper = new MindMagnet_IfDevice_Helper_Mobiledetect();\n\n $device = 'DESKTOP_';\n\n if($helper->isMobile() && !$helper->isTablet()){\n $device = 'PHONE_';\n } else if ($helper->isTablet()) {\n $device = 'TABLET_';\n }\n\n return array(\n $device.'PAGE_FOOTER',\n Mage::app()->getStore()->getId(),\n (int)Mage::app()->getStore()->isCurrentlySecure(),\n Mage::getDesign()->getPackageName(),\n Mage::getDesign()->getTheme('template'),\n Mage::getSingleton('customer/session')->isLoggedIn()\n );\n }", "title": "" }, { "docid": "1cc3e9bbeb4df64eb5725ec0d38cf6c6", "score": "0.5614146", "text": "public static function getStartCacheKey() : string\n {\n return substr(md5(self::class), 4);\n }", "title": "" }, { "docid": "2def633f0f71fd2e9ef32b459ec9a2b9", "score": "0.5585215", "text": "public function getCacheKey()\n {\n return parent::getCacheKey() . '-' . $this->getPriceId() . '-' . $this->getPrice()->getPriceCode() . '-' .\n $this->_storeManager->getStore()->getCurrentCurrency()->getCode();\n }", "title": "" }, { "docid": "9d37d734979e3b3bdbfbb5e669783be4", "score": "0.55580497", "text": "function getCacheKey()\n {\n return 'Foo object with ID#1';\n }", "title": "" }, { "docid": "eab40566830484d4805064a2db27a624", "score": "0.5557413", "text": "private function getApiKey($type){\n\t\tswitch($type){\n\t\t\tcase 'produce':\n\t\t\t\treturn 0;\n\t\t\t\tbreak;\n\t\t\tcase 'fetch':\n\t\t\t\treturn 1;\n\t\t\t\tbreak;\n\t\t\tcase 'offset':\n\t\t\t\treturn 2;\n\t\t\t\tbreak;\n\t\t\tcase 'metadata':\n\t\t\t\treturn 3;\n\t\t\t\tbreak;\n\t\t\tcase 'leader':\n\t\t\t\treturn 4;\n\t\t\t\tbreak;\n\t\t\tcase 'stopreplica':\n\t\t\t\treturn 5;\n\t\t\t\tbreak;\n\t\t\tcase 'offsetcommit':\n\t\t\t\treturn 6;\n\t\t\t\tbreak;\n\t\t\tcase 'offsetfetch':\n\t\t\t\treturn 7;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "9f3c495fad3b8e913a602b11fc8e1cb1", "score": "0.55493915", "text": "protected function getBreadcrumbsCacheKey()\n {\n return 'Breadcrumbs-' . (int)$this->plugin_data->page->menuitem_id;\n }", "title": "" }, { "docid": "ef79d97d637f3f11730cd049b5f5c788", "score": "0.55206364", "text": "public function cacheKey($component);", "title": "" }, { "docid": "dfb427457a25711532c86ee2fce579fa", "score": "0.55176836", "text": "public function getCacheKeyAction() {\n\t\t$response = array(\"error\" => false);\n\t\ttry {\n\t\t\t/** @var Mage_Catalog_Model_Resource_Product_Collection $coll */\n\t\t\t$coll = Mage::getModel('catalog/product')->getCollection();\n\t\t\t$coll->addAttributeToSelect('small_image');\n\t\t\t$coll->addAttributeToFilter('small_image', array(\n\t\t\t\t'notnull' => true\n\t\t\t));\n\t\t\t$coll->getSelect()->limit(100);\n\t\t\t$item = $coll->getLastItem();\n\t\t\t$path = (string)Mage::helper('catalog/image')->init($item, 'small_image');\n\t\t\t$imageArray = explode(\"/\", $path);\n\t\t\t$cache_key = \"\";\n\t\t\tforeach ($imageArray as $part) {\n\t\t\t\tif (preg_match('/[0-9a-fA-F]{32}/', $part)) {\n\t\t\t\t\t$cache_key = $part;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$response['cache_key'] = $cache_key;\n\t\t\t$response['date_time'] = date('Y-m-d H:i:s');\n\t\t} catch (Exception $e) {\n\t\t\t$response['error'] = $e->getMessage();\n\t\t}\n\t\t$this->getResponse()\n\t\t\t->setHeader(\"Content-Type\", \"application/json\")\n\t\t\t->setBody(json_encode($response));\n\t}", "title": "" }, { "docid": "2de923e3db84fc40d63cba578d504ae9", "score": "0.55137795", "text": "protected function GetCacheKey()\n\t{\n\t\treturn (isset($this->params['hash']) ? $this->params['hash'] : '') . '|' . (isset($this->params['file']) ? $this->params['file'] : '') . '|' . (isset($this->params['prefix']) ? $this->params['prefix'] : '') . '|' . $this->params['format'];\n\t}", "title": "" }, { "docid": "ebe5b1c8c1c4fb660d5d3b2cf10f5527", "score": "0.5483696", "text": "public function getCacheKey($options = array())\n\t{\n\t\tif (empty($options)) {\n\t\t\t$options = $this->config;\n\t\t}\n\t\tif (!empty($options['cache_key'])) {\n\t\t\treturn $options['cache_key'];\n\t\t}\n\t\t$key = !empty($this->modx->resource) ? $this->modx->resource->getCacheKey() : '';\n\n\t\treturn $key . '/' . sha1(serialize($options));\n\t}", "title": "" }, { "docid": "89910e666527f70873ae48570513910f", "score": "0.54696494", "text": "protected function _getKey(Request $request,string $key) {\n $this->lat = $request->get('lat');\n $this->lon = $request->get('lon');\n\n // set up cache key\n $cKey = \"{$this->lat}_{$this->lon}_{$key}\";\n\n return $cKey;\n }", "title": "" }, { "docid": "f66683342f6f9bb586ce8deec5bf523f", "score": "0.54538524", "text": "public static function get_validator_key($type = '')\n {\n }", "title": "" }, { "docid": "711d428ad5584adfe2f3cab983a0e5f4", "score": "0.5442153", "text": "public static function cacheKey()\n {\n $key = mb_strtolower(class_basename(static::class));\n\n return 'models:' . $key;\n }", "title": "" }, { "docid": "5b152cfd5bb11cfe443a2d782fa97441", "score": "0.5430802", "text": "private static function getPinCacheKey($group_id, $pin_type)\n {\n return \"group-pin:\" . $group_id . \":\" . $pin_type;\n }", "title": "" }, { "docid": "9b51cab9bade587962be0d097454e14a", "score": "0.541954", "text": "protected function getCompKey($key, $type)\n {\n return sprintf('%s_%s', $key, $type);\n }", "title": "" }, { "docid": "8366b74929a1eac02711cc7c00e5fed1", "score": "0.54084456", "text": "protected function constructCacheID($type) {\n return \"dp_repo_sync:source:{$this->getPluginId()}:{$this->identifier}:{$this->repository}:{$this->version}:{$type}\";\n }", "title": "" }, { "docid": "f793e4e614d12409e8a3894ca4c9f206", "score": "0.5405686", "text": "public function getCacheKeyInfo()\n {\n return array(\n 'TM_TESTIMONIALS_LIST',\n Mage::app()->getStore()->getId(),\n (int)Mage::app()->getStore()->isCurrentlySecure(),\n Mage::getDesign()->getPackageName(),\n Mage::getDesign()->getTheme('template'),\n $this->getTemplate(),\n $this->getPerPage(),\n $this->getCurrentPage()\n );\n }", "title": "" }, { "docid": "73a886a8764da16a7f8b74bdccc52f07", "score": "0.5390334", "text": "function registry_get($type, $key = null, $mem_cache = false, $config = 'default')\n{\n if (Configure::read('Cache.disable')) {\n return null;\n }\n\n // Used to exclude globals in certain installations, if there is an\n // external queue server that only reads from cache. Not for the ECD by\n // now:\n $from_globals = true;\n\n if ($from_globals && isset($GLOBALS['AplicationRegistry'][\"$type.$key\"])) {\n return $GLOBALS['AplicationRegistry'][\"$type.$key\"];\n } else {\n if ($mem_cache) {\n $value = Cache::read($type.'.'.$key, $config);\n if ($value) {\n $GLOBALS['AplicationRegistry'][\"$type.$key\"] = $value;\n return $value;\n }\n }\n }\n return null;\n}", "title": "" }, { "docid": "4e60a9dc587a9d6c27a1613c91eae141", "score": "0.5388113", "text": "public static function get_cache_key( &$instance, &$args ) {\n\n\t\treturn md5( $args['widget_id'] . serialize( $instance ) );\n\t}", "title": "" }, { "docid": "07c948a515716c83b5fab53e05c5f549", "score": "0.53863233", "text": "public function createCacheKey ()\n {\n $monochromeRanks = implode(\"_\", $this->monochromeTonerRankSet->getRanksAsArray());\n $colorRanks = implode(\"_\", $this->colorTonerRankSet->getRanksAsArray());\n\n return \"CPPSetting\"\n . \"_{$this->clientId}\"\n . \"_{$this->dealerId}\"\n . \"_{$this->adminCostPerPage}\"\n . \"_{$this->monochromePartsCostPerPage}\"\n . \"_{$this->monochromeLaborCostPerPage}\"\n . \"_{$this->colorPartsCostPerPage}\"\n . \"_{$this->colorLaborCostPerPage}\"\n . \"_{$this->pageCoverageMonochrome}\"\n . \"_{$this->pageCoverageColor}\"\n . \"_{$this->useDevicePageCoverages}\"\n . \"_monoranks_{$monochromeRanks}\"\n . \"_colorranks_{$colorRanks}\"\n . \"_{$this->customerMonochromeCostPerPage}\"\n . \"_{$this->customerColorCostPerPage}\"\n . \"_{$this->pricingMargin}\";\n }", "title": "" }, { "docid": "45f26659496d337551fc6daea9ef2b6e", "score": "0.53827107", "text": "protected function getCacheKey($channel = 'default')\n {\n if (!isset($this->cacheHash[$channel])) {\n $this->cacheHash[$channel] = self::$cacheKey . '_' . md5(implode('|', $this->getFeeds($channel)));\n }\n\n return $this->cacheHash[$channel];\n }", "title": "" }, { "docid": "9f5d0627f20bb61fc472608ad86b72e0", "score": "0.5377566", "text": "public function getCacheKey($options = array())\n {\n if (empty($options)) {\n $options = $this->config;\n }\n if (!empty($options['cache_key'])) {\n return $options['cache_key'];\n }\n $key = !empty($this->modx->resource) ? $this->modx->resource->getCacheKey() : '';\n\n return $key . '/' . sha1(serialize($options));\n }", "title": "" }, { "docid": "daf2642ac2abff72e5c0cc6523b992f9", "score": "0.5363234", "text": "protected static function getCacheKey(JeproshopAddressModelAddress $address){\n return $address->country_id . '_' . (int)$address->state_id . '_' . $address->postcode . '_'\n . $address->vat_number . '_' . $address->dni;\n }", "title": "" }, { "docid": "16b22e904bb1eb8c70a707c9d1911b8f", "score": "0.536209", "text": "public function cacheKeyComponent()\n {\n return 'subsite-' . Subsite::currentSubsiteID();\n }", "title": "" }, { "docid": "b8438ac8c85253a1ba82224152db48d6", "score": "0.5357036", "text": "function get_cache_id()\r\n\t{\r\n\t\tif ($this->get($this->cacheby))\r\n\t\t\treturn $this->codefile . $this->get($this->cacheby);\r\n\t\telse\r\n\t\t\treturn $this->codefile;\r\n\t}", "title": "" }, { "docid": "a6459e912c03e9fc510aca4afe9af387", "score": "0.53548604", "text": "public function getCacheId($keyValue);", "title": "" }, { "docid": "bcf92b7b439aa1f7d6af4e43cdf3cdb7", "score": "0.53540057", "text": "private function cache_key(){ \n $hashes = array();\n foreach( $this->scripts as $i => $path ){\n $path = $this->scripts[$i] = $this->resolve_path( $path );\n $hashes[] = $this->hash( $path );\n }\n if( ! $hashes ){\n throw new Exception('Cannot make cache key without scripts');\n }\n return md5( implode($hashes) );\n }", "title": "" }, { "docid": "790745c35c274b40608664e06f8c80ad", "score": "0.5352778", "text": "public function cache_info($type = NULL) {\r\n\t\treturn $this->_redis->info();\r\n\t}", "title": "" }, { "docid": "e837a65f44ce5d8bbfb9d63fc6fa70f6", "score": "0.5350285", "text": "public function key()\n\t{\n\t\tif (is_null( $this->page )) {\n\t\t\t$this->page = DQuery::clause( 'page' );\n\t\t}\n\n\t\treturn $this->page->key();\n\t}", "title": "" }, { "docid": "98294e332fdf3c90464b816d5cc3bc22", "score": "0.5345631", "text": "public static function getFromCache(string $type): PaymentType\n {\n return Cache::remember('paymentType.'.$type, 86400, function () use ($type) {\n return self::where('name', $type)->firstOrFail();\n });\n }", "title": "" }, { "docid": "ec1371a42af46859c248288378a0e72c", "score": "0.53352994", "text": "public function key()\n {\n return $this->real_page;\n }", "title": "" }, { "docid": "fa8569fcfa7f25f0b1e1ae822b832964", "score": "0.5331755", "text": "public function getCacheKey()\n {\n return sprintf('flickr-photos-component-%d', $this->ID);\n }", "title": "" }, { "docid": "ff5cb748769026b537f726a71c343402", "score": "0.5325658", "text": "public static function settings_cache_key() {\n\t\t$cachekey = \"WebfontsUtilityEnabledFonts\";\n\n\t\tif (isset($_SERVER['SERVER_NAME'])) {\n\t\t\t$server = $_SERVER['SERVER_NAME'];\n\t\t\t$server = preg_replace('/[^A-Za-z0-9]/', '', $server);\n\n\t\t\t$cachekey = $cachekey . \"_\" . $server;\n\n\t\t\t//Debug::dump($cachekey);\n\t\t}\n\t\treturn $cachekey;\n\t}", "title": "" }, { "docid": "24b551c70639324271bc94c7222157f4", "score": "0.53082836", "text": "public static function get( $szKey, $nType = null )\n\t{\n\t\t$value = self::getInstance()->m_cCache->get( $szKey, $nType );\n\t\t$value = is_string( $value ) ? unserialize( $value ) : $value;\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "539ef077d594f99dba0859304061e365", "score": "0.5304083", "text": "public static function getPageKeyFromURL($url, &$pages)\n {\n if (!$url) {\n return false;\n }\n\n $path = false;\n $url = str_replace(RL_URL_HOME, '', $url);\n $pattern = $GLOBALS['config']['mod_rewrite'] ? '/^([^\\/]+)/' : '/page\\=([^\\=\\&]+)/';\n\n preg_match($pattern, $url, $matches);\n\n if ($matches[1]) {\n $path = $matches[1];\n\n if (is_array($pages) && $key = array_search($path, $pages)) {\n return $key;\n } else {\n return $GLOBALS['rlDb']->getOne('Key', \"`Path` = '{$path}'\", 'pages');\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "444747a967bf127744825c22b0075c87", "score": "0.53023124", "text": "public function getCacheKey()\n {\n return null;\n }", "title": "" }, { "docid": "5934b4e55d59c9835142a9343c09018a", "score": "0.52691525", "text": "private function getTypeId($type) {\n \t$ptpModel = new Default_Model_PageTypes();\n \t$id_type = $ptpModel->getId($type);\n \treturn $id_type;\n }", "title": "" }, { "docid": "6e43590f9e14c80fda2ca219539c5a97", "score": "0.5238304", "text": "public function getCacheKey($id)\n {\n return self::CACHE_KEY . '_' . $id;\n }", "title": "" }, { "docid": "58aadd1fe5de09b5715226981fda167c", "score": "0.52339935", "text": "private function key(): string\n {\n return $this->cachedKey ??= call_user_func($this->keyResolver);\n }", "title": "" }, { "docid": "3a3fb738f60b606bfafc4b3873f904b7", "score": "0.5230604", "text": "abstract protected function getKey();", "title": "" }, { "docid": "85d9330cce0eefea3a373e93a24afea2", "score": "0.52214384", "text": "private function generate_file_name( $type ) {\n\n\t\t/*\n\t\t * Generate and return a cache name using sha1 and the\n\t\t * files signature.\n\t\t */\n\t\treturn sha1( $this->signature[$type] );\n\t \n\t}", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.52124107", "text": "public function getKey();", "title": "" }, { "docid": "2261bed964dfe67507ac5a0849e5057d", "score": "0.5209866", "text": "protected function getCacheKey(FeedInterface $feed) {\n return $feed->id() . ':fetcher:' . hash('sha256', $feed->getSource());\n }", "title": "" }, { "docid": "8e34c9b7f3335b33f4b9c5b1f0ae3bd3", "score": "0.5208812", "text": "public function get_url_key(){\n if(isset($_GET['key'])){\n return $_GET['key'];\n }\n return false;\n }", "title": "" }, { "docid": "8e602dd4fba5708c73437c9de26aa3a4", "score": "0.5199105", "text": "protected function getCacheKey($keyName)\n {\n $key = crc32($this->theme->getPath()).$keyName;\n /**\n * @event pages.router.getCacheKey\n * Enables modifying the key used to reference cached RainLab.Pages routes\n *\n * Example usage:\n *\n * Event::listen('pages.router.getCacheKey', function (&$key) {\n * $key = $key . '-' . App::getLocale();\n * });\n *\n */\n Event::fire('pages.router.getCacheKey', [&$key]);\n return $key;\n }", "title": "" }, { "docid": "26eb694478046e77b8fa61dffc34a9c9", "score": "0.5187627", "text": "private function refresh_sitemap_cache($type, $page_number)\n {\n }", "title": "" }, { "docid": "30bb179d0a7c6e8cefb9414891eb429f", "score": "0.5187134", "text": "public function getUrlKey();", "title": "" }, { "docid": "4409dd1c39657c7e71681dee59f5cb3d", "score": "0.51792663", "text": "private function getPageDetailsKey() {\n return $this->KEY_PREFIX . 'scaler.pages.' . $this->getEnvironmentId() . '. '. $this->getPageId() . '@' . $this->getFSVersion();\n }", "title": "" }, { "docid": "0c13f94d63f7e75f9aed950906a41822", "score": "0.51746404", "text": "protected function getCacheKey(RequestInterface $request): string\n {\n return $request->getMethod() . sha1((string)$request->getUri());\n }", "title": "" }, { "docid": "486737c13d0d8b35340a37124d64465c", "score": "0.5150921", "text": "public function cacheKeyComponent()\n {\n try {\n return 'subsite-' . Subsite::currentSubsiteID();\n } catch (UnexpectedValueException $e) {\n return 'subsite-none';\n }\n }", "title": "" }, { "docid": "79605c657549fc6ce9c0ecb2c2a1cc8b", "score": "0.51459163", "text": "protected function getCacheKey(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "c2807262b6f63745938be2e99aa8cea5", "score": "0.5144034", "text": "public function getCacheKeys();", "title": "" }, { "docid": "fba0d213a7b45d30d18bc6dea4de4ccb", "score": "0.5138837", "text": "function load_page_cache($page, $section, $type = 'graph', $time = 86400) {\n\t\tglobal $cache_file;\n\t\t$cache_file = $GLOBALS['cfg']['basedir'] . 'pages/cache/'.$type.'/'.$page.'/'.$section.'.cache';\n\t\t\n\t\t$GLOBALS['cloud_type'] = $section;\n\t\t\n\t\tif (!file_exists($cache_file)) {\n\t\t\terror_log(\"rebuilding cache file: $cache_file\");\n\t\t\t\n\t\t\tdefine_logic($page, 'index');\n\t\t\tinclude('pages/'.$type.'/'.$page.'/index.php');\n\t\t}\n\n if ((time() - filectime($cache_file)) > $time) { \n error_log(\"dispatching cache file for rebuild: $cache_file\");\n \n\t\t $db =& new SQL();\n $qry = sprintf(\"SELECT * FROM cache_queue WHERE cache_file = '%s' and complete = '0' LIMIT 1;\",\n $cache_file);\n \n if (!$db->query($qry, SQL_INIT)) {\n error_log(\"[CACHE FAILURE]: failed check update on \" . $cache_file);\n }\n \n if (!$db->record) {\n $qry = sprintf(\"INSERT INTO cache_queue (`cache_file`, `page`, `section`, `type`) VALUES ('%s', '%s', '%s', '%s');\",\n $cache_file, $page, $section, $type);\n \n if (!$db->query($qry, SQL_NONE)) {\n error_log(\"[CACHE FAILURE]: failed to dispatch update on \" . $cache_file);\n }\n }\n }\n \n\t\tinclude($cache_file);\n\t}", "title": "" }, { "docid": "9959c6ada4d7b355c98c69965ed59852", "score": "0.51220876", "text": "public function getCacheKeyInfo()\n {\n return [\n 'MEGAMENU_SUBMENU',\n $this->_storeManager->getStore()->getId(),\n $this->_design->getDesignTheme()->getId(),\n $this->_httpContext->getValue(CustomerContext::CONTEXT_GROUP),\n 'template' => $this->getTemplate(),\n $this->getCategoryId()\n ];\n }", "title": "" }, { "docid": "4bc651ac2756aa9015a42d7511abb5bd", "score": "0.5120424", "text": "protected function getCacheKey(Request $request)\n {\n return sprintf(\n 'jeanfprado.metric.%s.%s.%s',\n $this->uriKey(),\n $request->input('range', 'no-range'),\n $this->getUniqueReference() ?: 'no-unique-reference',\n );\n }", "title": "" }, { "docid": "3558f02a84afb851ce2a592ba68499e9", "score": "0.511779", "text": "function dmc_getMemcacheKey( $uri = null ) {\n\tglobal $dirtyMCVersion, $dirtyMC;\n\n\tif ( !( $dirtyMCVersion = $dirtyMC->get( DMC_DMC_VERSION_KEY_LABEL ) ) || isset( $_GET[DMC_FLUSH_ARGUMENT] ) ) {\n\t\tdmc_flush();\n\t}\n\n\t$uri = ( $uri != null ) ? $uri : $_SERVER['REQUEST_URI'];\n\n\t$key = sprintf( '%s_%s_%s',\n\t\t$_SERVER['SERVER_NAME'],\n\t\t$uri,\n\t\t$dirtyMCVersion );\n\treturn $key;\n}", "title": "" } ]
30a71591ce0c29276c7bd17a87b4c403
pour associer une actualite et une image dans la bdd
[ { "docid": "8fbe8eacd21e96399916fb3847cd78cf", "score": "0.6382733", "text": "function lien_actualite_image($id_actualite, $id_image){\r\n global $bdd;\r\n //requete d'ajout\r\n $req = $bdd->prepare(\r\n 'UPDATE \r\n actualites \r\n SET id_image = :id_image \r\n WHERE id = :id');\r\n $req->execute(array(\r\n 'id_image' => $id_image, \r\n 'id' => $id_actualite));\r\n $req->closeCursor();\r\n \r\n}", "title": "" } ]
[ { "docid": "5f65b456390cdd0fc3ed3487cc86ca52", "score": "0.6310115", "text": "public function insertImageToDb() \n {\n }", "title": "" }, { "docid": "24488ecfa822c3ea14a84d7297d64566", "score": "0.62605995", "text": "public function image();", "title": "" }, { "docid": "24488ecfa822c3ea14a84d7297d64566", "score": "0.62605995", "text": "public function image();", "title": "" }, { "docid": "d3a58f859a0739e35068dda28e956379", "score": "0.62375546", "text": "private function sql_img_actualizar(){\n\t\t$imagen = $_POST['imagen'];\n\t\tunset($_POST['imagen']);\n\t\t$this->actualizar_db('anuncios_img',$imagen);\n\t}", "title": "" }, { "docid": "d0e240d74574df83539708572a4363cf", "score": "0.61101204", "text": "function ajoute_image($nom_image){\r\n global $bdd;\r\n //requete d'ajout\r\n $req = $bdd->prepare(\r\n 'INSERT INTO \r\n images(nom, supprimable) \r\n VALUES(:nom, 1)');\r\n $req->execute(array(\r\n 'nom' => $nom_image));\r\n $req->closeCursor();\r\n \r\n //recuperation de l'id de l'image\r\n $id_image = $bdd->lastInsertId('id');\r\n \r\n return $id_image;\r\n}", "title": "" }, { "docid": "6c011c9f3e4e865a63b6f3c7c999564b", "score": "0.61032635", "text": "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "title": "" }, { "docid": "5ccd7ab1d1558d4dd7650f6f0b5fbc18", "score": "0.6092063", "text": "public function image($img);", "title": "" }, { "docid": "b2323e6145fbaf02112dd68f0cf2fce3", "score": "0.60904086", "text": "function saveImageContent($idD){\n\t\t$dom = new Zend_Dom_Query($this->content);\t \t\n\t \t//récupère les éléments de l'alerte\n\t\t$results = $dom->queryXpath('//img');\n\t\t$i = 0;\n\t\t$url = \"\";\n\t\tforeach ($results as $img) {\n\t\t\tif($url != $img->getAttribute(\"src\")){\n\t\t\t\t$url = $img->getAttribute(\"src\");\n\t\t\t\t$alt = $img->getAttribute(\"alt\");\n\t\t\t\t//vérifie si l'image est déjà enregistrée\n\t\t\t\t$arrD = $this->dbD->findByNote($url);\n\t\t\t\tif(count($arrD)>0){\n\t\t\t\t\tif($arrD[0][\"tronc\"]!=$idD){\n\t\t\t\t\t\t//duplique le document dans la base\n\t\t\t\t\t\t$arrD[0][\"tronc\"]=$idD;\n\t\t\t\t\t\tunset($arrD[0][\"doc_id\"]);\n\t\t\t\t\t\t$idDocImg = $this->dbD->ajouter($arrD[0]);\n\t\t\t\t\t\techo 'Image dupliquée : <a href=\"'.$arrD[0][\"url\"].'\">'.$idDocImg.' : '.$alt.'<br/>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo 'Image déjà enregistrée : <a href=\"'.$arrD[0][\"url\"].'\">'.$arrD[0][\"doc_id\"].' : '.$alt.'<br/>';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//enregistre l'image sur le disque\n\t\t\t\t\tif(!$img = file_get_contents($url)) { \n\t\t\t\t\t echo 'pas de fichier : '.$url.\"<br/>\";\n\t\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t\t$extention = pathinfo($url, PATHINFO_EXTENSION);\n\t\t\t\t\t\t$chemin = ROOT_PATH.'/data/gmail/'.$this->dossier.'/img/'.$idD.'_'.$i.'.'.$extention;\n\t\t\t\t\t\t$urlLocal = str_replace(ROOT_PATH, WEB_ROOT, $chemin); \n\t\t\t\t\t\tif(!$f = fopen($chemin, 'w')) { \n\t\t\t\t\t\t echo 'Ouverture du fichier impossible '.$chemin.\"<br/>\";\n\t\t\t\t\t\t}elseif (fwrite($f, $img) === FALSE) { \n\t\t\t\t\t\t echo 'Ecriture impossible '.$chemin.\"<br/>\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//enregistre le document dans la base\n\t\t\t\t\t\t\t$idDocImg = $this->dbD->ajouter(array(\"url\"=>$urlLocal,\"titre\"=>$alt,\"tronc\"=>$idD, \"note\"=>$url));\n\t\t\t\t\t\t\techo 'Image enregistrée : <a href=\"'.$urlLocal.'\">'.$idDocImg.' : '.$alt.'<br/>';\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tfclose($f); \n\t\t\t\t$i++;\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "8bc806ea44a9aea13eb3ccd5c70da172", "score": "0.60893136", "text": "private function init_img() {\n\t\t$this->img_in = imagecreatefromPNG($this->url);\n\t\t$this->img_out = ImageCreateTrueColor(imagesx($this->img_in), imagesy($this->img_in));\n\t}", "title": "" }, { "docid": "d8a80e598df71ba51657078d4383d662", "score": "0.60751146", "text": "public function update_recordfor_image($insertedid)\r {\r $query=\"update `\".$this->tablename.\"` set `image`='\".$this->image.\"' where `id`='\".$insertedid.\"' \";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "title": "" }, { "docid": "65bc4debb0a9906421fe9bb6795527e6", "score": "0.6069147", "text": "private function sql_img_nueva(){\n\t\tunset($_POST['imagen']); //(por si esta aunque vacio)\n\t\t$this->agregar_db('anuncios_img');\n\n\t}", "title": "" }, { "docid": "15cc7689c0dde6ecffb5c1934e5981ad", "score": "0.6041532", "text": "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "title": "" }, { "docid": "f65fe62dd732107133fe9ed42a27137f", "score": "0.59700835", "text": "public function afterFind()\n \t{\n \t\t//$img = $this->img;\n \t\t//$this->img = 'http://korinf/web/images/upload/item/' . $img;\n \t}", "title": "" }, { "docid": "cde044ca80fee76c5ab3510e142e730b", "score": "0.59668654", "text": "public function updateMain($module, $item_id, $file, $post) {\n\n // if main $_POST['add-main-picture'] is empty, then empty main picture in bdd \n\n if($post == true) {\n\n $manager = $this->managers->getManagerOf('Pictures');\n $unique = $manager->getUnique($module, $item_id);\n\n if(!empty($unique->Src()) && $unique->Src() != NULL) {\n\n unlink($unique->Src());\n\n }\n\n $picture = new Pictures([\n\n 'alt' => NULL,\n 'src' => NULL,\n 'item_id' => $item_id\n\n ]);\n\n $manager->updateMainPicture($picture, $module);\n\n }\n else {\n\n // if $_POST['add-main-picture'] not empty the upload file and add in bdd \n\n if (isset($file) AND $file['error'] == 0 AND $file['size'] != 0)\n {\n // if there is already something in bdd then unlink file associated \n\n $manager = $this->managers->getManagerOf('Pictures');\n $remove = $manager->getUnique($module, $item_id);\n\n if(!empty($remove->Src()) && $remove->Src() != NULL) {\n\n unlink($remove->Src());\n\n }\n\n // then upload new file and update bdd \n\n // if ($_FILES['monfichier']['size'] <= 1000000)\n // {\n // Testons si l'extension est autorisée\n $infosfichier = pathinfo($file['name']);\n $extension_upload = $infosfichier['extension'];\n $extensions_autorisees = array('jpg', 'jpeg', 'gif', 'png', 'JPG', 'JPEG');\n if (in_array($extension_upload, $extensions_autorisees))\n {\n\n // rename file to avoid duplicated file names \n\n $temp = explode(\".\", $file['name']);\n $newfilename = mt_rand(10, 1000) . '-' . $item_id . '.' . end($temp);\n $path = \"img/uploads/\" . basename($newfilename);\n move_uploaded_file($file['tmp_name'], $path);\n\n // $img = imagecreatefromjpeg(\"img/uploads/\".$newfilename);\n\n // imagejpeg($img, \"img/uploads/\".$newfilename, 50);\n\n $picture = new Pictures([\n\n 'alt' => $module,\n 'src' => $path,\n 'item_id' => $item_id\n\n ]);\n\n $manager->updateMainPicture($picture, $module);\n \n }\n } \n }\n }", "title": "" }, { "docid": "8ce6a43ed16524b992ca0682a516550b", "score": "0.59253085", "text": "public function insert() {\n\t\t\n\t\t//Resize the images and get the filenames of resized images\n\n\t\t$thumb = $this->resize($this->image, PACSImage::THUMB_WIDTH, PACSImage::THUMB_HEIGHT);\n\t\t$regular = $this->resize($this->image, PACSImage::REGULAR_WIDTH, PACSImage::REGULAR_HEIGHT);\n\t\t$full = $this->image;\n\n\t\t$db = getPDOInstance();\n\t\t$query = oci_parse($db, PACSImage::INSERT);\n\n\t\t//Descriptors for the different sized images\n\t\t$thumb_clob = oci_new_descriptor($db, OCI_D_LOB);\n\t\t$regular_clob = oci_new_descriptor($db, OCI_D_LOB);\n\t\t$full_clob = oci_new_descriptor($db, OCI_D_LOB);\n\n\t\t//Bind descriptors etc.\n\t\toci_bind_by_name($query, \":record_id\", $this->record_id);\n\t\toci_bind_by_name($query, \":thumbnail\", $thumb_clob, -1, OCI_B_BLOB);\n\t\toci_bind_by_name($query, \":regular_size\", $regular_clob, -1, OCI_B_BLOB);\n\t\toci_bind_by_name($query, \":full_size\", $full_clob, -1, OCI_B_BLOB);\n\n\t\toci_execute($query, OCI_DEFAULT);\n\n\t\t//Now we import the images in\n\t\t$thumb_clob->import($thumb);\n\t\t$regular_clob->import($regular);\n\t\t$full_clob->import($full);\n\n\t\toci_commit($db);\n\n\t\t//Cleanup the images\n\t\t@unlink($thumb);\n\t\t@unlink($regular);\n\t\t@unlink($full);\n\n\t}", "title": "" }, { "docid": "2ea0b215a0a9b58f9137e5e1802b0f2d", "score": "0.59196585", "text": "public function getImage() {}", "title": "" }, { "docid": "fd2e46e4e292716f5dcffec9a96d0877", "score": "0.59117854", "text": "private function getImageObject($res){\n\t\t$this->id = (int)$res['id'];\n\t\t$this->owner = (int)$res['owner'];\n\t\t$imgdir = '/'.$this->id.'/';\n\t\t$resizeTypes = explode(',',$res['resizeTypes']);\n\t\t$this->urls = array(\n\t\t\t'square' => $imgdir.'square.jpg',\n\t\t\t'largesquare' => $imgdir.'largesquare.jpg',\n\t\t\t'original' => $imgdir.'original.'.$res['extension']\n\t\t);\n\t\tif(in_array('small',$resizeTypes)){\n\t\t\t$this->urls['small'] = $imgdir.'small.jpg';\n\t\t}\n\t\t\n\t\tif(in_array('medium',$resizeTypes)){\n\t\t\t$this->urls['medium'] = $imgdir.'medium.jpg';\n\t\t}\n\t\t\n\t\tif(in_array('large',$resizeTypes)){\n\t\t\t$this->urls['large'] = $imgdir.'large.jpg';\n\t\t}\n\t\t\n\t\t\n\t\t$this->annotations = json_decode($res['annotations'],true);\n\t\tif(!$this->annotations){\n\t\t\t$this->annotations = array();\n\t\t}\n\t\tforeach($this->annotations as &$a){\n\t\t\t$a['body_parsed'] = parse_bbc(htmlentities($a['body']));\n\t\t}\n\t\t$this->name = $res['name'];\n\t}", "title": "" }, { "docid": "a7f4cf8af829d867bc8a88e5b1148c5f", "score": "0.5904508", "text": "public function images();", "title": "" }, { "docid": "8c3c33b26a559447e99ba315c0b5f804", "score": "0.58697134", "text": "function display_image(lt_form $fo,$bin,$height = 400, $width = 500){\n\t$fo->img(\"data:image/jpeg;base64,$bin\",\"\",\"\",$height,$width);\n}", "title": "" }, { "docid": "4057ca0468b835a073d144c813c699f6", "score": "0.5863104", "text": "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "title": "" }, { "docid": "931101a9ddc4a02ec5217883de63be21", "score": "0.58287394", "text": "function saveImage($idPublicacion, $instancia) {\r\n require_once 'class/funciones.php';\r\n \r\n // 01 session de imagenes\r\n $dataSession['productos'] = (isset($_SESSION['productos']) && count($_SESSION['productos']) > 0) ? $_SESSION['productos'] : false;\r\n \r\n // 02 recorrido de estas ('productos')\r\n $dataInsert = array();\r\n if(isset($dataSession['productos']) && count($dataSession['productos']) > 0 && $dataSession['productos'] != false) {\r\n foreach ($dataSession['productos'] as $array) {\r\n $targetFile = realpath(__DIR__ .\"/images/productos/\") .'/'. $array['img_tmp']['name'];\r\n \r\n if (!copy($array['img_tmp']['path'], $targetFile)) { echo \"failed to copy image\"; exit; }\r\n \r\n $dataInsert['publicacionID'] = $idPublicacion;\r\n $dataInsert['nombre'] = $array['img_tmp']['name'];\r\n $dataInsert['fecha_registro'] = date(\"Y-m-d h:i:s\");\r\n $dataInsert['estado'] = 1;\r\n \r\n $instancia->insertImagesByPublicacion($dataInsert);\r\n // 02.1 crear thumbnail\r\n $updir = realpath(__DIR__ .\"/images/productos/\") . \"/\";\r\n $dirLocation = realpath(__DIR__ .\"/images/productos/thumb\") . \"/\"; \r\n $extension = getFileExtension($array['img_tmp']['name']);\r\n $id = str_replace($extension, '', $array['img_tmp']['name']);\r\n makeThumbnails($updir, $extension, $id, $dirLocation);\r\n \r\n }\r\n }\r\n // 03 limpiar imagenes en session\r\n if (isset($_SESSION['productos'])) { unset($_SESSION['productos']); } \r\n}", "title": "" }, { "docid": "d1f216f187de404db43b232a71c672fa", "score": "0.5825741", "text": "private function prepara_imagem($salvar=TRUE) \r\n {\r\n // Cria a imagem\r\n if(! ($src_img = $this->create_imagem_gd()) )\r\n {\r\n return FALSE;\r\n } \r\n \r\n if($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))\r\n {\r\n $create\t= 'imagecreatetruecolor';\r\n $copy\t= 'imagecopyresampled';\r\n }\r\n else\r\n {\r\n $create\t= 'imagecreate';\r\n $copy\t= 'imagecopyresized';\r\n }\r\n\r\n $new_width = $this->width;\r\n $new_height = $this->height;\r\n \r\n $img = $create($new_width, $new_height);\r\n \r\n if($this->imagem_type==\"png\") // Caso a imagem for do tipo png o fundo fica transparent\r\n {\r\n imagealphablending($img, FALSE);\r\n imagesavealpha($img, TRUE);\r\n }\r\n\r\n $x = $this->x;\r\n $y = $this->y;\r\n\r\n $copy($img, $src_img, 0, 0, $x, $y, $new_width, $new_height, $this->width_original, $this->height_original);\r\n \r\n if($salvar)\r\n { \r\n if( ! $this->imagem_save_gd($img) )\r\n {\r\n return FALSE;\r\n }\r\n else\r\n {\r\n if(isset($this->width_thumb) && isset($this->height_thumb))\r\n {\r\n $this->create_thumb();\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $this->imagem_display_gd($img);\r\n }\r\n \r\n imagedestroy($img);\r\n imagedestroy($src_img);\r\n\r\n return TRUE;\r\n }", "title": "" }, { "docid": "1c9a89b93cfd630eb67f906e81c3690f", "score": "0.58053875", "text": "function update() {\r\n $ret = array('error' => array());\r\n $error_count = 0;\r\n $need_trans = false;\r\n if (isset($_FILES['img'])) {\r\n if ($id = intval(@$_POST['id'])) {\r\n $row = db_query_one(\"select img from {$this->table} where {$this->index_column} = $id limit 1\");\r\n\r\n //Path\r\n $filepath = MEDIA_PATH . 'images' . DS . 'article' . DS;\r\n\r\n if ($row['img']) {\r\n @unlink($filepath . $row['img']);\r\n }\r\n\r\n $image = $_FILES['img'];\r\n $imageName = basename($image['name']);\r\n\r\n if (!file_exists($filepath)) {\r\n mkdir($filepath);\r\n }\r\n\r\n //Save file\r\n move_uploaded_file($image['tmp_name'], $filepath . $imageName);\r\n\r\n list($width, $height) = getimagesize($filepath . $imageName);\r\n\r\n db_excute(\"update {$this->table} set \r\n\t\t\t\t \timg_link = 'media/images/article/$imageName'\r\n\t\t\t \t\twhere {$this->index_column} = $id\");\r\n }\r\n } else {\r\n\r\n // mapping data\r\n $data = array(\r\n 'title' => trim($_POST['title']),\r\n 'description' => trim($_POST['description']),\r\n 'alias' => trim($_POST['alias']),\r\n 'order' => intval($_POST['order']),\r\n 'catid' => intval($_POST['catid']),\r\n 'tag' => trim($_POST['tag']),\r\n 'publish' => $_POST['publish'],\r\n 'content' => trim($_POST['content'])\r\n );\r\n\r\n // check error\r\n if (empty($data['title']))\r\n $ret['error']['title'] = array('msg' => t('Tên bài viết rỗng'), 'type' => 'error');\r\n\r\n\r\n if (($error_count = $this->get_error_count($ret)) > 0) {\r\n $ret['msg'] = $this->msg('Cập nhật nội dung thất bại', 'Dữ liệu nhập ko đúng', array('return' => true, 'type' => 'error'));\r\n } else {\r\n\r\n // need translate\r\n $need_trans = true;\r\n\r\n // process import\r\n $import = intval($_POST['import']);\r\n\r\n if ($import == 1) {\r\n include APP_PATH . 'lib' . DS . 'plugins' . DS . 'FastImage.php';\r\n // import thumbnail\r\n $url = $_POST['img_import'];\r\n if ($url) {\r\n //fastest way to check image is valid\r\n $image = new FastImage($url);\r\n if ($size = $image->getSize()) {\r\n $parsed = parse_url($url);\r\n if (isset($parsed['scheme'])) {\r\n $img_import_name = substr($parsed['path'], strrpos($parsed['path'], '/') + 1);\r\n $img_import_path = MEDIA_PATH . 'images' . DS . 'article' . DS . $img_import_name;\r\n file_put_contents($img_import_path, file_get_contents($url));\r\n\r\n $data['img_link'] = 'media/images/article/' . $img_import_name;\r\n }\r\n list($data['width'], $data['height']) = $size;\r\n }\r\n }\r\n // config for content;\r\n include APP_PATH . 'lib' . DS . 'plugins' . DS . 'simple_html_dom.php';\r\n $html = str_get_html($data['content']);\r\n foreach ($html->find('img') as $img_element) {\r\n $url = $img_element->src;\r\n $parsed = parse_url($url);\r\n if (isset($parsed['scheme'])) {\r\n $img_import_name_temp = substr($parsed['path'], strrpos($parsed['path'], '/') + 1);\r\n $img_import_path = MEDIA_PATH . 'images' . DS . 'article' . DS . $img_import_name_temp;\r\n file_put_contents($img_import_path, file_get_contents($url));\r\n $img_element->src = SITE_ROOT . 'media/images/article/' . $img_import_name_temp;\r\n }\r\n }\r\n $ret['imported'] = $data['content'] = (string) $html;\r\n }\r\n\r\n // update category\r\n $cat = db_query_one('select title, secid, section from category where id = ' . $data['catid'] . ' limit 1');\r\n\r\n if ($cat) {\r\n $data['category'] = $cat['title'];\r\n $data['secid'] = $cat['secid'];\r\n $data['section'] = $cat['section'];\r\n }\r\n\r\n\r\n include_once APP_PATH . 'lib' . DS . 'plugins' . DS . 'function.text.php';\r\n $tag_slug = text_convert_vn($data['tag']);\r\n // The FULLTEXT parser determines where words start and end by looking for certain delimiter \r\n // characters; for example, “ ” (space), “,” (comma), and “.” (period)\r\n // force fulltext to search by delimeter, therefore we have fulltext works like array of btree\r\n $data['tag_slug'] = preg_replace('/[ ]+/', '-', $tag_slug);\r\n // update for tag table\r\n $tags = explode(',', $data['tag']);\r\n $tag_slugs = explode(',', $data['tag_slug']);\r\n for ($i = 0, $len = count($tag_slugs); $i < $len; ++$i) {\r\n $tag_id = trim($tag_slugs[$i]);\r\n // update tag only when tag is more than 3 chars\r\n if (strlen($tag_id) > 3) {\r\n $tag_title = trim($tags[$i]);\r\n db_excute(\"INSERT INTO tags (slug, title) \r\n\t\t\t\t\t\t\t\tVALUES ('$tag_id', '$tag_title')\r\n\t \t\t\t\t\t\t\tON DUPLICATE KEY UPDATE title='$tag_title'\");\r\n }\r\n }\r\n\r\n // check wherether insert or update\r\n if (isset($_POST['id']) && ($id = intval($_POST['id']))) {\r\n\r\n // update image_name by title?\r\n\r\n db_update($this->table, $data, $this->index_column . \" = '$id'\");\r\n } else {\r\n $data['modified'] = date('y-m-d h:i:s');\r\n $data['author'] = $this->user['name'];\r\n db_insert($this->table, $data);\r\n $ret['id'] = $id = db_insert_id();\r\n }\r\n }\r\n }\r\n\r\n if ($error_count == 0) {\r\n if ($msg = db_error())\r\n $ret['msg'] = $this->msg('Cập nhật nội dung thất bại', $msg, array('return' => true, 'type' => 'error'));\r\n else {\r\n $ret['msg'] = $this->msg('', 'Cập nhật nội dung thành công', array('return' => true));\r\n if ($need_trans)\r\n // update translate when update content, not image\r\n $this->update_trans($id);\r\n }\r\n }\r\n\r\n $this->json($ret);\r\n }", "title": "" }, { "docid": "efd06481d8d98ed1581c385023199aa8", "score": "0.57933235", "text": "function setImage( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n if ( get_class( $value ) == \"ezimage\" )\n {\n $this->ImageID = $value->id();\n }\n elseif( is_numeric( $value ) )\n {\n $this->ImageID = $value;\n }\n }", "title": "" }, { "docid": "10a4476f270386bf103e0bc3bcf731fa", "score": "0.57876784", "text": "public function carregar_imagem()\n\t{\n\t\t$id = $this->input->get(\"id_aluno\");\n\t\t$dados[\"aluno\"] = $this->Aluno_Model->retorna_aluno($id);\t\n\t\t//\tCARREGA A VIZUALIZACAO DA VIEW LISTA\n\t\t$this->load->view('layout/cabecalho_secretaria');\n\t\t$this->load->view('layout/menu_lateral_secretaria');\n\t\t$this->load->view('conteudo/_secretaria/_aluno/fotografia', $dados);\n\t\t$this->load->view('layout/rodape');\n\t\t$this->load->view('layout/script');\n\t}", "title": "" }, { "docid": "e1666341292851bf7613c8aba5b3086d", "score": "0.57662195", "text": "public function toGDImage() {}", "title": "" }, { "docid": "2f3ff8dbd18a2733fe010d8ff45c7c21", "score": "0.57617223", "text": "function upImagenAction(){\n\t\t\n\t\t$request = $this->get('request');\n\t\t\n\t\t$estetica=$request->request->get('id');\n\t\t$img=$request->request->get('img');\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t$hcEstetica = $em->getRepository('HcBundle:Hc')->find($estetica);\n\t\t\n\t\t\t\t\n\t\tif($hcEstetica){\t\t\n\t\t\t$ruta = $this->container->getParameter('dlaser.directorio.imagenes');\n\t\t\t\n\t\t\tif ($img) {\n\t\t\t\t\n\t\t\t\t$imgData = base64_decode(substr($img,22));\n\t\t\t\t\n\t\t\t\t$file = $ruta.'grafico_'.$estetica.'.png';\n\t\t\t\t\n\t\t\t\tif (file_exists($file)) { unlink($file); }\n\t\t\t\t$fp = fopen($file, 'w');\n\t\t\t\tfwrite($fp, $imgData);\n\t\t\t\tfclose($fp);\n\t\t\t\t\n\t\t\t\t$response=array(\"responseCode\"=>200, \"msg\"=>\"La operación ha sido exitosa.\");\n\t\t\t}\n\t\t}else{\n\t\t\t$response=array(\"responseCode\"=>400, \"msg\"=>\"Ha ocurrido un error al crear la imagen.\");\n\t\t}\n\t\t\n\t\t$return=json_encode($response);\n\t\treturn new Response($return,200,array('Content-Type'=>'application/json'));\n\t}", "title": "" }, { "docid": "c28b7bf979410bb9f60384e3becdb94b", "score": "0.5737372", "text": "function images_save($id_alojamiento, $nombre_imagen)\r\n {\r\n $query = sprintf(\"insert into alojamientos_imagenes (ID_Alojamiento,NombreImagen) values (%s,%s)\", $id_alojamiento, $nombre_imagen);\r\n $this->db->query($query);\r\n }", "title": "" }, { "docid": "791f0b75a0223af287aceb0e9773d224", "score": "0.5737077", "text": "function usuario_img_get($id, $tipo = 'imagem'){\n\n $conn = TConnection::open(DB);\n\n $criterio = new TCriteria;\n $criterio->add(new TFilter('id_usuario', '=', $id));\n\n\n\n $sql = new TSqlSelect;\n $sql->setEntity('usuario_imagem');\n $sql->addColumn($tipo);\n if(isset($criterio)){\n $sql->setCriteria($criterio);\n }\n\n $result = $conn->query($sql->getInstruction());\n\n if($result->rowCount()){\n\n $row = $result->fetch(PDO::FETCH_ASSOC);\n extract($row);\n\n return '<img src=\"'.$$tipo.'\">';\n\n }else{\n return false;\n }\n\n}", "title": "" }, { "docid": "0451db376a6d40d7bd93e911d67e48bf", "score": "0.573199", "text": "public function update_image(){\r $query=\"update `\".$this->tablename.\"` set `image`='\".$this->image.\"' where `id`='\".$this->id.\"'\";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "title": "" }, { "docid": "07ca8317fa5f1da9f4c0ba6599a71aac", "score": "0.5724733", "text": "function upgrade_profile_image($id, $dir='users') {\n global $CFG;\n\n $im = ImageCreateFromJPEG($CFG->dataroot .'/'. $dir .'/'. $id .'/f1.jpg'); \n\n if (function_exists('ImageCreateTrueColor') and $CFG->gdversion >= 2) {\n $im1 = ImageCreateTrueColor(100,100);\n $im2 = ImageCreateTrueColor(35,35);\n } else {\n $im1 = ImageCreate(100,100);\n $im2 = ImageCreate(35,35);\n }\n \n if (function_exists('ImageCopyResampled') and $CFG->gdversion >= 2) { \n ImageCopyBicubic($im1, $im, 0, 0, 2, 2, 100, 100, 96, 96);\n } else {\n imagecopy($im1, $im, 0, 0, 0, 0, 100, 100);\n $c = ImageColorsForIndex($im1,ImageColorAt($im1,2,2)); \n $color = ImageColorClosest ($im1, $c['red'], $c['green'], $c['blue']); \n ImageSetPixel ($im1, 0, 0, $color); \n $c = ImageColorsForIndex($im1,ImageColorAt($im1,2,97)); \n $color = ImageColorClosest ($im1, $c['red'], $c['green'], $c['blue']); \n ImageSetPixel ($im1, 0, 99, $color); \n $c = ImageColorsForIndex($im1,ImageColorAt($im1,97,2)); \n $color = ImageColorClosest ($im1, $c['red'], $c['green'], $c['blue']); \n ImageSetPixel ($im1, 99, 0, $color); \n $c = ImageColorsForIndex($im1,ImageColorAt($im1,97,97)); \n $color = ImageColorClosest ($im1, $c['red'], $c['green'], $c['blue']); \n ImageSetPixel ($im1, 99, 99, $color); \n for ($x = 1; $x < 99; $x++) { \n $c1 = ImageColorsForIndex($im1,ImageColorAt($im,$x,1)); \n $color = ImageColorClosest ($im, $c1['red'], $c1['green'], $c1['blue']); \n ImageSetPixel ($im1, $x, 0, $color); \n $c2 = ImageColorsForIndex($im1,ImageColorAt($im1,$x,98)); \n $color = ImageColorClosest ($im1, $red, $green, $blue); \n $color = ImageColorClosest ($im, $c2['red'], $c2['green'], $c2['blue']); \n ImageSetPixel ($im1, $x, 99, $color); \n } \n for ($y = 1; $y < 99; $y++) { \n $c3 = ImageColorsForIndex($im1,ImageColorAt($im, 1, $y)); \n $color = ImageColorClosest ($im, $red, $green, $blue); \n $color = ImageColorClosest ($im, $c3['red'], $c3['green'], $c3['blue']); \n ImageSetPixel ($im1, 0, $y, $color); \n $c4 = ImageColorsForIndex($im1,ImageColorAt($im1, 98, $y)); \n $color = ImageColorClosest ($im, $c4['red'], $c4['green'], $c4['blue']); \n ImageSetPixel ($im1, 99, $y, $color); \n } \n } \n ImageCopyBicubic($im2, $im, 0, 0, 2, 2, 35, 35, 96, 96);\n\n if (function_exists('ImageJpeg')) {\n if (ImageJpeg($im1, $CFG->dataroot .'/'. $dir .'/'. $id .'/f1.jpg', 90) and \n ImageJpeg($im2, $CFG->dataroot .'/'. $dir .'/'. $id .'/f2.jpg', 95) ) {\n @chmod($CFG->dataroot .'/'. $dir .'/'. $id .'/f1.jpg', 0666);\n @chmod($CFG->dataroot .'/'. $dir .'/'. $id .'/f2.jpg', 0666);\n return 1;\n }\n } else {\n notify('PHP has not been configured to support JPEG images. Please correct this.');\n }\n return 0;\n}", "title": "" }, { "docid": "6f53dd3a828f2eb440cf4cd9b4dbcd5a", "score": "0.5724485", "text": "public function sql_img_preparador(){\n\n\t\tif(!empty($_POST['imagen'])){\n\t\t\t$actividad = 'actualizar datos imagen';\n\t\t\t$this->sql_img_actualizar();\n\t\t\t\t\t\n\t\t}else{\n\t\t\t$actividad = 'nueva imagen';\n\t\t\t$this->sql_img_nueva();\n\t\t}\t\t \n\n\t\t$anuncio = $this->resolver_enigma($_POST['id_e']);\n\t\t$this->check_anuncio_apto($anuncio);\t\n\t\t//actualizo movimiento\n\t\t$this->Perfil->movimientoStats($actividad);\n\n\t}", "title": "" }, { "docid": "9ac878395ff6936e2581fd1801923180", "score": "0.57193637", "text": "abstract public function createImageFromFile();", "title": "" }, { "docid": "a7db9406b99d0e28f994d055c0893438", "score": "0.5702461", "text": "protected function getPicture()\n {\n\n }", "title": "" }, { "docid": "44a6d3fad59a43a2bda457a074c0f1ac", "score": "0.5699322", "text": "function buscar_palabras_asociadas_imagen($id_imagen) {\n\t\t$query = \"SELECT palabras.*, palabra_imagen.*\n\t\tFROM palabras, palabra_imagen\n\t\tWHERE palabra_imagen.id_imagen='$id_imagen'\n\t\tAND palabra_imagen.id_palabra=palabras.id_palabra\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3d9a386bfa8ec04324b55fe3392e7614", "score": "0.56925577", "text": "public function generateMainImage();", "title": "" }, { "docid": "3d9a386bfa8ec04324b55fe3392e7614", "score": "0.56925577", "text": "public function generateMainImage();", "title": "" }, { "docid": "5187e5f525bef638c36479772f26b17d", "score": "0.5684626", "text": "function getBaseImage($idMobile)\n {\n $query = \"select * from hinhanh where Mobile_idMobile = {$idMobile} and logo = 1\";\n $pre = $this->db->prepare($query);\n $pre->execute();\n $data = $pre->fetchAll(PDO::FETCH_ASSOC);\n $pre->closeCursor();\n return $data;\n }", "title": "" }, { "docid": "a9c3c0e2356d4398298e26e110e9f760", "score": "0.5665781", "text": "function get_image_set($userid, $con_mng){\r\n\r\n $g_image = \"SELECT image40 FROM images WHERE userid=:userid\";\r\n $g_image_handler = $con_mng->prepare($g_image);\r\n $g_image_handler->execute(array(':userid' => $userid));\r\n $g_ans = $g_image_handler->fetch(PDO::FETCH_OBJ);\r\n return $g_ans->image40;\r\n}", "title": "" }, { "docid": "c3d971caad3289b6016d4a7206b4f110", "score": "0.56602466", "text": "public function save_img_instant() {\n $id = $this->input->post('id');\n $src = $this->input->post('src');\n $this->load->model('options_model');\n\n if (!($data = $this->options_model->get_option(\"instant_img\"))) {\n $this->options_model->save_option(\"instant_img\", json_encode([]));\n $data = $this->options_model->get_option(\"instant_img\");\n }\n $data = json_decode($data->option_content, true);\n $data[$id] = $src;\n $this->options_model->save_option(\"instant_img\", json_encode($data));\n }", "title": "" }, { "docid": "b40443078917ab6b1824a07a3f8b4a65", "score": "0.5655766", "text": "function altaImg($nomImg, $ruta, $idProducte){\n $conn=connexioBD();\n $sql=\"INSERT INTO imatges (nom, ruta, producte_id) VALUES ('$nomImg', '$ruta', '$idProducte')\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al darte de alta\".$conn->error);\n }\n $conn->close();\n}", "title": "" }, { "docid": "2b49f58c7b8317abfbdf3f510e4b9f43", "score": "0.5650719", "text": "public function toPNG();", "title": "" }, { "docid": "b0fb3243325fb1977968a181050959b3", "score": "0.5638201", "text": "protected function combineImages() {}", "title": "" }, { "docid": "fc3a1690e1aa52150e04e405de20d231", "score": "0.5629414", "text": "function create_image2() {\n global $GB_Setting;\n global $GBDBmain;\n global $GBDBuser;\n $GBSQL = \"SELECT * from locations \";\n $result = sqlite_query($GBDBuser, $GBSQL);\n $locs = sqlite_fetch_all($result);\n //if(file_exists( \"plugins/GiftBox/\".$GB_Setting['userid'].\"_\".GBox_XY_map ))\n // {\n // $MapXY = load_array ( GBox_XY_map );\n // }\n // else\n // {\n // AddLog2(\"GB_XY_map.txt not found\");\n // $MapXY = array();\n // }\n @list($level, $gold, $cash, $FarmSizeX, $FarmSizeY) = explode(';', @file_get_contents(F('playerinfo.txt')));\n if (($FarmSizeX == '') || ($FarmSizeY == '')) {\n $GB_place_items = \"No\";\n return;\n } else {\n $GB_place_items = \"OK\";\n }\n $maxX = $FarmSizeX * 4;\n $maxX = $maxX + 3;\n $maxY = $FarmSizeY * 4;\n $maxY = $maxY + 3; //GB_AddLog (\"*** SQL Error *** \" . $GBSQL );\n $im = @imagecreate($maxX, $maxY) or GB_AddLog(\"Cannot Initialize new GD image stream\");\n $background_color = imagecolorallocate($im, 255, 255, 255); // yellow\n $red = imagecolorallocate($im, 255, 0, 0); // red\n $green = imagecolorallocate($im, 0, 255, 0);\n $blue = imagecolorallocate($im, 0, 0, 255); // blue\n $white = imagecolorallocate($im, 255, 255, 255);\n $yellow = imagecolorallocate($im, 255, 255, 0);\n $black = imagecolorallocate($im, 0, 0, 0);\n $purple = ImageColorAllocate($im, 153, 51, 255); //purple\n $pink = ImageColorAllocate($im, 255, 0, 128); //pink\n $grey = ImageColorAllocate($im, 192, 192, 192); //grey\n $brown = ImageColorAllocate($im, 51, 0, 0);\n $loc = \"Animal\";\n $style = array($white, $white, $white, $blue, $blue, $blue);\n ImageSetStyle($im, $style);\n $X1 = $GB_Setting[$loc . 'X1'] * 4;\n $Y1 = $maxY - $GB_Setting[$loc . 'Y1'] * 4;\n $X2 = $GB_Setting[$loc . 'X2'] * 4;\n $Y2 = $maxY - $GB_Setting[$loc . 'Y2'] * 4;\n //imagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, $blue);\n imagefilledrectangle($im, $X1, $Y1, $X2, $Y2, IMG_COLOR_STYLED);\n $loc = \"Tree\";\n $style = array($white, $white, $white, $yellow, $yellow, $yellow);\n ImageSetStyle($im, $style);\n $X1 = $GB_Setting[$loc . 'X1'] * 4;\n $Y1 = $maxY - $GB_Setting[$loc . 'Y1'] * 4;\n $X2 = $GB_Setting[$loc . 'X2'] * 4;\n $Y2 = $maxY - $GB_Setting[$loc . 'Y2'] * 4;\n //imagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, $yellow);\n imagefilledrectangle($im, $X1, $Y1, $X2, $Y2, IMG_COLOR_STYLED);\n $loc = \"Decoration\";\n $style = array($white, $white, $white, $black, $black, $black);\n ImageSetStyle($im, $style);\n $X1 = $GB_Setting[$loc . 'X1'] * 4;\n $Y1 = $maxY - $GB_Setting[$loc . 'Y1'] * 4;\n $X2 = $GB_Setting[$loc . 'X2'] * 4;\n $Y2 = $maxY - $GB_Setting[$loc . 'Y2'] * 4;\n //imagefilledrectangle($im, $X1, $Y1 , $X2, $Y2, $grey);\n imagefilledrectangle($im, $X1, $Y1, $X2, $Y2, IMG_COLOR_STYLED);\n foreach($locs as $loc) {\n $GB_fill = $red;\n if (strpos($loc['_what'], 'E') !== false) {\n $GB_fill = $green;\n }\n if (strpos($loc['_what'], 'Decoration') !== false) {\n $GB_fill = $black;\n }\n if (strpos($loc['_what'], 'Animal') !== false) {\n $GB_fill = $purple;\n }\n if (strpos($loc['_what'], 'Building') !== false) {\n $GB_fill = $pink;\n }\n if (strpos($loc['_what'], 'Plot') !== false) {\n $GB_fill = $brown;\n }\n $Map_PXI = $loc['_X'] * 4;\n $Map_PYI = $loc['_Y'] * 4;\n $Map_PYI = $maxY - $Map_PYI;\n imagefilledrectangle($im, $Map_PXI, $Map_PYI, $Map_PXI + 1, $Map_PYI + 1, $GB_fill);\n }\n $GB_map_image = \"plugins/GiftBox/\" . $GB_Setting['userid'] . \"_FarmMap3.png\";\n imagepng($im, $GB_map_image);\n imagedestroy($im);\n}", "title": "" }, { "docid": "a7cc577c0e119f297a4ad5792fea3978", "score": "0.5628537", "text": "public function guardaImagen()\n {\n $tempFile = $_FILES['Filedata']['tmp_name'];\n \n $prefijo = substr(md5(uniqid(rand())),0,2); \n $charNotValid = array (\"'\",\" \",\"Ñ\",\"ñ\");\n $file_name = $prefijo.\"_\".str_replace($charNotValid,\"\",stripslashes(utf8_decode($_FILES['Filedata']['name']))); \n $targetPath = $_SERVER['DOCUMENT_ROOT'] .'/'. $_REQUEST['folder'] . '/'; \n $targetFile = str_replace('//','/',$targetPath) . $file_name; \n \n if (copy($tempFile,$targetFile)){//copy a la carpeta del servidor\n \n ProductoImagen::where('idProducto', (int)$_POST['idProducto'])\n ->update(array('cnVisible' => 0));\n \n\n $ProductoImagen = new ProductoImagen;\n $ProductoImagen->dsRuta = $file_name;\n $ProductoImagen->idProducto = (int)$_POST['idProducto'];\n $ProductoImagen->save();\n }\n \n echo 1;\n }", "title": "" }, { "docid": "ddc17a510394c2672e2ad31fb2af10aa", "score": "0.56252277", "text": "function getblob($fieldname,$tablename=\"\",$keyname=\"\",$key=0) {\n\tglobal $blob_key;\n\tif (!$tablename) $tablename=$this->table;\n\tif (!$keyname) $keyname=$this->key;\n\tif ( $_FILES[$fieldname]) {\n\t $db = new $this->database_class;\n\t\t@list($width,$height,$type,$sizestr,$mimestr,$channels,$bits) = getimagesize ($_FILES[$fieldname]['tmp_name']);\n\t\tif (!$mimestr) {\n\t\t\tif ($type) $mimestr=image_type_to_mime_type($type);\n\t\t\telse $mimestr = $_FILES[$fieldname]['type'];\n\t\t}\n\t\t$name = $_FILES[$fieldname]['name'];\n\t\t$extension = image_type_to_extension($type);\n\t\tif ($db->type==\"pdo\")\n\t\t\t$data = file_get_contents($_FILES[$fieldname]['tmp_name']);\n\t\telse\n\t\t\t$data = $db->quote(file_get_contents($_FILES[$fieldname]['tmp_name']));\n\t\tif (!empty($key)) $sql = \"UPDATE\"; else $sql = \"INSERT INTO\";\n\t\t$sql .= \" image_data SET \";\n\t\t$sql .= \"tablename = '\".magicquote($tablename).\"',\";\n\t\t$sql .= \"fieldname = '\".magicquote($fieldname).\"',\";\n\t\tif (!empty($key)) $sql .= \"keyvalue = '\".magicquote($key).\"',\";\n\t\t$sql .= \"width = '$width',\";\n\t\t$sql .= \"height = '$height',\";\n\t\t$sql .= \"type = '$type',\";\n\t\t$sql .= \"sizestr = '\".magicquote($sizestr).\"',\";\n\t\t$sql .= \"mimestr = '\".magicquote($mimestr).\"',\";\n\t\t$sql .= \"channels = '$channels',\";\n\t\t$sql .= \"bits = '$bits',\";\n\t\t$sql .= \"name = '\".magicquote($name).\"',\";\n\t\t$sql .= \"extension = '\".magicquote($extension).\"',\";\n\t\t$sql .= \"image_time = '\".date(\"Y-m-d H:i:s\").\"'\";\n\t\tif (!empty($key)) $sql .= \"WHERE \".$db->qi($keyname).\"='$key'\";\n\t\t$db->query($sql);\n\t\t$db->query(\"SELECT LAST_INSERT_ID()\");\n\t\t$db->next_record();\n\t\t$blob_key = $db->f(0);\n\t}\n\t// Check if file will fit into sql blob\n\tif (($this->image_store == \"disk\") or ($_FILES[$fieldname]['size'] > $this->form_data->elements[$fieldname][\"ob\"]->sqlsize )) {\n\t\t// if not attempt to store locally on disk and store the filename in the blob instead.\n \t$tmpfname = \"image/\".$db->nextid(\"image\").$_FILES[$fieldname]['name'];\n\t\tif ($_ENV[\"SubFolder\"]) $tmpfname = $_ENV[\"SubFolder\"] . \"/\" . $tmpfname;\n \tif ( move_uploaded_file($_FILES[$fieldname]['tmp_name'],$_SERVER[\"DOCUMENT_ROOT\"].'/'.$tmpfname) ) {\n\t\t\t// if successfully saved return filename of stored image.\n \treturn $tmpfname;\n \t} else {\n\t\t\t// unable to store uploaded file\n if ($this->image_store == \"disk\") $msg = \"Save mode set to save on Disk not SQL\";\n else $msg = \"File too big for SQL datatype \";\n EventLog($msg, \"and unable to move file to $tmpfname. Uploaded File $name NOT saved.\", \"Error\");\n \treturn \"\";\n \t}\n\t} else {\n\t\treturn $data;\n\t}\n }", "title": "" }, { "docid": "ac99e3acf1bba9c6c1cb63adf4232470", "score": "0.56243104", "text": "function recallImage() {\n\t\t//echo \"at recall <br />\";\n\t\tif (!$this->exists) {\n\n\t\t \t$this->db = mysql_connect($this->db_host,$this->db_user,$this->db_pass);\n\t\t\tmysql_select_db($this->db_name, $this->db);\t\t \n\n\t\t\t$query = \"select imagedata from images where username='\".$this->user.\"'\";\n\t\t\n\t\t\tif(!$result || mysql_num_rows($result) > 1 || mysql_num_rows($result) < 1) { die('faield'); }\n\n\t\t\t$this->userdata = mysql_fetch_assoc($result);\n\t\t\t\t\n\t\t\tmysql_free_result($result);\n\t\t\tmysql_close($this->db);\n\t\t\t\n\t\t\t$this->image = $this->userdata['imagedata'];\n\t\t}\n\t\t\n\t\telse {\n\t\t\n\t\t\t$this->image = $this->imagedata;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "3294626dab06717651cadcc26c7792e8", "score": "0.5612908", "text": "static function dt_edit_image2($title,$name,$value,$width = 0,$height = 0,$comment='',$use_dropzone = 0,$list_other_images = array(),$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!$use_dropzone){\n\t\t\t$html = '<tr><td valign=\"top\" class=\"key\" valign=\"top\">'.$title.'</td><td class=\"value\">';\n\t\t\tif($value){\n\t\t\t\t\t$html_w = $width?' width=\"'.$width.'\" ':'';\n\t\t\t\t\t$html_h = $height?' height=\"'.$height.'\" ':'';\n\t\t\t\t\t$html .= '<img src=\"'.$value.'\" '.$html_w.' '.$html_h.' /><br/>';\n\t\t\t}\n\t\t\t$html .= '<input type=\"file\" name=\"'.$name.'\" id=\"'.$name.'\" />';\n\t\t\tif($comment)\n\t\t\t\t$html .= '<p class=\"help-block\">'.$comment.'</p>';\n\t\t\t$html .= '</td></tr>';\n\t\t}else{\n\t\t\t$id = FSInput::get('id');\n\t\t\t$module = FSInput::get('module');\n\t\t\t$view = FSInput::get('view');\n\t\t\tif($id)\n\t\t\t\t$uploadConfig = base64_encode('edit|'.$id);\t\t\n\t\t\telse\n\t\t\t\t$uploadConfig = base64_encode('add|'.session_id());\n\n\t\t\t$list_other_images = TemplateHelper::get_other_images($module ,$uploadConfig);\n\t\t\t$colors = TemplateHelper::get_colors($id);\n\n\t\t\t$arr_sku_map = array(); \n\t\t\t$i= 1;\n\t\t\tforeach ($list_other_images as $item) {\n\t\t\t\t$arr_sku_map['Data'][$i]['AttachmentID']=$item->id;\n\t\t\t\t$arr_sku_map['Data'][$i]['FileName']=$item->title;\n\t\t\t\t$arr_sku_map['Data'][$i]['Path'] = URL_ROOT.str_replace('/original/','/original/', $item->image) ;\n\t\t\t\t$arr_sku_map['Data'][$i]['ColorId'] = $item->color_id;\n\t\t\t\t$i++;\n\t\t\t}\n if(!count($arr_sku_map)){\n $arr_sku_map['Data'][0]['AttachmentID']= 0;\n\t\t\t\t$arr_sku_map['Data'][0]['FileName']= '0';\n\t\t\t\t$arr_sku_map['Data'][0]['Path'] = '0';\n\t\t\t\t$arr_sku_map['Data'][0]['ColorId'] = '0';\n }\n\t\t\t$skuConfig = json_encode($arr_sku_map);\n\t\t\t$html = '\n\t\t <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.css\" />\n\t\t\t<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"libraries/dropzone/dropzone.css\" />\n\n\t\t\t<script type=\"text/javascript\" src=\"'. URL_ROOT.'libraries/jquery/dropzone/dist/min/dropzone.min.js\"></script>\n\n\t\t\t <script>\n\t\t\t $(document).ready(function() {\n\t\t\t \tvar data ='.$skuConfig.';\n\t\t\t\tvar previewNode = document.querySelector(\"#template\");\n\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\tpreviewNode.id = \"\";\n\t\t\t\tvar previewTemplate = previewNode.parentNode.innerHTML;\n\t\t\t\tpreviewNode.parentNode.removeChild(previewNode);\n\t\t\t\tvar myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone\n\t\t\t\t url: \"index2.php?module='.$module.'&view='. $view.'&raw=1&task=upload_other_images&data=\"+uploadConfig,\n\t\t\t\t thumbnailWidth: 100,\n\t\t\t\t thumbnailHeight: 100,\n\t\t\t\t parallelUploads: 20,\n\t\t\t\t previewTemplate: previewTemplate,\n\t\t\t\t autoQueue: true, \n\t\t\t\t previewsContainer: \"#previews\", \n\t\t\t\t clickable: \".fileinput-button\", \n\t\t\t\t removedfile: function(file) {\n\t\t\t\t \t\tconsole.log(file);\n\t\t\t\t\t \tvar reocord_id = $(\"#id_mage\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=delete_other_image\",\n\t\t\t\t\t data: { \"name\": file.name,\"reocord_id\":reocord_id,\"id\":file.size}\n\t\t\t\t\t });\n\t\t\t\t\tvar _ref;\n\t\t\t\t\treturn (_ref = file.previewElement) != null ? _ref.parentNode.removeChild(file.previewElement) : void 0; \n\t\t\t\t },\n success: function(file, response){\n //alert(response);\n file.previewElement.id = \"sort_\"+response;\n }, \n\t\t\t\t init: function () {\n\t\t\t\t var thisDropzone = this; \n if (data.Data != \"\") {\n $.each(data.Data, function (index, item) {\n var mockFile = {\n name: item.FileName,\n title: item.title,\n size: item.AttachmentID\n };\n thisDropzone.emit(\"addedfile\", mockFile);\n thisDropzone.emit(\"thumbnail\", mockFile, item.Path);\n \n //On the created element added the id property \n \t\t\t\t\t\t\t$(mockFile.previewElement).prop(\"id\", \"sort_\"+item.AttachmentID);\n $(mockFile.previewTemplate).find(\".title_dropzon\").val(item.FileName);\n \n \t\t\t\t\t\t\t//$(mockFile.previewTemplate).find(\".dz-color\").val(item.ColorId);\n \t\t\t\t\t\t\t//select_index = $(\"#sort_\"+item.AttachmentID+\" .dz-color option:selected\").index();\n\n \t\t\t\t\t\t\t//color_code = $(\"#sort_\"+item.AttachmentID+\" .dz-color\")[0].options[select_index].style.backgroundColor;\n \t\t\t\t\t\t\t//console.log($(\"#sort_\"+item.AttachmentID+\" .dz-color\"));\n \t\t\t\t\t\t\t//$(\"#sort_\"+item.AttachmentID+\" .dz-color\").css(\"background-color\", color_code);\n\n });\n }\n\t \t }\n\t\t\t\t});\n\n\t\t\t\t$(function() {\n\t\t\t\t\t$(\"#previews\").sortable({\n\t\t\t\t\t\tupdate : function () {\n\t\t\t\t\t\t\tserial = $(\"#previews\").sortable(\"serialize\");\n\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\turl: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=sort_other_images\",\n\t\t\t\t\t\t\t\ttype: \"post\",\n\t\t\t\t\t\t\t\tdata: serial,\n\t\t\t\t\t\t\t\terror: function(){\n\t\t\t\t\t\t\t\t\talert(\"Lỗi load dữ liệu\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\n\t\t\t });\n\t\t\t\t//function change_color(element){\n\t\t\t\t//\tvalue = $(element).val();\n\t\t\t\t//\tparent_id = $(element).parent().attr(\"id\");\n\t\t\t\t//\tid = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t//\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t//\t $.ajax({\n\t\t\t\t// type: \"POST\",\n\t\t\t\t// url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_attr_image\",\n\t\t\t\t// data: { \"field\": \"color\",\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t// });\n\t\t\t\t//\t element.style.backgroundColor=element.options[element.selectedIndex].style.backgroundColor;\n\t\t\t\t//}\n \n function change_tile(element){\n\t\t\t\t\tvalue = $(element).val();\n\t\t\t\t\tparent_id = $(element).parent().attr(\"id\");\n id = parent_id.replace(\"sort_\", \"\");\n\t\t\t\t\tvar uploadConfig = $(\"#uploadConfig\").val();\n\t\t\t\t\t $.ajax({\n\t\t\t\t type: \"POST\",\n\t\t\t\t url: \"index2.php?module='.$module.'&view='.$view.'&raw=1&task=change_title_attr_image\",\n\t\t\t\t data: {\"data\":uploadConfig,\"id\":id,\"value\":value}\n\t\t\t\t });\n\t\t\t\t}\n\t\t\t </script>\n\t\t\t';\n\t\t\t$html .= '<div class=\"dropzone files\" id=\"previews\">';\n\t\t\t\t$html .= '<div id=\"template\" class=\"dz-preview dz-image-preview\">';\n\t\t\t\t\t$html .= '<div class=\"dz-details\">';\n\t\t\t\t\t $html .= '<img data-dz-thumbnail />';\n\t\t\t\t\t$html .= '</div>';\n\t\t\t\t\t$html .= '<div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress=\"\"></span></div>';\n\t\t\t\t \t$html .= '<a class=\"dz-remove\" data-dz-remove id=\"\">Remove</a>';\n $html .= '<input type=\"text\" onchange=\"javascript: change_tile(this);\" class=\"form-control title_dropzon\" placeholder=\"Title\" style=\"width:100px;border-radius: 0px;margin-top: 2px;\">'; \n\t\t\t\t \t//$html .= '<select class=\"dz-color\" onchange=\"javascript: change_color(this);\">';\n\t\t\t\t \t//$html .= '<option value=\"0\" style=\"\">Chọn màu</option>';\n\t\t\t\t \t//if(@$colors ){\n\t\t\t\t\t//\tforeach($colors as $item){\n\t\t\t\t\t//\t\t$html .= '<option value=\"'.$item -> id.'\" style=\"background-color: #'.$item -> color_code.'\">'. $item -> color_name.'</option>';\n\t\t\t\t\t//\t}\n\t\t\t\t\t//}\n\t\t\t\t\t//$html .= '</select>';\n\t\t\t\t$html .= '</div>';\n\t\t\t\t\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$uploadConfig.'\" id=\"uploadConfig\" />';\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$id.'\" id=\"id_mage\" />';\n\t\t\t $html .= '<span class=\"post_images fileinput-button\">Thêm ảnh/video</span>';\n\n\t\t}\n\t\techo $html;\n\t}", "title": "" }, { "docid": "2beb782ffdc8133f457d7302c72c63ca", "score": "0.5605352", "text": "function get_actualite($id_actualite){\r\n global $bdd;\r\n //requete\r\n $req = $bdd->query(\r\n 'SELECT a.id AS id_actualite, titre, DATE_FORMAT(date_creation, \\'Le %d/%m/%Y à %Hh%imin%ss\\') AS date, contenu, i.nom AS image\r\n FROM actualites AS a\r\n INNER JOIN images AS i\r\n ON a.id_image = i.id\r\n WHERE a.id = ' . $id_actualite);\r\n \r\n //entree de l'actualite dans un tableau\r\n $actualite = $req->fetch();\r\n $req->closeCursor();\r\n \r\n return $actualite;\r\n}", "title": "" }, { "docid": "a6553b4d50f9238aad7e36e61237adc3", "score": "0.5589533", "text": "function actualizar_imagen($id_imagen,$id_tipo_imagen,$estado,$registrado,$id_licencia,$id_autor,$tags,$tipo_pictograma,$validos_senyalectica) {\n\t\t\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\t\t\n\t\t$UpdateRecords = \"UPDATE imagenes \n\t\tSET estado='$estado', \n\t\tregistrado='$registrado', ultima_modificacion='$fecha',\n\t\tid_licencia='$id_licencia', id_autor='$id_autor',\n\t\ttags_imagen='$tags', id_tipo_imagen='$id_tipo_imagen',\n\t\ttipo_pictograma=$tipo_pictograma,\n\t\tvalidos_senyalectica='$validos_senyalectica'\n\t\tWHERE id_imagen='$id_imagen'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\t\t\t\n\t}", "title": "" }, { "docid": "424a138b2be2ceb4d7e60575aa7e8fd2", "score": "0.5589286", "text": "function createImage() {\n\t // echo \"at creation <br />\";\n\t \t$this->db = mysql_connect($this->db_host,$this->db_user,$this->db_pass);\n\t\tmysql_select_db($this->db_name, $this->db);\n\t\t\n\t \t$result = mysql_query('SELECT * FROM `whatpulse` where user=\"'.$this->user.'\"',$this->db) or die(mysql_error());\n\t \t$rows = mysql_num_rows($result);\n\t\t\t\t\n\t\t$data = mysql_fetch_assoc($result);\n\t\tif (!$rows) {\n\t\t\theader(\"Content-type: image/png\");\n\t\t\t$im = imagecreate(150,100);\n\t\t\timagecolorallocate($im,255,255,255);\n\t\t\t$color = imagecolorallocate($im,0,0,0);\n\t\t\timagestring($im,3,5,5,\"Invalid user account.\",$color);\n\n\t\t\timagestring($im,2,50,40,\"Whatpulse\",$color);\n\t\t\timagestring($im,2,50,50,\"Signature\",$color);\n\t\t\timagestring($im,2,50,60,\"Images\",$color);\n\t\t\timagepng($im);\n\t\t\timagedestroy($im);\n\t\t\tdie();\n\t\t}\n\t\t$im = imagecreatetruecolor($data[width],$data[height]);\n\t\t$im2 = imagecreatefrompng($data['path']);\n\n\t\tif (!imagecopy($im, $im2, 0, 0, 0, 0, $data[width], $data[height])) { echo $data['user'] . \" has an invalid background image of \" . $data['path']; }\n\t\t//$trans = imagecolorallocate($im,$data['transred'],$data['transgreen'],$data['transblue']);\n\t\t//imagecolortransparent($im,$trans);\n\t\t$fontcolor = imagecolorallocate($im, $data[fontred], $data[fontgreen], $data[fontblue]);\n\t\t$shadow = imagecolorallocate($im, $data[sred], $data[sgreen], $data[sblue]);\n\t\t$blk = imagecolorallocate($im, 0, 0, 0);\n\n\n\t\tif ($data[se]) {\n\t\t\tif ($data[usere]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[userx]+1,$data[usery]+1,$shadow,'fonts/' . $data['font'],'User: ' . $data['user']);\n\t\t\t}\n\t\t\tif ($data[tkce]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[tkcx]+1,$data[tkcy]+1,$shadow,'fonts/' . $data['font'],'Keys: ' . number_format($data['tkc']));\n\t\t\t}\n\t\t\tif ($data[tmce]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[tmcx]+1,$data[tmcy]+1,$shadow,'fonts/' . $data['font'],'Clicks: ' . number_format($data['tmc']));\n\t\t\t}\n\t\t\tif ($data[ranke]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[rankx]+1,$data[ranky]+1,$shadow,'fonts/' . $data['font'],'Rank: ' . number_format($data['rank']));\n\t\t\t}\n\t\t\tif ($data[tnamee]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[tnamex]+1,$data[tnamey]+1,$shadow,'fonts/' . $data['font'],'Team: ' . $data['tname']);\n\t\t\t}\n\t\t\tif ($data[countrye]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[countryx]+1,$data[countryy]+1,$shadow,'fonts/' . $data['font'],'Country: ' . $data['country']);\n\t\t\t}\n\t\t\tif ($data[tkeyse]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[tkeysx]+1,$data[tkeysy]+1,$shadow,'fonts/' . $data['font'],'Team Keys: ' . number_format($data['tkeys']));\n\t\t\t}\n\t\t\tif ($data[tclickse]) {\n\t\t\t\timagettftext($im,$data[fontsize],0,$data[tclicksx]+1,$data[tclicksy]+1,$shadow,'fonts/' . $data['font'],'Team Clicks: ' . number_format($data['tclicks']));\n\t\t\t}\n\t\t\tif ($data[tranke]) {\n\t\t\t\t\nimagettftext($im,$data[fontsize],0,$data[trankx]+1,$data[tranky]+1,$shadow,'fonts/' . $data['font'],'Team Rank: ' . $data['trank'] . '/' . $data['tmembers']);\n\t\t\t}\n\t\t}\n\t\tif ($data[usere]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[userx],$data[usery],$fontcolor,'fonts/' . $data['font'],'User: ' . $data['user']);\n\t\t}\n\t\tif ($data[tkce]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[tkcx],$data[tkcy],$fontcolor,'fonts/' . $data['font'],'Keys: ' . number_format($data['tkc']));\n\t\t}\n\t\tif ($data[tmce]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[tmcx],$data[tmcy],$fontcolor,'fonts/' . $data['font'],'Clicks: ' . number_format($data['tmc']));\n\t\t}\n\t\tif ($data[ranke]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[rankx],$data[ranky],$fontcolor,'fonts/' . $data['font'],'Rank: ' . number_format($data['rank']));\n\t\t}\n\t\tif ($data[tnamee]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[tnamex],$data[tnamey],$fontcolor,'fonts/' . $data['font'],'Team: ' . $data['tname']);\n\t\t}\n\t\tif ($data[countrye]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[countryx],$data[countryy],$fontcolor,'fonts/' . $data['font'],'Country: ' . $data['country']);\n\t\t}\n\t\tif ($data[tkeyse]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[tkeysx],$data[tkeysy],$fontcolor,'fonts/' . $data['font'],'Team Keys: ' . number_format($data['tkeys']));\n\t\t}\n\t\tif ($data[tclickse]) {\n\n\t\t\timagettftext($im,$data[fontsize],0,$data[tclicksx],$data[tclicksy],$fontcolor,'fonts/' . $data['font'],'Team Clicks: ' . number_format($data['tclicks']));\n\t\t}\n\t\tif ($data[tranke]) {\n\t\t\timagettftext($im,$data[fontsize],0,$data[trankx],$data[tranky],$fontcolor,'fonts/' . $data['font'],'Team Rank: ' . $data['trank'] . '/' . $data['tmembers']);\n\t\t}\n\t\tif ($data[be]) {\n\t\t\timagerectangle($im,0,0,$data[width]-1,$data[height]-1,$blk);\n\t\t}\n\t\n\t// Store image temporarily at TMP storage\n\t\timagepng($im,$this->filename);\n\t\timagedestroy($im);\n\t// Store image data into variable for manipulation\n\t\t$this->imagedata = file_get_contents($this->filename); \n\t// Make sure image is readable later on by browser (unmodified binary)\n\t\t$this->image = $this->imagedata;\n\t\tmysql_free_result($result);\n\t\tmysql_close($this->db);\n\t// Begin cache process of new/updated image\n\t\t$this->imageCache();\n\t}", "title": "" }, { "docid": "6c0e7ae718bccd9bba1eb0556510f5ed", "score": "0.55843836", "text": "function getImage();", "title": "" }, { "docid": "f56d5a44d675d8c2b1a9aaf0ba41a598", "score": "0.5582741", "text": "function imggd2($cat,$ust,$pre){\n\n//---------USTAWIENIA-POCZATEK---------\n\n$folder=\"../upload/img/\"; //Adres folderu z fotkami\n\n$xd=$ust['fotd']; //Maksymalna szerokosc duzej fotki\n\n$s_min = $ust['fotm']; //Szerokosc miniaturki\n\n$m_jakos=$ust['fotmj']; //Jakos miniaturki\n\n$d_jakos=$ust['fotdj']; //Jakos duzej fotki\n\n$m_przed=\"m_\"; //Przedrostek miniaturek\n\n$d_przed=\"d_\"; //Przedrostek duzych\n\n//Kolor tekstu\n$c_r = $ust['tekst_r']; //RED\n$c_g = $ust['tekst_g']; //GREN\n$c_b = $ust['tekst_b']; //BLUE\n\n$font = \"include/font/arial.ttf\"; //Czcionka\n\n$tekst=$ust['tekst']; //Tekst na obrazku\n\n$txt_size=$ust['tekst_size']; //Wielkosc napisu\n\n$txt_on=$ust['tekst_on']; //Napis naobrazku ON=1 OFF=0\n\n//---------USTAWIENIA-KONIEC---------\n\n$plik_tmp = $_FILES['plik2']['tmp_name'];\n$plik_nazwa = $_FILES['plik2']['name'];\n$plik_rozmiar = $_FILES['plik2']['size'];\n\n\n\nif($plik_tmp!=\"\")\n{\n\n$sp = explode(\".\",$plik_nazwa); //wyciaganie rozszerzenia \n\nsrand();\n\n$l = rand(100,999); // Losowanie Liczby\n\n$name2x = time() * $l; //Generowanie Nazwy czas * liczba\n\n$namenowa = \"$name2x.$sp[1]\"; //Nowa nazwa z rozszerzeniem \n\n//Upload fotek\nif(is_uploaded_file($plik_tmp)) \n{\n\n move_uploaded_file($plik_tmp, \"\".$folder.\"d_\".$namenowa.\"\");\n chmod(\"\".$folder.\"d_\".$namenowa.\"\", 0644);\n}\n\n//---------POCZATEK-JPG---------\nif($sp[1] == \"jpg\" or $sp[1]== \"jpeg\" or $sp[1] == \"JPG\" or $sp[1]== \"JPEG\")\n{\n header(\"Content-type: image/jpeg\");\n $org = imagecreatefromjpeg(\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\");\n $s_org = imagesx($org);\n $w_org = imagesy($org);\n if(($w_min = floor(($s_min * $w_org) / $s_org)) > 150) $w_min = 150;\n $min = ImageCreateTrueColor($s_min, $w_min);\n imagecopyresampled($min, $org, 0, 0, 0, 0, $s_min, $w_min, $s_org, $w_org);\n\n imagejpeg($min,\"\".$folder.\"\".$m_przed.\"\".$namenowa.\"\", $m_jakos); \n\n\n if($s_org >= ($xd+1))\n {\n if(($w_big = floor(($xd * $w_org) / $s_org)) > 648) $w_big = 648;\n $big = ImageCreateTrueColor($xd, $w_big);\n imagecopyresampled($big, $org, 0, 0, 0, 0, $xd, $w_big, $s_org, $w_org);\n\n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($big, $c_r, $c_g, $c_b);\n ImageTtfText($big, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n \n imagejpeg($big,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n else\n {\n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($org, $c_r, $c_g, $c_b);\n ImageTtfText($org, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n\n imagejpeg($org,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n\n}\n//---------KONIEC-JPG---------\n\n//---------POCZATEK-GIF---------\nelse if($sp[1] == \"gif\" or $sp[1] == \"GIF\")\n{\n header(\"Content-type: image/gif\");\n $org = imagecreatefromgif(\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\");\n $s_org = imagesx($org);\n $w_org = imagesy($org);\n if(($w_min = floor(($s_min * $w_org) / $s_org)) > 150) $w_big = 150;\n $min = ImageCreateTrueColor($s_min, $w_min);\n imagecopyresampled($min, $org, 0, 0, 0, 0, $s_min, $w_min, $s_org, $w_org);\n\n imagegif($min,\"\".$folder.\"\".$m_przed.\"\".$namenowa.\"\", $m_jakos); \n\n\n if($s_org >= ($xd+1))\n {\n if(($w_big = floor(($xd * $w_org) / $s_org)) > 648) $w_big = 648;\n $big = ImageCreateTrueColor($xd, $w_big);\n imagecopyresampled($big, $org, 0, 0, 0, 0, $xd, $w_big, $s_org, $w_org);\n \n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($big, $c_r, $c_g, $c_b);\n ImageTtfText($big, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n \n imagegif($big,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n else\n {\n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($org, $c_r, $c_g, $c_b);\n ImageTtfText($org, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n\n imagegif($org,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n\n}\n//---------KONIEC-GIF---------\n\n//---------POCZATEK-PNG---------\nelse if($sp[1] == \"png\" or $sp[1] == \"PNG\")\n{\n header(\"Content-type: image/png\");\n $org = imagecreatefrompng(\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\");\n $s_org = imagesx($org);\n $w_org = imagesy($org);\n if(($w_min = floor(($s_min * $w_org) / $s_org)) > 150) $w_big = 150;\n $min = ImageCreateTrueColor($s_min, $w_min);\n imagecopyresampled($min, $org, 0, 0, 0, 0, $s_min, $w_min, $s_org, $w_org);\n\n imagepng($min,\"\".$folder.\"\".$m_przed.\"\".$namenowa.\"\", $m_jakos); \n\n\n if($s_org >= ($xd+1))\n {\n if(($w_big = floor(($xd * $w_org) / $s_org)) > 648) $w_big = 648;\n $big = ImageCreateTrueColor($xd, $w_big);\n imagecopyresampled($big, $org, 0, 0, 0, 0, $xd, $w_big, $s_org, $w_org);\n\n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($big, $c_r, $c_g, $c_b);\n ImageTtfText($big, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n \n imagepng($big,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n else\n {\n if($txt_on==1)\n { \n $txt_kolor = ImageColorAllocate($org, $c_r, $c_g, $c_b);\n ImageTtfText($org, $txt_size, 0, 10, ($txt_size+10), $txt_kolor, $font, $tekst);\n }\n\n imagepng($org,\"\".$folder.\"\".$d_przed.\"\".$namenowa.\"\", $d_jakos); \n }\n\n}\n//---------KONIEC-PNG---------\nelse\n{\n\n}\n\n$fotm = $m_przed.\"\".$namenowa;\n$fotd = $d_przed.\"\".$namenowa;\n\n if($s_org >= ($xd+1))\n {\n $wi=$xd;\n $hi=imagesy($big);\n\n }\n else\n {\n $wi=$s_org;\n $hi=$w_org;\n }\n\n $in=\"INSERT INTO \".$pre.\"img(`img_cat`, `img_fm`, `img_fd`, `img_data`)VALUE('\".$cat.\"', '\".$fotm.\"', '\".$fotd.\"', NOW())\";\n db_query($in);\n\n $up=\"UPDATE \".$pre.\"gallery SET ga_ilef=ga_ilef+1 WHERE ga_id='\".db_real_escape_string($cat).\"'\";\n db_query($up);\n\n\n\n }\n\n}", "title": "" }, { "docid": "2b721f488e36921d3f0551e01b3ae5c5", "score": "0.55823356", "text": "private function prepara_propriedade_image() \r\n {\r\n $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');\r\n\r\n $_INFO = @getimagesize($this->url_imagem);\r\n \r\n $this->width_original = $_INFO[0];\r\n $this->height_original = $_INFO[1];\r\n\r\n $this->mime_type = $_INFO['mime'];\r\n $this->imagem_type = $types[ $_INFO[2] ];\r\n }", "title": "" }, { "docid": "e591a87490433f439c5cd6fe0efe41ef", "score": "0.55801964", "text": "function addImg(){\n /*check if user is logged in and is a hyperanalyst*/\n if((!$this->Session->check('UserUsername')) || \n (strcmp($this->Session->read('UserType'), 'hyperanalyst')))\n {\n $this->redirect(array('controller'=>'pages', 'action'=>'display')); \n }\n else\n {\n if (!empty($this->data)) {\n /*upload main photo*/\n if(!empty($this->data['HotSpecie']['image']['tmp_name'])){\n $id = $this->data['HotSpecie']['id'];\n $num = $this->data['HotSpecie']['num'];\n /* Switch photo's extension*/\n switch ($num)\n {\n case 1:\n $ext = 'a';\n break; \n case 2:\n $ext = 'b';\n break;\n case 3:\n $ext = 'c';\n break;\n }\n /* Check if input file's type is a valid image */\n $res = $this->Image->checkImage($this->data['HotSpecie']['image']);\n \tif($res < 0){\n $this->Session->setFlash('Παρακαλώ εισάγετε μία φωτογραφία','flash_bad');\n $this->redirect(array('action'=>'update',$id));\n }\n else if(!$res){\n \t\t\t$this->Session->setFlash('Παρακαλώ εισάγετε μία κανονική φωτογραφία','flash_bad');\n $this->redirect(array('action'=>'update',$id));\n }\n /* Rename image file and save to temp directory */\n \t $this->request->data['HotSpecie']['image']['name'] = $this->Image->tmpRename($this->request->data['HotSpecie']['image']);\n $uploaded = $this->JqImgcrop->uploadImage($this->data['HotSpecie']['image'], 'img/temporary/', ''); \n $imagePath = $uploaded['imagePath'];\n $this->HotSpecie->id = $id;\n /* Save proper image field */\n if ($this->HotSpecie->saveField(\"additional_photo\".$num,$imagePath )) {\n /*Move additional photos to hotspecies images directory */\n $ret = $this->Image->mvSubImg($this->HotSpecie, $imagePath, \"hotspecies\",\"additional_photo\".$num,$ext);\n if(!$ret){\n $this->Session->setFlash(\"Πρόβλημα στη διαχείρηση της εικόνας\",'flash_bad');\n $this->redirect(array('action'=>'update',$id));\n } \n $this->Session->setFlash('Η φωτογραφία αποθηκεύτηκε επιτυχώς','flash_good');\n $this->redirect(array('action'=>'update',$id));\n }\n else{\n $this->Session->setFlash('Η φωτογραφία δεν αποθηκεύτηκε επιτυχώς.Πρόβλημα στη διαχείρηση της μνήμης','flash_bad');\n $this->redirect(array('action'=>'update',$id));\n }\n }\n $id = $this->data['HotSpecie']['id'];\n $this->Session->setFlash('Παρακαλώ επιλέξτε μία φωτογραφία','flash_bad');\n $this->redirect(array('action'=>'update',$id));\n }\n $this->Session->setFlash('Δεν υπάρχουν δεδομένα','flash_bad');\n $this->redirect(array('action'=>'show'), null, true);\n }\n }", "title": "" }, { "docid": "4a38903903d48ff5864823adf587e96b", "score": "0.5577481", "text": "protected function processImage() {}", "title": "" }, { "docid": "86ab53afb3825ea104c70bc599d84684", "score": "0.5572204", "text": "public function colorImage() {}", "title": "" }, { "docid": "56f304fcd69a6b5f4895c1d537854230", "score": "0.55708194", "text": "function imagenes_por_palabra_y_tipo_imagen($id_palabra,$registrado,$estado,$id_tipo_imagen) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($estado !='' && $estado < 4 && $estado > 0) {\n\t\t\t$sql_estado='AND imagenes.estado='.$estado.'';\n\t\t} elseif ($estado='all') {\n\t\t\t$sql_estado='';\n\t\t} else {\n\t\t\t$sql_estado='AND imagenes.estado=1';\n\t\t}\n\t\t\n\t\tif ($id_tipo_imagen==99) { $sql_tipo_imagen=''; } \n\t\telse { $sql_tipo_imagen='AND imagenes.id_tipo_imagen='.$id_tipo_imagen.''; }\n\t\t\n\t\t$query = \"SELECT palabra_imagen.*,\n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename\n\t\tFROM palabra_imagen, imagenes\n\t\tWHERE palabra_imagen.id_palabra='$id_palabra'\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$sql_tipo_imagen\n\t\t$mostrar_registradas\n\t\t$sql_estado\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "title": "" }, { "docid": "a9f4dbb8fcfe167288b7112a91b6b6b2", "score": "0.55685157", "text": "public function populateImageDataFromFileSystem(){\n\n\n //Scan for main image\n //Add to database if exist\n\n //Scan for square image (could be jpg png etc)\n //Add to database if exist\n\n //scan for extra carousel images\n //Loop over each carousel images\n //Add to database \n\n\n }", "title": "" }, { "docid": "6b0e04975db6b6502be3a44f569ba13a", "score": "0.5561785", "text": "private function setImageBase64() {\n\t\t$type = pathinfo($this->getCompressedFileName(), PATHINFO_EXTENSION);\n\t\t$data = file_get_contents($this->getCompressedFileName());\n\t\t$this->imageBase64 = 'data:image/' . $type . ';base64,' . base64_encode($data);\n\t}", "title": "" }, { "docid": "e5c54a3f1c10b4e6d1051a0fa343250e", "score": "0.5561582", "text": "function modifcouverture ($idbook,$image,$pdo,$mysql_prefix) {\r\r\n\t$query=\"SELECT pathfile FROM \".$mysql_prefix.\"ebooks WHERE id=:id;\";\r\r\n\t$q = $pdo->prepare($query);\r\r\n\t$q->bindParam('id', $idbook, PDO::PARAM_INT);\r\r\n\t$q->execute();\r\r\n\t$book=$q->fetch();\r\r\n\t\r\r\n\t$outputImage=\"Books/\".$book['pathfile'].\"cover.jpg\";\r\r\n\t//convertir l'image en jpg\r\r\n $exploded = explode('.',$image);\r\r\n $ext = $exploded[count($exploded) - 1]; \r\r\n\r\r\n if (preg_match('/jpg|jpeg/i',$ext))\r\r\n $imageTmp=imagecreatefromjpeg($image);\r\r\n else if (preg_match('/png/i',$ext))\r\r\n $imageTmp=imagecreatefrompng($image);\r\r\n else if (preg_match('/gif/i',$ext))\r\r\n $imageTmp=imagecreatefromgif($image);\r\r\n else\r\r\n return 0;\r\r\n \r\r\n // redimensionner l'image\r\r\n $pattern = imagecreatetruecolor(250, 400);\r\r\n $dimensions = getimagesize($image);\r\r\n\timagecopyresampled($pattern, $imageTmp, 0, 0, 0, 0, 250, 400, $dimensions[0], $dimensions[1]);\r\r\n\timagedestroy($imageTmp);\r\r\n\t// enregistrer l'image\r\r\n\timagejpeg($pattern, $outputImage, 100);\r\r\n}", "title": "" }, { "docid": "9bad55d811ae270671fd2d1ca0286683", "score": "0.5558853", "text": "function addImage($data) {\n\tglobal $user;\n\tif(get_magic_quotes_gpc()) {\n\t\t$data['description'] = stripslashes($data['description']);\n\t\t$data['usage'] = stripslashes($data['usage']);\n\t}\n\t$data['description'] = mysql_escape_string($data['description']);\n\t$data['usage'] = mysql_escape_string($data['usage']);\n\n\t$ownerdata = getUserInfo($data['owner']);\n\t$ownerid = $ownerdata['id'];\n\tif(empty($data['maxconcurrent']) || ! is_numeric($data['maxconcurrent']))\n\t\t$data['maxconcurrent'] = 'NULL';\n\t$query = \"INSERT INTO image \"\n\t . \"(prettyname, \"\n\t . \"ownerid, \"\n\t . \"platformid, \"\n\t . \"OSid, \"\n\t . \"minram, \"\n\t . \"minprocnumber, \"\n\t . \"minprocspeed, \"\n\t . \"minnetwork, \"\n\t . \"maxconcurrent, \"\n\t . \"reloadtime, \"\n\t . \"deleted, \"\n\t . \"description, \"\n\t . \"`usage`, \"\n\t . \"basedoffrevisionid) \"\n\t . \"VALUES ('{$data[\"prettyname\"]}', \"\n\t . \"$ownerid, \"\n\t . \"{$data[\"platformid\"]}, \"\n\t . \"{$data[\"osid\"]}, \"\n\t . \"{$data[\"minram\"]}, \"\n\t . \"{$data[\"minprocnumber\"]}, \"\n\t . \"{$data[\"minprocspeed\"]}, \"\n\t . \"{$data[\"minnetwork\"]}, \"\n\t . \"{$data[\"maxconcurrent\"]}, \"\n\t . \"{$data[\"reloadtime\"]}, \"\n\t . \"1, \"\n\t . \"'{$data['description']}', \"\n\t . \"'{$data['usage']}', \"\n\t . \"{$data['basedoffrevisionid']})\";\n\tdoQuery($query, 205);\n\n\t// get last insert id\n\t$qh = doQuery(\"SELECT LAST_INSERT_ID() FROM image\", 206);\n\tif(! $row = mysql_fetch_row($qh)) {\n\t\tabort(207);\n\t}\n\t$imageid = $row[0];\n\n\t// possibly add entry to imagemeta table\n\t$imagemetaid = 0;\n\tif($data['checkuser'] != 0 && $data['checkuser'] != 1)\n\t\t$data['checkuser'] = 1;\n\tif(! is_numeric($data['usergroupid']) || $data['usergroupid'] <= 0)\n\t\t$data['usergroupid'] = \"NULL\";\n\tif($data['sysprep'] != 0 && $data['sysprep'] != 1)\n\t\t$data['sysprep'] = 1;\n\tif($data['checkuser'] == 0 ||\n\t (is_numeric($data['usergroupid']) && $data['usergroupid'] > 0) ||\n\t $data['sysprep'] == 0) {\n\t\t$query = \"INSERT INTO imagemeta \"\n\t\t . \"(checkuser, \"\n\t\t . \"usergroupid, \"\n\t\t . \"sysprep) \"\n\t\t . \"VALUES \"\n\t\t . \"({$data['checkuser']}, \"\n\t\t . \"{$data['usergroupid']}, \"\n\t\t . \"{$data['sysprep']})\";\n\t\tdoQuery($query, 101);\n\n\t\t// get last insert id\n\t\t$qh = doQuery(\"SELECT LAST_INSERT_ID() FROM imagemeta\", 101);\n\t\tif(! $row = mysql_fetch_row($qh)) {\n\t\t\tabort(207);\n\t\t}\n\t\t$imagemetaid = $row[0];\n\t}\n\n\t// create name from pretty name, os, and last insert id\n\t$OSs = getOSList();\n\t$name = $OSs[$data[\"osid\"]][\"name\"] . \"-\" . \n\t preg_replace('/\\W/', '', $data[\"prettyname\"]) . $imageid . \"-v0\";\n\tif($imagemetaid) {\n\t\t$query = \"UPDATE image \"\n\t\t . \"SET name = '$name', \"\n\t\t . \"imagemetaid = $imagemetaid \"\n\t\t . \"WHERE id = $imageid\";\n\t}\n\telse\n\t\t$query = \"UPDATE image SET name = '$name' WHERE id = $imageid\";\n\tdoQuery($query, 208);\n\n\t$query = \"INSERT INTO imagerevision \"\n\t . \"(imageid, \"\n\t . \"userid, \"\n\t . \"datecreated, \"\n\t . \"production, \"\n\t . \"imagename, \"\n\t . \"comments) \"\n\t . \"VALUES ($imageid, \"\n\t . \"{$user['id']}, \"\n\t . \"NOW(), \"\n\t . \"1, \"\n\t . \"'$name', \"\n\t . \"'{$data['comments']}')\";\n\tdoQuery($query, 101);\n\n\t// add entry in resource table\n\t$query = \"INSERT INTO resource \"\n\t\t\t . \"(resourcetypeid, \"\n\t\t\t . \"subid) \"\n\t\t\t . \"VALUES (13, \"\n\t\t\t . \"$imageid)\";\n\tdoQuery($query, 209);\n\t$qh = doQuery(\"SELECT LAST_INSERT_ID() FROM resource\", 101);\n\t$row = mysql_fetch_row($qh);\n\t$resourceid = $row[0];\n\n\tif(strncmp($OSs[$data['osid']]['name'], 'vmware', 6) == 0)\n\t\t$vmware = 1;\n\telse\n\t\t$vmware = 0;\n\n\t// create new node if it does not exist\n\tif($vmware)\n\t\t$nodename = 'newvmimages';\n\telse\n\t\t$nodename = 'newimages';\n\t$query = \"SELECT id \"\n\t . \"FROM privnode \"\n\t . \"WHERE name = '$nodename' AND \"\n\t . \"parent = 3\";\n\t$qh = doQuery($query, 101);\n\tif(! $row = mysql_fetch_assoc($qh)) {\n\t\t$query2 = \"INSERT INTO privnode \"\n\t\t . \"(parent, \"\n\t\t . \"name) \"\n\t\t . \"VALUES \"\n\t\t . \"(3, \"\n\t\t . \"'$nodename')\";\n\t\tdoQuery($query2, 101);\n\t\t$qh = doQuery($query, 101);\n\t\t$row = mysql_fetch_assoc($qh);\n\t}\n\t$parent = $row['id'];\n\t$query = \"SELECT id \"\n\t . \"FROM privnode \"\n\t . \"WHERE name = '{$ownerdata['login']}-$ownerid' AND \"\n\t . \"parent = $parent\";\n\t$qh = doQuery($query, 101);\n\tif($row = mysql_fetch_assoc($qh))\n\t\t$newnode = $row['id'];\n\telse {\n\t\t$query = \"INSERT INTO privnode \"\n\t\t . \"(parent, name) \"\n\t\t . \"VALUES ($parent, '{$ownerdata['login']}-$ownerid')\";\n\t\tdoQuery($query, 101);\n\t\t$qh = doQuery(\"SELECT LAST_INSERT_ID() FROM privnode\", 101);\n\t\t$row = mysql_fetch_row($qh);\n\t\t$newnode = $row[0];\n\t}\n\n\t// give user imageCheckOut and imageAdmin at new node\n\t$newprivs = array('imageCheckOut', 'imageAdmin');\n\tupdateUserOrGroupPrivs($ownerid, $newnode, $newprivs, array(), 'user');\n\n\t// create new image group if it does not exist\n\t$query = \"SELECT id \"\n\t . \"FROM usergroup \"\n\t . \"WHERE name = 'manageNewImages'\";\n\t$qh = doQuery($query, 101);\n\t$row = mysql_fetch_assoc($qh);\n\t$ownergroupid = $row['id'];\n\tif($vmware)\n\t\t$prefix = 'newvmimages';\n\telse\n\t\t$prefix = 'newimages';\n\t$query = \"SELECT id \"\n\t . \"FROM resourcegroup \"\n\t . \"WHERE name = '$prefix-{$ownerdata['login']}-$ownerid' AND \"\n\t . \"ownerusergroupid = $ownergroupid AND \"\n\t . \"resourcetypeid = 13\";\n\t$qh = doQuery($query, 101);\n\tif($row = mysql_fetch_assoc($qh))\n\t\t$resourcegroupid = $row['id'];\n\telse {\n\t\t$query = \"INSERT INTO resourcegroup \"\n\t\t . \"(name, \"\n\t\t . \"ownerusergroupid, \"\n\t\t . \"resourcetypeid) \"\n\t\t . \"VALUES ('$prefix-{$ownerdata['login']}-$ownerid', \"\n\t\t . \"$ownergroupid, \"\n\t\t . \"13)\";\n\t\tdoQuery($query, 305);\n\t\t$qh = doQuery(\"SELECT LAST_INSERT_ID() FROM resourcegroup\", 101);\n\t\t$row = mysql_fetch_row($qh);\n\t\t$resourcegroupid = $row[0];\n\n\t\t// map group to newimages/newvmimages comp group\n\t\tif($vmware)\n\t\t\t$rgroupname = 'newvmimages';\n\t\telse\n\t\t\t$rgroupname = 'newimages';\n\t\t$query = \"SELECT id \"\n\t\t . \"FROM resourcegroup \"\n\t\t . \"WHERE name = '$rgroupname' AND \"\n\t\t . \"resourcetypeid = 12\";\n\t\t$qh = doQuery($query, 101);\n\t\t$row = mysql_fetch_assoc($qh);\n\t\t$compResGrpid = $row['id'];\n\t\t$query = \"INSERT INTO resourcemap \"\n\t\t . \"(resourcegroupid1, \"\n\t\t . \"resourcetypeid1, \"\n\t\t . \"resourcegroupid2, \"\n\t\t . \"resourcetypeid2) \"\n\t\t . \"VALUES ($resourcegroupid, \"\n\t\t . \"13, \"\n\t\t . \"$compResGrpid, \"\n\t\t . \"12)\";\n\t\tdoQuery($query, 101);\n\t}\n\n\t// make image group available at new node\n\t$adds = array('available', 'administer');\n\tif($vmware)\n\t\tupdateResourcePrivs(\"image/newvmimages-{$ownerdata['login']}-$ownerid\", $newnode, $adds, array());\n\telse\n\t\tupdateResourcePrivs(\"image/newimages-{$ownerdata['login']}-$ownerid\", $newnode, $adds, array());\n\n\t// add image to image group\n\t$query = \"INSERT INTO resourcegroupmembers \"\n\t . \"(resourceid, resourcegroupid) \"\n\t . \"VALUES ($resourceid, $resourcegroupid)\";\n\tdoQuery($query, 101);\n\n\treturn $imageid;\n}", "title": "" }, { "docid": "96b92dcb9ddc5ecd9afe5994b77fb4cb", "score": "0.5555987", "text": "public function testUpdateAvatarImage()\n {\n }", "title": "" }, { "docid": "70e0a27afd06760db82d267270de0839", "score": "0.5553868", "text": "function replace($image_id, $ord, $path, $imagetype_key='', $width=false, $height=false)\n {\n//echo(\"Image::replace($image_id, $ord, $path, $imagetype_key, $width, $height): Entered<br />\");\n $objImage = self::getById($image_id, $ord);\n if (!$objImage && empty($imagetype_key)) {\n//echo(\"Image::replace(): Image not found and empty key<br />\");\n return false;\n }\n if (!$objImage) $objImage = new Image($ord);\n\n File::clean_path($path);\n $imageSize = getimagesize(ASCMS_DOCUMENT_ROOT.'/'.$path);\n if ($width === false || $height === false) {\n $width = $imageSize[0];\n $height = $imageSize[1];\n//echo(\"Image::replace(): Image size: $width/$height<br />\");\n }\n $path_parts = pathinfo($path);\n\n// TODO: Debug stuff, remove in release\n// $auto_type = $imageSize[2];\n// if ($auto_type !== strtoupper($path_parts['extension']))\n//echo(\"Image::replace(image_id $image_id, ord $ord, path $path, imagetype_key $imagetype_key, width $width, height $height): Warning: Image extension (\".$path_parts['extension'].\") mismatch with type ($auto_type)<br />\");\n// /TODO\n\n if ($imagetype_key) $objImage->setTypeKey($imagetype_key);\n $objImage->setPath($path);\n $objImage->setFileTypeKey(Filetype::getTypeIdForExtension($path_parts['extension']));\n $objImage->setWidth($width);\n $objImage->setHeight($height);\n//echo(\"Image::replace(): Storing Image<br />\");\n if (!$objImage->store()) {\n return false;\n }\n return $objImage->resize();\n }", "title": "" }, { "docid": "ccffc3a6ede903639d30110977ec5400", "score": "0.5552427", "text": "public function encode($id,$filnavn, $filtype, $kvalitet){\n // resultatvariabel til eventuell feilmelding;\n $result = \"\";\n // Liste over filtyper som er godkjent av image intervention\n $possible_type = array(\"gif\", \"png\", \"jpg\",\"jpeg\");\n // Skjekker om formatet er godkjent\n if(in_array($filtype, $possible_type)){\n // Lager bldeinstanse\n $img = Image::make($id);\n // Konverterer bilde til gitt format\n $img->encode($filtype, $kvalitet);\n // Lagrer nytt bilde\n $img->save($filnavn.'.'.$filtype);\n }\n // Hvis filformatet er ikke godkjent av intervention:\n else{\n // sortering etter gitt filtype av brukeren\n switch ($filtype) {\n case 'jpeg':\n // lager et nytt bildeobjekt av URL til bilde på serveren\n $im = imagecreatefromstring(file_get_contents($id));\n // lager en ny fil\n $new = $filnavn.'.jpeg';\n // konverterer bilde til jpeg og lager det på ny fil\n imagejpeg($im, $new);\n break;\n case 'xbm':\n $new = $filnavn.'.xbm';\n imagexbm(imagecreatefromstring(file_get_contents($id)), $new);\n break;\n case 'wbmp':\n $new = $filnavn.'.wbmp';\n imagewbmp(imagecreatefromstring(file_get_contents($id)), $new);\n break;\n case 'gd':\n $new = $filnavn.'.gd';\n imagegd(imagecreatefromstring(file_get_contents($id)), $new);\n break;\n case 'gd2':\n $new = $filnavn.'.gd2';\n imagegd2(imagecreatefromstring(file_get_contents($id)), $new);\n break;\n case 'webp':\n $new = $filnavn.'.webp';\n imagewebp(imagecreatefromstring(file_get_contents($id)), $new);\n break;\n // hvis filtypen ikke er i switch:\n default:\n $result = \"Formatet er ikke støttet\";\n break;\n }\n \n }\n // returnerer feilmelding\n return $result; \n }", "title": "" }, { "docid": "d23854ca143e86b5be046ac956f03730", "score": "0.55522925", "text": "function comprovarImg($idImatge, $idUsuari){\n $conn=connexioBD();\n $existe=false;\n $sql1=\"SELECT * FROM imatges INNER JOIN productes ON imatges.producte_id=productes.id WHERE imatges.id='$idImatge' and productes.usuari_id='$idUsuari'\";\n if (!$resultado =$conn->query($sql1)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows==1){\n $existe=true;\n }\n return $existe;\n $resultado->free();\n $conn->close(); \n}", "title": "" }, { "docid": "19b0575aaf82808e0490d2a27bbca8b5", "score": "0.55484426", "text": "function save_image(array $image)\n{\n $db = get_connection();\n\n $sql = <<<SQL\n INSERT INTO product_images\n (product_id, src, description)\n VALUES\n (:product_id, :src, :description)\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->execute([\n ':product_id' => $image['product_id'],\n ':src' => $image['src'],\n ':description' => $image['description'],\n ]);\n}", "title": "" }, { "docid": "a7f41bcfb394dc6821faf17f6fba990e", "score": "0.55434424", "text": "function edit_images($codan,$nick,$path,$main_image){\n\n\t//Recupero el codigo del articulo\n\t$query=\"SELECT cod_articulo FROM anuncio WHERE cod_anuncio='$codan'\";\n\t$result=mysql_query($query);\n\tif($result){\n\t\t$row= mysql_fetch_array($result);\n\t\t$cod_articulo=$row['cod_articulo'];\n\t\t\n\t\t$long_nick=strlen($nick);\t\n\t\t\n\t\t\n\t\tif ($handle = opendir($path)){\n\t\t\t$archivos = array(); \n\t\t\t$j=0;\n\t\t\twhile ($archivo = readdir($handle)){ //primero recorro la carpeta de imagenes temporales para ver si hay ficheros con el nombre del usuario\n\t\t\t\tif ($archivo!=\".\" and $archivo!=\"..\"){\n\t\t\t\t\t$archivos[$j] = $archivo;\n\t\t\t\t\t\n\t\t\t\t\tif(substr($archivos[$j],7,$long_nick) == $nick){ //si encuentra coincidencia :\n\t\t\t\t\t\tcopy($path.$archivos[$j],\"imagenes/\".$cod_articulo.$archivos[$j]);//copia el archivo de la carpeta temporal a la de imagenes\n\t\t\t\t\t\tunlink($path.$archivos[$j]);//y borra el archivo de la carpeta temporal\t\t\n\t\t\t\t\t\t$numero_imagen=\tsubstr($archivos[$j],6,1);\t\t\t\t\t\n\t\t\t\t\t\t//if($numero_imagen==$main_image){//aqui compruebo que la imagen copiada es la principal de portada o no\n\t\t\t\t\t\t\t//$imagen_principal=1;\t\n\t\t\t\t\t\t\t//$query=\"UPDATE imagenes SET imagen_principal='0' WHERE cod_articulo='$cod_articulo'\";\n\t\t\t\t\t\t\t//mysql_query($query);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//else\n\t\t\t\t\t\t\t//$imagen_principal=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//Ahora copio los datos de nombre de arhivo, etc en la base de datos imagenes\n\t\t\t\t\t\t$query=\"SELECT * FROM imagenes WHERE\n\t\t\t\t\t\tdirecc_imagen LIKE '%imagenes/\".$cod_articulo.\"imagen\".$numero_imagen.$nick.\"%'\";\n\t\t\t\t\t\t$result=mysql_query($query);\n\t\t\t\t\t\tif($result){\n\t\t\t\t\t\t\tif(mysql_num_rows($result)==1){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$query=\"UPDATE imagenes SET direcc_imagen='imagenes/\".$cod_articulo.$archivos[$j].\"', \n\t\t\t\t\t\t\t\timagen_principal='0' WHERE\n\t\t\t\t\t\t\t\tdirecc_imagen LIKE '%imagenes/\".$cod_articulo.\"imagen\".$numero_imagen.$nick.\"%'\";\n\t\t\t\t\t\t\t\tmysql_query($query);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$row= mysql_fetch_array($result);\n\t\t\t\t\t\t\t\t$direccion=$row['direcc_imagen'];\n\t\t\t\t\t\t\t\tunlink($direccion);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$query=\"INSERT INTO imagenes(cod_articulo,direcc_imagen,imagen_principal)\n\t\t\t\t\t\t\t\tVALUES ('\".$cod_articulo.\"','imagenes/\".$cod_articulo.$archivos[$j].\"','0')\";\n\t\t\t\t\t\t\t\tmysql_query($query) or die(mysql_error()); \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\t$j++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($main_image!=\"\"){\n\t\t\t$query=\"UPDATE imagenes SET imagen_principal='0' WHERE cod_articulo='$cod_articulo'\";\n\t\t\tmysql_query($query);\n\t\t\t$query=\"UPDATE imagenes SET imagen_principal='1' WHERE\n\t\t\tdirecc_imagen LIKE '%imagenes/\".$cod_articulo.\"imagen\".$main_image.$nick.\"%'\";\n\t\t\tmysql_query($query);\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "4e1fd6a1994163d40ab89684655040f2", "score": "0.55349636", "text": "function image(){\n // $msg: User's comment to help solve the problem\n if(isset($_SESSION['uID']) && !empty($_SESSION['uID']))\n return $this->obj->save('reports','quoteID,reason,description',\"'\".$this->id.\"','Something's wrong with an image - Quote ID: \".$this->id.\"','\".$this->msg.\"'\");\n else return false;\n //return sendMail('[email protected]',\"Something's wrong with an image - Quote ID: \".$this->id,$this->msg); //pass: =V-6Tkc?SbJ-\n }", "title": "" }, { "docid": "9a34ef8fb645d7a000fb7a70e2f70477", "score": "0.5524967", "text": "function addImageFromString($image);", "title": "" }, { "docid": "23a78842460189914fcd305d288e1c61", "score": "0.55173206", "text": "function action_getNewPic($prvek_id)\n{\n\tglobal $CONF_BASE_DIR, $CONF_BASE_SSP;\n\tdbQuery(\"SELECT * FROM html WHERE prvek_id=#1 AND aplikace_id=#2\", $prvek_id, $_SESSION[\"aplikace_id\"]);\n\t$row = dbArr();\n\t$src = $CONF_BASE_SSP.\"users_data/\".$_SESSION[\"aplikace_id\"].\"/\".$row[\"html\"];\n\treturn json_encode(array(\"pic_src\" => $src));\n}", "title": "" }, { "docid": "2687f0a4c6ad01350f88ee5ffb7b3dfa", "score": "0.5517169", "text": "private function saveNewImg($type,$type_id){\n\n if (Yii::$app->request->post('Imgnew') && isset($_FILES['Imgnew'])){\n $imgs = Yii::$app->request->post('Imgnew');\n //ex($imgs);\n $files = (isset($_FILES['Imgnew']['name'])) ? $_FILES['Imgnew']['name'] : [];\n\n\n foreach ($files as $num => $file_name){\n\n //if ((int)$imgs[$num]['img_0']['valid'] == 1){\n\n $imgOrg = $this->saveOriginalNew($num,$type,$type_id);\n\n\n //mine list size Image\n // create&set model\n // resize img\n\n if ( $imgOrg != null ){\n\n $img = new Img();\n $img->alt = $imgs[$num]['alt'];\n $img->title = $imgs[$num]['title'];\n $img->width = (int)$imgs[$num]['width'];\n $img->height = (int)$imgs[$num]['height'];\n $img->size = $imgs[$num]['size'];\n $img->watermark = (isset($imgs[$num]['watermark'])) ? (int)$imgs[$num]['watermark'] : 0;\n $img->resize =(isset($imgs[$num]['resize'])) ? (int)$imgs[$num]['resize'] : 0;\n $img->harshness =(isset($imgs[$num]['harshness'])) ? (int)$imgs[$num]['harshness'] : 0;\n\n\n\n $img->crop_x = (int)$imgs[$num]['crop_x'];\n $img->crop_y = (int)$imgs[$num]['crop_y'];\n\n $img->crop_width = (int)$imgs[$num]['crop_width'];\n $img->crop_height = (int)$imgs[$num]['crop_height'];\n\n $img->wrap_width = (int)$imgs[$num]['wrap_width'];\n $img->wrap_height = (int)$imgs[$num]['wrap_height'];\n\n // $img->ord = (int) $imgs[$num]['ord'];\n\n\n if ($img->resize)\n if ( (! $img->width || ! $img->height) ){\n $size =explode('_', $img->size);\n if (count( $size )){\n $img->width = (int)$size[0];\n $img->height = (int)$size[1];\n }\n\n }\n\n $this->resizeImg($imgOrg,$img,$type,$type_id);\n }\n // }\n\n }\n }\n\n $this->saveImgLinks($type_id,$type);\n }", "title": "" }, { "docid": "8b82995b6b5fbcac144cd81595d13c4c", "score": "0.55165553", "text": "function &image( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $ret = false;\n if ( $this->ImageID != 0 )\n {\n $ret = new eZImage( $this->ImageID );\n }\n\n return $ret;\n }", "title": "" }, { "docid": "0fc09ba625c8f2fd569a0f4e9446fe85", "score": "0.5509753", "text": "public function getAbsolutePicture();", "title": "" }, { "docid": "1ce6a33e4733aee79c2a36bcdae27aa7", "score": "0.55062693", "text": "public function image()//minuscula modeloforaneo\n {\n return $this->morphOne('App\\Image','imageable'); //1er parametro:direccion modeloforaneo, 2do parametro: modeloforaneo+'able'\n }", "title": "" }, { "docid": "8d8a19d57515b3508e6e7c38b0bbb51e", "score": "0.5505888", "text": "public function save($id = null, $arMeta = array()) {\n require_once $GLOBALS['ab_path'].\"sys/packet_management.php\";\n $packets = PacketManagement::getInstance($this->db);\n $packetOrder = false;\n if ($this->adData[\"FK_PACKET_ORDER\"] > 0) {\n $packetOrder = $packets->order_get($this->adData[\"FK_PACKET_ORDER\"]);\n }\n\n /**\n * Files (Images/Uploads)\n */\n $uploads_dir = self::getCachePath($this->table, $id, true);\n // Add images\n $arArticleImages = $this->db->fetch_nar(\"SELECT ID_MEDIA_IMAGE, IS_DEFAULT FROM `media_image` WHERE `TABLE`='\".mysql_real_escape_string($this->table).\"' AND FK=\".$id);\n foreach ($this->adData['images'] as $index => $arImage) {\n if ($arImage['ID_MEDIA_IMAGE'] > 0) {\n $id_image = $arImage['ID_MEDIA_IMAGE'];\n $arImage['SER_META'] = (isset($arMeta[\"IMAGES\"][$index]) ? serialize($arMeta[\"IMAGES\"][$index]) : serialize(array()));\n if (($arImage['IS_DEFAULT'] != $arArticleImages[$id_image]['IS_DEFAULT'])\n || ($arImage['SER_META'] != $arArticleImages[$id_image]['SER_META'])) {\n $this->db->querynow(\"UPDATE `media_image` SET\n IS_DEFAULT=\".(int)$arImage['IS_DEFAULT'].\", SER_META='\".mysql_real_escape_string($arImage['SER_META']).\"'\n WHERE ID_MEDIA_IMAGE=\".(int)$id_image);\n }\n unset($arArticleImages[$id_image]);\n } else {\n $src = $uploads_dir.\"/\".basename($arImage['TMP']);\n $src_thumb = $uploads_dir.\"/\".basename($arImage['TMP_THUMB']);\n if (rename($arImage['TMP'], $src)\n && rename($arImage['TMP_THUMB'], $src_thumb)) {\n $arImage['TABLE'] = $this->table;\n $arImage['FK'] = $id;\n $arImage['SRC'] = \"/\".str_replace($GLOBALS['ab_path'], \"\", $src);\n $arImage['SRC_THUMB'] = \"/\".str_replace($GLOBALS['ab_path'], \"\", $src_thumb);\n $arImage['SER_META'] = (isset($arMeta[\"IMAGES\"][$index]) ? serialize($arMeta[\"IMAGES\"][$index]) : serialize(array()));\n $id_image = $this->db->update(\"media_image\", $arImage, true);\n if (!$id_image) {\n // Failed to insert image\n return false;\n }\n }\n }\n }\n // Remove deleted images\n foreach ($arArticleImages as $id_image => $imageIsDefault) {\n if ($packetOrder !== false) {\n $packetOrder->itemRemContent('image', $id_image);\n }\n $this->db->querynow(\"DELETE FROM `media_image` WHERE ID_MEDIA_IMAGE=\".$id_image);\n }\n\n // Add uploads\n $arArticleUploads = $this->db->fetch_nar(\"SELECT ID_MEDIA_UPLOAD, EXT FROM `media_upload` WHERE `TABLE`='\".mysql_real_escape_string($this->table).\"' AND FK=\".$id);\n foreach ($this->adData['uploads'] as $index => $arUpload) {\n if ($arUpload['ID_MEDIA_UPLOAD'] > 0) {\n $id_upload = $arUpload['ID_MEDIA_UPLOAD'];\n $arUpload['SER_META'] = (isset($arMeta[\"UPLOADS\"][$index]) ? serialize($arMeta[\"UPLOADS\"][$index]) : serialize(array()));\n if ($arUpload['SER_META'] != $arArticleUploads[$id_image]['SER_META']) {\n $this->db->querynow(\"UPDATE `media_upload` SET\n SER_META='\".mysql_real_escape_string($arUpload['SER_META']).\"'\n WHERE ID_MEDIA_UPLOAD=\".(int)$id_upload);\n }\n unset($arArticleUploads[$id_upload]);\n } else {\n $src = $uploads_dir.'/'.$arUpload['FILENAME'].'_x_'.time().'_x_.'.$arUpload['EXT'];\n if (rename($arUpload['TMP'], $src)) {\n $arUpload['TABLE'] = $this->table;\n $arUpload['FK'] = $id;\n $arUpload['SRC'] = \"/\".str_replace($GLOBALS['ab_path'], \"\", $src);\n $arUpload['SER_META'] = (isset($arMeta[\"UPLOADS\"][$index]) ? serialize($arMeta[\"UPLOADS\"][$index]) : serialize(array()));\n $id_upload = $this->db->update(\"media_upload\", $arUpload, true);\n if (!$id_upload) {\n // Failed to insert image\n return false;\n }\n }\n }\n }\n // Remove deleted uploads\n foreach ($arArticleUploads as $id_upload => $uploadExt) {\n if ($packetOrder !== false) {\n $packetOrder->itemRemContent('download', $id_upload);\n }\n $this->db->querynow(\"DELETE FROM `media_upload` WHERE ID_MEDIA_UPLOAD=\".$id_upload);\n }\n\n /**\n * Videos\n */\n $arArticleVideos = $this->db->fetch_nar(\"SELECT ID_MEDIA_VIDEO, CODE FROM `media_video` WHERE `TABLE`='\".mysql_real_escape_string($this->table).\"' AND FK=\".$id);\n foreach ($this->adData['videos'] as $index => $arVideo) {\n if ($arVideo['ID_MEDIA_VIDEO'] > 0) {\n $id_video = $arVideo['ID_MEDIA_VIDEO'];\n $arVideo['SER_META'] = (isset($arMeta[\"VIDEOS\"][$index]) ? serialize($arMeta[\"VIDEOS\"][$index]) : serialize(array()));\n if ($arVideo['SER_META'] != $arArticleVideos[$id_image]['SER_META']) {\n $this->db->querynow(\"UPDATE `media_video` SET\n SER_META='\".mysql_real_escape_string($arVideo['SER_META']).\"'\n WHERE ID_MEDIA_VIDEO=\".(int)$id_video);\n }\n unset($arArticleVideos[$id_video]);\n } else {\n $arVideo['TABLE'] = $this->table;\n $arVideo['FK'] = $id;\n $arVideo['SER_META'] = (isset($arMeta[\"VIDEOS\"][$index]) ? serialize($arMeta[\"VIDEOS\"][$index]) : serialize(array()));\n $id_video = $this->db->update(\"media_video\", $arVideo, true);\n if (!$id_video) {\n // Failed to insert video\n return false;\n }\n }\n }\n // Remove deleted uploads\n foreach ($arArticleVideos as $id_video => $videoCode) {\n if ($packetOrder !== false) {\n $packetOrder->itemRemContent('video', $id_video);\n }\n $this->db->querynow(\"DELETE FROM `media_video` WHERE ID_MEDIA_VIDEO=\".$id_video);\n }\n }", "title": "" }, { "docid": "0f2523c8b62b729d3467546786aa843d", "score": "0.5503674", "text": "public function img()\n {\n $out['code'] = 0;\n $out['msg'] = 'ok';\n $out['data']= array();\n //\n $img = DB::table('img')\n ->where('type', 22) //轮播\n ->get();\n $out['data']=$img;\n return $out;\n }", "title": "" }, { "docid": "c0972b671316b9fe05585d32292f018c", "score": "0.55035114", "text": "function generar_layout() {\r\n //Es imprescindible especificar la extension del archivo que estamos abriendo, caso contrario dicho\r\n //archivo no se puede abrir.\r\n// $ruta=\"C:/Users/Bruno/Desktop/mosaico_de_japon.png\";\r\n// print_r($ruta);\r\n \r\n //abrimos el achivo en modo lectura para transferir su contenido al archivo temporal\r\n// $fp= fopen($ruta, 'r');\r\n \r\n //obtenemos una ruta a un directorio temporal\r\n// $img=toba::proyecto()->get_www_temp('mosaico_de_japon.png');\r\n \r\n //abrimos el archivo temporal en modo escritura para guardar el contenido de $fp\r\n// $temp_fp= fopen($img['path'], 'w');\r\n //copiamos el contenido de $fp en $temp_fp\r\n// stream_copy_to_stream($fp, $temp_fp);\r\n //cerramos $temp_fp y $fp\r\n// fclose($temp_fp);\r\n// fclose($fp);\r\n// print_r($img);\r\n \r\n //imprimimos la imagen en la pantalla\r\n// echo \"<img src='{$img['url']}'>\";\r\n// ------------------------------------------------------------------------------------------------ \r\n \r\n //desactivamos la pantalla pant_edicion\r\n $this->controlador()->pantalla()->tab('pant_edicion')->desactivar();\r\n \r\n //recuperamos el id_aula almacenado en el arreglo $_SESSION\r\n $id_aula=toba::memoria()->get_dato_operacion(1);\r\n //print_r(\"Este es el id_aula en memoria : \".$id_aula);\r\n \r\n //cargarmos el datos tabla aula con un unico registro\r\n $this->controlador()->dep('datos')->tabla('aula')->cargar(array('id_aula' => $id_aula));\r\n \r\n //obtenemos el registro almacenado en el datos tabla, lo que nos interesa es poder utilizar el\r\n //atributo x_dbr_clave\r\n $aula=$this->controlador()->dep('datos')->tabla('aula')->get();\r\n \r\n //obtenemos el blob almacenado el la bd, usando el atributo x_dbr_clave\r\n $fp_imagen=$this->controlador()->dep('datos')->tabla('aula')->get_blob('imagen', $aula['x_dbr_clave']);\r\n \r\n if(isset($fp_imagen)){\r\n \r\n //creamos un nombre temporal para el archivo de imagen que vamos a mostrar por pantalla\r\n $temp_nombre= md5(uniqid(time()));\r\n \r\n //obtenemos path y url del archivo temporal\r\n $temp_archivo=toba::proyecto()->get_www_temp($temp_nombre);\r\n //print_r($temp_archivo);\r\n \r\n //abrimos el archivo temporal en modo escritura para guardar el blob que sacamos de la bd\r\n $fp= fopen($temp_archivo['path'], 'w');\r\n //copiamos el contenido del blob almacenado en la bd a nuestro archivo temporal\r\n stream_copy_to_stream($fp_imagen, $fp);\r\n //cerramos el archivo temporal\r\n fclose($fp);\r\n \r\n echo \"<div style='background-color:#C5C4CB;border:2px solid;margin-bottom:10px;'><p style='font-size:15px'>{$aula['ubicacion']}</p></div>\";\r\n //pegamos la imagen en la pantalla usando la url del archivo temporal\r\n echo \"<div ><img src='{$temp_archivo['url']}' width='750px' height='400px' id=1></div>\";\r\n \r\n //reseteamos el datos tabla para que el cursor no quede posicionado en el mismo registro. \r\n //Si esto ocurre, en la pantalla, vamos a visualizar siempre la misma imagen\r\n $this->controlador()->dep('datos')->tabla('aula')->resetear();\r\n }\r\n \r\n }", "title": "" }, { "docid": "0d6d83ae71ca0f5fb672b82fcec57a42", "score": "0.5494058", "text": "function add_image($file, $rid){\n\n\t//Image id for the new image\n\t$iid = rows_count('pacs_images');\n\n\t$conn = connect();\n\t$sql = \"insert into pacs_images (record_id, image_id, thumbnail, regular_size, full_size) VALUES(\".$rid.\", \".$iid.\", empty_blob(), empty_blob(), empty_blob()) RETURNING thumbnail, regular_size, full_size into :tn, :rs, :fs\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\techo 'fail';\n\t\treturn FALSE;\n\t}\n\t\n\t$full_size = oci_new_descriptor($conn, OCI_DTYPE_LOB);\n\t$regular_size = oci_new_descriptor($conn, OCI_DTYPE_LOB);\n\t$thumb = oci_new_descriptor($conn, OCI_DTYPE_LOB);\n\n\toci_bind_by_name($statement, \":fs\", $full_size, -1, OCI_B_BLOB);\n\toci_bind_by_name($statement, \":rs\", $regular_size, -1, OCI_B_BLOB);\n\toci_bind_by_name($statement, \":tn\", $thumb, -1, OCI_B_BLOB);\n\n\t$exec = oci_execute($statement, OCI_DEFAULT);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo $err['message'];\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$file = fopen($file[\"tmp_name\"][0], 'r');\n\t$image_binary = fread($file, 1000000);\n\n\t$image = imagecreatefromstring($image_binary);\n\n\t//Thumbnail\n\t$width = imagesx($image);\n\t$height = imagesy($image);\n\n\t$thumb_width = 50;\n\t$thumb_height = floor($height * ($thumb_width / $width));\n\n\t$reg_width = ((400 < $width) ? 400 : $width);\n\t$reg_height = floor($height * ($reg_width / $width));\n\n\t$thumbnail = imagecreatetruecolor($thumb_width, $thumb_height);\n\t$regular = imagecreatetruecolor($reg_width, $reg_height);\n\n\n\timagecopyresampled($thumbnail, $image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);\n\timagecopyresampled($regular, $image, 0, 0, 0, 0, $reg_width, $reg_height, $width, $height);\n\n\tob_start();\n\timagejpeg($thumbnail);\n\t$thumbnail_binary = ob_get_contents();\n\tob_end_clean();\n\n\tob_start();\n\timagejpeg($regular);\n\t$reg_binary = ob_get_contents();\n\tob_end_clean();\n\n\t$t = $thumb->save($thumbnail_binary);\n\t$r = $regular_size->save($reg_binary);\n\t$f = $full_size->save($image_binary);\n\n\tif(!($t && $r && $f)) {\n\t\toci_rollback($conn);\n\t}\n\telse {\n\t\toci_commit($conn);\n\t}\n\n\toci_close($conn);\n\toci_free_statement($statement);\n}", "title": "" }, { "docid": "097ba3d61735a9b0d82fd6565324170e", "score": "0.5486887", "text": "public function create()\n {\n //Image\n }", "title": "" }, { "docid": "13fb7da8a24b652d51a6b7089783148e", "score": "0.5480335", "text": "function genimage()\n {\n $im = imagecreatetruecolor($this->pObj->stageWidth,$this->pObj->stageHeight);\n $white = imagecolorallocate ($im,0xff,0xff,0xff);\n $black = imagecolorallocate($im,0x00,0x00,0x00);\n $gray_lite = imagecolorallocate ($im,0xee,0xee,0xee);\n $gray_dark = imagecolorallocate ($im,0x7f,0x7f,0x7f);\n\n // Fill in the background of the image\n imagefilledrectangle($im, 0, 0, $this->pObj->stageWidth+100, $this->pObj->stageHeight+100, $white);\n\n foreach ($this->pObj->delaunay as $key => $arr)\n {\n foreach ($arr as $ikey => $iarr)\n {\n list($x1,$y1,$x2,$y2) = $iarr;\n imageline($im,$x1+5,$y1+5,$x2+5,$y2+5,$gray_dark);\n\t }\n }\n\n ob_start();\n imagepng($im);\n $imagevariable = ob_get_contents();\n ob_clean();\n\n // write to file\n $filename = $this->path.\"tri_\". rand(0,1000).\".png\";\n $fp = fopen($filename, \"w\");\n fwrite($fp, $imagevariable);\n if(!$fp)\n {\n $this->errwrite();\n }\n fclose($fp);\n }", "title": "" }, { "docid": "431dc1be3c2c7d3f136065279b9f82c9", "score": "0.54664505", "text": "function enregistre_image($image_chargee, $id_actualite, $chemin_images){\r\n //definition de variables utiles\r\n $extension = pathinfo($image_chargee['name'])['extension'];\r\n $nom_image = $id_actualite . '_image.' . $extension;\r\n $nom_temporaire = 'tmp_' . $nom_image;\r\n $nom_miniature = 'miniature_' . $nom_image;\r\n \r\n //enregistrement de l'image temporaire\r\n move_uploaded_file($image_chargee['tmp_name'], $chemin_images . $nom_temporaire);\r\n \r\n //redimensionnement de l'image\r\n resize_image($chemin_images, $nom_temporaire, $nom_image, $extension, 360);\r\n //enregistrement d'une miniature\r\n resize_image($chemin_images, $nom_temporaire, $nom_miniature, $extension, 50);\r\n //suppression de l'image temporaire\r\n unlink($chemin_images . $nom_temporaire);\r\n \r\n return $nom_image;\r\n}", "title": "" }, { "docid": "b8a9d364b935d62638a925da780c41c7", "score": "0.54647803", "text": "private static function ImageCreateFromBMP($filename) {\n\n\t\t//Ouverture du fichier en mode binaire\n\t\tif (! $f1 = fopen($filename,\"rb\")) return FALSE;\n\n\t\t//1 : Chargement des entêtes FICHIER\n\t\t$FILE = unpack(\"vfile_type/Vfile_size/Vreserved/Vbitmap_offset\",\n\t\t\tfread($f1,14));\n\t\tif ($FILE['file_type'] != 19778) return FALSE;\n\n\t\t//2 : Chargement des entêtes BMP\n\t\t$BMP = unpack('Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel'.\n\t\t\t'/Vcompression/Vsize_bitmap/Vhoriz_resolution'.\n\t\t\t'/Vvert_resolution/Vcolors_used/Vcolors_important', fread($f1,40));\n\t\t$BMP['colors'] = pow(2,$BMP['bits_per_pixel']);\n\t\tif ($BMP['size_bitmap'] == 0)\n\t\t\t$BMP['size_bitmap'] = $FILE['file_size'] - $FILE['bitmap_offset'];\n\t\t$BMP['bytes_per_pixel'] = $BMP['bits_per_pixel']/8;\n\t\t$BMP['bytes_per_pixel2'] = ceil($BMP['bytes_per_pixel']);\n\t\t$BMP['decal'] = ($BMP['width']*$BMP['bytes_per_pixel']/4);\n\t\t$BMP['decal'] -= floor($BMP['width']*$BMP['bytes_per_pixel']/4);\n\t\t$BMP['decal'] = 4-(4*$BMP['decal']);\n\t\tif ($BMP['decal'] == 4) $BMP['decal'] = 0;\n\n\t\t//3 : Chargement des couleurs de la palette\n\t\t$PALETTE = array();\n\t\tif ($BMP['colors'] < 16777216)\n\t\t{\n\t\t\t$PALETTE = unpack('V'.$BMP['colors'], fread($f1,$BMP['colors']*4));\n\t\t}\n\n\t\t//4 : Création de l'image\n\t\t$IMG = fread($f1,$BMP['size_bitmap']);\n\t\t$VIDE = chr(0);\n\n\t\t$res = imagecreatetruecolor($BMP['width'],$BMP['height']);\n\t\t$P = 0;\n\t\t$Y = $BMP['height']-1;\n\t\twhile ($Y >= 0)\n\t\t{\n\t\t\t$X=0;\n\t\t\twhile ($X < $BMP['width'])\n\t\t\t{\n\t\t\t\tif ($BMP['bits_per_pixel'] == 24)\n\t\t\t\t\t$COLOR = unpack(\n\t\t\t\t\t\t\"V\",Scrivo_byte_array_substr($IMG,$P,3).$VIDE);\n\t\t\t\telseif ($BMP['bits_per_pixel'] == 16)\n\t\t\t\t{\n\t\t\t\t\t$COLOR = unpack(\n\t\t\t\t\t\t\"n\",Scrivo_byte_array_substr($IMG,$P,2));\n\t\t\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t\t\t}\n\t\t\t\telseif ($BMP['bits_per_pixel'] == 8)\n\t\t\t\t{\n\t\t\t\t\t$COLOR = unpack(\n\t\t\t\t\t\t\"n\",$VIDE.Scrivo_byte_array_substr($IMG,$P,1));\n\t\t\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t\t\t}\n\t\t\t\telseif ($BMP['bits_per_pixel'] == 4)\n\t\t\t\t{\n\t\t\t\t\t$COLOR = unpack(\n\t\t\t\t\t\t\"n\",$VIDE.Scrivo_byte_array_substr($IMG,floor($P),1));\n\t\t\t\t\tif (($P*2)%2 == 0) $COLOR[1] = ($COLOR[1] >> 4) ;\n\t\t\t\t\telse $COLOR[1] = ($COLOR[1] & 0x0F);\n\t\t\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t\t\t}\n\t\t\t\telseif ($BMP['bits_per_pixel'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$COLOR = unpack(\n\t\t\t\t\t\t\"n\",$VIDE.Scrivo_byte_array_substr($IMG,floor($P),1));\n\t\t\t\t\tif (($P*8)%8 == 0) $COLOR[1] = $COLOR[1] >>7;\n\t\t\t\t\telseif (($P*8)%8 == 1) $COLOR[1] = ($COLOR[1] & 0x40)>>6;\n\t\t\t\t\telseif (($P*8)%8 == 2) $COLOR[1] = ($COLOR[1] & 0x20)>>5;\n\t\t\t\t\telseif (($P*8)%8 == 3) $COLOR[1] = ($COLOR[1] & 0x10)>>4;\n\t\t\t\t\telseif (($P*8)%8 == 4) $COLOR[1] = ($COLOR[1] & 0x8)>>3;\n\t\t\t\t\telseif (($P*8)%8 == 5) $COLOR[1] = ($COLOR[1] & 0x4)>>2;\n\t\t\t\t\telseif (($P*8)%8 == 6) $COLOR[1] = ($COLOR[1] & 0x2)>>1;\n\t\t\t\t\telseif (($P*8)%8 == 7) $COLOR[1] = ($COLOR[1] & 0x1);\n\t\t\t\t\t$COLOR[1] = $PALETTE[$COLOR[1]+1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn FALSE;\n\t\t\t\timagesetpixel($res,$X,$Y,$COLOR[1]);\n\t\t\t\t$X++;\n\t\t\t\t$P += $BMP['bytes_per_pixel'];\n\t\t\t}\n\t\t\t$Y--;\n\t\t\t$P+=$BMP['decal'];\n\t\t}\n\n\t\t//Fermeture du fichier\n\t\tfclose($f1);\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "891f220c09e458983ed95c874ee15115", "score": "0.5460535", "text": "public static function relacionaImgTxt($imgtxt){\n\t\t\t self::getConexion();\n \n\t\t\t $query = \"Insert Into TBimgtxtcarrusel(Imagen_ID, Texto_ID, FechaInicial, FechaFinal, Prioridad) VALUES \n (:imagen_ID, :texto_ID, :fechainicial, :fechafinal, :prioridad)\";\n //echo \" qry ==\".$query;\n \n $resultado = self::$conexion->prepare($query);\n //$imgtxt_ID = $imgtxt->GetImgTxt_ID();\n\t\t\t $imagen_ID = $imgtxt->GetImagen_ID();\n\t\t\t $texto_ID = $imgtxt->GetTexto_ID();\n $fechainicial = $imgtxt->GetFechaInicial();\n\t\t\t $fechafinal = $imgtxt->GetFechaFinal();\n $prioridad = $imgtxt->GetPrioridad();\n\t\t\t $resultado->bindParam(':imagen_ID',$imagen_ID);\n\t\t\t $resultado->bindParam(':texto_ID',$texto_ID);\n $resultado->bindParam(':fechainicial',$fechainicial);\n $resultado->bindParam(':fechafinal',$fechafinal);\n $resultado->bindParam(':prioridad',$prioridad);\n \n \n\t\t\t //echo \" imagen_ID \".$imagen_ID.\" texto_ID \".$texto_ID.\" fechainicial \".$fechainicial.\" fechafinal \".$fechafinal.\" prioridad \".$prioridad;\n if($resultado->execute()) return true;\n\t\t\t else false;\n }", "title": "" }, { "docid": "0a206433a4a54c97e534070f4280709b", "score": "0.54563016", "text": "public function image()\n {\n $image_params = $this->getParams();\n $image_params['brand_id'] = $this->id;\n $image_params['name'] = 'brandimage';\n\n $image = new \\Spotlight\\File\\Entity\\Image($image_params);\n return $image;\n }", "title": "" }, { "docid": "b4817b0e66e658714ba0e2937526081e", "score": "0.5454445", "text": "function putDamImageReference($uid_dam, $uid_table, $table, $field) {\n\t\t// creating $where_string and looking for existing images in requested $table entry, ordered by sorting_foreign\n\t\t$whereString = 'uid_foreign = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($uid_table, 'tx_dam_mm_ref').' AND tablenames = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'tx_dam_mm_ref').' AND ident = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($field,'tx_dam_mm_ref');\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_dam_mm_ref', $whereString, '', 'sorting_foreign');\n\t\t// if there are already images\n\t\tif($count = $GLOBALS['TYPO3_DB']->sql_num_rows($res)) {\n\t\t\t// check for correct sorting_foreign values, update them if not\n\t\t\t$checkSorting = 0;\n\t\t\t$updateCheck = true;\n\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t// check each entry; if there was an update error, skip following updates\n\t\t\t\tif($row['sorting_foreign'] != ++$checkSorting && $updateCheck) {\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dam_mm_ref', $whereString.' AND sorting_foreign = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($row['sorting_foreign'],'tx_dam_mm_ref'), array('sorting_foreign' => $check_sorting));\n\t\t\t\t\t$updateCheck = ((boolean)$GLOBALS['TYPO3_DB']->sql_affected_rows() && $updateCheck);\n\t\t\t\t}\n\t\t\t\t// if there was an update-error, use the highest sorting_foreign value +1 for new entry\n\t\t\t\tif(!$updateCheck) $sortingNew = $row['sorting_foreign']+1;\n\t\t\t}\n\t\t}\n\n\t\t// if there was no update-error, use $count+1 for sorting_foreign in new entry\n\t\tif($updateCheck) $sortingNew = $count+1;\n\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dam_mm_ref', array('uid_local' => $uid_dam, 'uid_foreign' => $uid_table, 'tablenames' => $table, 'ident' => $field, 'sorting_foreign' => $updateCheck));\n\n\t\t// if insert was successfull, update foreign table with new count of images\n\t\tif($insertSuccess = (boolean)$GLOBALS['TYPO3_DB']->sql_affected_rows()) {\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($uid_table, $table), array($field => ($count+1)));\n\t\t}\n\n\t\treturn $insertSuccess;\n\t}", "title": "" }, { "docid": "a190314296492b262ef9a5b6c38e8969", "score": "0.5453061", "text": "function GDImage($im, $x=null, $y=null, $w=0, $h=0, $link=''){\n\t\t\tob_start();\n\t\t\timagepng($im);\n\t\t\t$data = ob_get_clean();\n\t\t\t$this->MemImage($data, $x, $y, $w, $h, $link);\n\t\t}", "title": "" }, { "docid": "09471f371c8b537b6b0a982a6d70f5e1", "score": "0.54520696", "text": "function getOtherImage($idMobile)\n {\n $query = \"select * from hinhanh where Mobile_idMobile = {$idMobile} and logo = 0\";\n $pre = $this->db->prepare($query);\n $pre->execute();\n $data = $pre->fetchAll(PDO::FETCH_ASSOC);\n $pre->closeCursor();\n return $data;\n }", "title": "" }, { "docid": "df2ee28ac9982a86cf0bda12d0746833", "score": "0.5451711", "text": "public function updateToDb()\n {\n try {\n $sql = 'UPDATE banner SET title=:title, link=:link WHERE id=:id';\n $this->_db->query($sql, array('title' => $this->_title, 'link' => $this->_link, 'id' => $this->_id));\n\n $fileName = $this->_img->download('img');\n if ($fileName !== false) {\n $this->_img->createPreview(190, 110);\n $this->_db->query('UPDATE banner SET img=:file WHERE id=:id', array('file' => $fileName, 'id' => $this->_id));\n }\n\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "a97078ad1ea17ca8e5b714955422aa1f", "score": "0.54496026", "text": "function put_image($path) {\n\t\t$sum = md5_file($path);\n\t\t\n\t\t$r = $this->db->prepare(\"SELECT img_id FROM images WHERE img_path=:path\");\n\t\t$r->bindValue(\":path\",$path); $r->execute();\n\t\t$ret = $r->fetchObject(); $r = null;\n\t\t\n\t\tif(is_object($ret) && $ret->img_id) {\n\t\t\t$this->db->query(sprintf(\"DELETE FROM images WHERE img_id='%d'\",$ret->img_id));\n\t\t\t$this->db->query(sprintf(\"DELETE FROM thumbnails WHERE img_id='%d'\",$ret->img_id));\n\t\t\t$this->db->query(sprintf(\"DELETE FROM info WHERE img_id='%d'\",$ret->img_id));\n\t\t\t$this->db->query(sprintf(\"DELETE FROM tag_link WHERE img_id='%d'\",$ret->img_id));\n\t\t}\n\t\t\n\t\t$r = $this->db->prepare(\"INSERT INTO images (img_path, img_sum) VALUES (:path, :sum)\");\n\t\t$r->bindValue(':path',$path); $r->bindValue(':sum',$sum);\n\t\t$r->execute(); $iid = $this->db->lastInsertId(); $r = null;\n\t\t\n\t\t$this->db->query(sprintf(\n\t\t\t\"INSERT INTO info (img_id,i_name,i_date) VALUES ('%d','%s','%d');\",\n\t\t\t$iid,\n\t\t\tpreg_replace(\"/\\.(.+)$/\",\"\",basename($path)),\n\t\t\ttime()\n\t\t));\n\t\t\n\t\treturn $iid;\n\t}", "title": "" }, { "docid": "50cde1dcde54597cc36d9d82a43f7584", "score": "0.5442779", "text": "public function port_content() {\n $content = new CmsContent;\n $articles = $content->find_all(array(\"order\"=>\"id ASC\"));\n $new = new WildfireFile;\n foreach($articles as $article) {\n $oldimgs = $new->sql(\"SELECT * FROM cms_content_cms_file WHERE cms_content_id = $article->id\")->all();\n \t foreach($oldimgs as $img) {\n \t $newimg = $new->clear()->filter(\"oldid=\".$img->cms_file_id)->first();\n \t $newfile = new WildfireFile($newimg->id);\n \t if($newfile->id) $article->images = $newfile;\n \t }\n }\n\n }", "title": "" }, { "docid": "1df7eebcf2f5b15817b8df82cb4d0d91", "score": "0.5441766", "text": "function storeImages()\n {\n }", "title": "" }, { "docid": "a798357724999283ecbe578742f383cf", "score": "0.54391956", "text": "public function getImageBo()\r\n\t{\r\n\t\treturn $this->ImageBo;\r\n\t}", "title": "" }, { "docid": "63ba7c229c28afc97ec285aa7cc9d35c", "score": "0.54386663", "text": "function newstImages($db){\r\n\t\t$sql_newstImages = \"SELECT * FROM galery_photos ORDER BY ID DESC LIMIT 0,5\";\r\n\t\t$sql_newstImages_cmd = $db->prepare($sql_newstImages);\r\n\t\t$sql_newstImages_cmd->execute();\r\n\r\n\t\t$newstImages = $sql_newstImages_cmd->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\timageCard($newstImages);\r\n\t}", "title": "" }, { "docid": "3ad9f6cfb191e641bf8b829937650693", "score": "0.5437454", "text": "function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }", "title": "" }, { "docid": "3ad9f6cfb191e641bf8b829937650693", "score": "0.5437454", "text": "function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }", "title": "" }, { "docid": "3a7004054008ea0e98bb856dd5c12223", "score": "0.54310125", "text": "function update()\n {\n global $objDatabase;\n\n $query = \"\n UPDATE \".DBPREFIX.\"core_image\n SET `imagetype_key`=\".\n ($this->imagetype_key\n ? \"'\".addslashes($this->imagetype_key).\"'\"\n : 'NULL').\",\n `filetype_key`=\".\n ($this->filetype_key\n ? \"'\".addslashes($this->filetype_key).\"'\"\n : 'NULL').\",\n `path`='\".addslashes($this->path).\"',\n `width`=\".($this->width ? $this->width : 'NULL').\",\n `height`=\".($this->height ? $this->height : 'NULL').\"\n WHERE `id`=$this->id\n AND `ord`=$this->ord\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult) return self::errorHandler();\n return $this->id;\n }", "title": "" }, { "docid": "c29d5609cc45b93d1bea01bffe4aa0ea", "score": "0.5428303", "text": "function displayImage() {\n\t //\techo \"at display image <br />\";\n\t\techo $this->image;\n\t}", "title": "" }, { "docid": "e8b856039abb6b0024e2ca0cd801d825", "score": "0.54215705", "text": "function real_insert_image_type( $db_conn, $pid, $section_id, $fieldname, $rel_path, $type ) {\n if( $_FILES ) {\n if( is_uploaded_file( $_FILES[$fieldname][\"tmp_name\"] ) ) {\n////////////////////////////altered to include 'image' /////////////////////////\n $image_query = \"INSERT INTO gen_image_info(pid, section_id, image)\n\t\t\t\t\t\t\t\tVALUES(\". \n real_mysql_specialchars($pid, true ) .\n \", \" . real_mysql_specialchars($section_id, true ) .\n \", 0)\";\n real_execute_query( $image_query, $db_conn );\n $image_id = mysql_insert_id( $db_conn ) ;\n\n if( real_update_image_type( $db_conn, $pid, $section_id, $fieldname, $image_id, $rel_path, $type ) == true )\n return $image_id;\n else\n return 0;\n }\n }\n return 0;\n}", "title": "" }, { "docid": "5f188df016cf58d387cae2faa12fef08", "score": "0.54202795", "text": "function displayimage()\r\n {\r\n $con = mysqli_connect(\"localhost\", \"root\", \"\",\"demo\");\r\n $qry=\"SELECT image FROM images WHERE name = '$name'\";\r\n $result=mysqli_query($con,$qry);\r\n while ($row = @mysqli_fetch_array($result))\r\n {\r\n echo '<img height=\"300\" width=\"300\" src=\"data:imagetmp;base64, '.$row['image']. ' \">';\r\n }\r\n\r\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7782105", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.74687606", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.7393118", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7328834", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72882813", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.72740334", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.72529656", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.7215597", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.7178891", "text": "public function create()\n {\n return view('core.admin.form.create');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.71638685", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.7148757", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.71411735", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.713852", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.71345985", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.7130929", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.71173835", "text": "public function create()\n {\n return view('crud.new');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.71150076", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.71074176", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.7075148", "text": "public function create()\n {\n //\n return view('submit.create');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.7073722", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7072655", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.70675695", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.70457923", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.7040961", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.70215225", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.7014469", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.7008361", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.70045805", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.69976735", "text": "public function create()\n {\n return view('student_form');\n }", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.6994326", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69885707", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6986169", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.6984008", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.69780463", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.69766605", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.69652027", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.69635683", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.69630045", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6958746", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "ec1387b33a439043065a5a57c6b204dc", "score": "0.695659", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.6953423", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.6939794", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.69371575", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.69358236", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.6935629", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.693502", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "70b9293351aa11656c59414a77fe44bf", "score": "0.6923899", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.6919321", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.6917995", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.6916618", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6914903", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.69129646", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.69047606", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.6899591", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6898638", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.68974555", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.6896062", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.68953085", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.6891878", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.68887526", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.6888498", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6884337", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.6883745", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6879102", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.687882", "text": "public function create()\n {\n return view('pemilih::create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6876466", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.68743026", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.6870653", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.68705153", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.68689495", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.6868636", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6866793", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.68618274", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.6860699", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "60bdecfc6ffd19a36bc113519ea81603", "score": "0.685967", "text": "public function create()\n {\n //\n return view('products.form');\n }", "title": "" }, { "docid": "3d7bc8bb3b893c8acc93454aa41e36a4", "score": "0.68593067", "text": "public function create()\n\t{\n\n\t\treturn view('admin.oficinas.create');\n\t}", "title": "" }, { "docid": "5ac05ec4af3247a2fffa1aede51592e8", "score": "0.6858492", "text": "public function create()\n {\n return view('ringan.create');\n }", "title": "" }, { "docid": "17dc479c63e9567096e96d737df7c124", "score": "0.6857442", "text": "public function create() {\n $data = [\n 'title' => 'site_name',\n 'page_title' => 'add_admin',\n 'type' => 'add',\n 'form_title' => 'admin_form',\n 'submit_button' => 'save',\n ];\n return view(AD . '.brands_form')->with($data);\n }", "title": "" } ]
f2cb178e62a404dc4aba6dedbc1d91c9
Gets the public 'hateoas.helper.link' shared service.
[ { "docid": "bc63c43f0be1c340fb05167e592f7f51", "score": "0.86390835", "text": "protected function getHateoas_Helper_LinkService()\n {\n return $this->services['hateoas.helper.link'] = new \\Hateoas\\Helper\\LinkHelper(${($_ = isset($this->services['hateoas.link_factory']) ? $this->services['hateoas.link_factory'] : $this->getHateoas_LinkFactoryService()) && false ?: '_'}, ${($_ = isset($this->services['hateoas.configuration.relations_repository']) ? $this->services['hateoas.configuration.relations_repository'] : $this->getHateoas_Configuration_RelationsRepositoryService()) && false ?: '_'});\n }", "title": "" } ]
[ { "docid": "2f2da94eb668a0046a7da66bfc84cb9d", "score": "0.74725527", "text": "protected function getHateoas_Twig_LinkService()\n {\n return $this->services['hateoas.twig.link'] = new \\Hateoas\\Twig\\Extension\\LinkExtension(${($_ = isset($this->services['hateoas.helper.link']) ? $this->services['hateoas.helper.link'] : $this->get('hateoas.helper.link')) && false ?: '_'});\n }", "title": "" }, { "docid": "17328277becf83282cf6e72e71614f4f", "score": "0.7339014", "text": "protected function getHateoas_Expression_LinkService()\n {\n return $this->services['hateoas.expression.link'] = new \\Hateoas\\Expression\\LinkExpressionFunction(${($_ = isset($this->services['hateoas.helper.link']) ? $this->services['hateoas.helper.link'] : $this->get('hateoas.helper.link')) && false ?: '_'});\n }", "title": "" }, { "docid": "049bf5aae9364239dc86a7b129142438", "score": "0.64030856", "text": "protected function _getHelper()\n {\n return $this->_objectManager->get(\\Magento\\Multishipping\\Helper\\Url::class);\n }", "title": "" }, { "docid": "6753f8ce0104457b056b341a24c153a2", "score": "0.63865435", "text": "protected function getHateoas_LinkFactoryService()\n {\n return $this->services['hateoas.link_factory'] = new \\Hateoas\\Factory\\LinkFactory(${($_ = isset($this->services['hateoas.expression.evaluator']) ? $this->services['hateoas.expression.evaluator'] : $this->get('hateoas.expression.evaluator')) && false ?: '_'}, ${($_ = isset($this->services['hateoas.generator.registry']) ? $this->services['hateoas.generator.registry'] : $this->get('hateoas.generator.registry')) && false ?: '_'});\n }", "title": "" }, { "docid": "ce655ddddaa6f5c2f159c941ae524999", "score": "0.61929685", "text": "protected function getHateoas_LinksFactoryService()\n {\n return $this->services['hateoas.links_factory'] = new \\Hateoas\\Factory\\LinksFactory(${($_ = isset($this->services['hateoas.configuration.relations_repository']) ? $this->services['hateoas.configuration.relations_repository'] : $this->getHateoas_Configuration_RelationsRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['hateoas.link_factory']) ? $this->services['hateoas.link_factory'] : $this->getHateoas_LinkFactoryService()) && false ?: '_'}, ${($_ = isset($this->services['hateoas.serializer.exclusion_manager']) ? $this->services['hateoas.serializer.exclusion_manager'] : $this->get('hateoas.serializer.exclusion_manager')) && false ?: '_'});\n }", "title": "" }, { "docid": "fe7cdb1c1d80514175620f9ce4af9f39", "score": "0.6018319", "text": "public function getLink() {\n return $this->get('link')[0];\n }", "title": "" }, { "docid": "30b2a8150866991f543cab9dcd2b8198", "score": "0.594782", "text": "public function getLinkstatic()\n {\n return $this->linkstatic;\n }", "title": "" }, { "docid": "09e853a18b14a93f208fc336cbcacc11", "score": "0.58858407", "text": "abstract public function getLink();", "title": "" }, { "docid": "8a7b226e3b52d0fd9bb54a0a18b13a6f", "score": "0.58839476", "text": "public function getLinkman()\n {\n return $this->linkman;\n }", "title": "" }, { "docid": "a8db43b6a3ed02ddbc705d8553a2e0f2", "score": "0.5857292", "text": "public static function get_instance()\n{\nglobal $link; //making link global ensures we get the database link as required\nreturn $link;\n}", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "1c75425fcbf7acccd949af8fe78d091d", "score": "0.5856363", "text": "public function getLink()\n {\n return $this->link;\n }", "title": "" }, { "docid": "21c69bbc70859e51304550bad0ffb7a9", "score": "0.5791687", "text": "public function getLink(): string\n\t{\n\t\treturn self::API_LINK;\n\t}", "title": "" }, { "docid": "2244a46209ffbbc24f8a562fbbf21251", "score": "0.5791432", "text": "public function getLink() {\n\n\t\treturn $this->link;\n\t}", "title": "" }, { "docid": "3cf731703d1846c7328ee90e79bb59fb", "score": "0.5777615", "text": "public function getMetaLink()\n {\n if ($this->owner->hasMethod('Link')) {\n return $this->owner->Link();\n } elseif ($this->owner->Link) {\n return $this->owner->Link;\n }\n }", "title": "" }, { "docid": "e83e9683f707adecbabe6119b8f5d346", "score": "0.57350427", "text": "protected function getSonata_Admin_HelperService()\n {\n return $this->services['sonata.admin.helper'] = new \\Sonata\\AdminBundle\\Admin\\AdminHelper($this->get('sonata.admin.pool'));\n }", "title": "" }, { "docid": "6c90669f29957f7c4be4d952c86c76f2", "score": "0.57343554", "text": "public function getHelper() {\n\t\treturn $this->helper;\n\t}", "title": "" }, { "docid": "964ee0b3686d8261ad6623216a17439d", "score": "0.57204115", "text": "public function getLink(){\n return $this->manager()->autoformLink($this->getPack(),$this->getTag());\n }", "title": "" }, { "docid": "61c83cc9d93a87ea8a75dc0022417eab", "score": "0.57000655", "text": "protected function getSonata_Admin_HelperService()\n {\n return $this->services['sonata.admin.helper'] = new \\Sonata\\AdminBundle\\Admin\\AdminHelper(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n }", "title": "" }, { "docid": "d60d275deb79945fa0755a6267c697a9", "score": "0.5695706", "text": "function getServiceLink($type, $app, $override = false, $referrer = true)\n {\n if (!Horde::showService($type, $override)) {\n return false;\n }\n\n switch ($type) {\n case 'help':\n if ($GLOBALS['browser']->hasFeature('javascript')) {\n Horde::addScriptFile('popup.js', 'horde', true);\n }\n $url = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/help/', true);\n return Util::addParameter($url, 'module', $app);\n\n case 'problem':\n return Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/problem.php?return_url=' . urlencode(Horde::selfUrl(true, true, true)));\n\n case 'logout':\n return Horde::url(Auth::addLogoutParameters($GLOBALS['registry']->get('webroot', 'horde') . '/login.php', AUTH_REASON_LOGOUT));\n\n case 'login':\n return Auth::getLoginScreen('', $referrer ? Horde::selfUrl(true) : null);\n\n case 'options':\n global $conf;\n if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] != 'none')) {\n return Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php?app=' . $app);\n }\n break;\n }\n\n return false;\n }", "title": "" }, { "docid": "1ccd6c08656cd47549f650ddb98bed9c", "score": "0.5665165", "text": "protected function _getHelper()\n {\n return Mage::helper('ketai/url');\n }", "title": "" }, { "docid": "ead052ceffa3fc838b22158e1bccaaa1", "score": "0.5645424", "text": "public static function getUtilityLinks()\n\t{\n\t\treturn(static::$utilityLinks);\n\t}", "title": "" }, { "docid": "f00402fe83970a5d480b264725927851", "score": "0.56280977", "text": "public function getLink()\n {\n return 'http://www.mazemod.org';\n }", "title": "" }, { "docid": "cf0739f33dab71ec37c9c4f70a7b0e83", "score": "0.55978876", "text": "public function getHelper(): Helper\n {\n return new Helper();\n }", "title": "" }, { "docid": "59be6e631060a9a4a0c0ebe186c04dd5", "score": "0.55893546", "text": "public function Link()\n {\n return $this->getURL();\n }", "title": "" }, { "docid": "a8bd01a614eee449ab175d35abfeb5e4", "score": "0.5564668", "text": "public function getAdminLink();", "title": "" }, { "docid": "5c4ab48e45ba3aa84dbc5ab8d60cbd9d", "score": "0.5561645", "text": "protected function getTemplating_Helper_RouterService()\n {\n return $this->services['templating.helper.router'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper($this->get('cmf_routing.router'));\n }", "title": "" }, { "docid": "4cbc1fdd240841a2579f4755153fc79f", "score": "0.5530987", "text": "public function model()\n {\n return Link::class;\n }", "title": "" }, { "docid": "d46d50c0689fccbd88fe34eb79da3d47", "score": "0.55288583", "text": "public function & getLinker() {\n\t\treturn $this->linker;\n\t}", "title": "" }, { "docid": "047032303222bb88e05f5b45fde906df", "score": "0.55208504", "text": "public function get_provider_help_link() {\n\t\treturn apply_filters( 'wpcd_provider_help_link', $this->help_link );\n\t}", "title": "" }, { "docid": "2c97800a80b21542ab00aa501c42855d", "score": "0.55130374", "text": "public function link();", "title": "" }, { "docid": "2c97800a80b21542ab00aa501c42855d", "score": "0.55130374", "text": "public function link();", "title": "" }, { "docid": "99ef63813474dc3a999c5f982e7b6b01", "score": "0.55117685", "text": "protected function getHelper()\n {\n return $this->get('netmafia_holycrud.helper');\n }", "title": "" }, { "docid": "afd30256e74f17d037090a3c947dbe28", "score": "0.5511692", "text": "private function getLink()\n {\n $this->link = $this->item->find('a')->attr('href');\n return $this->link;\n }", "title": "" }, { "docid": "293f8ecfb6c45dd7ec6e2e200294317d", "score": "0.54996496", "text": "public function getLinkProvider(): EvolvableLinkProviderInterface\n {\n return $this->linkProvider;\n }", "title": "" }, { "docid": "10eb7b5583958989527f4957ca042b15", "score": "0.5485238", "text": "function link_id()\n {\n return $this->Link_ID;\n }", "title": "" }, { "docid": "19daef8786f5b0bf249632f027ea8f45", "score": "0.5481826", "text": "public function getUseLink()\n\t{\n\t\treturn $this->use_link;\n\t}", "title": "" }, { "docid": "4a39a252e0c01bd4909ee26d6d2845c4", "score": "0.54814416", "text": "public function getSettingsLink();", "title": "" }, { "docid": "8d6b934831034ab82fe5f40f84f76a63", "score": "0.5456428", "text": "protected function getTemplating_Helper_RouterService()\n {\n return $this->services['templating.helper.router'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper($this->get('router'));\n }", "title": "" }, { "docid": "c721f9675e0ceff2f36aabded92f8da0", "score": "0.5452069", "text": "public function helper()\n {\n return Mage::helper('flancer32_ppapi_helper');\n }", "title": "" }, { "docid": "8144d2f2c32cd1213fbfe7a41647e860", "score": "0.5440039", "text": "public function get_link() {\n\n\t\treturn $this->url;\n\n\t}", "title": "" }, { "docid": "40c36e52f7979ee3d33e280072d82345", "score": "0.5430662", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('Link');\n }", "title": "" }, { "docid": "6e3f0d8b5bd779c97985b8e4b99dfb7e", "score": "0.5429909", "text": "public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}", "title": "" }, { "docid": "6e3f0d8b5bd779c97985b8e4b99dfb7e", "score": "0.5429909", "text": "public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}", "title": "" }, { "docid": "6e3f0d8b5bd779c97985b8e4b99dfb7e", "score": "0.5429909", "text": "public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}", "title": "" }, { "docid": "7d6aced534e36c001d197b13b8bfbfff", "score": "0.5428738", "text": "function link() {\n\t\treturn get_permalink( $this->_post->ID );\n\t}", "title": "" }, { "docid": "3111e38e664eaabd1cfc000f199e5c05", "score": "0.54246235", "text": "public function getAdminLink(){\n return AMI::getSingleton('core')->getAdminLink($this->modId);\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.54211396", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "75f777009bbe15f4fce766a7339355f1", "score": "0.54105246", "text": "private function getCategoryLinkManagement()\n {\n return $this->categoryLinkManagement;\n }", "title": "" }, { "docid": "29f7d7247dfadc6b97d1749d2556b913", "score": "0.54096407", "text": "public static function get_instance() {\n\t\tif ( null === self::$instance ) {\n\t\t\tself::$instance = new APS_Helper();\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "b4fafdf76dbf0b1fd32771a264e2c115", "score": "0.5401284", "text": "public function helper(HelperContract $helper);", "title": "" }, { "docid": "1c3e94e1f5e93a8ac250603683cdb9b1", "score": "0.5389689", "text": "function Link()\n\t{\tif ($this->details['redirectlink'])\n\t\t{\tif (strstr($this->details['redirectlink'], 'http') || strstr($this->details['redirectlink'], 'https'))\n\t\t\t{\treturn $this->details['redirectlink'];\n\t\t\t} else\n\t\t\t{\treturn SITE_SUB . '/' . $this->details['redirectlink'];\n\t\t\t}\n\t\t} else\n\t\t{\treturn $this->link->GetPageLink($this);\n\t\t}\n\t}", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.538718", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.538718", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "81c4356fb85d895752aec0c27a3c6d0f", "score": "0.5385199", "text": "private function getCategoryLinkManagement()\n {\n if (null === $this->categoryLinkManagement) {\n $this->categoryLinkManagement = \\Magento\\Framework\\App\\ObjectManager::getInstance()\n ->get(\\Magento\\Catalog\\Api\\CategoryLinkManagementInterface::class);\n }\n return $this->categoryLinkManagement;\n }", "title": "" }, { "docid": "540018fbbb40aceb8e8e33bab07989bf", "score": "0.5376984", "text": "function shortLink($link)\n {\n if (!config('dan.use_short_links')) {\n return $link;\n }\n\n $class = config('dan.short_link_api');\n\n /** @var \\Dan\\Contracts\\ShortLinkContract $creator */\n $creator = new $class();\n\n return $creator->create($link);\n }", "title": "" }, { "docid": "4159dfdb5384862fd3cbff257bbbdf46", "score": "0.53508884", "text": "public function _getUrlHelper()\n {\n if(!$this->_urlHelper) {\n $this->_urlHelper = new Zend_View_Helper_Url();\n }\n \n return $this->_urlHelper;\n }", "title": "" }, { "docid": "97513417bf8c46aaa581ca97ca0643b4", "score": "0.53388715", "text": "public function getHelper() {\n if (!$this->_helper)\n $this->_helper = Mage::helper('sitemapEnhanced');\n\n return $this->_helper;\n }", "title": "" }, { "docid": "767af091662aa22b119113713fa31389", "score": "0.5335423", "text": "public function link()\n {\n return $this->belongsTo(Link::class);\n }", "title": "" }, { "docid": "1ee374e2c118069288c5e463093238fd", "score": "0.53350353", "text": "public function getLinkUrl()\n\t{\n\t\treturn $this->linkUrl; \n\n\t}", "title": "" }, { "docid": "1866433a906c7a2a65d075156ed9717e", "score": "0.5329549", "text": "function ht_dms_link( $id, $type = 'permalink', $text= 'view', $title= null, $button = false, $classes = false, $link_id = false, $append = false ) {\n\treturn ht_dms_ui()->elements()->link( $id, $type, $text, $title, $button, $classes, $link_id, $append );\n\n}", "title": "" }, { "docid": "64fbc95063d8449566b7afb4f3cb9e6d", "score": "0.5324209", "text": "public function getLinkId()\n {\n return $this->linkId;\n }", "title": "" }, { "docid": "64fbc95063d8449566b7afb4f3cb9e6d", "score": "0.5324209", "text": "public function getLinkId()\n {\n return $this->linkId;\n }", "title": "" }, { "docid": "f5d4cec0b05013ac77b403e5c2c5e353", "score": "0.53214735", "text": "private function getBaseMockLink()\n {\n return $this->getMock('Mremi\\UrlShortener\\Model\\LinkInterface');\n }", "title": "" }, { "docid": "a787292673bcad7ff54b869e4ee36672", "score": "0.53011405", "text": "function Helpers(){\n /*$clss = new Helpers();*/\n return ST\\Helpers::get_instance();\n }", "title": "" }, { "docid": "9c2d0a4fa8f8518d8a0df266a13e02e0", "score": "0.52970314", "text": "public function getLinks()\n\t{\n\t\t$this->share('links', [\n\t\t\t'Phanda Website' => 'https://phandaframework.com',\n\t\t\t'Documentation' => 'https://phandaframework.com/docs',\n\t\t\t'News' => 'https://phandaframework.com/news',\n\t\t\t'Source Code' => 'https://gitlab.com/phanda/framework'\n\t\t]);\n\n\t\t// Rather than returning a hard coded string, you could return another stage too.\n\t\treturn \"<strong>Handy Links: </strong>\";\n\t}", "title": "" }, { "docid": "5e531860187ac72fd684e2532cda9cfa", "score": "0.52961385", "text": "public function getLink()\n {\n if (!array_key_exists('link', $this->data)) {\n return null;\n }\n\n return $this->data['link'];\n }", "title": "" }, { "docid": "3f6d459f8d43bbc8e7d9b186df172eec", "score": "0.528379", "text": "protected static function getFacadeAccessor() \n { \n return 'helper';\n }", "title": "" }, { "docid": "1c9c5c8333076437f738fbc46758f61c", "score": "0.5272903", "text": "public function makeLink()\n {\n //$this->thing_report['link'] = $link;\n //return;\n\n //if (isset($this->thing_report['link'])) {return;}\n //$link = $this->web_prefix;\n\n //if (isset($this->keyword)) {\n //$link = $this->web_prefix . \"thing/\" . $this->uuid . \"/\" . $this->keyword;\n //}\n\n if (isset($this->link)) {\n $link = $this->link;\n }\n\n if (isset($this->agent->link)) {\n $link = $this->agent->link;\n }\n\n if (isset($this->current_agent)) {\n $link =\n $this->web_prefix .\n 'thing/' .\n $this->uuid .\n '/' .\n strtolower($this->current_agent);\n }\n\n if (!isset($link) and isset($this->keyword)) {\n $link =\n $this->web_prefix .\n \"thing/\" .\n $this->uuid .\n \"/\" .\n $this->keyword;\n }\n\n if (!isset($link)) {\n $link = $this->web_prefix;\n }\n\n $this->link = $link;\n $this->thing_report['link'] = $link;\n }", "title": "" }, { "docid": "4ca35d75f1a73ca8fc693504a1a65cd2", "score": "0.5266045", "text": "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "title": "" }, { "docid": "4ca35d75f1a73ca8fc693504a1a65cd2", "score": "0.5266045", "text": "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "title": "" }, { "docid": "4bb87b1838d30024c5cf6bb1c7e7a66a", "score": "0.5265282", "text": "public function accessLink($link);", "title": "" }, { "docid": "49f287ae16c041d5f7caa7d3bac5c7e0", "score": "0.5258761", "text": "public function getName()\n\t{\n\t\treturn \"link\";\n\t}", "title": "" }, { "docid": "bac4e18574fc08e50ce589ed63852142", "score": "0.52297115", "text": "protected function getTemplating_Helper_LogoutUrlService()\n {\n return $this->services['templating.helper.logout_url'] = new \\Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\LogoutUrlHelper($this->get('security.logout_url_generator'));\n }", "title": "" }, { "docid": "479f2c2e114a5fe3165b22cad52a11fc", "score": "0.5229436", "text": "private static function getHelper(): object\n {\n $namespace = static::class;\n if (isset(self::$helpers[$namespace])) {\n return self::$helpers[$namespace];\n }\n $objectManager = ObjectManager::getInstance();\n if (defined(\"$namespace::FACADE_HELPER\")) {\n /** @noinspection PhpUndefinedFieldInspection */\n return self::$helpers[$namespace] = $objectManager->get($namespace::FACADE_HELPER);\n }\n $namespaceParts = explode('\\\\', $namespace, 4);\n if (!isset($namespaceParts[3])) {\n throw BadNamespaceException::badFacadeNamespace();\n }\n $facade = &$namespaceParts[2];\n if ($facade !== 'Facade') {\n throw BadNamespaceException::badFacadeNamespace();\n }\n $facade = 'Helper';\n $helperNamespace = implode('\\\\', $namespaceParts);\n return self::$helpers[$namespace] = $objectManager->get($helperNamespace);\n }", "title": "" }, { "docid": "9ef59534015ae8af9114a29d54370436", "score": "0.52187276", "text": "public function getLink()\n {\n if (null === $this->link && null !== $this->request) {\n $this->link = sprintf('http://%s/', $this->request->readHeader('SERVER_NAME')->unsecure());\n }\n \n return $this->link;\n }", "title": "" }, { "docid": "6d6d2a2e53b59afed4d0e88452eab0f1", "score": "0.5210715", "text": "protected function getCheckoutHelper()\n {\n return $this->objCheckoutHelper;\n }", "title": "" }, { "docid": "a692e4fec0d2c8954d22920039d566f4", "score": "0.52083015", "text": "protected static function getFacadeAccessor()\n {\n return 'helper';\n }", "title": "" }, { "docid": "c8e0398bb6dfde7bb090d28f8de177ec", "score": "0.5205737", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdLink');\n }", "title": "" }, { "docid": "8be053f9564f8b076cb69c8e3d8b5b82", "score": "0.51992875", "text": "protected static function getFacadeAccessor()\n {\n return 'backend.helper';\n }", "title": "" }, { "docid": "e3d9694f7c77c5b3abc95925129c7198", "score": "0.517593", "text": "public function getLinkUrl() {\n\t\treturn ($this->linkUrl);\n\t}", "title": "" }, { "docid": "7c7bd81c2433e1d3a508590714701355", "score": "0.5172055", "text": "public function getShareUrl(): UrlInterface;", "title": "" }, { "docid": "a38b2031cd15e4ba2f5d9e52d5fab956", "score": "0.5167357", "text": "public function link()\n\t{\n\t\treturn \\IPS\\Http\\Url::internal( 'app=core&module=system&controller=upgrade&_new=1', 'admin' );\n\t}", "title": "" }, { "docid": "7d0472ca6fcfae6484626b5f698848ef", "score": "0.51653445", "text": "public function getURLsafe()\n {\n return $this->getLink();\n }", "title": "" }, { "docid": "aa22cca045f692f29d836dfdf999b0ce", "score": "0.5161946", "text": "protected function _getHelper()\n {\n return Mage::helper('ecomdev_varnish');\n }", "title": "" }, { "docid": "fcb95db3afd0f601bb40d84c0c82be93", "score": "0.5154834", "text": "public function LinkTypeHandlerName(): string;", "title": "" }, { "docid": "adb9487a3b0a72e0b9989a06620d5dc6", "score": "0.5147478", "text": "public function getSupportLink(): string\n {\n return $this->config()->get('user_help_link') ?: '';\n }", "title": "" }, { "docid": "16ed98adf757fa9f5f7f4c02287798ad", "score": "0.5146924", "text": "function get_logo_link() {\r\n return $this->options['logo_link'];\r\n }", "title": "" }, { "docid": "15ea1e112939d103b149ab8253922b04", "score": "0.51409876", "text": "public function getHelper()\n {\n return Mage::helper('klarna_core');\n }", "title": "" }, { "docid": "c58e08cb2ca00c5e4de520cb3d4a5c17", "score": "0.51302254", "text": "public static function getLinkRoot()\n {\n\n if (is_null(self::$_link_root))\n {\n self::$_link_root = Bourbon::getInstance()->getLinkRootPath();\n }\n\n return self::$_link_root;\n\n }", "title": "" } ]
4e55bc55297e2025c11689b68f735d53
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
[ { "docid": "7a219735198b6ee114aedbdea69954a2", "score": "0.0", "text": "protected function tearDown()\n {\n }", "title": "" } ]
[ { "docid": "56159d5bc288b39e842b44bf72eeae44", "score": "0.7307398", "text": "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "title": "" }, { "docid": "4adcb8c1e4e5ab934e14ad5d8d3865d2", "score": "0.723757", "text": "public function teardown()\n {\n //\n }", "title": "" }, { "docid": "d9ad9fc538af3d3bdd7811be2ed3d405", "score": "0.7221562", "text": "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}", "title": "" }, { "docid": "5c2bdfee2664be7e68f97b6de7e95353", "score": "0.71871346", "text": "public function teardown()\n {\n }", "title": "" }, { "docid": "401626bc7f7fb37d5d2ce53bd8b05016", "score": "0.7187043", "text": "public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }", "title": "" }, { "docid": "c6fe8f0b9a6040ed9d05916e4d41d9b1", "score": "0.7148762", "text": "public function _after(TestCase $test)\n {\n $this->unloadFixtures();\n }", "title": "" }, { "docid": "e8077b1e13a319c8c27f11caf3cf25dd", "score": "0.7139645", "text": "public function tearDown()\n {\n unset($this->app);\n unset($this->client);\n\n m::close();\n }", "title": "" }, { "docid": "36e857a93860cef03487ec3b9cdc8418", "score": "0.71347386", "text": "protected function tearDown(): void\n {\n self::$driver->close();\n }", "title": "" }, { "docid": "aef221f3bf0dfd24057cd20b7664879a", "score": "0.71208686", "text": "public function tearDown()\n\t{\n\t\tm::close();\n\t}", "title": "" }, { "docid": "37d2d96d928453365e06c968b354faab", "score": "0.71039623", "text": "protected function tearDown()\n {\n if ($this->databaseTester !== null) {\n if (method_exists($this, 'getTearDownOperation')) {\n $this->getDatabaseTester()->setTearDownOperation($this->getTearDownOperation());\n }\n if (method_exists($this, 'getDataSet')) {\n $this->getDatabaseTester()->setDataSet($this->getDataSet());\n }\n $this->getDatabaseTester()->onTearDown();\n }\n\n $this->databaseTester = null;\n\n set_time_limit(0);\n }", "title": "" }, { "docid": "7cd37e7592d68971db4822953f8ae390", "score": "0.70821875", "text": "public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}", "title": "" }, { "docid": "1225314acc95179496f73f17d5577b85", "score": "0.70788217", "text": "function teardown() {\n // close database connection\n $this->conn = null;\n }", "title": "" }, { "docid": "e99ce5e03a49d209ab3ad232eada55d7", "score": "0.7077813", "text": "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "title": "" }, { "docid": "e44064382e4ae1bedb54a26f7be44c80", "score": "0.7052905", "text": "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}", "title": "" }, { "docid": "2134543298c86ac691ab0b680b538d51", "score": "0.7049554", "text": "protected function tearDown(): void\n {\n $this->closeDatabase();\n }", "title": "" }, { "docid": "fd19d4ac19aa75574b00c3156e172b5f", "score": "0.703369", "text": "protected function tearDown() {\n\t\tm::close();\n\t}", "title": "" }, { "docid": "2bbd5903a7258097c7341c02b1b5516e", "score": "0.7022413", "text": "public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}", "title": "" }, { "docid": "00d75307ac08df4ba304325061bd8fa0", "score": "0.7014963", "text": "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "title": "" }, { "docid": "b895fdc2d0896e5577e6cf36371bb416", "score": "0.7001605", "text": "protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}", "title": "" }, { "docid": "8734df8f1e57c24e9cfe179ac6bd6582", "score": "0.7000849", "text": "protected function tearDown()\n {\n $this->testData = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "f6f693c21049da3269a117a0c3320709", "score": "0.69999677", "text": "protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }", "title": "" }, { "docid": "d533ba5fd7ed99faed5ecd7dda65f473", "score": "0.6991495", "text": "protected function tearDown(): void\n {\n $client = $this->getProvidedData()[0] ?? null;\n if ($client instanceof Client) {\n $this->logout($client);\n }\n }", "title": "" }, { "docid": "32613a2705d821903acac42e1f543b86", "score": "0.69906616", "text": "public function teardown()\n {\n parent::teardown();\n }", "title": "" }, { "docid": "1a781b6c85138ff7dc4f8743f566cb10", "score": "0.69816923", "text": "protected function doTearDown(): void\n {\n }", "title": "" }, { "docid": "6270c5c674b892012a9c77e390056d2d", "score": "0.69588006", "text": "protected function tearDown()\n\t{\n\t\tunset($GLOBALS['__DB__']);\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "f33055d7bdfbee56ebdaca934fe850f4", "score": "0.69572717", "text": "public function tearDownFixtures()\n {\n if (is_array($this->_fixtures)) {\n /** @var ActiveRecordFixture $object */\n foreach ($this->_fixtures as $object) {\n $object->cleanup();\n }\n }\n }", "title": "" }, { "docid": "496e985c37a705a0a01ae09663922022", "score": "0.6956713", "text": "public function teardown() {\n m::close();\n }", "title": "" }, { "docid": "a97b64ad5ba535d04c5107933f95dd85", "score": "0.69477713", "text": "protected function tearDown()\n {\n // Make sure any test entities created are deleted\n foreach ($this->testEntities as $entity)\n {\n // Second param is a 'hard' delete which actually purges the data\n $this->entityLoader->delete($entity, true);\n }\n }", "title": "" }, { "docid": "d1436a1f031692445f063438e607c93c", "score": "0.6938548", "text": "public function teardown()\n {\n m::close();\n }", "title": "" }, { "docid": "c19b8fa25bc6cd4a2c56daaf55eb510e", "score": "0.69343585", "text": "public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}", "title": "" }, { "docid": "3b592f283bcbd3c22f2ea1bb0c7b5005", "score": "0.6928654", "text": "protected function tearDown ()\n {\n $this->downTest();\n\n parent::tearDown();\n }", "title": "" }, { "docid": "15209a02d18f017b5c51db83a5bba2e0", "score": "0.69270295", "text": "public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }", "title": "" }, { "docid": "6035b9fd838e61090fd4f6c43c67046c", "score": "0.69230634", "text": "protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }", "title": "" }, { "docid": "4f3e9aaf993a16aff3977a2605af6e83", "score": "0.6918274", "text": "protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}", "title": "" }, { "docid": "70a99340f90d136c4845e94955911e3b", "score": "0.6910381", "text": "protected function tearDown()\n {\n parent::tearDown();\n\n $this->em->close();\n $this->em = null; // avoid memory leaks\n }", "title": "" }, { "docid": "9f1fc65aeaaa88d48faefd3164d17f98", "score": "0.6910038", "text": "protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}", "title": "" }, { "docid": "d80d54fb25adf0c8e342b031ec4f06bf", "score": "0.69066876", "text": "protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }", "title": "" }, { "docid": "c5238542665f0d941a8fcad3ce8d8d68", "score": "0.6900129", "text": "public function tearDown() {\n\n\t\tparent::tearDown();\n\t\tMockery::close();\n\t}", "title": "" }, { "docid": "88ed1bdc752edac4f65b3aad8c56c2e4", "score": "0.6892573", "text": "public function tearDown()\n {\n $this->stop();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68903685", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68903685", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68903685", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "9d4e7d0083c6f13c9bed0deea73ed76b", "score": "0.6889387", "text": "public function tearDown()\n {\n unset($this->helper);\n }", "title": "" }, { "docid": "f24adecaeab76d2e66f3ab15ed33517a", "score": "0.6888811", "text": "protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }", "title": "" }, { "docid": "9a5008c37d0a183acc0c9dbb3e029970", "score": "0.688303", "text": "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}", "title": "" }, { "docid": "874eef1e936932e9f7de134eb3806a3a", "score": "0.68624055", "text": "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }", "title": "" }, { "docid": "735f9dc8c48325dbf3d2deddefda2494", "score": "0.6861904", "text": "protected function tearDown()\n {\n $this->local = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.68586767", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.68586767", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.68586767", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.68586767", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.68586767", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "c5a90d5343b85a0f9fec145b5bf710ea", "score": "0.6854481", "text": "protected function tearDown() {\n $this->dbh = null;\n $this->storage = null;\n parent::tearDown ();\n }", "title": "" }, { "docid": "2a6ffb56939621e6b77eb33a444b8a8f", "score": "0.68524957", "text": "protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "d4021fba369df2cf15e65276e92bc363", "score": "0.68524784", "text": "public function tear_down()\n {\n }", "title": "" }, { "docid": "d4021fba369df2cf15e65276e92bc363", "score": "0.68524784", "text": "public function tear_down()\n {\n }", "title": "" }, { "docid": "d4021fba369df2cf15e65276e92bc363", "score": "0.68524784", "text": "public function tear_down()\n {\n }", "title": "" }, { "docid": "5163c8f256908796e29c9b3b04aa9e2c", "score": "0.6851299", "text": "public function tearDown()\n\t{\n\t\t\\Orchestra\\Core::shutdown();\n\n\t\tunset($this->user);\n\t\tunset($this->stub);\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "4a1720800d186f087f770bcfe800b143", "score": "0.6845029", "text": "public function tearDown()\n {\n unset($this->VenusFuelDepot);\n }", "title": "" }, { "docid": "bff976fafb11d5bb6f063b8ce8c5ef8e", "score": "0.6839773", "text": "protected function tearDown()\n\t{\n\t\tunset($this->_instance);\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "980d948435410966a776f9b1bcab6189", "score": "0.6838637", "text": "public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }", "title": "" }, { "docid": "2552aa22a3a9f790055c7bf2a0a27818", "score": "0.68340594", "text": "protected function tearDown()\n\t{\n\t\t$this->restoreFactoryState();\n\t}", "title": "" }, { "docid": "c1aa25b8322f97454469a63b49450bbc", "score": "0.6830291", "text": "protected function tearDown()\n {\n $this->dataCollector = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "21502dd8504e4b38e969c98cfd24c3dc", "score": "0.6828529", "text": "public function tearDown()\n {\n unset($this->app);\n unset($_SERVER['RouteManagerTest@callback']);\n m::close();\n }", "title": "" }, { "docid": "6c94d2717bbfa7fb1b88398267f8beac", "score": "0.6811771", "text": "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "title": "" }, { "docid": "5a34aadde58d8b9a84941215880f50c2", "score": "0.68116546", "text": "public function tearDown(){\n\t\t$this->container->get('doctrine')->getConnection()->close();\n\t\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "79f334574ee277361de4408032faa779", "score": "0.6807443", "text": "protected function tearDown()\n {\n unset($this->app);\n\n m::close();\n }", "title": "" }, { "docid": "fb23b7e4e8d34f15f847d03666a8b921", "score": "0.6806736", "text": "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "title": "" }, { "docid": "2012848d399fcb383f3fc9dccd2e93b5", "score": "0.68061084", "text": "public function tearDown()\n {\n if (null !== $this->ldap) {\n $this->ldap->unbind();\n }\n }", "title": "" }, { "docid": "5934a55af7a0a0fcda68c30aab02c30d", "score": "0.6803521", "text": "public function tearDown()\n {\n $this->deleteAdminUserFixture();\n }", "title": "" }, { "docid": "0c02a8f901be42738292281cb789324c", "score": "0.6801052", "text": "public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }", "title": "" }, { "docid": "abfaf90883ec934af3b2c5b96de8eaa0", "score": "0.67933655", "text": "public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }", "title": "" }, { "docid": "29955288abd901fecdb857aeec649672", "score": "0.67910033", "text": "protected function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t\tFragseizeObj::release( $this->uid );\n\t}", "title": "" }, { "docid": "6c0bb1f7a77c8a5b19a36608e47c505b", "score": "0.6788307", "text": "protected function tearDown()\n {\n $this->client = null;\n }", "title": "" }, { "docid": "be633003dc82732f9cd7304a1ace034f", "score": "0.6779284", "text": "public function tearDown() \n {\n $this->flushSession();\n \n $this->inactiveUser->delete();\n $this->basicUser->delete();\n $this->contactManager->delete();\n $this->projectManager->delete();\n $this->administrator->delete();\n\n parent::tearDown();\n Mockery::close();\n }", "title": "" }, { "docid": "bda91f35c35bc06cff62589523dc161d", "score": "0.67742056", "text": "public function tearDown() {\n // tests using these functions.\n \\mod_forum\\subscriptions::reset_forum_cache();\n\n $this->messagesink->clear();\n $this->messagesink->close();\n unset($this->messagesink);\n\n $this->mailsink->clear();\n $this->mailsink->close();\n unset($this->mailsink);\n }", "title": "" }, { "docid": "a8e085ae436759b64d3a932ea94e2677", "score": "0.6770329", "text": "public function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\t$this->databaseTester = NULL;\n\t}", "title": "" }, { "docid": "e041fdc591627a19f53d80a5aad5649a", "score": "0.67695636", "text": "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "title": "" }, { "docid": "490359b8c16db12438a3e846bcb77fb1", "score": "0.67677677", "text": "protected function tearDown()\n {\n $this->helper = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "01945143f0ffc50e99a14b3e09ac0b0a", "score": "0.6767244", "text": "public function tearDown()\n {\n $this->client = null;\n }", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.6761685", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "8f86913bd7b07e4f1fd293694b33832a", "score": "0.676019", "text": "protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}", "title": "" }, { "docid": "ce1748c9174b8a3442500deff6bdb86f", "score": "0.6758877", "text": "public static function tearDownAfterClass(): void\n {\n if (file_exists(static::$ou)) {\n unlink(static::$ou);\n }\n }", "title": "" }, { "docid": "c28ad8841eb4dd293742837f891be5ed", "score": "0.6758512", "text": "protected function tearDown()\r\n {\r\n $application = new Application(self::$kernel);\r\n $application->setAutoExit(false);\r\n\r\n $options = array('command' => 'doctrine:database:drop', '--force' => true);\r\n $application->run(new ArrayInput($options));\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }", "title": "" }, { "docid": "cd5f9feafe6d80016f142ebef05facf4", "score": "0.6755106", "text": "protected function tearDown()\n {\n parent::tearDown();\n if (!is_null($this->em)) {\n $this->em->getConnection()->close();\n }\n }", "title": "" }, { "docid": "5710162ed76cef0881fc259b9b5818d6", "score": "0.6755051", "text": "protected function tearDown()\n {\n $this->deleteTemporaryFiles();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.675388", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "b04000f2c97ef475b92157fbbaeb49ce", "score": "0.6751072", "text": "public function tearDown()\n {\n Resistance::reset();\n }", "title": "" }, { "docid": "51479658bc0e00a4ff9e8d8f6d8f967c", "score": "0.6749321", "text": "protected function tearDown()\n {\n $this->clock = NULL;\n }", "title": "" }, { "docid": "364aa715e55f051b6ac1ce192a2c5561", "score": "0.67490673", "text": "public function tearDown()\n\t{\n\t\tMockery::close();\n\t}", "title": "" }, { "docid": "3d49f108dece55be147660ef6ce81e7b", "score": "0.67474246", "text": "protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}", "title": "" } ]
de51017a69320270b99384429d11f5d7
Returns a Markdown Parser instance
[ { "docid": "154bda88be0339c105ff7e60d702331a", "score": "0.63653064", "text": "public static function getParserInstance()\n {\n static $parser;\n static $class = __CLASS__;\n\n // get parser instance\n if (!($parser instanceof $class))\n {\n $parser = new $class;\n }\n \n return $parser;\n }", "title": "" } ]
[ { "docid": "752bd6bc0c10e08dc2f43f9040e61362", "score": "0.68680084", "text": "public function markdown(): Markdown;", "title": "" }, { "docid": "812bb6876ecc9efcadc324c1c4fbad96", "score": "0.66095597", "text": "public function testMarkdownParserCanBeCreated()\n {\n $m = new MarkdownParser;\n }", "title": "" }, { "docid": "71b1a775aee00b146a3bf9812128b300", "score": "0.6564738", "text": "public function createParser(): Parser;", "title": "" }, { "docid": "3fcbd50fc33a0240f19ba2d05ee92497", "score": "0.65515584", "text": "public function markdown(array $options = [])\n {\n return new static(Text::markdown($this->value, $options));\n }", "title": "" }, { "docid": "07fdba30a0917b0f399100c9ad17bc37", "score": "0.65494984", "text": "private function getParser()\n {\n if (!isset($this->parser)) {\n $this->parser = new Parser(new Lexer);\n }\n\n return $this->parser;\n }", "title": "" }, { "docid": "7f26a5f4246804f1b7ada3182d4d6dc6", "score": "0.6507762", "text": "public static function PHPMarkdown($text) { \n if(!self::$instance) {\n require_once(__DIR__.'/PHP Markdown Extra 1.2.6/markdown.php');\n self::$instance = Markdown($text);\n\n }\n return self::$instance;\n\n }", "title": "" }, { "docid": "283d6de53e4f130e5a5247149e570ebb", "score": "0.6471357", "text": "public function parser()\n {\n return $this->parser;\n }", "title": "" }, { "docid": "459367b04ce4ed512d1fc6f4a3941b8c", "score": "0.6426376", "text": "public function getParserFactory();", "title": "" }, { "docid": "0ae4db3d5199bda7eaa615cd9c2827c3", "score": "0.63457185", "text": "public static function parseMarkdown($str)\n\t{\n\t\tif (!class_exists('\\Markdown_Parser', false))\n\t\t{\n\t\t\trequire_once craft()->path->getFrameworkPath().'vendors/markdown/markdown.php';\n\t\t}\n\n\t\t$md = new \\Markdown_Parser();\n\t\treturn $md->transform($str);\n\t}", "title": "" }, { "docid": "a1ba61bc477c137ab0645d3b5840af73", "score": "0.63416433", "text": "public function getParser()\n\t{\n\t\treturn $this->parser;\n\t}", "title": "" }, { "docid": "074e72a3d7e2dcb10983cd78f2aa5fb5", "score": "0.6327258", "text": "public function getParser()\n {\n return $this->parser;\n }", "title": "" }, { "docid": "074e72a3d7e2dcb10983cd78f2aa5fb5", "score": "0.6327258", "text": "public function getParser()\n {\n return $this->parser;\n }", "title": "" }, { "docid": "e53da27ee088b42c195debe7e3ffffb7", "score": "0.6266373", "text": "public function getParser()\n {\n return $this->_parser;\n }", "title": "" }, { "docid": "0e13b4a031e55a6e18c09d9bd5671aeb", "score": "0.6220002", "text": "public function getMarkdown()\n {\n return $this->markdown;\n }", "title": "" }, { "docid": "a7d40ca7a0fe8bb5eb24a6c581e40596", "score": "0.61387616", "text": "public function getParser()\n {\n if (!$this->parser) {\n $this->parser = new \\Application\\Service\\Syntax\\Parser();\n }\n\n return $this->parser;\n }", "title": "" }, { "docid": "3733b3929a211928e1087b2c10c9e913", "score": "0.61386997", "text": "function getParser()\n {\n return $this->_parser;\n }", "title": "" }, { "docid": "ee67d71cf075fc34d92353f795a823a7", "score": "0.6129133", "text": "public static function readMarkdown($text)\n {\n $markupText = $text;\n $matchesCount = preg_match_all('#\\[(?P<title>.+)\\]\\((?P<link>.+)\\)#isU', $markupText, $linkMatches, PREG_SET_ORDER); // Links\n\n // Remove all links from the text before checking for other markups if there are links present\n // This is done because, if there are underscores in the links' titles or URLs, they may be mistaken for markup \n if($matchesCount > 0) {\n $links = array_column($linkMatches, 0);\n $linkTitles = array_column($linkMatches, 'title');\n $markupText = str_replace($links, $linkTitles, $markupText);\n }\n \n $matchesCount += preg_match_all('#(?P<markup>[*_]{1,2})(?P<content>[^*_]+)\\1#isU', $markupText, $markupMatches, PREG_SET_ORDER); // Bold/Italics\n\n if($matchesCount == 0)\n return null;\n \n return new MarkdownExpression($text, $linkMatches, $markupMatches);\n }", "title": "" }, { "docid": "70047f35810f8e4e6905ff5236b42696", "score": "0.60862315", "text": "protected function convertMarkdown($s) {\n\t include_once(Director::baseFolder() . \"/agilezen/thirdparty/PHP Markdown Extra 1.2.4/markdown.php\");\n\t return Markdown($s);\n\t}", "title": "" }, { "docid": "5ac06843778e75b18f26cb04d9f4b911", "score": "0.60711104", "text": "public static function getInstance()\n {\n if (null === self::$instance) {\n self::$instance = new Parser(new Emulative(), []);\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "b8aae3a643cbfa5eb793309462b2d0dd", "score": "0.5975816", "text": "public function inlineMarkdown(array $options = [])\n {\n return new static(Text::inlineMarkdown($this->value, $options));\n }", "title": "" }, { "docid": "aca1c6bbd8555984fe8ef51196db0b49", "score": "0.5975426", "text": "public function htmlToMarkdown($html);", "title": "" }, { "docid": "ad0c465cdb5781f71c735126dc448f66", "score": "0.58694226", "text": "public function checkMarkdownParser()\n\t{\n\t}", "title": "" }, { "docid": "d1eb3ee9de21f31cfb5016bb22f1b106", "score": "0.5862041", "text": "public function getDefaultParserFactory();", "title": "" }, { "docid": "8aeff51d44f273ae81ee7df5fdc065da", "score": "0.5790248", "text": "public function parse(Twig_Token $token)\n {\n $lineNo = $token->getLine();\n\n $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);\n $value = $this->parser->subparse(array($this, 'decideMarkdownEnd'), true);\n $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);\n\n return new TwigMarkdownNode($value, $lineNo, $this->getTag());\n }", "title": "" }, { "docid": "da922682a15d06a87762ce3673f44952", "score": "0.57817715", "text": "public function getInstance()\n {\n if (!$this->parserInstance) {\n\n $this->parserInstance = new Engine($this->parserOptions);\n }\n\n return $this->parserInstance;\n }", "title": "" }, { "docid": "4903036b67e39a29ca2fc477a57d71a4", "score": "0.57793796", "text": "protected abstract function newParser();", "title": "" }, { "docid": "1d5be15f8f2605475d147a4f77cde0f2", "score": "0.5756359", "text": "public function parse($data) {\n\t\treturn MarkdownExtra::defaultTransform($data);\n\t}", "title": "" }, { "docid": "aaefaf35320cc53c1077570e9e136711", "score": "0.5745314", "text": "protected function getParserService()\n {\n $class = $this->getParameter('parser.class');\n $instance = new $class($this->getI18nService());\n\n return $instance;\n }", "title": "" }, { "docid": "26a97b9a64e6396449ac20d4ff4ea40e", "score": "0.57421345", "text": "private function __markdown($string){\n\t\treturn Markdown::parse($string)->toHtml();\n\t}", "title": "" }, { "docid": "4472a20e2bbd66811f2f625f9f80948b", "score": "0.57262623", "text": "public function getCssExpressionParser()\r\n {\r\n if(null === $this->cssExpressionParser)\r\n {\r\n require_once(dirname(__FILE__).'/parser/phpHtmlWriterCssExpressionParser.php');\r\n $this->cssExpressionParser = new phpHtmlWriterCssExpressionParser();\r\n }\r\n\r\n return $this->cssExpressionParser;\r\n }", "title": "" }, { "docid": "dc1e6f6e773eea06ee61848664a142d3", "score": "0.57221925", "text": "function markdown(string $input)\n {\n return '<article class=\"markdown\" v-pre>' . (new ParsedownExtra)->text($input) . '</article>';\n }", "title": "" }, { "docid": "222f942d4671ebc7e5124ad440c65753", "score": "0.57207614", "text": "private function _format_markdown($input) {\n\t\t$pf = new Packages();\n\t\tif ($pf->ImportPackage('Markdown')) {\n\t\t\treturn Markdown($input);\n\t\t}\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "f41ea042fb3154bf785431d63108fb34", "score": "0.57116234", "text": "public function name()\n {\n return 'markdown';\n }", "title": "" }, { "docid": "ffe04fac9a1cc839a2898645c2e0c6d7", "score": "0.56969845", "text": "public function getKyniemContentMarkdownAttribute() {\n $this->kyniem_content = Backgroud::filter($this->kyniem_content);\n $this->kyniem_content = CommonLib::filterSmile($this->kyniem_content);\n $this->kyniem_content = CommonLib::replaceTag($this->kyniem_content);\n\n return Markdown::defaultTransform($this->kyniem_content);\n }", "title": "" }, { "docid": "59f0ffddf9eaebaafdd3b1ed45940e98", "score": "0.56938213", "text": "protected function _getContentParser()\n {\n if (null === $this->_contentParser) {\n $this->_contentParser = new SetaPDF_Core_Parser_Content($this->_stream);\n $this->_contentParser->registerOperator(array('Tj', 'TJ', '\"', \"'\"), array($this, '_onTextFound'));\n $this->_contentParser->registerOperator('Do', array($this, '_onFormXObject'));\n }\n\n return $this->_contentParser;\n }", "title": "" }, { "docid": "a5e6de4c7e0d70442f19b62dfa4dd8ad", "score": "0.56760585", "text": "public function getParser(): ParserInterface\n {\n }", "title": "" }, { "docid": "77b5088b8156001dec7f0c98243fa40a", "score": "0.567535", "text": "public function getTag()\n {\n return 'markdown';\n }", "title": "" }, { "docid": "0324d57d4796c65c1335a61814a636c9", "score": "0.5661049", "text": "public static function convertWithMarkdown($text)\n {\n if (empty($text)) {\n return $text;\n }\n\n return (new TagMarkdownParser())->parse(static::convert($text));\n }", "title": "" }, { "docid": "b2c652a1a4d017ef3378997f5c7b8870", "score": "0.56567717", "text": "public static function markdown($content) {\n\t\t$content = \\Michelf\\MarkdownExtra::defaultTransform($content);\n\n\t\t// change table formatting\n\t\t$content = str_replace('<table>', '<table class=\"table table-striped table-condensed\">', $content);\n\n\t\t// add syntax highlighter\n\t\t$content = preg_replace('|<pre><code class=\"([a-z]+?)\">|s', '<pre><code class=\"language-$1\">', $content);\n\n\t\t// auto link classes\n\t\t$content = preg_replace_callback('|(.\\\\\\\\[A-Z][\\\\\\\\A-Za-z0-9_]+)|s', function($match){\n\t\t\tif($match[0]{0} === '\\\\'){\n\t\t\t\treturn substr($match[0], 1);\n\t\t\t}\n\t\t\t$url = Factory::load('Url')->create('class/');\n\t\t\t$url .= str_replace('\\\\', '/', $match[0]);\n\n\t\t\treturn '<a href=\"'.$url.'\">'.$match[0].'</a>';\n\t\t}, $content);\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "44d2154616d82c270a5acbea9ae06a46", "score": "0.56485337", "text": "public function __construct(MarkdownParser $markdownParser)\n {\n $this->markdownParser = $markdownParser;\n }", "title": "" }, { "docid": "ca483148918ae7712688a3dd3f406038", "score": "0.56331664", "text": "public function parse($markdown)\n {\n $document = $this->parser->parse($markdown);\n $html = $this->renderer->renderBlock($document);\n\n return $html;\n }", "title": "" }, { "docid": "806f3107d4a50b908a41f2d431c145f6", "score": "0.55922997", "text": "public function parse($data) {\n\t\t$sundown = new \\Sundown\\Markdown(\\Sundown\\Render\\HTML, $this->config);\n\t\treturn $sundown->render($data);\n\t}", "title": "" }, { "docid": "6d87d8143994476cf5f7dd7cfdddc37b", "score": "0.55770755", "text": "public function markdown($text)\n {\n $mdExtra = new \\Michelf\\MarkdownExtra();\n return $mdExtra::defaultTransform($text);\n }", "title": "" }, { "docid": "4c17e92cf4b113b5afc452434ab09df2", "score": "0.55548894", "text": "public function createParse(): BpmnParse\n {\n return $this->bpmnParseFactory->createBpmnParse($this);\n }", "title": "" }, { "docid": "02368aaa57d9043b3e432d60eb1e2aae", "score": "0.5544712", "text": "public function MultiMarkdown() {\n $text = $this->text;\n $s = array( '&gt;', '&lt;' );\n $r = array( '>', '<' );\n $text = str_replace($s, $r, $text);\n $astr = array(\n \"<:vspace>\" => \"\\n\\n\",\n \"(:nl:)\" => \"\\n\",\n );\n $text = str_replace(array_keys($astr), $astr, $text);\n\n // Apply markup that we can't do with MMD\n\n // visble linebreaks \\\\, convert to MMD double-space linebreak\n $text = preg_replace('/\\s*\\\\\\\\\\\\\\\\\\s*\\n/', \" \\n\", $text);\n // parse wiki links [[...]]\n $text = preg_replace('/(\\[\\[\\s*(.*?)\\]\\])/e', '$this->onlylink(MarkupToHTML($pagename, \"$1\"))', $text);\n\n $this->writeTempFile($text);\n\n $bin = $this->myFarmD.\"/pub/cgi/multimarkdown\";\n exec($bin.\" \".$this->options['cli_options'].\" --output=\\\"$this->tempFilePath.html\\\" \\\"$this->tempFilePath\\\"\", $output, $retval);\n if ($retval != 0) return \"<p>Error! MultiMarkdown conversion returned $retval :</p><pre>\".implode(\"\\n\", $output).\"</pre>\";\n\n $html = file_get_contents(\"$this->tempFilePath.html\");\n\n // Post-MMD tidy-up\n $pstr = array( \"/&amp;(.*?);/\" => \"&\\\\1;\", );\n $text = preg_replace(array_keys($pstr), $pstr, $text);\n\n // Append the mdID to footnote anchors\n $matches = array();\n $c = preg_match_all('/([\\'\"]*#*fn[a-z]*:[0-9]+)[\\'\"]/i', $html, $matches, PREG_SET_ORDER);\n if ($c !== false && $c > 0) {\n foreach ($matches as $m) {\n $html = str_replace($m[1], $m[1].\"-md$this->mdID\", $html);\n }\n }\n\n return Keep($html);\n }", "title": "" }, { "docid": "6382f3916eeb8015d400c9e99f7527e2", "score": "0.5528784", "text": "protected function getParser(): RecursiveParser\n\t{\n\t\tif (!isset($this->parser))\n\t\t{\n\t\t\t$this->parser = $this->getDefaultParser();\n\t\t}\n\n\t\treturn $this->parser;\n\t}", "title": "" }, { "docid": "d4607d24be1b15273d95baac2ba12030", "score": "0.54751366", "text": "public function create($name) {\n if (!isset($this->engines[$name])) {\n throw new \\InvalidArgumentException(\"Unknown template engine type: '{$name}'.\");\n }\n $engineClass = $this->engines[$name];\n $engineInstance = $this->objectManager->create($engineClass);\n if (!$engineInstance instanceof MarkdownEngineInterface) {\n throw new \\UnexpectedValueException(\"{$engineClass} has to implement the markdown engine interface.\");\n }\n return $engineInstance;\n }", "title": "" }, { "docid": "6b481a9657d725e1cf4c8a02d8f3b963", "score": "0.543997", "text": "protected function getDefaultParser()\n\t{\n\t\t$parser = new RecursiveParser;\n\t\t$matchers = [];\n\t\t$matchers[] = new SingleByteStringFunctions($parser);\n\t\t$matchers[] = new BooleanFunctions($parser);\n\t\t$matchers[] = new BooleanOperators($parser);\n\t\t$matchers[] = new Comparisons($parser);\n\t\t$matchers[] = new Core($parser);\n\t\t$matchers[] = new Math($parser);\n\t\tif (!empty($this->features['mbstring']))\n\t\t{\n\t\t\t$matchers[] = new MultiByteStringManipulation($parser);\n\t\t}\n\t\t$matchers[] = new SingleByteStringManipulation($parser);\n\t\tif (!empty($this->features['php80']))\n\t\t{\n\t\t\t$matchers[] = new PHP80Functions($parser);\n\t\t}\n\n\t\t$parser->setMatchers($matchers);\n\n\t\treturn $parser;\n\t}", "title": "" }, { "docid": "f51f416b0a967591d1640c238d87e52b", "score": "0.5428473", "text": "public function parseMarkdown($content)\n\t{\n\t\t$content = $this->_filterTypography($content);\n\n\t\t/** @noinspection PhpParamsInspection */\n\t\t$html = parent::parseMarkdown($content);\n\t\t$html = preg_replace('{(/download/[0-9a-v]{2}/[0-9a-v]{32}\\\\.[a-z0-9]+\"\\\\s+)title=\"([^\"]+)\"}', '$1download=\"$2\"', $html);\n\t\t$html = preg_replace('{<a\\\\s+href=\"([^#/])}', '<a rel=\"nofollow\" target=\"_blank\" href=\"$1', $html);\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "d3ef3bf207581feb76269c945537f046", "score": "0.5427015", "text": "public function htmlToMarkdown($html)\n {\n $converterClass = $this->converterClass;\n\n return $class::htmlToMarkdown($html);\n }", "title": "" }, { "docid": "ce3f23f11fac4be1efb791c477539a38", "score": "0.5395353", "text": "function markdownify($str) {\n\t$ci =& get_instance();\n\t$ci->load->library('markup'); \n\treturn $ci->markup->translate($str);\n}", "title": "" }, { "docid": "f362dff015f3f0b36bf0f69a51e91d99", "score": "0.5381542", "text": "public function parser($name)\n {\n $this->parser = $name;\n\n return $this;\n }", "title": "" }, { "docid": "17401a20ef15207b4737000e82090c7d", "score": "0.53779095", "text": "static function convertMarkdown( &$content ) {\n include_once( __DIR__ . '/../../../vendor/PHPMarkdownExtra/markdown.php' );\n $content = Markdown( $content );\n }", "title": "" }, { "docid": "788be7c3cba1a8abd94fd1eeefa00a01", "score": "0.537353", "text": "protected function registerMarkdown()\n {\n $this->app->singleton('markdown', function (Container $app) {\n $environment = $app['markdown.environment'];\n $docParser = new DocParser($environment);\n $htmlRenderer = new HtmlRenderer($environment);\n\n return new Converter($docParser, $htmlRenderer);\n });\n\n $this->app->alias('markdown', Converter::class);\n }", "title": "" }, { "docid": "38b75e269433abebd8023bc937122456", "score": "0.536884", "text": "protected static function getFacadeAccessor()\n {\n return 'markdown';\n }", "title": "" }, { "docid": "e4a016cb76cf0cb1e38ad31a666d930e", "score": "0.53605026", "text": "public function getMarkDownManager(){\n\n if($this->_markDownManager === null){\n\n $this->_markDownManager = new MarkDownManager();\n }\n\n return $this->_markDownManager;\n }", "title": "" }, { "docid": "67d89a8ad28e11265a0518d4551b12ae", "score": "0.53590006", "text": "protected static function getParser( Element $container ): CommentParser {\n\t\treturn CommentParser::newFromGlobalState( $container );\n\t}", "title": "" }, { "docid": "48e4a1cfe46002e8c136926428957554", "score": "0.5323485", "text": "public static function translateMarkdownToHTML($string, $options = array())\n {\n $options['convert_entities'] = key_exists('convert_entities', $options) ? $options['convert_entities'] : false;\n $string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');\n\n if($options['convert_entities'])\n {\n $string = htmlentities($string, ENT_QUOTES, 'UTF-8');\n }\n\n $lines = explode(\"\\n\", $string);\n $incode = false;\n $string = '';\n \n foreach ($lines as $line)\n {\n if ($incode)\n {\n $line = ' '.html_entity_decode($line, ENT_QUOTES, 'UTF-8');\n }\n if (preg_match('/^\\s*\\[code\\s*([^\\]]*?)\\]/', $line, $match))\n {\n $incode = true;\n $line = $match[1] ? \"\\n\\n [\".$match[1].\"]\" : \"\\n\\n\";\n }\n if (strpos($line, '[/code]') !== false)\n {\n $incode = false;\n $line = ' ';\n }\n\n $string .= $line.\"\\n\";\n }\n\n $html = self::doConvert($string);\n $html = preg_replace('/<pre><code>\\$ /s', '<pre class=\"command-line\"><code>$ ', $html);\n $html = preg_replace('#<pre><code>http\\://#s', '<pre class=\"url\"><code>http://', $html);\n $html = preg_replace_callback('#<pre><code>(.+?)</code></pre>#s', array('rtMarkdownToolkit', 'geshiHighlighter'), $html);\n $html = str_replace('&nbsp;</pre>', '</pre>', $html);\n return $html;\n }", "title": "" }, { "docid": "1df2730e5542b8f064867b072a1ddea3", "score": "0.53183794", "text": "function get_markdown_content() {\n $post_id = $object['id'];\n\n $converter = new HtmlConverter(array('strip_tags' => true));\n\n // get the raw data\n $post_data = get_post( $post_id );\n\n // apply wordpress renderers\n $rendered_content = apply_filters('the_content', $post_data->post_content);\n $rendered_title = apply_filters('the_title', $post_data->post_title);\n\n // create array of converted HTML\n $markdown_fields = array(\n 'content' => $converter->convert($rendered_content),\n 'title' => $converter->convert($rendered_title),\n );\n\n return $markdown_fields;\n}", "title": "" }, { "docid": "52e5a49d6a9c979cec78af3c7fe5d536", "score": "0.5316286", "text": "function acf_parse_markdown( $text = '' ) {\n\n\t// trim\n\t$text = trim( $text );\n\n\t// rules\n\t$rules = array(\n\t\t'/=== (.+?) ===/' => '<h2>$1</h2>', // headings\n\t\t'/== (.+?) ==/' => '<h3>$1</h3>', // headings\n\t\t'/= (.+?) =/' => '<h4>$1</h4>', // headings\n\t\t'/\\[([^\\[]+)\\]\\(([^\\)]+)\\)/' => '<a href=\"$2\">$1</a>', // links\n\t\t'/(\\*\\*)(.*?)\\1/' => '<strong>$2</strong>', // bold\n\t\t'/(\\*)(.*?)\\1/' => '<em>$2</em>', // intalic\n\t\t'/`(.*?)`/' => '<code>$1</code>', // inline code\n\t\t'/\\n\\*(.*)/' => \"\\n<ul>\\n\\t<li>$1</li>\\n</ul>\", // ul lists\n\t\t'/\\n[0-9]+\\.(.*)/' => \"\\n<ol>\\n\\t<li>$1</li>\\n</ol>\", // ol lists\n\t\t'/<\\/ul>\\s?<ul>/' => '', // fix extra ul\n\t\t'/<\\/ol>\\s?<ol>/' => '', // fix extra ol\n\t);\n\tforeach ( $rules as $k => $v ) {\n\t\t$text = preg_replace( $k, $v, $text );\n\t}\n\n\t// autop\n\t$text = wpautop( $text );\n\n\t// return\n\treturn $text;\n}", "title": "" }, { "docid": "5f91bca6893a3bed5ded1a6b7ce079f9", "score": "0.53087413", "text": "public function markdown(array $options = [])\n {\n }", "title": "" }, { "docid": "4bd17e35ab541db6d63b6fd2abc30834", "score": "0.53077036", "text": "public function makeParser($filePath = null)\n {\n $parser = m::mock($this->getParserClassPath(), [$filePath])->makePartial();\n $parser->setFile(new Filesystem());\n\n return $parser;\n }", "title": "" }, { "docid": "e35a5ccd94d8aeffd8e5fc1fe6e2b0a2", "score": "0.5289918", "text": "static function factory($type)\n\t{\n\t\t$class = 'Mpd_Parser_' . ucfirst($type);\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "c48120b507309c7ce691e5899dadf01a", "score": "0.5264023", "text": "public function parser(?string $driver = null): Parser;", "title": "" }, { "docid": "78940e1cbef2a59f0e20cdecb074bb08", "score": "0.52595836", "text": "protected function newParser($driver)\n {\n $class = 'Aura\\Sql\\Parser\\\\' . ucfirst($driver) . 'Parser';\n if (! class_exists($class)) {\n $class = 'Aura\\Sql\\Parser\\SqliteParser';\n }\n return new $class();\n }", "title": "" }, { "docid": "6345ae6f1c5c6893bf2192fe3d69bc2a", "score": "0.5243233", "text": "protected function type(): string\n {\n return 'markdown';\n }", "title": "" }, { "docid": "ed2dba1c443a2aaf5161266e58b86560", "score": "0.5215185", "text": "function markdown_file($filename) {\n\t\trequire_once(\"helpers/bower_components/php-markdown/Michelf/Markdown.php\");\n\t\t$filepath = \"content/pages/\".$filename;\n\t\tif (file_exists($filepath) && is_readable ($filepath)) {\n\t\t\t$theMarkdown = file_get_contents($filepath);\n\t\t\t$theHtml = Markdown::defaultTransform($theMarkdown);\n\t\t\treturn $theHtml;\n\t\t}\n}", "title": "" }, { "docid": "73920a062fc2eadf723354d226512b6a", "score": "0.5196282", "text": "public function testCompleteMarkdownCanBeParsed()\n {\n $m = new MarkdownParser;\n\n $input = 'The **quick** brown [fox](jumped) over the ![lazy](dog).';\n $expected = 'The <strong>quick</strong> brown <a href=\"jumped\">fox</a>'.\n ' over the <img src=\"dog\" alt=\"lazy\" />.';\n $r = $m->parse($input);\n $this->assertEquals($expected, $r);\n }", "title": "" }, { "docid": "d8dc7b1e779709a4503133f989f4f987", "score": "0.5170127", "text": "function htmlParser() {\n\t $dummy = NULL;\n\t\t$this->RootNode =& new htmlNode($dummy);\n\t}", "title": "" }, { "docid": "6692d73e815ecb81f06f06c4def680dd", "score": "0.51439506", "text": "public static function factory($driver = NULL, $config = NULL)\n\t{\n\t\treturn new Editor($driver, $config);\n\t}", "title": "" }, { "docid": "bedb7f0255db9527ede5c65fe6ae4932", "score": "0.51322967", "text": "public static final function getInstance(array $attarrData = array()) \r\n\t{\r\n\t\t$_parser = new \\Core\\Util\\Parser\\Parser();\r\n\t\t$_parser->setData($attarrData);\r\n\t\t\r\n\t\treturn $_parser;\r\n\t}", "title": "" }, { "docid": "7bc4f8e04bff99305aeb405a839d6ad4", "score": "0.51093405", "text": "protected function newParser()\n {\n $parser = @xml_parser_create_ns(null, ' ');\n\n if (is_resource($parser)) {\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);\n\n xml_set_object($parser, $this);\n xml_set_element_handler($parser, 'startHandler', 'endHandler');\n xml_set_character_data_handler($parser, 'cDataHandler');\n xml_set_external_entity_ref_handler($parser, 'extEntityHandler');\n xml_set_processing_instruction_handler($parser, 'piHandler');\n }\n\n return $parser;\n }", "title": "" }, { "docid": "661f2c615ca74b0b442378c2d6ab29a6", "score": "0.51041913", "text": "public function __construct(Repository $config)\n\t{\n\t\t// choosing the instance to use~\n\t\tif ($config->get(\"markdown::extra\", true)) {\n\t\t\t$this->instance = new MarkdownExtra;\n\t\t} else {\n\t\t\t$this->instance = new Markdown;\n\t\t}\n\n\t\t$this->instance->camo_host = $config->get(\"radio.camo.host\", \"http://localhost:8081/\");\n\t\t$this->instance->camo_key = $config->get(\"radio.camo.key\", \"0x24FEEDFACEDEADBEEFCAFE\");\n\n\t\t$this->instance->empty_element_suffix = \">\";\n\t\t$this->instance->no_markup = $config->get(\"markdown::safe\", false);\n\n\t\t$this->purifier_config = HTMLPurifier_Config::createDefault();\n\t\t$this->purifier_config->set(\"Cache.DefinitionImpl\", null);\n\t\t$this->purifier_config->set(\"HTML.Doctype\", $config->get(\"markdown::purifier.doctype\", \"HTML 4.01 Transitional\"));\n\n\t\tforeach ($config->get(\"markdown::purifier.custom\", [])\n\t\t\tas $namespace => $value)\n\t\t{\n\n\t\t\t$this->setPurifierConfig($namespace, $value);\n\t\t}\n\n\t\t$this->purifier_enabled = $config->get(\"markdown::purifier.enabled\", false);\n\t\t$this->purifier = new HTMLPurifier($this->purifier_config);\n\n\t}", "title": "" }, { "docid": "58cc4eff9e01d638b580a6e68f96ee0e", "score": "0.5101208", "text": "protected function getTextReparser_ForumDescriptionService()\n {\n $this->services['text_reparser.forum_description'] = $instance = new \\phpbb\\textreparser\\plugins\\forum_description($this->get('dbal.conn'), 'phpbb_forums');\n\n $instance->set_name('forum_description');\n\n return $instance;\n }", "title": "" }, { "docid": "4a67fb80d13b725aaf45c93f71a55220", "score": "0.50964797", "text": "public function getAttributeStringParser()\r\n {\r\n if(null === $this->attributeStringParser)\r\n {\r\n require_once(dirname(__FILE__).'/parser/phpHtmlWriterAttributeStringParser.php');\r\n $this->attributeStringParser = new phpHtmlWriterAttributeStringParser();\r\n }\r\n\r\n return $this->attributeStringParser;\r\n }", "title": "" }, { "docid": "12bca2915fb83a25cbac1767cc6caf91", "score": "0.5087667", "text": "public function markdownToHtml($markdown);", "title": "" }, { "docid": "d20e9ed3d8585174ebe6ff8c570a8446", "score": "0.5078278", "text": "public static function parseMarkdown($content, $fix_punctuation = true)\n {\n if (!is_string($content)) return null;\n\n $content = MarkdownExtra::defaultTransform(do_shortcode($content));\n\n if ($fix_punctuation)\n $content = self::fixPunctuation($content);\n\n return $content;\n }", "title": "" }, { "docid": "f7fc11ce7199993b17b8f09a2192bb37", "score": "0.5077049", "text": "public abstract function getParse($dom);", "title": "" }, { "docid": "a5aaeeb4cd2c0fd92407c3ddd9200e79", "score": "0.5069661", "text": "public function setParserFactory(ParserFactory $factory);", "title": "" }, { "docid": "5fbccd2a9712fc93e0fe145332fd7887", "score": "0.5060105", "text": "protected function getDOMDocument()\n {\n $source = new DOMDocument();\n $source->loadHTMLFile($this->path);\n\n return $this->selector\n ? $this->fragment($source, $this->selector)\n : $source;\n }", "title": "" }, { "docid": "2857d9203a508b9c3469f960ccd6b94f", "score": "0.50489163", "text": "function parsehtml($expression)\n {\n return app('parsehtml')->convert($expression);\n }", "title": "" }, { "docid": "44e8a8b5cfc5f3e5fc33c75729d18515", "score": "0.5025908", "text": "public function getEsParse()\r\n {\r\n $esVersion = $this->config['version'] ?? '';\r\n\r\n return new EsParser($esVersion);\r\n }", "title": "" }, { "docid": "3fc915e56ee5b596703dae069dadc512", "score": "0.500184", "text": "public function parseMarkup()\n {\n $extension = strtolower(File::extension($this->fileName));\n\n switch ($extension) {\n case 'txt':\n $result = htmlspecialchars($this->markup);\n break;\n case 'md':\n $result = Markdown::parse($this->markup)->toHtml();\n break;\n default:\n $result = $this->markup;\n }\n\n return $result;\n }", "title": "" }, { "docid": "0604b65d7bd39a2b1a9e52d7f2ebb6c6", "score": "0.4995003", "text": "public static function parse()\n {\n self::$content = self::getContentForParsing();\n\n \\phpQuery::newDocument(self::$content);\n\n foreach(pq('article.box') as $key => $value) {\n self::$pq = pq($value);\n\n self::$parsedContent[$key] = [\n 'link' => self::$pq ->find(' > .article-link')->attr('href'),\n 'title' => self::$pq ->find(' > .post-text > .post-title > .entry-title')->text(),\n ];\n }\n\n \\phpQuery::unloadDocuments();\n\n return self::$parsedContent;\n\n }", "title": "" }, { "docid": "c3495721c035030f9c470c06d39cc831", "score": "0.499302", "text": "public function parse()\n {\n if (func_num_args() == 0) {\n return $this->getParse();\n }\n\n $this->setParse(func_get_arg(0));\n\n return $this;\n }", "title": "" }, { "docid": "c589e5a619f12d1261e2786fc56caa73", "score": "0.4967863", "text": "public function getResponseParser(): ResponseParserInterface\n {\n return new ResponseParser();\n }", "title": "" }, { "docid": "efdf304685f439b10c22b97c7edc2096", "score": "0.49665338", "text": "public function getHtmlContent()\n {\n return $this->markdownParser->render($this->content);\n }", "title": "" }, { "docid": "0ec1a67ad208426a704f4f04304f6403", "score": "0.49664974", "text": "protected function enablePhpMarkdownEngine()\n {\n $app = $this->app;\n\n $app->view->getEngineResolver()->register('phpmd', function () use ($app) {\n $markdown = $app['markdown'];\n\n return new PhpMarkdownEngine($markdown);\n });\n\n $app->view->addExtension('md.php', 'phpmd');\n }", "title": "" }, { "docid": "559f545190e165881ecc25474a9e086f", "score": "0.49639255", "text": "public function markdown(string $path, array $data = []): Mailable\n {\n $this->text($path, $data);\n\n $this->html = app('markdown')->text($this->plainText);\n\n return $this;\n }", "title": "" }, { "docid": "8caa0b2b807a1aaa259bd4e78e5c594c", "score": "0.49629", "text": "public function getInstance()\n {\n if ( ! (self::$jadeInstance instanceof Jade) ) {\n if (! is_dir(self::$jadeDirectory) ) {\n throw new RuntimeException('Jade.php directory does not exist : '.self::$jadeDirectory);\n }\n\n self::$jadeInstance = new \\Jade\\Jade(self::$jadeNiceOutput);\n self::$jadeInstance->cacheDir=self::$jadeTemplateDirectory.'cache/';\n }\n\n return self::$jadeInstance;\n }", "title": "" }, { "docid": "4782d0a71af05bd6578348fa01b1e645", "score": "0.49602628", "text": "public static function parseMarkdownLine($str)\n\t{\n\t\t// Prevent line breaks from getting treated as paragraphs\n\t\t$str = preg_replace('/[\\r\\n]/', ' $0', $str);\n\n\t\t// Parse with Markdown\n\t\t$str = self::parseMarkdown($str);\n\n\t\t// Return without the <p> and </p>\n\t\t$str = trim(str_replace(array('<p>', '</p>'), '', $str));\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "c71052a21a25205d389b17bc7df54782", "score": "0.49439028", "text": "public function toHtml(string $markdown): string;", "title": "" }, { "docid": "c3f3be92e1b47cbd80a92d6380a87cb6", "score": "0.4939014", "text": "protected function enableMarkdownCompiler()\n {\n $app = $this->app;\n\n $app->view->getEngineResolver()->register('md', function () use ($app) {\n $compiler = $app['markdown.compiler'];\n\n return new CompilerEngine($compiler);\n });\n\n $app->view->addExtension('md', 'md');\n }", "title": "" }, { "docid": "d653ecccb879f8d0a082397a9d70dd12", "score": "0.49266687", "text": "public function getDatabaseParser(): It4DbParserTool\n {\n $parser = new It4DbParserTool();\n $parser->setContainer($this->container);\n return $parser;\n }", "title": "" }, { "docid": "41b40998e80064eaaa17befe409fcd8c", "score": "0.49247578", "text": "public function __construct(Converter $markdown)\n {\n $this->markdown = $markdown;\n }", "title": "" }, { "docid": "3e084065e080f4c28d99fed7a09cdb24", "score": "0.49062872", "text": "public function getParse()\r\n {\r\n return $this->parse;\r\n }", "title": "" }, { "docid": "2fd5579390c106ca6d4f5a13498593c5", "score": "0.48911518", "text": "function the_content() {\n\n\tstatic $post_types = array(\n\t\t'wp-parser-class',\n\t\t'wp-parser-method',\n\t\t'wp-parser-function',\n\t\t'wp-parser-hook',\n\t);\n\t$post = get_post();\n\t$content = get_the_content();\n\n\tif ( ! in_array( $post->post_type, $post_types, true ) ) {\n\t\treturn $content;\n\t}\n\n\t$before_content = ( 'wp-parser-hook' === $post->post_type ) ? get_hook_prototype() : get_prototype();\n\t$before_content .= '<p class=\"wp-parser-description\">' . get_the_excerpt() . '</p>';\n\t$before_content .= '<div class=\"wp-parser-longdesc\">';\n\n\t$after_content = '</div>';\n\t$after_content .= '<div class=\"wp-parser-arguments\"><h3>Arguments</h3>';\n\n\t$args = ( 'wp-parser-hook' === $post->post_type ) ? get_hook_arguments() : get_arguments();\n\n\tforeach ( $args as $arg ) {\n\t\t$after_content .= '<div class=\"wp-parser-arg\">';\n\t\t$after_content .= '<h4><code><span class=\"type\">' . implode( '|', $arg['types'] ) . '</span> <span class=\"variable\">' . $arg['name'] . '</span></code></h4>';\n\t\t$after_content .= empty( $arg['desc'] ) ? '' : wpautop( $arg['desc'], false );\n\t\t$after_content .= '</div>';\n\t}\n\n\t$after_content .= '</div>';\n\n\t$source = get_source_link();\n\n\tif ( $source ) {\n\t\t$after_content .= '<a href=\"' . $source . '\">Source</a>';\n\t}\n\n\t$before_content = apply_filters( 'wp_parser_before_content', $before_content );\n\t$after_content = apply_filters( 'wp_parser_after_content', $after_content );\n\n\techo $before_content . $content . $after_content;\n}", "title": "" }, { "docid": "131a23a6020e570d1cc36752f1cfca7d", "score": "0.48911488", "text": "public function markdown($text) {\n $text = str_replace(']: /img/', \"]: {$this->request->webroot}img/\", $text);\n return $this->Markdown->transform($text);\n }", "title": "" }, { "docid": "6fa07b1465e629cf5e219ba68b1edf2a", "score": "0.4881435", "text": "protected function transform()\n {\n $parser = new MarkdownParser();\n\n $markdown = file_get_contents($this->getAbsolutePath());\n $html = $parser->transform($markdown);\n\n file_put_contents($this->getAbsolutePath(), $html);\n }", "title": "" }, { "docid": "2257b8d949b08302c07d8d26c723a42e", "score": "0.48764724", "text": "public static function getInstance()\n {\n if (self::isLoaded() === false) self::$__instance = new HtmlWriter();\n \n return self::$__instance;\n }", "title": "" } ]
b5347f724ff56f88a1c9ee4965bf1aef
Function generate unique auto incremented id for this collection
[ { "docid": "a4a5909860dd63e5de4c76ee898d9035", "score": "0.0", "text": "public static function getNextSequence()\n {\n return Sequence::getSequence('question_bank_id');\n }", "title": "" } ]
[ { "docid": "cccc0658eb16a1c3e918a0744bcff79e", "score": "0.81302273", "text": "public static function createUniqueCollectionId()\n {\n return time() . rand(0,1000);\n }", "title": "" }, { "docid": "f6d143b2e681f467bbbdd32f856e6f55", "score": "0.80290014", "text": "public function generateId()\n {\n return uniqid('auto', true);\n }", "title": "" }, { "docid": "6feef2cd04f56be79dab9112523e6bfe", "score": "0.7860523", "text": "public function generateObjectId()\n {\n return $this->generateIdFromTimestamp(time());\n }", "title": "" }, { "docid": "8d837fe6be1a4803497cca618de7dfb0", "score": "0.7797833", "text": "public function generateId() : string\r\n {\r\n return uniqid();\r\n }", "title": "" }, { "docid": "2d24a3c5773a51ca0127f8cab9479715", "score": "0.7737639", "text": "function _createId() \n {\n $id = 0;\n while (strlen($id) < 32) {\n $id .= mt_rand(0, mt_getrandmax());\n }\n $id = md5( uniqid($id, true));\n return $id;\n }", "title": "" }, { "docid": "93c0aeb3ffe2ee9abf0b6563424e87f4", "score": "0.77004194", "text": "public function generateId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "d6a347d88a975f6aba78885decb42e6b", "score": "0.7595567", "text": "private function generateId(){\n $unique_id = (string) Str::uuid();\n $exploded = explode('-', $unique_id);\n $n_unique_id = $exploded[4];\n return $n_unique_id;\n }", "title": "" }, { "docid": "54d9f9d51062e651338d3302778ea356", "score": "0.75615805", "text": "public function generateId()\n\t{\n\t\t$result = $this->_apiPost('/storage/tickets');\n\t\treturn $result['id'];\n\t}", "title": "" }, { "docid": "9af4b331ae78e89df60acb59d0b3d576", "score": "0.7518256", "text": "protected function generateIdentifier()\n {\n $this->identifier = uniqid();\n }", "title": "" }, { "docid": "e71b9c2f2f2698eb81638aeebee5ca06", "score": "0.75153977", "text": "public static function createID() {\n return (string)(uniqid(mt_rand(1, 1000), FALSE));\n }", "title": "" }, { "docid": "c91366d6518ef2e56db0a1bad05d7be8", "score": "0.74736166", "text": "private function uniqueId() {\n return 'DE7_' . Str::random(20);\n }", "title": "" }, { "docid": "608ee88c3c6c0a8e7e99032fe0ba9c00", "score": "0.74623203", "text": "public function unique_id ()\n {\n return get_class ($this) . '_' . $this->id;\n }", "title": "" }, { "docid": "47a80e5faf381ed97384fa0f4e23834e", "score": "0.74282897", "text": "function genId()\r\n\t{\r\n\t\t$this->flyId++;\r\n\t\t$this->recId = $this->flyId;\r\n\t\treturn $this->flyId;\r\n\t}", "title": "" }, { "docid": "32f69055239b913527c55ffdc7eaffed", "score": "0.74194956", "text": "private function getId() {\n $newId = uniqid();\n return $newId;\n }", "title": "" }, { "docid": "78821140c0551884c269ec625ea302a9", "score": "0.74114037", "text": "private function generate_id ()\n\t{\n\t\tif ( $this->increment_id )\n\t\t{\n\t\t\t$this->id++;\n\t\t\treturn $this->id;\n\t\t}\n\t\t\n\t\t$chars = array_merge(range('A', 'Z'), range('a', 'z'), range(0, 9));\n\t\t$max = count($chars) - 1;\n\t\t$id = '';\n\t\t\n\t\tfor ( $c = 0; $c < 16; $c++ )\n\t\t{\n\t\t\t$id .= $chars[mt_rand(0, $max)];\n\t\t}\n\t\t\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "d117aded426a90a4e86183bd5cd1883b", "score": "0.73969984", "text": "private function generateId()\n {\n return md5($this->expression().$this->description());\n }", "title": "" }, { "docid": "a33d8a707f5fde8d744fbf0e4cbf1f5c", "score": "0.7365758", "text": "function client_auto_gen_Id() {\n return 'C' . mt_rand(100000, 999999);\n }", "title": "" }, { "docid": "40eaf3a0d23300570600fe8510ebf6c5", "score": "0.73417085", "text": "function meet_generate_id() {\r\n return uniqid();\r\n}", "title": "" }, { "docid": "1ee63bba1e5643aea22176f38dcb24b7", "score": "0.7340942", "text": "function lead_auto_gen_Id() {\n return 'L' . mt_rand(100000, 999999);\n }", "title": "" }, { "docid": "d701f0aebaaaf7b18b163d9e9d130d4a", "score": "0.7320198", "text": "public function getIncrementId();", "title": "" }, { "docid": "21327a957d78e4d24fa9a9e4b2e755ae", "score": "0.7306396", "text": "public static function generateID(){\r\n return MessageSQL::generateID();\r\n }", "title": "" }, { "docid": "52c78244614cd40e87825fd61be7adc7", "score": "0.72684276", "text": "public function generateNewUniqueIdentifier(): string\n {\n $identifier = null;\n do {\n try {\n $identifier = bin2hex(random_bytes(7));\n }catch (\\Exception $e) {}\n } while ($this->findOneBy(['identifier' => $identifier]));\n\n return $identifier;\n }", "title": "" }, { "docid": "3b130276d2f9298e64ccd2bf0486c3c5", "score": "0.7242399", "text": "function opportunity_auto_gen_Id() {\n return 'P' . mt_rand(100000, 999999);\n }", "title": "" }, { "docid": "174262a642dcccb68325d9fc94c9d28a", "score": "0.72414505", "text": "function generateId()\n{\n\t$qry = mysql_fetch_object( mysql_query(\"SELECT * FROM users ORDER BY id DESC LIMIT 1\") );\n\n\t$newId = $qry->uId + 1;\n\n\treturn $newId;\n}", "title": "" }, { "docid": "9d3dc31e3fa27f658ca2f145428ea412", "score": "0.72368455", "text": "function _generateNextId()\n\t{\n\t\treturn $this->db->nextId(\"Affiliate\", true);\n\t}", "title": "" }, { "docid": "fa5a447104c29d906f038271fcfdb34f", "score": "0.7229764", "text": "private function generateNewUid(){\n return 1;\n }", "title": "" }, { "docid": "743d1ad99ab5e7f82265e1aaad0b09be", "score": "0.7207", "text": "private function _create_id()\n {\n $r=substr(sha1(rand().microtime(true)),0,8);\n\n // Make sure it's unique\n if(!empty($this->images[$r]))\n {\n $r=$this->_create_id();\n }\n\n return $r;\n }", "title": "" }, { "docid": "1e166cd3a28becabfd1139187b686a95", "score": "0.7150862", "text": "public function generatePublicId()\n\t{\n\t\treturn md5(microtime(true) + $this->getName());\n\t}", "title": "" }, { "docid": "c3090379849bcd99431f23f26530d4de", "score": "0.7126444", "text": "public function id()\n {\n return (string) (random_int(1000, 100000).time());\n }", "title": "" }, { "docid": "b9cb19d6fbd5a2b4d22cc4932c5cda08", "score": "0.71110815", "text": "public static function generateUniqueId(): string {\n // get max ID in the table\n $maxId = Client::max('id');\n $businessIdLen = 12;\n $businessId = '';\n\n for($i = 0; $i < $businessIdLen; $i++) {\n $fullId = $businessId . $maxId;\n if(strlen($fullId) >= $businessIdLen) {\n $businessId = $fullId;\n break;\n }\n $businessId .= rand(0, 9);\n }\n\n return $businessId;\n }", "title": "" }, { "docid": "f702fa030d50a281dfb3e12810d83f00", "score": "0.71042234", "text": "public function uniqueIdentifier();", "title": "" }, { "docid": "d548a83643d6e34c3a53665c262cfc38", "score": "0.70874673", "text": "public function generateId(): string\n {\n return '_' . bin2hex(openssl_random_pseudo_bytes(30));\n }", "title": "" }, { "docid": "98a1053ca33f5c6ff70018106b388bf5", "score": "0.707474", "text": "public function regenerateId();", "title": "" }, { "docid": "500c6a37cd0ede3a75c04087b04b8f60", "score": "0.7069235", "text": "public function uniqueId(): string\n {\n return $this->uidNames->next();\n }", "title": "" }, { "docid": "6abf5d60c3b220f43d1f21f7af74777e", "score": "0.7063539", "text": "public static function generateId()\n {\n return (int)mt_rand(100000000, 999999999);\n }", "title": "" }, { "docid": "2e3e467a090bb6c5ab9d4f382ce686c8", "score": "0.7055652", "text": "public function id() {\n if( $this->id ) { return $this->id; }\n\n return $this->_generate_id();\n }", "title": "" }, { "docid": "55674f103319a61d9b36be40f291cc28", "score": "0.7046874", "text": "public static function genUniqID(){\n\t//if($this->where(''))\n\treturn \\MS\\Core\\Helper\\Comman::random(4,1);\n}", "title": "" }, { "docid": "5709848d1707d8e79411eaa5a2e7c8d1", "score": "0.7038874", "text": "public function getUniqueIdentifier()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "5709848d1707d8e79411eaa5a2e7c8d1", "score": "0.7038874", "text": "public function getUniqueIdentifier()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "3df45fcc9a4a37c12f19470c24fb762e", "score": "0.7031666", "text": "public function getGeneratedId()\n {\n $task = Task::where('parent_task_id', 0)\n ->withTrashed()\n ->orderBy('id', 'DESC')\n ->limit(1)\n ->first();\n \n if ($task) {\n return 'T'.str_pad($task->id + 1, 4, \"0\", STR_PAD_LEFT);\n }\n return 'T'.str_pad(1, 4, \"0\", STR_PAD_LEFT);\n }", "title": "" }, { "docid": "33f247e2e7ac2f66157ab3068a1cf403", "score": "0.7002528", "text": "public function unique_id() {\n\n\t\treturn 'KC';\n\t}", "title": "" }, { "docid": "9aa986f9e76fdf8f64e3f4e47ba536c1", "score": "0.6978545", "text": "final public function id(): string\n {\n return $this->collection->id();\n }", "title": "" }, { "docid": "08a4d68826458e46e9f7a65ff9c6831e", "score": "0.697051", "text": "public function getObjectIncrementId();", "title": "" }, { "docid": "c5906efbfb8990585678d20f60002a63", "score": "0.69609433", "text": "function unique_id() {\n return md5($this->original_string);\n }", "title": "" }, { "docid": "96c12c3dedc2830668a530ce7b2123d4", "score": "0.6954271", "text": "public static function generateUniqueID()\n {\n return 'ONELOGIN_' . sha1(uniqid((string)mt_rand(), true));\n }", "title": "" }, { "docid": "7fd154c234c9513a13f2c0fe5bd340ac", "score": "0.694483", "text": "function generate_id() {\n\treturn rand(500000, 1000000);\n}", "title": "" }, { "docid": "5d5368d8637175a5f6fb98313fcfb25a", "score": "0.69360536", "text": "function getUniqueKey()\n{\n\treturn (mktime (date('G'),date('i'),date('s'),date('m'),date('d'),date('Y')));\n}", "title": "" }, { "docid": "76bfc65c585dd11aefc81761477c5223", "score": "0.6934933", "text": "public function regenerateId()\n {\n }", "title": "" }, { "docid": "2736bd10c334a7179d2a46ff1c38fdc3", "score": "0.6928423", "text": "function genUniquID() {\n\t$uuid = md5( uniqid() );\n\t$segments = array();\n\t$segments[] = substr($uuid, 0, 8);\n\t$segments[] = substr($uuid, 8, 4);\n\t$segments[] = substr($uuid, 12, 4);\n\t$segments[] = substr($uuid, 16, 4);\n\t$segments[] = substr($uuid, 20, 12);\n\t$uuid = implode('-', $segments);\n\treturn $uuid;\n}", "title": "" }, { "docid": "d1d1346dc5d3a7635b5c7dd0b0ac8ba8", "score": "0.6920909", "text": "public function getDefaultId()\n {\n return AbstractRecord::generateUID();\n }", "title": "" }, { "docid": "199d3fb16e60ca112d48d375b47c2382", "score": "0.6919517", "text": "protected function generateDocumentId($document)\n {\n $baseId = '';\n if (isset($document['type'])) {\n $baseId = preg_replace('/[^-_.a-zA-Z0-9]/', '', preg_replace('/\\s+/', '_', strtolower($document['type']))).'-';\n }\n\n if (isset($document['data']) && isset($document['data']['name'])) {\n $baseId = $baseId.preg_replace('/[^-_.a-zA-Z0-9]/', '', preg_replace('/\\s+/', '_', strtolower($document['data']['name'])));\n } else {\n $baseId = $baseId.uniqid();\n }\n\n $id = $baseId;\n $index = 0;\n while ($this->collection->findOne(array('id' => $id))) {\n $id = $baseId.'-'.++$index;\n }\n\n return $id;\n }", "title": "" }, { "docid": "9b7597f0727977d94a761fe2a0133b98", "score": "0.6912209", "text": "public function getUniqueId(){\n $id = rand(100000000, 999999999);\n if($this->checkIfIdExists($id)){\n $this->getUniqueId();\n }\n return $id;\n }", "title": "" }, { "docid": "49dba5ed3acc8a26133221fd54382245", "score": "0.6878664", "text": "public function nextId();", "title": "" }, { "docid": "7a12d9e08cfd3e955a881c85e6593f29", "score": "0.68773514", "text": "abstract protected function generateId($name);", "title": "" }, { "docid": "79e9cea2654867cc117fd11a4384ab95", "score": "0.6875905", "text": "public function getUniqueId()\n {\n return rand(1000000000000000,9999999999999999);\n }", "title": "" }, { "docid": "d32d5817b547d55dc6064ea7225ad826", "score": "0.6870655", "text": "protected function getUniqueId()\n {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "855900fb28eb7b86d74394aec0031255", "score": "0.6852807", "text": "public function generateID()\n {\n $id = $this->getID();\n $fmt_string = \"%08s\";\n if (is_array($id))\n $id = implode(\"-\", $id);\n\n if (empty($id))\n throw new Exception(\"Cannot generate an ID for an empty object\");\n\n $id = substr(sha1($id), 0, 10);\n $acl_class = $this->getACLClass();\n\n return $acl_class . \"#\" . $id;\n }", "title": "" }, { "docid": "5c9f1ca2d1cabdf0ccef7e682aadc82b", "score": "0.68316674", "text": "public function getUniqueId(): string\n {\n return $this->uniqueId;\n }", "title": "" }, { "docid": "bfe2179b5bc533f1db643960e2b698b2", "score": "0.6829306", "text": "public function generate_multi_id() {\n\t\treturn uniqid( 'slack_', true );\n\t}", "title": "" }, { "docid": "96cb451fb8790bed3c4df1b3484b8dd4", "score": "0.68201923", "text": "public function generateUid()\n\t{\n\t\t$host = \\JUri::getInstance()->getHost();\n\t\tif (empty($host))\n\t\t{\n\t\t\t$host = filter_input(INPUT_SERVER, 'SERVER_ADDR', FILTER_VALIDATE_IP);\n\t\t}\n\t\treturn $this->getStart()->toUtc()->format('Ymd\\This\\Z') . uniqid('-') . '@' . $host;\n\t}", "title": "" }, { "docid": "f43ddc0c194f69c01302f10c4b3a980e", "score": "0.6815932", "text": "function generateUniqueID() {\r\n\t\t$server_id_part = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\r\n\t\t$time = time();\t\t\r\n\t\t$random = rand();\r\n\t\t$id_string = $server_id_part.$time.$random;\t\t\r\n\t\t$uid = date(\"YmdHs\").hash(\"md5\", $id_string);\t\t\r\n\t\treturn $uid;\t\t\r\n\t}", "title": "" }, { "docid": "0188071c925ef469b3f05367112be2fd", "score": "0.68081105", "text": "public function getId(){\n if ( is_null($this->_id) ){\n $this->_id = time();\n }\n return $this->_id;\n }", "title": "" }, { "docid": "5e0e5f3e4296db7fdcd489cdcda553cb", "score": "0.68043095", "text": "public function generateUniqueId()\n\t{\n\t\treturn sha1(md5(microtime()) . uniqid() . sha1(pi() * rand()));\n\t}", "title": "" }, { "docid": "cfd4f77169fea4dfad80f17d5ad4a624", "score": "0.6785355", "text": "public function genID() {\n\t\t\tif (\"\" != session_id()) $this->destroy(session_id());\n\t\t\t$newID = $this->crypto->genUniqueID();\n\t\t\tsession_id($newID);\n\t\t\treturn $newID;\n\t\t}", "title": "" }, { "docid": "c14782fc594a35fc0d85cf3c9880a39d", "score": "0.67791235", "text": "public function generateTrackingID() {\n $now = now();\n $num = TrackingCounter::nextId();\n $noise = strtolower(str_random(Config::$randIDLen));\n return \"{$this->campus_code}-{$now->year}-$noise\";\n }", "title": "" }, { "docid": "d576ed2fb45cab2b9005db50baccc006", "score": "0.677126", "text": "protected function newId() {\n return self::$DB->lastInsertId($this->table.'_id_seq');\n }", "title": "" }, { "docid": "64dab622901e42f2d0d95d57ee0928f1", "score": "0.67543846", "text": "function generateRandomID()\n{\n return uniqid(date(\"ymd\"));\n}", "title": "" }, { "docid": "3fc749b1b6795d12df111ae68b87f09c", "score": "0.675002", "text": "public static function getUniqueID(): string\n {\n $cstrong = true;\n return bin2hex(openssl_random_pseudo_bytes(8, $cstrong));\n }", "title": "" }, { "docid": "e9b14616d9d277e47c92145280930cd2", "score": "0.6739068", "text": "function uniq_id() {\n $data = substr(number_format(time() * rand(),0,\"\",\"\"),0,8);\n $data = (int) $data;\n return $data;\n}", "title": "" }, { "docid": "5860dbc3f27a77553900c9ab0b6d5f88", "score": "0.67381155", "text": "function generate_uid()\n{\n return uniqid(rand() . time());\n}", "title": "" }, { "docid": "eacbf825a2fce471c9ed57e2cd721f26", "score": "0.67373025", "text": "function generatePostId()\n {\n $lastId = mysqli_insert_id($this->connect());\n return $lastId;\n }", "title": "" }, { "docid": "be469c95546ba8ea2568ab84998e7ead", "score": "0.6737233", "text": "public function getUniqueId(): string\n\t{\n\t\treturn $this->uniqueId;\n\t}", "title": "" }, { "docid": "ee07fb82c69697030255ac92de68ea09", "score": "0.67348886", "text": "public function insertId();", "title": "" }, { "docid": "494c4a6977ce8ab6370b064f33e66b71", "score": "0.6734039", "text": "function _gen_id() {\n\t\t$work_id = '';\n\t\tlist($usec, $sec) = explode(' ', microtime());\n\t\t$rand_seed = (float)$sec + ((float)$usec * 100000);\n\t\tmt_srand($rand_seed);\n\t\tfor ($r = 0; $r<13; $r++) { $work_id .= mt_rand(0,9); }\n\t\treturn $work_id;\n\t}", "title": "" }, { "docid": "2e0178e4fb53f3f6d649903603475ee5", "score": "0.67319685", "text": "protected function getUniqueId()\n\t\t{\n//\t\t\t$newID = uniqid(rand(), true);\n\n\t\t\t$newID = $this->TaskDataSource[count($this->TaskDataSource)-1]->TaskId +1; //get last id in file and increment it\n\t\t\treturn $newID; // Placeholder return for now\n\t\t}", "title": "" }, { "docid": "2e5649c2120b4c3ba4e185c87e5207bb", "score": "0.6722921", "text": "public function generateNextUserEntityId(): string\n {\n return Ulid::generate();\n }", "title": "" }, { "docid": "1c8991d92029ebf5db2c379458d5f245", "score": "0.67213345", "text": "public static function generateUniqID()\n\t{\n\t\t\n\t\t $uuid=substr(md5(uniqid(rand(), TRUE)), 0, 19);\n\t\t\n\t\t/*\n\t\t\t$user=User::whereId(1);//whereEmail($email);\n\t\t\t$uuid=$user->user_unique_id;\n\t\t*/\n\t\t return $uuid;\n\t}", "title": "" }, { "docid": "9d19ab7f484f05ffb3cc4bc05b023540", "score": "0.6695701", "text": "static public function get_new_id()\n\t\t{\n\t\t\treturn 'noname-'.self::$instance_count;\n\t\t}", "title": "" }, { "docid": "37fa3f2ff7821d104364f468fb3bc4ac", "score": "0.6688504", "text": "public function generateAssociationKey() {\n return sha1(mt_srand(microtime()));\n }", "title": "" }, { "docid": "c0db8f60de78bf7b1e03f8c6a8d7c2d4", "score": "0.66791654", "text": "public function getLocalUniqueIdentifier() {\n\t\t$uqid = '';\n\t\t$keyField = static::$_idField;\n\t\tif (is_array($keyField)) {\n\t\t\tforeach ($keyField AS $field) {\n\t\t\t\tif ($uqid)\n\t\t\t\t\t$uqid .= '-';\n\t\t\t\t$uqid .= $this->$field;\n\t\t\t}\n\t\t} else {\n\t\t\t$uqid = $this->$keyField;\n\t\t}\n\t\tif ($uqid == '')\n\t\t\t$uqid = null;\n\t\treturn $uqid;\n\t}", "title": "" }, { "docid": "5d9f3fce9319458b1f6cb41044a3565b", "score": "0.66773915", "text": "private function generateRandID(){\n return md5($this->generateRandStr(16));\n }", "title": "" }, { "docid": "79b60554a507306e51de81e55731609a", "score": "0.6677367", "text": "abstract function getUniqueIdentifier();", "title": "" }, { "docid": "9b4cd20dfe5749a0d1ca3393cb0172cc", "score": "0.66664886", "text": "public function tempId(){\n $this->id = uniqid('item');\n }", "title": "" }, { "docid": "9f64e6c939ff95a306f23469a47da95f", "score": "0.66634643", "text": "public function obtenerId() : int;", "title": "" }, { "docid": "8426373ab49078c95ebe40c60c836dd3", "score": "0.6661845", "text": "function generateID($object) {\n global $config;\n if($config['nodeId'] == 0)\n raiseError('Please set config[nodeId] to a positive integer in config.inc.php');\n $tableCode = $this->getTableCode($object->tablename);\n if($this->isVocabularyTable($object->tablename)) \n $nid = 0;\n else\n $nid = $config['nodeId'];\n $localId = $this->db->nextId($object->tablename);\n $id = sprintf(\"%03d%2s%d\", $nid, $tableCode, $localId);\n debug(\"generated ID\", $id);\n return $id;\n }", "title": "" }, { "docid": "b93ff11f38f2f09ca8e29d6b7e16d043", "score": "0.66495365", "text": "function generateUuid(){\n return UUID::uuid4();\n }", "title": "" }, { "docid": "e20ff47c93b596a0e99221871b01da4d", "score": "0.6644224", "text": "public function uid(){\n \tif($this->debug){$this->print_debug('<font color=red><b>START:</b></font> Generating new unique ID for database <b>\"'.$this->database_path.'\"</b> ...');}\n \tfor($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid(true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \t// More random uid ?\n for($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid('',true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID FAILED.');}\n \treturn false;\n }", "title": "" }, { "docid": "e20ff47c93b596a0e99221871b01da4d", "score": "0.6644224", "text": "public function uid(){\n \tif($this->debug){$this->print_debug('<font color=red><b>START:</b></font> Generating new unique ID for database <b>\"'.$this->database_path.'\"</b> ...');}\n \tfor($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid(true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \t// More random uid ?\n for($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid('',true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID FAILED.');}\n \treturn false;\n }", "title": "" }, { "docid": "e20ff47c93b596a0e99221871b01da4d", "score": "0.6644224", "text": "public function uid(){\n \tif($this->debug){$this->print_debug('<font color=red><b>START:</b></font> Generating new unique ID for database <b>\"'.$this->database_path.'\"</b> ...');}\n \tfor($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid(true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \t// More random uid ?\n for($i=0;$i<1000;$i++){\n \t\t$uid = strtolower(uniqid('',true));\n \t\tif($this->key_exists($uid)==false){\n \t\t\tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID SUCCESS.');}\n \t\t\treturn $uid;\n \t\t}\n \t}\n \tif($this->debug){$this->print_debug('<font color=red><b>END:</b></font> Generating new unique ID FAILED.');}\n \treturn false;\n }", "title": "" }, { "docid": "2e9fd68b882160728727d1fa61d05a5f", "score": "0.664133", "text": "public static function generate_id() {\r\r\n\t\trequire_once( ABSPATH . 'wp-includes/class-phpass.php' );\r\r\n\t\t$hash = new PasswordHash( 8, false );\r\r\n\r\r\n\t\treturn md5( $hash->get_random_bytes( 32 ) );\r\r\n\t}", "title": "" }, { "docid": "1e981beab5a97833c149cbc3c3d71964", "score": "0.66405034", "text": "public function uniqueId()\n {\n return $this->resource->lockKey();\n }", "title": "" }, { "docid": "e3ce99e5b58d6e3a8769a9ca7bcedb5c", "score": "0.6637291", "text": "private function generateDistId()\n {\n if (PHP_INT_SIZE == 4) {\n return $this->generateRandomNumberWithRange(9)\n .$this->generateRandomNumberWithRange(3);\n }\n\n return $this->generateRandomNumberWithRange(12);\n }", "title": "" }, { "docid": "55a2c8fa0bc0a4a577b564076f94e0a3", "score": "0.6636333", "text": "protected function _createId()\n {\n return $id = strtolower(str_replace(\" \", \"_\", trim($this->title)));\n }", "title": "" }, { "docid": "5a6020479b326dba880d958c537b55ad", "score": "0.66354775", "text": "static public function getNextId()\n {\n return self::$_containerId++;\n }", "title": "" }, { "docid": "76b3fb61751b1c90c8a1e56a12b7f772", "score": "0.6610329", "text": "public function generate()\n {\n $reeId = $this->generateReeId();\n $distId = $this->generateDistId();\n\n $control = ($reeId.$distId) % 529;\n $division = $control / 23;\n $mod = $control % 23;\n\n $this->id = $this->getCountry()\n .$reeId\n .$distId\n .$this->getControlNumbersBy($division)\n .$this->getControlNumbersBy($mod);\n\n return $this->id;\n }", "title": "" }, { "docid": "2a388d10a911e92ee8c1417c1ca8f4d6", "score": "0.6603317", "text": "function get_id(): string;", "title": "" }, { "docid": "46e3412fc1c08e52c2a04b3f3783734f", "score": "0.6599082", "text": "public function NewUid()\n {\n $uuid = (string) Str::uuid();\n $uuid = str_replace(\"-\", \"\", $uuid);\n return $uuid;\n }", "title": "" }, { "docid": "a113b5002fed16430fc6bd9b35e089ef", "score": "0.65907013", "text": "public function nanoid()\n {\n $client = $this->getNanoidClient();\n return $client->generateId(21, Client::MODE_DYNAMIC);\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.6587329", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.6587329", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.6587329", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "18ea498926a22ed70b55169953038051", "score": "0.0", "text": "public function show($id)\n {\n $usuario = $this->usuario->all()->where('id',$id)->first();\n \n \n return view('admin.show',['usuario'=>$usuario]);\n \n }", "title": "" } ]
[ { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.70187664", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "069b1d099b7ea4aa5397d961e2ee62da", "score": "0.6752789", "text": "public function show()\n {\n //find resource to display\n // $res = Resource::all();\n return view('resources/show');\n }", "title": "" }, { "docid": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "e383b8f1e186862fb82733fa719d3590", "score": "0.66141546", "text": "public function show(ResourceRetriever $listener, $resourceId);", "title": "" }, { "docid": "d9105f21226c250782ad227b6b2261e2", "score": "0.65124357", "text": "public function actionView()\n\t{ \n $id=isset($_GET['id']) ? (int) ($_GET['id']) : 0 ;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>t('cms','Update this Resource'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'button')),\n array('label'=>t('cms','View this Resource'), 'url'=>array('view','id'=>$id),'linkOptions'=>array('class'=>'button'))\n )\n );\n\t\t$this->render('resource_view');\n\t}", "title": "" }, { "docid": "7ac5c8e634cbf2fdc36370cd8ef57eee", "score": "0.6199778", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t\techo \"<strong>Armored Core</strong>: ac_block:: display(): function <strong><u>ac_block::display()</u></strong> is disabled, please fetch html resource string by <strong><u>ac_block::fetch_block()</u></strong>.\";\n\t}", "title": "" }, { "docid": "33cfc48a18162e20c7127b1127d7db87", "score": "0.61841017", "text": "public function showAction()\n {\n $context = YuppContext::getInstance();\n \n $id = $this->params['id'];\n $clazz = String::firstToUpper( $context->getController() );\n\n // La clase debe estar cargada...\n eval ('$obj' . \" = $clazz::get( $id );\");\n\n $this->params['object'] = $obj;\n\n return $this->render(\"show\");\n }", "title": "" }, { "docid": "b4c5ad057e8d450658fdc27a7ae8a914", "score": "0.6173968", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n\n return view('admin.resource.show', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "66ee2c88bf8fc141934fcb5cd1ba4add", "score": "0.61682713", "text": "public function output($resource) {\n\t\tprint $resource;\n\t\tif (isset(self::$_resources[$resource])) {\n\t\t\t$res =& self::$_resources[$resource];\n\n\t\t\tif ( $data = $this->getInternalResource($res['data']) ) {\n\t\t\t\t$filename = self::$embedding_file;\n\t\t\t} else {\n\t\t\t\t$filename = $res['data'];\n\t\t\t}\n\n\t\t\t// use last-modified time as etag; etag must be quoted\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\n\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\theader('Etag: ' . $etag);\n\n\t\t\t// cache file for at most 30 days\n\t\t\theader('Cache-control: max-age=2592000');\n\n\t\t\t// output resource\n\t\t\theader('Content-type: ' . $res['mime']);\n\n\t\t\tif (isset($data)) {\n\t\t\t\tif (isset($res['base64'])) {\n\t\t\t\t\techo base64_decode($data);\n\t\t\t\t} else {\n\t\t\t\t\techo $data;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treadfile($filename);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "919d00fe86f81c1cf289acf24342adc1", "score": "0.61225873", "text": "public function show($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "80a8e3a2ce7bc2d1abdfaec188d6155d", "score": "0.6094779", "text": "public function index(Resource $resource)\n {\n session(['resourceId' => $resource->id]);\n\n $contents = $this->getContents();\n\n $noSideBar = true;\n\n // Show the page\n return view('admin.content.index', compact('resource', 'contents', 'noSideBar'));\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.6077535", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "56e1414df8116772a62d14147c538ffe", "score": "0.6018325", "text": "public function displayAction()\n {\n $dummyEntity = $this->createSampleEntity();\n\n return $this->render('AppBundle:Display:display.html.twig', [\n 'entity' => $dummyEntity\n ]);\n }", "title": "" }, { "docid": "1e891653b5f4912aa409c758d50a1b98", "score": "0.5965172", "text": "function display()\n\t{\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "6e55abfe4978a80ccc782aaf6093b19f", "score": "0.59554774", "text": "public function show($id)\n {\n // return new InformationResource(Information::FindOrFail($id));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "7b8f897ba2297696b69f6d8202444107", "score": "0.59492433", "text": "public function displayAction()\n {\n $params = $this->dispatcher->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n echo Las::display($firewall->name);\n }\n }", "title": "" }, { "docid": "89b549ed67b4702bbd94de618931239c", "score": "0.594717", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "69c007742a206b83dabf0105e287694e", "score": "0.5917445", "text": "public function show(CardType $resource)\n {\n $student = Student::find(request()->student_id);\n return view(\"card::card.\" . $resource->id, compact(\"student\"));\n }", "title": "" }, { "docid": "10dda82513aea0f93ead687a2ff8c827", "score": "0.5917097", "text": "public function show() {\n if (!$this->resource) return false;\n header(\"Content-Type: \" . $this->mime);\n switch ($this->ext) {\n case \"jpeg\":\n imagejpeg($this->resource);\n break;\n case \"png\":\n imagesavealpha($this->resource, true);\n imagepng($this->resource);\n break;\n }\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.5908313", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cfa14f41ec1e2a6c61ae783842b28ca6", "score": "0.5901304", "text": "public function display() {\n $this->doDisplay();\n }", "title": "" }, { "docid": "f67dcafa85455ea74fc8196d8e104a85", "score": "0.5866919", "text": "public function show() //$id\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "478daa75047310b25e75447625fd98fb", "score": "0.58533454", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n $categories = Category::all();\n\n if ($resource) {\n return view('pages.resource_show', compact('categories', 'resource'));\n }\n\n return abort(404);\n }", "title": "" }, { "docid": "e35556f0647fa2dc1cbf13447dae6b50", "score": "0.5820258", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/jpeg');\n\t\theader('Content-disposition: inline');\n\t\timagejpeg($imageResource, null, 88);\n\t}", "title": "" }, { "docid": "004f965420f85c3776edacf6c258a0a6", "score": "0.58097786", "text": "public function display()\r\n {\r\n $this->render();\r\n }", "title": "" }, { "docid": "7960ba0bf337c86c8be237145807953e", "score": "0.5806929", "text": "public function displayAction()\n {\n if (!isset($this->params['nname']))\n {\n $this->flash['message'] = 'No se encuentra la pagina solicitada';\n $page = Page::get(1);\n }\n else\n {\n $pages = Page::findBy( Condition::EQ(Page::TABLE, 'normalizedName', $this->params['nname']), $this->params );\n \n if (count($pages) == 1) $page = $pages[0];\n else\n {\n $this->flash['message'] = 'No se encuentra la pagina solicitada';\n $page = Page::get(1);\n }\n }\n\n $this->params['page'] = $page;\n //return $this->render('../cms/displayPageRO');// no funciona en linux\n return $this->render('../cms/displayPageRO');// no funciona en linux\n }", "title": "" }, { "docid": "426c72f34858b1f8fc0c2377d1350691", "score": "0.58062166", "text": "public function show()\n {\n $arguments = func_get_args()[0];\n $id = $arguments[0];\n\n echo \"Show $id\";\n // return $this->view('example.show');\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "32187e8550924a28a85e5c258d9de919", "score": "0.5793539", "text": "public function display() {\n echo $this->fetch();\n }", "title": "" }, { "docid": "2a2a886f07a7eb66210fab7478b1c2f7", "score": "0.5767577", "text": "public function display()\n {\n\n echo $this->get_display();\n\n }", "title": "" }, { "docid": "0738931a1683e5ef17e57fcbeee2ab9f", "score": "0.5763775", "text": "public function show(Standard $standard)\n {\n //\n }", "title": "" }, { "docid": "0738931a1683e5ef17e57fcbeee2ab9f", "score": "0.5763775", "text": "public function show(Standard $standard)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.5746085", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "be63c4d6543bd1b7322d86668ae9ef60", "score": "0.5734784", "text": "public function show($id)\n {\n $resource = Str::singular(resourceName());\n $viewPath = collect(explode('/', request()->path()))->slice(0, -2)->implode('.') . '.'.$resource;\n return view($this->viewPrefix . $viewPath, [\"object\" => $this->getObjectFromRoute($id, $this->showWith), \"model\" => ucfirst($resource) ]);\n }", "title": "" }, { "docid": "6cf90dd8b5fe3cf8ddaee25472340d27", "score": "0.5733295", "text": "public function show(Responsable $responsable)\n {\n //\n }", "title": "" }, { "docid": "6cf90dd8b5fe3cf8ddaee25472340d27", "score": "0.5733295", "text": "public function show(Responsable $responsable)\n {\n //\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "title": "" }, { "docid": "1926665de574ded82e5d782a6ff9192f", "score": "0.57088506", "text": "public function show(Field $field){\n \treturn new FieldResource($field);\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "28c1222465a2cbce21a616ec72fbd790", "score": "0.57036674", "text": "public static function resource($resource, $controller, $options = array()){\n\t\t Illuminate\\Routing\\Router::resource($resource, $controller, $options);\n\t }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "1708ac3bf00aa20f618f27d019302e26", "score": "0.5698314", "text": "public function show() \n {\n echo $this->get();\n }", "title": "" }, { "docid": "f434227a79e3f2ef6339c28c9de58720", "score": "0.56981796", "text": "public function show($id)\n {\n return \"display your post here\";\n }", "title": "" }, { "docid": "e9865313c984d3a82e52245c0631382c", "score": "0.56956863", "text": "public static function showResource($module ='', $model_name ='', $resource_id = 0, $resource_field = '', $relationship = [])\n\t{\n\t\t$source = \"\\App\\Modules\\\\\".$module.\"\\Models\\\\\".$model_name;\n\t\t$model = $source::find($resource_id);\n\t\tif (count($relationship)) {\n\t\t\t// $model = $source::with($relationship)->where($resource_field, '=', $resource_id)->first();\n\t\t\t$model = $source::with($relationship)->find($resource_id);\n\t\t}\n\t\tif ($model) {\n\t\t\t$response = [\n\t\t\t\t'code'\t\t=> '200',\n\t\t\t\t'status'\t=> StatusHelper::getSuccessResponseStatus(),\n\t\t\t\t'data'\t\t=> $model->toArray()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$response = [\n\t\t\t\t'code'\t\t=> '404',\n\t\t\t\t'status'\t=> StatusHelper::getNotFoundResponseStatus(),\n\t\t\t\t'message'\t=> 'Resource not found.'\n\t\t\t];\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
f1c766c569adc03f1eb6ec9a78e7b0b2
Check if the last record of a page exceeds the maximum modification date.
[ { "docid": "a0436cb61e5a9f7dd0e2ddf5778c8062", "score": "0.68543935", "text": "private function exceedMaxModifiedTime(Collection $records)\n {\n $modifiedAt = new DateTime($records->last()->get('Modified Time'));\n\n return $modifiedAt >= $this->query->getMaxModificationDate();\n }", "title": "" } ]
[ { "docid": "794f0d61ce339448e4ca002ae771c948", "score": "0.62825066", "text": "public function isLastPage() {}", "title": "" }, { "docid": "0775333f19ba03c97c7183be5000c948", "score": "0.6106032", "text": "public function isPaginationLastPage()\n {\n // return $this->paginationTotal() <= $this->lastRetrievedId();\n return $this->paginationGet('previously_retrieved') >= $this->paginationTotal();\n }", "title": "" }, { "docid": "517015c4ef8d01d738e8db8b39f5eafb", "score": "0.5882188", "text": "function getLastMod($table){\n $result = false;\n $info = $this->_getTableInfo($table);\n if (isset($info['lastmod'])) {\n $result = $info['lastmod'];\n }\n return $result;\n }", "title": "" }, { "docid": "e97c65243e7c97f56a195e74aea59578", "score": "0.585086", "text": "public static function find_last_created($limit = 1)\n {\n $sql = \"SELECT * FROM \" . self::$table_name; \n $sql .= \" ORDER BY created DESC LIMIT \".$limit;\n $result = static::find_by_sql($sql);\n return !empty($result) ? $result : false;\n }", "title": "" }, { "docid": "bb27baa5b3ae5b6ab6399bba2d584f45", "score": "0.5846876", "text": "public function test_max_value($s_field_name, $m_max)\n\t{\n\t\t$m = $this->get_field($s_field_name);\n\t\t$b_return = ($m > $m_max) ? FALSE : TRUE;\n\t\treturn $b_return;\n\t}", "title": "" }, { "docid": "5a491ca7990abbb5ee596dc9dfae2a27", "score": "0.581428", "text": "function is_last()\r\n\t{\r\n\t\treturn ($this->current_page == $this->last_page);\r\n\t}", "title": "" }, { "docid": "fff9ea4612be8ec30d8fbaa980103937", "score": "0.5789191", "text": "private function get_last_access() {\n global $USER;\n\n $lastmonth = strtotime('-1 month');\n if (isset($USER->lastcourseaccess[$this->course->id])) {\n $lastvisit = $USER->lastcourseaccess[$this->course->id];\n if ($lastvisit > $lastmonth) {\n return $lastvisit;\n }\n }\n return $lastmonth;\n }", "title": "" }, { "docid": "1348545ff8336ef5701b15791d4dd773", "score": "0.57418656", "text": "public function compoff_limit(){\n\t\tif($this->data['HrLeave']['hr_leave_type_id'] == '7'){ \n\t\t\tif(!empty($this->data['HrLeave']['comp_off_dates'])){ \n\t\t\t\tif(count($this->data['HrLeave']['comp_off_dates']) > 2){\n\t\t\t\t\treturn false;\n\t\t\t\t}else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b86bcdfd9f8870b236f6334dc7616dc5", "score": "0.56630796", "text": "function lastModified()\n {\n $max=0;\n foreach($this->users as $user){\n $max = max($max,strtotime($user->modified),strtotime($user->getProfile()->modified));\n }\n foreach($this->groups as $group){\n $max = max($max,strtotime($group->modified));\n }\n return $max;\n }", "title": "" }, { "docid": "4d673c4c417456b6bb97999def10d114", "score": "0.56556827", "text": "protected function getLastModificationDate($page) {\n $date = $page->getLastModificationDateTime();\n return $date->format('Y-m-d');\n }", "title": "" }, { "docid": "c9424089321e3af262692ad2d1fa05c3", "score": "0.5646173", "text": "public function isGetLast();", "title": "" }, { "docid": "5098ed65878d9df7676f171470063bee", "score": "0.56338584", "text": "public function isLastPage(): bool\n {\n if ($this->itemCount === null) {\n return false;\n } else {\n return $this->getPageIndex() >= $this->getPageCount() - 1;\n }\n }", "title": "" }, { "docid": "6e98b265cbe0f0507dbc8d896c3d2791", "score": "0.5585758", "text": "private function records_last(){\n\n\t\t/* Last blogs*/\n\t\t$cond = \" && blogs.st IN (1)\";\n\t\t$offset = 10;\n\t\t$page = [$_GET['page'], $offset ];\n\t\t$sort = 'blogs.ID DESC';\n\n\t\t$blogs = new Blogs_Model('blogs',1);\n\t\t$r = $blogs->_all($cond,$page,$sort);\n\n\t\t$this->data['blogs_last'] = $r['data'];\n\n\t\t$this->request->cond = $cond;\n\n\n\t}", "title": "" }, { "docid": "f005a1f0ee19cbd2fedddb84b68c4d32", "score": "0.55614686", "text": "function last () {\n\t$this->last = $this->startof + $this->limit;\n\tif ($this->last > $this->totalrecords) {\n\t\t$this->last = $this->totalrecords ;\n\t}// End of : if ($last > $totalRecords) {\n\treturn $this->last;\n}", "title": "" }, { "docid": "80386e9e142dccdceb0261d8609380bc", "score": "0.5538176", "text": "private function _checkMaxFileSize()\n {\n if($this->_maxFileSize == 0){\n return false;\n }\n\n $current_size = $this->_getFilesItem('size');\n\n $err_msg = str_replace(\"%max_size%\", $current_size/1024, self::ERR_MAX_SIZE_OVERFLOW);\n\n FileUploadException::ensure(\n $current_size <= $this->_maxFileSize,\n $err_msg\n );\n\n return true;\n }", "title": "" }, { "docid": "ba54f1d7d76c5c6b5d3319819000fe77", "score": "0.5530058", "text": "protected static function loadLastPage()\n {\n global $objPage;\n\n $objPage = \\PageModel::findPublishedByIdOrAlias(\\Input::get('page_id'));\n if ($objPage !== null)\n {\n $objPage->current()->loadDetails();\n return true;\n }\n\n // Todo: handle errors better\n $strErrMsg = 'Could not load current page (ID \"'.\\Input::get('payment_mod').'\"\")';\n log_message($strErrMsg, 'debugPayPalExpress.log');\n \\System::log($strErrMsg, __METHOD__, TL_ERROR);\n\n return false;\n }", "title": "" }, { "docid": "1ab05d4ef401a1379ee9d0a78532d0d7", "score": "0.55255973", "text": "public function hasMaxAge(): bool;", "title": "" }, { "docid": "4d07cf7c2c042e81b297dee982881b66", "score": "0.5497056", "text": "public function isLast()\r\n\t{\r\n\t\tif (MembershipPlan::where('user_group_id', $this->user_group_id)->count() > 1) return false;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "3a81a17ea2cb1fd2a738e44718a367a1", "score": "0.53807193", "text": "public function check_recent_modification($file) {\n\t\tif (file_exists($file)) {\n\t\t\t$time_mod = (int) @filemtime($file);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t\t$time_now = time();\n\t\t\tif ($time_mod > 100 && ($time_now - $time_mod) < 30) {\n\t\t\t\tUpdraftPlus_Job_Scheduler::terminate_due_to_activity($file, $time_now, $time_mod);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c1bf04ec187d7cbc6eb2c702cafa2b83", "score": "0.53754944", "text": "function get_last_mod ()\n{\n return getlastmod();\n}", "title": "" }, { "docid": "88d0bed901c1c80dc8d7b21a11720e56", "score": "0.53680885", "text": "public function has_more_records()\n\t{\n\t\t$last_record = ($this->get_current_page() - 1) * $this->get_per_page() + $this->get_per_page();\n\t\t\n\t\tif ( $this->_total_records > $last_record ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "85718a374d1c0f09097df20c7d3b4878", "score": "0.5352208", "text": "public function getLastPage(): ?int;", "title": "" }, { "docid": "57195abb060dcc7501989292aafd9f30", "score": "0.53342694", "text": "public function validateCountLastEdits() {\n\t\tif (empty($this->objects)) {\n\t\t\t$this->readObjects();\n\t\t}\n\t\t\n\t\tWCF::getSession()->checkPermissions(array('mod.board.canViewPostVersions'));\n\t}", "title": "" }, { "docid": "953cfe101bd163107bc6b880871e888c", "score": "0.5326791", "text": "public function entry_time_greater_prev()\n {\n $previous_entry = $this->previousEntry;\n\n if (!date_greater_than($this->request->entry_time, $previous_entry->entry_time)) {\n return to_object([\n 'success' => false,\n 'message' => \"Please the entry time must be greater than the one of the\".\n \" previous entry ({$previous_entry->entry_time})\"\n ]); \n }\n\n return to_object(['success' => true]);\n }", "title": "" }, { "docid": "c2bec4b770ab5be23c91e81a5df3eb3c", "score": "0.5320351", "text": "function setMax($max){\n $result = false;\n if (is_numeric($max) && $max > 0) {\n $result = $this->MAX;\n $this->MAX = $max;\n } else {\n $this->pushError('illegal the value of the argument as MAX(%s)', $max);\n }\n return $result;\n }", "title": "" }, { "docid": "b02cc328c20bd79a404a2eaf46ae2321", "score": "0.53145343", "text": "private function isLastWebPage(WebPage $webPage) {\n \t\t\n \t\t$sql = sprintf(\n\t\t\t\t\t'SELECT id FROM %s WHERE collection_fid = ?',\n\t\t\t\t\t$this->pageTableName);\n\t\t\t\t\t\n\t\t// Create an sql statement\n\t\t$stmt = $this->conn->prepareStatement($sql);\n\t\t// Set params\n\t\t$stmt->setInt(1, $webPage->getCollectionId());\n\t\t// Let's execute\n\t\t$rs = $stmt->executeQuery();\n\t\t// Get number of web pages\n\t\t$count = $rs->getRecordCount();\n\t\t\n\t\t// Free resources\n\t\t$rs->close();\n\t\t$stmt->close();\n\t\t\n\t\t// Is it the one and only\n\t\treturn ($count == 1);\n }", "title": "" }, { "docid": "3f9a6d5145721dc9d4de7a9386d8d2f1", "score": "0.5262717", "text": "public function seeDateWasLastMonth($date) {\n $this->seeDateWasInMonths($date, 1);\n }", "title": "" }, { "docid": "b1ed94ed77ef1c5bd22e3e45a872a463", "score": "0.52589035", "text": "function lastModifiedCompare() \n { \n\t\t$get_last_update = @file('lastupdate.data');\n\t\t\n\t\t//Check if the date&time in the lastupdate.data are the same... if they are ... then death comes and takes everything away. \t\n \t\tif($get_last_update[0] == $this->last_modified) {\n\t\t\tBasic::error('Fatal error', \"\\n\\nNo need to update. No new RDF dumps at DMOZ. DMOZ files were last updated \" . $this->last_modified . \". \\nPS: If you are having trouble with this update - delete/edit the file lastupdate.data\");\n \t\t}\n\t\telse {\n \t\t\tif($get_last_update[0] == '') {\n \t\t\t\t$this->current_version = 'you don\\'t have one :)';\n \t\t\t}\n \t\t\telse {\n\t\t\t\t// Set a global\n \t\t\t\t$this->current_version = $get_last_update[0];\t\n \t\t\t}\n \t\t\t\n \t\t\treturn true;\n \t\t}\n }", "title": "" }, { "docid": "81196c2f3b1cf71b9a926c24b74ef166", "score": "0.525594", "text": "public function getLast() : bool\r\n {\r\n return $this->last;\r\n }", "title": "" }, { "docid": "72dcdb4fcd1db7d1dda3666176922fa2", "score": "0.52557784", "text": "public function more_records()\n\t{\n\t\t$curr_page = $this->get_current_page();\n\t\t$per_page = $this->get_per_page();\n\t\t$record_index = $curr_page * $per_page;\n\t\t\n\t\tif ( $record_index < $this->_total_records ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1844a81c6013b8b08d77d3c07a0e4d54", "score": "0.5254125", "text": "function global_last_modified_compare( $last_modified ) {\n\t\t//get the global last modified as a baseline\n\t\t$global_last_modified = self::get( 'wpe_ac_global_last_modified' );\n\t\t//compare the global to the last_modified time passed as part of the request\n\t\treturn ( $global_last_modified > $last_modified ? $global_last_modified : $last_modified );\n\t}", "title": "" }, { "docid": "09f263fd299d6e0790d09e9a73308842", "score": "0.5236428", "text": "public function last_activity_is_recent()\n {\n $max_elapsed = 60 * 30;\n if (!isset($this->last_activity)) {\n return false;\n }\n if (($this->last_activity + $max_elapsed) >= time()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "2659d745c2a511df781614842a23f477", "score": "0.52346754", "text": "private function lastPageReached($count, $parameters)\n\t{\n\t\tif (ParameterValidator::integer('amount', $parameters) && ParameterValidator::integer('offset', $parameters)){\n\t\t\t$tailPosition = $parameters['offset'] + $parameters['amount'];\n\t\t\treturn ($tailPosition >= $count);\n\t\t}\n\n\t\t/**\n\t\t * si no estan los parametros de amount y offset, se retorno la tabla entera,\n\t\t * entonces ah llegado a la ultima pagina\n\t\t */\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2608c4b5554f818501426dd560e215f7", "score": "0.52289534", "text": "public function getLastPage()\n {\n return $this->lastPage;\n }", "title": "" }, { "docid": "2608c4b5554f818501426dd560e215f7", "score": "0.52289534", "text": "public function getLastPage()\n {\n return $this->lastPage;\n }", "title": "" }, { "docid": "c244c2abffdfa08ddd7c112d2ebf6f68", "score": "0.5218041", "text": "function lastpage() {\n\t$url =\"{url}\";\n\t$islast = ceil($this->totalrecords/$this->limit);\n\tif ($islast > 5 ) { \n\t\t$this->last=($this->limit*$islast)-$this->limit;\n\t\tif ($this->page < $this->allpages()) {\n\t\t\t$url .= \"{chr}page=\".$islast.\"\";\n\t\t\t$result = \"<a href=\\\"\".$url.\"\\\">\".$this->lang[LAST].\"</a>&nbsp;&nbsp;\";\n\t\t} // End of : if ($this->page < $this->allpages()) \n\t} // End of : if ($islast > 5 )\n\treturn $result;\n}", "title": "" }, { "docid": "9afffbae241dc6cdbc4dfeb33d061658", "score": "0.52079153", "text": "public function checkMaxURL(){\n\n\t // count database's row number\n\t $query = \"SELECT f.id, f.url FROM \" . $this->table_name . \" f\";\n\t $stmt = $this->connection->prepare($query);\n $stmt->execute();\n $nRows = $stmt->rowCount();\n\n\t if ($nRows>=15){\n\t\t return false;\n\t }\n\t return true;\n }", "title": "" }, { "docid": "597873ca49a1e97df71bf738d35b9209", "score": "0.5206395", "text": "public function hasMorePages()\n {\n return $this->currentPage() < $this->lastPage();\n }", "title": "" }, { "docid": "597873ca49a1e97df71bf738d35b9209", "score": "0.5206395", "text": "public function hasMorePages()\n {\n return $this->currentPage() < $this->lastPage();\n }", "title": "" }, { "docid": "753f9a61372c2c12ad7ebfaa6b941948", "score": "0.5201898", "text": "public function getLastHistoryRecord()\n\t{\n\t\tif (empty($this->_pub))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (!isset($this->_tblHistory))\n\t\t{\n\t\t\t$this->_tblHistory = new Tables\\CurationHistory($this->_db);\n\t\t}\n\n\t\t$history = $this->_tblHistory->getLastRecord($this->_pub->version_id);\n\n\t\treturn $history;\n\t}", "title": "" }, { "docid": "4b00c81164ac4a546c6ea78d4df6fddd", "score": "0.5199433", "text": "function checkCache($filename, $last_modification_time) {\n\t\t$cache_dir = JPATH_ROOT.DS.'modules'.DS.'mod_image_show_gk4'.DS.'cache'.DS;\n\t\t$file = $cache_dir.$filename;\n\t\t\n\t\treturn (!is_file($file)) ? FALSE : (filemtime($file) > $last_modification_time);\n\t}", "title": "" }, { "docid": "6e4e1eeae49442633f9ed0a91001d66e", "score": "0.51895064", "text": "function getLastPage() {\n\t\tif ( $this->getTotalResults() > 0 && $this->getLimit() > 0 ) {\n\t\t\tif ( $this->getLimit() == 1 ) {\n\t\t\t\treturn (floor($this->getTotalResults()/$this->getLimit())*$this->getLimit())-1;\n\t\t\t} else {\n\t\t\t\treturn floor($this->getTotalResults()/$this->getLimit())*$this->getLimit();\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "2f25dbc0018fd2d5d9bd66d9ddb245d3", "score": "0.5180395", "text": "function isLastModul()\n {\n $check_query = xtc_db_query(\"SELECT configuration_key,configuration_value FROM \" . TABLE_CONFIGURATION . \" WHERE `configuration_key` LIKE 'MODULE_PAYMENT_MCP_%STATUS'\");\n return (xtc_db_num_rows($check_query) > 1) ? false : true;\n\n }", "title": "" }, { "docid": "ce61e0a7ecbea7c43c94cf8d4deb2f2c", "score": "0.51635975", "text": "function isLast($checkVar){\n\tglobal $total_comics;\n\t//checks to see if on the last page already\n\t//and if so just returns the same ID again for the next button\n\tif ($checkVar == $total_comics){\n\t\treturn $checkVar;\n\t//if not advances the ID by one\n\t} else {\n\t\t$checkVar++;\n\t\t\t//checks new ID to make sure it does not exceed total comics\n\t\t\t//if it does, sets ID back to be the same as total comics\n\t\t\tif ($checkVar > $total_comics){\n\t\t\t\t$checkVar = $total_comics;\n\t\t\t}\n\t\treturn $checkVar;\n\t\t}\n\t}", "title": "" }, { "docid": "d74eb1cccb0f482e4359f7cf7075d26b", "score": "0.5162679", "text": "public function last_login_is_recent()\n {\n $max_elapsed = 60 * 60 * 24;\n if (!isset($this->last_login)) {\n return false;\n }\n if (($this->last_login + $max_elapsed) >= time()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "09311cf9b5c1876dfdf9994ad8c1010a", "score": "0.51612186", "text": "public function getLastItemOnPage(): ?int;", "title": "" }, { "docid": "d2a88cce6f2cc71d88526e1f39742176", "score": "0.5145442", "text": "public function isLastView()\n {\n return $this->visitsLeft === 1;\n }", "title": "" }, { "docid": "3e5ecb2bc1148537426ab43f9070a99a", "score": "0.513879", "text": "public function isLast();", "title": "" }, { "docid": "1e186f973141a4346978c66e9b310a58", "score": "0.5129902", "text": "public function lastUpdated()\n {\n $updates = TableRegistry::get('Top500Updates')->find();\n\n if (! iterator_count($updates)) {\n return false;\n }\n\n return $updates->first()->modified;\n }", "title": "" }, { "docid": "1c8f740e8c278de1496bde1cea015c88", "score": "0.5127462", "text": "private function _build_lastPage(){\n return ceil( $this->_total / $this->_pageSize );\n }", "title": "" }, { "docid": "5e0a62760c723c6bebc43c7a995c56f2", "score": "0.5126337", "text": "public function checkIfBillLimitIsAlmostReached()\n {\n \t$percentage = $this->getCurrentBillAmount()/$this->bill_limit;\n\n \tif ($percentage > 1)\n \t{\n $this->setUnlocked(false);\n $this->sendLimitReachedEmail();\n \t}\n \telseif( $percentage >= sfConfig::get('billLimitSecondThreshold'))\n \t{\n $this->set('warning2',true);\n \t $this->sendLimitWarningEmail(sfConfig::get('billLimitSecondThreshold'));\n \t}\n \telseif ($percentage >= sfConfig::get('billLimitFirstThreshold'))\n \t{\n \t $this->sendLimitWarningEmail(sfConfig::get('billLimitFirstThreshold'));\n \t $this->set('warning1',true);\n }\n }", "title": "" }, { "docid": "ac1f373e3b0c8b258c2fa0394b28aa22", "score": "0.5119437", "text": "final protected function checkLastDayOfMonth() {\n\t\tif (! checkdate ( $this->_month, $this->_day, $this->_year )) {\n\t\t\t$use30 = array (4, 6, 9, 11 );\n\t\t\tif (in_array ( $this->_month, $use30 )) {\n\t\t\t\t$this->_day = 30;\n\t\t\t} else {\n\t\t\t\t$this->_day = $this->isLeap () ? 29 : 28;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "905eefb0e1a6e6ad7b89ce02c51aaf91", "score": "0.5103131", "text": "public function getLast()\n {\n return $this->numPages - 1;\n }", "title": "" }, { "docid": "c2f319c8cadb3494cc9dddb0a7672688", "score": "0.5084833", "text": "function last_login_is_recent() {\n\t$max_elapsed = 60 * 60 * 24; // 1 day\n\t// return false if value is not set\n\tif(!isset($_SESSION['last_login'])) {\n\t\treturn false;\n\t}\n\tif(($_SESSION['last_login'] + $max_elapsed) >= time()) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "4f911c353636ee63b179789a40e378e9", "score": "0.5078843", "text": "public function lastPage()\n {\n return $this->lastPage;\n }", "title": "" }, { "docid": "104c0294cc50b2f13636fcb3be141d81", "score": "0.5077149", "text": "public function getLastModification()\n {\n if ($this->isLocked()) {\n return $this->locked;\n }\n\n return $this->tstamp ? : time();\n }", "title": "" }, { "docid": "0d13a056ee6b3250e658a121365ae8ad", "score": "0.5075926", "text": "public function getMaxPage(): int;", "title": "" }, { "docid": "14d4ed747d38ac59cd0e19c192061be0", "score": "0.5065279", "text": "function GetMaxdateupdatedperbatch($batchno) {\n $noresultsamplee = \"SELECT MAX(datemodified) as 'updateddate' FROM samples WHERE batchno='$batchno' \";\n $noresultsampleresultt = mysql_query($noresultsamplee) or die(mysql_error());\n $noresultsampleresultroww = mysql_fetch_array($noresultsampleresultt, MYSQL_ASSOC);\n $updateddate = $noresultsampleresultroww['updateddate'];\n $updateddate = date(\"d-M-Y\", strtotime($updateddate));\n return $updateddate;\n}", "title": "" }, { "docid": "9d608bdfd55ac6a5b296faf82c0672ba", "score": "0.50608176", "text": "function end_mo_check()\n {\n $st = mktime(\n 0,\n 0,\n 0,\n $this->validation->start_mo,\n $this->validation->start_day,\n $this->validation->start_yr\n );\n $et = mktime(\n 23,\n 59,\n 59,\n $this->validation->end_mo,\n $this->validation->end_day,\n $this->validation->end_yr\n );\n\n if ($et < $st) {\n $this->validation->set_message(\n 'end_mo_check',\n 'End month must be past the start date!'\n );\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "61c8cfdab4ec9fddb29b46072e99ad0c", "score": "0.5057607", "text": "function jmd_dashboard_lastmod($atts)\n{\n extract(lAtts(array(\n 'format' => '%Y-%m-%d',\n 'gmt' => 0,\n ), $atts));\n $modDate = safe_field(\"unix_timestamp(LastMod)\", \"textpattern\",\n \"Posted <= now() ORDER BY Posted desc\");\n\n return safe_strftime($format, $modDate, $gmt);\n}", "title": "" }, { "docid": "4634dfda49144d7e39e45fa39aff0cb6", "score": "0.50560117", "text": "private function verifiyMaxFileSize()\n {\n $errorCode = $_FILES[FileDAO::NAME_OF_HTML_INPUT_ELEMENT]['error'];\n if ($errorCode === UPLOAD_ERR_INI_SIZE) {\n throw new DomainException(\"Die Datei ist zu gross.\");\n }\n }", "title": "" }, { "docid": "a9321c3bd2b3ece4f41e5c1ffa217513", "score": "0.50543743", "text": "function contact_limit_expired_for_month($profileid,$allowed_limit)\n {\n $current_time=date(\"Y-m-d\");\n\t\t$DOB=explode(\"-\",$current_time);\n\t\t$day=$DOB[2];\n\t\t$month=$DOB[1];\n\t\t$year=$DOB[0];\n\t\t$current_date_start=$year.\"-\".$month.\"-01 00:00:00\";\n\t\t//Sharding of CONTACTS done by Sadaf\n\n\t\t$sendersIn=$profileid;\n $typeIn=\"'I'\";\n $timeClause=\"TIME > '$current_date_start'\";\n $contactResult=getResultSet(\"count(*) as count\",$sendersIn,'','','',$typeIn,'',$timeClause);\n\n\t\tif($contactResult[0][\"count\"]<$allowed_limit)\n\t\t{\n\t\t\tunset($contactResult);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($contactResult);\n\t\t\treturn true;\n\t\t}\n }", "title": "" }, { "docid": "7faef377f7d1d7531908dfcf495f1232", "score": "0.50543314", "text": "private function purgeRecordsExceedingMaxModifiedTime(Collection $records)\n {\n return $records->filter(function ($record) {\n $modifiedAt = new DateTime($record->get('Modified Time'));\n return $modifiedAt < $this->query->getMaxModificationDate();\n });\n }", "title": "" }, { "docid": "ff2bb8e6d8023f738df7af7d2605d1ef", "score": "0.50470424", "text": "function PMA_checkTimeout()\n{\n global $timestamp, $maximum_time, $timeout_passed;\n if ($maximum_time == 0) {\n return FALSE;\n } elseif ($timeout_passed) {\n return TRUE;\n /* 5 in next row might be too much */\n } elseif ((time() - $timestamp) > ($maximum_time - 5)) {\n $timeout_passed = TRUE;\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "8e038de7df97f5ec9c40443738225a54", "score": "0.50338286", "text": "function getlastmod () {}", "title": "" }, { "docid": "21226c16c3956d9b33bf19eb2b59de04", "score": "0.5023945", "text": "public function setLastPage($lastPage)\n {\n $this->lastPage = $lastPage;\n\n if ($this->getPage() > $lastPage) {\n $this->setPage($lastPage);\n }\n }", "title": "" }, { "docid": "aa0c0aed655e1dffe6e1337b5c4604a3", "score": "0.5019731", "text": "public function hasLast()\n\t{\n\t\treturn ($this->blnShowFirstLast && $this->intItem < ($this->intTotalItems - 1)) ? true : false;\n\t}", "title": "" }, { "docid": "aadd23cf5534d1e8c876df6fa2e4abd0", "score": "0.5019381", "text": "public function past(): bool\n {\n $now = new Date();\n $condition1 = intval($now->format(\"Y\")) > $this->month->getYear();\n $condition2 = $this->month->is()->currentYear()\n && intval($now->format(\"m\")) > $this->month->getMonthNum();\n\n return $condition1 || $condition2;\n }", "title": "" }, { "docid": "2da69e691b2d889d71024081b4383d0d", "score": "0.50178856", "text": "public function getLastWriteTime();", "title": "" }, { "docid": "7fe640e8a53dd6f6da14465a0d7282df", "score": "0.5015356", "text": "public function isLast(): bool;", "title": "" }, { "docid": "180cb4b81de5d275e9edc38d362db15e", "score": "0.5006544", "text": "function max($field, $val, $max) {\n return strlen($val) <= $max;\n }", "title": "" }, { "docid": "0c9c650dccd77a8b642b59b32d05858c", "score": "0.49970222", "text": "function getLastPage($error_redirect = 'home'){\n\treturn isset($_SESSION['last_page']) ? $_SESSION['last_page'] : $error_redirect;\n}", "title": "" }, { "docid": "b2b46184bfbda6eccbffb91989797abe", "score": "0.49942806", "text": "public function hasMaxResults();", "title": "" }, { "docid": "3b2e6c0cdf1f25da2555ddfa81f69406", "score": "0.49820554", "text": "public function isLast() {\n return key($this->collection) == (count($this->collection) - 1);\n }", "title": "" }, { "docid": "0be489b2e80979a70dda74f160c777dd", "score": "0.49772155", "text": "public function isMaxNbGenReached()\n\t{\n\t\t$ret = false;\n\t\tif ($this->nb_gen_max > 0 && ($this->nb_gen_done >= $this->nb_gen_max)) $ret = true;\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "1011d8694be65e31bd198ac01dd0e0bb", "score": "0.4975915", "text": "function getMaxRecord()\n{\n $res = mysql_query(\"select max(record) from records\");\n\n if(!$res)\n throw new Exception(mysql_error(), ERROR_DB);\n\n $array = mysql_fetch_assoc($res);\n return $array['max(record)'];\n}", "title": "" }, { "docid": "b79a90616dc76e2bcdee4974e07e4d7b", "score": "0.4971899", "text": "public static function maxDate()\n\t{\n\t $date = new UDate();\n\t $date->setDate(31, 12, 9999);\n\t $date->setTime(23, 59, 59);\n\t return $date;\n\t}", "title": "" }, { "docid": "0aa97afe6348b75034d94056497f20b3", "score": "0.49702442", "text": "function file_size_max($file, $max_size) {\n if (preg_match(\"/[^0-9]/\", $max_size)) {\n return FALSE;\n }\n\n $max_size_bit = $this->let_to_bit($max_size);\n if ($file['size'] > $max_size_bit) {\n $this->set_message('file_size_max', \"%s is too big. (max allowed is $max_size)\");\n return FALSE;\n }\n return true;\n }", "title": "" }, { "docid": "1eeda197a1efb9607649709fff7ecd78", "score": "0.4959751", "text": "function check_max_number_of_members($value)\n{\n\t$max_member_no_limit = $value['max_member_no_limit'];\n\tif( $max_member_no_limit == MEMBER_PER_GROUP_NO_LIMIT)\n\t{\n\t\treturn true;\t\n\t}\n\t$max_member = $value['max_member'];\n\treturn is_numeric($max_member);\n}", "title": "" }, { "docid": "22fbedb0eee8a31f7e4fb43cf8a0e7fe", "score": "0.49589404", "text": "public function cleanup($max) {\n $this->erase(['stamp + ? < ? AND persistent = FALSE OR stamp + ? < ? AND persistent = TRUE', $max, time(), GK_SITE_SESSION_LIFETIME_REMEMBER, time()]);\n\n return true;\n }", "title": "" }, { "docid": "e8659eb2e1f24076f4ad4b61e70fc907", "score": "0.49555874", "text": "public function hasMaxpos(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "081493caa4d021f168b14212f6451a9d", "score": "0.49508494", "text": "public function is_latest () {\n\t\t$current = $this->current ();\n\t\tif ($current === false) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$versions = $this->versions ();\n\t\tif (empty ($versions)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$latest = array_pop ($versions);\n\t\tif ($latest > $current) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "db3391b48e495d3cda55573fadccb85b", "score": "0.4937807", "text": "public function getMaxDate()\n {\n return $this->option_max_date;\n }", "title": "" }, { "docid": "92c36d67481d675b62e9cb94557d99d5", "score": "0.4937231", "text": "public function members_limit_decrease()\n\t{\n\t\t$max = $this->members_limit_max_info();\n\t\t\n\t\t// har ingen maks?\n\t\tif ($max['active'] == 0) throw new HSException(\"Det finnes ingen begrensnings fra før.\");\n\t\t\n\t\t// kan ikke senkes mer?\n\t\tif ($max['active'] == $max['min']) throw new HSException(\"Medlemsantallet kan ikke senkes mer.\");\n\t\t\n\t\t// sett opp ny begrensning\n\t\t$new_max = $max['active'] - 1;\n\t\t$new_limit = $this->members_limit_build($new_max);\n\t\t\n\t\t// forsøk å oppdater\n\t\t$a = \\Kofradia\\DB::get()->exec(\"\n\t\t\tUPDATE ff\n\t\t\tSET ff_up_limit = \".\\Kofradia\\DB::quote($new_limit).\"\n\t\t\tWHERE ff_id = $this->id AND ff_up_limit = \".\\Kofradia\\DB::quote($this->data['ff_up_limit']));\n\t\t\n\t\t// endret seg?\n\t\tif ($a == 0)\n\t\t{\n\t\t\tess::$b->page->add_message(\"Medlemsbegrensningen har endret seg siden du viste siden. Prøv på nytt om du fremdeles ønsker.\", \"error\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tess::$b->page->add_message(\"Maks antall medlemmer for {$this->type['refobj']} ble senket til \".($new_max).\".\");\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7e704711db8beb53a102dcfb683e5bd0", "score": "0.49278077", "text": "public function hasLimit(){\r\n return $this->_has(8);\r\n }", "title": "" }, { "docid": "7a35ca277c31eac1ca666d2a73070e8e", "score": "0.49267015", "text": "private function getLatestModificationTime(): int\n {\n $latestDate = 0;\n foreach ($this->components as $file) {\n $file = new File($file);\n if (!$file->exists()) {\n return -1;\n }\n $time = $file->getModificationTime();\n if ($time>$latestDate) {\n $latestDate = $time;\n }\n }\n return $latestDate;\n }", "title": "" }, { "docid": "baf4837f49a155ed384b2d9280dd359d", "score": "0.49259838", "text": "public function getLastUpdate()\r\n {\r\n \t$lastUpdate = Mage::app()->loadCache('ves_license_extension_list_lastcheck');\r\n \tif(!$lastUpdate) return $this->setLastUpdate();\r\n return $lastUpdate;\r\n }", "title": "" }, { "docid": "8e276fae885ab2c282333c54aaf89ab8", "score": "0.4922506", "text": "public function entry_time_less_next()\n {\n //if the current entry is the last entry of record then approve\n if ($this->is_last_entry(null,null)) return to_object(['success' => true]);\n\n $next_entry = $this->nextEntry;\n\n if (!date_greater_than($next_entry->entry_time, $this->request->entry_time)) {\n \n return to_object([\n 'success' => false,\n 'message' => \"Please the entry time must be less than the one of the next entry\".\n \"({$next_entry->entry_time})\"\n ]);\n }\n \n return to_object(['success' => true]);\n }", "title": "" }, { "docid": "9e75c318fcef5000b3e2dd5136c90fda", "score": "0.49185452", "text": "function last_updated()\n\t{\n\t\t$post = $this->get_posts(array(), 'date_added desc', 1);\n\t\tif (!empty($post[0])) return $post[0]->atom_date;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "a3bf57c25e7bc683a0ab0be67600a69b", "score": "0.49168035", "text": "function isLast(&$model, $id=null) {\n\t\tif (!$this->__setById($model, $id)) return false;\n\t\textract($this->settings[$model->alias]);\n\t\tif (!$this->isInList($model)) return false;\n\t\treturn $model->data[$model->alias][$position_column]==$this->__bottomPositionInList($model);\n\t}", "title": "" }, { "docid": "2f142258ac2c1330995af98a08e34231", "score": "0.49157822", "text": "function setMaxFieldSize($max){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "fbd54a7cf3a26763d0c87e4d1f80416a", "score": "0.49150664", "text": "public function hasMorePages()\n {\n return $this->count() < $this->perPage;\n }", "title": "" }, { "docid": "95ce292f4fd95a9f0fe1b141731f9663", "score": "0.49117017", "text": "public function getLastUpdated()\n {\n $last = (new Query())\n ->select('max(pi.last_updated)')\n ->from(PatientInfo::tableName().' pi')\n ->leftJoin(Practices::tableName().' pr', 'pi.practice_id = pr.practice_id')\n ->leftJoin(Partners::tableName().' pa', 'pr.partner_id = pa.partner_id')\n ->where(['pi.internal_id' =>\\Yii::$app->perfectParser->patient->internal_id])\n ->andWhere(['pa.partner_id' => self::PARTNER_ID])\n ->scalar();\n\n return ($last ? strtotime($last) : 0);\n }", "title": "" }, { "docid": "719f563ebce93428a254530a9dff5201", "score": "0.49032497", "text": "private static function _max_value($field, $value)\n {\n return ($field <= $value);\n }", "title": "" }, { "docid": "dbca1e3e6724a979fad78b9f4ff59dcb", "score": "0.49025092", "text": "public function is_valid_max_file_size() {\n // Check if max file size is set, else all sizes are valid\n if (!empty($this->max_file_size)) {\n if ($this->file_size > $this->max_file_size) {\n return FALSE;\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "319f1c0d9cb6c40a3d5f20b0d627880d", "score": "0.4902254", "text": "public function checkMaxsize(File $file, $value)\n {\n if (is_array($value) === true) {\n $value = $value[key($value)];\n }\n\n if ($file->getSize() > (int) $value) {\n $this->errors['INVALID_MAX_SIZE'] = sprintf(Message::get('INVALID_MAX_SIZE'), $file->getName(), Format::bytes($value));\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e7893df798fe52737e3bde70293ac874", "score": "0.49010995", "text": "public function getLastPage() {\n return (int)ceil($this->_itemsCount / $this->_itemsPerPage);\n }", "title": "" }, { "docid": "2c56b939791164c77c1979ab9e9ba701", "score": "0.48961368", "text": "public function setMax($max) {\n $this->max = $max;\n $this->addValidator(new \\Wellid\\Validator\\MaxDate($max, $this->format));\n \n return $this;\n }", "title": "" }, { "docid": "daafcd1a6b0e67c1840950d33d701194", "score": "0.48950145", "text": "function last_login_is_recent(){\n $max_elapsed = 60 * 60 * 24;//1 week \n //return false if value is not set\n if(!isset($_SESSION['last_login'])){\n return false;\n }\n\n if(($_SESSION['last_login'] + $max_elapsed) >= time()){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "1f26f7c4dba6422c7baf94ec70732cee", "score": "0.48890823", "text": "public function hasLastAccessTime()\n {\n return $this->last_access_time !== null;\n }", "title": "" } ]